| | |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | if(od.shape=1,'普形',if(od.shape=2,'异形','')) as shape, |
| | | fc.quantity -odpd.reporting_work_num -odpd.broken_num + ifnull(patch.patch_num,0) as quantity, |
| | | fc.quantity -odpd.reporting_work_num -odpd.broken_num + ifnull(patch.patch_num,0) as completedQuantity, |
| | | fc.quantity + ifnull(patch.patch_num,0) -odpd.reporting_work_num -odpd.broken_num as quantity, |
| | | fc.quantity + ifnull(patch.patch_num,0) -odpd.reporting_work_num -odpd.broken_num as completedQuantity, |
| | | odpd.reporting_work_num as completed, |
| | | odpd.broken_num as onceBroken, |
| | | if(fc.quantity -odpd.reporting_work_num = 0 ,true,false) as saveFlag, -- 判断是否已经完成,已经完成不序号和同序号数量相同才能提交 |
| | |
| | | </select> |
| | | <select id="selectFlowCardNum" resultType="java.lang.Integer"> |
| | | select |
| | | a.quantity-b.reporting_work_num-b.broken_num+ifnull(c.patchNumSum,0) |
| | | a.quantity +ifnull(c.patchNumSum,0)-b.reporting_work_num-b.broken_num |
| | | from flow_card as a |
| | | left join sd.order_process_detail as b |
| | | on |
| | |
| | | ogd.technology_number |
| | | order by fc.order_number |
| | | </select> |
| | | |
| | | <update id="updateReplenishWorkProcess"> |
| | | update sd.order_process_detail |
| | | set |
| | | broken_num=broken_num - #{patchNum} |
| | | where process_id = #{processId} |
| | | and order_number = #{orderSort} |
| | | and technology_number = #{technologyNumber} |
| | | and process = #{patchProcesses} |
| | | </update> |
| | | |
| | | <update id="updateRWPatchNum"> |
| | | update reporting_work |
| | | set this_worn_quantity=this_worn_quantity-#{patchNum} |
| | | where reporting_work_id=#{reportingWorkId} |
| | | </update> |
| | | |
| | | <update id="updateRWDPatchNum"> |
| | | update reporting_work_detail |
| | | set breakage_quantity=breakage_quantity-#{patchNum} |
| | | where reporting_work_id=#{reportingWorkId} and order_number = #{orderSort} |
| | | and technology_number = #{technologyNumber} |
| | | </update> |
| | | </mapper> |