hutongqing
2024-09-03 9ffd50c8ed26e0be4ccdb500f261132c19600e96
WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/DispatchInfoService.cs
@@ -41,11 +41,12 @@
            _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
            {
                JobGroup = a.JobGroup,
@@ -62,7 +63,7 @@
                ModifyDate = a.ModifyDate,
                Name = a.Name,
                Remark = a.Remark,
                DeviceStatus = b.DeviceType
                DeviceType = b.DeviceType
            }).ToList();
        }
    }