|
|
|
@ -1643,13 +1643,14 @@ public class QcServiceImpl implements QcService { |
|
|
|
// 发送邮件 |
|
|
|
if ("不合格".equals(recordData.getInspectionResult())) { |
|
|
|
// 更新"收货入库任务"的状态为"已完成" |
|
|
|
try { |
|
|
|
List<QcFAIRecordData> list = qcMapper.iqcDetailSearch(recordData); |
|
|
|
recordData.setItemList(list); |
|
|
|
sendMailIQC(recordData, "IQC"); |
|
|
|
} catch (Exception e) { |
|
|
|
logger.info(e.getMessage()); |
|
|
|
} |
|
|
|
qcMapper.updateInboundNotificationStatus(recordData.getSite(), recordData.getBuNo(), recordData.getDocumentNo(), "已完成"); |
|
|
|
// try { |
|
|
|
// List<QcFAIRecordData> list = qcMapper.iqcDetailSearch(recordData); |
|
|
|
// recordData.setItemList(list); |
|
|
|
// sendMailIQC(recordData, "IQC"); |
|
|
|
// } catch (Exception e) { |
|
|
|
// logger.info(e.getMessage()); |
|
|
|
// } |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -1661,14 +1662,14 @@ public class QcServiceImpl implements QcService { |
|
|
|
@Transactional |
|
|
|
public void cancelApproval(QcFAIRecordData data) { |
|
|
|
for (QcFAIRecordData qcData : data.getSubmitList()) { |
|
|
|
// 物料的controlMes为G的不允许取消审核 |
|
|
|
List<QcFAIRecordData> partInformationList = qcMapper.getPartInformation(qcData); |
|
|
|
if (partInformationList.isEmpty()) { |
|
|
|
throw new RuntimeException("未查到该物料数据!"); |
|
|
|
} |
|
|
|
if ("G".equals(partInformationList.get(0).getControlMes())) { |
|
|
|
throw new RuntimeException("检验单物料的管控类型为不适用,不允许取消审核 {" + qcData.getInspectionNo() + "} !"); |
|
|
|
} |
|
|
|
// // 物料的controlMes为G的不允许取消审核 |
|
|
|
// List<QcFAIRecordData> partInformationList = qcMapper.getPartInformation(qcData); |
|
|
|
// if (partInformationList.isEmpty()) { |
|
|
|
// throw new RuntimeException("未查到该物料数据!"); |
|
|
|
// } |
|
|
|
// if ("G".equals(partInformationList.get(0).getControlMes())) { |
|
|
|
// throw new RuntimeException("检验单物料的管控类型为不适用,不允许取消审核 {" + qcData.getInspectionNo() + "} !"); |
|
|
|
// } |
|
|
|
// po_order_roll_no里如果有数据则不允许取消审核 |
|
|
|
List<PoOrderRollNoData> rollNos = qcMapper.selectInfoByInspectionNo(qcData); |
|
|
|
if (!rollNos.isEmpty()) { |
|
|
|
@ -1678,8 +1679,8 @@ public class QcServiceImpl implements QcService { |
|
|
|
qcMapper.updateIQCMasterSubmitFlag2(qcData); |
|
|
|
qcMapper.updateIQCDetailSubmitFlag2(qcData); |
|
|
|
qcMapper.updateIQCSubDetailSubmitFlag2(qcData); |
|
|
|
// 删除相应task表的数据 |
|
|
|
qcMapper.deleteReceivingTaskByInspectionNo(qcData); |
|
|
|
// // 删除相应task表的数据 |
|
|
|
// qcMapper.deleteReceivingTaskByInspectionNo(qcData); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|