From 7cd52b112a2e7da06aa8cfebf19a337be858762f Mon Sep 17 00:00:00 2001
From: hongjli <3117313295@qq.com>
Date: 星期五, 16 五月 2025 11:32:39 +0800
Subject: [PATCH] 查询气体管路产能规划列表补充“OrgCode”字段值
---
aps-modules/aps-core/src/main/resources/mapper/core/ApsPlatePlanMapper.xml | 30 +++++++++++++++++++++++++++---
1 files changed, 27 insertions(+), 3 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..028dff5 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,9 @@
<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" />
+ <result property="lowOrderCode" column="low_order_code" />
</resultMap>
<sql id="selectApsPlatePlanVo">
@@ -59,7 +62,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, low_order_code
from aps_plate_plan
</sql>
@@ -104,6 +107,7 @@
<if test="stdOp != null "> and std_op = #{stdOp}</if>
<if test="opStatus != null and opStatus != ''"> and op_status = #{opStatus}</if>
<if test="nextOpName != null and nextOpName != ''"> and next_op_name = #{nextOpName}</if>
+ <if test="lowOrderCode != null and lowOrderCode != ''"> and low_order_code = #{lowOrderCode}</if>
and del_flag='0'
</where>
</select>
@@ -155,6 +159,7 @@
<if test="opStatus != null">op_status,</if>
<if test="nextOpName != null">next_op_name,</if>
<if test="unmatchedQuantity != null">unmatched_quantity,</if>
+ <if test="lowOrderCode != null">low_order_code,</if>
create_time,
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -197,6 +202,7 @@
<if test="opStatus != null">#{opStatus},</if>
<if test="nextOpName != null">#{nextOpName},</if>
<if test="unmatchedQuantity != null">#{unmatchedQuantity},</if>
+ <if test="lowOrderCode != null">#{lowOrderCode},</if>
#{createTime},
</trim>
</insert>
@@ -242,6 +248,7 @@
<if test="opStatus != null"> op_status= #{opStatus},</if>
<if test="nextOpName != null"> next_op_name= #{nextOpName},</if>
<if test="unmatchedQuantity != null"> unmatched_quantity = #{unmatchedQuantity},</if>
+ <if test="lowOrderCode != null"> low_order_code = #{lowOrderCode},</if>
</trim>
where id = #{id}
</update>
@@ -271,7 +278,7 @@
<select id="selectPlatePlanByPlantMajor" parameterType="com.aps.core.domain.ApsPlatePlan" resultMap="ApsPlatePlanResult">
select id,document_number,main_part_number,item_number,plant,professional_affiliation,production_quantity,require_id,
- unmatched_quantity,version, production_base,plan_end_day,order_create_time
+ unmatched_quantity,version, production_base,plan_end_day,order_create_time,low_order_code
from aps_plate_plan
<where>
<if test="plant != null "> and plant = #{plant} </if>
@@ -291,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
@@ -314,4 +329,13 @@
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>
+
+ <select id="selectApsSubPlatePlan" resultType="com.alibaba.fastjson2.JSONObject">
+ SELECT id,item_number as "itemNumber",document_number as "documentNumber",production_quantity as "unmatchedQuantity" FROM aps_plate_plan WHERE item_number in (SELECT item_number FROM aps_plate_plan WHERE professional_affiliation='sub' GROUP BY item_number) order by item_number
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3