From 2abf4959b71e7dd6ee6ee8a349ecc5c2f7b20fce Mon Sep 17 00:00:00 2001
From: YangYuGang <1378265336@qq.com>
Date: 星期日, 20 四月 2025 20:28:56 +0800
Subject: [PATCH] Merge branch 'master' of http://47.115.28.255:8110/r/TigerClouds-Tech/Server/TigerApi6_2024

---
 Tiger.Business.MES/Common/WorkBatch.cs |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Tiger.Business.MES/Common/WorkBatch.cs b/Tiger.Business.MES/Common/WorkBatch.cs
index 30c2ec7..1de3073 100644
--- a/Tiger.Business.MES/Common/WorkBatch.cs
+++ b/Tiger.Business.MES/Common/WorkBatch.cs
@@ -259,7 +259,7 @@
 
             //鍒ゆ柇褰撳墠宸ュ崟鎵规鏄惁宸插畬宸�
             if (!woSNs.Any(q => q.BATCH_NO == Batch.BATCH_NO && q.STATUS < BIZ_MES_WO_SN.STATUSs.Finished.GetValue()) && 
-                 woSNs.Count(q => q.BATCH_NO == Batch.BATCH_NO && q.STATUS == BIZ_MES_WO_SN.STATUSs.Finished.GetValue()) == Batch.PLAN_QTY)
+                 woSNs.Where(q => q.BATCH_NO == Batch.BATCH_NO && q.STATUS == BIZ_MES_WO_SN.STATUSs.Finished.GetValue()).Sum(q=>q.QTY) == Batch.PLAN_QTY)
             {
                 Batch.STATUS = BIZ_MES_WO_BATCH.STATUSs.Closed.GetValue();
                 Batch.ACT_END_TIME = DateTime.Now;
@@ -267,7 +267,7 @@
 
             //鍒ゆ柇褰撳墠宸ュ崟鏄惁宸插畬宸�
             if (!woSNs.Any(q => q.STATUS < BIZ_MES_WO_SN.STATUSs.Finished.GetValue()) && 
-                 woSNs.Count(q => q.STATUS == BIZ_MES_WO_SN.STATUSs.Finished.GetValue()) == WO.PLAN_QTY)
+                 woSNs.Where(q => q.STATUS == BIZ_MES_WO_SN.STATUSs.Finished.GetValue()).Sum(q => q.QTY) == WO.PLAN_QTY)
             {
                 WO.STATUS = BIZ_MES_WO.STATUSs.Closed.GetValue();
                 WO.ACT_END_TIME = DateTime.Now;
@@ -656,6 +656,7 @@
                     wipSN.NODE_ID = "";
                     wipSN.NODE_NAME = "涓嬬嚎閫�搴�";
                     wipSN.OPERATION_TIME = DateTime.Now;
+                    wipSN.OPERATION_END = DateTime.Now;
                     var his = new MES_WIP_HIS(wipSN, $"宸ュ崟[{wipSN.WORK_ORDER}]鏉$爜[{wipSN.SN}]涓嬬嚎");
                     wipHiss.Add(his);
                 }

--
Gitblit v1.9.3