From 84ee50f83144da18e7eb42bb8577aa17f717e7fa Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期三, 18 三月 2026 09:23:00 +0800
Subject: [PATCH] 不合格管理:取消隔离

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

diff --git a/src/main/resources/mapper/production/ProductionProductOutputMapper.xml b/src/main/resources/mapper/production/ProductionProductOutputMapper.xml
index 48c8c9e..fad5b62 100644
--- a/src/main/resources/mapper/production/ProductionProductOutputMapper.xml
+++ b/src/main/resources/mapper/production/ProductionProductOutputMapper.xml
@@ -9,7 +9,9 @@
         <result property="quantity" column="quantity"/>
         <result property="tenantId" column="tenant_id"/>
         <result property="createTime" column="create_time"/>
+        <result property="otherData" column="other_data"/>
     </resultMap>
+
     <select id="listPageProductionProductOutputDto" resultType="com.ruoyi.production.dto.ProductionProductOutputDto">
         select ppo.*,
         pm.model as model,
@@ -25,4 +27,36 @@
         </where>
         order by ppo.id
     </select>
+
+    <delete id="deleteByProductMainIds" parameterType="java.util.List">
+        DELETE FROM production_product_output
+        WHERE product_main_id IN
+        <foreach collection="productMainIds" item="id" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+    <select id="selectOutputStats" resultType="com.ruoyi.production.dto.ProductionProductOutputDto">
+        SELECT
+            create_time,
+            quantity,
+            scrap_qty
+        FROM
+            production_product_output
+        WHERE
+            create_time &gt;= #{startDate}
+            AND create_time &lt;= #{endDate}
+    </select>
+
+    <select id="selectDailyOutputStats" resultType="java.util.Map">
+        SELECT
+            DATE_FORMAT(create_time, '%Y-%m-%d') as date,
+            SUM(quantity-scrap_qty) as quantity
+        FROM
+            production_product_output
+        WHERE
+            create_time &gt;= #{startDate}
+            AND create_time &lt;= #{endDate}
+        GROUP BY
+            DATE_FORMAT(create_time, '%Y-%m-%d')
+    </select>
 </mapper>

--
Gitblit v1.9.3