| | |
| | | # c.quantity, |
| | | c.quantity as thisQuantity,/*用于判断是否改变颜色*/ |
| | | e.reportWorkQuantity, |
| | | e.reportWorkQuantityShow, |
| | | e.reportWorkQuantityCount, |
| | | e.reportWorkTime, |
| | | e.broken_num, |
| | |
| | | GROUP_CONCAT(concat("\"", process, "\":\"", if(technology_number!=1 and (bd.nickname='stepD' || bd.nickname='stepB' ) ,0,reporting_work_num), "\"")), |
| | | '}' |
| | | ) as reportWorkQuantity, |
| | | concat('{', |
| | | GROUP_CONCAT(concat("\"", process, "\":\"", if(technology_number!=1 and (bd.nickname='stepD' || bd.nickname='stepB' ) ,0,reporting_work_num), "\"")), |
| | | '}' |
| | | ) as reportWorkQuantityShow, |
| | | concat('{', |
| | | GROUP_CONCAT(concat("\"", process, "\":\"", reporting_work_num_count, "\"")), |
| | | '}' |
| | |
| | | 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 '+') |
| | |
| | | </select> |
| | | |
| | | <select id="workInProgressMpdataList1" resultMap="workInProgressMap"> |
| | | select if(#{selectProcesses}='',d.process,#{selectProcesses}) as thisProcess, |
| | | select d.process as thisProcess, |
| | | fc.process_id, |
| | | o.customer_name, |
| | | o.project, |
| | |
| | | |
| | | ) as d |
| | | on d.process_id=fc.process_id and d.order_number=fc.order_number and d.technology_number=fc.technology_number |
| | | and position(#{selectProcesses} in d.process) |
| | | left join sd.`order` as o on o.order_id=od.order_id |
| | | LEFT JOIN sd.basic_data AS bd ON bd.basic_name = d.process |
| | | where o.create_order>0 |
| | | and d.numCounts +d.patchNumSum - d.numCount - d.broken_num != 0 |
| | | and d.process!=SUBSTRING_INDEX(ogd.process, '->', 1) |
| | | and position(#{selectProcesses} in d.process) |
| | | and position(#{orderId} in od.order_id) |
| | | and position(#{inputProject} in o.project) |
| | | <if test="workInProgressDTO.thisProcess != null and workInProgressDTO.thisProcess != ''"> |
| | | and d.process regexp #{workInProgressDTO.thisProcess} |
| | | </if> |
| | | <if test="workInProgressDTO.customerName != null and workInProgressDTO.customerName != ''"> |
| | | and o.customer_name regexp #{workInProgressDTO.customerName} |
| | | </if> |
| | |
| | | <if test="workInProgressDTO.glassNumber != null and workInProgressDTO.glassNumber != ''"> |
| | | and ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') regexp #{workInProgressDTO.glassNumber} |
| | | </if> |
| | | group by fc.process_id, fc.order_number, fc.technology_number,d.process |
| | | order by fc.process_id, fc.order_number, fc.technology_number |
| | | <choose> |
| | | <when test="laminating != null and laminating == 'stepC'"> |
| | | GROUP BY fc.process_id, fc.order_number, ogd.`group`, d.process |
| | | </when> |
| | | <when test="laminating != null and laminating == 'stepD'"> |
| | | GROUP BY fc.process_id, fc.order_number, d.process |
| | | </when> |
| | | <when test="laminating != null and laminating == 'stepB'"> |
| | | GROUP BY fc.process_id, fc.order_number, d.process |
| | | </when> |
| | | <otherwise> |
| | | GROUP BY fc.process_id, fc.order_number, fc.technology_number, d.process |
| | | </otherwise> |
| | | </choose> |
| | | order by d.process,fc.process_id, fc.order_number, fc.technology_number |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | |
| | | 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> |