服务端的TigerApi 框架,基于.NET6 2024 版本
Ben Lin
2024-11-22 57e1796bf33346c3992edde1a63f635cfae0def9
Tiger.Model.Net/Entitys/MES/ParameterEntity/PositionParameter.cs
@@ -46,6 +46,10 @@
        /// </summary>
        public string DFT_CODE { get; set; }
        /// <summary>
        /// 当前操作需要提交的选项
        /// </summary>
        public Dictionary<string, string> Options { get; set; } = new Dictionary<string, string>();
        /// <summary>
        /// 当前操作需要提交的数据
        /// </summary>
        public string Data { get; set; }
@@ -148,6 +152,10 @@
        /// </summary>
        public int PkgLevel { get; set; }
        /// <summary>
        /// 是否需要
        /// </summary>
        public bool RealPrint { get; set; } = true;
        /// <summary>
        /// 当前需要打印的包装层级的标签信息
        /// </summary>
        public BAS_LABEL_TEMP PrintLable { get; set; }
@@ -169,6 +177,8 @@
        public WeightInfo WeightInfo { get; set; } = new WeightInfo();
        public bool IsFinished => Item.IsFinished;
        public bool IsReachedEndNode { get; set; } = false;
        public string InStoreActID { get; set; }
        public BAS_LABEL_TEMP InStoreLabel { get; set; }
    }
    /// <summary>
@@ -182,10 +192,50 @@
        public int PKG_LEVEL { get; set; }
        public int PKG_QTY { get; set; }
        public string LABEL_CODE { get; set; }
        public string SN { get; set; }
        public MES_WIP_PKG Package { get; set; }
        public bool IsFinished { get; set; } = false;
        public List<WipPkgItem> Items { get; set; } = new List<WipPkgItem>();
        public int TotalQty => Items.Any() ? Items.Sum(q => q.TotalQty) : 1;
        public Dictionary<string, string> WipSNs { get; set; } = new Dictionary<string, string>();
        public double TotalQty => Items.Any() ? Items.Sum(q => q.TotalQty) : Package.QTY;
        public List<MES_WIP_PKG> GetMinPackageList()
        {
            var list = new List<MES_WIP_PKG>();
            if (Items.Any())
            {
                foreach (var item in Items)
                {
                    item.Package.PARENT_SN = Package?.SN;
                    list.AddRange(item.GetMinPackageList());
                }
            }
            else
            {
                if (Package != null)
                {
                    list.Add(Package);
                }
            }
            return list;
        }
        public List<KeyValuePair<string, string>> GetWipSnList()
        {
            var list = new List<KeyValuePair<string, string>>();
            if (Items.Any())
            {
                foreach (var item in Items)
                {
                    list.AddRange(item.GetWipSnList());
                }
            }
            else
            {
                list.AddRange(WipSNs.ToList());
            }
            return list;
        }
    }
    /// <summary>