修改一版
This commit is contained in:
@@ -92,6 +92,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
{
|
||||
public Guid? QuestionId { get; set; }
|
||||
|
||||
public bool IsHaveChange { get; set; } = false;
|
||||
|
||||
public string QuestionName { get; set; }
|
||||
|
||||
public string Answer { get; set; }
|
||||
@@ -357,8 +359,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public string QuestionName { get; set; }
|
||||
|
||||
public string Answer { get; set; }
|
||||
public dynamic Answer { get; set; }
|
||||
|
||||
public JudgeReadingQuestionType QuestionType { get; set; } = JudgeReadingQuestionType.Question;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -209,6 +209,7 @@ namespace IRaCIS.Application.Services
|
||||
(lr.global.Select(x => x.Answer).FirstOrDefault().IsNullOrEmpty()&& inDto.UsingOriginalData?
|
||||
lr.question.Answer:lr.global.Select(x => x.Answer).FirstOrDefault()
|
||||
),
|
||||
IsHaveChange= lr.global==null? false: lr.global.Any(),
|
||||
QuestionId = lr.question.QuestionId,
|
||||
QuestionName = lr.question.QuestionName,
|
||||
Type = lr.question.Type,
|
||||
@@ -801,7 +802,7 @@ namespace IRaCIS.Application.Services
|
||||
VisitTaskInfoList = new List<JudgeReadingQuestion>(),
|
||||
};
|
||||
|
||||
judgeReadingInfo.VisitTaskInfoList.Add(new JudgeReadingQuestion()
|
||||
var judgeReadingQuestion = new JudgeReadingQuestion()
|
||||
{
|
||||
ArmEnum = item.ArmEnum,
|
||||
VisitTaskId = item.VisitTaskId,
|
||||
@@ -812,10 +813,28 @@ namespace IRaCIS.Application.Services
|
||||
QuestionId = x.QuestionId.Value,
|
||||
QuestionName = x.QuestionName
|
||||
}).ToList()
|
||||
};
|
||||
|
||||
|
||||
|
||||
// 加全局是否更新 和访视点注释
|
||||
judgeReadingQuestion.JudgeQuestionList.Add( new JudgeQuestion() {
|
||||
Answer= item.AfterQuestionList.Any(x=>x.IsHaveChange),
|
||||
QuestionType= JudgeReadingQuestionType.GlobalChange,
|
||||
|
||||
});
|
||||
|
||||
judgeReadingQuestion.JudgeQuestionList.Add(new JudgeQuestion()
|
||||
{
|
||||
Answer = item.AfterQuestionList.Where(x => x.QuestionId==null).Select(x=>x.Answer).FirstOrDefault(),
|
||||
QuestionType = JudgeReadingQuestionType.VisitRemark,
|
||||
|
||||
});
|
||||
|
||||
judgeReadingInfo.VisitTaskInfoList.Add(judgeReadingQuestion);
|
||||
if (twoItem != null)
|
||||
{
|
||||
judgeReadingInfo.VisitTaskInfoList.Add(new JudgeReadingQuestion()
|
||||
var rTwoJudge = new JudgeReadingQuestion()
|
||||
{
|
||||
ArmEnum = twoItem.ArmEnum,
|
||||
VisitTaskId = twoItem.VisitTaskId,
|
||||
@@ -826,7 +845,24 @@ namespace IRaCIS.Application.Services
|
||||
QuestionId = x.QuestionId.Value,
|
||||
QuestionName = x.QuestionName
|
||||
}).ToList()
|
||||
};
|
||||
|
||||
// 加全局是否更新 和访视点注释
|
||||
judgeReadingQuestion.JudgeQuestionList.Add(new JudgeQuestion()
|
||||
{
|
||||
Answer = twoItem.AfterQuestionList.Any(x => x.IsHaveChange),
|
||||
QuestionType = JudgeReadingQuestionType.GlobalChange,
|
||||
|
||||
});
|
||||
|
||||
judgeReadingQuestion.JudgeQuestionList.Add(new JudgeQuestion()
|
||||
{
|
||||
Answer = twoItem.AfterQuestionList.Where(x => x.QuestionId == null).Select(x => x.Answer).FirstOrDefault(),
|
||||
QuestionType = JudgeReadingQuestionType.VisitRemark,
|
||||
|
||||
});
|
||||
|
||||
judgeReadingInfo.VisitTaskInfoList.Add(rTwoJudge);
|
||||
}
|
||||
|
||||
judgeInfo.VisitInfoList.Add(judgeReadingInfo);
|
||||
|
||||
Reference in New Issue
Block a user