| | |
| | | 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 int port { get; set; } |
| | | public static string WHCode { get; set; } |
| | | public static string FacCode { get; set; } |
| | |
| | | { |
| | | areaPropertyList = JsonConvert.DeserializeObject<List<AreaProperty>>(keyValue.Value.ToString()); |
| | | } |
| | | if (keyValue.Name == "AreaRelevance") |
| | | { |
| | | areaRelevanceList = JsonConvert.DeserializeObject<List<AreaRelevance>>(keyValue.Value.ToString()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | return areaPropertyList.Where(a => a.cntrType.Contains(cntrType)).Select(a => a.areaCode).ToList(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 查询存储库区 |
| | | /// </summary> |
| | | /// <param name="areaCode"></param> |
| | | /// <returns></returns> |
| | | public static List<string> getRelAreaCodes(string areaCode) |
| | | { |
| | | List<string> areaCodes = new List<string>(); |
| | | var areaRelevance = areaRelevanceList.Where(a => a.areaCode == areaCode).FirstOrDefault(); |
| | | if (areaRelevance != null) |
| | | { |
| | | areaCodes = areaRelevance.relAreaCode; |
| | | } |
| | | return areaCodes; |
| | | } |
| | | |
| | | public class AreaRelevance |
| | | { |
| | | public string areaCode { get; set; } |
| | | public List<string> relAreaCode { get; set; } |
| | | } |
| | | |
| | | public class AreaProperty |
| | | { |
| | | public string areaName { get; set; } |
| | | public string areaCode { get; set; } |
| | | public List<int> cntrType { get; set; } // 容器类型 1.胎面;2.胎侧;3.内衬;4.帘布;5.环带;6.冠带;7.钢包 |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | public class deviceInfo { |
| | | public string address { get; set; } |