| | |
| | | <result property="salesLedgerId" column="sales_ledger_id"/> |
| | | <result property="routeId" column="route_id"/> |
| | | <result property="npsNo" column="nps_no"/> |
| | | <result property="productionDate" column="production_date"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | |
| | | select po.*, |
| | | sl.sales_contract_no, |
| | | sl.customer_name, |
| | | slp.product_category, |
| | | slp.specification_model, |
| | | p.product_name as product_category, |
| | | pm.model as specification_model, |
| | | pm.unit, |
| | | ppr.process_route_code, |
| | | pb.bom_no, |
| | | ROUND(po.complete_quantity / po.quantity * 100, 2) AS completionStatus, |
| | |
| | | FROM shipping_info |
| | | GROUP BY sales_ledger_id |
| | | ) shipping_status_counts ON sl.id = shipping_status_counts.sales_ledger_id |
| | | left join product_model pm on po.product_model_id = pm.id |
| | | left join product p on pm.product_id = p.id |
| | | left join sales_ledger_product slp on po.sale_ledger_product_id = slp.id |
| | | left join product_process_route ppr on po.id = ppr.product_order_id |
| | | left join product_bom pb on pb.id = ppr.bom_id |