diff --git a/src/main/java/com/gaotao/modules/inboundNotification/service/impl/InboundNotificationServiceImpl.java b/src/main/java/com/gaotao/modules/inboundNotification/service/impl/InboundNotificationServiceImpl.java index e325484..ec3d9b9 100644 --- a/src/main/java/com/gaotao/modules/inboundNotification/service/impl/InboundNotificationServiceImpl.java +++ b/src/main/java/com/gaotao/modules/inboundNotification/service/impl/InboundNotificationServiceImpl.java @@ -726,9 +726,8 @@ public class InboundNotificationServiceImpl implements InboundNotificationServic // 下达前校验 validateIssueData(data); - // 收获入库单状态改为"待检验" 赋值下达人和下达时间 + // 赋值下达人和下达时间 data.setAssignedBy(sysUserEntity.getUsername()); - data.setOrderStatus("待检验"); headMapper.issueInboundNotification(data); logger.info("入库单下达成功,入库单号: {}", data.getOrderNo()); } catch (Exception e) { @@ -740,16 +739,16 @@ public class InboundNotificationServiceImpl implements InboundNotificationServic List params = new ArrayList<>(); params.add(data.getSite()); params.add(data.getBuNo()); - params.add(data.getRelatedOrderNo()); - params.add(data.getRelatedOrderLineNo()); + params.add(data.getRelatedOrderNo() == null ? "" : data.getRelatedOrderNo()); + params.add(data.getRelatedOrderLineNo() == null ? "" : data.getRelatedOrderLineNo()); params.add(""); - params.add(data.getRequiredQtyCount()); - params.add(data.getOrderQty()); - params.add(sysUserEntity.getUsername()); - params.add(data.getSupplierId()); + params.add(data.getRequiredQtyCount() == null ? 0 : data.getRequiredQtyCount()); + params.add(data.getOrderQty() == null ? 0 : data.getOrderQty()); + params.add(sysUserEntity.getUsername() == null ? "" : sysUserEntity.getUsername()); + params.add(data.getSupplierId() == null ? "" : data.getSupplierId()); params.add("FQC"); - params.add(data.getOrderType()); - params.add(data.getOrderNo()); + params.add(data.getOrderType() == null ? "" : data.getOrderType()); + params.add(data.getOrderNo() == null ? "" : data.getOrderNo()); //存储过程 调用存储过程 创建分卷 List> resultList = procedureMapper.getProcedureData("getInspectionTaskAutomatically", params); //判断是否检验成功 diff --git a/src/main/java/com/gaotao/modules/pms/mapper/QcMapper.java b/src/main/java/com/gaotao/modules/pms/mapper/QcMapper.java index 6e7670e..c33a5fd 100644 --- a/src/main/java/com/gaotao/modules/pms/mapper/QcMapper.java +++ b/src/main/java/com/gaotao/modules/pms/mapper/QcMapper.java @@ -541,7 +541,7 @@ public interface QcMapper { */ IPage routingListSearch(Page page, @Param("query") RoutingListData data); - void updateInboundNotificationStatus(@Param("site") String site, @Param("buNo") String buNo, @Param("documentNo") String documentNo, @Param("status") String status); + void updateInboundNotificationStatus(@Param("site") String site, @Param("buNo") String buNo, @Param("documentNo") String documentNo, @Param("status") String status, @Param("inspectionFlag") String inspectionFlag); /** * 查询过程检验待检验记录数量 diff --git a/src/main/java/com/gaotao/modules/pms/service/Impl/QcServiceImpl.java b/src/main/java/com/gaotao/modules/pms/service/Impl/QcServiceImpl.java index 4297ac9..f615bf6 100644 --- a/src/main/java/com/gaotao/modules/pms/service/Impl/QcServiceImpl.java +++ b/src/main/java/com/gaotao/modules/pms/service/Impl/QcServiceImpl.java @@ -613,6 +613,8 @@ public class QcServiceImpl implements QcService { qcMapper.deleteEquipmentDataAcquisition(qcData); // 删除文件 qcMapper.deleteInspectionFiles(qcData); + // 修改入库通知单状态为'草稿' + qcMapper.updateInboundNotificationStatus(qcData.getSite(), qcData.getBuNo(), qcData.getDocumentNo(), "草稿", "N"); } } @@ -687,10 +689,10 @@ public class QcServiceImpl implements QcService { // 判断检验结论是否合格 if ("合格".equals(qcData.getInspectionResult()) || "让步接收".equals(qcData.getDisposalMeasures()) || "挑选使用".equals(qcData.getDisposalMeasures())) { // 状态改为待入库 - qcMapper.updateInboundNotificationStatus(qcData.getSite(), qcData.getBuNo(), qcData.getDocumentNo(), "待入库"); + qcMapper.updateInboundNotificationStatus(qcData.getSite(), qcData.getBuNo(), qcData.getDocumentNo(), "待入库", ""); } else { // 状态改为'草稿' - qcMapper.updateInboundNotificationStatus(qcData.getSite(), qcData.getBuNo(), qcData.getDocumentNo(), "草稿"); + qcMapper.updateInboundNotificationStatus(qcData.getSite(), qcData.getBuNo(), qcData.getDocumentNo(), "草稿", "N"); } // // 发送邮件 @@ -1655,12 +1657,12 @@ public class QcServiceImpl implements QcService { // qcMapper.batchSaveHardtagTransDetail(hardtagTransDetailData); // 更新"收货入库任务"的状态为"待入库" - qcMapper.updateInboundNotificationStatus(recordData.getSite(), recordData.getBuNo(), recordData.getDocumentNo(), "待入库"); + qcMapper.updateInboundNotificationStatus(recordData.getSite(), recordData.getBuNo(), recordData.getDocumentNo(), "待入库", ""); } // 发送邮件 else if ("不合格".equals(recordData.getInspectionResult())) { // 更新"收货入库任务"的状态为"已完成" - qcMapper.updateInboundNotificationStatus(recordData.getSite(), recordData.getBuNo(), recordData.getDocumentNo(), "已完成"); + qcMapper.updateInboundNotificationStatus(recordData.getSite(), recordData.getBuNo(), recordData.getDocumentNo(), "已完成", ""); // try { // List list = qcMapper.iqcDetailSearch(recordData); // recordData.setItemList(list); @@ -1697,7 +1699,7 @@ public class QcServiceImpl implements QcService { qcMapper.updateIQCDetailSubmitFlag2(qcData); qcMapper.updateIQCSubDetailSubmitFlag2(qcData); // 修改收货入库单为待检验 - qcMapper.updateInboundNotificationStatus(qcData.getSite(), qcData.getBuNo(), qcData.getDocumentNo(), "待检验"); + qcMapper.updateInboundNotificationStatus(qcData.getSite(), qcData.getBuNo(), qcData.getDocumentNo(), "待检验", ""); // // 删除相应task表的数据 // qcMapper.deleteReceivingTaskByInspectionNo(qcData); } diff --git a/src/main/resources/mapper/inboundNotification/InboundNotificationHeadMapper.xml b/src/main/resources/mapper/inboundNotification/InboundNotificationHeadMapper.xml index 9347c06..18dcf78 100644 --- a/src/main/resources/mapper/inboundNotification/InboundNotificationHeadMapper.xml +++ b/src/main/resources/mapper/inboundNotification/InboundNotificationHeadMapper.xml @@ -200,8 +200,7 @@ UPDATE inbound_notification_head - SET order_status = #{orderStatus}, - assigned_by = #{assignedBy}, + SET assigned_by = #{assignedBy}, assigned_date = GETDATE() WHERE site = #{site} AND bu_no = #{buNo} AND order_no = #{orderNo} diff --git a/src/main/resources/mapper/pms/QcMapper.xml b/src/main/resources/mapper/pms/QcMapper.xml index b05f95b..14bff29 100644 --- a/src/main/resources/mapper/pms/QcMapper.xml +++ b/src/main/resources/mapper/pms/QcMapper.xml @@ -4000,6 +4000,9 @@ update inbound_notification_head set order_status = #{status} + + , inspection_flag = #{inspectionFlag} + where site = #{site} and bu_no = #{buNo} and order_no = #{documentNo}