From a92b12d5adaa8827c1474d42b73c98e17953ecb5 Mon Sep 17 00:00:00 2001
From: liyong <18434998025@163.com>
Date: 星期三, 08 四月 2026 17:18:50 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_天津_阳光彩印' into dev_天津_阳光彩印

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

diff --git a/src/main/resources/mapper/production/ProductionProductMainMapper.xml b/src/main/resources/mapper/production/ProductionProductMainMapper.xml
index a122e90..13be81d 100644
--- a/src/main/resources/mapper/production/ProductionProductMainMapper.xml
+++ b/src/main/resources/mapper/production/ProductionProductMainMapper.xml
@@ -48,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}
+            </if>
         </where>
         order by ppm.id
 
@@ -71,7 +74,13 @@
         slpa.process,
         ppo.quantity,
         slpa.work_hours,
-        slpa.work_hours * slpa.finished_num AS wages
+        slpa.work_hours * slpa.finished_num AS wages,
+        ppm.device_name,
+        ppm.device_id,
+        IFNULL(
+        TIMESTAMPDIFF(MINUTE, ppm.start_time, ppm.end_time),
+        0
+        ) AS work_minutes
         FROM
         production_product_main ppm
         LEFT JOIN sales_ledger_production_accounting slpa ON slpa.product_main_id = ppm.id
@@ -82,7 +91,7 @@
         LEFT JOIN product_model pm ON po.product_model_id = pm.id
         LEFT JOIN product p ON p.id = pm.product_id
         LEFT JOIN sales_ledger sl ON po.sales_ledger_id = sl.id
-        <where>
+        where ppm.audit_status = 1
             <if test="ew.schedulingUserName != null and ew.schedulingUserName !=''">
                 and slpa.scheduling_user_name = #{ew.schedulingUserName}
             </if>
@@ -94,7 +103,6 @@
                 and slpa.scheduling_date >= #{ew.entryDateStart}
                 and slpa.scheduling_date &lt; date_add(#{ew.entryDateEnd}, INTERVAL 1 DAY)
             </if>
-        </where>
     </select>
     <select id="listMain" resultType="java.lang.Long">
         SELECT ppm.id FROM production_product_main ppm

--
Gitblit v1.9.3