| | |
| | | sd.order_glass_detail as ogd left join flow_card as fc |
| | | on ogd.order_id = fc.order_id and ogd.order_number = fc.order_number |
| | | set ogd.splitting_status=0 |
| | | where ogd.order_id = #{orderId} |
| | | where fc.process_id = #{processId} |
| | | |
| | | </update> |
| | | |
| | |
| | | <update id="deleteFlowCardMp"> |
| | | delete |
| | | from flow_card as fc |
| | | where fc.order_id = left(#{processId}, 10) |
| | | where fc.process_id = #{processId} |
| | | </update> |
| | | |
| | | <!-- 分架新增明细查询--> |
| | |
| | | <delete id="deleteReportingWork"> |
| | | delete |
| | | from sd.order_process_detail |
| | | where order_id = left(#{processId}, 10) |
| | | where process_id = #{processId} |
| | | </delete> |
| | | |
| | | <select id="selectPrintFlowCardMp"> |
| | |
| | | left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number |
| | | where fc.process_id = #{processId} |
| | | and position(fc.technology_number in #{technologyNumber}) |
| | | |
| | | order by IF(fc.sort != NULL or fc.sort != '', fc.sort, fc.order_number) |
| | | GROUP BY fc.process_id,fc.order_number,fc.technology_number |
| | | order by IF(fcs.sort != NULL or fcs.sort != '', fcs.sort, fc.order_number) |
| | | </select> |
| | | |
| | | <update id="printSortMp"> |
| | |
| | | round(SUM(ogd.total_area), 2) as gross_area, |
| | | sum(od.weight) as weight, |
| | | #{technologyNumber} as technologyNumber, |
| | | concat(fc.process_id, '/', #{technologyNumber}) as processIdNumber |
| | | concat(fc.process_id, '/', #{technologyNumber}) as processIdNumber, |
| | | dd.breakage_type, |
| | | dd.breakage_reason, |
| | | dd.responsible_process, |
| | | dd.responsible_team, |
| | | concat('对应我司单号', o.batch) AS otherRemarks |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | |
| | | ogdc.technology_number = ogd.technology_number |
| | | left join rework as pl on pl.process_id = fc.process_id and pl.order_sort = fc.order_number and |
| | | pl.technology_number = fc.technology_number |
| | | left join pp.reporting_work as rw on rw.order_id = fc.order_id and rw.process_id = fc.process_id |
| | | left join pp.damage_details as dd |
| | | on rw.reporting_work_id = dd.reporting_work_id and dd.order_number = fc.order_number and |
| | | dd.technology_number = fc.technology_number |
| | | where fc.process_id = #{processId} |
| | | and fc.order_number = #{orderNumber} |
| | | and fc.technology_number = #{technologyNumber} |
| | | and rw.reporting_work_id = #{reportingWorkId} |
| | | group by fc.process_id, fc.technology_number |
| | | </select> |
| | | |
| | |
| | | WHERE fc.process_id=#{processId} |
| | | GROUP BY fc.order_number |
| | | </select> |
| | | |
| | | <select id="selectMaxFlowCard"> |
| | | select ifnull((select fc.process_id |
| | | from sd.order_detail as od |
| | | left join sd.order_glass_detail as ogd |
| | | on od.order_id = ogd.order_id and od.order_number = ogd.order_number |
| | | left join flow_card as fc on fc.order_id=od.order_id and fc.order_number=od.order_number and fc.technology_number=ogd.technology_number |
| | | where od.order_id = #{orderId} |
| | | and ogd.production_id = #{productionId} |
| | | GROUP BY od.order_number |
| | | order by fc.process_id desc LIMIT 1),'') as process_id |
| | | </select> |
| | | </mapper> |