| | |
| | | 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 |
| | |
| | | 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> |