From fe0574d335c7900228f1ba19b4ff9e7aad78c791 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期四, 02 一月 2025 01:18:14 +0800 Subject: [PATCH] 完工更新 --- Tiger.Business.MES/Common/WorkBatch.cs | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Tiger.Business.MES/Common/WorkBatch.cs b/Tiger.Business.MES/Common/WorkBatch.cs index 30c2ec7..0d1811e 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; -- Gitblit v1.9.3