Uat_Study
parent
dc3b7f39f4
commit
39f8d62236
|
@ -889,8 +889,11 @@ namespace IRaCIS.Application.Services
|
|||
await _readingTableAnswerRowInfoRepository.SaveChangesAsync();
|
||||
|
||||
|
||||
var rowInfoList = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.QuestionId == inDto.QuestionId).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();
|
||||
|
||||
|
||||
|
||||
foreach (var item in rowInfoList.Where(x => x.RowIndex % 1 == 0))
|
||||
{
|
||||
|
@ -902,16 +905,34 @@ namespace IRaCIS.Application.Services
|
|||
measureDataStr = JsonConvert.SerializeObject(measureData);
|
||||
}
|
||||
|
||||
await _readingTableQuestionAnswerRepository.UpdatePartialFromQueryAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == item.RowIndex && x.QuestionId == inDto.QuestionId, x => new ReadingTableQuestionAnswer()
|
||||
{
|
||||
RowIndex = index
|
||||
});
|
||||
|
||||
|
||||
await _readingTableAnswerRowInfoRepository.UpdatePartialFromQueryAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == item.RowIndex && x.QuestionId == inDto.QuestionId, x => new ReadingTableAnswerRowInfo()
|
||||
foreach (var answerItem in answerlist.Where(x=>x.RowIndex== item.RowIndex))
|
||||
{
|
||||
RowIndex = index,
|
||||
MeasureData = measureDataStr,
|
||||
});
|
||||
|
||||
answerItem.RowIndex = index;
|
||||
|
||||
}
|
||||
|
||||
|
||||
foreach (var rowAnswerItem in rowInfoList.Where(x => x.RowIndex == item.RowIndex))
|
||||
{
|
||||
|
||||
rowAnswerItem.RowIndex = index;
|
||||
rowAnswerItem.MeasureData = measureDataStr;
|
||||
|
||||
}
|
||||
|
||||
//await _readingTableQuestionAnswerRepository.UpdatePartialFromQueryAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == item.RowIndex && x.QuestionId == inDto.QuestionId, x => new ReadingTableQuestionAnswer()
|
||||
//{
|
||||
// RowIndex = index
|
||||
//});
|
||||
|
||||
//await _readingTableAnswerRowInfoRepository.UpdatePartialFromQueryAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == item.RowIndex && x.QuestionId == inDto.QuestionId, x => new ReadingTableAnswerRowInfo()
|
||||
//{
|
||||
// RowIndex = index,
|
||||
// MeasureData = measureDataStr,
|
||||
//});
|
||||
var spiltList = rowInfoList.Where(x => x.RowIndex % 1 != 0 && x.RowIndex > item.RowIndex && x.RowIndex < Math.Floor(item.RowIndex + 1)).OrderBy(x => x.RowIndex).ToList();
|
||||
decimal spiltindex = 0.01M;
|
||||
foreach (var spiltitem in spiltList)
|
||||
|
@ -923,15 +944,34 @@ namespace IRaCIS.Application.Services
|
|||
spiltmeasureData.data.remark = item.ReadingQuestionTrial.OrderMark + ((decimal)index + spiltindex).GetLesionMark();
|
||||
spiltmeasureDataStr = JsonConvert.SerializeObject(spiltmeasureData);
|
||||
}
|
||||
await _readingTableQuestionAnswerRepository.UpdatePartialFromQueryAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == spiltitem.RowIndex && x.QuestionId == inDto.QuestionId, x => new ReadingTableQuestionAnswer()
|
||||
|
||||
|
||||
foreach (var answerItem in answerlist.Where(x => x.RowIndex == spiltitem.RowIndex))
|
||||
{
|
||||
RowIndex = index + spiltindex
|
||||
});
|
||||
await _readingTableAnswerRowInfoRepository.UpdatePartialFromQueryAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == spiltitem.RowIndex && x.QuestionId == inDto.QuestionId, x => new ReadingTableAnswerRowInfo()
|
||||
answerItem.RowIndex = index + spiltindex;
|
||||
|
||||
}
|
||||
|
||||
|
||||
foreach (var rowAnswerItem in rowInfoList.Where(x => x.RowIndex == spiltitem.RowIndex))
|
||||
{
|
||||
RowIndex = index + spiltindex,
|
||||
MeasureData = spiltmeasureDataStr,
|
||||
});
|
||||
|
||||
rowAnswerItem.RowIndex = index + spiltindex;
|
||||
rowAnswerItem.MeasureData = spiltmeasureDataStr;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//await _readingTableQuestionAnswerRepository.UpdatePartialFromQueryAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == spiltitem.RowIndex && x.QuestionId == inDto.QuestionId, x => new ReadingTableQuestionAnswer()
|
||||
//{
|
||||
// RowIndex = index + spiltindex
|
||||
//});
|
||||
//await _readingTableAnswerRowInfoRepository.UpdatePartialFromQueryAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == spiltitem.RowIndex && x.QuestionId == inDto.QuestionId, x => new ReadingTableAnswerRowInfo()
|
||||
//{
|
||||
// RowIndex = index + spiltindex,
|
||||
// MeasureData = spiltmeasureDataStr,
|
||||
//});
|
||||
|
||||
spiltindex += 0.01M;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue