buhuazhen
2026-05-09 c1db4e0ccf2c2ef1d6b6eb61946af5453010cf06
src/main/resources/mapper/production/ProductionOperationTaskMapper.xml
@@ -34,7 +34,9 @@
        CASE
            WHEN pot.work_order_no LIKE 'FG%' THEN '返工返修'
            ELSE '正常'
            END AS work_order_type
            END AS work_order_type,
        t8.id as workshop_id,
        t8.name as workshop_name
        from production_operation_task pot
                 left join production_order po on pot.production_order_id = po.id
                 left join production_order_routing_operation poro on pot.production_order_routing_operation_id = poro.id
@@ -47,6 +49,7 @@
                     left join production_product_output ppo on ppo.production_product_main_id = ppm.id
            group by ppm.production_operation_task_id
        ) scrapStat on scrapStat.taskId = pot.id
        left join workshop as t8 on po.workshop_id = t8.id
        <where>
            <if test="c != null and c.id != null">
                and pot.id = #{c.id}