修改稽查
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
359a6bf602
commit
d97edf6688
|
|
@ -3356,7 +3356,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
// 如果是PCGW标准 则把中间答案赋值给正式答案
|
// 如果是PCGW标准 则把中间答案赋值给正式答案
|
||||||
if (taskInfo.TrialReadingCriterion.CriterionType == CriterionType.PCWG3)
|
if (taskInfo.TrialReadingCriterion.CriterionType == CriterionType.PCWG3)
|
||||||
{
|
{
|
||||||
var answerList = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTask.SubjectId == taskInfo.SubjectId && x.VisitTask.ArmEnum == taskInfo.ArmEnum && x.PCWGInterimAnswer != string.Empty).ToListAsync();
|
var answerList = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTask.TaskState==TaskState.Effect&& x.VisitTask.SubjectId == taskInfo.SubjectId && x.VisitTask.ArmEnum == taskInfo.ArmEnum && x.PCWGInterimAnswer != string.Empty).ToListAsync();
|
||||||
|
|
||||||
foreach (var item in answerList)
|
foreach (var item in answerList)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2841,6 +2841,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
QuestionName = t.QuestionName,
|
QuestionName = t.QuestionName,
|
||||||
t.QuestionEnName,
|
t.QuestionEnName,
|
||||||
QuestionId = t.Id,
|
QuestionId = t.Id,
|
||||||
|
t.QuestionType,
|
||||||
t.DictionaryCode,
|
t.DictionaryCode,
|
||||||
t.Unit,
|
t.Unit,
|
||||||
t.CustomUnit,
|
t.CustomUnit,
|
||||||
|
|
@ -2917,19 +2918,39 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
t => t.ReadingQuestionTrialId,
|
t => t.ReadingQuestionTrialId,
|
||||||
u => u.QuestionId,
|
u => u.QuestionId,
|
||||||
(t, u) =>
|
(t, u) =>
|
||||||
new
|
new QuestionAnswerDto()
|
||||||
{
|
{
|
||||||
TaskName = taskList.FirstOrDefault(k => k.Id == t.VisitTaskId)?.TaskName,
|
TaskName = taskList.FirstOrDefault(k => k.Id == t.VisitTaskId)?.TaskName,
|
||||||
VisitTaskNum = taskList.FirstOrDefault(k => k.Id == t.VisitTaskId)?.VisitTaskNum,
|
VisitTaskNum = taskList.FirstOrDefault(k => k.Id == t.VisitTaskId)?.VisitTaskNum,
|
||||||
Answer = Translationunit(u.AnswerType, u.Unit, u.CustomUnit, unitDataList, t.Answer),
|
Answer = Translationunit(u.AnswerType, u.Unit, u.CustomUnit, unitDataList, t.Answer),
|
||||||
PCWGInterimAnswer = Translationunit(u.AnswerType, u.Unit, u.CustomUnit, unitDataList, t.PCWGInterimAnswer),
|
PCWGInterimAnswer = Translationunit(u.AnswerType, u.Unit, u.CustomUnit, unitDataList, t.PCWGInterimAnswer),
|
||||||
u.DictionaryCode,
|
DictionaryCode= u.DictionaryCode,
|
||||||
u.QuestionName,
|
ReadingQuestionTrialId= t.ReadingQuestionTrialId,
|
||||||
u.QuestionEnName,
|
QuestionName= u.QuestionName,
|
||||||
t.VisitTaskId,
|
QuestionEnName= u.QuestionEnName,
|
||||||
u.ShowOrder,
|
VisitTaskId= t.VisitTaskId,
|
||||||
|
ShowOrder= u.ShowOrder,
|
||||||
}).OrderBy(t => t.VisitTaskNum).ThenBy(t => t.ShowOrder).ToList();
|
}).OrderBy(t => t.VisitTaskNum).ThenBy(t => t.ShowOrder).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
if (questionAnswerList.Any(x => x.PCWGInterimAnswer != string.Empty))
|
||||||
|
{
|
||||||
|
var daysBetween = quesionList.Where(x => x.QuestionType == QuestionType.DaysBetween).FirstOrDefault();
|
||||||
|
|
||||||
|
var baseLineTask = taskList.FirstOrDefault(x => x.VisitTaskNum == 0);
|
||||||
|
if (daysBetween != null && baseLineTask != null)
|
||||||
|
{
|
||||||
|
foreach (var item in questionAnswerList)
|
||||||
|
{
|
||||||
|
if (item.VisitTaskId == baseLineTask.Id && item.ReadingQuestionTrialId == daysBetween.QuestionId && item.PCWGInterimAnswer == "-1")
|
||||||
|
{
|
||||||
|
item.PCWGInterimAnswer = "NA";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
foreach (var item in taskList.OrderBy(x => x.VisitTaskNum))
|
foreach (var item in taskList.OrderBy(x => x.VisitTaskNum))
|
||||||
{
|
{
|
||||||
var obj = new
|
var obj = new
|
||||||
|
|
@ -2942,6 +2963,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
await InsertInspection<ReadingTaskQuestionAnswer>(cloneEntity, type, x => new InspectionConvertDTO()
|
await InsertInspection<ReadingTaskQuestionAnswer>(cloneEntity, type, x => new InspectionConvertDTO()
|
||||||
{
|
{
|
||||||
VisitTaskId = visitTaskId,
|
VisitTaskId = visitTaskId,
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,19 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
public string UnitName { get; set; }
|
public string UnitName { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class QuestionAnswerDto
|
||||||
|
{
|
||||||
|
public string TaskName { get; set; }
|
||||||
|
public decimal? VisitTaskNum { get; set; }
|
||||||
|
public string Answer { get; set; }
|
||||||
|
public string PCWGInterimAnswer { get; set; }
|
||||||
|
public string DictionaryCode { get; set; }
|
||||||
|
public Guid ReadingQuestionTrialId { get; set; }
|
||||||
|
public string QuestionName { get; set; }
|
||||||
|
public string QuestionEnName { get; set; }
|
||||||
|
public Guid VisitTaskId { get; set; }
|
||||||
|
public int ShowOrder { get; set; }
|
||||||
|
}
|
||||||
public class VisitTaskAuditingDto
|
public class VisitTaskAuditingDto
|
||||||
{
|
{
|
||||||
public string UserRealName { get; set; }
|
public string UserRealName { get; set; }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue