From 7c30e26f3cc97ebcbb2cf86e2026b10f2e23994d Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期一, 08 十二月 2025 16:40:26 +0800
Subject: [PATCH] 流程卡添加订单类型、补片流程卡调整样式,工序待完成报表添加厚度

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

diff --git a/north-glass-erp/src/main/resources/mapper/pp/GlassOptimize.xml b/north-glass-erp/src/main/resources/mapper/pp/GlassOptimize.xml
index db79a20..6658d93 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/GlassOptimize.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/GlassOptimize.xml
@@ -185,18 +185,22 @@
              c.project_no,
              d.child_width as 'width',
              d.child_height as 'height',
+             (d.child_width + d.child_height) * 2/ 1000 as 'perimeter',
              c.quantity,
+             od.shape,
              concat( c.process_id, '-', c.technology_number ) AS 'process_id',
              c.process_id AS processId,
              c.technology_number as layer,
              c.layers_number as totalLayer,
+             d.glass_child,
+             od.price,
+             od.remarks,
              round( d.area * c.quantity, 4 ) as 'area',
              c.order_number,
              d.icon  AS markIcon,
              op.project_name,
              0 as patchState,
              c.rack AS rackNo,
-             0 as heatLayoutId,
              d.process,
              o.order_id AS orderNo,
              o.customer_name AS customerName,
@@ -225,18 +229,22 @@
                 c.project_no,
                 d.child_width as 'width',
                 d.child_height as 'height',
+                (d.child_width + d.child_height) * 2/ 1000 as 'perimeter',
                 c.patch_num as quantity,
+                od.shape,
                 concat( c.process_id, '-', c.technology_number ) AS 'process_id',
                 c.process_id AS 'process_ids',
                 c.technology_number as layer,
                 fc.layers_number as total_layer,
+                d.glass_child,
+                od.price,
+                od.remarks,
                 round( d.area * c.patch_num, 4 ) as 'area',
                 c.order_sort as order_number,
                 d.icon,
                 op.project_name,
                 1 as patch_state,
                 a.id as rackNo,
-                0 as heatLayoutId,
                 d.process,
                 o.order_id AS orderNo,
                 o.customer_name AS customerName,
@@ -330,15 +338,22 @@
     <!--浼樺寲鏌ヨ-->
     <select id="computeAndOptimization">
         SELECT
+            c.project_no,
             c.rack AS rackNo,
-            h.layout_id as heatLayoutId,
+#             h.layout_id as heatLayoutId,
             h.width AS width,
             h.height AS height,
+            (h.width + h.height) * 2 / 1000 as 'perimeter',
+            od.shape,
             count( 1 ) AS quantity,
-            concat( h.process_id, '-', h.layer ) AS processId,
+            concat( h.process_id, '-', h.layer ) AS process_id,
+            c.process_id AS processId,
             h.process_id as process_ids,
             h.layer,
             c.layers_number as totalLayer,
+            d.glass_child,
+            od.price,
+            od.remarks,
             round( d.area * count( 1 ), 4 ) AS 'area',
             c.order_number,
             h.order_sort AS orderSort,
@@ -364,7 +379,7 @@
         WHERE
             h.project_no = #{projectNo}
         GROUP BY
-            h.layout_id,
+#             h.layout_id,
             h.width,
             h.height,
             h.process_id,
@@ -1555,7 +1570,7 @@
             x_axis = #{detail.x},
             y_axis = #{detail.y}
         WHERE
-            project_no = #{processId} AND polys_id = #{detail.polySort}
+            project_no = #{processId} AND polys_id = #{detail.polySort} AND stock_id = #{detail.stockSort}
     </update>
     <update id="updateProjectOptimize">
         update pp.optimize_project as p
@@ -1854,7 +1869,8 @@
             opd.mark_icon as markIcon,
             fc.`merge` as combine,
             concat( opd.process_id, '/', opd.layer ) as flowCardSequence,
-            ogd.process
+            ogd.process,
+            if(opd.graph_no=100,0,1) as graphNo
         from
             pp.optimize_detail opd
                 left join pp.optimize_project op on op.project_no = opd.project_no
@@ -2132,6 +2148,55 @@
         WHERE
             project_no = #{projectNo}
     </select>
+    <select id="optimizeTemp" resultType="java.util.Map" parameterType="java.lang.String">
+        SELECT
+        project_no,
+        layer,
+        o_width as width,
+        o_height as height,
+        rack_no as rackNo,
+        COUNT(*) as quantity,
+        ROUND((o_width + o_height) * 2 / 1000, 2) as perimeter,
+        ROUND(o_width * o_height * COUNT(*) / 1000000, 4) as area
+    FROM
+        pp.`optimize_detail`
+    WHERE
+        project_no =  #{projectNo}
+      AND process_id = ''
+    GROUP BY
+        project_no,
+        layer,
+        o_width,
+        o_height,
+        REPLACE(REPLACE(rack_no, '+', ''), '#', '')
+    ORDER BY
+        o_width,
+        o_height
+    </select>
+    <select id="selectTempProject" resultType="java.util.Map" parameterType="java.lang.String">
+        SELECT
+            project_no,
+            o_width as width,
+            o_height as height,
+            rack_no as order_number,
+            layer as processCard,
+            COUNT(*) as quantity,
+            ROUND(o_width * o_height * COUNT(*) / 1000000, 4) as Area
+        FROM
+            pp.`optimize_detail`
+        WHERE
+            project_no =  #{processId}
+          AND process_id = ''
+        GROUP BY
+            project_no,
+            layer,
+            o_width,
+            o_height,
+            rack_no
+        ORDER BY
+            o_width,
+            o_height
+    </select>
 
 
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0