liyong
2026-04-29 844cae1a3be7bd2fbf8803a7ee33b0622208de05
src/main/resources/mapper/production/SalesLedgerProductionAccountingMapper.xml
@@ -50,17 +50,11 @@
        group by t4.id
        order by t4.scheduling_date desc
    </select>
    <select id="pageProductionAccounting"
            resultType="com.ruoyi.production.dto.SalesLedgerProductionAccountingDto">
    <select id="pageProductionAccounting" resultType="com.ruoyi.production.dto.SalesLedgerProductionAccountingDto">
        SELECT
        slpa.scheduling_user_id,
        MIN(slpa.scheduling_user_name) AS scheduling_user_name,
        slpa.scheduling_user_name,
        SUM(ppout.quantity) AS output_num,
        SUM(slpa.finished_num * slpa.work_hours) AS wages,
        CONCAT(
        ROUND(
        CASE
@@ -69,28 +63,21 @@
        END, 2
        ),
        '%'
        ) AS output_rate,
        GROUP_CONCAT(
        ) AS output_rate, GROUP_CONCAT(
        CONCAT(
        IFNULL(
        TIMESTAMPDIFF(MINUTE, ppm.start_time, ppm.end_time),
        0
        ),
        IFNULL(slpa.work_hour, 0),
        '|$|',
        IFNULL(ppm.device_name, '未知机台')
        IFNULL(dl.device_name, '未知机台')
        )
        ORDER BY ppm.start_time
        ORDER BY slpa.create_time
        SEPARATOR '>>>'
        ) AS device_work_info
        FROM sales_ledger_production_accounting slpa
        LEFT JOIN production_product_main ppm
        ON slpa.product_main_id = ppm.id
        LEFT JOIN production_product_output ppout
        ON ppm.id = ppout.product_main_id
        left join device_ledger dl on dl.id = slpa.device_id
        <where>
            <if test="ew.schedulingUserName != null and ew.schedulingUserName !=''">
                and slpa.scheduling_user_name = #{ew.schedulingUserName}
@@ -103,10 +90,8 @@
                and slpa.scheduling_date >= #{ew.entryDateStart}
                and slpa.scheduling_date &lt; DATE_ADD(DATE(#{ew.entryDateEnd}), INTERVAL 1 DAY)
            </if>
        </where>
        GROUP BY slpa.scheduling_user_id
        GROUP BY slpa.scheduling_user_name
    </select>
    <select id="selectDailyWagesStats" resultType="java.util.Map">