From 17e4c7e3e7b3ef60d9da6de3b2a39a14a53c38a0 Mon Sep 17 00:00:00 2001 From: z8018 <1282578289@qq.com> Date: 星期三, 12 三月 2025 14:11:33 +0800 Subject: [PATCH] 1 --- WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/DeviceInfoService.cs | 27 +++++++++++++++++++++++++-- 1 files changed, 25 insertions(+), 2 deletions(-) diff --git a/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/DeviceInfoService.cs b/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/DeviceInfoService.cs index 66343d8..0eaf755 100644 --- a/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/DeviceInfoService.cs +++ b/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/DeviceInfoService.cs @@ -16,14 +16,16 @@ #endregion << 鐗� 鏈� 娉� 閲� >> using AutoMapper; +using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +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; @@ -31,19 +33,40 @@ namespace WIDESEAWCS_QuartzJob.Service { + /// <summary> + /// 璁惧淇℃伅涓氬姟灞� + /// </summary> public class DeviceInfoService : ServiceBase<Dt_DeviceInfo, IDeviceInfoRepository>, IDeviceInfoService { private readonly IUnitOfWorkManage _unitOfWorkManage; private readonly IMapper _mapper; + + /// <summary> + /// 璁惧淇℃伅涓氬姟灞� + /// </summary> public DeviceInfoService(IDeviceInfoRepository BaseDal, IUnitOfWorkManage unitOfWorkManage, IMapper mapper) : base(BaseDal) { _unitOfWorkManage = unitOfWorkManage; _mapper = mapper; } + /// <summary> + /// 娣诲姞鏁版嵁 + /// </summary> + /// <param name="saveModel"></param> + /// <returns></returns> + public override WebResponseContent AddData(SaveModel saveModel) + { + 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