diff --git a/src/main/resources/mapper/outboundNotification/OutboundNotificationDetailMapper.xml b/src/main/resources/mapper/outboundNotification/OutboundNotificationDetailMapper.xml index e7fc896..971e674 100644 --- a/src/main/resources/mapper/outboundNotification/OutboundNotificationDetailMapper.xml +++ b/src/main/resources/mapper/outboundNotification/OutboundNotificationDetailMapper.xml @@ -110,9 +110,11 @@ a.PartNo, a.PartDescription as partDesc, a.UMID as unit, + um.umName, a.outbound_warehouse_id as outboundWarehouseId FROM part as a left join outbound_notification_detail as b on a.site = b.site and a.bu_no = b.bu_no and a.partNo = b.part_no and b.order_no = #{query.orderNo} + left join um as um on a.site = um.site and a.UMID = um.UMID where a.site = #{query.site} and a.bu_no = #{query.buNo} and b.site is null and a.PartNo not in @@ -175,24 +177,26 @@ a.part_desc as partDesc, a.order_qty, b.umid as unit, + um.umName, SUM(a.roll_qty) AS requiredQty -- 可出库数量 FROM po_order_roll_no a INNER JOIN part b WITH (NOLOCK) ON a.site = b.site AND a.part_no = b.partno LEFT JOIN inventory_stock c WITH (NOLOCK) ON a.site = c.site AND a.roll_no = c.roll_no AND (c.status IN ('在库', '冻结') OR A.hardtag_in_flag ='未入库') + left join um as um on a.site = um.site and b.umid = um.umid where a.site = #{query.site} and a.bu_no = #{query.buNo} and a.Part_No not in #{item} - AND a.OrderNo like '%' + #{query.relatedOrderNo} + '%' + AND a.Order_No like '%' + #{query.relatedOrderNo} + '%' - AND a.partNo like '%' + #{query.partNo} + '%' + AND a.Part_No like '%' + #{query.partNo} + '%' AND a.part_desc like '%' + #{query.partDesc} + '%' - GROUP BY a.Site, a.bu_no, a.Order_No, a.item_no, a.Part_No, a.part_desc, a.order_qty, b.umid + GROUP BY a.Site, a.bu_no, a.Order_No, a.item_no, a.Part_No, a.part_desc, a.order_qty, b.umid, um.umName