|
|
|
@ -1638,53 +1638,12 @@ public class QcServiceImpl implements QcService { |
|
|
|
qcMapper.updateIQCSubDetailSubmitFlag(recordData); |
|
|
|
|
|
|
|
// 更新物料缺陷跟踪批次 |
|
|
|
Integer passFlag = "合格".equals(recordData.getInspectionResult()) ? 1 : 0; |
|
|
|
qcMapper.updatePartDefectTracking(recordData.getSite(), recordData.getBuNo(), recordData.getPartNo(), recordData.getSupplierNo(), passFlag); |
|
|
|
Integer passFlag = 0; |
|
|
|
// 判断检验结论是否合格 |
|
|
|
if ("合格".equals(recordData.getInspectionResult()) || "让步接收".equals(recordData.getDisposalMeasures()) || "挑选使用".equals(recordData.getDisposalMeasures())) { |
|
|
|
// List<QcFAIRecordData> partInformationList = qcMapper.getPartInformation(recordData); |
|
|
|
// if (partInformationList.isEmpty()) { |
|
|
|
// throw new RuntimeException("未查到该物料数据!"); |
|
|
|
// } |
|
|
|
// // 获取接口时间 |
|
|
|
// String interfaceDate = getInterfaceDate(recordData.getSite()); |
|
|
|
// Date dateByParten = DateUtils.getStringToDate(interfaceDate, "yyyy-MM-dd"); |
|
|
|
// //获取当前时间 |
|
|
|
// String stringNow = DateUtils.getStringNow(); |
|
|
|
// String stringDate = DateUtils.getStringDate(dateByParten); |
|
|
|
// //获取收发类别 |
|
|
|
// List<RdStyleData> rdstyleList = qcMapper.getInterfaceRdStyleData("采购入库"); |
|
|
|
// if (rdstyleList.isEmpty()) { |
|
|
|
// throw new RuntimeException("获取收发类别失败!"); |
|
|
|
// } |
|
|
|
// String cdepcode = ""; |
|
|
|
// if ("4".equals(recordData.getSite())){ |
|
|
|
// cdepcode = "100"; |
|
|
|
// } |
|
|
|
// HardtagPurchaseInStorageCountData inStorageCountData = new HardtagPurchaseInStorageCountData(recordData.getSite(), recordData.getInspectionNo(), stringNow, data.getUpdateBy(), "0", toacc, stringDate, |
|
|
|
// poOrderData.get(0).getOrderNo(), partInformationList.get(0).getDefaultWarehouseId(), rdstyleList.get(0).getCrdcode(), recordData.getInspectionNo(), DateUtils.getStringDate(dateByParten), "1", "", |
|
|
|
// "1", poOrderData.get(0).getItemNo(), recordData.getPartNo(), recordData.getRollQty().doubleValue(), poOrderData.get(0).getCitemCode(), stringNow, "采购订单"); |
|
|
|
// inStorageCountData.setTransType("采购材料订单入库"); |
|
|
|
// inStorageCountData.setCdepcode(cdepcode); |
|
|
|
// //批量添加汇总数据 |
|
|
|
// int i = qcMapper.insertHardtagPurchaseInStorageData(inStorageCountData); |
|
|
|
// |
|
|
|
// // 生成TransHeader |
|
|
|
// HardtagTransHeaderData inData = new HardtagTransHeaderData(recordData.getInspectionNo(),recordData.getSite(),partInformationList.get(0).getDefaultWarehouseId(),dateByParten,"CRT","采购材料订单入库",data.getUpdateBy(), |
|
|
|
// data.getUpdateBy(),0,0,"*","D","N","N",new Date(), |
|
|
|
// "N", recordData.getPoOrderNo(),"Y","已录入",partInformationList.get(0).getDefaultWarehouseId(),"1","","", |
|
|
|
// "","",""); |
|
|
|
// inData.setCountId(0); |
|
|
|
// inData.setRemark("采购订单入库"); |
|
|
|
// // 保存transHeader数据 |
|
|
|
// qcMapper.batchSaveHrdtagTransHeader(inData); |
|
|
|
// |
|
|
|
// HardtagTransDetailData hardtagTransDetailData = new HardtagTransDetailData(recordData.getInspectionNo(), recordData.getSite(), 1, recordData.getPartNo(), "", recordData.getRollQty(), "+", recordData.getPoOrderNo(), "0", recordData.getBuNo()); |
|
|
|
// //保存transDetail数据 |
|
|
|
// qcMapper.batchSaveHardtagTransDetail(hardtagTransDetailData); |
|
|
|
|
|
|
|
// 更新"收货入库任务"的状态为"待入库" |
|
|
|
qcMapper.updateInboundNotificationStatus(recordData.getSite(), recordData.getBuNo(), recordData.getDocumentNo(), "待入库", ""); |
|
|
|
passFlag = 1; |
|
|
|
} |
|
|
|
// 发送邮件 |
|
|
|
else if ("不合格".equals(recordData.getInspectionResult())) { |
|
|
|
@ -1697,7 +1656,9 @@ public class QcServiceImpl implements QcService { |
|
|
|
// } catch (Exception e) { |
|
|
|
// logger.info(e.getMessage()); |
|
|
|
// } |
|
|
|
passFlag = 0; |
|
|
|
} |
|
|
|
qcMapper.updatePartDefectTracking(recordData.getSite(), recordData.getBuNo(), recordData.getPartNo(), recordData.getSupplierNo(), passFlag); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|