diff --git a/src/main/java/com/gaotao/modules/inboundNotification/entity/InboundNotificationDetailEntity.java b/src/main/java/com/gaotao/modules/inboundNotification/entity/InboundNotificationDetailEntity.java index e5b5bcb..2f94a78 100644 --- a/src/main/java/com/gaotao/modules/inboundNotification/entity/InboundNotificationDetailEntity.java +++ b/src/main/java/com/gaotao/modules/inboundNotification/entity/InboundNotificationDetailEntity.java @@ -25,4 +25,6 @@ public class InboundNotificationDetailEntity extends QueryPage { private String relatedOrderLineNo; private String inspectionNo; private Integer orderItemNo; + private String rollNo; + private String remark; } diff --git a/src/main/java/com/gaotao/modules/inboundNotification/entity/vo/InboundNotificationDetailVo.java b/src/main/java/com/gaotao/modules/inboundNotification/entity/vo/InboundNotificationDetailVo.java index e216fb9..53b46d6 100644 --- a/src/main/java/com/gaotao/modules/inboundNotification/entity/vo/InboundNotificationDetailVo.java +++ b/src/main/java/com/gaotao/modules/inboundNotification/entity/vo/InboundNotificationDetailVo.java @@ -22,4 +22,5 @@ public class InboundNotificationDetailVo extends InboundNotificationDetailEntity private Double storableQty; private String status; private Double countRollNo; + private String umName; } \ No newline at end of file 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 84fb5bf..ea52c67 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 @@ -583,6 +583,7 @@ public class InboundNotificationServiceImpl implements InboundNotificationServic detailVo.setOrderItemNo(lineNo); // inspection_no = order_no + "-" + order_item_no detailVo.setInspectionNo(detailVo.getOrderNo() + "-" + detailVo.getOrderItemNo()); + detailVo.setRollNo(part.getRollNo()); return detailVo; } diff --git a/src/main/java/com/gaotao/modules/pms/entity/vo/PartInformationVo.java b/src/main/java/com/gaotao/modules/pms/entity/vo/PartInformationVo.java index b301b23..0610820 100644 --- a/src/main/java/com/gaotao/modules/pms/entity/vo/PartInformationVo.java +++ b/src/main/java/com/gaotao/modules/pms/entity/vo/PartInformationVo.java @@ -22,4 +22,5 @@ public class PartInformationVo extends PartInformationEntity { private String unit; private String outBatchNo; private String umName; + private String rollNo; } diff --git a/src/main/resources/mapper/inboundNotification/InboundNotificationDetailMapper.xml b/src/main/resources/mapper/inboundNotification/InboundNotificationDetailMapper.xml index 1bfbc2b..4cf4af5 100644 --- a/src/main/resources/mapper/inboundNotification/InboundNotificationDetailMapper.xml +++ b/src/main/resources/mapper/inboundNotification/InboundNotificationDetailMapper.xml @@ -60,6 +60,7 @@ a.part_no, a.part_desc, a.unit, + c.umName, a.required_qty, a.in_warehouse, b.WareHouseName as inWarehouseName, @@ -71,9 +72,11 @@ a.order_qty, a.related_order_no, a.related_order_line_no, - a.actual_in_qty as actualStockInQty + a.actual_in_qty as actualStockInQty, + a.roll_no FROM inbound_notification_detail as a left join WareHouse as b on a.site = b.site and a.bu_no = b.bu_no and a.in_warehouse = b.WareHouseID + left join um as c on a.site = c.site and a.unit = c.UMID a.site = #{site} and a.bu_no = #{buNo} and a.order_no = #{orderNo} @@ -86,18 +89,21 @@ DELETE FROM inbound_notification_detail WHERE site = #{site} and bu_no = #{buNo} and order_no = #{orderNo} and part_no = #{partNo} + + AND roll_no = #{rollNo} + INSERT INTO inbound_notification_detail (site, bu_no, order_no, part_no, part_desc, unit, required_qty, in_warehouse, in_batch_no, created_by, created_date, order_qty, - related_order_no, related_order_line_no, inspection_no, order_item_no) + related_order_no, related_order_line_no, inspection_no, order_item_no, roll_no) VALUES (#{detail.site}, #{detail.buNo}, #{detail.orderNo}, #{detail.partNo}, #{detail.partDesc}, #{detail.unit}, #{detail.requiredQty,jdbcType=FLOAT}, #{detail.inWarehouse}, #{detail.inBatchNo}, #{detail.createdBy}, GETDATE(), #{detail.orderQty,jdbcType=FLOAT}, - #{detail.relatedOrderNo}, #{detail.relatedOrderLineNo}, #{detail.inspectionNo}, #{detail.orderItemNo}) + #{detail.relatedOrderNo}, #{detail.relatedOrderLineNo}, #{detail.inspectionNo}, #{detail.orderItemNo}, #{detail.rollNo}) @@ -134,19 +140,19 @@ SET required_qty = CASE - WHEN part_no = #{item.partNo} THEN #{item.requiredQty,jdbcType=DOUBLE} + WHEN roll_no = #{item.rollNo} THEN #{item.requiredQty,jdbcType=DOUBLE} ELSE required_qty END, in_warehouse = CASE - WHEN part_no = #{item.partNo} THEN #{item.inWarehouse} + WHEN roll_no = #{item.rollNo} THEN #{item.inWarehouse} ELSE in_warehouse END - WHERE part_no IN + WHERE roll_no IN - #{item.partNo} + #{item.rollNo} AND site = #{list[0].site} and bu_no = #{list[0].buNo} and order_no = #{list[0].orderNo} @@ -172,15 +178,16 @@ c.PartDescription as partDesc, c.UMID as unit, a.status, - a.LotSize as order_qty , - sum(pr.RollQty) as requiredQty, -- 可入库数量 - count(RollNo) as countRollNo -- 可入库卷数 + a.LotSize as order_qty, + pr.RollNo as rollNo, + pr.RollQty as requiredQty, + pr.remark FROM ShopOrder a - LEFT JOIN inbound_notification_detail b ON a.Site = b.site AND a.bu_no = b.bu_no AND a.OrderNo = b.related_order_no AND a.PartNo = b.part_no - INNER JOIN SFDC_Rolls pr ON a.site = pr.site and a.bu_no = pr.bu_no and a.OrderNo = pr.OrderNo - inner join Part c on a.Site = c.Site and a.bu_no = c.bu_no and a.PartNo = c.PartNo - where a.site = #{query.site} and a.bu_no = #{query.buNo} and pr.status ='待入库' AND B.SITE IS NULL and isnull(pr.status,'*') ]]> '*' - and a.PartNo not in + INNER JOIN SFDC_Rolls pr ON a.site = pr.site AND a.bu_no = pr.bu_no AND a.OrderNo = pr.OrderNo + LEFT JOIN inbound_notification_detail b ON pr.Site = b.site AND pr.bu_no = b.bu_no AND pr.OrderNo = b.related_order_no AND pr.RollNo = b.roll_no + INNER JOIN Part c on a.Site = c.Site and a.bu_no = c.bu_no and a.PartNo = c.PartNo + WHERE a.site = #{query.site} and a.bu_no = #{query.buNo} and pr.status = '待入库' AND b.site IS NULL AND pr.RollType ]]> '删除卷' + AND pr.RollNo NOT IN #{item} @@ -196,7 +203,7 @@ AND a.status = #{query.status} - GROUP BY a.Site, a.bu_no, a.OrderNo, a.PartNo, a.LotSize, c.PartDescription, c.UMID, a.status + ORDER BY a.OrderNo, pr.RollNo