From 723edfdd07208ec27409d1cffb70b9a4eac69446 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期一, 18 三月 2024 16:13:22 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
---
north-glass-erp/src/main/resources/mapper/sd/OrderProcessDetail.xml | 48 ++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 46 insertions(+), 2 deletions(-)
diff --git a/north-glass-erp/src/main/resources/mapper/sd/OrderProcessDetail.xml b/north-glass-erp/src/main/resources/mapper/sd/OrderProcessDetail.xml
index 2cc5ab6..2307263 100644
--- a/north-glass-erp/src/main/resources/mapper/sd/OrderProcessDetail.xml
+++ b/north-glass-erp/src/main/resources/mapper/sd/OrderProcessDetail.xml
@@ -10,7 +10,8 @@
order_id,
order_number,
technology_number,
- process
+ process,
+ process_id
)
values
<foreach collection ="processDetailList" item="processDetail" separator =",">
@@ -18,11 +19,54 @@
#{processDetail.orderId},
#{processDetail.orderNumber},
#{processDetail.technologyNumber},
- #{processDetail.process}
+ #{processDetail.process},
+ #{processDetail.processId}
)
</foreach>
</insert>
+ <update id="updateQuantity">
+ update sd.order_process_detail as a
+ inner join
+ (select
+ rwd.completed_quantity,
+ rwd.breakage_quantity,
+ rw.process_id,
+ rwd.order_number,
+ rwd.technology_number
+ from pp.reporting_work_detail as rwd
+ left join pp.reporting_work as rw
+ on rwd.reporting_work_id = rw.reporting_work_id
+ where rwd.reporting_work_id =#{reportingWorkId} ) as b
+ on a.process_id = b.process_id
+ and a.order_number = b.order_number
+ and a.technology_number = b.technology_number
+
+ <if test="type == 'delete'">
+ set a.reporting_work_num_count
+ = a.reporting_work_num_count-b.completed_quantity,
+
+ a.reporting_work_num
+ = a.reporting_work_num-b.completed_quantity,
+
+ a.broken_num
+ = a.broken_num-b.breakage_quantity
+ </if>
+
+ <if test="type == 'add'">
+ set a.reporting_work_num_count
+ = a.reporting_work_num_count+b.completed_quantity,
+
+ a.reporting_work_num
+ = a.reporting_work_num+b.completed_quantity,
+
+ a.broken_num
+ = a.broken_num+b.breakage_quantity
+ </if>
+
+ where a.process = #{process}
+
+ </update>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0