修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
36594c349e
commit
fa979b57cc
|
@ -214,11 +214,77 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
await _readingTaskQuestionMarkRepository.BatchDeleteNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.QuestionId == inDto.QuestionId && x.RowId == inDto.RowId.Value && x.TableQuestionId == inDto.TableQuestionId);
|
var originalMarkInfo = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.QuestionId == inDto.QuestionId && x.RowId == inDto.RowId.Value && x.TableQuestionId == inDto.TableQuestionId).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
if (originalMarkInfo == null)
|
||||||
|
{
|
||||||
|
if (inDto.MeasureData != string.Empty)
|
||||||
|
{
|
||||||
|
var readingTaskQuestionMark = _mapper.Map<ReadingTaskQuestionMark>(inDto);
|
||||||
|
|
||||||
|
await _readingTaskQuestionMarkRepository.AddAsync(readingTaskQuestionMark);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 如果MeasureData为空,且没有其他任务有该标记,则删除该标记
|
||||||
|
if (inDto.MeasureData == string.Empty)
|
||||||
|
{
|
||||||
|
if (await _readingTaskQuestionMarkRepository.AnyAsync(x => x.MarkId == inDto.MarkId && x.Id != originalMarkInfo.Id))
|
||||||
|
{
|
||||||
|
await _readingTaskQuestionMarkRepository.DeleteAsync(originalMarkInfo);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
await _readingTaskQuestionMarkRepository.UpdatePartialFromQueryAsync(x => x.Id == originalMarkInfo.Id, x => new ReadingTaskQuestionMark()
|
||||||
|
{
|
||||||
|
InstanceId = null,
|
||||||
|
SeriesId = null,
|
||||||
|
StudyId = null,
|
||||||
|
MarkTool = string.Empty,
|
||||||
|
// PicturePath = string.Empty, 稽查需要显示截图
|
||||||
|
NumberOfFrames = null,
|
||||||
|
MeasureData = string.Empty,
|
||||||
|
OrderMarkName = string.Empty,
|
||||||
|
OtherInstanceId = null,
|
||||||
|
OtherSeriesId = null,
|
||||||
|
OtherStudyId = null,
|
||||||
|
OtherMarkTool = string.Empty,
|
||||||
|
OtherPicturePath = string.Empty,
|
||||||
|
OtherNumberOfFrames = null,
|
||||||
|
OtherMeasureData = string.Empty,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
await _readingTaskQuestionMarkRepository.UpdatePartialFromQueryAsync(x => x.Id == originalMarkInfo.Id, x => new ReadingTaskQuestionMark()
|
||||||
|
{
|
||||||
|
InstanceId = inDto.InstanceId,
|
||||||
|
SeriesId = inDto.SeriesId,
|
||||||
|
StudyId = inDto.StudyId,
|
||||||
|
MarkTool = inDto.MarkTool,
|
||||||
|
PicturePath = inDto.PicturePath,
|
||||||
|
NumberOfFrames = inDto.NumberOfFrames,
|
||||||
|
MeasureData = inDto.MeasureData,
|
||||||
|
OrderMarkName = inDto.OrderMarkName,
|
||||||
|
OtherInstanceId = inDto.OtherInstanceId,
|
||||||
|
OtherSeriesId = inDto.OtherSeriesId,
|
||||||
|
OtherStudyId = inDto.OtherStudyId,
|
||||||
|
OtherMarkTool = inDto.OtherMarkTool,
|
||||||
|
OtherPicturePath = inDto.OtherPicturePath,
|
||||||
|
OtherNumberOfFrames = inDto.OtherNumberOfFrames,
|
||||||
|
OtherMeasureData = inDto.OtherMeasureData,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var readingTaskQuestionMark = _mapper.Map<ReadingTaskQuestionMark>(inDto);
|
|
||||||
|
|
||||||
await _readingTaskQuestionMarkRepository.AddAsync(readingTaskQuestionMark);
|
|
||||||
await _readingTaskQuestionMarkRepository.SaveChangesAsync();
|
await _readingTaskQuestionMarkRepository.SaveChangesAsync();
|
||||||
|
|
||||||
await _readingCalculateService.CalculateTask(new CalculateTaskInDto()
|
await _readingCalculateService.CalculateTask(new CalculateTaskInDto()
|
||||||
|
|
Loading…
Reference in New Issue