服务端的TigerApi 框架,基于.NET6 2024 版本
Rodney Chen
2024-08-14 86af82de39f36b5c763b1d0e02ac8d8193fdf077
Tiger.Business.MES/Transaction/Position.cs
@@ -17,7 +17,7 @@
    /// <summary>
    /// MES岗位事务
    /// </summary>
    public class Position : MESTransactionBase, IPosition, ICloneable
    public class Position : MESTransactionBase, IPosition
    {
        public IPosition Init(string id, string apiHost, string userCode, string postCode)
        {
@@ -330,15 +330,6 @@
            return result;
        }
        public object Clone()
        {
            var newObject = this.MemberwiseClone() as Position;
            newObject.Steps = Steps.Clone();
            newObject.CurWipSNs = CurWipSNs.Clone();
            return newObject;
        }
        /// <summary>
        /// 保存工步的数据库提交操作到数据库
        /// </summary>
@@ -374,25 +365,6 @@
                    throw dbTran.ErrorException;
                }
            }
            //if (NeedTemporaryStoreDBCommitAction)
            //{
            //    NodeCommitList.Add(this.Clone() as Position);
            //}
            //else
            //{
            //    //保存成功则清空提交操作列表
            //    foreach (var item in NodeCommitList)
            //    {
            //        item?.DoSaveToDB();
            //        item?.Dispose();
            //    }
            //    DoSaveToDB();
            //    NodeCommitList.Clear();
            //}
        }
        protected void DoSaveToDB()
@@ -503,7 +475,7 @@
                            switch (pv.VAR_METHOD)
                            {
                                case "GetCartonGenerate":
                                    return Biz.CodeRule[lv.BARCODE_RULE].Generate($"{WorkBatch.Batch.BATCH_NO}-{WorkBatch.Batch.PLAN_QTY}-").Data.ToString();
                                    return Biz.CodeRule[lv.BARCODE_RULE ?? ""]?.Generate($"{WorkBatch.Batch.BATCH_NO}-{WorkBatch.Batch.PLAN_QTY}-").Data.ToString() ?? "";
                                default:
                                    return "";
                            }