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/DispatchInfoService.cs | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/DispatchInfoService.cs b/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/DispatchInfoService.cs index 673bbda..f40cc54 100644 --- a/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/DispatchInfoService.cs +++ b/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/DispatchInfoService.cs @@ -31,10 +31,17 @@ namespace WIDESEAWCS_QuartzJob.Service { + /// <summary> + /// 璋冨害鏈嶅姟閰嶇疆涓氬姟灞� + /// </summary> public class DispatchInfoService : ServiceBase<Dt_DispatchInfo, IDispatchInfoRepository>, IDispatchInfoService { private readonly IUnitOfWorkManage _unitOfWorkManage; private readonly IDeviceInfoRepository _deviceInfoRepository; + + /// <summary> + /// 璋冨害鏈嶅姟閰嶇疆涓氬姟灞� + /// </summary> public DispatchInfoService(IDispatchInfoRepository BaseDal, IUnitOfWorkManage unitOfWorkManage, IDeviceInfoRepository deviceInfoRepository) : base(BaseDal) { _unitOfWorkManage = unitOfWorkManage; @@ -47,7 +54,7 @@ /// <returns>杩斿洖璋冨害鏈嶅姟JobDTO闆嗗悎銆�</returns> public List<DispatchInfoDTO> QueryDispatchInfos() { - return Db.Queryable<Dt_DispatchInfo>().LeftJoin<Dt_DeviceInfo>((a, b) => a.JobGroup == b.DeviceType).Select((a, b) => new DispatchInfoDTO + return Db.Queryable<Dt_DispatchInfo>().LeftJoin<Dt_DeviceInfo>((a, b) => a.Id == b.DispatchId).Select((a, b) => new DispatchInfoDTO { JobGroup = a.JobGroup, AssemblyName = a.AssemblyName, @@ -65,7 +72,7 @@ Remark = a.Remark, DeviceType = b.DeviceType, Enable = (b.DeviceStatus) ?? (((int)DeviceStatusEnum.Enable).ToString()) - }).ToList(); + }).ToList().Where(b => b.Enable == ((int)DeviceStatusEnum.Enable).ToString()).ToList(); } } } -- Gitblit v1.9.3