From f268121e9fe9116c19f84412b3ea992d68acf542 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期五, 18 七月 2025 14:05:26 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override
---
north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml | 61 +++++++++++++++++++++++++++---
1 files changed, 55 insertions(+), 6 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 2ac1a8d..6324c01 100644
--- a/north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml
+++ b/north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml
@@ -21,15 +21,20 @@
<result column="remarks" property="remarks"/>
<result column="is_state" property="isState"/>
<result column="process_id" property="processId"/>
+ <result column="money" property="money"/>
+ <result column="area" property="area"/>
<result column="width" property="orderDetail.width"/>
<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"/>
<result column="delivery_address" property="order.deliveryAddress"/>
+ <result column="project" property="order.project"/>
+ <result column="customer_name" property="order.customerName"/>
</resultMap>
@@ -52,7 +57,12 @@
fol.reviewed,
fol.reviewed_time,
fol.type,
- fol.remarks
+ fol.remarks,
+ fol.area,
+ fol.money,
+ o.customer_name,
+ 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
@@ -83,6 +93,9 @@
<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+$','')
</if>
@@ -106,6 +119,18 @@
</if>
<if test="finishedOperateLog.remarks != null and finishedOperateLog.remarks != ''">
and fol.remarks regexp #{finishedOperateLog.remarksr}
+ </if>
+ <if test="finishedOperateLog.area != null and finishedOperateLog.area != ''">
+ and fol.area regexp #{finishedOperateLog.area}
+ </if>
+ <if test="finishedOperateLog.money != null and finishedOperateLog.money != ''">
+ and fol.money regexp #{finishedOperateLog.money}
+ </if>
+ <if test="finishedOperateLog.order !=null and (finishedOperateLog.order.customerName != null and finishedOperateLog.order.customerName != '')">
+ and o.customer_name regexp #{finishedOperateLog.order.customerName}
+ </if>
+ <if test="finishedOperateLog.order !=null and (finishedOperateLog.order.project != null and finishedOperateLog.order.project != '')">
+ and o.project regexp #{finishedOperateLog.order.project}
</if>
</where>
order by fol.operate_time desc
@@ -141,6 +166,9 @@
<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+$','')
</if>
@@ -164,6 +192,18 @@
</if>
<if test="finishedOperateLog.remarks != null and finishedOperateLog.remarks != ''">
and fol.remarks regexp #{finishedOperateLog.remarksr}
+ </if>
+ <if test="finishedOperateLog.area != null and finishedOperateLog.area != ''">
+ and fol.area regexp #{finishedOperateLog.area}
+ </if>
+ <if test="finishedOperateLog.money != null and finishedOperateLog.money != ''">
+ and fol.money regexp #{finishedOperateLog.money}
+ </if>
+ <if test="finishedOperateLog.order !=null and (finishedOperateLog.order.customerName != null and finishedOperateLog.order.customerName != '')">
+ and o.customer_name regexp #{finishedOperateLog.order.customerName}
+ </if>
+ <if test="finishedOperateLog.order !=null and (finishedOperateLog.order.project != null and finishedOperateLog.order.project != '')">
+ and o.project regexp #{finishedOperateLog.order.project}
</if>
</where>
order by fol.`status` desc
@@ -574,10 +614,13 @@
quantity,
operate_time,
status,
- remarks
+ remarks,
+ money,
+ area
)
values (
- #{oddNumber} ,#{flowCard.order.orderId},#{flowCard.processId},#{flowCard.orderNumber},"鍏ュ簱",#{userName},#{flowCard.inventoryQuantity},now(),"鏈鏍�",#{container}
+ #{oddNumber} ,#{flowCard.order.orderId},#{flowCard.processId},#{flowCard.orderNumber},"鍏ュ簱",#{userName},
+ #{flowCard.inventoryQuantity},now(),"鏈鏍�",#{container},#{deliveryDetailMoney},#{deliveryDetailArea}
)
</insert>
@@ -837,6 +880,7 @@
fol.remarks,
SUM(fol.quantity) as quantity,
ROUND( sum(od.width * od.height * fol.quantity) / 1000000, 2 ) as area,
+ ROUND( sum(od.width * od.height * fol.quantity*p.total_thickness*2.5) / 1000000, 2 ) as weight,
fol.process_id,
aaa.teams_groups_name,
aaa.previous_process,
@@ -845,6 +889,7 @@
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.`order` o on o.order_id=fol.order_id
+ left join sd.product p on od.product_id=p.id
left join (select teams_groups_name,process_id,previous_process,reporting_work_time from pp.reporting_work where this_process='鍖呰') aaa on aaa.process_id=fol.process_id
@@ -881,13 +926,14 @@
<select id="getDetailLists">
SELECT
- od.building_number,
+ ifnull(od.building_number,ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')),'')) as building_number,
od.width,
od.height,
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
@@ -903,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