杨前锦
2025-06-11 e0d89637030791ce1e7dd46ca5fdec9979977960
HH.WCS.Mobox3/HH.WCS.Mobox3.FJJT/util/Settings.cs
@@ -12,11 +12,13 @@
        public static string SqlServer { get; set; }
        public static string SqlServer1 { get; set; }
        public static string OracleServer { get; set; }
        public static List<deviceInfo> deviceInfos { get; set; }
        public static List<CarDeviceInfo> carDeviceInfos { get; set; }
        public static List<LinePlcInfo> linePlcInfo { get; set; }
        public static List<PlcValue> plcValue { get; set; }
        public static List<AreaProperty> areaPropertyList { get; set; }
        public static List<AreaRelevance> areaRelevanceList { get; set; }
        public static List<BufferLocConfig> bufferLocConfigList { get; set; }
        public static int port { get; set; }
        public static string WHCode { get; set; }
        public static string FacCode { get; set; }
@@ -61,8 +63,8 @@
                            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 == "CarDeviceInfo") {
                                carDeviceInfos = JsonConvert.DeserializeObject<List<CarDeviceInfo>>(keyValue.Value.ToString());
                            }
                            if (keyValue.Name == "linePlcInfo") {
                                linePlcInfo = JsonConvert.DeserializeObject<List<LinePlcInfo>>(keyValue.Value.ToString());
@@ -77,6 +79,10 @@
                            if (keyValue.Name == "AreaRelevance")
                            {
                                areaRelevanceList = JsonConvert.DeserializeObject<List<AreaRelevance>>(keyValue.Value.ToString());
                            }
                            if (keyValue.Name == "BufferLocConfig")
                            {
                                bufferLocConfigList = JsonConvert.DeserializeObject<List<BufferLocConfig>>(keyValue.Value.ToString());
                            }
                        }
                    }
@@ -113,6 +119,22 @@
            return areaCodes;
        }
        /// <summary>
        /// 获取直连缓存位配置
        /// </summary>
        /// <param name="locCode"></param>
        /// <returns></returns>
        public static BufferLocConfig GetBufferLocConfig(string locCode)
        {
           return bufferLocConfigList.Where(a => a.locCode == locCode).FirstOrDefault();
        }
        public class BufferLocConfig
        {
            public string locCode { get; set; }
            public string deviceNo { get; set; }
        }
        public class AreaRelevance
        {
            public string areaCode { get; set; }
@@ -126,7 +148,8 @@
            public List<int> cntrType { get; set; }  // 容器类型 1.胎面;2.胎侧;3.内衬;4.帘布;5.环带;6.冠带;7.钢包
        }
        public class deviceInfo {
        public class CarDeviceInfo
        {
            public string address { get; set; }
            public string deviceName { get; set; }
            public string deviceNo { get; set; }