From 2ee9e158e3129070f6b1fd953da1540f05d4f2b0 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期五, 10 七月 2026 18:04:50 +0800
Subject: [PATCH] 修改报工

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

diff --git a/src/main/resources/mapper/production/ProductionProductMainMapper.xml b/src/main/resources/mapper/production/ProductionProductMainMapper.xml
index df585f9..d2e89f7 100644
--- a/src/main/resources/mapper/production/ProductionProductMainMapper.xml
+++ b/src/main/resources/mapper/production/ProductionProductMainMapper.xml
@@ -7,6 +7,9 @@
         <id column="id" property="id" />
         <result column="product_no" property="productNo" />
         <result column="production_operation_task_id" property="productionOperationTaskId" />
+        <result column="report_type" property="reportType" />
+        <result column="audit_status" property="auditStatus" />
+        <result column="audit_remark" property="auditRemark" />
         <result column="dept_id" property="deptId" />
         <result column="update_time" property="updateTime" />
         <result column="create_user" property="createUser" />
@@ -16,6 +19,20 @@
 
     <select id="listPageProductionProductMainDto" resultType="com.ruoyi.production.bean.dto.ProductionProductMainDto">
         select ppm.*,
+               ppm.product_no as reportNo,
+               case ppm.report_type
+                   when 0 then '鍚堟牸'
+                   when 1 then '杞诲井杩斿伐'
+                   when 2 then '涓ラ噸杩斿伐'
+                   when 3 then '鎶ュ簾'
+                   else '鏈煡'
+                   end as reportTypeName,
+               case ppm.audit_status
+                   when 0 then '寰呭鏍�'
+                   when 1 then '瀹℃牳閫氳繃'
+                   when 2 then '瀹℃牳涓嶉�氳繃'
+                   else '鏈煡'
+                   end as auditStatusName,
                pot.work_order_no as workOrderNo,
                case pot.status
                    when 1 then '寰呯‘璁�'
@@ -57,6 +74,12 @@
             <if test="c.productNo != null and c.productNo != ''">
                 and ppm.product_no like concat('%', #{c.productNo}, '%')
             </if>
+            <if test="c.auditStatus != null">
+                and ppm.audit_status = #{c.auditStatus}
+            </if>
+            <if test="c.reportType != null">
+                and ppm.report_type = #{c.reportType}
+            </if>
             <if test="c.workOrderNo != null and c.workOrderNo != ''">
                 and pot.work_order_no like concat('%', #{c.workOrderNo}, '%')
             </if>
@@ -91,6 +114,20 @@
 
     <select id="listProductionDetails" resultType="com.ruoyi.production.bean.dto.ProductionProductMainDto">
         select ppm.*,
+               ppm.product_no as reportNo,
+               case ppm.report_type
+                   when 0 then '鍚堟牸'
+                   when 1 then '杞诲井杩斿伐'
+                   when 2 then '涓ラ噸杩斿伐'
+                   when 3 then '鎶ュ簾'
+                   else '鏈煡'
+                   end as reportTypeName,
+               case ppm.audit_status
+                   when 0 then '寰呭鏍�'
+                   when 1 then '瀹℃牳閫氳繃'
+                   when 2 then '瀹℃牳涓嶉�氳繃'
+                   else '鏈煡'
+                   end as auditStatusName,
                pot.work_order_no as workOrderNo,
                p.product_name as productName,
                pm.model as productModelName,
@@ -125,6 +162,12 @@
                  left join production_product_output ppo on ppo.production_product_main_id = ppm.id
         <where>
             <if test="c != null">
+                <if test="c.auditStatus != null">
+                    and ppm.audit_status = #{c.auditStatus}
+                </if>
+                <if test="c.reportType != null">
+                    and ppm.report_type = #{c.reportType}
+                </if>
                 <if test="c.productCategory != null and c.productCategory != ''">
                     and p_parent.product_name like concat('%', #{c.productCategory}, '%')
                 </if>

--
Gitblit v1.9.3