zhanghl
2025-05-09 5c5bc65b0edb80a4c990015a43bda0f800b25202
aps-modules/aps-core/src/main/resources/mapper/core/ApsPlatePlanMapper.xml
@@ -48,6 +48,7 @@
        <result property="orderCreateTime"    column="order_create_time"    />
        <result property="professionalAffiliation"    column="professional_affiliation"    />
        <result property="requireId"    column="require_id"    />
        <result property="version"    column="version"    />
    </resultMap>
    <sql id="selectApsPlatePlanVo">
@@ -57,8 +58,8 @@
               work_center, department, plan_start_day, plan_end_day, standby_number, standby_name,
               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
               , production_base, order_create_time
               has_turnback, has_risk, std_op, op_status, next_op_name ,unmatched_quantity,professional_affiliation,
                   require_id, version,production_base, order_create_time
        from aps_plate_plan
    </sql>
@@ -269,8 +270,9 @@
    </update>
    <select id="selectPlatePlanByPlantMajor" parameterType="ApsPlatePlan" resultMap="ApsPlatePlanResult">
        select  id,document_number,plan_end_day, main_part_number,item_number,plant,professional_affiliation,production_quantity,require_id
        from aps_plate_plan
        select  id,document_number,main_part_number,item_number,plant,professional_affiliation,production_quantity,require_id,
        unmatched_quantity,version, production_base
        (case   when custom_time is null then plan_end_day else custom_time end ) as plan_end_day
        <where>
            <if test="plant != null "> and plant = #{plant}</if>
            <if test="professionalAffiliation != null "> and professional_affiliation = #{professionalAffiliation}</if>
@@ -281,7 +283,7 @@
    <select id="selectUnMatchPlateSubPlan" parameterType="ApsPlatePlan" resultMap="ApsPlatePlanResult">
        select  id,document_number,main_part_number,item_number,plant,professional_affiliation,production_quantity,
             unmatched_quantity
             unmatched_quantity,version
        from aps_plate_plan
        where  del_flag='0' and professional_affiliation !='0' and unmatched_quantity > 0
        <if test="plant != null  and plan !='' "> and plant = #{plant}</if>
@@ -308,7 +310,7 @@
    <update id="initUnMatchQty" >
        update aps_plate_plan
            set unmatched_quantity=production_quantity, version=0
            set unmatched_quantity=production_quantity, version=0,require_id=id
        where   del_flag='0' and professional_affiliation !='0'
    </update>
</mapper>