From b481539c8cd70e95765c946fcc0b66615ac7c1c6 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期五, 28 三月 2025 15:43:54 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override

---
 north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
index dc508ae..d324b3d 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -853,18 +853,18 @@
                o.project,
                od.building_number,
                od.processing_note,
-               ogd.child_width         as width,
-               ogd.child_height        as height,
+               opd.o_width         as width,
+               opd.o_height        as height,
                ogd.glass_child,
                ogd.process,
                e.type_name,
                opd.stock_id,
                opd.polys_id,
-               od.quantity,
+               IFNULL(od.quantity,1) as quantity,
                od.other_columns,
                od.bend_radius,
-               od.order_number as heat_layout_id,
-               a.id as heat_layout_sort,
+               ifnull(od.order_number,0) as heat_layout_id,
+               ifnull(a.id,0) as heat_layout_sort,
                od.product_name
         from pp.optimize_detail opd
                  left join sd.`order` o on SUBSTR(opd.process_id, 1, 10) = o.order_id
@@ -912,7 +912,7 @@
                  left join sd.product p on od.product_id = p.id
                  left join sd.basic_glass_type e on e.type_id = p.type_id
                  left join sd.customer c on c.id = o.customer_id
-        where opd.project_no = #{projectNo}
+        where opd.project_no = #{projectNo} and o.order_id is not null
         order by opd.heat_layout_id, opd.heat_layout_sort desc
     </select>
 
@@ -2790,7 +2790,7 @@
                  left join
              (select (@row_number := @row_number + 1) as id,process_id as process_id from (select process_id from pp.optimize_detail tt where project_no =#{projectNo} group by process_id) tt,(select @row_number := 0) as t) a
              on a.process_id=opd.process_id
-        where opd.project_no = #{projectNo}
+        where opd.project_no = #{projectNo} and o.order_id is not null
         group by  order_id,od.order_number
         order by ogd.child_width desc,ogd.child_height desc
     </select>

--
Gitblit v1.8.0