From 3fac3fde950fac3057e5766fa350f20d454b53a0 Mon Sep 17 00:00:00 2001 From: czw <selecti@yeah.net> Date: 星期一, 14 七月 2025 11:38:54 +0800 Subject: [PATCH] 1 --- 2025年6月12日/AuxAllWCS/Build/Project/代码/VS自定义类/AutoThread.cs | 73 ++++++++++++++++++++++-------------- 1 files changed, 44 insertions(+), 29 deletions(-) diff --git "a/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/VS\350\207\252\345\256\232\344\271\211\347\261\273/AutoThread.cs" "b/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/VS\350\207\252\345\256\232\344\271\211\347\261\273/AutoThread.cs" index a5f4a54..aafd1d1 100644 --- "a/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/VS\350\207\252\345\256\232\344\271\211\347\261\273/AutoThread.cs" +++ "b/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/VS\350\207\252\345\256\232\344\271\211\347\261\273/AutoThread.cs" @@ -137,35 +137,35 @@ { try { - foreach (var ip in new List<string> { - device1.p鍙戦偅绉�涓嬬嚎.Config.IP, - device1.p鍙戦偅绉�涓嬬嚎.Config.IP, - device1.D瀹氬瓙1鍙锋満姊版墜.Config.IP, - device1.D瀹氬瓙2鍙锋満姊版墜.Config.IP, - device1.Js鎹烽『1.Config.IP, - device1.Js鎹烽『2.Config.IP, - device1.缁村笇灏旀姄鑷�.Config.IP, - device1.缁村笇灏旀姄鑷�.Config.IP, - device1.RGV.Config.IP, - device1.S1002Read.Config.IP, - device1.S2001Read.Config.IP, - device1.S3001Read.Config.IP - }) - { - string pattern = @"\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b"; + // foreach (var ip in new List<string> { + // device1.p鍙戦偅绉�涓嬬嚎.Config.IP, + // device1.p鍙戦偅绉�涓嬬嚎.Config.IP, + // device1.D瀹氬瓙1鍙锋満姊版墜.Config.IP, + // device1.D瀹氬瓙2鍙锋満姊版墜.Config.IP, + // device1.Js鎹烽『1.Config.IP, + // device1.Js鎹烽『2.Config.IP, + // device1.缁村笇灏旀姄鑷�.Config.IP, + // device1.缁村笇灏旀姄鑷�.Config.IP, + // device1.RGV.Config.IP, + // device1.S1002Read.Config.IP, + // device1.S2001Read.Config.IP, + // device1.S3001Read.Config.IP + //}) + // { + // string pattern = @"\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b"; - var matches = Regex.Match(ip, pattern); - if (matches.Success) - { - var b = IsMachineOnline(matches.Value); - if (!Iponlines.ContainsKey(ip)) - { - Iponlines.TryAdd(ip, b); - } - else - Iponlines[ip] = b; - } - } + // var matches = Regex.Match(ip, pattern); + // if (matches.Success) + // { + // var b = IsMachineOnline(matches.Value); + // if (!Iponlines.ContainsKey(ip)) + // { + // Iponlines.TryAdd(ip, b); + // } + // else + // Iponlines[ip] = b; + // } + // } } catch (Exception ex) { @@ -1599,6 +1599,11 @@ public void ThreadEdown(Tag tag) { Console.WriteLine($"ThreadEdown 20 23 = 绌轰笅妫�祴 =================> "); + if (tag.RGV.R鍏呯數鐘舵� == 1 || tag.RGV.R鎵嬪姩1鑷姩2 == 1 || tag.RGV.RgvrunError > 0) + { + LogHelper.Info($"RGV 鎵嬪姩||鏁呴殰||鍏呯數锛岀┖涓嬫娴嬬粓姝€�"); + return; + } TaskRepository taskRepository = new TaskRepository(); foreach (var Bssx in new string[] { "1020", "1023" }) { @@ -1705,7 +1710,12 @@ public void ThreadDdown(Tag tag) { - Console.WriteLine($"ThreadDdown 08 10 ==================> 1026"); + Console.WriteLine($"ThreadDdown 08 16==================> 1026"); + if (tag.RGV.R鍏呯數鐘舵� == 1 || tag.RGV.R鎵嬪姩1鑷姩2 == 1 || tag.RGV.RgvrunError > 0) + { + LogHelper.Info($"RGV 鎵嬪姩||鏁呴殰||鍏呯數锛�8 16 > 1026缁堟銆�); + return; + } TaskRepository taskRepository = new TaskRepository(); foreach (var Bssx in new string[] { "1008", "1016" }) { @@ -1777,6 +1787,11 @@ public void Thread0210Down(Tag tag) { Console.WriteLine($"Thread0210Down ==================>"); + if (tag.RGV.R鍏呯數鐘舵� == 1 || tag.RGV.R鎵嬪姩1鑷姩2 == 1 || tag.RGV.RgvrunError > 0) + { + LogHelper.Info($"RGV 鎵嬪姩||鏁呴殰||鍏呯數锛�2 10 > 1017缁堟銆�); + return; + } TaskRepository taskRepository = new TaskRepository(); foreach (var Bssx in new string[] { "1002", "1010" }) { -- Gitblit v1.9.1