From bcb19e8c93c3cabf0d8eb3ee34ed819b3c5a10ef Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期一, 25 十一月 2024 13:14:11 +0800
Subject: [PATCH] #优化地图
---
src/main/resources/mapper/WrkDetlMapper.xml | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/src/main/resources/mapper/WrkDetlMapper.xml b/src/main/resources/mapper/WrkDetlMapper.xml
index 03ec74f..9a2421b 100644
--- a/src/main/resources/mapper/WrkDetlMapper.xml
+++ b/src/main/resources/mapper/WrkDetlMapper.xml
@@ -94,6 +94,21 @@
and (awml.manu_type is null or awml.manu_type != '鎵嬪姩鍙栨秷')
</select>
+ <select id="selectAndLogByOrderNoGroupByMatnrOfSum" resultMap="BaseResultMap">
+ select awd.wrk_no, awd.io_time, awd.matnr, sum(awd.anfme) as anfme
+ from asr_wrk_detl awd
+ left join asr_wrk_mast awm on awd.wrk_no = awm.wrk_no and awd.io_time = awm.io_time
+ where order_no = #{orderNo}
+ group by awd.wrk_no, awd.io_time, awd.matnr
+ union
+ select distinct awdl.wrk_no, awdl.io_time, awdl.matnr, sum(awdl.anfme) as anfme
+ from asr_wrk_detl_log awdl
+ left join asr_wrk_mast_log awml on awdl.wrk_no = awml.wrk_no and awdl.io_time = awml.io_time
+ where awdl.order_no = #{orderNo}
+ and (awml.manu_type is null or awml.manu_type != '鎵嬪姩鍙栨秷')
+ group by awdl.wrk_no, awdl.io_time, awdl.matnr
+ </select>
+
<update id="updateInspect">
update asr_wrk_detl
set inspect = 1
@@ -115,4 +130,17 @@
and awd.matnr + '-' + awd.batch = #{matnr}
</select>
+ <update id="updateOrderNo">
+ update asr_wrk_detl
+ set order_no = #{orderNo}
+ , modi_time = getdate()
+ where 1=1
+ and wrk_no = #{wrkNo}
+ and matnr = #{matnr}
+ <include refid="batchSeq"></include>
+ </update>
+
+
+
+
</mapper>
--
Gitblit v1.9.1