| | |
| | | AND o.create_time < #{selectTime2} |
| | | and position(#{orderId} in od.order_id) |
| | | and position(#{inputProject} in o.project) |
| | | and fc.quantity - odpd.reporting_work_num>0 |
| | | and GREATEST(fc.quantity - odpd.reporting_work_num, 0)>0 |
| | | |
| | | group by fc.process_id, fc.order_number, fc.technology_number |
| | | order by fc.process_id, fc.order_number, fc.technology_number |
| | |
| | | rw.reviewed, |
| | | rw.examine_time, |
| | | rw.device_name, |
| | | o.order_type, |
| | | -- GROUP_CONCAT(ogd.glass_child SEPARATOR '+') as workProcessName |
| | | CASE |
| | | WHEN LOCATE('step',#{laminating})>0 THEN GROUP_CONCAT(ogd.glass_child SEPARATOR '+') |
| | |
| | | AND cb.technology_number = b.technology_number |
| | | where a.processing_card>0 |
| | | and a.warehousing!=2 |
| | | and (c.quantity-b.reporting_work_num_count)>0 |
| | | and (c.quantity-b.reporting_work_num)>0 |
| | | GROUP BY b.process_id, b.order_number, |
| | | b.technology_number) as f |
| | | LEFT JOIN sd.order_process_detail as e |
| | |
| | | AND cb.technology_number = b.technology_number |
| | | where a.processing_card>0 |
| | | and a.warehousing!=2 |
| | | and (c.quantity-b.reporting_work_num_count)>0 |
| | | and (c.quantity-b.reporting_work_num)>0 |
| | | GROUP BY b.process_id, b.order_number, |
| | | b.technology_number) as f |
| | | LEFT JOIN sd.order_process_detail as e |
| | |
| | | </otherwise> |
| | | </choose> |
| | | </select> |
| | | |
| | | |
| | | <select id="processCardProgressCollectMp"> |
| | | select * from (select b.product_name, |
| | | c.detail as 'glassName', |
| | | concat(a.process_id,'/',a.technology_number) as processID, |
| | | a.process_id, |
| | | a.quantity, |
| | | a.received_quantity, |
| | | round(sum(a.received_quantity*b.area),2) as received_area, |
| | | |
| | | a.technology_number |
| | | from pp.flow_card as a |
| | | left join sd.order_detail as b |
| | | on a.order_id = b.order_id and a.order_number = b.order_number |
| | | left join sd.product_detail as c |
| | | on c.prod_id = b.product_id and c.glass_sort = a.technology_number |
| | | where a.order_id = #{orderId} group by processID |
| | | ) as a |
| | | left join (SELECT process_id, |
| | | technology_number, |
| | | sum(broken_num) as broken_num, |
| | | concat('{',GROUP_CONCAT(reporting_work_nums),'}') as reporting_work_num |
| | | from (select |
| | | opd.process_id, |
| | | opd.technology_number, |
| | | concat("\"", process, "\":\"", SUM(reporting_work_num), "\"") as reporting_work_nums, |
| | | sum(broken_num) as broken_num |
| | | from sd.order_process_detail as opd |
| | | where opd.order_id = #{orderId} |
| | | group by opd.process_id,opd.technology_number,opd.process) as bb |
| | | GROUP BY bb.process_id,bb.technology_number) as b |
| | | on a.process_id = b.process_id and a.technology_number = b.technology_number |
| | | order by a.process_id |
| | | |
| | | </select> |
| | | </mapper> |