From 74afa7174d1f6159aa2f7d2404903b36e13cef1f Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期一, 10 三月 2025 14:46:18 +0800
Subject: [PATCH] 流程卡分家删除部分已分流程卡后重新分架数量不正确问题,次破报表后端求和sql语法错误调整

---
 north-glass-erp/src/main/resources/mapper/sd/OrderGlassDetailMapper.xml |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/north-glass-erp/src/main/resources/mapper/sd/OrderGlassDetailMapper.xml b/north-glass-erp/src/main/resources/mapper/sd/OrderGlassDetailMapper.xml
index 81deef7..1e9753c 100644
--- a/north-glass-erp/src/main/resources/mapper/sd/OrderGlassDetailMapper.xml
+++ b/north-glass-erp/src/main/resources/mapper/sd/OrderGlassDetailMapper.xml
@@ -168,11 +168,14 @@
 
     <select id="getDifferentSizeNumber">
        select if(count(id)>1,1,0) from (select
-          id
+          a.id,a.child_width,b.width
         from order_glass_detail as a
+        left join order_detail as b
+        on a.order_id = b.order_id and a.order_number = b.order_number
         where a.order_id = #{orderId}
           and a.order_number = #{orderNumber}
-        group by child_width,child_height) as c
+          and a.child_width != b.width
+        ) as c
     </select>
 
     <select id="getOrderGlassDetailByProductIdGlassChild" >

--
Gitblit v1.8.0