| | |
| | | ifnull(if((d.reporting_work_num_count+ifnull(c.reworkNumSum,0)-b.reporting_work_num_count-b.broken_num)< 0, |
| | | 0, |
| | | (d.reporting_work_num_count+ifnull(c.reworkNumSum,0)-b.reporting_work_num_count-b.broken_num) |
| | | ),0) |
| | | ),0) as num |
| | | from pp.flow_card as a |
| | | left join sd.order_process_detail as b |
| | | on |
| | |
| | | <update id="ReviewReportingWorkMp"> |
| | | 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} |
| | | 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> |