| | |
| | | ROUND(pwo.complete_quantity / pwo.plan_quantity * 100, 2) AS completionStatus, |
| | | sum(ppo.scrap_qty) scrapQty, |
| | | pp.device_id, |
| | | pp.device_name |
| | | pp.device_name, |
| | | t8.product_name as final_product_model |
| | | FROM |
| | | product_work_order pwo |
| | | LEFT JOIN product_process_route_item ppri ON ppri.id = pwo.product_process_route_item_id |
| | |
| | | LEFT JOIN product_process pp ON pp.id = ppri.process_id |
| | | LEFT JOIN product_model pm ON pm.id = ppri.product_model_id |
| | | LEFT JOIN product p ON p.id = pm.product_id |
| | | left join product_model t7 on t7.id = po.product_model_id |
| | | left join product as t8 on t7.product_id = t8.id |
| | | WHERE pwo.id = #{id} |
| | | GROUP BY pwo.id, pwo.product_process_route_item_id, pwo.create_time, pwo.update_time, pwo.work_order_no, pwo.plan_start_time, pwo.plan_end_time, pwo.actual_start_time, pwo.actual_end_time, pwo.status, pwo.tenant_id, pwo.plan_quantity, pwo.product_order_id, pwo.complete_quantity, |
| | | pp.device_id, |