添加查询参数
parent
6944ca3049
commit
b643ae1c18
|
@ -219,7 +219,6 @@ namespace IRaCIS.Core.API.Controllers
|
|||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> DeletePreviousHistory(DataInspectionDto<IDDto> 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
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除访视计划对象
|
||||
/// </summary>
|
||||
|
|
|
@ -100,6 +100,9 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
public string Identification { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public class CopyOtherToThisItem
|
||||
{
|
||||
public List<Guid?> DataSource { get; set; }=new List<Guid?>(){ };
|
||||
|
@ -107,6 +110,11 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
public Guid AddItem { get; set; }
|
||||
}
|
||||
|
||||
public class GetDescriptionByModuleTypeDto
|
||||
{
|
||||
public string ModuleType { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
///<summary>FrontAuditConfigQuery 列表查询参数模型</summary>
|
||||
public class FrontAuditConfigQuery
|
||||
{
|
||||
|
|
|
@ -110,13 +110,20 @@ namespace IRaCIS.Core.Application.Service
|
|||
await _repository.SaveChangesAsync();
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取Description
|
||||
/// </summary>
|
||||
/// <param name="dto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<string>> 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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取列表
|
||||
|
|
|
@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// 功能模块
|
||||
/// </summary>
|
||||
public string ModuleType { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 盲态访视名
|
||||
/// </summary>
|
||||
public string BlindName { get; set; } = string.Empty;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 项目iD
|
||||
|
@ -287,38 +280,53 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
|
|||
/// <summary>
|
||||
/// 受试者
|
||||
/// </summary>
|
||||
public Guid? SubjectId { get; set; }
|
||||
public string SubjectInfo { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 访视
|
||||
///
|
||||
/// </summary>
|
||||
public Guid? SubjectVisitId { get; set; }
|
||||
public decimal? VisitPlanInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 操作类型
|
||||
/// 开始时间
|
||||
/// </summary>
|
||||
public string OptType { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 子类
|
||||
/// </summary>
|
||||
public string ChildrenType { get; set; } = string.Empty;
|
||||
public DateTime? StartTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 修改原因
|
||||
/// 结束时间
|
||||
/// </summary>
|
||||
public DateTime? EndTime { get; set; }
|
||||
|
||||
public string Reason { get; set; } = string.Empty;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 功能模块
|
||||
/// </summary>
|
||||
public string ModuleType { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Description
|
||||
/// </summary>
|
||||
public string Description { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 操作人名称模糊查询
|
||||
/// </summary>
|
||||
public string OpByUserName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 阅读片人
|
||||
/// </summary>
|
||||
public string ReaderUser { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 是否有签名
|
||||
/// </summary>
|
||||
public bool? IsSign { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 对象名称
|
||||
/// </summary>
|
||||
|
||||
public string ObjectType { get; set; } = string.Empty;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class InspectionBase
|
||||
|
|
|
@ -43,24 +43,26 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
|||
join user in _repository.GetQueryable<User>() on data.CreateUserId equals user.Id into usertemp
|
||||
from leftuser in usertemp.DefaultIfEmpty()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//join moduleTyped in _repository.GetQueryable<Dictionary>().Where(x => x.Code == "ModuleType") on 1 equals 1
|
||||
//join moduleTypec in _repository.GetQueryable<Dictionary>() on new { ParentId = moduleTyped.Id, ModuleType = data.ModuleType } equals new { ParentId = moduleTypec.ParentId.Value, ModuleType = moduleTypec.Value } into moduleTypectemp
|
||||
|
||||
//join childrenTyped in _repository.GetQueryable<Dictionary>().Where(x => x.Code == "ChildrenType") on 1 equals 1
|
||||
//join childrenTypec in _repository.GetQueryable<Dictionary>() 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<Dictionary>().Where(x => x.Code == "ModuleType") on 1 equals 1
|
||||
//join moduleTypec in _repository.GetQueryable<Dictionary>() on new { ParentId = moduleTyped.Id, ModuleType = data.ModuleType } equals new { ParentId = moduleTypec.ParentId.Value, ModuleType = moduleTypec.Value } into moduleTypectemp
|
||||
|
||||
//join ObjectTyped in _repository.GetQueryable<Dictionary>().Where(x => x.Code == "ObjectType") on 1 equals 1
|
||||
//join ObjectTypec in _repository.GetQueryable<Dictionary>() 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<Dictionary>().Where(x => x.Code == "ChildrenType") on 1 equals 1
|
||||
//join childrenTypec in _repository.GetQueryable<Dictionary>() 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<Dictionary>().Where(x => x.Code == "OptType") on 1 equals 1
|
||||
//join OptTypec in _repository.GetQueryable<Dictionary>() 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<Dictionary>().Where(x => x.Code == "ObjectType") on 1 equals 1
|
||||
//join ObjectTypec in _repository.GetQueryable<Dictionary>() 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<Dictionary>().Where(x => x.Code == "OptType") on 1 equals 1
|
||||
//join OptTypec in _repository.GetQueryable<Dictionary>() 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<TrialSign>() 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);
|
||||
|
|
Loading…
Reference in New Issue