diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs index ea11b3575..0941f9d25 100644 --- a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs @@ -541,10 +541,13 @@ namespace IRaCIS.Core.Application.Service var trialReadingCriterionId = filterObj.TrialReadingCriterionId; + //防止生成sql生成GETDATE() 时区导致的问题 + var appDateTimeNow = DateTime.Now; + #region Subejct 维度 Expression> comonTaskFilter = u => u.TrialId == trialId && u.IsAnalysisCreate == false && u.TaskState == TaskState.Effect && u.ReadingTaskState == ReadingTaskState.HaveSigned && u.TrialReadingCriterionId == trialReadingCriterionId && - u.SignTime!.Value.AddDays(filterObj.IntervalWeeks * 7) < DateTime.Now && (u.ReReadingApplyState == ReReadingApplyState.Default || u.ReReadingApplyState == ReReadingApplyState.Reject) && u.DoctorUserId == doctorUserId; + u.SignTime!.Value.AddDays(filterObj.IntervalWeeks * 7) < appDateTimeNow && (u.ReReadingApplyState == ReReadingApplyState.Default || u.ReReadingApplyState == ReReadingApplyState.Reject) && u.DoctorUserId == doctorUserId; @@ -562,7 +565,7 @@ namespace IRaCIS.Core.Application.Service //{ // //这里的过滤条件 不能用 where(comonTaskFilter) 会报错,奇怪的问题 只能重新写一遍 // visitTaskFilter = visitTaskFilter.And(c => c.Subject.SubjectVisitTaskList.Any(t => t.VisitTaskNum == c.VisitTaskNum + ReadingCommon.TaskNumDic[ReadingCategory.Global] && t.ReadingCategory == ReadingCategory.Global && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect && t.ReadingTaskState == ReadingTaskState.HaveSigned && - // t.SignTime!.Value.AddDays(filterObj.IntervalWeeks * 7) < DateTime.Now && (t.ReReadingApplyState == ReReadingApplyState.Default || t.ReReadingApplyState == ReReadingApplyState.Reject))); + // t.SignTime!.Value.AddDays(filterObj.IntervalWeeks * 7) < appDateTimeNow && (t.ReReadingApplyState == ReReadingApplyState.Default || t.ReReadingApplyState == ReReadingApplyState.Reject))); //} @@ -758,9 +761,12 @@ namespace IRaCIS.Core.Application.Service var trialId = inQuery.TrialId; + //防止生成sql生成GETDATE() 时区导致的问题 + var appDateTimeNow = DateTime.Now; + Expression> comonTaskFilter = u => u.TrialId == trialId && u.IsAnalysisCreate == false && u.TaskState == TaskState.Effect && u.ReadingTaskState == ReadingTaskState.HaveSigned && (u.ReReadingApplyState == ReReadingApplyState.Default || u.ReReadingApplyState == ReReadingApplyState.Reject); - //&& u.TrialReadingCriterionId == trialReadingCriterionId &&u.SignTime!.Value.AddDays(filterObj.IntervalWeeks * 7) < DateTime.Now && u.DoctorUserId == doctorUserId; + //&& u.TrialReadingCriterionId == trialReadingCriterionId &&u.SignTime!.Value.AddDays(filterObj.IntervalWeeks * 7) < appDateTimeNow && u.DoctorUserId == doctorUserId; Expression> visitTaskFilter = comonTaskFilter.And(t => t.ReadingCategory == ReadingCategory.Visit); @@ -792,16 +798,16 @@ namespace IRaCIS.Core.Application.Service MatchSubejctCount = taskConsistentRule.Trial.SubjectList.AsQueryable() .Where(t => taskConsistentRule.IsHaveReadingPeriod == false ? t.SubjectVisitTaskList.AsQueryable() - .Where(visitTaskFilter).Where(t => t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && t.SignTime!.Value.AddDays(taskConsistentRule.IntervalWeeks * 7) < DateTime.Now && t.DoctorUserId == user.Id) + .Where(visitTaskFilter).Where(t => t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && t.SignTime!.Value.AddDays(taskConsistentRule.IntervalWeeks * 7) < appDateTimeNow && t.DoctorUserId == user.Id) .Count() >= taskConsistentRule.PlanVisitCount : //全局要>计划访视数量后面 t.SubjectVisitTaskList.AsQueryable().Where(comonTaskFilter) - .Where(t => t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && t.SignTime!.Value.AddDays(taskConsistentRule.IntervalWeeks * 7) < DateTime.Now && t.DoctorUserId == user.Id) + .Where(t => t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && t.SignTime!.Value.AddDays(taskConsistentRule.IntervalWeeks * 7) < appDateTimeNow && t.DoctorUserId == user.Id) .Where(t => t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Global).Any(t => t.ReadingCategory == ReadingCategory.Global && t.VisitTaskNum>taskConsistentRule.PlanVisitCount-1) && t.SubjectVisitTaskList.AsQueryable().Where(visitTaskFilter) - .Where(t => t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && t.SignTime!.Value.AddDays(taskConsistentRule.IntervalWeeks * 7) < DateTime.Now && t.DoctorUserId == user.Id) + .Where(t => t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && t.SignTime!.Value.AddDays(taskConsistentRule.IntervalWeeks * 7) < appDateTimeNow && t.DoctorUserId == user.Id) .Count()>= taskConsistentRule.PlanVisitCount ) diff --git a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs index cfcfc40e7..f4fae36d3 100644 --- a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs +++ b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs @@ -164,7 +164,6 @@ namespace IRaCIS.Core.Application.Service.Common .WhereIf(queryParam.UserTypeId != null, t => t.UserTypeId == queryParam.UserTypeId) .WhereIf(queryParam.IsGenerateAccount != null, t => t.IsGenerateAccount == queryParam.IsGenerateAccount) .WhereIf(queryParam.State != null && queryParam.State != TrialSiteUserStateEnum.OverTime, t => t.InviteState == queryParam.State) - //.WhereIf(queryParam.State != null && queryParam.State == TrialSiteUserStateEnum.OverTime, t => t.InviteState == TrialSiteUserStateEnum.HasSend && t.ExpireTime < DateTime.Now) .WhereIf(!string.IsNullOrEmpty(queryParam.UserName), t => (t.LastName + " / " + t.FirstName).Contains(queryParam.UserName)) .WhereIf(!string.IsNullOrEmpty(queryParam.OrganizationName), t => t.OrganizationName.Contains(queryParam.OrganizationName)) .ProjectTo(_mapper.ConfigurationProvider); @@ -1153,6 +1152,7 @@ namespace IRaCIS.Core.Application.Service.Common var resultList = list.Where(t => t.ReadingCategory != ReadingCategory.Judge).ToList(); + if (arbitrationRule == ArbitrationRule.Visit) { @@ -1165,11 +1165,30 @@ namespace IRaCIS.Core.Application.Service.Common } if (arbitrationRule == ArbitrationRule.Reading) { + //先确定裁判选定的是谁 foreach (var item in resultList) { + //以最后一次裁判为准 找到最大的裁判的裁判选择的Arm,相同就设置裁判标记 item.IsGenerateJudge = list.Where(t => t.ReadingCategory == ReadingCategory.Judge && t.SubjectCode == item.SubjectCode && t.VisitTaskNum > item.VisitTaskNum ).OrderByDescending(t => t.VisitTaskNum).FirstOrDefault()?.JudgeArmEnum == item.ArmEnum ? true : false; + } + //全局裁判了,选择了那个全局,那么对应全局下面的访视 设置裁判标记 + foreach (var item in resultList.Where(t => t.ReadingCategory == ReadingCategory.Visit)) + { + + var selectJudegeGlobalList = resultList.Where(t => t.ReadingCategory == ReadingCategory.Global && t.IsGenerateJudge == true).ToList(); + + //全局修改了答案,那么给访视上赋值全局的结果 并且取的是最后的全局 + var existGlobalAnswer = selectJudegeGlobalList.Where(t => t.SubjectCode == item.SubjectCode).SelectMany(t => t.GlobalTaskAnswerList).Where(t => t.VisitTaskId == item.Id) + .OrderByDescending(t => t.GlobalTaskVisitNum).FirstOrDefault()?.Answer; + + item.OverallTumorEvaluationResult = string.IsNullOrEmpty(existGlobalAnswer) ? item.OverallTumorEvaluationResult : existGlobalAnswer; + + item.IsGenerateJudge = true; + } + + } //如果没有产生裁判,默认选择R1 @@ -1247,7 +1266,7 @@ namespace IRaCIS.Core.Application.Service.Common //处理裁判标记 list = DealJudgeMark(criterion.ArbitrationRule, list); - exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId); + exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list.Where(t => t.ReadingCategory != ReadingCategory.Global).ToList(), _userInfo.TimeZoneId); exportInfo.IsEn_US = _userInfo.IsEn_Us; exportInfo.ClientZoneId = _userInfo.TimeZoneId; @@ -1307,7 +1326,7 @@ namespace IRaCIS.Core.Application.Service.Common //处理裁判标记 list = DealJudgeMark(criterion.ArbitrationRule, list); - exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId); + exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list.Where(t=>t.ReadingCategory!=ReadingCategory.Global).ToList(), _userInfo.TimeZoneId); exportInfo.IsEn_US = _userInfo.IsEn_Us; exportInfo.ClientZoneId = _userInfo.TimeZoneId; diff --git a/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs b/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs index c9178a1d5..bf0a5b710 100644 --- a/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs +++ b/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs @@ -536,10 +536,13 @@ namespace IRaCIS.Application.Services [HttpGet("{doctorId:guid}")] public async Task GetAuditState(Guid doctorId) { + //防止生成sql生成GETDATE() 时区导致的问题 + var appDateTimeNow = DateTime.Now; + var doctor = (await _doctorRepository .ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync(t => t.Id == doctorId)).IfNullThrowException(); - doctor.InHoliday = (await _repository.CountAsync(x => x.DoctorId == doctorId && x.EndDate <= DateTime.Now && x.StartDate <= DateTime.Now)) > 0; + doctor.InHoliday = (await _repository.CountAsync(x => x.DoctorId == doctorId && x.EndDate <= appDateTimeNow && x.StartDate <= appDateTimeNow)) > 0; return doctor; } diff --git a/IRaCIS.Core.Application/Service/Doctor/VacationService.cs b/IRaCIS.Core.Application/Service/Doctor/VacationService.cs index 54f7b4ba0..118688920 100644 --- a/IRaCIS.Core.Application/Service/Doctor/VacationService.cs +++ b/IRaCIS.Core.Application/Service/Doctor/VacationService.cs @@ -79,7 +79,10 @@ namespace IRaCIS.Application.Services [NonDynamicMethod] public async Task OnVacation(Guid doctorId) { - var count = await _vacationRepository.CountAsync(u => u.DoctorId == doctorId && u.EndDate >= DateTime.Now && u.StartDate <= DateTime.Now); + //防止生成sql生成GETDATE() 时区导致的问题 + var appDateTimeNow = DateTime.Now; + + var count = await _vacationRepository.CountAsync(u => u.DoctorId == doctorId && u.EndDate >= appDateTimeNow && u.StartDate <= appDateTimeNow); return ResponseOutput.Result(count > 0); } diff --git a/IRaCIS.Core.Application/Service/Management/SystemNoticeService.cs b/IRaCIS.Core.Application/Service/Management/SystemNoticeService.cs index 9bbe12288..e4735770c 100644 --- a/IRaCIS.Core.Application/Service/Management/SystemNoticeService.cs +++ b/IRaCIS.Core.Application/Service/Management/SystemNoticeService.cs @@ -27,14 +27,15 @@ namespace IRaCIS.Core.Application.Service [HttpPost] public async Task> GetSystemNoticeList(SystemNoticeQuery querySystemNotice) { - + //防止生成sql生成GETDATE() 时区导致的问题 + var appDateTimeNow = DateTime.Now; var systemNoticeQueryable = _systemNoticeRepository .WhereIf(querySystemNotice.ApplicableProjectEnum != null, t => t.ApplicableProjectEnum == querySystemNotice.ApplicableProjectEnum) .WhereIf(querySystemNotice.NoticeLevelEnum != null, t => t.NoticeLevelEnum == querySystemNotice.NoticeLevelEnum) .WhereIf(querySystemNotice.NoticeModeEnum != null, t => t.NoticeModeEnum == querySystemNotice.NoticeModeEnum) .WhereIf(querySystemNotice.NoticeStateEnum != null && querySystemNotice.NoticeStateEnum != Domain.Share.Management.SystemNotice_NoticeStateEnum.HaveExpired, t => t.NoticeStateEnum == querySystemNotice.NoticeStateEnum) - .WhereIf(querySystemNotice.NoticeModeEnum != null && querySystemNotice.NoticeStateEnum == Domain.Share.Management.SystemNotice_NoticeStateEnum.HaveExpired, t => t.NoticeStateEnum == Domain.Share.Management.SystemNotice_NoticeStateEnum.HavePublished && t.EndDate !=null && t.EndDate < DateTime.Now) + .WhereIf(querySystemNotice.NoticeModeEnum != null && querySystemNotice.NoticeStateEnum == Domain.Share.Management.SystemNotice_NoticeStateEnum.HaveExpired, t => t.NoticeStateEnum == Domain.Share.Management.SystemNotice_NoticeStateEnum.HavePublished && t.EndDate !=null && t.EndDate < appDateTimeNow) .WhereIf(querySystemNotice.NoticeTypeEnum != null, t => t.NoticeTypeEnum == querySystemNotice.NoticeTypeEnum) .WhereIf(!string.IsNullOrWhiteSpace(querySystemNotice.FileName), t => t.FileName.Contains(querySystemNotice.FileName)) .WhereIf(!string.IsNullOrWhiteSpace(querySystemNotice.NoticeContent), t => t.NoticeContent.Contains(querySystemNotice.NoticeContent)) @@ -117,13 +118,16 @@ namespace IRaCIS.Core.Application.Service [HttpPost] public async Task> GetUserSystemNoticeList(SystemNoticeQuery querySystemNotice) { + //防止生成sql生成GETDATE() 时区导致的问题 + var appDateTimeNow = DateTime.Now; + var systemNoticeQueryable = _systemNoticeRepository .Where(t => t.NoticeUserTypeList.Any(t => t.UserTypeId == _userInfo.UserTypeId) && t.NoticeStateEnum==Domain.Share.Management.SystemNotice_NoticeStateEnum.HavePublished) .WhereIf(querySystemNotice.ApplicableProjectEnum != null, t => t.ApplicableProjectEnum == querySystemNotice.ApplicableProjectEnum) .WhereIf(querySystemNotice.NoticeLevelEnum != null, t => t.NoticeLevelEnum == querySystemNotice.NoticeLevelEnum) .WhereIf(querySystemNotice.NoticeModeEnum != null, t => t.NoticeModeEnum == querySystemNotice.NoticeModeEnum) .WhereIf(querySystemNotice.NoticeStateEnum != null && querySystemNotice.NoticeStateEnum != Domain.Share.Management.SystemNotice_NoticeStateEnum.HaveExpired, t => t.NoticeStateEnum == querySystemNotice.NoticeStateEnum) - .WhereIf(querySystemNotice.NoticeModeEnum != null && querySystemNotice.NoticeStateEnum == Domain.Share.Management.SystemNotice_NoticeStateEnum.HaveExpired, t => t.NoticeStateEnum == Domain.Share.Management.SystemNotice_NoticeStateEnum.HavePublished && t.EndDate != null && t.EndDate < DateTime.Now) + .WhereIf(querySystemNotice.NoticeModeEnum != null && querySystemNotice.NoticeStateEnum == Domain.Share.Management.SystemNotice_NoticeStateEnum.HaveExpired, t => t.NoticeStateEnum == Domain.Share.Management.SystemNotice_NoticeStateEnum.HavePublished && t.EndDate != null && t.EndDate < appDateTimeNow) .WhereIf(querySystemNotice.NoticeTypeEnum != null, t => t.NoticeTypeEnum == querySystemNotice.NoticeTypeEnum) .WhereIf(!string.IsNullOrWhiteSpace(querySystemNotice.FileName), t => t.FileName.Contains(querySystemNotice.FileName)) .WhereIf(!string.IsNullOrWhiteSpace(querySystemNotice.NoticeContent), t => t.NoticeContent.Contains(querySystemNotice.NoticeContent)) @@ -135,9 +139,12 @@ namespace IRaCIS.Core.Application.Service public async Task> GetUserNoticeList() { + //防止生成sql生成GETDATE() 时区导致的问题 + var appDateTimeNow = DateTime.Now; + var query = _systemNoticeRepository .Where(t => t.NoticeUserTypeList.Any(t => t.UserTypeId == _userInfo.UserTypeId) && t.NoticeStateEnum == Domain.Share.Management.SystemNotice_NoticeStateEnum.HavePublished && !t.NoticeUserReadList.Any(t => t.CreateUserId == _userInfo.Id)) - .Where(t=>t.EndDate==null || t.EndDate != null && t.EndDate > DateTime.Now) + .Where(t=>t.EndDate==null || t.EndDate != null && t.EndDate > appDateTimeNow) .ProjectTo(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, userId = _userInfo.Id }); return await query.ToListAsync(); diff --git a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs index 82c491a75..2db5966a6 100644 --- a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs +++ b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs @@ -865,13 +865,6 @@ namespace IRaCIS.Core.Application.Contracts public string OverallTumorEvaluationResult { get; set; } - #region old 废弃 - - //public Guid? JudgeResultTaskId { get; set; } - - //[DictionaryTranslateAttribute("YesOrNo")] - //public bool IsGenerateJudge => JudgeResultTaskId != null; - #endregion public Arm? JudgeArmEnum { get; set; } @@ -882,8 +875,20 @@ namespace IRaCIS.Core.Application.Contracts public bool IsGenerateJudge { get; set; } + [JsonIgnore] + + public List GlobalTaskAnswerList { get; set; } + } + public class GlobalAnswerInfo + { + public decimal GlobalTaskVisitNum { get; set; } + public Guid VisitTaskId { get; set; } + + public string Answer { get; set; } + + } public class RECIST1Point1EvaluationOfTumorEfficacyExport : OverallTumorEvaluationExport diff --git a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs index 7bb30bb77..2110ce0bd 100644 --- a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs @@ -182,7 +182,12 @@ namespace IRaCIS.Core.Application.Service .ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.Subject.TrialSite.TrialSiteCode)) .ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.Subject.Code)) - .ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName)); + .ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName)) + .ForMember(o => o.GlobalTaskAnswerList, t => t.MapFrom(u => u.GlobalVisitResultList.Where(t=>t.GlobalAnswerType== GlobalAnswerType.Question) + .Select(c=>new GlobalAnswerInfo() { GlobalTaskVisitNum=c.VisitTask.VisitTaskNum,VisitTaskId=c.TaskId ,Answer=c.Answer}))) + + + ; CreateMap().IncludeBase() .ForMember(o => o.TargetlesionEvaluationResult, t => t.MapFrom(u => u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.TargetLesion).FirstOrDefault()!.Answer)) diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/DicomAEViewModel.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/DicomAEViewModel.cs index f3f03e1ce..50cc7d550 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/DicomAEViewModel.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/DicomAEViewModel.cs @@ -53,9 +53,9 @@ namespace IRaCIS.Core.Application.ViewModel [NotDefault] public Guid TrialId { get; set; } - public string CalledAE { get; set; } - public string IP { get; set; } - public int Port { get; set; } + public string CalledAE { get; set; } = string.Empty; + public string IP { get; set; } = string.Empty; + public int? Port { get; set; } public string Modality { get; set; } = string.Empty; public string Description { get; set; } = string.Empty; diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs index ae62d3db5..936d470b7 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs @@ -1248,7 +1248,8 @@ namespace IRaCIS.Core.Application //} - + //防止生成sql生成GETDATE() 时区导致的问题 + var appDateTimeNow = DateTime.Now; var record = new UserToBeDoneRecord() { @@ -1264,7 +1265,7 @@ namespace IRaCIS.Core.Application SysNoticeUnReadCount= await _systemNoticeRepository.Where(t => t.NoticeUserTypeList.Any(t => t.UserTypeId == _userInfo.UserTypeId) && t.NoticeStateEnum == Domain.Share.Management.SystemNotice_NoticeStateEnum.HavePublished && !t.NoticeUserReadList.Any(t => t.CreateUserId == _userInfo.Id)) - .Where(t => t.EndDate == null || t.EndDate != null && t.EndDate > DateTime.Now) + .Where(t => t.EndDate == null || t.EndDate != null && t.EndDate > appDateTimeNow) .CountAsync(), #region PM diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialDicomAEService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialDicomAEService.cs index beb413107..4c68b5992 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialDicomAEService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialDicomAEService.cs @@ -29,7 +29,7 @@ namespace IRaCIS.Core.Application.Service _trialRepository = trialRepository; _dicomAERepository = dicomAERepository; } - + [HttpPost] public async Task>> GetDicomAEList(DicomAEQuery inQuery) { @@ -83,12 +83,21 @@ namespace IRaCIS.Core.Application.Service // IsVerify=addOrEditDicomAE.Id==null //}; - // 在此处拷贝automapper 映射 - var entity = await _dicomAERepository.InsertOrUpdateAsync(addOrEditDicomAE, true, verifyExp1); - await _trialRepository.UpdatePartialFromQueryAsync(t => t.Id == addOrEditDicomAE.TrialId, u => new Trial() { IsPACSConnect = addOrEditDicomAE.IsPACSConnect }, true); - return ResponseOutput.Ok(entity.Id.ToString()); + + if (addOrEditDicomAE.IsPACSConnect) + { + // 在此处拷贝automapper 映射 + var entity = await _dicomAERepository.InsertOrUpdateAsync(addOrEditDicomAE, true, verifyExp1); + + return ResponseOutput.Ok(entity.Id.ToString()); + } + else + { + return ResponseOutput.Ok(); + } + } diff --git a/IRaCIS.Core.Domain/Reading/ClinicalData/ReadingConsistentClinicalData.cs b/IRaCIS.Core.Domain/Reading/ClinicalData/ReadingConsistentClinicalData.cs index 66c216fc9..c57fc08e7 100644 --- a/IRaCIS.Core.Domain/Reading/ClinicalData/ReadingConsistentClinicalData.cs +++ b/IRaCIS.Core.Domain/Reading/ClinicalData/ReadingConsistentClinicalData.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; namespace IRaCIS.Core.Domain.Models { /// - /// 项目的临床数据 + /// 一致性分析临床数据 /// [Table("ReadingConsistentClinicalData")] public class ReadingConsistentClinicalData : Entity, IAuditAdd diff --git a/IRaCIS.Core.Domain/Reading/ClinicalData/ReadingConsistentClinicalDataPDF.cs b/IRaCIS.Core.Domain/Reading/ClinicalData/ReadingConsistentClinicalDataPDF.cs index ce3183971..ab442df64 100644 --- a/IRaCIS.Core.Domain/Reading/ClinicalData/ReadingConsistentClinicalDataPDF.cs +++ b/IRaCIS.Core.Domain/Reading/ClinicalData/ReadingConsistentClinicalDataPDF.cs @@ -7,10 +7,10 @@ using System.ComponentModel.DataAnnotations.Schema; namespace IRaCIS.Core.Domain.Models { - /// - /// 项目的临床数据 - /// - [Table("ReadingConsistentClinicalDataPDF")] + /// + /// 一致性分析临床数据 + /// + [Table("ReadingConsistentClinicalDataPDF")] public class ReadingConsistentClinicalDataPDF : Entity, IAuditAdd { [JsonIgnore]