From 4a05deeb807b477fb5930b7f42589a02a19e0612 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Mon, 3 Nov 2025 13:37:56 +0800 Subject: [PATCH] =?UTF-8?q?2025-11-03=20pda=E8=B0=83=E6=95=B4=E6=89=AB?= =?UTF-8?q?=E6=8F=8F=E3=80=81=E6=9F=A5=E8=AF=A2=E3=80=81=E7=A1=AE=E8=AE=A4?= =?UTF-8?q?=E9=80=BB=E8=BE=91=EF=BC=88=E9=87=87=E8=B4=AD=E9=80=80=E8=B4=A7?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InboundNotificationDetailMapper.xml | 49 +++++++++++++------ .../OutboundNotificationDetailMapper.xml | 32 ++++++------ .../resources/mapper/wms/WmsPrintMapper.xml | 1 - 3 files changed, 49 insertions(+), 33 deletions(-) diff --git a/src/main/resources/mapper/inboundNotification/InboundNotificationDetailMapper.xml b/src/main/resources/mapper/inboundNotification/InboundNotificationDetailMapper.xml index 8b2401a..e3e947a 100644 --- a/src/main/resources/mapper/inboundNotification/InboundNotificationDetailMapper.xml +++ b/src/main/resources/mapper/inboundNotification/InboundNotificationDetailMapper.xml @@ -71,7 +71,7 @@ a.order_qty, a.related_order_no, a.related_order_line_no, - dbo.Get_InboundQty(a.site, a.bu_no, a.order_no, a.part_no, 'CRT') as actualStockInQty + dbo.Get_InboundQty(a.site, a.bu_no, a.order_no, a.related_order_no,a.related_order_line_no, 'in') as actualStockInQty 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 @@ -152,22 +152,39 @@ select - de.site, - de.orderRef2, - sub.subNo, - sub.subQty, - isnull(WareHouseName, sub.OrderRef4) as OrderRef4, - isnull(LocationName, sub.OrderRef5) as OrderRef5, - UserID as userId, - UserName as userName, - He.TransDate - from TransHeader He - inner join TransDetail de ON He.Site = de.site and He.OrderRef2 = de.orderRef2 and He.TransNo = de.transNo - inner join TransDetailSub sub on de.site = sub.site and de.transNo = sub.transNo and de.orderRef2 = sub.orderRef2 and de.itemNo = sub.itemNo - left join WareHouse wa on wa.Site = sub.site and wa.bu_no = sub.OrderRef2 and wa.WareHouseID = sub.OrderRef4 - left join Location lo on lo.Site = sub.site and lo.bu_no = sub.OrderRef2 and lo.WareHouseID = sub.OrderRef4 and lo.LocationID = sub.OrderRef5 - where de.site = #{site} and de.orderRef2 = #{buNo} AND he.orderRef1 = #{orderNo} and de.partNo = #{partNo} + A.site, + A.bu_no AS orderRef2, + A. roll_no AS subNo, + A. roll_qty AS subQty, + isnull(WareHouseName, A.warehouse_id) as OrderRef4, + isnull(LocationName, A.location_id) as OrderRef5, + transaction_by as userId, + C.user_display as userName, + A.transaction_date AS TransDate + from StockTransactionLog A + left join WareHouse wa on wa.Site = A.site and wa.bu_no = A.bu_no and wa.WareHouseID = A.warehouse_id + left join Location lo on lo.Site = A.site and lo.bu_no = A.bu_no and lo.WareHouseID = A.warehouse_id and lo.LocationID = A.location_id + LEFT JOIN sys_user C ON A.site = C.site AND C.username = A.transaction_by + where A.site = #{site} and A.bu_no = #{buNo} AND A.document_type = #{orderType} + AND A.document_no = #{orderNo} AND A.order_no = #{relatedOrderNo} AND A.order_line_no = #{relatedOrderLineNo}