| | |
| | | od.processing_note as processingNote, |
| | | width, |
| | | height, |
| | | #{printQuantity} as quantity, |
| | | if(#{printQuantity}>0 ,#{printQuantity},fc.quantity) as quantity, |
| | | CONCAT( |
| | | TRIM(TRAILING '.' FROM TRIM(TRAILING '0' FROM CAST(width AS CHAR))), |
| | | ' X ', |
| | | TRIM(TRAILING '.' FROM TRIM(TRAILING '0' FROM CAST(height AS CHAR))), |
| | | ' = ',#{printQuantity} ) as size, |
| | | ' = ',if(#{printQuantity}>0 ,#{printQuantity},fc.quantity) ) as size, |
| | | |
| | | CONCAT( |
| | | od.order_number,') ', |
| | | TRIM(TRAILING '.' FROM TRIM(TRAILING '0' FROM CAST(width AS CHAR))), |
| | | ' X ', |
| | | TRIM(TRAILING '.' FROM TRIM(TRAILING '0' FROM CAST(height AS CHAR))), |
| | | ' = ',#{printQuantity} ) as numberSize, |
| | | ' = ',if(#{printQuantity}>0 ,#{printQuantity},fc.quantity) ) as numberSize, |
| | | CONCAT( |
| | | od.order_number,')',' ', |
| | | TRIM(TRAILING '.' FROM TRIM(TRAILING '0' FROM CAST(width AS CHAR))), |
| | |
| | | select basic_name as process,sort FROM sd.basic_data as bd |
| | | where bd.basic_category='process' and bd.basic_name = #{processName} |
| | | </select> |
| | | <select id="OrderProcess"> |
| | | select DISTINCT basic_name as process,nickname,sort from sd.basic_data where basic_category = 'process' |
| | | </select> |
| | | |
| | | <select id="PrintProgressProcessCardData"> |
| | | select a.product_name, |
| | | b.glass_child, |
| | | d.order_type, |
| | | c.process_id, |
| | | c.process_id as 'processId', |
| | | c.order_id, |
| | | c.order_number, |
| | | c.technology_number, |
| | | b.child_width, |
| | | b.child_height, |
| | | c.quantity, |
| | | |
| | | c.quantity-ifnull(c.termination_quantity,0) as thisQuantity,/*用于判断是否改变颜色*/ |
| | | e.reportWorkQuantity, |
| | | e.reportWorkQuantityShow, |
| | | e.reportWorkQuantityCount, |
| | | e.reportWorkTime, |
| | | e.broken_num, |
| | | c.quantity-ifnull(c.termination_quantity,0) as glassQuantity, |
| | | |
| | | c.quantity-ifnull(c.termination_quantity,0) as quantityShow, |
| | | round( (c.quantity-ifnull(c.termination_quantity,0))*a.compute_area,2) as grossAreaShow, |
| | | ifnull(c.received_quantity, 0) as StorageShow, |
| | | ifnull(dd.quantity, 0) as shippedQuantityShow, -- 发货数量 |
| | | round(ifnull(dd.quantity, 0)*a.compute_area,2) as shippedAreaShow, -- 发货面积 |
| | | round((ifnull(c.received_quantity, 0))*a.compute_area,2) as StorageAreaShow,-- 入库面积 |
| | | |
| | | round((c.quantity-ifnull(c.termination_quantity,0))*a.compute_area,2)as grossArea, |
| | | ifnull(c.received_quantity, 0) as Storage, |
| | | ifnull(dd.quantity, 0) as shippedQuantity, |
| | | round(ifnull(dd.quantity, 0)*a.compute_area,2) as shippedArea, |
| | | round((ifnull(c.received_quantity, 0))*a.compute_area,2) as StorageArea, |
| | | |
| | | |
| | | ifnull(JSON_UNQUOTE(JSON_EXTRACT(a.other_columns, '$.S01')),'') AS glassNumber, |
| | | b.`group`, |
| | | c.print_status, |
| | | c.print_number, |
| | | o.project, |
| | | o.customer_name, |
| | | b.process |
| | | |
| | | from pp.flow_card as c |
| | | left join |
| | | sd.order_detail as a |
| | | on c.order_id = a.order_id |
| | | and c.order_number = a.order_number |
| | | left join sd.order_glass_detail as b |
| | | on c.order_id = b.order_id |
| | | and b.order_number = c.order_number |
| | | and c.technology_number = b.technology_number |
| | | left join sd.`order` as d |
| | | on c.order_id = d.order_id |
| | | # left join mm.finished_goods_inventory as f |
| | | # on c.order_id = f.order_id and f.order_number = c.order_number |
| | | left join sd.delivery_detail as dd on dd.order_id = a.order_id and dd.order_number = a.order_number |
| | | left join (SELECT a.process_id, |
| | | a.order_number, |
| | | a.technology_number, |
| | | sum(a.broken_num) as broken_num, |
| | | concat('{', |
| | | GROUP_CONCAT(concat("\"", process, "\":\"", if(a.technology_number!=1 and (bd.nickname='stepD' || bd.nickname='stepB' ) ,0,reporting_work_num), "\"")), |
| | | '}' |
| | | ) as reportWorkQuantity, |
| | | concat('{', |
| | | GROUP_CONCAT(concat("\"", process, "\":\"", reporting_work_num, "\"")), |
| | | '}' |
| | | ) as reportWorkQuantityShow, |
| | | concat('{', |
| | | GROUP_CONCAT(concat("\"", process, "\":\"", reporting_work_num_count, "\"")), |
| | | '}' |
| | | ) as reportWorkQuantityCount, |
| | | concat('{', |
| | | GROUP_CONCAT(concat("\"", process, "\":\"", IFNULL(date(a.update_time),''), "\"")), |
| | | '}' |
| | | ) as reportWorkTime |
| | | FROM sd.order_process_detail as a |
| | | left join (SELECT DISTINCT basic_name,nickname from sd.basic_data as bd where bd.basic_category = 'process') as bd |
| | | on a.process = bd.basic_name |
| | | left join pp.flow_card as fc on fc.process_id=a.process_id and fc.order_number=a.order_number and fc.technology_number=a.technology_number |
| | | where (fc.create_time) >= #{startDate} and (fc.create_time) <= #{endDate} |
| | | GROUP BY a.process_id, a.order_number, a.technology_number |
| | | |
| | | |
| | | ) as e |
| | | on e.process_id = c.process_id |
| | | and e.technology_number = c.technology_number |
| | | and e.order_number = c.order_number |
| | | left join sd.`order` as o on o.order_id =c.order_id |
| | | where (c.create_time) >= #{startDate} and (c.create_time) <= #{endDate} |
| | | and d.create_order>0 and c.quantity-ifnull(c.termination_quantity,0)>0 |
| | | group by c.order_number, |
| | | c.technology_number, |
| | | c.process_id |
| | | order by c.process_id, c.order_number, c.technology_number |
| | | </select> |
| | | </mapper> |