From ac0d220e150a8103b586a81340faf39ddb5e08fe Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期五, 20 九月 2024 10:12:49 +0800
Subject: [PATCH] 一些已知更改

---
 Tiger.Business.MES/Transaction/Position.cs |   22 +++++++++++++++++-----
 1 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/Tiger.Business.MES/Transaction/Position.cs b/Tiger.Business.MES/Transaction/Position.cs
index 5dcbd97..700e73a 100644
--- a/Tiger.Business.MES/Transaction/Position.cs
+++ b/Tiger.Business.MES/Transaction/Position.cs
@@ -73,8 +73,8 @@
         public bool NeedTemporaryStoreDBCommitAction { get; set; } = false;
         protected Dictionary<string, List<Action>> DBCommitList { get; set; } = new();
         protected List<Position> NodeCommitList { get; set; } = new();
-        protected Dictionary<string, OperInfo> OperInfoDic { get; set; } = new();
-        //protected OperInfo CurOperInfo { get; set; }
+        private Dictionary<string, OperInfo> OperInfoDic = new();
+
         #endregion Propertys & Variables
 
         #region Functions
@@ -196,22 +196,32 @@
             CurDefects.Clear();
         }
 
+        //鑾峰彇褰撳墠鐨勫伐搴忎俊鎭�
+        protected OperInfo CurOperInfo(string locale)
+        {
+            OperInfo info = new();
+            if (CurBatch?.Batch?.BATCH_NO != null)
+            {
+                info = OperInfoDic[CurBatch.Batch.BATCH_NO ];
+                info.StepsInfo = Steps.Select(q => q.GetInfo(locale)).ToList();
+            }
+            return info;
+        }
+
         /// <summary>
         /// 璁剧疆褰撳墠鏉$爜鐨勫伐搴忎俊鎭�
         /// </summary>
-        public OperInfo SetOperNodeInfo(OperInfo info, string locale)
+        public OperInfo SetOperNodeInfo(OperInfo info)
         {
             if (CurWipSNs.Any())
             {
                 info.CurNode = CurWipSNs.First().NODE_NAME;
                 info.NextNode = string.Join(",", CurBatch.GetNextNodes(CurWipSNs.First()).Select(q => q.NODE_NAME));
-                info.StepsInfo = Steps.Select(q => q.GetInfo(locale)).ToList();
             }
             else
             {
                 info.CurNode = "   鈥�   ";
                 info.NextNode = "   鈥�   ";
-                info.StepsInfo = new();
             }
             return info;
         }
@@ -424,6 +434,7 @@
             }
         }
 
+        #region 鎵撳嵃涓撶敤鏂规硶
         /// <summary>
         /// 鑾峰彇鎵撳嵃鏍囩妯℃澘杩囩▼鍙橀噺鍊�
         /// </summary>
@@ -549,6 +560,7 @@
             return result;
         }
 
+        #endregion
         #endregion Functions
 
         public override bool Close(bool needSaveHistoryLog = false)

--
Gitblit v1.9.3