diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs index a0658c9ae..c436ce0bc 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs @@ -663,30 +663,33 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate List stateIsNullList = tableAnswerList.Select(x => x.OrderMark + x.RowIndex.GetLesionMark()).ToList(); + // 交集 List allExists = measureDataList.Intersect(stateIsNullList).ToList(); + // 差集 measureDataList = measureDataList.Except(allExists).ToList(); stateIsNullList = stateIsNullList.Except(allExists).ToList(); - - if (measureDataList.Count() > 0) { + // 无标记 errorMassage += _localizer["ReadingCalculate_NoMarker", string.Join(',', measureDataList)] + ","; } - - if (tableAnswerList.Count > 0) + if (stateIsNullList.Count > 0) { + // 状态为空 errorMassage += _localizer["ReadingCalculate_StatusIsEmpty", string.Join(',', stateIsNullList)] + ","; } if (allExists.Count > 0) { - errorMassage += _localizer["ReadingCalculate_NoMarkerEmpty", string.Join(',', stateIsNullList)] + ","; + // 未做标记且状态为空 + errorMassage += _localizer["ReadingCalculate_NoMarkerEmpty", string.Join(',', allExists)] + ","; } if (errorMassage != string.Empty) { + errorMassage = _localizer["ReadingCalculate_Questionable"] + errorMassage; throw new BusinessValidationFailedException(errorMassage); } diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/MRECISTHCCCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/MRECISTHCCCalculateService.cs index bab7e7a45..7fec5ce2c 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/MRECISTHCCCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/MRECISTHCCCalculateService.cs @@ -479,8 +479,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate List measureDataList = rowAnswerList.Where(x => !unableEvaluateRowIds.Contains(x.Id)).Select(x => x.OrderMark + x.RowIndex.GetLesionMark()).ToList(); List stateIsNullList = tableAnswerList.Select(x => x.OrderMark + x.RowIndex.GetLesionMark()).ToList(); + // 交集 List allExists = measureDataList.Intersect(stateIsNullList).ToList(); - // 取差 + // 差集 measureDataList = measureDataList.Except(allExists).ToList(); stateIsNullList = stateIsNullList.Except(allExists).ToList(); if (measureDataList.Count() > 0) @@ -489,7 +490,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate errorMassage += _localizer["ReadingCalculate_NoMarker", string.Join(',', measureDataList)] + ","; } - if (tableAnswerList.Count > 0) + if (stateIsNullList.Count > 0) { // 状态为空 errorMassage += _localizer["ReadingCalculate_StatusIsEmpty", string.Join(',', stateIsNullList)] + ","; @@ -498,7 +499,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate if (allExists.Count > 0) { // 未做标记且状态为空 - errorMassage += _localizer["ReadingCalculate_NoMarkerEmpty", string.Join(',', stateIsNullList)] + ","; + errorMassage += _localizer["ReadingCalculate_NoMarkerEmpty", string.Join(',', allExists)] + ","; } diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs index b1cb1fe49..32ad07dc4 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs @@ -481,8 +481,10 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate List measureDataList = rowAnswerList.Where(x => !unableEvaluateRowIds.Contains(x.Id)).Select(x => x.OrderMark + x.RowIndex.GetLesionMark()).ToList(); List stateIsNullList = tableAnswerList.Select(x => x.OrderMark + x.RowIndex.GetLesionMark()).ToList(); + + // 交集 List allExists = measureDataList.Intersect(stateIsNullList).ToList(); - // 取差 + // 差集 measureDataList = measureDataList.Except(allExists).ToList(); stateIsNullList = stateIsNullList.Except(allExists).ToList(); if (measureDataList.Count() > 0) @@ -491,7 +493,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate errorMassage += _localizer["ReadingCalculate_NoMarker", string.Join(',', measureDataList)] + ","; } - if (tableAnswerList.Count > 0) + if (stateIsNullList.Count > 0) { // 状态为空 errorMassage += _localizer["ReadingCalculate_StatusIsEmpty", string.Join(',', stateIsNullList)] + ","; @@ -500,7 +502,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate if (allExists.Count > 0) { // 未做标记且状态为空 - errorMassage += _localizer["ReadingCalculate_NoMarkerEmpty", string.Join(',', stateIsNullList)] + ","; + errorMassage += _localizer["ReadingCalculate_NoMarkerEmpty", string.Join(',', allExists)] + ","; } diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1_BMCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1_BMCalculateService.cs index 95e3483b3..555a28e5b 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1_BMCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1_BMCalculateService.cs @@ -482,25 +482,27 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate List stateIsNullList = tableAnswerList.Select(x => x.OrderMark + x.RowIndex.GetLesionMark()).ToList(); + // 交集 List allExists = measureDataList.Intersect(stateIsNullList).ToList(); + // 差集 measureDataList = measureDataList.Except(allExists).ToList(); stateIsNullList = stateIsNullList.Except(allExists).ToList(); - - if (measureDataList.Count() > 0) { + // 无标记 errorMassage += _localizer["ReadingCalculate_NoMarker", string.Join(',', measureDataList)] + ","; } - - if (tableAnswerList.Count > 0) + if (stateIsNullList.Count > 0) { + // 状态为空 errorMassage += _localizer["ReadingCalculate_StatusIsEmpty", string.Join(',', stateIsNullList)] + ","; } if (allExists.Count > 0) { - errorMassage += _localizer["ReadingCalculate_NoMarkerEmpty", string.Join(',', stateIsNullList)] + ","; + // 未做标记且状态为空 + errorMassage += _localizer["ReadingCalculate_NoMarkerEmpty", string.Join(',', allExists)] + ","; }