修改申请重阅 任务处理

Uat_Study
hang 2022-08-04 13:26:38 +08:00
parent 79fd496fc3
commit a9b161783b
2 changed files with 5 additions and 5 deletions

View File

@ -1105,16 +1105,16 @@ namespace IRaCIS.Core.Application.Service.Allocation
{ {
var visitGroupQuery = _visitTaskRepository.Where(x => x.TrialId == trialId && x.DoctorUserId == _userInfo.Id) var visitGroupQuery = _visitTaskRepository.Where(x => x.TrialId == trialId && x.DoctorUserId == _userInfo.Id)
.Where(x => !x.Subject.IsDeleted) .Where(x => !x.Subject.IsDeleted)
.Where(t => (t.ReadingTaskState != ReadingTaskState.HaveSigned || t.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed) && t.TaskState == TaskState.Effect) .Where(t => (t.ReadingTaskState != ReadingTaskState.HaveSigned || t.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed||t.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed) && t.TaskState == TaskState.Effect)
.GroupBy(x => new { x.SubjectId, x.Subject.Code, x.BlindSubjectCode }); .GroupBy(x => new { x.SubjectId, x.Subject.Code, x.BlindSubjectCode });
var visitTaskQuery = visitGroupQuery.Select(x => new IRUnReadSubjectView() var visitTaskQuery = visitGroupQuery.Select(x => new IRUnReadSubjectView()
{ {
SubjectId = x.Key.SubjectId, SubjectId = x.Key.SubjectId,
SubjectCode = x.Key.BlindSubjectCode == string.Empty ? x.Key.Code : x.Key.BlindSubjectCode, SubjectCode = x.Key.BlindSubjectCode == string.Empty ? x.Key.Code : x.Key.BlindSubjectCode,
UnReadTaskCount = x.Where(y => y.ReReadingApplyState != ReReadingApplyState.DocotorHaveApplyed).Count(), UnReadTaskCount = x.Where(y => y.ReadingTaskState != ReadingTaskState.HaveSigned).Count(),
ExistReadingApply = x.Any(y => y.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed), ExistReadingApply = x.Any(y => y.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed),
UnReadTaskList = x.Where(y => y.ReReadingApplyState != ReReadingApplyState.DocotorHaveApplyed).OrderBy(x => x.VisitTaskNum) UnReadTaskList = x.Where(y => y.ReadingTaskState != ReadingTaskState.HaveSigned).OrderBy(x => x.VisitTaskNum)
.Select(u => new IRUnreadTaskView() .Select(u => new IRUnreadTaskView()
{ {
Id = u.Id, Id = u.Id,
@ -1132,7 +1132,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
var count = visitGroupQuery.Select(x => new var count = visitGroupQuery.Select(x => new
{ {
UnReadTaskCount = x.Where(y => y.ReReadingApplyState != ReReadingApplyState.DocotorHaveApplyed).Count(), UnReadTaskCount = x.Where(y => y.ReadingTaskState != ReadingTaskState.HaveSigned).Count(),
}).Where(x => x.UnReadTaskCount > 0).Count(); }).Where(x => x.UnReadTaskCount > 0).Count();
return (count, visitTaskQuery); return (count, visitTaskQuery);
} }

View File

@ -120,7 +120,7 @@ namespace IRaCIS.Core.Application.MediatR.Handlers
foreach (var item in sv.StudyList) foreach (var item in sv.StudyList)
{ {
num++; num++;
dialogMsg.AppendLine($"<br>{num}.{item.StudyDate}&nbsp;&nbsp;{item.Modality} 在导入模板中不存在"); dialogMsg.AppendLine($"<br>{num}.{item.StudyDate}&nbsp;&nbsp;{item.Modality} 在导入文件中不存在");
} }
dialogMsg.AppendLine($"<br/>"); dialogMsg.AppendLine($"<br/>");