| | |
| | | else '未知' |
| | | end as auditStatusName, |
| | | pot.work_order_no as workOrderNo, |
| | | ifnull(pot.plan_quantity, 0) as schedulingNum, |
| | | cast( |
| | | case |
| | | when ifnull(pot.plan_quantity, 0) - ifnull(ppo.quantity, 0) < 0 then 0 |
| | | else ifnull(pot.plan_quantity, 0) - ifnull(ppo.quantity, 0) |
| | | end |
| | | as decimal(18,4) |
| | | ) as pendingNum, |
| | | case pot.status |
| | | when 1 then '待确认' |
| | | when 2 then '待生产' |
| | |
| | | else '未知' |
| | | end as auditStatusName, |
| | | pot.work_order_no as workOrderNo, |
| | | ifnull(pot.plan_quantity, 0) as schedulingNum, |
| | | cast( |
| | | case |
| | | when ifnull(pot.plan_quantity, 0) - ifnull(ppo.quantity, 0) < 0 then 0 |
| | | else ifnull(pot.plan_quantity, 0) - ifnull(ppo.quantity, 0) |
| | | end |
| | | as decimal(18,4) |
| | | ) as pendingNum, |
| | | p.product_name as productName, |
| | | ifnull(p.standard_quantity, 0) as productStandardQuantity, |
| | | pm.model as productModelName, |