| | |
| | | <where> |
| | | date(r.create_time)>=#{startDate} and date(r.create_time) <= #{endDate} |
| | | </where> |
| | | order by r.review_status |
| | | order by r.review_status,r.id desc |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | |
| | | </update> |
| | | |
| | | <update id="updateOrderProcessDetail" > |
| | | update sd.order_process_detail set reporting_work_num=reporting_work_num-#{patchLog.patchNum} where order_id=#{patchLog.orderId} and |
| | | order_number=#{patchLog.orderSort} and technology_number=#{patchLog.technologyNumber} and id <![CDATA[<]]> (select a.opdid from(select id as opdid from |
| | | sd.order_process_detail opd where opd.order_id=#{patchLog.orderId} and opd.order_number=#{patchLog.orderSort} and opd.technology_number=#{patchLog.technologyNumber} |
| | | and process=#{patchLog.patchProcesses}) as a) |
| | | update sd.order_process_detail |
| | | set reporting_work_num=reporting_work_num - #{patchLog.patchNum} |
| | | where order_id = #{patchLog.orderId} |
| | | and process_id = #{patchLog.processId} |
| | | and order_number = #{patchLog.orderSort} |
| | | and technology_number = #{patchLog.technologyNumber} |
| | | and id <![CDATA[<]]> (select a.opdid |
| | | from (select id as opdid |
| | | from sd.order_process_detail opd |
| | | where opd.order_id = #{patchLog.orderId} |
| | | and opd.process_id = #{patchLog.processId} |
| | | and opd.order_number = #{patchLog.orderSort} |
| | | and opd.technology_number = #{patchLog.technologyNumber} |
| | | and process = #{reportingWork.thisProcess}) as a) |
| | | </update> |
| | | |
| | | <update id="updateDamageDetails" > |
| | |
| | | od.width, |
| | | od.height, |
| | | od.shape, |
| | | dd.responsible_process as patchProcesses, |
| | | dd.breakage_quantity-dd.quantity as breakageQuantity, |
| | | dd.return_process as patchProcesses, |
| | | dd.breakage_reason as patchReason, |
| | |
| | | dd.responsible_equipment as responsibleEquipment, |
| | | dd.responsible_team as responsibleTeam, |
| | | ROUND((dd.breakage_quantity-dd.quantity) * od.width * od.height / 1000000, 2) as patchArea, |
| | | rw.qualityIns_pector as qualityInsPector |
| | | rw.quality_inspector as qualityInspector |
| | | from pp.damage_details dd |
| | | left join pp.reporting_work_detail rwd on dd.reporting_work_id = rwd.reporting_work_id and dd.order_number=rwd.order_number and dd.technology_number=rwd.technology_number |
| | | left join pp.reporting_work rw on dd.reporting_work_id = rw.reporting_work_id |
| | |
| | | on rw.order_id = ogd.order_id and dd.order_number = ogd.order_number |
| | | |
| | | where dd.breakage_quantity-dd.quantity>0 and dd.available=0 and (dd.responsible_process=rw.this_process or (dd.responsible_process!=rw.this_process and dd.qualityIns_status=1)) |
| | | |
| | | order by dd.id desc |
| | | </select> |
| | | |
| | | |