From f8dfc6add4658bec89ef48c2bc091cfdbd7f65c8 Mon Sep 17 00:00:00 2001
From: buhuazhen <hua100783@gmail.com>
Date: 星期四, 19 三月 2026 16:35:28 +0800
Subject: [PATCH] feat(production): 实现生产报工审核功能

---
 src/main/resources/mapper/production/ProductionProductMainMapper.xml |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/production/ProductionProductMainMapper.xml b/src/main/resources/mapper/production/ProductionProductMainMapper.xml
index 9c3bf3d..5b3f845 100644
--- a/src/main/resources/mapper/production/ProductionProductMainMapper.xml
+++ b/src/main/resources/mapper/production/ProductionProductMainMapper.xml
@@ -18,6 +18,7 @@
         pwo.status as workOrderStatus,
         u.nick_name as nickName,
         p.product_name as productName,
+        pp.name as process,
         pm.model as productModelName,
         ppo.quantity,
         ppo.scrap_qty,
@@ -26,6 +27,8 @@
         from
         production_product_main ppm
         left join product_work_order pwo on pwo.id = ppm.work_order_id
+        left join product_process_route_item ppri on ppri.id = pwo.product_process_route_item_id
+        left join product_process pp on pp.id = ppri.process_id
         left join product_order po on po.id = pwo.product_order_id
         left join production_product_output ppo on ppm.id = ppo.product_main_id
         left join product_model pm on pm.id = ppo.product_model_id
@@ -45,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.code}
+            </if>
         </where>
         order by ppm.id
 

--
Gitblit v1.9.3