| | |
| | | <result column="model" property="model" /> |
| | | <result column="processRouteCode" property="processRouteCode" /> |
| | | <result column="returned" property="returned" /> |
| | | <result column="teamLeaderUserName" property="teamLeaderUserName" /> |
| | | </resultMap> |
| | | |
| | | <sql id="ProductionOrderVoColumns"> |
| | |
| | | po.dept_id, |
| | | po.plan_complete_time, |
| | | po.status, |
| | | po.team_leader_user_id, |
| | | sl_user.nick_name as teamLeaderUserName, |
| | | po_sales.salesContractNo, |
| | | po_sales.customerName, |
| | | p.product_name as productName, |
| | |
| | | left join product p on pm.product_id = p.id |
| | | left join technology_routing tr on po.technology_routing_id = tr.id |
| | | left join technology_bom tb on tb.id = tr.bom_id |
| | | left join sys_user sl_user on sl_user.user_id = po.team_leader_user_id |
| | | left join ( |
| | | select production_order_id as productionOrderId, |
| | | if(max(case when ifnull(is_returned, 0) = 1 then 1 else 0 end) = 1, true, false) as returned |