| | |
| | | ogd.production_id, |
| | | od.product_id, |
| | | od.product_name, |
| | | ROUND(SUM(od.quantity)-IFNULL(sum(fc.quantity)/count(fc.technology_number),0)) as quantity, |
| | | ROUND(SUM(DISTINCT od.quantity)-IFNULL(sum(fc.quantity)/fc.layers_number,0)) as quantity, |
| | | SUM(od.compute_gross_area) as compute_gross_area, |
| | | round(sum(od.perimeter), 2) as perimeter |
| | | from sd.order_detail as od |
| | |
| | | od.quantity, |
| | | od.compute_gross_area, |
| | | p.total_thickness, |
| | | ROUND(od.quantity-IFNULL(sum(fc.quantity)/count(fc.technology_number),0)) as baiscQuantity, |
| | | ROUND(od.quantity-IFNULL(sum(fc.quantity)/fc.layers_number,0)) as baiscQuantity, |
| | | od.compute_gross_area as 'computeGrossArea', |
| | | p.total_thickness AS 'totalThickness', |
| | | ifnull(p.thickness,'') as thickness, |
| | |
| | | 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 sd.product as p on od.product_name = p.product_name |
| | | left join sd.product as p on od.product_id = p.id |
| | | left join (SELECT order_id, |
| | | order_number, |
| | | JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S01')) AS S01, |