/// <summary> /// 根据查询条件生成查询对象 /// </summary> /// <param name="filter">查询条件</param> /// <returns></returns> IQuery CreateQueryObject(JobFileFilterDto filter) { if (filter == null) { return(null); } IQuery query = QueryFactory.Create <JobFileQuery>(filter); if (!filter.Ids.IsNullOrEmpty()) { query.In <JobFileQuery>(c => c.Id, filter.Ids); } if (!filter.Job.IsNullOrEmpty()) { query.Equal <JobFileQuery>(c => c.Job, filter.Job); } if (!filter.FileName.IsNullOrEmpty()) { query.Equal <JobFileQuery>(c => c.FileName, filter.FileName); } if (!filter.FilePath.IsNullOrEmpty()) { query.Equal <JobFileQuery>(c => c.FilePath, filter.FilePath); } if (filter.CreateDate.HasValue) { query.Equal <JobFileQuery>(c => c.CreateDate, filter.CreateDate.Value); } return(query); }
/// <summary> /// 获取任务工作文件列表 /// </summary> /// <param name="filter">查询条件</param> /// <returns></returns> public List <JobFileDto> GetJobFileList(JobFileFilterDto filter) { var jobFileList = JobFileDomainService.GetJobFileList(CreateQueryObject(filter)); return(jobFileList.Select(c => c.MapTo <JobFileDto>()).ToList()); }
/// <summary> /// 获取任务工作文件 /// </summary> /// <param name="filter">查询条件</param> /// <returns></returns> public JobFileDto GetJobFile(JobFileFilterDto filter) { var jobFile = JobFileDomainService.GetJobFile(CreateQueryObject(filter)); return(jobFile.MapTo <JobFileDto>()); }
/// <summary> /// 获取任务工作文件分页 /// </summary> /// <param name="filter">查询条件</param> /// <returns></returns> public IPaging <JobFileDto> GetJobFilePaging(JobFileFilterDto filter) { var jobFilePaging = JobFileDomainService.GetJobFilePaging(CreateQueryObject(filter)); return(jobFilePaging.ConvertTo <JobFileDto>()); }
/// <summary> /// 获取任务工作文件分页 /// </summary> /// <param name="filter">查询条件</param> /// <returns></returns> public IPaging <JobFileDto> GetJobFilePaging(JobFileFilterDto filter) { return(jobFileBusiness.GetJobFilePaging(filter)); }
/// <summary> /// 获取任务工作文件列表 /// </summary> /// <param name="filter">查询条件</param> /// <returns></returns> public List <JobFileDto> GetJobFileList(JobFileFilterDto filter) { return(jobFileBusiness.GetJobFileList(filter)); }
/// <summary> /// 获取任务工作文件 /// </summary> /// <param name="filter">查询条件</param> /// <returns></returns> public JobFileDto GetJobFile(JobFileFilterDto filter) { return(jobFileBusiness.GetJobFile(filter)); }