| | |
| | | <if test="endDateTime != null"> |
| | | and ppo.create_time <= #{endDateTime} |
| | | </if> |
| | | <if test="userId != null"> |
| | | and ppm.create_user = #{userId} |
| | | </if> |
| | | <!-- <if test="userId != null">--> |
| | | <!-- and ppm.create_user = #{userId}--> |
| | | <!-- </if>--> |
| | | <if test="processIds != null and processIds.size() > 0"> |
| | | and poro.technology_operation_id in |
| | | <foreach collection="processIds" item="id" open="(" separator="," close=")"> |
| | |
| | | order by min(poro.drag_sort), poro.operation_name |
| | | </select> |
| | | |
| | | <select id="listProcessStatusByOrderIds" resultType="com.ruoyi.production.bean.vo.ProductionOrderProcessTaskVo"> |
| | | select pot.production_order_id as productionOrderId, |
| | | poro.operation_name as operationName, |
| | | ROUND(IFNULL(pot.complete_quantity, 0) / NULLIF(pot.plan_quantity, 0) * 100, 2) AS completionStatus |
| | | from production_operation_task pot |
| | | left join production_order_routing_operation poro |
| | | on pot.production_order_routing_operation_id = poro.id |
| | | where pot.production_order_id in |
| | | <foreach collection="orderIds" item="orderId" open="(" separator="," close=")"> |
| | | #{orderId} |
| | | </foreach> |
| | | order by pot.production_order_id, poro.drag_sort asc, pot.id asc |
| | | </select> |
| | | |
| | | </mapper> |