林豪 左 1 سال پیش
والد
کامیت
9ac9a5d6e9
1فایلهای تغییر یافته به همراه23 افزوده شده و 18 حذف شده
  1. 23 18
      WCS.WorkEngineering/WorkStart.cs

+ 23 - 18
WCS.WorkEngineering/WorkStart.cs

@@ -265,7 +265,7 @@ namespace WCS.WorkEngineering
             {
                 new(new [] { "2532", "2732" }, "10.30.37.89"),
                 new(new [] { "2932", "3132" }, "10.30.37.97"),
-                //new(new [] { "2532", "2732" }, "10.30.37.105"),
+                new(new [] { "3332", "3532" }, "10.30.37.105"),
                 new(new [] {"RGV1"},"10.30.37.113"),
                 new(new [] {"RGV2"},"10.30.37.118"),
                 new(new [] {"RGV3"},"10.30.37.123"),
@@ -289,23 +289,28 @@ namespace WCS.WorkEngineering
 
             #region 外检信息
 
-            List<ShapeInfo> shapeInfo = new List<ShapeInfo>
-            {
-                new ShapeInfo(new int[] { 2732,2532 }, "10.30.37.89"),
-                new ShapeInfo(new int[] { 2932, 3132 }, "10.30.37.97"),
-                //new ShapeInfo(new int[] { 2732,2532 }, "10.30.37.105")
-            };
+            var conv1 = Device.All.FirstOrDefault(x => x.Code == "2532");
+            conv1.AddFlag(DeviceFlags.外检);
+            conv1.AddProtocol<IStation91>(714, 91, "10.30.37.89");
 
-            foreach (var item in shapeInfo)
-            {
-                for (int i = 0; i < item.DeviceNo.Length; i++)
-                {
-                    var conv = Device.All.FirstOrDefault(x => x.Code == item.DeviceNo[i].ToString());
-                    conv.AddFlag(DeviceFlags.外检);
-                    int pos = i * 14;
-                    conv.AddProtocol<IStation91>(pos, 91, item.Ip);
-                }
-            }
+            var conv2 = Device.All.FirstOrDefault(x => x.Code == "2732");
+            conv2.AddFlag(DeviceFlags.外检);
+            conv2.AddProtocol<IStation91>(1274, 91, "10.30.37.89");
+
+            conv1 = Device.All.FirstOrDefault(x => x.Code == "2932");
+            conv1.AddFlag(DeviceFlags.外检);
+            conv1.AddProtocol<IStation91>(714, 91, "10.30.37.97");
+
+            conv2 = Device.All.FirstOrDefault(x => x.Code == "3132");
+            conv2.AddFlag(DeviceFlags.外检);
+            conv2.AddProtocol<IStation91>(1274, 91, "10.30.37.97");
+
+            conv1 = Device.All.FirstOrDefault(x => x.Code == "3332");
+            conv1.AddFlag(DeviceFlags.外检);
+            conv1.AddProtocol<IStation91>(714, 91, "10.30.37.105");
+            conv2 = Device.All.FirstOrDefault(x => x.Code == "3532");
+            conv2.AddFlag(DeviceFlags.外检);
+            conv2.AddProtocol<IStation91>(1274, 91, "10.30.37.105");
 
             #endregion 外检信息
 
@@ -530,4 +535,4 @@ namespace WCS.WorkEngineering
 
         public T EndCode { get; set; }
     }
-}
+}