修改代码
parent
964a95d934
commit
992dfe39fb
|
@ -464,6 +464,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
{
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
|
||||
public bool UpdateMark { get; set; } = false;
|
||||
|
||||
public List<ChangeDicomReadingQuestionAnswerDto> Answers { get; set; }
|
||||
|
||||
|
||||
|
|
|
@ -1474,6 +1474,7 @@ namespace IRaCIS.Application.Services
|
|||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> SaveImageQuality(ChangeDicomReadingQuestionAnswerInDto inDto)
|
||||
{
|
||||
inDto.UpdateMark = true;
|
||||
return await ChangeDicomReadingQuestionAnswer(inDto);
|
||||
}
|
||||
|
||||
|
@ -1549,7 +1550,8 @@ namespace IRaCIS.Application.Services
|
|||
}).ToList();
|
||||
await _readingTaskQuestionAnswerRepository.AddRangeAsync(needAddAnswer);
|
||||
|
||||
|
||||
if (inDto.UpdateMark)
|
||||
{
|
||||
var questionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).Select(x => new
|
||||
{
|
||||
x.QuestionId,
|
||||
|
@ -1567,6 +1569,9 @@ namespace IRaCIS.Application.Services
|
|||
x.FirstAddTaskId = questionMarkList.Where(y => y.QuestionId == x.QuestionId).Select(x => x.FirstAddTaskId).FirstOrDefault() ?? inDto.VisitTaskId;
|
||||
});
|
||||
await _readingTaskQuestionMarkRepository.AddRangeAsync(markList);
|
||||
}
|
||||
|
||||
|
||||
await _readingTaskQuestionAnswerRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok(true);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue