From d0a265713fd18162f3a82bdcd22e267df7298c7b Mon Sep 17 00:00:00 2001 From: 杨前锦 <1010338399@qq.com> Date: 星期一, 26 五月 2025 08:59:52 +0800 Subject: [PATCH] 印尼佳通-半制品代码逻辑优化 --- HH.WCS.Mobox3/HH.WCS.Mobox3.YNJT_PT/util/Settings.cs | 73 +++++++----------------------------- 1 files changed, 15 insertions(+), 58 deletions(-) diff --git a/HH.WCS.Mobox3/HH.WCS.Mobox3.YNJT_PT/util/Settings.cs b/HH.WCS.Mobox3/HH.WCS.Mobox3.YNJT_PT/util/Settings.cs index 9ec7f9c..1926b76 100644 --- a/HH.WCS.Mobox3/HH.WCS.Mobox3.YNJT_PT/util/Settings.cs +++ b/HH.WCS.Mobox3/HH.WCS.Mobox3.YNJT_PT/util/Settings.cs @@ -15,15 +15,13 @@ public static string HASeverUrl { get; set; } public static string SqlServer { get; set; } public static string SqlServer1 { get; set; } - public static List<deviceInfo> deviceInfos { get; set; } + public static List<ConnectLoc> connectLocList { get; set; } public static int port { get; set; } public static string WHCode { get; set; } public static string FacCode { get; set; } - public static string listenAddress { get; set; } - public static int WaitTime { get; set; } - public static string BufferArea { get; set; } - public static List<AgvAlarmNo> agvAlarmNoList { get; set; } - public static List<AlertorDeviceInfo> alertorLightInfos { get; set; } + public static string abnormalArea { get; set; } + public static string stockArea { get; set; } + public static void Init() { LogHelper.Info("鍔犺浇閰嶇疆鏂囦欢淇℃伅 寮�"); @@ -55,29 +53,18 @@ if (keyValue.Name == "ApiPort") { port = int.Parse(keyValue.Value.ToString()); } - if (keyValue.Name == "DeviceInfo") { - deviceInfos = JsonConvert.DeserializeObject<List<deviceInfo>>(keyValue.Value.ToString()); + if (keyValue.Name == "ConnectLoc") { + connectLocList = JsonConvert.DeserializeObject<List<ConnectLoc>>(keyValue.Value.ToString()); } - if (keyValue.Name == "ListenAddress") + if (keyValue.Name == "AbnormalArea") { - listenAddress = keyValue.Value.ToString(); + abnormalArea = keyValue.Value.ToString(); } - if (keyValue.Name == "WaitTime") + if (keyValue.Name == "StockArea") { - WaitTime = JsonConvert.DeserializeObject<int>(keyValue.Value.ToString()); + stockArea = keyValue.Value.ToString(); } - if (keyValue.Name == "BufferArea") - { - BufferArea = keyValue.Value.ToString(); - } - if (keyValue.Name == "AlertorLightDevice") - { - alertorLightInfos = JsonConvert.DeserializeObject<List<AlertorDeviceInfo>>(keyValue.Value.ToString()); - } - if (keyValue.Name == "AgvAlarmNo") - { - agvAlarmNoList = JsonConvert.DeserializeObject<List<AgvAlarmNo>>(keyValue.Value.ToString()); - } + } } } @@ -89,43 +76,13 @@ } - /* public static AlertorDeviceInfo getAlertorAdress(int deviceNo) - { - var alertorDeviceInfo = alertorLightInfos.Where(a => a.deviceNo == deviceNo).FirstOrDefault(); - return alertorDeviceInfo; - }*/ - public class AgvAlarmNo + public class ConnectLoc { + public string locCode { get; set; } + public int roadway { get; set; } public int type { get; set; } - public int dex { get; set; } - public string code { get; set; } - public string name { get; set; } } - - public class AlertorDeviceInfo - { - public int deviceNo { get; set; } - public string address { get; set; } - public string turnLight { get; set; } - public string offLight { get; set; } - } - - public class deviceInfo - { - public string address { get; set; } - public string deviceName { get; set; } - public string[] deviceNo { get; set; } - public string[] location { get; set; } - - public int deviceType { get; set; } - public int enable { get; set; } - } - public class TableName - { - public string name { get; set; } - public string code { get; set; } - } - + } } -- Gitblit v1.9.1