1
hutongqing
2025-01-02 8c6fd742db249ad4cc819cf041eb98d880a3ef73
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();
        }
    }
}