Merge branch 'Test_IRC_Net10' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net10
commit
f69c7af9d6
|
|
@ -215,6 +215,33 @@ namespace IRaCIS.Core.Application.Service
|
|||
CriterionType = g.Key.CriterionType,
|
||||
}).ToList();
|
||||
|
||||
|
||||
// 获取所有符合条件的医生ID
|
||||
var allDoctorIds = _enrollRepository
|
||||
.Where(x => x.TrialId == inQuery.TrialId
|
||||
&& x.EnrollStatus >= EnrollStatus.ConfirmIntoGroup)
|
||||
.WhereIf(inQuery.DoctorUserIdList.Count > 0,
|
||||
t => inQuery.DoctorUserIdList.Contains(t.DoctorUserId))
|
||||
.Select(x => x.DoctorUserId)
|
||||
.Distinct()
|
||||
.ToList();
|
||||
|
||||
// 补全缺失的医生记录
|
||||
var missingDoctors = allDoctorIds
|
||||
.Except(list.Select(r => r.DoctorUserId))
|
||||
.Select(doctorId => new DoctorTaskStat()
|
||||
{
|
||||
DoctorUserId = doctorId,
|
||||
PendingCount = 0,
|
||||
TotalCount = 0,
|
||||
ComplectedCount = 0,
|
||||
TrialReadingCriterionId = inQuery.TrialReadingCriterionId,
|
||||
|
||||
})
|
||||
.ToList();
|
||||
|
||||
list.AddRange(missingDoctors);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue