diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs index 67de9f202..c8cdf0cd7 100644 --- a/IRaCIS.Core.Application/Service/Management/UserService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserService.cs @@ -442,7 +442,16 @@ namespace IRaCIS.Core.Application.Service await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = identityUserId, ActionUserName = _userInfo.UserName, TargetIdentityUserId = identityUserId, OptType = UserOptType.UnloginModifyPasswoed }, true); - await _mailVerificationService.AfterUserModifyPasswordSendEmailAsync(identityUserId); + try + { + await _mailVerificationService.AfterUserModifyPasswordSendEmailAsync(identityUserId); + } + catch (Exception) + { + + + } + var find = await _identityUserRepository.FindAsync(identityUserId); diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/MRIPDFFAdvanceCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/MRIPDFFAdvanceCalculateService.cs index 735c53616..313d1bb00 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/MRIPDFFAdvanceCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/MRIPDFFAdvanceCalculateService.cs @@ -517,11 +517,11 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate public async Task VerifyVisitTaskQuestions(VerifyVisitTaskQuestionsInDto inDto) { - ReadingCalculateDto readingData = await _generalCalculateService.GetReadingCalculateDto(inDto.VisitTaskId); + //ReadingCalculateDto readingData = await _generalCalculateService.GetReadingCalculateDto(inDto.VisitTaskId); - var markList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).ToListAsync(); - var rowInfo = readingData.QuestionInfo.Where(x => x.LesionType == LesionType.FatFraction) - .SelectMany(x => x.TableRowInfoList).ToList(); + //var markList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).ToListAsync(); + //var rowInfo = readingData.QuestionInfo.Where(x => x.LesionType == LesionType.FatFraction) + // .SelectMany(x => x.TableRowInfoList).ToList(); //var tableQuestionList = rowInfo.Where(x => x.TableQuestionList.Any(x => x.QuestionMark == QuestionMark.AverageValue && x.Answer.IsNotNullOrEmpty())).ToList(); @@ -530,32 +530,39 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate // throw new BusinessValidationFailedException(_localizer["MRIPDFF_AllNeedToBeMark"]); //} - try - { - List questionMarkList = new List() { QuestionMark.FirstMeasurement, QuestionMark.SecondMeasurement, QuestionMark.ThirdMeasurement, QuestionMark.FourthMeasurement }; - var measuredValueList = rowInfo.SelectMany(x => x.TableQuestionList).Where(x =>x.Answer.IsNotNullOrEmpty()&& questionMarkList.Contains(x.QuestionMark)).Select(x => decimal.Parse(x.Answer)).ToList(); - if (measuredValueList.Any(x => x > 100)) - { - throw new BusinessValidationFailedException(_localizer["MRIPDFF_MeasurementGT100"]); - } - } - catch (Exception) - { + var instanceCount = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.InstanceId != null).Select(x => x.InstanceId).Distinct().CountAsync(); - throw new BusinessValidationFailedException(_localizer["MRIPDFF_MeasurementGT100"]); + if (instanceCount > 1) + { + throw new BusinessValidationFailedException(_localizer["MRIPDFFAdvance_MarkMustBeSameInstance"]); } - var notableQuestionList = rowInfo.Where(x => x.TableQuestionList.Any(x => x.QuestionMark == QuestionMark.IsMeasurable && x.Answer.EqEnum(YesOrNoOrNa.No))).ToList(); + //try + //{ + // List questionMarkList = new List() { QuestionMark.FirstMeasurement, QuestionMark.SecondMeasurement, QuestionMark.ThirdMeasurement, QuestionMark.FourthMeasurement }; + // var measuredValueList = rowInfo.SelectMany(x => x.TableQuestionList).Where(x =>x.Answer.IsNotNullOrEmpty()&& questionMarkList.Contains(x.QuestionMark)).Select(x => decimal.Parse(x.Answer)).ToList(); + // if (measuredValueList.Any(x => x > 100)) + // { + // throw new BusinessValidationFailedException(_localizer["MRIPDFF_MeasurementGT100"]); + // } + //} + //catch (Exception) + //{ + + // throw new BusinessValidationFailedException(_localizer["MRIPDFF_MeasurementGT100"]); + //} + + //var notableQuestionList = rowInfo.Where(x => x.TableQuestionList.Any(x => x.QuestionMark == QuestionMark.IsMeasurable && x.Answer.EqEnum(YesOrNoOrNa.No))).ToList(); - foreach (var item in notableQuestionList) - { - if (markList.Any(x => x.RowId == item.RowId && x.MeasureData.IsNotNullOrEmpty())) - { - throw new BusinessValidationFailedException(_localizer["MRIPDFF_NeedClearMark"]); - } - } - + //foreach (var item in notableQuestionList) + //{ + // if (markList.Any(x => x.RowId == item.RowId && x.MeasureData.IsNotNullOrEmpty())) + // { + // throw new BusinessValidationFailedException(_localizer["MRIPDFF_NeedClearMark"]); + // } + //} + } } } diff --git a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs index d9ff423a0..8899f8bd1 100644 --- a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs +++ b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs @@ -3237,6 +3237,11 @@ namespace IRaCIS.Core.Domain.Share /// 保存eCRF /// SaveEICRFQuestions = 12, + + /// + /// 保存Advance肝脏分段 + /// + SaveAdvanceLiverSegments = 13, } ///