liyong
13 小时以前 66e910032e4ef806749d958fa15cf3368d411ccd
src/main/resources/mapper/production/ProductionProductMainMapper.xml
@@ -48,6 +48,9 @@
            <if test="c.status != null and c.status != ''">
                and ppm.status = #{c.status}
            </if>
            <if test="c.auditStatus != null">
                and ppm.audit_status = #{c.auditStatus}
            </if>
        </where>
        order by ppm.id
@@ -71,7 +74,13 @@
        slpa.process,
        ppo.quantity,
        slpa.work_hours,
        slpa.work_hours * slpa.finished_num AS wages
        slpa.work_hours * slpa.finished_num AS wages,
        ppm.device_name,
        ppm.device_id,
        IFNULL(
        TIMESTAMPDIFF(MINUTE, ppm.start_time, ppm.end_time),
        0
        ) AS work_minutes
        FROM
        production_product_main ppm
        LEFT JOIN sales_ledger_production_accounting slpa ON slpa.product_main_id = ppm.id
@@ -82,7 +91,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
        <where>
        where ppm.audit_status = 1
            <if test="ew.schedulingUserName != null and ew.schedulingUserName !=''">
                and slpa.scheduling_user_name = #{ew.schedulingUserName}
            </if>
@@ -94,7 +103,6 @@
                and slpa.scheduling_date >= #{ew.entryDateStart}
                and slpa.scheduling_date &lt; date_add(#{ew.entryDateEnd}, INTERVAL 1 DAY)
            </if>
        </where>
    </select>
    <select id="listMain" resultType="java.lang.Long">
        SELECT ppm.id FROM production_product_main ppm