From 738df70120209daecd85566d0c50dbf56d9e4453 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期二, 17 十二月 2024 21:06:59 +0800 Subject: [PATCH] 一些更改 --- Tiger.Model.Net/Entitys/MES/ParameterEntity/PositionParameter.cs | 93 +++++++++++++++++++++++++++++++++++++++------- 1 files changed, 78 insertions(+), 15 deletions(-) diff --git a/Tiger.Model.Net/Entitys/MES/ParameterEntity/PositionParameter.cs b/Tiger.Model.Net/Entitys/MES/ParameterEntity/PositionParameter.cs index fe5a467..d74c353 100644 --- a/Tiger.Model.Net/Entitys/MES/ParameterEntity/PositionParameter.cs +++ b/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; } @@ -57,18 +61,6 @@ /// 鏁翠釜宸ュ簭鎿嶄綔鏄惁瀹屾垚 /// </summary> public bool IsFinished { get; set; } = false; - /// <summary> - /// 鐭秷鎭� - /// </summary> - public ShortMessage ShortMsg { get; set; } - /// <summary> - /// 褰撳墠鎿嶄綔鐨勫伐鍗曞璞� - /// </summary> - public BIZ_MES_WO CurWO { get; set; } - /// <summary> - /// 褰撳墠鎿嶄綔鐨勫伐鍗曟壒娆″璞� - /// </summary> - public BIZ_MES_WO_BATCH CurBatch { get; set; } /// <summary> /// 褰撳墠鎿嶄綔鐨勮妭鐐瑰悕绉� /// </summary> @@ -86,6 +78,14 @@ /// </summary> public string NextStepID { get; set; } /// <summary> + /// 鐭秷鎭� + /// </summary> + public ShortMessage ShortMsg { get; set; } + /// <summary> + /// Mqtt娑堟伅 + /// </summary> + public MQTT.Message MqttMsg { get; set; } + /// <summary> /// 褰撳墠鎿嶄綔杩斿洖鐨勬暟鎹� /// </summary> public object Data { get; set; } @@ -93,7 +93,14 @@ /// 宸ュ簭淇℃伅 /// </summary> public OperInfo OperInfo { get; set; } - + /// <summary> + /// 褰撳墠鎿嶄綔鐨勫伐鍗曞璞� + /// </summary> + public BIZ_MES_WO CurWO { get; set; } + /// <summary> + /// 褰撳墠鎿嶄綔鐨勫伐鍗曟壒娆″璞� + /// </summary> + public BIZ_MES_WO_BATCH CurBatch { get; set; } } public class DefectOutput @@ -149,6 +156,10 @@ /// </summary> public int PkgLevel { get; set; } /// <summary> + /// 鏄惁闇�瑕� + /// </summary> + public bool RealPrint { get; set; } = true; + /// <summary> /// 褰撳墠闇�瑕佹墦鍗扮殑鍖呰灞傜骇鐨勬爣绛句俊鎭� /// </summary> public BAS_LABEL_TEMP PrintLable { get; set; } @@ -163,13 +174,15 @@ public string RULE_CODE { get; set; } public string RULE_NAME { get; set; } public string PROD_CODE { get; set; } - public string ITEM_CODE { get; set; } + public MES_CUST_SN CustSN { get; set; } public WipPkgItem Item { get; set; } public bool NeedWeighing { get; set; } = false; public bool IsWeighed { get; set; } = false; 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> @@ -183,10 +196,51 @@ 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 bool PkgComplete => PKG_LEVEL == 1 || Items.Count(q => q.IsFinished) == PKG_QTY; 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 ?? 0; + + 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> @@ -272,4 +326,13 @@ public string Message { get; set; } } + /// <summary> + /// 鍑鸿揣淇℃伅 + /// </summary> + public class ShipingInfo + { + public bool IsPrintCustomerLabel { get; set; } + public int ShipQty { get; set; } + } + } -- Gitblit v1.9.3