@@ -8,6 +8,7 @@ using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using IRaCIS.Core.Infra.EFCore.Migrations;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
@@ -2347,6 +2348,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
public async Task<IActionResult> GetCommonJudgeRatioList_Export(VisitTaskQuery inQuery,
|
||||
[FromServices] IRepository<CommonDocument> _commonDocumentRepository,
|
||||
[FromServices] IDictionaryService _dictionaryService,
|
||||
[FromServices] IRepository<SubjectUser> _subjectUserRepository,
|
||||
[FromServices] IRepository<Trial> _trialRepository)
|
||||
{
|
||||
//每次查询必须是单标准的
|
||||
@@ -2555,17 +2557,33 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
}))
|
||||
.ToList();
|
||||
|
||||
exportInfo.DoctorSubjectStatList = filteredList.GroupBy(t => new { t.DoctorUserId, t.UserName, t.FullName }).Select(g => new DoctorJudgeRatio()
|
||||
|
||||
|
||||
//找到该标准的阅片人
|
||||
var armList = new List<Arm>() { Arm.SingleReadingArm, Arm.DoubleReadingArm1, Arm.DoubleReadingArm2 };
|
||||
|
||||
exportInfo.DoctorSubjectStatList = _subjectUserRepository.Where(t => t.TrialId == inQuery.TrialId && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && armList.Contains(t.ArmEnum))
|
||||
.Select(t => new DoctorJudgeRatio()
|
||||
{
|
||||
DoctorUserId = t.DoctorUserId,
|
||||
UserName = t.DoctorUser.UserName,
|
||||
FullName = t.DoctorUser.FullName,
|
||||
|
||||
TotalJudgeCount = 0,
|
||||
|
||||
JudgeAgreeCount = 0
|
||||
|
||||
}).Distinct().ToList();
|
||||
|
||||
foreach (var doctor in exportInfo.DoctorSubjectStatList)
|
||||
{
|
||||
DoctorUserId = g.Key.DoctorUserId,
|
||||
UserName = g.Key.UserName,
|
||||
FullName = g.Key.FullName,
|
||||
if (filteredList.Any(t => t.DoctorUserId == doctor.DoctorUserId))
|
||||
{
|
||||
doctor.TotalJudgeCount= filteredList.Where(t=>t.DoctorUserId==doctor.DoctorUserId).Count();
|
||||
|
||||
TotalJudgeCount = g.Count(),
|
||||
|
||||
JudgeAgreeCount = g.Count(t => t.JudgeResultTaskId == t.VisitTaskId)
|
||||
|
||||
}).ToList();
|
||||
doctor.JudgeAgreeCount= filteredList.Where(t => t.DoctorUserId == doctor.DoctorUserId).Count(t => t.JudgeResultTaskId == t.VisitTaskId);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user