From e8ba2a1bec7ffbd78cb941521b31d000890e66de Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期二, 27 二月 2024 14:04:16 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override

---
 north-glass-erp/target/classes/mapper/sd/OrderGlassDetailMapper.xml |   35 +++++++++++++++++++++++------------
 1 files changed, 23 insertions(+), 12 deletions(-)

diff --git a/north-glass-erp/target/classes/mapper/sd/OrderGlassDetailMapper.xml b/north-glass-erp/target/classes/mapper/sd/OrderGlassDetailMapper.xml
index b217e42..bf7705b 100644
--- a/north-glass-erp/target/classes/mapper/sd/OrderGlassDetailMapper.xml
+++ b/north-glass-erp/target/classes/mapper/sd/OrderGlassDetailMapper.xml
@@ -13,6 +13,9 @@
             glass_child,
             child_width,
             child_height,
+            area,
+            total_area,
+
             process,
             `group`)
         select
@@ -23,6 +26,8 @@
             pd.detail,
             od.width,
             od.height,
+            od.area,
+            od.gross_area,
             pd.process,
             pd.glass_group
         from sd.product_detail as pd
@@ -48,19 +53,19 @@
         <result column="glass_child" property="glassChild"/>
         <result column="child_width" property="childWidth"/>
         <result column="child_height" property="childHeight"/>
+        <result column="icon" property="icon"/>
         <result column="process" property="process"/>
+        <result column="area" property="area"/>
+        <result column="total_area" property="totalArea"/>
         <!--鎺ユ敹鍏朵粬澶栭敭瀹炰綋绫绘暟鎹�-->
         <association property="orderDetail" javaType="com.example.erp.entity.sd.OrderDetail">
 
             <result column="building_number" property="buildingNumber"/>
-
             <result column="product_name" property="productName"/>
             <result column="width" property="width"/>
             <result column="height" property="height"/>
             <result column="shape" property="shape"/>
-            <result column="gross_area" property="grossArea"/>
             <result column="edging_type" property="edgingType"/>
-            <result column="area" property="area"/>
             <result column="quantity" property="quantity"/>
             <result column="processing_note"  property="processingNote"/>
             <result column="beizhu"  property="remarks"/>
@@ -81,11 +86,12 @@
            b.width,
            b.height,
            b.shape,
-           b.gross_area,
+           a.total_area,
            b.edging_type,
            a.child_width,
            a.child_height,
-           b.area,
+           a.icon,
+           a.area,
            b.quantity,
            a.process,
            b.remarks as 'beizhu',
@@ -99,15 +105,20 @@
     
     <update id="updateSizeAndProcess" parameterType="java.util.List">
         <foreach collection="orderGlassDetails"  item="item" index="index" open="" close="" separator=";">
-            update order_glass_detail
+            update order_glass_detail as a,
+                order_detail as b
             set
-                child_width = #{item.childWidth},
-                child_height = #{item.childHeight},
-                process = #{item.process}
+                a.child_width = #{item.childWidth},
+                a.child_height = #{item.childHeight},
+                a.area = #{item.area},
+                a.total_area = #{item.area}*b.quantity,
+                a.icon = #{item.icon},
+                a.process = #{item.process}
             where
-                order_id = #{item.orderId}
-                and order_number = #{item.orderNumber}
-                and technology_number = #{item.technologyNumber}
+                a.order_id = b.order_id
+                and a.order_id = #{item.orderId}
+                and a.order_number = #{item.orderNumber}
+                and a.technology_number = #{item.technologyNumber}
         </foreach>
 
     </update>

--
Gitblit v1.8.0