diff --git a/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs b/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs index efed114e2..08b2cd225 100644 --- a/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs @@ -208,7 +208,11 @@ public class AuditDocumentService(IRepository _auditDocumentRepos { var defalutSortArray = new string[] { nameof(AuditDocumentData.AuditDocumentTypeEnum), nameof(AuditDocumentData.Name) }; - + if (inDto.SortField.IsNotNullOrEmpty()) + { + defalutSortArray = new string[] { nameof(AuditDocumentData.AuditDocumentTypeEnum), inDto.SortField + (inDto.Asc ? " asc" : " desc") }; + inDto.SortField = string.Empty; + } // 新取出来排序 然后再找子项 var data= (await _auditDocumentRepository .Where(x=>x.AuditDocumentTypeEnum!=AuditDocumentType.HistoricalVersion) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index 88e5c54d6..6e1065bc5 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -52,6 +52,7 @@ namespace IRaCIS.Core.Application.Service IRepository _readModuleRepository, IRepository _dicomInstanceRepository, IRepository _organInfoRepository, + IRepository _organTrialInfoRepository, IRepository _trialDocumentRepository, ILuganoCalculateService _luganoCalculateService, IRepository _readingCustomTagRepository, @@ -2391,6 +2392,22 @@ namespace IRaCIS.Core.Application.Service + break; + + case CriterionType.mRECISTHCC: + + var orginInfo=await _organTrialInfoRepository.Where(x =>x.TrialCriterionId== taskinfo.TrialReadingCriterionId&& x.OrganInfoId == inDto.OrganInfoId).FirstOrDefaultAsync(); + + if (orginInfo != null && orginInfo.TULOCEN == "Liver") + { + var otherorganCount=await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.QuestionId == inDto.QuestionId && x.Id!=inDto.Id&&x.OrganInfo.TULOCEN == "Liver").CountAsync(); + if (otherorganCount >=2) + { + throw new BusinessValidationFailedException(_localizer["ReadingImageTask_HCCOrganRepeat"]); + } + + } + break; } var questionInfo = await _readingQuestionTrialRepository.Where(x => x.Id == inDto.QuestionId).FirstNotNullAsync(); diff --git a/IRaCIS.Core.Application/Service/Visit/VisitPlanService.cs b/IRaCIS.Core.Application/Service/Visit/VisitPlanService.cs index 8ad101753..d4e935822 100644 --- a/IRaCIS.Core.Application/Service/Visit/VisitPlanService.cs +++ b/IRaCIS.Core.Application/Service/Visit/VisitPlanService.cs @@ -435,7 +435,7 @@ namespace IRaCIS.Core.Application.Service //变更某一访视计划Item 受试者访视相关字段 - await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.TrialId == trialId && t.VisitStageId == changedItem.Id, k => new SubjectVisit() + await _subjectVisitRepository.UpdatePartialFromQueryAsync(t => t.TrialId == trialId && t.VisitStageId == changedItem.Id, k => new SubjectVisit() { IsBaseLine = changedItem.IsBaseLine, VisitName = changedItem.VisitName,