| | |
| | | rw.this_process, |
| | | rw.creator, |
| | | rw.reporting_work_id, |
| | | JSON_UNQUOTE(JSON_EXTRACT(pd.separation, '$.thickness')) AS thickness |
| | | JSON_UNQUOTE(JSON_EXTRACT(pd.separation, '$.thickness')) AS thickness, |
| | | ROUND(round( ogd.child_width * ogd.child_height * dd.breakage_quantity / 1000000, 2 ) |
| | | * SUBSTRING_INDEX(IFNULL(JSON_UNQUOTE(JSON_EXTRACT(pd.separation, '$.thickness')), '0'), 'mm', 1),2) AS pingfang |
| | | FROM |
| | | sd.ORDER AS o |
| | | LEFT JOIN sd.order_glass_detail AS ogd ON ogd.order_id = o.order_id |
| | |
| | | rw.this_process, |
| | | rw.creator, |
| | | rw.reporting_work_id, |
| | | JSON_UNQUOTE(JSON_EXTRACT(pd.separation, '$.thickness')) AS thickness |
| | | JSON_UNQUOTE(JSON_EXTRACT(pd.separation, '$.thickness')) AS thickness, |
| | | ROUND(round( ogd.child_width * ogd.child_height * dd.breakage_quantity / 1000000, 2 ) |
| | | * SUBSTRING_INDEX(IFNULL(JSON_UNQUOTE(JSON_EXTRACT(pd.separation, '$.thickness')), '0'), 'mm', 1),2) AS pingfang |
| | | FROM sd.ORDER AS o |
| | | LEFT JOIN sd.order_glass_detail AS ogd ON ogd.order_id = o.order_id |
| | | LEFT JOIN reporting_work AS rw ON rw.order_id = o.order_id |
| | |
| | | <select id="damageReportFootSum"> |
| | | SELECT |
| | | SUM(dd.breakage_quantity) AS breakageQuantity, |
| | | ROUND(SUM(ogd.child_width * ogd.child_height * dd.breakage_quantity) / 1000000, 2) AS area |
| | | ROUND(SUM(ogd.child_width * ogd.child_height * dd.breakage_quantity) / 1000000, 2) AS area, |
| | | SUM(ROUND(round( ogd.child_width * ogd.child_height * dd.breakage_quantity / 1000000, 2 ) |
| | | * SUBSTRING_INDEX(IFNULL(JSON_UNQUOTE(JSON_EXTRACT(pd.separation, '$.thickness')), '0'), 'mm', 1),2)) AS pingfang |
| | | FROM |
| | | sd.ORDER AS o |
| | | LEFT JOIN sd.order_glass_detail AS ogd ON ogd.order_id = o.order_id |
| | |
| | | od.quantity, |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | d.numCounts + d.patchNumSum - d.numCount -d.broken_num as stockNum, |
| | | d.numCounts + d.patchNumSum - d.numCount -d.broken_num-ifnull(fc.termination_quantity,0) as stockNum, |
| | | ROUND(ogd.child_width * ogd.child_height * |
| | | (d.numCounts + d.patchNumSum - d.numCount - |
| | | d.broken_num) / 1000000, 2) as stockArea, |