From ee4dc5d6c9d3bc8ae8e704f93fa6b233e8b42e8f Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期五, 31 五月 2024 11:49:55 +0800
Subject: [PATCH] 首页分成两张表格

---
 north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml |   44 +++++++++++++++++++++++++++++++++++++-------
 1 files changed, 37 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 4e6b812..da75f56 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -81,7 +81,15 @@
         <if test="flowCard.order.project != null and flowCard.order.project!= ''">
             and b.project regexp #{flowCard.order.project}
         </if>
-
+        <if test="flowCard.layoutStatus != null and flowCard.layoutStatus != '' and  flowCard.layoutStatus == '涓嶅彲鎺掔増'">
+            and a.layout_status regexp 0
+        </if>
+        <if test="flowCard.layoutStatus != null and flowCard.layoutStatus != '' and  flowCard.layoutStatus == '鍙帓鐗�'">
+            and a.layout_status regexp 1
+        </if>
+        <if test="flowCard.layoutStatus != null and flowCard.layoutStatus != '' and  flowCard.layoutStatus == '宸叉帓鐗�'">
+            and a.layout_status regexp 2
+        </if>
 
         group by a.process_Id
         ORDER BY a.id desc
@@ -99,8 +107,8 @@
         <if test="flowCard.orderId != null and flowCard.orderId != ''">
             and a.order_id regexp #{flowCard.orderId}
         </if>
-        <if test="flowCard.productionId != null and flowCard.productionId != ''">
-            and a.process_Id regexp #{flowCard.productionId}
+        <if test="flowCard.processId != null and flowCard.processId != ''">
+            and a.process_Id regexp #{flowCard.processId}
         </if>
         <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''">
             and c.product_id regexp #{flowCard.orderDetail.productId}
@@ -111,6 +119,15 @@
 
         <if test="flowCard.order.project != null and flowCard.order.project!= ''">
             and b.project regexp #{flowCard.order.project}
+        </if>
+        <if test="flowCard.layoutStatus != null and flowCard.layoutStatus != '' and  flowCard.layoutStatus == '涓嶅彲鎺掔増'">
+            and a.layout_status regexp 0
+        </if>
+        <if test="flowCard.layoutStatus != null and flowCard.layoutStatus != '' and  flowCard.layoutStatus == '鍙帓鐗�'">
+            and a.layout_status regexp 1
+        </if>
+        <if test="flowCard.layoutStatus != null and flowCard.layoutStatus != '' and  flowCard.layoutStatus == '宸叉帓鐗�'">
+            and a.layout_status regexp 2
         </if>
 
         ORDER BY a.id desc
@@ -445,8 +462,10 @@
                o.processing_note,
                fc.process_id,
                SUM( od.quantity) as quantity,
-               SUM(od.gross_area) as gross_area,
-               #{technologyNumber} as technologyNumber
+               SUM(ogd.total_area) as gross_area,
+               SUM(od.weight) as weight,
+               #{technologyNumber} as technologyNumber,
+               concat(fc.process_id,'/',#{technologyNumber}) as  processIdNumber
         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
@@ -462,7 +481,7 @@
         select fc.order_number,
                concat(ogd.child_width, "*", ogd.child_height) as child_width,
                od.quantity,
-               ogd.total_area,
+               round(ogd.total_area,2) as total_area,
                od.perimeter,
                od.bend_radius,
                od.remarks
@@ -475,7 +494,6 @@
           and fc.technology_number = #{technologyNumber}
         group by fc.process_id, fc.order_number
         order by fc.order_number
-        limit 15
     </select>
 
     <select id="getProcessList">
@@ -485,4 +503,16 @@
           and technology_number = #{technologyNumber}
         group by process
     </select>
+
+    <update id="updateInventory">
+        update flow_card set inventory_quantity=#{completedQuantity}
+        where process_id = #{processId} and  order_number = #{orderNumber} and technology_number = #{technologyNumber}
+    </update>
+
+<!--    澶嶉�夋淇敼鎺掔増鐘舵��-->
+    <update id="updateComposing">
+        update flow_card as fc
+        set fc.layout_status=1
+        where fc.process_id = #{processId}
+    </update>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0