update sd.order_process_detail set reporting_work_num_count=reporting_work_num_count - #{completedQuantity}, reporting_work_num=reporting_work_num - #{completedQuantity}, broken_num=broken_num - #{breakageQuantity} where process_id = #{processId} and order_number = #{orderNumber} and technology_number = #{technologyNumber} and process = #{thisProcess} update reporting_work set reviewed_state=-1 where reporting_work_id = #{reportingWorkId} update flow_card set inventory_quantity = inventory_quantity - #{completedQuantity} where process_id = #{processId} and order_number = #{orderNumber} and technology_number = #{technologyNumber} update reporting_work as rw left join damage_details as dd on rw.reporting_work_id = dd.reporting_work_id set dd.quality_ins_status = 2, rw.quality_inspector=#{username}, rw.quality_ins_time=NOW() where rw.reporting_work_id = #{reportingWorkId} update reporting_work as rw left join reporting_work_detail as rwd on rw.reporting_work_id = rwd.reporting_work_id set rw.reviewed_state = 1 ,rw.reviewed=#{userName},rw.examine_time=NOW() where rw.process_id = #{substring} and rw.this_process=#{process} and POSITION(rwd.technology_number in #{result}) and reviewed_state=0 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 reporting_work set this_worn_quantity=this_worn_quantity-#{patchNum} where reporting_work_id=#{reportingWorkId} update reporting_work_detail set breakage_quantity=breakage_quantity-#{patchNum} where reporting_work_id=#{reportingWorkId} and order_number = #{orderSort} and technology_number = #{technologyNumber}