修改一版
parent
7f65f5a5db
commit
53377d743b
|
@ -10,7 +10,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
{
|
||||
public class SaveGlobalReadingInfoInDto
|
||||
{
|
||||
public Guid VisitTaskId { get; set; }
|
||||
public Guid GlobalTaskId { get; set; }
|
||||
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
|
@ -38,7 +38,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public class GetGlobalReadingInfoOutDto
|
||||
{
|
||||
public Guid VisitTaskId { get; set; }
|
||||
public Guid GlobalTaskId { get; set; }
|
||||
|
||||
public List<GlobalVisitInfo> TaskList { get; set; }
|
||||
}
|
||||
|
@ -65,6 +65,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public string Answer { get; set; }
|
||||
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 类型值
|
||||
/// </summary>
|
||||
|
|
|
@ -86,13 +86,13 @@ namespace IRaCIS.Application.Services
|
|||
[HttpPost]
|
||||
public async Task<IResponseOutput> SaveGlobalReadingInfo(SaveGlobalReadingInfoInDto inDto)
|
||||
{
|
||||
await _readingGlobalTaskInfoRepository.BatchDeleteNoTrackingAsync(x => x.GlobalTaskId == inDto.VisitTaskId);
|
||||
await _readingGlobalTaskInfoRepository.BatchDeleteNoTrackingAsync(x => x.GlobalTaskId == inDto.GlobalTaskId);
|
||||
await _readingGlobalTaskInfoRepository.AddRangeAsync(inDto.QuestionList.Select(x => new ReadingGlobalTaskInfo()
|
||||
{
|
||||
Answer=x.Answer,
|
||||
QuestionId=x.QuestionId,
|
||||
SubjectId=inDto.SubjectId,
|
||||
GlobalTaskId=inDto.VisitTaskId,
|
||||
GlobalTaskId=inDto.GlobalTaskId,
|
||||
TaskId=x.visitTaskId,
|
||||
TrialId=inDto.TrialId,
|
||||
}).ToList());
|
||||
|
@ -117,7 +117,7 @@ namespace IRaCIS.Application.Services
|
|||
throw new BusinessValidationFailedException("当前任务不是全局阅片任务");
|
||||
}
|
||||
GetGlobalReadingInfoOutDto result = new GetGlobalReadingInfoOutDto() {
|
||||
VisitTaskId = inDto.VisitTaskId,
|
||||
GlobalTaskId = inDto.VisitTaskId,
|
||||
};
|
||||
|
||||
result.TaskList = await _visitTaskRepository.Where(x => x.ReadingCategory == ReadingCategory.Visit &&
|
||||
|
@ -133,6 +133,7 @@ namespace IRaCIS.Application.Services
|
|||
QuestionId = y.ReadingQuestionTrialId,
|
||||
QuestionName = y.ReadingQuestionTrial.QuestionName,
|
||||
Type=y.ReadingQuestionTrial.Type,
|
||||
VisitTaskId=x.Id,
|
||||
TypeValue=y.ReadingQuestionTrial.TypeValue,
|
||||
Answer = y.Answer
|
||||
}).ToList()
|
||||
|
@ -154,6 +155,7 @@ namespace IRaCIS.Application.Services
|
|||
QuestionId =lr.question.QuestionId,
|
||||
QuestionName=lr.question.QuestionName,
|
||||
Type = lr.question.Type,
|
||||
VisitTaskId=x.VisitTaskId,
|
||||
TypeValue = lr.question.TypeValue,
|
||||
|
||||
}).ToList();
|
||||
|
|
Loading…
Reference in New Issue