From f16ec51787ed0cb094b71ff8146c740d944f729d Mon Sep 17 00:00:00 2001
From: zhanghl <253316343@qq.com>
Date: 星期四, 15 五月 2025 11:40:54 +0800
Subject: [PATCH] Merge branch 'dev_platePlanv2' into dev

---
 aps-modules/aps-core/src/main/resources/mapper/core/ApsPlatePlanMapper.xml |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 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 f60cecf..c0db9f6 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
@@ -298,7 +298,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
@@ -321,4 +329,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