From 06e1d5c2e895f198dedee2ef845485e9d4a2747c Mon Sep 17 00:00:00 2001 From: Rodney Chen <rodney.chen@hotmail.com> Date: 星期一, 23 十二月 2024 16:18:58 +0800 Subject: [PATCH] 增加U9接口 --- Tiger.Model.Net/Entitys/MES/ParameterEntity/PositionParameter.cs | 42 +++++++++++++++++++++++++++++++++++++----- 1 files changed, 37 insertions(+), 5 deletions(-) diff --git a/Tiger.Model.Net/Entitys/MES/ParameterEntity/PositionParameter.cs b/Tiger.Model.Net/Entitys/MES/ParameterEntity/PositionParameter.cs index 3eb7342..d74c353 100644 --- a/Tiger.Model.Net/Entitys/MES/ParameterEntity/PositionParameter.cs +++ b/Tiger.Model.Net/Entitys/MES/ParameterEntity/PositionParameter.cs @@ -62,10 +62,6 @@ /// </summary> public bool IsFinished { get; set; } = false; /// <summary> - /// 鐭秷鎭� - /// </summary> - public ShortMessage ShortMsg { get; set; } - /// <summary> /// 褰撳墠鎿嶄綔鐨勮妭鐐瑰悕绉� /// </summary> public string NodeName { get; set; } @@ -81,6 +77,14 @@ /// 涓嬩竴涓搷浣滅殑宸ユID /// </summary> public string NextStepID { get; set; } + /// <summary> + /// 鐭秷鎭� + /// </summary> + public ShortMessage ShortMsg { get; set; } + /// <summary> + /// Mqtt娑堟伅 + /// </summary> + public MQTT.Message MqttMsg { get; set; } /// <summary> /// 褰撳墠鎿嶄綔杩斿洖鐨勬暟鎹� /// </summary> @@ -195,8 +199,10 @@ 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() { @@ -215,6 +221,23 @@ { 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; } @@ -303,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