Uat_Study
parent
57d3ea9ff1
commit
b5af2d62ee
|
@ -117,7 +117,7 @@ namespace IRaCIS.Application.Services
|
|||
public async Task SplitLesion(SplitLesionInDto inDto)
|
||||
{
|
||||
await this.VerifyIsBaseLineTask(inDto.VisitTaskId);
|
||||
var rowAnswer = await _readingTableAnswerRowInfoRepository.Where(x =>x.Id==inDto.RowId).FirstNotNullAsync();
|
||||
var rowAnswer = await _readingTableAnswerRowInfoRepository.Where(x =>x.Id==inDto.RowId).AsNoTracking().FirstNotNullAsync();
|
||||
var tableAnswers = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == rowAnswer.RowIndex && x.QuestionId == inDto.QuestionId).Include(x=>x.ReadingTableQuestionTrial).ToListAsync();
|
||||
var maxRowIndex = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.QuestionId == inDto.QuestionId&&x.RowIndex< Math.Floor(rowAnswer.RowIndex+1)).OrderByDescending(x => x.RowIndex).Select(x => x.RowIndex).FirstOrDefaultAsync();
|
||||
var newRowIndex = maxRowIndex + (decimal)0.01;
|
||||
|
@ -139,7 +139,9 @@ namespace IRaCIS.Application.Services
|
|||
x.Id = NewId.NextGuid();
|
||||
x.RowIndex = newRowIndex;
|
||||
x.VisitTaskId = inDto.VisitTaskId;
|
||||
x.RowId = rowAnswer.Id;
|
||||
x.Answer = needRemoveMark.Contains(x.ReadingTableQuestionTrial.QuestionMark) ? string.Empty : x.Answer;
|
||||
x.ReadingTableQuestionTrial = null;
|
||||
});
|
||||
await _readingTableAnswerRowInfoRepository.AddAsync(rowAnswer);
|
||||
await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers);
|
||||
|
|
Loading…
Reference in New Issue