From 4683c8a19e593e8f999c6f1a145e0bb73eb20dea Mon Sep 17 00:00:00 2001 From: chengsc <Demo@DESKTOP-CPA90BF> Date: 星期四, 12 九月 2024 08:17:12 +0800 Subject: [PATCH] 解决冲突 --- Admin.NET/WCS.Application/PLC/PLCCommon.cs | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Admin.NET/WCS.Application/PLC/PLCCommon.cs b/Admin.NET/WCS.Application/PLC/PLCCommon.cs index 6aca413..8b64865 100644 --- a/Admin.NET/WCS.Application/PLC/PLCCommon.cs +++ b/Admin.NET/WCS.Application/PLC/PLCCommon.cs @@ -1,4 +1,5 @@ -锘縰sing Microsoft.AspNetCore.SignalR; +锘縰sing Elastic.Clients.Elasticsearch.Tasks; +using Microsoft.AspNetCore.SignalR; using RazorEngine.Compilation.ImpromptuInterface.Dynamic; using System; using System.Collections.Generic; @@ -215,33 +216,32 @@ /// </summary> /// <param name="startStation"></param> /// <returns></returns> - public static PlcTaskInfo GetPlcIp(string startStation) + public static PLCUtil GetPlcIp(string startStation) { - PlcTaskInfo taskInfo = new PlcTaskInfo(); - + string strIp = ""; var conveyList1 = new List<string>() { "147", "145", "139", "137", "129", "127", "121", "119", "111", "109", "103", "101", "093", "091", "085", "083", "075", "073", "067", "065" }; var conveyList2 = new List<string>() { "252", "254", "260", "262", "272", "272", "278", "280", "288", "290", "294", "301", "307", "309", "315", "317", "325", "327", "331", "337" }; var conveyList3 = new List<string>() { "401", "402", "405", "406", "409", "410", "413", "414", "417", "418", "421", "422", "425", "426", "429", "430", "433", "434", "437", "438" }; if (conveyList1.Contains(startStation)) { - taskInfo.Ip = "10.18.51.110"; + strIp = "10.18.51.110"; } else if (conveyList2.Contains(startStation)) { - taskInfo.Ip = "10.18.51.120"; + strIp = "10.18.51.120"; } else if (conveyList3.Contains(startStation)) { - taskInfo.Ip = "10.18.51.130"; + strIp = "10.18.51.130"; } else { - throw new Exception("宸ヤ綅鏈煡璇㈠埌"); + throw Oops.Bah("宸ヤ綅鏈煡璇㈠埌"); } - - return taskInfo; + var plcConveyorConn = PLCTaskAction.listPlcConn.First(m => m.PlcIP == strIp); + return plcConveyorConn; } /// <summary> -- Gitblit v1.8.0