From 71f90ed3a2eeea97b20cd095cc34a1f64dac5c81 Mon Sep 17 00:00:00 2001
From: guoyujie <guoyujie@ng.com>
Date: 星期三, 26 十一月 2025 11:21:39 +0800
Subject: [PATCH] 提交 计算方式进度

---
 north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml |   49 +++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 39 insertions(+), 10 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 6f57226..07ed781 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -86,6 +86,9 @@
         <if test="flowCard.processId != null and flowCard.processId != ''">
             and a.process_Id regexp #{flowCard.processId}
         </if>
+        <if test="flowCard.order.batch != null and flowCard.order.batch != ''">
+            and b.batch regexp #{flowCard.order.batch}
+        </if>
         <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''">
             and c.product_id regexp #{flowCard.orderDetail.productId}
         </if>
@@ -725,7 +728,9 @@
                concat(fc.process_id, '/', #{technologyNumber}) as processIdNumber,
                concat('瀵瑰簲鎴戝徃鍗曞彿', o.batch)                 AS otherRemarks,
                ''                                              as qrcode,
-               ifnull(rack,"")                                  as rack
+               ifnull(rack,"")                                  as rack,
+               o.quantity as orderQuantity,
+               o.area as orderArea
         from flow_card as fc
                  left join sd.order_glass_detail as ogd
                            on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and
@@ -2168,6 +2173,15 @@
         order by IF(fcs.sort != NULL or fcs.sort != '', fcs.sort, fc.order_number)
     </select>
 
+    <select id="getgetPrintCustomDataSemiSp">
+        select * from pp.optimize_detail opd
+                 where opd.process_id= #{processId} and opd.order_sort = #{orderNumber}
+        <if test="technologyNumber != null and technologyNumber != ''">
+          and opd.layer = #{technologyNumber}
+        </if>
+
+    </select>
+
     <select id="selectPrintNotMp">
         select fc.id,
                fc.order_id,
@@ -2646,7 +2660,9 @@
                concat(fc.process_id, '/', #{technologyNumber}) as processIdNumber,
                concat('瀵瑰簲鎴戝徃鍗曞彿', o.batch)                 AS otherRemarks,
                fc.technology_number                            as qrcode,
-               o.other_remarks
+               o.other_remarks,
+               o.quantity as orderQuantity,
+               o.area as orderArea
         from flow_card as fc
                  left join sd.order_glass_detail as ogd
                            on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and
@@ -2993,6 +3009,16 @@
         ORDER BY opd.stock_id
     </select>
 
+    <select id="getPrintProjectDetailsMpSp">
+        SELECT opd.project_no,opd.stock_id,opd.polys_id,o_width,o_height,p_width,p_height,opd.glass_id
+        FROM optimize_detail as opd left join optimize_layout as opl on opl.project_no=opd.project_no and opl.stock_id=opd.stock_id
+        where opd.project_no=#{projectNo} and opd.stock_id in
+        <foreach item="item" index="index" collection="stockId" open="(" separator="," close=")">
+            #{item}
+        </foreach>
+        order BY opd.stock_id
+    </select>
+
     <select id="getPrintCustomDataProjectDetail">
         select
             opt.glass_id                                          as heat_layout_sort ,
@@ -3013,25 +3039,25 @@
             contacts,
             delivery_address                                      as deliveryAddress,
             od.processing_note                                    as processingNote,
-            opt.width,
-            opt.height,
+            opt.o_width,
+            opt.o_height,
             opl.glass_count as flowQuantity,
             CONCAT(
-                    opt.width,
+                    opt.o_width,
                     ' X ',
-                    opt.height,
+                    opt.o_height,
                     ' = ',opl.glass_count )      as size,
                CONCAT(
                        od.order_number,')      ',
-                       opt.width,
+                       opt.o_width,
                        ' X ',
-                       opt.height,
+                       opt.o_height,
                        ' = ',opl.glass_count )      as numberSize,
                CONCAT(
                        od.order_number,')','   ',
-                        opt.width,
+                        opt.o_width,
                        ' X ',
-                       opt.height)      as numberSizeQuantity,
+                       opt.o_height)      as numberSizeQuantity,
             od.order_number                                       as orderNumber,
             fc.technology_number                                  as technologyNumber,
             od.building_number                                    as buildingNumber,
@@ -3072,6 +3098,9 @@
                  left join sd.product_detail as pd on pd.prod_id = p.id and pd.sort_num = od.order_number and
                                                       pd.glass_sort = fc.technology_number
         where opt.project_no=#{projectNo} and opt.stock_id=#{stockId}
+        <if test="polysId != null">
+           and opt.polys_id=#{polysId}
+        </if>
         order by opt.stock_id,opt.polys_id
     </select>
 

--
Gitblit v1.8.0