Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is running
continuous-integration/drone/push Build is running
This commit is contained in:
@@ -2222,6 +2222,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
||||
foreach (var item in readingTaskQuestionMarkList)
|
||||
{
|
||||
item.Id = Guid.Empty;
|
||||
item.FristAddTaskId = item.VisitTaskId == item.FristAddTaskId ? newTask.Id : item.FristAddTaskId;
|
||||
item.VisitTaskId = newTask.Id;
|
||||
}
|
||||
|
||||
|
||||
@@ -481,7 +481,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public int? NumberOfFrames { get; set; }
|
||||
|
||||
public string MeasureData { get; set; } = string.Empty;
|
||||
public Guid? FirstAddTaskId { get; set; }
|
||||
public Guid? FristAddTaskId { get; set; }
|
||||
|
||||
public QuestionType? QuestionType { get; set; }
|
||||
public string OrderMarkName { get; set; } = string.Empty;
|
||||
@@ -1251,7 +1251,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public string? MeasureData { get; set; }
|
||||
|
||||
|
||||
public Guid? FirstAddTaskId { get; set; }
|
||||
public Guid? FristAddTaskId { get; set; }
|
||||
|
||||
public QuestionType? QuestionType { get; set; }
|
||||
|
||||
|
||||
+42
-6
@@ -100,6 +100,26 @@ namespace IRaCIS.Core.Application.Service
|
||||
var taskid = mark.VisitTaskId;
|
||||
await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.RowId == mark.RowId && x.TableQuestionId == mark.TableQuestionId);
|
||||
await _readingTaskQuestionMarkRepository.DeleteFromQueryAsync(x => x.Id == inDto.Id);
|
||||
|
||||
|
||||
await _readingTaskQuestionMarkRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.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,
|
||||
});
|
||||
var result= await _readingTaskQuestionMarkRepository.SaveChangesAsync();
|
||||
|
||||
await _readingCalculateService.CalculateTask(new CalculateTaskInDto()
|
||||
@@ -122,7 +142,24 @@ namespace IRaCIS.Core.Application.Service
|
||||
[Route("/DeleteTableQuestionMark/{param}")]
|
||||
public async Task<bool> DeleteTableQuestionMark(DeleteTableQuestionMarkInDto inDto, string param)
|
||||
{
|
||||
await _readingTaskQuestionMarkRepository.DeleteFromQueryAsync(x => x.RowId == inDto.RowId);
|
||||
await _readingTaskQuestionMarkRepository.UpdatePartialFromQueryAsync(x => x.RowId == inDto.RowId, 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,
|
||||
});
|
||||
return await _readingTaskQuestionMarkRepository.SaveChangesAsync();
|
||||
}
|
||||
|
||||
@@ -137,9 +174,8 @@ namespace IRaCIS.Core.Application.Service
|
||||
[Route("/SaveTableQuestionMark/{param}")]
|
||||
public async Task<SaveTableQuestionMarkInDto> SaveTableQuestionMark(SaveTableQuestionMarkInDto inDto, string param)
|
||||
{
|
||||
|
||||
inDto.FirstAddTaskId = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.TableQuestionId == inDto.TableQuestionId && x.RowId == inDto.RowId).Select(x => x.FirstAddTaskId).FirstOrDefaultAsync();
|
||||
inDto.FirstAddTaskId = inDto.FirstAddTaskId == null ? inDto.VisitTaskId : inDto.FirstAddTaskId;
|
||||
inDto.FristAddTaskId = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.TableQuestionId == inDto.TableQuestionId && x.RowId == inDto.RowId).Select(x => x.FristAddTaskId).FirstOrDefaultAsync();
|
||||
inDto.FristAddTaskId = inDto.FristAddTaskId == null ? inDto.VisitTaskId : inDto.FristAddTaskId;
|
||||
var visitTaskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||
await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.QuestionId == inDto.QuestionId && x.RowId == inDto.RowId.Value && x.TableQuestionId == inDto.TableQuestionId);
|
||||
await _readingTableQuestionAnswerRepository.AddAsync(new ReadingTableQuestionAnswer()
|
||||
@@ -1933,7 +1969,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
var questionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).Select(x => new
|
||||
{
|
||||
x.QuestionId,
|
||||
x.FirstAddTaskId,
|
||||
x.FristAddTaskId,
|
||||
|
||||
}).ToListAsync();
|
||||
|
||||
@@ -1969,7 +2005,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
x.Id = NewId.NextGuid();
|
||||
x.VisitTaskId = inDto.VisitTaskId;
|
||||
x.CreateTime = datetime;
|
||||
x.FirstAddTaskId = questionMarkList.Where(y => y.QuestionId == x.QuestionId).Select(x => x.FirstAddTaskId).FirstOrDefault() ?? inDto.VisitTaskId;
|
||||
x.FristAddTaskId = questionMarkList.Where(y => y.QuestionId == x.QuestionId).Select(x => x.FristAddTaskId).FirstOrDefault() ?? inDto.VisitTaskId;
|
||||
});
|
||||
await _readingTaskQuestionMarkRepository.AddRangeAsync(markList);
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
.ForMember(d => d.ValueCN, u => u.MapFrom(s => s.Dictionary.ValueCN));
|
||||
|
||||
CreateMap<ReadingTaskQuestionMark, GetTableAnswerRowInfoOutDto>()
|
||||
.ForMember(d => d.FristAddTaskId, u => u.MapFrom(s => s.FirstAddTaskId!.Value));
|
||||
.ForMember(d => d.FristAddTaskId, u => u.MapFrom(s => s.FristAddTaskId!.Value));
|
||||
CreateMap<ReadingTaskQuestionMark, QuestionMarkInfo>();
|
||||
CreateMap<QuestionMarkInfo, ReadingTaskQuestionMark>();
|
||||
//CreateMap<ReadingClinicalDataView, GetReadingClinicalDataListOutDto>();
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
|
||||
public Guid QuestionId { get; set; }
|
||||
|
||||
public Guid? FirstAddTaskId { get; set; }
|
||||
public Guid? FristAddTaskId { get; set; }
|
||||
|
||||
public QuestionType? QuestionType { get; set; }
|
||||
public string OrderMarkName { get; set; } = string.Empty;
|
||||
|
||||
@@ -1413,7 +1413,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
var questionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == LastVisitTaskId).Select(x => new ReadingTaskQuestionMark()
|
||||
{
|
||||
VisitTaskId = visitTaskId,
|
||||
FirstAddTaskId = x.FirstAddTaskId,
|
||||
FristAddTaskId = x.FristAddTaskId,
|
||||
QuestionId = x.QuestionId,
|
||||
QuestionType = x.QuestionType,
|
||||
OrderMarkName = x.OrderMarkName,
|
||||
|
||||
+1
-1
@@ -1412,7 +1412,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
var questionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == LastVisitTaskId).Select(x => new ReadingTaskQuestionMark()
|
||||
{
|
||||
VisitTaskId = visitTaskId,
|
||||
FirstAddTaskId = x.FirstAddTaskId,
|
||||
FristAddTaskId = x.FristAddTaskId,
|
||||
QuestionId = x.QuestionId,
|
||||
QuestionType = x.QuestionType,
|
||||
OrderMarkName = x.OrderMarkName,
|
||||
|
||||
@@ -734,7 +734,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
|
||||
foreach (var item in notableQuestionList)
|
||||
{
|
||||
if (markList.Any(x => x.RowId == item.RowId))
|
||||
if (markList.Any(x => x.RowId == item.RowId && x.MeasureData.IsNotNullOrEmpty()))
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["MRIPDFF_NeedClearMark"]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user