| | |
| | | <result column="work_order_no" property="workOrderNo"/> |
| | | <result column="status" property="status"/> |
| | | <result column="tenant_id" property="tenantId"/> |
| | | <result column="actual_end_time" property="planStartTime"/> |
| | | <result column="plan_start_time" property="planStartTime"/> |
| | | <result column="plan_end_time" property="planEndTime"/> |
| | | <result column="actual_start_time" property="actualStartTime"/> |
| | | <result column="actualEndTime" property="actualEndTime"/> |
| | | <result column="actual_end_time" property="actualEndTime"/> |
| | | </resultMap> |
| | | |
| | | <select id="pageProductWorkOrder" resultType="com.ruoyi.production.dto.ProductWorkOrderDto"> |
| | |
| | | pm.unit, |
| | | p.product_name AS productName, |
| | | po.nps_no AS productOrderNpsNo, |
| | | pp.salary_quota, |
| | | ROUND(pwo.complete_quantity / pwo.plan_quantity * 100, 2) AS completionStatus, |
| | | CASE |
| | | WHEN pwo.work_order_no LIKE 'FG%' THEN '返工返修' |
| | |
| | | and pwo.work_order_no like concat('%',#{c.workOrderNo},'%') |
| | | </if> |
| | | <if test="c.planStartTime != null and c.planEndTime != null"> |
| | | and DATE(pwo.create_time) between #{c.planStartTime} and #{c.planEndTime} |
| | | and pwo.create_time <![CDATA[ >= ]]> #{c.planStartTime} |
| | | and pwo.create_time <![CDATA[ <= ]]> #{c.planEndTime} |
| | | </if> |
| | | <if test="c.productOrderId != null and c.productOrderId != ''"> |
| | | and pwo.product_order_id = #{c.productOrderId} |
| | | </if> |
| | | <if test="c.type != null and c.type == 2 and c.currentUserId != null"> |
| | | and exists ( |
| | | select 1 |
| | | from product_work_order_rapporteur pwor |
| | | where pwor.work_order_id = pwo.id |
| | | and pwor.user_id = #{c.currentUserId} |
| | | ) |
| | | </if> |
| | | </select> |
| | | <select id="getProductWorkOrderFlowCard" resultType="com.ruoyi.production.dto.ProductWorkOrderDto"> |
| | | SELECT |