From 22fb2f1c8d854ee3e3915095c8105f24d16da2ad Mon Sep 17 00:00:00 2001
From: guoyujie <guoyujie@ng.com>
Date: 星期四, 17 七月 2025 16:01:56 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override

---
 north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml b/north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml
index 672a9b3..a471991 100644
--- a/north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml
+++ b/north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml
@@ -28,6 +28,7 @@
         <result column="height" property="orderDetail.height"/>
         <result column="product_id" property="orderDetail.productId"/>
         <result column="product_name" property="orderDetail.productName"/>
+        <result column="price" property="orderDetail.price"/>
 
         <result column="project" property="order.project"/>
         <result column="customer_name" property="order.customerName"/>
@@ -60,7 +61,8 @@
         fol.area,
         fol.money,
         o.customer_name,
-        o.project
+        o.project,
+        od.price
         from (select *
         from mm.finished_operate_log aa where aa.operate_type = #{type}  and aa.status!='宸蹭綔搴�') fol
         left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number
@@ -90,6 +92,9 @@
             </if>
             <if test="finishedOperateLog.orderDetail.productName != null and finishedOperateLog.orderDetail.productName != ''">
                 and  od.product_name regexp #{finishedOperateLog.orderDetail.productName}
+            </if>
+            <if test="finishedOperateLog.orderDetail.price != null and finishedOperateLog.orderDetail.price != ''">
+                and  od.price regexp #{finishedOperateLog.orderDetail.price}
             </if>
             <if test="finishedOperateLog.orderDetail.width != null and finishedOperateLog.orderDetail.width != ''">
                 and  od.width regexp  REGEXP_REPLACE(#{finishedOperateLog.orderDetail.width},'\\.0+$','')
@@ -160,6 +165,9 @@
             </if>
             <if test="finishedOperateLog.orderDetail.productName != null and finishedOperateLog.orderDetail.productName != ''">
                 and  od.product_name regexp #{finishedOperateLog.orderDetail.productName}
+            </if>
+            <if test="finishedOperateLog.orderDetail.price != null and finishedOperateLog.orderDetail.price != ''">
+                and  od.price regexp #{finishedOperateLog.orderDetail.price}
             </if>
             <if test="finishedOperateLog.orderDetail.width != null and finishedOperateLog.orderDetail.width != ''">
                 and  od.width regexp  REGEXP_REPLACE(#{finishedOperateLog.orderDetail.width},'\\.0+$','')
@@ -924,7 +932,8 @@
             fol.quantity,
             od.product_name,
             od.product_id,
-            ROUND( od.width * od.height * fol.quantity / 1000000, 2 ) as area
+            ROUND( od.width * od.height * fol.quantity / 1000000, 2 ) as area,
+            ROUND( od.width * od.height * fol.quantity / 1000000, 2 )*#{thickness}*2.5 as weight
         FROM
             ( SELECT * FROM mm.finished_operate_log aa WHERE aa.operate_type = '鍏ュ簱' AND aa.STATUS != '宸蹭綔搴�' ) fol
                 LEFT JOIN sd.order_detail od ON fol.order_id = od.order_id
@@ -940,11 +949,14 @@
     <select id="getDetailList2">
         SELECT
             od.product_id,
-            od.product_name
+            od.product_name,
+            pro.thickness
         FROM
             ( SELECT * FROM mm.finished_operate_log aa WHERE aa.operate_type = '鍏ュ簱' AND aa.STATUS != '宸蹭綔搴�' ) fol
                 LEFT JOIN sd.order_detail od ON fol.order_id = od.order_id
                 AND fol.operation_number = od.order_number
+                left join sd.product as pro
+                on pro.id = od.product_id
                 LEFT JOIN sd.`order` o ON o.order_id = fol.order_id
         WHERE
             o.order_id=#{orderId} and fol.remarks=#{remarks}

--
Gitblit v1.8.0