From 2e2356dd4fec268f6be6ed923b14bfa667de0c0d Mon Sep 17 00:00:00 2001
From: guoyujie <guoyujie@ng.com>
Date: 星期六, 21 六月 2025 16:02:54 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override

---
 north-glass-erp/src/main/resources/mapper/sd/OrderProcessDetailMapper.xml |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/north-glass-erp/src/main/resources/mapper/sd/OrderProcessDetailMapper.xml b/north-glass-erp/src/main/resources/mapper/sd/OrderProcessDetailMapper.xml
index 30f80d8..1122a2f 100644
--- a/north-glass-erp/src/main/resources/mapper/sd/OrderProcessDetailMapper.xml
+++ b/north-glass-erp/src/main/resources/mapper/sd/OrderProcessDetailMapper.xml
@@ -166,11 +166,12 @@
     </select>
 
     <select id="selectShiftQuantitySv">
-        select CAST(concat(b.order_id,'/',a.order_number,'/',a.technology_number) as char ) as 'order_id',
+        select * from(select CAST(concat(b.order_id,'/',a.order_number,'/',a.technology_number) as char ) as 'order_id',
                c.child_width,
                c.child_height,
                a.completed_quantity,
-               a.breakage_quantity
+               a.breakage_quantity,
+               a.order_number
         from pp.reporting_work as b
         left join pp.reporting_work_detail as a
             on a.reporting_work_id = b.reporting_work_id
@@ -180,7 +181,10 @@
             and c.technology_number = a.technology_number
         where b.reviewed_state >=0
         and b.creator_id = #{creatorId}
-        and UNIX_TIMESTAMP(b.reporting_work_time) BETWEEN UNIX_TIMESTAMP(#{startDate}) and UNIX_TIMESTAMP(#{endDate})
-        order by b.id desc
+        and UNIX_TIMESTAMP(b.reporting_work_time) BETWEEN UNIX_TIMESTAMP(#{startDatetime}) and UNIX_TIMESTAMP(#{endDatetime})
+        order by b.id desc ) as e
+        <if test="step != null and step != ''">
+            group by e.order_number
+        </if>
     </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0