|
|
|
@ -2471,7 +2471,7 @@ public class QcServiceImpl implements QcService { |
|
|
|
// 修改子明细记录标识为已提交 |
|
|
|
qcMapper.updateFQCSubDetailSubmitFlag(qcData); |
|
|
|
if (StringUtils.isNotBlank(qcData.getRefInfo1()) && StringUtils.isNotBlank(qcData.getRefInfo2())){ |
|
|
|
inspectService.inspectForQMS(qcData.getSite(), qcData.getRefInfo1(), Integer.parseInt(qcData.getRefInfo2()), "submit", qcData.getInspectionResult(), qcData.getInspectionRemark(), currentUser.getUsername()); |
|
|
|
inspectService.inspectForQMS(qcData.getSite(), qcData.getRefInfo1(), Integer.parseInt(qcData.getRefInfo2()), "submit", getQmsInspectResult(qcData), qcData.getInspectionRemark(), currentUser.getUsername()); |
|
|
|
} |
|
|
|
|
|
|
|
// 发送邮件 |
|
|
|
@ -2839,7 +2839,7 @@ public class QcServiceImpl implements QcService { |
|
|
|
// 修改子明细记录标识为已提交 |
|
|
|
qcMapper.updateIPQCSubDetailSubmitFlag(qcData); |
|
|
|
if (StringUtils.isNotBlank(qcData.getRefInfo1()) && StringUtils.isNotBlank(qcData.getRefInfo2())){ |
|
|
|
inspectService.inspectForQMS(qcData.getSite(), qcData.getRefInfo1(), Integer.parseInt(qcData.getRefInfo2()), "submit", qcData.getInspectionResult(), qcData.getInspectionRemark(), currentUser.getUsername()); |
|
|
|
inspectService.inspectForQMS(qcData.getSite(), qcData.getRefInfo1(), Integer.parseInt(qcData.getRefInfo2()), "submit", getQmsInspectResult(qcData), qcData.getInspectionRemark(), currentUser.getUsername()); |
|
|
|
} |
|
|
|
// 发送邮件 |
|
|
|
// if ("不合格".equals(qcData.getInspectionResult())) { |
|
|
|
@ -3452,7 +3452,7 @@ public class QcServiceImpl implements QcService { |
|
|
|
qcMapper.updateSQCSubDetailSubmitFlag(recordData); |
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(recordData.getRefInfo1()) && StringUtils.isNotBlank(recordData.getRefInfo2())){ |
|
|
|
inspectService.inspectForQMS(recordData.getSite(), recordData.getRefInfo1(), Integer.parseInt(recordData.getRefInfo2()), "submit", recordData.getInspectionResult(), recordData.getInspectionRemark(), currentUser.getUsername()); |
|
|
|
inspectService.inspectForQMS(recordData.getSite(), recordData.getRefInfo1(), Integer.parseInt(recordData.getRefInfo2()), "submit", getQmsInspectResult(recordData), recordData.getInspectionRemark(), currentUser.getUsername()); |
|
|
|
} |
|
|
|
|
|
|
|
if ("不合格".equals(recordData.getInspectionResult())) { |
|
|
|
@ -3969,7 +3969,7 @@ public class QcServiceImpl implements QcService { |
|
|
|
} |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(recordData.getRefInfo1()) && StringUtils.isNotBlank(recordData.getRefInfo2())){ |
|
|
|
inspectService.inspectForQMS(recordData.getSite(), recordData.getRefInfo1(), Integer.parseInt(recordData.getRefInfo2()), "submit", recordData.getInspectionResult(), recordData.getInspectionRemark(), currentUser.getUsername()); |
|
|
|
inspectService.inspectForQMS(recordData.getSite(), recordData.getRefInfo1(), Integer.parseInt(recordData.getRefInfo2()), "submit", getQmsInspectResult(recordData), recordData.getInspectionRemark(), currentUser.getUsername()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -5847,10 +5847,7 @@ public class QcServiceImpl implements QcService { |
|
|
|
qcMapper.updateFQASDetailSubmitFlag(qcData); |
|
|
|
qcMapper.updateFQASSubDetailSubmitFlag(qcData); |
|
|
|
|
|
|
|
String insApproveResultFlag = "N"; |
|
|
|
if ("合格".equals(qcData.getInspectionResult()) || "让步接收".equals(qcData.getDisposalMeasures()) || "挑选使用".equals(qcData.getDisposalMeasures())) { |
|
|
|
insApproveResultFlag = "Y"; |
|
|
|
} |
|
|
|
String insApproveResultFlag = "合格".equals(getQmsInspectResult(qcData)) ? "Y" : "N"; |
|
|
|
String insRemark = qcData.getInspectionRemark() != null ? qcData.getInspectionRemark() : ""; |
|
|
|
int n = qcMapper.updateCODelNotifyDetailOqcApprove(qcData.getSite(), qcData.getDelNotifyNo(), qcData.getDelNotifyItemNo(), insApproveResultFlag, qmsUserId, insRemark); |
|
|
|
} |
|
|
|
@ -5863,6 +5860,26 @@ public class QcServiceImpl implements QcService { |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 根据检验结论与处置措施,解析传给QMS的检验结果。 |
|
|
|
* 不合格+让步接收/挑选使用 -> 合格;不合格+返工返修/拒收退回 -> 不合格。 |
|
|
|
*/ |
|
|
|
private static String resolveInspectResultForQMS(String inspectionResult, String disposalMeasures) { |
|
|
|
if ("不合格".equals(inspectionResult)) { |
|
|
|
if ("让步接收".equals(disposalMeasures) || "挑选使用".equals(disposalMeasures)) { |
|
|
|
return "合格"; |
|
|
|
} |
|
|
|
if ("返工返修".equals(disposalMeasures) || "拒收退回".equals(disposalMeasures)) { |
|
|
|
return "不合格"; |
|
|
|
} |
|
|
|
} |
|
|
|
return inspectionResult; |
|
|
|
} |
|
|
|
|
|
|
|
private static String getQmsInspectResult(QcFAIRecordData data) { |
|
|
|
return resolveInspectResultForQMS(data.getInspectionResult(), data.getDisposalMeasures()); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional |
|
|
|
public void cancelFQASSubmitResult(QcFAIRecordData data) { |
|
|
|
|