修改QC质疑查询

Test.EIImageViewer
{872297557@qq.com} 2022-12-30 11:42:45 +08:00
parent c5194c1c3a
commit c00b63a1b0
3 changed files with 19 additions and 3 deletions

View File

@ -707,6 +707,8 @@ namespace IRaCIS.Core.Application.Service
join p in _frontAuditConfigRepository.Where(x => x.DictionaryCode!=null &&x.DictionaryCode!=string.Empty && x.EnumType == "Dictionary" && x.IsEnable) on u.Id equals p.ParentId
select new
{
//前端展示类型
//DataType=p.DataType,
Key = p.Code,
Code = p.DictionaryCode,
Type = p.DictionaryType
@ -719,7 +721,7 @@ namespace IRaCIS.Core.Application.Service
{
list.Add(new
{
//DataType="",
Key = "AuditState",
Code = trialtype == TrialQCProcess.SingleAudit ? "AuditStatePE" : "AuditStateRC",
Type = "Code",

View File

@ -112,7 +112,8 @@ namespace IRaCIS.Core.Application.Image.QA
.WhereIf(challengeQuery.VisitPlanArray != null && challengeQuery.VisitPlanArray?.Length > 0, svExpression)
//.WhereIf(!string.IsNullOrEmpty(challengeQuery.VisitPlanInfo), challengeQuery.VisitPlanInfo.Contains('.') ? t => t.SubjectVisit.InPlan == false : t => t.SubjectVisit.VisitNum == decimal.Parse(challengeQuery.VisitPlanInfo))
.WhereIf(challengeQuery.IsUrgent != null, t => t.SubjectVisit.IsUrgent == challengeQuery.IsUrgent)
.WhereIf(challengeQuery.IsOverTime != null, t => DateTime.Now > t.DeadlineTime)
.WhereIf(challengeQuery.IsOverTime != null && challengeQuery.IsOverTime==true, t => t.IsClosed ? t.ClosedTime > t.DeadlineTime : DateTime.Now > t.DeadlineTime)
.WhereIf(challengeQuery.IsOverTime != null && challengeQuery.IsOverTime == false, t => t.IsClosed ? t.ClosedTime < t.DeadlineTime : DateTime.Now < t.DeadlineTime)
.ProjectTo<QCChanllengeExportDto>(_mapper.ConfigurationProvider).ToListAsync();
list = list.OrderBy(t => t.TrialSiteCode).ThenBy(t => t.SubjectCode).ThenBy(t => t.ChallengeCode).ToList();
@ -973,7 +974,8 @@ namespace IRaCIS.Core.Application.Image.QA
.WhereIf(challengeQuery.VisitPlanArray != null && challengeQuery.VisitPlanArray?.Length > 0, svExpression)
//.WhereIf(!string.IsNullOrEmpty(challengeQuery.VisitPlanInfo), challengeQuery.VisitPlanInfo.Contains('.') ? t => t.SubjectVisit.InPlan == false : t => t.SubjectVisit.VisitNum == decimal.Parse(challengeQuery.VisitPlanInfo))
.WhereIf(challengeQuery.IsUrgent != null, t => t.SubjectVisit.IsUrgent == challengeQuery.IsUrgent)
.WhereIf(challengeQuery.IsOverTime != null, t => DateTime.Now > t.DeadlineTime)
.WhereIf(challengeQuery.IsOverTime != null && challengeQuery.IsOverTime == true, t => t.IsClosed ? t.ClosedTime > t.DeadlineTime : DateTime.Now > t.DeadlineTime)
.WhereIf(challengeQuery.IsOverTime != null && challengeQuery.IsOverTime == false, t => t.IsClosed ? t.ClosedTime < t.DeadlineTime : DateTime.Now < t.DeadlineTime)
.ProjectTo<QCCRCChallengeViewModel>(_mapper.ConfigurationProvider);
var pageList = await query.ToPagedListAsync(challengeQuery.PageIndex, challengeQuery.PageSize, challengeQuery.SortField, challengeQuery.Asc, string.IsNullOrWhiteSpace(challengeQuery.SortField), new string[] { "IsUrgent desc", "IsClosed asc" });

View File

@ -2272,6 +2272,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
};
if (inspection.VisitTaskId != null)
{
@ -2292,6 +2294,16 @@ namespace IRaCIS.Core.Infra.EFCore.Common
}
if (inspection.TrialReadingCriterionId == null)
{
if (generalData.TrialId == null)
{
var info = await _dbContext.ReadingQuestionCriterionTrial.Where(x => x.Id == inspection.TrialReadingCriterionId).Select(x => new { x.TrialId }).FirstOrDefaultAsync();
generalData.TrialId = info?.TrialId ?? generalData.TrialId;
}
}
// Suject visit 都进行了设置 不用处理
if (inspection.SubjectVisitId != null)