IRC_NewDev
parent
5399c89d8e
commit
a8212404ba
|
@ -1036,6 +1036,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
public Guid? FirstAddTaskId { get; set; }
|
public Guid? FirstAddTaskId { get; set; }
|
||||||
|
|
||||||
public QuestionType? QuestionType { get; set; }
|
public QuestionType? QuestionType { get; set; }
|
||||||
|
|
||||||
|
public string? OrderMark { get; set; } = string.Empty;
|
||||||
}
|
}
|
||||||
public class GetReadingQuestionAndAnswerInDto
|
public class GetReadingQuestionAndAnswerInDto
|
||||||
{
|
{
|
||||||
|
|
|
@ -1568,27 +1568,15 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
await _readingTaskQuestionMarkRepository.BatchDeleteNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId);
|
await _readingTaskQuestionMarkRepository.BatchDeleteNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId);
|
||||||
|
|
||||||
var datetime = DateTime.Now;
|
var datetime = DateTime.Now;
|
||||||
|
|
||||||
|
var markList = _mapper.Map<List<QuestionMarkInfo>, List<ReadingTaskQuestionMark>>(inDto.QuestionMarkInfoList);
|
||||||
|
markList.ForEach(x => {
|
||||||
List<ReadingTaskQuestionMark> markList = inDto.QuestionMarkInfoList.Select(x => new ReadingTaskQuestionMark
|
x.Id = NewId.NextGuid();
|
||||||
{
|
x.VisitTaskId = inDto.VisitTaskId;
|
||||||
|
x.CreateTime = datetime;
|
||||||
Id = NewId.NextGuid(),
|
x.FirstAddTaskId = questionMarkList.Where(y => y.QuestionId == x.QuestionId).Select(x => x.FirstAddTaskId).FirstOrDefault() ?? inDto.VisitTaskId;
|
||||||
VisitTaskId = inDto.VisitTaskId,
|
});
|
||||||
InstanceId = x.InstanceId,
|
|
||||||
MarkTool = x.MarkTool,
|
|
||||||
NumberOfFrames = x.NumberOfFrames,
|
|
||||||
PicturePath = x.PicturePath,
|
|
||||||
MeasureData = x.MeasureData,
|
|
||||||
QuestionId = x.QuestionId,
|
|
||||||
SeriesId = x.SeriesId,
|
|
||||||
StudyId = x.StudyId,
|
|
||||||
CreateTime = datetime,
|
|
||||||
FirstAddTaskId= questionMarkList.Where(y=>y.QuestionId==x.QuestionId).Select(x=>x.FirstAddTaskId).FirstOrDefault() ?? inDto.VisitTaskId,
|
|
||||||
}).ToList();
|
|
||||||
await _readingTaskQuestionMarkRepository.AddRangeAsync(markList);
|
await _readingTaskQuestionMarkRepository.AddRangeAsync(markList);
|
||||||
await _readingTaskQuestionAnswerRepository.SaveChangesAsync();
|
await _readingTaskQuestionAnswerRepository.SaveChangesAsync();
|
||||||
return ResponseOutput.Ok(true);
|
return ResponseOutput.Ok(true);
|
||||||
|
|
|
@ -81,6 +81,10 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
|
|
||||||
public QuestionType? QuestionType { get; set; }
|
public QuestionType? QuestionType { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public string? OrderMark { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue