From cd5a8566240658de52502a22f78b4c6652382357 Mon Sep 17 00:00:00 2001
From: czw <selecti@yeah.net>
Date: 星期五, 25 七月 2025 17:30:52 +0800
Subject: [PATCH] 1

---
 2025年6月12日/AuxAllWCS/Build/Project/代码/界面事件.cs |   65 ++++++++------------------------
 1 files changed, 16 insertions(+), 49 deletions(-)

diff --git "a/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/\347\225\214\351\235\242\344\272\213\344\273\266.cs" "b/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/\347\225\214\351\235\242\344\272\213\344\273\266.cs"
index abc1e3e..910d336 100644
--- "a/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/\347\225\214\351\235\242\344\272\213\344\273\266.cs"
+++ "b/2025\345\271\2646\346\234\21012\346\227\245/AuxAllWCS/Build/Project/\344\273\243\347\240\201/\347\225\214\351\235\242\344\272\213\344\273\266.cs"
@@ -28,8 +28,6 @@
 using GZ.DB.Repository.OIDATABASE;
 using GZ.DB.IRepository.OIDATABASE;
 using GZ.DB.Entity.OIDATABASE;
-using static GZ.Projects.AuxAllWCS.ToWMSMES.CreateTask;
-using GZ.Device.PLC;
 namespace GZ.Projects.AuxAllWCS
 {
     /// <summary>
@@ -65,14 +63,6 @@
             }
             View1_Init(sender, e);
 
-            //var path = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Configs");
-            //string text = File.ReadAllText(configPath);
-            //PlcConfig plcConfig = JsonConvert.DeserializeObject<PlcConfig>(text);
-            //if (plcConfig != null && FactoryMap.ContainsKey((int)plcConfig.Brand) && FactoryMap[(int)plcConfig.Brand].Contains((int)plcConfig.Comm))
-            //{
-
-            //}
-            Console.Write(path);
             /// <summary>
             /// 绋嬪簭鐗囨:鍒濆鍖栭厤缃�             /// 鎻忚堪:
@@ -820,8 +810,16 @@
                     {
                         #region    [鑴氭湰][20250323151832119][涓氬姟閫昏緫.Ipping]
 
-                        //var hkr = AutoThread.InvokeMethod(AutoThread.Instance, "IsMachineOnline", new object[] { "192.168.1.103", 1000 });
-                        //Console.WriteLine("192.168.1.103 > " + hkr.ToString());
+                        //LogHelper.Info($"<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>");
+                        //LogHelper.Info($"<<<<<<<<<<<<<<<<<绋嬪簭路鍚姩>>>>>>>>>>>>>>");
+
+                        //// 浣跨敤鎷︽埅鍣�+                        //var interceptor = new ConsoleInterceptor();
+                        //Console.SetOut(interceptor);
+
+                        //LogHelper.Info($"<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>");
+                        //AnsiConsole.Markup("[underline red]Hello[/] World!");
+                        // AnsiConsole.Markup("[underline red]Hello[/] World!");
                         #endregion [鑴氭湰][20250323151832119][涓氬姟閫昏緫.Ipping]
                     }
                     catch (Exception ex)
@@ -985,6 +983,9 @@
                     Device.A3005鍙栬揣浜や簰?.Stop();
                     Device.A3006鏀捐揣浜や簰?.Stop();
                     Device.A3010鍙栬揣浜や簰?.Stop();
+                    Device.S2008Read?.Stop();
+                    Device.Z杞瓙1鍙锋満姊版墜?.Stop();
+                    Device.Z杞瓙2鍙锋満姊版墜?.Stop();
                 }
                 catch (Exception ex)
                 {
@@ -1054,6 +1055,9 @@
                         || (Device.A3005鍙栬揣浜や簰 == null ? false : Device.A3005鍙栬揣浜や簰.State != GZ.Device.PLC.PlcRunState.Stoped)
                         || (Device.A3006鏀捐揣浜や簰 == null ? false : Device.A3006鏀捐揣浜や簰.State != GZ.Device.PLC.PlcRunState.Stoped)
                         || (Device.A3010鍙栬揣浜や簰 == null ? false : Device.A3010鍙栬揣浜や簰.State != GZ.Device.PLC.PlcRunState.Stoped)
+                        || (Device.S2008Read == null ? false : Device.S2008Read.State != GZ.Device.PLC.PlcRunState.Stoped)
+                        || (Device.Z杞瓙1鍙锋満姊版墜 == null ? false : Device.Z杞瓙1鍙锋満姊版墜.State != GZ.Device.PLC.PlcRunState.Stoped)
+                        || (Device.Z杞瓙2鍙锋満姊版墜 == null ? false : Device.Z杞瓙2鍙锋満姊版墜.State != GZ.Device.PLC.PlcRunState.Stoped)
                     )
                     {
                         System.Threading.Thread.Sleep(1000);
@@ -1227,43 +1231,6 @@
                                         var model = JsonConvert.DeserializeObject<ToWMSMES.CreateTask>(requestJson);
                                         var res = ToWMSMES.CreateTask.CreatePointTask(model);
                                         return JsonConvert.SerializeObject(res);
-                                    }
-                                case "/api/Wcs/initZZCache":
-                                    {
-                                        statusCode = System.Net.HttpStatusCode.OK;
-
-                                        var rturn = new ReturnMsg
-                                        {
-                                            resultCode = 0,
-                                            resultMsg = ""
-                                        };
-                                        try
-                                        {
-                                            LocRepository locRepository = new LocRepository();
-                                            foreach (var item in Settings.deviceInfos.FindAll(x => x.deviceType == 2))
-                                            {
-                                                foreach (var ssloc in item.deviceNo)
-                                                {
-                                                    var ssl = locRepository.FindEntity(x => x.S_LOC_CODE == ssloc);
-                                                    if (ssl != null && (ssl.N_CURRENT_NUM > 0 || ssl.S_LOCK_STATE != "鏃�))
-                                                    {
-                                                        ssl.N_CURRENT_NUM = 0;
-                                                        ssl.S_LOCK_STATE = "鏃�;
-                                                        locRepository.Update(ssl);
-                                                    }
-                                                }
-                                            }
-                                        }
-                                        catch (Exception ex)
-                                        {
-                                            LogHelper.Error("/api/Wcs/initZZCache" + requestJson + ex.Message, ex);
-                                            return JsonConvert.SerializeObject(new ReturnMsg
-                                            {
-                                                resultCode = -1,
-                                                resultMsg = ex.Message
-                                            });
-                                        }
-                                        return JsonConvert.SerializeObject(rturn);
                                     }
                             }
                             break;

--
Gitblit v1.9.1