From 807dfe60e65b9790014c0029dbe46381f959b145 Mon Sep 17 00:00:00 2001 From: hutongqing <hutongqing@hnkhzn.com> Date: 星期四, 31 十月 2024 17:29:35 +0800 Subject: [PATCH] Create OmronEtherNetCommunicator.cs --- WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/DispatchInfoService.cs | 31 ++++++++++++++++++++++++++----- 1 files changed, 26 insertions(+), 5 deletions(-) diff --git a/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/DispatchInfoService.cs b/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/DispatchInfoService.cs index 1e4180e..5c694aa 100644 --- a/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/DispatchInfoService.cs +++ b/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/DispatchInfoService.cs @@ -41,12 +41,13 @@ _deviceInfoRepository = deviceInfoRepository; } + /// <summary> + /// 鏌ヨ璋冨害鏈嶅姟Job涓庡搴旂殑璁惧淇℃伅銆� + /// </summary> + /// <returns>杩斿洖璋冨害鏈嶅姟JobDTO闆嗗悎銆�</returns> public List<DispatchInfoDTO> QueryDispatchInfos() { - List<Dt_DispatchInfo> dispatchInfos = BaseDal.QueryData(); - List<Dt_DeviceInfo> deviceInfos = _deviceInfoRepository.QueryData(); - - return Db.Queryable<Dt_DispatchInfo, Dt_DeviceInfo>((a, b) => a.JobGroup == b.DeviceType && b.DeviceStatus == ((int)DeviceStatusEnum.Enable).ToString()).Select((a, b) => new DispatchInfoDTO + return Db.Queryable<Dt_DispatchInfo>().LeftJoin<Dt_DeviceInfo>((a, b) => a.JobGroup == b.DeviceType).Select((a, b) => new DispatchInfoDTO { JobGroup = a.JobGroup, AssemblyName = a.AssemblyName, @@ -62,8 +63,28 @@ ModifyDate = a.ModifyDate, Name = a.Name, Remark = a.Remark, - DeviceStatus = b.DeviceType + DeviceType = b.DeviceType, + Enable = (b.DeviceStatus) ?? (((int)DeviceStatusEnum.Enable).ToString()) }).ToList(); + + //return Db.Queryable<Dt_DispatchInfo, Dt_DeviceInfo>((a, b) => a.JobGroup == b.DeviceType && b.DeviceStatus == ((int)DeviceStatusEnum.Enable).ToString()).Select((a, b) => new DispatchInfoDTO + //{ + // JobGroup = a.JobGroup, + // AssemblyName = a.AssemblyName, + // BeginTime = a.BeginTime, + // ClassName = a.ClassName, + // CreateDate = a.CreateDate, + // Creater = a.Creater, + // CycleHasRunTimes = 0, + // EndTime = a.EndTime, + // Id = b.Id, + // IntervalSecond = a.IntervalSecond, + // Modifier = a.Modifier, + // ModifyDate = a.ModifyDate, + // Name = a.Name, + // Remark = a.Remark, + // DeviceType = b.DeviceType + //}).ToList(); } } } -- Gitblit v1.9.3