From ea0628889f64f802768c4fdf17d2223424e5e29f Mon Sep 17 00:00:00 2001
From: hutongqing <hutongqing@hnkhzn.com>
Date: 星期三, 30 十月 2024 11:13:22 +0800
Subject: [PATCH] 1

---
 WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/DeviceInfoService.cs |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/DeviceInfoService.cs b/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/DeviceInfoService.cs
index f623146..f6551e1 100644
--- a/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/DeviceInfoService.cs
+++ b/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/DeviceInfoService.cs
@@ -16,6 +16,7 @@
 #endregion << 鐗� 鏈� 娉� 閲� >>
 
 using AutoMapper;
+using Newtonsoft.Json;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -24,7 +25,7 @@
 using WIDESEAWCS_Core;
 using WIDESEAWCS_Core.BaseRepository;
 using WIDESEAWCS_Core.BaseServices;
-
+using WIDESEAWCS_Core.Helper;
 using WIDESEAWCS_QuartzJob.DeviceEnum;
 using WIDESEAWCS_QuartzJob.DTO;
 using WIDESEAWCS_QuartzJob.Models;
@@ -47,9 +48,13 @@
             return base.AddData(saveModel);
         }
 
+        /// <summary>
+        /// 鏌ヨ璁惧浠ュ強瀵瑰簲鐨勫崗璁俊鎭��
+        /// </summary>
+        /// <returns>杩斿洖璁惧淇℃伅浠ュ強瀵瑰簲鍗忚淇℃伅鐨勯泦鍚堛��</returns>
         public async Task<List<DeviceInfoDTO>> QueryDeviceProInfos()
         {
-            List<Dt_DeviceInfo> deviceInfos = await Db.Queryable<Dt_DeviceInfo>().Where(x => true).Includes(x => x.ProtocolList).ToListAsync();
+            List<Dt_DeviceInfo> deviceInfos = await Db.Queryable<Dt_DeviceInfo>().Where(x => x.DeviceStatus == ((int)DeviceStatusEnum.Enable).ToString()).Includes(x => x.ProtocolList).ToListAsync();
             return _mapper.Map<List<DeviceInfoDTO>>(deviceInfos);
         }
     }

--
Gitblit v1.9.3