6 天以前 f350465db70d6f9db9494483ee0cec7793a9007b
src/main/resources/mapper/production/ProductProcessMapper.xml
@@ -4,9 +4,11 @@
    <select id="listPage" resultType="com.ruoyi.production.dto.ProductProcessDto">
        SELECT
        *
        p.*,
        dl.device_name AS deviceName
        FROM
        product_process p
        left join device_ledger dl on p.device_ledger_id = dl.id
        <where>
            <if test="productProcessDto.name != null and productProcessDto.name != '' ">
                AND  p.name LIKE CONCAT('%',#{productProcessDto.name},'%')
@@ -23,7 +25,7 @@
        pp.name AS processName,
        SUM(pi.quantity) AS totalInput,
        SUM(distinct ppo.scrap_qty) AS totalScrap,
        SUM(distinct (ppo.quantity - ppo.scrap_qty)) AS totalOutput
        SUM(distinct (ppo.quantity + IFNULL(ppo.add_qty, 0))) AS totalOutput
        FROM
        production_product_output ppo
        INNER JOIN production_product_main ppm ON ppo.product_main_id = ppm.id