Test.EIImageViewer
hang 2023-02-27 14:50:41 +08:00
commit 797eff73fa
2 changed files with 11 additions and 3 deletions

View File

@ -333,11 +333,18 @@ namespace IRaCIS.Application.Services
}; };
if (criterionType != CriterionType.PCWG3) if (criterionType != CriterionType.PCWG3)
{ {
var agreeOrNotAnswer = globalReadingQuestion.Where(y => y.TaskId == x.VisitTaskId && y.GlobalAnswerType == GlobalAnswerType.AgreeOrNot).Select(x => x.Answer).FirstOrDefault() ?? string.Empty;
if (agreeOrNotAnswer.IsNullOrEmpty()&& lastGlobalTask.RelatedVisitTaskIdList.Contains(x.VisitTaskId))
{
agreeOrNotAnswer = "1";
}
x.AgreeOrNot = new List<GlobalQuestionInfo>() x.AgreeOrNot = new List<GlobalQuestionInfo>()
{ {
new GlobalQuestionInfo() new GlobalQuestionInfo()
{ {
Answer = globalReadingQuestion.Where(y => y.TaskId == x.VisitTaskId && y.GlobalAnswerType == GlobalAnswerType.AgreeOrNot).Select(x => x.Answer).FirstOrDefault() ?? string.Empty, Answer = agreeOrNotAnswer,
QuestionName = "", QuestionName = "",
Type = "input", Type = "input",
GlobalAnswerType=GlobalAnswerType.AgreeOrNot, GlobalAnswerType=GlobalAnswerType.AgreeOrNot,

View File

@ -917,6 +917,7 @@ namespace IRaCIS.Application.Services
Unit = x.Unit, Unit = x.Unit,
}).ToList(); }).ToList();
}); });
var thisAnswer = tableAnswers.Where(x => x.QuestionId == item.Id).ToList(); var thisAnswer = tableAnswers.Where(x => x.QuestionId == item.Id).ToList();
var orders = thisAnswer.Select(x => x.RowIndex).Distinct().OrderBy(x => x).ToList(); var orders = thisAnswer.Select(x => x.RowIndex).Distinct().OrderBy(x => x).ToList();
item.TableQuestions.Answers = new List<Dictionary<string, string>>(); item.TableQuestions.Answers = new List<Dictionary<string, string>>();
@ -1390,11 +1391,11 @@ namespace IRaCIS.Application.Services
if (inDto.RowIndex % 1 == 0) if (inDto.RowIndex % 1 == 0)
{ {
if (questionInfo.MaxQuestionCount != null && questionInfo.MaxQuestionCount != 0) if (questionInfo.MaxQuestionCount != null && questionInfo.MaxQuestionCount != 0&& inDto.RowId==null)
{ {
if (questionInfo.MaxQuestionCount < if (questionInfo.MaxQuestionCount <
( (
(await _readingTableAnswerRowInfoRepository.Where(x => x.RowIndex != inDto.RowIndex && ((x.RowIndex % 1) == 0) && x.VisitTaskId == inDto.VisitTaskId (await _readingTableAnswerRowInfoRepository.Where(x => ((x.RowIndex % 1) == 0) && x.VisitTaskId == inDto.VisitTaskId
&& x.QuestionId == inDto.QuestionId && x.QuestionId == inDto.QuestionId
).CountAsync()) + 1)) ).CountAsync()) + 1))
{ {