Merge branch 'Test_IRC_Net8' of http://192.168.3.68:2000/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
af77baba60
|
@ -34,6 +34,23 @@ namespace IRaCIS.Application.Services
|
||||||
await VerifyTaskIsSign(inDto.GlobalTaskId);
|
await VerifyTaskIsSign(inDto.GlobalTaskId);
|
||||||
await this.SubmitTaskChangeState(inDto.GlobalTaskId);
|
await this.SubmitTaskChangeState(inDto.GlobalTaskId);
|
||||||
|
|
||||||
|
var globalAnswerList = await _readingGlobalTaskInfoRepository.Where(x =>
|
||||||
|
x.QuestionId!=null &&x.Answer!=string.Empty&& x.Answer != null &&
|
||||||
|
x.GlobalTaskId == inDto.GlobalTaskId).ToListAsync();
|
||||||
|
|
||||||
|
foreach (var item in globalAnswerList)
|
||||||
|
{
|
||||||
|
await _readingTaskQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => x.VisitTaskId == item.TaskId && x.ReadingQuestionTrialId == item.QuestionId
|
||||||
|
&& x.Answer != item.Answer
|
||||||
|
, x => new ReadingTaskQuestionAnswer()
|
||||||
|
{
|
||||||
|
GlobalChangeAnswer = item.Answer,
|
||||||
|
IsGlobalChange = true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
await _readingTaskQuestionAnswerRepository.SaveChangesAsync();
|
||||||
|
|
||||||
return ResponseOutput.Ok(true);
|
return ResponseOutput.Ok(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,16 +85,7 @@ namespace IRaCIS.Application.Services
|
||||||
IsGlobalChange = true,
|
IsGlobalChange = true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
await _readingTaskQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => x.VisitTaskId == item.VisitTaskId && x.ReadingQuestionTrialId == answer.QuestionId
|
|
||||||
&& x.Answer != answer.Answer && answer.Answer != string.Empty && answer.Answer != null
|
|
||||||
, x => new ReadingTaskQuestionAnswer()
|
|
||||||
{
|
|
||||||
GlobalChangeAnswer = answer.Answer,
|
|
||||||
IsGlobalChange = true,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue