Uat_Study
parent
c8a6778439
commit
3aaa9eca71
|
@ -197,9 +197,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
public Guid QuestionId { get; set; }
|
public Guid QuestionId { get; set; }
|
||||||
|
|
||||||
public decimal MainRowIndex { get; set; }
|
public Guid MainRowId { get; set; }
|
||||||
|
|
||||||
public decimal MergeRowIndex { get; set; }
|
public Guid MergeRowId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -210,7 +210,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
public Guid QuestionId { get; set; }
|
public Guid QuestionId { get; set; }
|
||||||
|
|
||||||
public decimal RowIndex { get; set; }
|
public Guid RowId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -117,8 +117,8 @@ namespace IRaCIS.Application.Services
|
||||||
public async Task SplitLesion(SplitLesionInDto inDto)
|
public async Task SplitLesion(SplitLesionInDto inDto)
|
||||||
{
|
{
|
||||||
await this.VerifyIsBaseLineTask(inDto.VisitTaskId);
|
await this.VerifyIsBaseLineTask(inDto.VisitTaskId);
|
||||||
var rowAnswer = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == inDto.RowIndex && x.QuestionId == inDto.QuestionId).FirstNotNullAsync();
|
var rowAnswer = await _readingTableAnswerRowInfoRepository.Where(x =>x.Id==inDto.RowId).FirstNotNullAsync();
|
||||||
var tableAnswers = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == inDto.RowIndex && x.QuestionId == inDto.QuestionId).ToListAsync();
|
var tableAnswers = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == rowAnswer.RowIndex && x.QuestionId == inDto.QuestionId).ToListAsync();
|
||||||
var maxRowIndex = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.QuestionId == inDto.QuestionId).OrderByDescending(x => x.RowIndex).Select(x => x.RowIndex).FirstOrDefaultAsync();
|
var maxRowIndex = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.QuestionId == inDto.QuestionId).OrderByDescending(x => x.RowIndex).Select(x => x.RowIndex).FirstOrDefaultAsync();
|
||||||
var newRowIndex = maxRowIndex + (decimal)0.01;
|
var newRowIndex = maxRowIndex + (decimal)0.01;
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
await this.VerifyIsBaseLineTask(inDto.VisitTaskId);
|
await this.VerifyIsBaseLineTask(inDto.VisitTaskId);
|
||||||
|
|
||||||
var rowsInfo = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId &&(x.RowIndex == inDto.MainRowIndex || x.RowIndex == inDto.MergeRowIndex)).ToListAsync();
|
var rowsInfo = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId &&(x.Id == inDto.MainRowId || x.Id == inDto.MergeRowId)).ToListAsync();
|
||||||
|
|
||||||
if (rowsInfo.Count() != 2)
|
if (rowsInfo.Count() != 2)
|
||||||
{
|
{
|
||||||
|
@ -155,8 +155,8 @@ namespace IRaCIS.Application.Services
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var minaid = rowsInfo.Where(x => x.RowIndex == inDto.MainRowIndex).Select(x => x.Id).FirstOrDefault();
|
var minaid = rowsInfo.Where(x => x.Id == inDto.MainRowId).Select(x => x.Id).FirstOrDefault();
|
||||||
var mergeid = rowsInfo.Where(x => x.RowIndex == inDto.MergeRowIndex).Select(x => x.Id).FirstOrDefault();
|
var mergeid = rowsInfo.Where(x => x.Id == inDto.MergeRowId).Select(x => x.Id).FirstOrDefault();
|
||||||
|
|
||||||
|
|
||||||
await _readingTableAnswerRowInfoRepository.UpdatePartialFromQueryAsync(mergeid, x => new ReadingTableAnswerRowInfo()
|
await _readingTableAnswerRowInfoRepository.UpdatePartialFromQueryAsync(mergeid, x => new ReadingTableAnswerRowInfo()
|
||||||
|
|
Loading…
Reference in New Issue