From 34b85fc439a1b125012c1a328d6145db37a178cf Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Thu, 16 Oct 2025 15:34:11 +0800 Subject: [PATCH] =?UTF-8?q?2025-10-16=20pda=E9=87=87=E8=B4=AD=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InboundNotificationHeadMapper.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/resources/mapper/inboundNotification/InboundNotificationHeadMapper.xml b/src/main/resources/mapper/inboundNotification/InboundNotificationHeadMapper.xml index 2f112c2..42f3aa5 100644 --- a/src/main/resources/mapper/inboundNotification/InboundNotificationHeadMapper.xml +++ b/src/main/resources/mapper/inboundNotification/InboundNotificationHeadMapper.xml @@ -14,7 +14,7 @@ SUM(CASE WHEN pr.hardtag_in_flag = '已入库' THEN 1 ELSE 0 END) AS labelinCount, -- 已入库标签数 COUNT(DISTINCT pr.roll_no) AS totalLabels, -- 需入库标签数 SUM(CASE WHEN pr.hardtag_in_flag = '已入库' THEN ISNULL(pr.roll_qty, 0) ELSE 0 END) AS totalinLabels, -- 已入库物料总数 - SUM(CAST(D.required_qty AS float)) as labelCount --需入库总数 + D.required_qty as labelCount --需入库总数 FROM inbound_notification_head h INNER JOIN inbound_notification_detail d ON h.site = d.site and h.bu_no = d.bu_no and h.order_no = d.order_no LEFT JOIN po_order_roll_no pr ON d.site = pr.site and d.bu_no = pr.bu_no and d.inspection_no = pr.inspection_no AND d.part_no = pr.part_no @@ -29,7 +29,7 @@ AND CONVERT(DATE, h.required_inbound_date) = CONVERT(DATE, GETDATE()) - GROUP BY h.site,h.bu_no,h.order_no,h.required_inbound_date + GROUP BY h.site,h.bu_no,h.order_no,h.required_inbound_date ,D.required_qty ORDER BY h.required_inbound_date DESC @@ -46,7 +46,7 @@ SUM(CASE WHEN hardtag_in_flag = '已入库' then 1 else 0 end) labelinCount, --已入库标签数 COUNT(DISTINCT pr.roll_no) as totalLabels , --需入库标签数 SUM(CASE WHEN hardtag_in_flag = '已入库' then CAST(roll_qty AS float) else 0 end) totalinLabels,--已入库物料总数 - SUM(CAST(D.required_qty AS float)) as labelCount --需入库总数 + D.required_qty as labelCount --需入库总数 FROM inbound_notification_head h INNER JOIN inbound_notification_detail d ON h.site = d.site and h.bu_no = d.bu_no and h.order_no = d.order_no LEFT JOIN po_order_roll_no pr ON d.site = pr.site and d.bu_no = pr.bu_no and d.inspection_no = pr.inspection_no AND d.part_no = pr.part_no @@ -54,7 +54,7 @@ h.site = #{site} AND h.bu_no = #{buNo} AND h.order_no = #{orderNo} - GROUP BY h.order_no, h.site, h.bu_no, h.required_inbound_date + GROUP BY h.order_no, h.site, h.bu_no, h.required_inbound_date,D.required_qty @@ -74,11 +74,11 @@ SELECT d.site, d.bu_no,d.part_no as partNo,d.part_desc, SUM(CASE WHEN hardtag_in_flag = '已入库' then CAST(roll_qty AS float) else 0 end) totalinLabels,--已入库数 - SUM(CAST(D.required_qty AS float)) as labelCount --需求数量 + D.required_qty as labelCount --需入库总数 FROM inbound_notification_detail d LEFT JOIN po_order_roll_no pr ON d.site = pr.site and d.bu_no = pr.bu_no and d.inspection_no = pr.inspection_no AND d.part_no = pr.part_no WHERE d.SITE = #{site} AND d.bu_no = #{buNo} AND d.order_no = #{inboundNo} - group by d.site, d.bu_no,d.part_no, d.part_desc + group by d.site, d.bu_no,d.part_no, d.part_desc,D.required_qty