From 56429d0b372f377b36dacd94b01d2ca0b54a383d Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 15 Jul 2025 15:43:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9QC=E5=A4=8D=E6=A0=B8=20-?= =?UTF-8?q?=E4=BA=8C=E6=AC=A1=E6=8F=90=E4=BA=A4-uat-4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/QC/QCListService.cs | 8 ++++++-- IRaCIS.Core.Domain/BaseModel/Entity.cs | 4 ---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/IRaCIS.Core.Application/Service/QC/QCListService.cs b/IRaCIS.Core.Application/Service/QC/QCListService.cs index c701f578f..27dc1d64d 100644 --- a/IRaCIS.Core.Application/Service/QC/QCListService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCListService.cs @@ -7,6 +7,7 @@ using IRaCIS.Core.Infrastructure; using IRaCIS.Core.Infrastructure.Extention; using MassTransit.Initializers; using Microsoft.AspNetCore.Mvc; +using NPOI.SS.Formula.Functions; using System.Linq; namespace IRaCIS.Core.Application.Image.QA @@ -25,6 +26,7 @@ namespace IRaCIS.Core.Application.Image.QA IRepository _noneDicomStudyRepository, IRepository _qcChallengeRepository, IRepository _subjectVisitImageBackRecordReposiotry, + IRepository _userRoleReposiotry, IReadingImageTaskService _IReadingImageTaskService, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IQCListService { @@ -419,8 +421,10 @@ namespace IRaCIS.Core.Application.Image.QA { var trialConfirmTime = _trialRepository.Where(t => t.Id == sv.TrialId).Select(t => t.QCQuestionConfirmedTime).FirstOrDefault(); - secondReviewList = _trialQCQuestionAnswerRepository.Where(t => t.SubjectVisitId == subjectVisitId && t.CurrentQCEnum == CurrentQC.SecondReview).Where(t => t.SecondReviewTime != null) - .Select(t => new SecondReviewDto { SecondReviewTime = t.SecondReviewTime, SignTime = t.UpdateTime, FullName = t.UpdateUserRole.FullName, UserName = t.UpdateUserRole.UserName }).Distinct().ToList(); + secondReviewList = (from answer in _trialQCQuestionAnswerRepository.Where(t => t.SubjectVisitId == subjectVisitId && t.CurrentQCEnum == CurrentQC.SecondReview).Where(t => t.SecondReviewTime != null) + join userRole in _userRoleReposiotry.Where() on answer.UpdateUserId equals userRole.Id + select new SecondReviewDto { SecondReviewTime = answer.SecondReviewTime, SignTime = answer.UpdateTime, FullName = userRole.FullName, UserName = userRole.UserName }) + .Distinct().ToList(); var secondReviewTimeList = secondReviewList.Select(t => t.SecondReviewTime).Distinct().ToList(); diff --git a/IRaCIS.Core.Domain/BaseModel/Entity.cs b/IRaCIS.Core.Domain/BaseModel/Entity.cs index d05d0fb5c..e4ec8e538 100644 --- a/IRaCIS.Core.Domain/BaseModel/Entity.cs +++ b/IRaCIS.Core.Domain/BaseModel/Entity.cs @@ -109,10 +109,6 @@ public abstract class BaseFullAuditEntity : Entity, IAuditUpdate, IAuditAdd [JsonIgnore] public UserRole CreateUserRole { get; set; } - - [ForeignKey("UpdateUserId")] - [JsonIgnore] - public UserRole UpdateUserRole { get; set; } } public abstract class BaseFullDeleteAuditEntity : Entity, IAuditUpdate, IAuditAdd, ISoftDelete {