添加排序

Uat_Study
he 2023-03-24 13:21:09 +08:00
parent 880847659f
commit 6be7076bce
2 changed files with 75 additions and 69 deletions

View File

@ -400,6 +400,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public Guid QuestionId { get; set; } public Guid QuestionId { get; set; }
public Guid RowId { get; set; } public Guid RowId { get; set; }
public bool IsNeedSort { get; set; } = true;
} }
public class GetDicomReadingQuestionAnswerInDto public class GetDicomReadingQuestionAnswerInDto

View File

@ -1402,6 +1402,8 @@ namespace IRaCIS.Application.Services
await _readingTableAnswerRowInfoRepository.SaveChangesAsync(); await _readingTableAnswerRowInfoRepository.SaveChangesAsync();
if (inDto.IsNeedSort)
{
var rowInfoList = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.QuestionId == inDto.QuestionId, true).Include(x => x.ReadingQuestionTrial).OrderBy(x => x.RowIndex).ToListAsync(); var rowInfoList = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.QuestionId == inDto.QuestionId, true).Include(x => x.ReadingQuestionTrial).OrderBy(x => x.RowIndex).ToListAsync();
var answerlist = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.QuestionId == inDto.QuestionId, true).ToListAsync(); var answerlist = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.QuestionId == inDto.QuestionId, true).ToListAsync();
@ -1492,6 +1494,8 @@ namespace IRaCIS.Application.Services
} }
await _readingTableAnswerRowInfoRepository.SaveChangesAsync(); await _readingTableAnswerRowInfoRepository.SaveChangesAsync();
}
// 自动计算 // 自动计算
await this._readingCalculateService.CalculateTask(new CalculateTaskInDto() await this._readingCalculateService.CalculateTask(new CalculateTaskInDto()
{ {