服务端的TigerApi 框架,基于.NET6 2024 版本
Ben Lin
2024-09-20 ac0d220e150a8103b586a81340faf39ddb5e08fe
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)