From 6cc35000a6e138cfad96e7b02f8aeddcdb4ba6bf Mon Sep 17 00:00:00 2001
From: wankeda <Administrator@DESKTOP-HAU3ST3>
Date: 星期二, 24 六月 2025 09:57:25 +0800
Subject: [PATCH] 代码提交

---
 代码管理/NEWCode/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Dt_StationinfoService.cs |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/NEWCode/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Dt_StationinfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/NEWCode/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Dt_StationinfoService.cs"
index 0c7e906..f29839e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/NEWCode/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Dt_StationinfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/NEWCode/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Dt_StationinfoService.cs"
@@ -3,6 +3,10 @@
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using Newtonsoft.Json;
+using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
+using SqlSugar.Extensions;
+using WIDESEAWCS_Core;
 using WIDESEAWCS_Core.BaseServices;
 using WIDESEAWCS_ISystemRepository;
 using WIDESEAWCS_ISystemServices;
@@ -10,10 +14,37 @@
 
 namespace WIDESEAWCS_SystemServices
 {
+
     public class Dt_StationinfoService : ServiceBase<Dt_Stationinfo, IDt_StationinfoRepository>, IDt_StationinfoService
     {
+        public class Parm
+        {
+            public List<string> data { get; set; }
+            public bool type { get; set; }
+        }
         public Dt_StationinfoService(IDt_StationinfoRepository BaseDal) : base(BaseDal)
         {
         }
+
+        public WebResponseContent SetStationEnable(object parm)
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                var data = JsonConvert.DeserializeObject<Parm>(parm.ToString());
+                var res = BaseDal.QueryFirst(x => data.data.Contains(x.Id.ToString()));
+                res.Enable = data.type.ObjToBool();
+                var isTrue = BaseDal.UpdateData(res);
+                if (isTrue)
+                {
+                    content.OK("缂撳瓨鏋剁姸鎬佹洿鏂版垚鍔�");
+                }
+            }
+            catch (Exception ex)
+            {
+                content.Error(ex.Message);
+            }
+            return content;
+        }
     }
 }

--
Gitblit v1.9.3