Uat_Study
parent
be65014727
commit
b15a7304b9
|
@ -902,12 +902,12 @@ namespace IRaCIS.Application.Services
|
|||
measureDataStr = JsonConvert.SerializeObject(measureData);
|
||||
}
|
||||
|
||||
await _readingTableQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == item.RowIndex && x.QuestionId == inDto.QuestionId, x => new ReadingTableQuestionAnswer()
|
||||
await _readingTableQuestionAnswerRepository.UpdatePartialFromQueryAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == item.RowIndex && x.QuestionId == inDto.QuestionId, x => new ReadingTableQuestionAnswer()
|
||||
{
|
||||
RowIndex = index
|
||||
});
|
||||
|
||||
await _readingTableAnswerRowInfoRepository.BatchUpdateNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == item.RowIndex && x.QuestionId == inDto.QuestionId, x => new ReadingTableAnswerRowInfo()
|
||||
await _readingTableAnswerRowInfoRepository.UpdatePartialFromQueryAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == item.RowIndex && x.QuestionId == inDto.QuestionId, x => new ReadingTableAnswerRowInfo()
|
||||
{
|
||||
RowIndex = index,
|
||||
MeasureData = measureDataStr,
|
||||
|
@ -923,11 +923,11 @@ namespace IRaCIS.Application.Services
|
|||
spiltmeasureData.data.remark = item.ReadingQuestionTrial.OrderMark + ((decimal)index + spiltindex).GetLesionMark();
|
||||
spiltmeasureDataStr = JsonConvert.SerializeObject(spiltmeasureData);
|
||||
}
|
||||
await _readingTableQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == spiltitem.RowIndex && x.QuestionId == inDto.QuestionId, x => new ReadingTableQuestionAnswer()
|
||||
await _readingTableQuestionAnswerRepository.UpdatePartialFromQueryAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == spiltitem.RowIndex && x.QuestionId == inDto.QuestionId, x => new ReadingTableQuestionAnswer()
|
||||
{
|
||||
RowIndex = index + spiltindex
|
||||
});
|
||||
await _readingTableAnswerRowInfoRepository.BatchUpdateNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == spiltitem.RowIndex && x.QuestionId == inDto.QuestionId, x => new ReadingTableAnswerRowInfo()
|
||||
await _readingTableAnswerRowInfoRepository.UpdatePartialFromQueryAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == spiltitem.RowIndex && x.QuestionId == inDto.QuestionId, x => new ReadingTableAnswerRowInfo()
|
||||
{
|
||||
RowIndex = index + spiltindex,
|
||||
MeasureData = spiltmeasureDataStr,
|
||||
|
@ -937,6 +937,8 @@ namespace IRaCIS.Application.Services
|
|||
}
|
||||
index++;
|
||||
}
|
||||
|
||||
await _readingTableAnswerRowInfoRepository.SaveChangesAsync();
|
||||
// 自动计算
|
||||
await this._readingCalculateService.CalculateTask(new CalculateTaskInDto()
|
||||
{
|
||||
|
@ -1032,8 +1034,8 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
rowInfo = rowInfo == null ? new ReadingTableAnswerRowInfo() : rowInfo;
|
||||
|
||||
await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.RowId == (inDto.RowId ?? default(Guid)));
|
||||
await _readingTableAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x => x.Id == (inDto.RowId ?? default(Guid)));
|
||||
//await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.RowId == (inDto.RowId ?? default(Guid)));
|
||||
//await _readingTableAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x => x.Id == (inDto.RowId ?? default(Guid)));
|
||||
|
||||
rowInfo.Id = inDto.RowId == null ? NewId.NextGuid() : inDto.RowId.Value;
|
||||
rowInfo.TrialId = inDto.TrialId;
|
||||
|
@ -1051,21 +1053,58 @@ namespace IRaCIS.Application.Services
|
|||
rowInfo.IsCanEditPosition = inDto.IsCanEditPosition;
|
||||
result.RowId = rowInfo.Id;
|
||||
|
||||
List<ReadingTableQuestionAnswer> answerList = inDto.AnswerList.Select(x => new ReadingTableQuestionAnswer()
|
||||
if (inDto.RowId == null)
|
||||
{
|
||||
Answer = x.Answer,
|
||||
Id = NewId.NextGuid(),
|
||||
TrialId = inDto.TrialId,
|
||||
QuestionId = inDto.QuestionId,
|
||||
TableQuestionId = x.TableQuestionId,
|
||||
RowIndex = inDto.RowIndex,
|
||||
RowId = rowInfo.Id,
|
||||
VisitTaskId = inDto.VisitTaskId
|
||||
}).ToList();
|
||||
List<ReadingTableQuestionAnswer> answerList = inDto.AnswerList.Select(x => new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = x.Answer,
|
||||
Id = NewId.NextGuid(),
|
||||
TrialId = inDto.TrialId,
|
||||
QuestionId = inDto.QuestionId,
|
||||
TableQuestionId = x.TableQuestionId,
|
||||
RowIndex = inDto.RowIndex,
|
||||
RowId = rowInfo.Id,
|
||||
VisitTaskId = inDto.VisitTaskId
|
||||
}).ToList();
|
||||
|
||||
|
||||
await _readingTableAnswerRowInfoRepository.AddAsync(rowInfo);
|
||||
await _readingTableQuestionAnswerRepository.AddRangeAsync(answerList);
|
||||
await _readingTableAnswerRowInfoRepository.AddAsync(rowInfo);
|
||||
await _readingTableQuestionAnswerRepository.AddRangeAsync(answerList);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
await _readingTableAnswerRowInfoRepository.UpdatePartialFromQueryAsync(rowInfo.Id, x => new ReadingTableAnswerRowInfo()
|
||||
{
|
||||
TrialId = rowInfo.TrialId,
|
||||
QuestionId = rowInfo.QuestionId,
|
||||
MeasureData = rowInfo.MeasureData,
|
||||
BlindName = rowInfo.BlindName,
|
||||
IsDicomReading = rowInfo.IsDicomReading,
|
||||
IsCurrentTaskAdd = isCurrentTaskAdd,
|
||||
FristAddTaskNum = rowInfo.FristAddTaskNum,
|
||||
RowIndex = rowInfo.RowIndex,
|
||||
InstanceId = rowInfo.InstanceId,
|
||||
SeriesId = rowInfo.SeriesId,
|
||||
VisitTaskId = rowInfo.VisitTaskId,
|
||||
StudyId = rowInfo.StudyId,
|
||||
IsCanEditPosition = rowInfo.IsCanEditPosition,
|
||||
});
|
||||
|
||||
|
||||
foreach(var item in inDto.AnswerList)
|
||||
{
|
||||
await _readingTableQuestionAnswerRepository.UpdatePartialFromQueryAsync(x => x.RowId == inDto.RowId && x.TableQuestionId == item.TableQuestionId, x => new ReadingTableQuestionAnswer()
|
||||
{
|
||||
|
||||
|
||||
Answer = item.Answer
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
await _visitTaskRepository.UpdatePartialFromQueryAsync(inDto.VisitTaskId, x => new VisitTask()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue