From b072235a80863d6b8cb14b4b6d58815069609a82 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期一, 02 二月 2026 10:52:52 +0800
Subject: [PATCH] 已领用的危险源台账删除时,做提示限制

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

diff --git a/src/main/resources/mapper/production/SalesLedgerProductionAccountingMapper.xml b/src/main/resources/mapper/production/SalesLedgerProductionAccountingMapper.xml
index aef7ead..3535b77 100644
--- a/src/main/resources/mapper/production/SalesLedgerProductionAccountingMapper.xml
+++ b/src/main/resources/mapper/production/SalesLedgerProductionAccountingMapper.xml
@@ -88,4 +88,23 @@
 
     </select>
 
+    <select id="selectDailyWagesStats" resultType="java.util.Map">
+        SELECT DATE(ppout.create_time)                                                         AS dateStr,
+               SUM(ppout.quantity - IFNULL(ppout.scrap_qty, 0))                                AS numberOfCompleted,
+               SUM((ppout.quantity - IFNULL(ppout.scrap_qty, 0)) * IFNULL(pp.salary_quota, 0)) AS amount,
+               ROUND(
+                       SUM(ppout.quantity - IFNULL(ppout.scrap_qty, 0)) * 100 / NULLIF(SUM(ppout.quantity), 0),
+                       2
+               )                                                                               AS passRate
+        FROM production_product_output ppout
+                 LEFT JOIN production_product_main ppm ON ppm.id = ppout.product_main_id
+                 LEFT JOIN product_process_route_item ppri ON ppri.id = ppm.product_process_route_item_id
+                 LEFT JOIN product_process pp ON pp.id = ppri.process_id
+        WHERE ppout.create_time &gt;= #{startDate}
+          AND ppout.create_time &lt; #{endDate}
+        GROUP BY DATE(ppout.create_time)
+        ORDER BY DATE(ppout.create_time);
+    </select>
+
+
 </mapper>

--
Gitblit v1.9.3