예제 #1
0
        /// <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);
        }
예제 #2
0
        /// <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());
        }
예제 #3
0
        /// <summary>
        /// 获取任务工作文件
        /// </summary>
        /// <param name="filter">查询条件</param>
        /// <returns></returns>
        public JobFileDto GetJobFile(JobFileFilterDto filter)
        {
            var jobFile = JobFileDomainService.GetJobFile(CreateQueryObject(filter));

            return(jobFile.MapTo <JobFileDto>());
        }
예제 #4
0
        /// <summary>
        /// 获取任务工作文件分页
        /// </summary>
        /// <param name="filter">查询条件</param>
        /// <returns></returns>
        public IPaging <JobFileDto> GetJobFilePaging(JobFileFilterDto filter)
        {
            var jobFilePaging = JobFileDomainService.GetJobFilePaging(CreateQueryObject(filter));

            return(jobFilePaging.ConvertTo <JobFileDto>());
        }
예제 #5
0
 /// <summary>
 /// 获取任务工作文件分页
 /// </summary>
 /// <param name="filter">查询条件</param>
 /// <returns></returns>
 public IPaging <JobFileDto> GetJobFilePaging(JobFileFilterDto filter)
 {
     return(jobFileBusiness.GetJobFilePaging(filter));
 }
예제 #6
0
 /// <summary>
 /// 获取任务工作文件列表
 /// </summary>
 /// <param name="filter">查询条件</param>
 /// <returns></returns>
 public List <JobFileDto> GetJobFileList(JobFileFilterDto filter)
 {
     return(jobFileBusiness.GetJobFileList(filter));
 }
예제 #7
0
 /// <summary>
 /// 获取任务工作文件
 /// </summary>
 /// <param name="filter">查询条件</param>
 /// <returns></returns>
 public JobFileDto GetJobFile(JobFileFilterDto filter)
 {
     return(jobFileBusiness.GetJobFile(filter));
 }