修改添加问题
parent
12c67cac8f
commit
82070e9bbf
|
@ -49,6 +49,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
DataSource=DataSources.ManualEntry,
|
||||
ShowQuestion=ShowQuestion.Show,
|
||||
|
||||
|
||||
IsAdditional=true
|
||||
} }
|
||||
});
|
||||
|
|
|
@ -610,6 +610,13 @@ namespace IRaCIS.Core.Application
|
|||
/// <returns></returns>
|
||||
public async Task<IResponseOutput> SetTrialCriterionAdditionalAssessment(List<AddOrUpdateTrialCriterionAdditional> updateList)
|
||||
{
|
||||
|
||||
if (updateList.Count == 0)
|
||||
{
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
var trialId= _readingQuestionTrialRepository.Where(t=>t.ReadingQuestionCriterionTrialId==updateList.First().TrialReadingCriterionId).Select(t=>t.TrialId).FirstOrDefault();
|
||||
foreach (var updateItem in updateList)
|
||||
{
|
||||
if (updateItem.IsSelected == true)
|
||||
|
@ -622,6 +629,9 @@ namespace IRaCIS.Core.Application
|
|||
{
|
||||
foreach (var question in addType.AdditionalQuestionList)
|
||||
{
|
||||
question.ReadingQuestionCriterionTrialId = updateItem.TrialReadingCriterionId;
|
||||
question.TrialId = trialId;
|
||||
|
||||
await _readingQuestionTrialRepository.AddAsync(question);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue