From e6ebaf71bd67866d6233a03ae6eff4a7fb2e5d67 Mon Sep 17 00:00:00 2001
From: zhanghl <253316343@qq.com>
Date: 星期四, 15 五月 2025 11:40:27 +0800
Subject: [PATCH] 钣金工单计划:优化子件工单的读取方式 先存储内存,再从内存扣减,最后一起保存
---
aps-modules/aps-core/src/main/resources/mapper/core/ApsPlatePlanMapper.xml | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/aps-modules/aps-core/src/main/resources/mapper/core/ApsPlatePlanMapper.xml b/aps-modules/aps-core/src/main/resources/mapper/core/ApsPlatePlanMapper.xml
index 30ad4ac..c39feeb 100644
--- a/aps-modules/aps-core/src/main/resources/mapper/core/ApsPlatePlanMapper.xml
+++ b/aps-modules/aps-core/src/main/resources/mapper/core/ApsPlatePlanMapper.xml
@@ -49,6 +49,8 @@
<result property="professionalAffiliation" column="professional_affiliation" />
<result property="requireId" column="require_id" />
<result property="version" column="version" />
+ <result property="approveOn" column="approve_on" />
+ <result property="startWorkDate" column="start_work_date" />
</resultMap>
<sql id="selectApsPlatePlanVo">
@@ -59,7 +61,7 @@
standby_stock, next_process_deparment, is_suspended, is_outsourcing, account, advanced_materials,
advanced_document_number, advanced_requirement_day, is_plan_complete, is_stock_complete,
has_turnback, has_risk, std_op, op_status, next_op_name ,unmatched_quantity,professional_affiliation,
- require_id, version,production_base, order_create_time
+ require_id, version,production_base, order_create_time, approve_on, start_work_date
from aps_plate_plan
</sql>
@@ -291,7 +293,15 @@
order by document_number asc,id asc
limit 1
</select>
-
+ <select id="selectUnMatchPlateSubPlanList" parameterType="com.aps.core.domain.ApsPlatePlan" resultMap="ApsPlatePlanResult">
+ select id,document_number,main_part_number,item_number,plant,professional_affiliation,production_quantity,
+ unmatched_quantity,version
+ from aps_plate_plan
+ where del_flag='0' and professional_affiliation ='sub' and unmatched_quantity > 0
+ <if test="plant != null and plant !='' "> and plant = #{plant}</if>
+ <if test="itemNumber != null and itemNumber !='' "> and item_number = #{itemNumber}</if>
+ order by document_number asc,id asc
+ </select>
<update id="updatePlanUnMatchQtyByVersion" parameterType="com.aps.core.domain.ApsPlatePlan">
update aps_plate_plan
@@ -314,4 +324,9 @@
set unmatched_quantity=production_quantity, version=0,require_id=id
where del_flag='0' and professional_affiliation !='0'
</update>
+ <update id="updatePlanUnMatchQtyAndVersion" parameterType="com.aps.core.domain.ApsPlatePlan">
+ update aps_plate_plan
+ set unmatched_quantity=#{unmatchedQuantity},version=#{version},update_time=now()
+ where id=#{id}
+ </update>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3