From c9cd6e47dbdf173060496f3d8ce0f228f6a17cda Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期四, 30 七月 2026 17:56:18 +0800
Subject: [PATCH] 修改报工审批查询

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

diff --git a/src/main/resources/mapper/production/ProductionProductMainMapper.xml b/src/main/resources/mapper/production/ProductionProductMainMapper.xml
index 77b74b7..2403afe 100644
--- a/src/main/resources/mapper/production/ProductionProductMainMapper.xml
+++ b/src/main/resources/mapper/production/ProductionProductMainMapper.xml
@@ -34,6 +34,14 @@
                    else '鏈煡'
                    end as auditStatusName,
                pot.work_order_no as workOrderNo,
+               ifnull(pot.plan_quantity, 0) as schedulingNum,
+               cast(
+                   case
+                       when ifnull(pot.plan_quantity, 0) - ifnull(ppo.quantity, 0) &lt; 0 then 0
+                       else ifnull(pot.plan_quantity, 0) - ifnull(ppo.quantity, 0)
+                   end
+                   as decimal(18,4)
+               ) as pendingNum,
                case pot.status
                    when 1 then '寰呯‘璁�'
                    when 2 then '寰呯敓浜�'
@@ -131,6 +139,14 @@
                    else '鏈煡'
                    end as auditStatusName,
                pot.work_order_no as workOrderNo,
+               ifnull(pot.plan_quantity, 0) as schedulingNum,
+               cast(
+                   case
+                       when ifnull(pot.plan_quantity, 0) - ifnull(ppo.quantity, 0) &lt; 0 then 0
+                       else ifnull(pot.plan_quantity, 0) - ifnull(ppo.quantity, 0)
+                   end
+                   as decimal(18,4)
+               ) as pendingNum,
                p.product_name as productName,
                ifnull(p.standard_quantity, 0) as productStandardQuantity,
                pm.model as productModelName,

--
Gitblit v1.9.3