Uat_Study
parent
be65014727
commit
b15a7304b9
|
@ -902,12 +902,12 @@ namespace IRaCIS.Application.Services
|
||||||
measureDataStr = JsonConvert.SerializeObject(measureData);
|
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
|
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,
|
RowIndex = index,
|
||||||
MeasureData = measureDataStr,
|
MeasureData = measureDataStr,
|
||||||
|
@ -923,11 +923,11 @@ namespace IRaCIS.Application.Services
|
||||||
spiltmeasureData.data.remark = item.ReadingQuestionTrial.OrderMark + ((decimal)index + spiltindex).GetLesionMark();
|
spiltmeasureData.data.remark = item.ReadingQuestionTrial.OrderMark + ((decimal)index + spiltindex).GetLesionMark();
|
||||||
spiltmeasureDataStr = JsonConvert.SerializeObject(spiltmeasureData);
|
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
|
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,
|
RowIndex = index + spiltindex,
|
||||||
MeasureData = spiltmeasureDataStr,
|
MeasureData = spiltmeasureDataStr,
|
||||||
|
@ -937,6 +937,8 @@ namespace IRaCIS.Application.Services
|
||||||
}
|
}
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await _readingTableAnswerRowInfoRepository.SaveChangesAsync();
|
||||||
// 自动计算
|
// 自动计算
|
||||||
await this._readingCalculateService.CalculateTask(new CalculateTaskInDto()
|
await this._readingCalculateService.CalculateTask(new CalculateTaskInDto()
|
||||||
{
|
{
|
||||||
|
@ -1032,8 +1034,8 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
rowInfo = rowInfo == null ? new ReadingTableAnswerRowInfo() : rowInfo;
|
rowInfo = rowInfo == null ? new ReadingTableAnswerRowInfo() : rowInfo;
|
||||||
|
|
||||||
await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.RowId == (inDto.RowId ?? default(Guid)));
|
//await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.RowId == (inDto.RowId ?? default(Guid)));
|
||||||
await _readingTableAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x => x.Id == (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.Id = inDto.RowId == null ? NewId.NextGuid() : inDto.RowId.Value;
|
||||||
rowInfo.TrialId = inDto.TrialId;
|
rowInfo.TrialId = inDto.TrialId;
|
||||||
|
@ -1051,6 +1053,8 @@ namespace IRaCIS.Application.Services
|
||||||
rowInfo.IsCanEditPosition = inDto.IsCanEditPosition;
|
rowInfo.IsCanEditPosition = inDto.IsCanEditPosition;
|
||||||
result.RowId = rowInfo.Id;
|
result.RowId = rowInfo.Id;
|
||||||
|
|
||||||
|
if (inDto.RowId == null)
|
||||||
|
{
|
||||||
List<ReadingTableQuestionAnswer> answerList = inDto.AnswerList.Select(x => new ReadingTableQuestionAnswer()
|
List<ReadingTableQuestionAnswer> answerList = inDto.AnswerList.Select(x => new ReadingTableQuestionAnswer()
|
||||||
{
|
{
|
||||||
Answer = x.Answer,
|
Answer = x.Answer,
|
||||||
|
@ -1066,6 +1070,41 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
await _readingTableAnswerRowInfoRepository.AddAsync(rowInfo);
|
await _readingTableAnswerRowInfoRepository.AddAsync(rowInfo);
|
||||||
await _readingTableQuestionAnswerRepository.AddRangeAsync(answerList);
|
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()
|
await _visitTaskRepository.UpdatePartialFromQueryAsync(inDto.VisitTaskId, x => new VisitTask()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue