| | |
| | | select pot.*, |
| | | po.nps_no as npsNo, |
| | | po.is_end_order as endOrder, |
| | | po.team_leader_user_id as leaderUserId, |
| | | u.nick_name as leaderName, |
| | | teamUser.nick_name as teamUserName, |
| | | p.product_name as productName, |
| | | pm.model as model, |
| | | pm.unit as unit, |
| | |
| | | left join production_order_routing_operation poro on pot.production_order_routing_operation_id = poro.id |
| | | left join product_model pm on pm.id = ifnull(poro.product_model_id, po.product_model_id) |
| | | left join product p on pm.product_id = p.id |
| | | left join sys_user u on po.team_leader_user_id = u.user_id |
| | | left join sys_user teamUser on pot.team_user_id = teamUser.user_id |
| | | left join ( |
| | | select ppm.production_operation_task_id as taskId, |
| | | sum(ifnull(ppo.scrap_qty, 0)) as scrapQty |