From b9c76ce85e533250cd36de670146530f970859e7 Mon Sep 17 00:00:00 2001
From: yanjinhui <3306209981@qq.com>
Date: 星期五, 01 八月 2025 11:29:49 +0800
Subject: [PATCH] 修改伸缩杆接口

---
 项目代码/后端/后台管理/WIDESEAWCS_Server/WIDESEAWCS_TelescopicService/AlarmResetHsyServer.cs |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/\345\220\216\347\253\257/\345\220\216\345\217\260\347\256\241\347\220\206/WIDESEAWCS_Server/WIDESEAWCS_TelescopicService/AlarmResetHsyServer.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/\345\220\216\347\253\257/\345\220\216\345\217\260\347\256\241\347\220\206/WIDESEAWCS_Server/WIDESEAWCS_TelescopicService/AlarmResetHsyServer.cs"
index 2bbe0da..c4dce3e 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/\345\220\216\347\253\257/\345\220\216\345\217\260\347\256\241\347\220\206/WIDESEAWCS_Server/WIDESEAWCS_TelescopicService/AlarmResetHsyServer.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/\345\220\216\347\253\257/\345\220\216\345\217\260\347\256\241\347\220\206/WIDESEAWCS_Server/WIDESEAWCS_TelescopicService/AlarmResetHsyServer.cs"
@@ -84,7 +84,7 @@
         /// <returns></returns>
         public WebResponseContent BecomeTrue()
         {
-            var query = BaseDal.QueryData(x => x.ResetStatus == true).ToList();
+            var query = BaseDal.QueryData(x => x.ResetStatus == true&&x.AlarmContent.Contains("闅滅")).ToList();
             // 濡傛灉娌℃湁鎵惧埌绗﹀悎鏉′欢鐨勬暟鎹�
             if (query.Count == 0)
             {
@@ -102,15 +102,30 @@
                     try
                     {
                         devices.Value.left.Communicator.Write<bool>("M105", true);
+                        var left = devices.Value.left.Communicator.Write<bool>("M105", true); //閲嶅惎鎶ヨ澶嶄綅
+                                                                                              // 绛夊緟3绉�
+                        Thread.Sleep(1000);
+                        if (devices.Value.left.Communicator.Read<bool>("M109") || devices.Value.left.Communicator.Read<bool>("M111") || devices.Value.left.Communicator.Read<bool>("M110"))
+                        {
+                            devices.Value.left.Communicator.Write<bool>("M105", true); //閲嶅惎鎶ヨ澶嶄綅
+                            return WebResponseContent.Instance.Error("澶嶄綅澶辫触锛岃閲嶆柊妫�鏌ュ悗閲嶆柊澶嶄綅锛堝锛氭�ュ仠鎸夐挳鏄惁鏉惧紑锛�");
+                        }
                     }
+
                     catch (Exception)
                     {
 
-                       
+
                     }
                     try
                     {
                         devices.Value.right.Communicator.Write<bool>("M105", true);
+                        Thread.Sleep(1000);
+                        if (devices.Value.right.Communicator.Read<bool>("M109") || devices.Value.right.Communicator.Read<bool>("M111") || devices.Value.right.Communicator.Read<bool>("M110"))
+                        {
+                            devices.Value.right.Communicator.Write<bool>("M105", true);
+                            return WebResponseContent.Instance.Error("澶嶄綅澶辫触锛岃閲嶆柊妫�鏌ュ悗閲嶆柊澶嶄綅锛堝锛氭�ュ仠鎸夐挳鏄惁鏉惧紑锛�");
+                        }
                     }
                     catch (Exception)
                     {

--
Gitblit v1.9.3