gongchunyi
8 小时以前 768b011a17b9e63e4b6570989824152145952eda
src/main/resources/mapper/production/ProductWorkOrderMapper.xml
@@ -5,17 +5,24 @@
<mapper namespace="com.ruoyi.production.mapper.ProductWorkOrderMapper">
    <resultMap id="BaseResultMap" type="com.ruoyi.production.pojo.ProductWorkOrder">
        <result column="id" property="id"/>
        <id column="id" property="id"/>
        <result column="product_process_route_item_id" property="productProcessRouteItemId"/>
        <result column="product_order_id" property="productOrderId"/>
        <result column="create_time" property="createTime"/>
        <result column="update_time" property="updateTime"/>
        <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"/>
        <result column="plan_quantity" property="planQuantity"/>
        <result column="complete_quantity" property="completeQuantity"/>
        <result column="worker_id" property="workerId"/>
        <result column="worker_name" property="workerName"/>
        <result column="handover_user_id" property="handoverUserId"/>
        <result column="handover_user_name" property="handoverUserName"/>
    </resultMap>
    <select id="pageProductWorkOrder" resultType="com.ruoyi.production.dto.ProductWorkOrderDto">
@@ -39,16 +46,20 @@
        LEFT JOIN product_model pm ON pm.id = ppri.product_model_id
        LEFT JOIN product p ON p.id = pm.product_id
        where 1=1
            <if test="c.workOrderNo != null and c.workOrderNo != ''">
               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}
            </if>
            <if test="c.productOrderId != null and c.productOrderId != ''">
               and pwo.product_order_id = #{c.productOrderId}
            </if>
        <if test="c.workOrderNo != null and c.workOrderNo != ''">
            and pwo.work_order_no like concat('%',#{c.workOrderNo},'%')
        </if>
        <if test="c.workerName != null and c.workerName != ''">
            and (pwo.worker_name like concat('%',#{c.workerName},'%') or pwo.handover_user_name like concat('%',#{c.workerName},'%'))
        </if>
        <if test="c.planStartTime != null and c.planEndTime != null">
            and DATE(pwo.create_time) between #{c.planStartTime} and #{c.planEndTime}
        </if>
        <if test="c.productOrderId != null and c.productOrderId != ''">
            and pwo.product_order_id = #{c.productOrderId}
        </if>
    </select>
    <select id="getProductWorkOrderFlowCard" resultType="com.ruoyi.production.dto.ProductWorkOrderDto">
        SELECT
        pwo.*,