liyong
2026-05-20 b0bbbf71d1e6ecdbe4abbcc39127f5aac6502f1e
src/main/resources/mapper/production/ProductionProductMainMapper.xml
@@ -51,11 +51,11 @@
            <if test="c.auditStatus != null">
                and ppm.audit_status = #{c.auditStatus}
            </if>
            <if test="c.workOrderId != ''">
            <if test="c.workOrderId != null">
                and ppm.work_order_id = #{c.workOrderId}
            </if>
        </where>
        order by pwo.id desc, ppm.id asc
        order by  ppm.id desc
    </select>
    <select id="getOrderByMainId" resultType="com.ruoyi.production.pojo.ProductOrder">
@@ -78,8 +78,8 @@
        ppo.quantity,
        slpa.work_hours,
        slpa.work_hours * slpa.finished_num AS wages,
        ppm.device_name,
        ppm.device_id,
        dl.device_name,
        slpa.work_hour as work_minutes,
        IFNULL(
        TIMESTAMPDIFF(MINUTE, ppm.start_time, ppm.end_time),
        0
@@ -94,6 +94,7 @@
        LEFT JOIN product_model pm ON po.product_model_id = pm.id
        LEFT JOIN product p ON p.id = pm.product_id
        LEFT JOIN sales_ledger sl ON po.sales_ledger_id = sl.id
        left join device_ledger dl ON dl.id = slpa.device_id
        where ppm.audit_status = 1
            <if test="ew.schedulingUserName != null and ew.schedulingUserName !=''">
                and slpa.scheduling_user_name = #{ew.schedulingUserName}