From 9e63e742bfcafb6088b6c56c8570c9c64b05dee0 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 29 Jul 2025 09:07:55 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E5=88=9D=E5=AE=A1=E9=80=9A=E8=BF=87bug=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/QC/QCListService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/QC/QCListService.cs b/IRaCIS.Core.Application/Service/QC/QCListService.cs index f9b7e58c6..ddc9444bd 100644 --- a/IRaCIS.Core.Application/Service/QC/QCListService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCListService.cs @@ -489,7 +489,8 @@ namespace IRaCIS.Core.Application.Image.QA var secondReviewTime = inDto.SecondReviewTime != null ? (DateTime)inDto.SecondReviewTime : trialConfirmTime == null ? DateTime.Now : (DateTime)trialConfirmTime; - if ((sv.AuditState == AuditStateEnum.QCPassed && inDto.CurrentQCEnum != CurrentQC.SecondReview) || (inDto.CurrentQCEnum == CurrentQC.SecondReview && secondReviewTime.AddSeconds(1) < trialConfirmTime)) + if ((sv.AuditState == AuditStateEnum.QCPassed && inDto.CurrentQCEnum != CurrentQC.SecondReview) || (inDto.CurrentQCEnum == CurrentQC.SecondReview && secondReviewTime.AddSeconds(1) < trialConfirmTime) + || (sv.AuditState >= AuditStateEnum.PrimaryQCPassed && inDto.CurrentQCEnum==CurrentQC.First)) //1QC通过时,这个时候看1qc答案 { //之前质控完的,+二次复核完的,都要从答案表中取 二次复核完的还需要加时间 From 6c103b577c735c1b6294bd8d2ffcbaef957be048 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 29 Jul 2025 15:21:18 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=87=8C=E9=9D=A2?= =?UTF-8?q?=E6=9C=89=E6=B7=BB=E5=8A=A0bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/QC/QCOperationService.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs index 796d06f8c..df456f18e 100644 --- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs @@ -782,6 +782,16 @@ namespace IRaCIS.Core.Application.Image.QA //_mapper.Map(qcQuestionAnswerCommands, questionAnswerList); #endregion + //可能还有新增的问题 + + var needAddList = qcQuestionAnswerCommands.Where(t => t.Id == null).ToList(); + var addlist = _mapper.Map>(needAddList); + + + + addlist.ForEach(t => { t.TrialId = trialId; t.SubjectVisitId = subjectVisitId; t.CurrentQCEnum = currentQCType; t.QCProcessEnum = trialQCProcess; t.SecondReviewTime = currentQCType == CurrentQC.SecondReview ? trialConfirmTime : null; }); + + await _trialQCQuestionAnswerRepository.AddRangeAsync(addlist); return ResponseOutput.Ok(await _trialQCQuestionAnswerRepository.SaveChangesAsync()); From 8e2477c19d0b703cc7947219589f1bf22ca47583 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 29 Jul 2025 15:56:34 +0800 Subject: [PATCH 3/6] =?UTF-8?q?QC=E8=87=AA=E5=8A=A8=E9=A2=86=E5=8F=96?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/QC/QCOperationService.cs | 107 +++++++++++++----- 1 file changed, 77 insertions(+), 30 deletions(-) diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs index df456f18e..9f218078f 100644 --- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs @@ -1241,19 +1241,60 @@ namespace IRaCIS.Core.Application.Image.QA [HttpPost] public async Task CollectNextIQCQuality(GetNextIQCQualityInDto inDto) { - var nextIQCQuality = await this.GetNextIQCQuality(inDto); - if (nextIQCQuality.VisitId != null && nextIQCQuality.IsReceived == false) + var trialConfig = await _trialRepository + .Select(t => new { TrialId = t.Id, t.IsIQCAutoNextTask, t.IsIQCAutoTaskDistinguishType }) + .FirstOrDefaultAsync(t => t.TrialId == inDto.TrialId) + .IfNullThrowException(); + + var isDistinguishType = trialConfig.IsIQCAutoNextTask && trialConfig.IsIQCAutoTaskDistinguishType; + + + if (isDistinguishType == false) { - var visit = await _subjectVisitRepository.Where(x => x.Id == nextIQCQuality.VisitId).FirstNotNullAsync(); - if (!visit.IsTake) + //不区分任务类型,也要按照当前任务类型给,没找到,按照默认规则给任务 无质疑 普通质控任务 + + var nextIQCQuality = await this.GetNextIQCQuality(inDto, true); + + //没找到 + if (nextIQCQuality.VisitId == null) { - await ObtainOrCancelQCTask(inDto.TrialId, nextIQCQuality.VisitId.Value, true); + nextIQCQuality = await this.GetNextIQCQuality(inDto, false); + + if (nextIQCQuality.VisitId != null && nextIQCQuality.IsReceived == false) + { + var visit = await _subjectVisitRepository.Where(x => x.Id == nextIQCQuality.VisitId).FirstNotNullAsync(); + if (!visit.IsTake) + { + await ObtainOrCancelQCTask(inDto.TrialId, nextIQCQuality.VisitId.Value, true); + } + + } } + return nextIQCQuality; + + } + else + { + //区分任务类型,那么按照当前任务类型给,没找到就结束 + var nextIQCQuality = await this.GetNextIQCQuality(inDto, true); + + if (nextIQCQuality.VisitId != null && nextIQCQuality.IsReceived == false) + { + var visit = await _subjectVisitRepository.Where(x => x.Id == nextIQCQuality.VisitId).FirstNotNullAsync(); + if (!visit.IsTake) + { + await ObtainOrCancelQCTask(inDto.TrialId, nextIQCQuality.VisitId.Value, true); + } + + } + + return nextIQCQuality; } - return nextIQCQuality; + + } @@ -1264,7 +1305,7 @@ namespace IRaCIS.Core.Application.Image.QA /// /// [HttpPost] - public async Task GetNextIQCQuality(GetNextIQCQualityInDto inDto) + public async Task GetNextIQCQuality(GetNextIQCQualityInDto inDto, bool isDistinguishType) { var trialConfig = await _trialRepository .Select(t => new { TrialId = t.Id, t.QCProcessEnum, t.IsImageConsistencyVerification, t.IsIQCAutoNextTask, t.IsIQCAutoTaskDistinguishType }) @@ -1273,16 +1314,18 @@ namespace IRaCIS.Core.Application.Image.QA //当前任务类型 是复核还是普通任务 - var isDistinguishType = trialConfig.IsIQCAutoNextTask && trialConfig.IsIQCAutoTaskDistinguishType; - //当前是否是复核任务,复核任务,那么下一个任务也是复核的任务 var isSecondReview = _subjectVisitRepository.Any(t => t.Id == inDto.SubjectVisitId && t.SecondReviewState == SecondReviewState.AuditPassed); + var ishaveQCChallenge = _subjectVisitRepository.Any(t => t.Id == inDto.SubjectVisitId && t.QCChallengeList.Any()); + var currentActionList = await _subjectVisitRepository.Where(x => x.TrialId == inDto.TrialId && x.CurrentActionUserId == _userInfo.UserRoleId) .Where(t => t.Subject.Status != SubjectStatus.EndOfVisit) - .WhereIf(isDistinguishType, t => isSecondReview == false ? t.SecondReviewState == SecondReviewState.None : t.SecondReviewState == SecondReviewState.WaitAudit) - .OrderByDescending(x => x.IsUrgent) - .ThenBy(x => x.Subject.Code).ThenBy(x => x.VisitNum).ToListAsync(); + .WhereIf(isDistinguishType, t => isSecondReview == true ? t.SecondReviewState == SecondReviewState.WaitAudit : t.SecondReviewState == SecondReviewState.None) + .WhereIf(isDistinguishType, t => ishaveQCChallenge == true ? t.QCChallengeList.Any() : !t.QCChallengeList.Any()) + .Select(t => new { t.IsUrgent, SubjectCode = t.Subject.Code, t.SubjectId, t.Id, t.VisitNum, IshaveQCChallenge = t.QCChallengeList.Any(), t.SecondReviewState }) + .OrderBy(t => t.IshaveQCChallenge).ThenBy(t => t.SecondReviewState).ThenBy(x => x.IsUrgent).ThenBy(x => x.SubjectCode).ThenBy(x => x.VisitNum).ToListAsync(); + if (currentActionList.Count() > 0) { @@ -1295,27 +1338,26 @@ namespace IRaCIS.Core.Application.Image.QA }; } - SubjectVisit? subjectVisit = null; - List? visitList = null; + switch (trialConfig.QCProcessEnum) { case TrialQCProcess.NotAudit: return new GetNextIQCQualityOutDto() { }; break; case TrialQCProcess.SingleAudit: - visitList = await _subjectVisitRepository - .Where(t => t.Subject.Status != SubjectStatus.EndOfVisit) - .WhereIf(isDistinguishType, t => isSecondReview == false ? t.SecondReviewState == SecondReviewState.None : t.SecondReviewState == SecondReviewState.WaitAudit) - .Where(x => !x.SubjectVisitImageBackRecordList.Any(t => t.ImageBackState == ImageBackStateEnum.None)) - .Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.SecondReviewState == SecondReviewState.None - && x.TrialId == inDto.TrialId && x.PreliminaryAuditUserId != _userInfo.UserRoleId && (x.CurrentActionUserId == _userInfo.UserRoleId || (x.AuditState != AuditStateEnum.PrimaryQCPassed && !x.IsTake))) - .Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.Where(y => !y.IsClosed).OrderByDescending(x => x.CreateTime).FirstOrDefault().CreateUserId != _userInfo.UserRoleId) - .Include(x => x.Subject).ToListAsync(); + var visitList = await _subjectVisitRepository + .Where(t => t.Subject.Status != SubjectStatus.EndOfVisit) + .WhereIf(isDistinguishType, t => isSecondReview == true ? t.SecondReviewState == SecondReviewState.WaitAudit : t.SecondReviewState == SecondReviewState.None) + .WhereIf(isDistinguishType, t => ishaveQCChallenge == true ? t.QCChallengeList.Any() : !t.QCChallengeList.Any()) + .Where(x => !x.SubjectVisitImageBackRecordList.Any(t => t.ImageBackState == ImageBackStateEnum.None)) + .Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.SecondReviewState == SecondReviewState.None + && x.TrialId == inDto.TrialId && x.PreliminaryAuditUserId != _userInfo.UserRoleId && (x.CurrentActionUserId == _userInfo.UserRoleId || (x.AuditState != AuditStateEnum.PrimaryQCPassed && !x.IsTake))) + .Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.Where(y => !y.IsClosed).OrderByDescending(x => x.CreateTime).FirstOrDefault().CreateUserId != _userInfo.UserRoleId) + .Select(t => new { t.IsUrgent, SubjectCode = t.Subject.Code, t.SubjectId, t.Id, t.VisitNum, IshaveQCChallenge = t.QCChallengeList.Any(), t.SecondReviewState }) + .OrderBy(t => t.IshaveQCChallenge).ThenBy(t => t.SecondReviewState).ThenBy(x => x.IsUrgent).ThenBy(x => x.SubjectCode).ThenBy(x => x.VisitNum).ToListAsync(); - subjectVisit = visitList.Where(x => x.SubjectId == inDto.SubjectId) + var subjectVisit = visitList.Where(x => x.SubjectId == inDto.SubjectId).OrderBy(x => x.VisitNum).FirstOrDefault(); - - .OrderBy(x => x.VisitNum).FirstOrDefault(); if (subjectVisit != null) { return new GetNextIQCQualityOutDto() @@ -1325,7 +1367,7 @@ namespace IRaCIS.Core.Application.Image.QA }; } - subjectVisit = visitList.OrderBy(x => x.Subject.Code).ThenBy(x => x.VisitNum).FirstOrDefault(); + subjectVisit = visitList.OrderBy(x => x.SubjectCode).ThenBy(x => x.VisitNum).FirstOrDefault(); if (subjectVisit != null) { return new GetNextIQCQualityOutDto() @@ -1343,13 +1385,18 @@ namespace IRaCIS.Core.Application.Image.QA visitList = await _subjectVisitRepository .Where(t => t.Subject.Status != SubjectStatus.EndOfVisit) - .WhereIf(isDistinguishType, t => isSecondReview == false ? t.SecondReviewState == SecondReviewState.None : t.SecondReviewState == SecondReviewState.WaitAudit) + .WhereIf(isDistinguishType, t => isSecondReview == true ? t.SecondReviewState == SecondReviewState.WaitAudit : t.SecondReviewState == SecondReviewState.None) + .WhereIf(isDistinguishType, t => ishaveQCChallenge == true ? t.QCChallengeList.Any() : !t.QCChallengeList.Any()) .Where(x => !x.SubjectVisitImageBackRecordList.Any(t => t.ImageBackState == ImageBackStateEnum.None)) .Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.TrialId == inDto.TrialId && ((x.CurrentActionUserId == _userInfo.UserRoleId) || (!x.IsTake && x.AuditState != AuditStateEnum.QCPassed && (x.PreliminaryAuditUserId != _userInfo.UserRoleId))) ) .Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.Where(y => !y.IsClosed).OrderByDescending(x => x.CreateTime).FirstOrDefault().CreateUserId != _userInfo.UserRoleId) - .Include(x => x.Subject).ToListAsync(); + .Select(t => new { t.IsUrgent, SubjectCode = t.Subject.Code, t.SubjectId, t.Id, t.VisitNum, IshaveQCChallenge = t.QCChallengeList.Any(), t.SecondReviewState }) + .OrderBy(t => t.IshaveQCChallenge).ThenBy(t => t.SecondReviewState).ThenBy(x => x.IsUrgent).ThenBy(x => x.SubjectCode).ThenBy(x => x.VisitNum).ToListAsync(); + + subjectVisit = visitList.Where(x => x.SubjectId == inDto.SubjectId).OrderBy(x => x.VisitNum).FirstOrDefault(); + if (subjectVisit != null) { return new GetNextIQCQualityOutDto() @@ -1359,7 +1406,7 @@ namespace IRaCIS.Core.Application.Image.QA }; } - subjectVisit = visitList.OrderBy(x => x.Subject.Code).ThenBy(x => x.VisitNum).FirstOrDefault(); + subjectVisit = visitList.OrderBy(x => x.SubjectCode).ThenBy(x => x.VisitNum).FirstOrDefault(); if (subjectVisit != null) { return new GetNextIQCQualityOutDto() @@ -2320,7 +2367,7 @@ namespace IRaCIS.Core.Application.Image.QA sv.AuditState = AuditStateEnum.ToAudit; - sv.CurrentActionUserExpireTime =null; + sv.CurrentActionUserExpireTime = null; sv.CurrentActionUserId = null; sv.IsTake = false; From 62789f4cd841487026948379fb3614f47d60773a Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 29 Jul 2025 17:25:38 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BD=B1=E5=83=8F?= =?UTF-8?q?=E9=87=8D=E4=BC=A0=E5=AF=BC=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IRaCIS.Core.Application.xml | 15 +++++-- .../Service/Common/ExcelExportService.cs | 41 +++++++++++++++++++ .../Service/QC/DTO/QCListViewModel.cs | 7 +++- .../Service/QC/_MapConfig.cs | 1 + .../_IRaCIS/_Config/_StaticData.cs | 2 + 5 files changed, 61 insertions(+), 5 deletions(-) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index b1cd307ed..9193531bf 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -735,6 +735,15 @@ + + + 重传申请导表 + + + + + + getSysDocumentConfirmList 系统文档培训查询 @@ -2169,7 +2178,7 @@ - + 指定资源Id,获取Dicom检查信息 Dicom检查的Id @@ -17582,7 +17591,7 @@ - + 指定资源Id,获取Dicom检查所属序列信息列表 Dicom检查的Id @@ -17981,7 +17990,7 @@ - + 获取下一个质控任务 diff --git a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs index bf90ddaae..a0d720659 100644 --- a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs +++ b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs @@ -37,6 +37,7 @@ namespace IRaCIS.Core.Application.Service.Common IRepository _dicomStudyRepository, IRepository _qcChallengeRepository, IRepository _readModuleRepository, + IRepository _trialRepository, IRepository _noneDicomStudyRepository, IRepository _studyMonitorRepository, IRepository _commonDocumentRepository, @@ -398,6 +399,46 @@ namespace IRaCIS.Core.Application.Service.Common #region 导表查询 + /// + /// 重传申请导表 + /// + /// + /// + /// + /// + [HttpPost] + public async Task GetImageBackList_Export(ImageBackQueryDto inQuery, + [FromServices] IRepository _subjectVisitImageBackRecordReposiotry, [FromServices] IDictionaryService _dictionaryService) + { + var svExpression = QCCommon.GetSubjectVisitImageBackRecordFilter(inQuery.VisitPlanArray); + + var query = _subjectVisitImageBackRecordReposiotry.Where(t => t.SubjectVisit.TrialId == inQuery.TrialId) + .WhereIf(inQuery.TrialSiteId != null, t => t.SubjectVisit.TrialSiteId == inQuery.TrialSiteId) + .WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => t.SubjectVisit.Subject.Code.Contains(inQuery.SubjectCode)) + .WhereIf(!string.IsNullOrEmpty(inQuery.VisitName), t => t.SubjectVisit.VisitName.Contains(inQuery.VisitName)) + .WhereIf(inQuery.VisitPlanArray != null && inQuery.VisitPlanArray?.Length > 0, svExpression) + .WhereIf(inQuery.CreateUserId != null, t => t.CreateUserId == inQuery.CreateUserId) + .WhereIf(inQuery.ApplyUserRole != null, t => t.ApplyUserRole == inQuery.ApplyUserRole) + .WhereIf(inQuery.ApplyBeginTime != null, t => t.CreateTime >= inQuery.ApplyBeginTime) + .WhereIf(inQuery.ApplyEndTime != null, t => t.CreateTime <= inQuery.ApplyEndTime) + .WhereIf(inQuery.ImageBackState != null, t => t.ImageBackState == inQuery.ImageBackState) + .WhereIf(inQuery.AuditBeginTime != null, t => t.AuditTime >= inQuery.AuditBeginTime) + .WhereIf(inQuery.AuditEndTime != null, t => t.AuditTime <= inQuery.AuditEndTime) + .ProjectTo(_mapper.ConfigurationProvider); + + var defalutSortArray = new string[] { nameof(ImageBackViewModel.IsUrgent) + " desc", nameof(ImageBackViewModel.SubjectCode), nameof(ImageBackViewModel.VisitNum) }; + + var list = await query.OrderByDescending(t=>t.IsUrgent).ThenBy(t=>t.SubjectCode).ThenBy(t=>t.VisitNum).ToListAsync(); + + var exportInfo = (await _trialRepository.Where(t => t.Id == inQuery.TrialId).IgnoreQueryFilters().ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException(); + + exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId); + exportInfo.CurrentTime = ExportExcelConverterDate.DateTimeInternationalToString(DateTime.Now, _userInfo.TimeZoneId); + + return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialImageBackRecordList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(ImageBackViewModel)); + + } + ///getSysDocumentConfirmList 系统文档培训查询 /// [HttpPost] diff --git a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs index 040431e29..73dba46fb 100644 --- a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs +++ b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs @@ -1775,12 +1775,15 @@ namespace IRaCIS.Core.Application.Contracts public DateTime? AuditTime { get; set; } public Guid SubjectVisitId { get; set; } + [DictionaryTranslateAttribute("ImageBackApplyEnum")] public ImageBackApplyEnum ApplyUserRole { get; set; } + [DictionaryTranslateAttribute("ImageBackApplyEnum")] public ImageBackStateEnum ImageBackState { get; set; } public DateTime? SubmitTime { get; set; } + [DictionaryTranslateAttribute("YesOrNo")] public bool IsUrgent { get; set; } public string VisitName { get; set; } = string.Empty; @@ -1789,8 +1792,8 @@ namespace IRaCIS.Core.Application.Contracts public DateTime? LatestScanDate { get; set; } public decimal VisitNum { get; set; } - - + [DictionaryTranslateAttribute("Subject_Visit_Status")] + public SubjectStatus SubjectStatus { get; set; } public string SubjectCode { get; set; } = String.Empty; public String TrialSiteCode { get; set; } = String.Empty; diff --git a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs index 2754f2f4e..c0be11513 100644 --- a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs @@ -756,6 +756,7 @@ namespace IRaCIS.Core.Application.Service CreateMap() .ForMember(d => d.SubjectCode, u => u.MapFrom(s => s.SubjectVisit.Subject.Code)) + .ForMember(d => d.SubjectStatus, u => u.MapFrom(s => s.SubjectVisit.Subject.Status)) .ForMember(d => d.IsSubjectQuit, u => u.MapFrom(s => s.SubjectVisit.Subject.IsSubjectQuit)) .ForMember(d => d.VisitNum, u => u.MapFrom(t => t.SubjectVisit.VisitNum)) .ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.SubjectVisit.TrialSite.TrialSiteCode)) diff --git a/IRaCIS.Core.Infrastructure/_IRaCIS/_Config/_StaticData.cs b/IRaCIS.Core.Infrastructure/_IRaCIS/_Config/_StaticData.cs index 3cb388af0..b63956c40 100644 --- a/IRaCIS.Core.Infrastructure/_IRaCIS/_Config/_StaticData.cs +++ b/IRaCIS.Core.Infrastructure/_IRaCIS/_Config/_StaticData.cs @@ -302,6 +302,8 @@ public static class StaticData public const string TrialQCResult_Export = "TrialQCResult_Export"; + public const string TrialImageBackRecordList_Export = "TrialImageBackRecordList_Export"; + } From e979649ef405108984e96960dce99eb3d1aeba25 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 30 Jul 2025 11:15:03 +0800 Subject: [PATCH 5/6] =?UTF-8?q?1=E3=80=81=E7=94=A8=E6=88=B7=E5=8F=82?= =?UTF-8?q?=E4=B8=8E=E9=A1=B9=E7=9B=AE=E7=BB=9F=E8=AE=A1=E6=95=B0=E5=AD=97?= =?UTF-8?q?=202=E3=80=81=E5=A4=8D=E6=A0=B8=E4=B8=8D=E5=85=81=E8=AE=B8?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=E9=87=8D=E4=BC=A0=203=E3=80=81CDISC=E5=AF=BC?= =?UTF-8?q?=E8=A1=A8=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Common/ExcelExportService.cs | 2 +- IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs | 2 ++ IRaCIS.Core.Application/Service/Management/_MapConfig.cs | 1 + IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs | 2 ++ IRaCIS.Core.Application/Service/QC/QCOperationService.cs | 6 ++++++ IRaCIS.Core.Application/Service/QC/_MapConfig.cs | 6 +++--- 6 files changed, 15 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs index a0d720659..4fa795ad6 100644 --- a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs +++ b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs @@ -3150,7 +3150,7 @@ namespace IRaCIS.Core.Application.Service.Common { //遍历病灶的每个问题 - foreach (var lessionItem in lession.LessionAnswerList) + foreach (var lessionItem in lession.LessionAnswerList.OrderBy(t=>t.ShowOrder)) { var cloneItem = item.Clone(); diff --git a/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs b/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs index 94228c00b..d711165cd 100644 --- a/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs +++ b/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs @@ -350,6 +350,8 @@ namespace IRaCIS.Application.Contracts public string ResearchProgramNo { get; set; } #endregion + + public int JoinedTrialCount { get; set; } } diff --git a/IRaCIS.Core.Application/Service/Management/_MapConfig.cs b/IRaCIS.Core.Application/Service/Management/_MapConfig.cs index 51fffdcc6..a307a3bdc 100644 --- a/IRaCIS.Core.Application/Service/Management/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Management/_MapConfig.cs @@ -154,6 +154,7 @@ namespace IRaCIS.Core.Application.Service .ForMember(d => d.IdentityUserId, c => c.MapFrom(t => t.Id)); CreateMap() .ForMember(d => d.TrialCode, u => u.MapFrom(s => s.Trial.TrialCode)) + .ForMember(d => d.JoinedTrialCount, u => u.MapFrom(s => s.UserTrialList.Count())) .ForMember(d => d.ResearchProgramNo, u => u.MapFrom(s => s.Trial.ResearchProgramNo)); CreateMap().ReverseMap(); diff --git a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs index 73dba46fb..ad95c2d6a 100644 --- a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs +++ b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs @@ -1397,6 +1397,8 @@ namespace IRaCIS.Core.Application.Contracts [Comment("自定义单位")] public string CustomUnit { get; set; } = string.Empty; + public int ShowOrder { get; set; } + #endregion diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs index 9f218078f..bbbe7157d 100644 --- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs @@ -2534,6 +2534,12 @@ namespace IRaCIS.Core.Application.Image.QA throw new BusinessValidationFailedException(_localizer["QCOperation_InvalidTransferStatus"]); } + if (sv.SecondReviewState == SecondReviewState.WaitAudit) + { + //复核的时候不允许申请重传 + throw new BusinessValidationFailedException(_localizer["QCOperation_SecondReviewNoReUpload"]); + } + if (qcChallenge.ReuploadEnum == QCChanllengeReuploadEnum.CRCReuploaded) { diff --git a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs index c0be11513..8c8ae3bed 100644 --- a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs @@ -303,9 +303,9 @@ namespace IRaCIS.Core.Application.Service .ForMember(o => o.LessionAnswerList, t => t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.ExportResultStr.Contains(((int)readingExportType).ToString())))); CreateMap() - //.ForMember(o => o.LessionCode, t => t.MapFrom(u => u.Lesion.RowMark)) - //.ForMember(o => o.LessionType, t => t.MapFrom(u => (int?)u.ReadingQuestionTrial.LesionType)) - + //.ForMember(o => o.LessionCode, t => t.MapFrom(u => u.Lesion.RowMark)) + //.ForMember(o => o.LessionType, t => t.MapFrom(u => (int?)u.ReadingQuestionTrial.LesionType)) + .ForMember(o => o.ShowOrder, t => t.MapFrom(u => u.ReadingTableQuestionTrial.ShowOrder)) .ForMember(o => o.CustomUnit, t => t.MapFrom(u => u.ReadingTableQuestionTrial.CustomUnit)) .ForMember(o => o.Unit, t => t.MapFrom(u => u.ReadingTableQuestionTrial.Unit)) .ForMember(o => o.TableQuesionId, t => t.MapFrom(u => u.ReadingTableQuestionTrial.Id)) From eccb127492bd042a3ea63428d4d334c9c27b7c37 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 30 Jul 2025 11:30:41 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/ImageAndDoc/DownloadAndUploadService.cs | 12 ++++++------ IRaCIS.Core.Application/Service/QC/QCListService.cs | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs index 73ff52173..c468fb52f 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs @@ -195,8 +195,8 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc Modalities = t.Modalities, SeriesCount = t.SeriesCount, - ReadingInstanceCount=t.InstanceList.Where(t=>t.IsReading && t.DicomSerie.IsReading).Count(), - ReadingSeriesCount= t.SeriesList.Where(t => t.IsReading).Count(), + ReadingInstanceCount = t.InstanceList.Where(t => t.IsReading && t.DicomSerie.IsReading).Count(), + ReadingSeriesCount = t.SeriesList.Where(t => t.IsReading).Count(), }).ToList(), UploadStudyList = u.TaskStudyList.Select(t => new StudyBasicInfo() @@ -731,7 +731,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc Path = t.Path }).ToList(), - ReadingFileCount= ns.FileCount, + ReadingFileCount = ns.FileCount, }; @@ -1126,7 +1126,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc HtmlPath = k.HtmlPath, Path = k.Path, InstanceNumber = k.InstanceNumber, - FileSize=k.FileSize, + FileSize = k.FileSize, }).ToList() }) }); @@ -1228,9 +1228,9 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc //DicomImageSize = t.StudyList.SelectMany(t => t.InstanceList).Sum(t => t.FileSize), //NoneDicomImageSize = t.NoneDicomStudyList.SelectMany(t => t.NoneDicomFileList).Sum(t => t.FileSize) }); + var defalutSortArray = new string[] { nameof(TrialVisitImageStatView.TrialSiteCode), nameof(QCCRCVisitViewModel.SubjectCode), nameof(QCCRCVisitViewModel.VisitNum) }; - - var pagelist = await query.Where(t => t.TotalImageCount > 0).ToPagedListAsync(inQuery); + var pagelist = await query.Where(t => t.TotalImageCount > 0).ToPagedListAsync(inQuery, defalutSortArray); return ResponseOutput.Ok(pagelist); } diff --git a/IRaCIS.Core.Application/Service/QC/QCListService.cs b/IRaCIS.Core.Application/Service/QC/QCListService.cs index ddc9444bd..d5ba73af0 100644 --- a/IRaCIS.Core.Application/Service/QC/QCListService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCListService.cs @@ -58,7 +58,7 @@ namespace IRaCIS.Core.Application.Image.QA .WhereIf(inQuery.AuditEndTime != null, t => t.AuditTime <= inQuery.AuditEndTime) .ProjectTo(_mapper.ConfigurationProvider); - var defalutSortArray = new string[] { nameof(ImageBackViewModel.IsUrgent) + " desc", nameof(ImageBackViewModel.SubjectCode), nameof(ImageBackViewModel.VisitNum) }; + var defalutSortArray = new string[] { nameof(ImageBackViewModel.ImageBackState), nameof(ImageBackViewModel.CreateTime), nameof(ImageBackViewModel.SubjectCode), nameof(ImageBackViewModel.VisitNum) }; var pageList = await query.ToPagedListAsync(inQuery, defalutSortArray); return ResponseOutput.Ok(pageList); @@ -490,7 +490,7 @@ namespace IRaCIS.Core.Application.Image.QA var secondReviewTime = inDto.SecondReviewTime != null ? (DateTime)inDto.SecondReviewTime : trialConfirmTime == null ? DateTime.Now : (DateTime)trialConfirmTime; if ((sv.AuditState == AuditStateEnum.QCPassed && inDto.CurrentQCEnum != CurrentQC.SecondReview) || (inDto.CurrentQCEnum == CurrentQC.SecondReview && secondReviewTime.AddSeconds(1) < trialConfirmTime) - || (sv.AuditState >= AuditStateEnum.PrimaryQCPassed && inDto.CurrentQCEnum==CurrentQC.First)) //1QC通过时,这个时候看1qc答案 + || (sv.AuditState >= AuditStateEnum.PrimaryQCPassed && inDto.CurrentQCEnum == CurrentQC.First)) //1QC通过时,这个时候看1qc答案 { //之前质控完的,+二次复核完的,都要从答案表中取 二次复核完的还需要加时间 @@ -718,7 +718,7 @@ namespace IRaCIS.Core.Application.Image.QA var qaChallengeQuery = _qcChallengeRepository.Where(t => t.SubjectVisitId == subjectVisitId && t.QCProcessEnum == trialQCProcess) .ProjectTo(_mapper.ConfigurationProvider, new { currentUserId = _userInfo.UserRoleId }); - var list = await qaChallengeQuery.OrderByDescending(t=>t.CreateTime).ToListAsync(); + var list = await qaChallengeQuery.OrderByDescending(t => t.CreateTime).ToListAsync(); //list.ForEach(t => t.DialogList.ToList().ForEach(u => u.IsCurrentUser = _userInfo.Id == u.CreateUserId));