diff --git a/IRaCIS.Core.API/Controllers/InspectionController.cs b/IRaCIS.Core.API/Controllers/InspectionController.cs index 67d828d28..d6780e274 100644 --- a/IRaCIS.Core.API/Controllers/InspectionController.cs +++ b/IRaCIS.Core.API/Controllers/InspectionController.cs @@ -219,7 +219,6 @@ namespace IRaCIS.Core.API.Controllers [UnitOfWork] public async Task DeletePreviousHistory(DataInspectionDto opt) { - var fun = _clinicalDataService.DeletePreviousHistory; return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun); } @@ -308,8 +307,6 @@ namespace IRaCIS.Core.API.Controllers } - - /// /// 删除访视计划对象 /// diff --git a/IRaCIS.Core.Application/Service/Common/DTO/FrontAuditConfigViewModel.cs b/IRaCIS.Core.Application/Service/Common/DTO/FrontAuditConfigViewModel.cs index d815b6ef1..3597de01c 100644 --- a/IRaCIS.Core.Application/Service/Common/DTO/FrontAuditConfigViewModel.cs +++ b/IRaCIS.Core.Application/Service/Common/DTO/FrontAuditConfigViewModel.cs @@ -100,6 +100,9 @@ namespace IRaCIS.Core.Application.ViewModel public string Identification { get; set; } } + + + public class CopyOtherToThisItem { public List DataSource { get; set; }=new List(){ }; @@ -107,6 +110,11 @@ namespace IRaCIS.Core.Application.ViewModel public Guid AddItem { get; set; } } + public class GetDescriptionByModuleTypeDto + { + public string ModuleType { get; set; } = string.Empty; + } + ///FrontAuditConfigQuery 列表查询参数模型 public class FrontAuditConfigQuery { diff --git a/IRaCIS.Core.Application/Service/Common/FrontAuditConfigService.cs b/IRaCIS.Core.Application/Service/Common/FrontAuditConfigService.cs index 9c52ac5ad..5185d170b 100644 --- a/IRaCIS.Core.Application/Service/Common/FrontAuditConfigService.cs +++ b/IRaCIS.Core.Application/Service/Common/FrontAuditConfigService.cs @@ -110,13 +110,20 @@ namespace IRaCIS.Core.Application.Service await _repository.SaveChangesAsync(); return ResponseOutput.Ok(); - - - - } - + + /// + /// 获取Description + /// + /// + /// + [HttpPost] + public async Task> GetDescriptionByModuleType(GetDescriptionByModuleTypeDto dto) + { + var result= await _frontAuditConfigRepository.Where(x=>x.ModuleTypeId== dto.ModuleType&&x.Description!=null &&x.Description!=string.Empty).Select(x=>x.Description).Distinct().ToListAsync(); + return result; + } /// /// 获取列表 diff --git a/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs b/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs index bac0a0e00..cc8c44721 100644 --- a/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs +++ b/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs @@ -257,7 +257,7 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO public string SignText { get; set; } = string.Empty; - //public string OptType { get; set; } = string.Empty; + public decimal? VisitNum { get; set; } } @@ -265,14 +265,7 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO public class GetDataInspectionDto : PageInput { - /// - /// 功能模块 - /// - public string ModuleType { get; set; } = string.Empty; - /// - /// 盲态访视名 - /// - public string BlindName { get; set; } = string.Empty; + /// /// 项目iD @@ -287,38 +280,53 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO /// /// 受试者 /// - public Guid? SubjectId { get; set; } + public string SubjectInfo { get; set; } = string.Empty; /// - /// 访视 + /// /// - public Guid? SubjectVisitId { get; set; } + public decimal? VisitPlanInfo { get; set; } /// - /// 操作类型 + /// 开始时间 /// - public string OptType { get; set; } = string.Empty; - /// - /// 子类 - /// - public string ChildrenType { get; set; } = string.Empty; + public DateTime? StartTime { get; set; } /// - /// 修改原因 + /// 结束时间 /// + public DateTime? EndTime { get; set; } - public string Reason { get; set; } = string.Empty; + + + /// + /// 功能模块 + /// + public string ModuleType { get; set; } = string.Empty; + + /// + /// Description + /// + public string Description { get; set; } = string.Empty; + + /// + /// 操作人名称模糊查询 + /// + public string OpByUserName { get; set; } = string.Empty; + + /// + /// 阅读片人 + /// + public string ReaderUser { get; set; } = string.Empty; /// /// 是否有签名 /// public bool? IsSign { get; set; } - /// - /// 对象名称 - /// - public string ObjectType { get; set; } = string.Empty; + + } public class InspectionBase diff --git a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs index ff1f0da3b..ac104f88b 100644 --- a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs +++ b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs @@ -43,24 +43,26 @@ namespace IRaCIS.Core.Application.Service.Inspection join user in _repository.GetQueryable() on data.CreateUserId equals user.Id into usertemp from leftuser in usertemp.DefaultIfEmpty() + - //join moduleTyped in _repository.GetQueryable().Where(x => x.Code == "ModuleType") on 1 equals 1 - //join moduleTypec in _repository.GetQueryable() on new { ParentId = moduleTyped.Id, ModuleType = data.ModuleType } equals new { ParentId = moduleTypec.ParentId.Value, ModuleType = moduleTypec.Value } into moduleTypectemp - //join childrenTyped in _repository.GetQueryable().Where(x => x.Code == "ChildrenType") on 1 equals 1 - //join childrenTypec in _repository.GetQueryable() on new { ParentId = childrenTyped.Id, ModuleType = data.ChildrenType } equals new { ParentId = childrenTypec.ParentId.Value, ModuleType = childrenTypec.Value } into childrenTypectemp - //from leftchildrenTypec in childrenTypectemp.DefaultIfEmpty() + //join moduleTyped in _repository.GetQueryable().Where(x => x.Code == "ModuleType") on 1 equals 1 + //join moduleTypec in _repository.GetQueryable() on new { ParentId = moduleTyped.Id, ModuleType = data.ModuleType } equals new { ParentId = moduleTypec.ParentId.Value, ModuleType = moduleTypec.Value } into moduleTypectemp - //join ObjectTyped in _repository.GetQueryable().Where(x => x.Code == "ObjectType") on 1 equals 1 - //join ObjectTypec in _repository.GetQueryable() on new { ParentId = ObjectTyped.Id, ModuleType = data.ObjectType } equals new { ParentId = ObjectTypec.ParentId.Value, ModuleType = ObjectTypec.Value } into objectTypetemp - //from leftObjectType in objectTypetemp.DefaultIfEmpty() + //join childrenTyped in _repository.GetQueryable().Where(x => x.Code == "ChildrenType") on 1 equals 1 + //join childrenTypec in _repository.GetQueryable() on new { ParentId = childrenTyped.Id, ModuleType = data.ChildrenType } equals new { ParentId = childrenTypec.ParentId.Value, ModuleType = childrenTypec.Value } into childrenTypectemp + //from leftchildrenTypec in childrenTypectemp.DefaultIfEmpty() - //join OptTyped in _repository.GetQueryable().Where(x => x.Code == "OptType") on 1 equals 1 - //join OptTypec in _repository.GetQueryable() on new { ParentId = OptTyped.Id, ModuleType = data.OptType } equals new { ParentId = OptTypec.ParentId.Value, ModuleType = OptTypec.Value } into optTypetemp - //from leftOptType in optTypetemp.DefaultIfEmpty() + //join ObjectTyped in _repository.GetQueryable().Where(x => x.Code == "ObjectType") on 1 equals 1 + //join ObjectTypec in _repository.GetQueryable() on new { ParentId = ObjectTyped.Id, ModuleType = data.ObjectType } equals new { ParentId = ObjectTypec.ParentId.Value, ModuleType = ObjectTypec.Value } into objectTypetemp + //from leftObjectType in objectTypetemp.DefaultIfEmpty() + + //join OptTyped in _repository.GetQueryable().Where(x => x.Code == "OptType") on 1 equals 1 + //join OptTypec in _repository.GetQueryable() on new { ParentId = OptTyped.Id, ModuleType = data.OptType } equals new { ParentId = OptTypec.ParentId.Value, ModuleType = OptTypec.Value } into optTypetemp + //from leftOptType in optTypetemp.DefaultIfEmpty() join trialSign in _repository.GetQueryable() on data.SignId equals trialSign.Id into trialSigntemp @@ -112,6 +114,7 @@ namespace IRaCIS.Core.Application.Service.Inspection ParentJson = leftparent.JsonDetail, VisitName = data.SubjectVisitName, CreateUser = leftuser.UserName, + UserFirstName = leftuser.FirstName, UserLastName = leftuser.LastName, //SubjectCode=leftsubject.Code, @@ -128,22 +131,25 @@ namespace IRaCIS.Core.Application.Service.Inspection SignText= lefttrialSign.SignText, Identification= leftfrontAuditConfig.Identification, OptType= leftOptType.Value, + VisitNum=leftsubjectVisit.VisitNum, }; - query = query.WhereIf(!dto.BlindName.IsNullOrEmpty(), x => x.BlindName == dto.BlindName) - .WhereIf(dto.IsSign != null, x => x.IsSign == dto.IsSign) - .WhereIf(!dto.ObjectType.IsNullOrEmpty(), x => x.ObjectType == dto.ObjectType) - .WhereIf(!dto.ChildrenType.IsNullOrEmpty(), x => x.ChildrenType == dto.ChildrenType) - .WhereIf(!dto.ModuleType.IsNullOrEmpty(), x => x.ModuleType == dto.ModuleType) - .WhereIf(!dto.OptType.IsNullOrEmpty(), x => x.OptType == dto.OptType) - .WhereIf(!dto.Reason.IsNullOrEmpty(), x => x.Reason == dto.Reason) - .WhereIf(dto.TrialId != null, x => x.TrialId == dto.TrialId) - .WhereIf(dto.SubjectId != null, x => x.SubjectId == dto.SubjectId) - .WhereIf(dto.SubjectVisitId != null, x => x.SubjectVisitId == dto.SubjectVisitId) - .WhereIf(dto.SiteId != null, x => x.SiteId == dto.SiteId); + query = query.WhereIf(dto.TrialId != null, x => x.TrialId == dto.TrialId) + .WhereIf(dto.SiteId != null, x => x.SiteId == dto.SiteId) + .WhereIf(!dto.SubjectInfo.IsNullOrEmpty(), x => x.SubjectCode.Contains(dto.SubjectInfo)) + .WhereIf(dto.VisitPlanInfo != null, x => x.VisitNum == dto.VisitPlanInfo) + .WhereIf(dto.StartTime != null, x => x.CreateTime >= dto.StartTime) + .WhereIf(dto.EndTime != null, x => x.CreateTime <= dto.EndTime) + .WhereIf(!dto.ModuleType.IsNullOrEmpty(), x => x.ModuleType == dto.ModuleType) + .WhereIf(!dto.Description.IsNullOrEmpty(), x => x.Description == dto.Description) + .WhereIf(!dto.OpByUserName.IsNullOrEmpty(), x => x.CreateUserName.Contains(dto.OpByUserName)) + //.WhereIf(!dto.SubjectInfo.IsNullOrEmpty(), x => x.SubjectCode.Contains(dto.SubjectInfo)) + .WhereIf(dto.IsSign != null, x => x.IsSign == dto.IsSign); + + #endregion - + dto.Asc = false; return await query.ToPagedListAsync(dto.PageIndex, dto.PageSize, "CreateTime", dto.Asc);