修改一版

Uat_Study
he 2022-07-19 16:16:15 +08:00
parent 7f65f5a5db
commit 53377d743b
2 changed files with 9 additions and 5 deletions

View File

@ -10,7 +10,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
{ {
public class SaveGlobalReadingInfoInDto public class SaveGlobalReadingInfoInDto
{ {
public Guid VisitTaskId { get; set; } public Guid GlobalTaskId { get; set; }
public Guid SubjectId { get; set; } public Guid SubjectId { get; set; }
@ -38,7 +38,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public class GetGlobalReadingInfoOutDto public class GetGlobalReadingInfoOutDto
{ {
public Guid VisitTaskId { get; set; } public Guid GlobalTaskId { get; set; }
public List<GlobalVisitInfo> TaskList { 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 string Answer { get; set; }
public Guid VisitTaskId { get; set; }
/// <summary> /// <summary>
/// 类型值 /// 类型值
/// </summary> /// </summary>

View File

@ -86,13 +86,13 @@ namespace IRaCIS.Application.Services
[HttpPost] [HttpPost]
public async Task<IResponseOutput> SaveGlobalReadingInfo(SaveGlobalReadingInfoInDto inDto) 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() await _readingGlobalTaskInfoRepository.AddRangeAsync(inDto.QuestionList.Select(x => new ReadingGlobalTaskInfo()
{ {
Answer=x.Answer, Answer=x.Answer,
QuestionId=x.QuestionId, QuestionId=x.QuestionId,
SubjectId=inDto.SubjectId, SubjectId=inDto.SubjectId,
GlobalTaskId=inDto.VisitTaskId, GlobalTaskId=inDto.GlobalTaskId,
TaskId=x.visitTaskId, TaskId=x.visitTaskId,
TrialId=inDto.TrialId, TrialId=inDto.TrialId,
}).ToList()); }).ToList());
@ -117,7 +117,7 @@ namespace IRaCIS.Application.Services
throw new BusinessValidationFailedException("当前任务不是全局阅片任务"); throw new BusinessValidationFailedException("当前任务不是全局阅片任务");
} }
GetGlobalReadingInfoOutDto result = new GetGlobalReadingInfoOutDto() { GetGlobalReadingInfoOutDto result = new GetGlobalReadingInfoOutDto() {
VisitTaskId = inDto.VisitTaskId, GlobalTaskId = inDto.VisitTaskId,
}; };
result.TaskList = await _visitTaskRepository.Where(x => x.ReadingCategory == ReadingCategory.Visit && result.TaskList = await _visitTaskRepository.Where(x => x.ReadingCategory == ReadingCategory.Visit &&
@ -133,6 +133,7 @@ namespace IRaCIS.Application.Services
QuestionId = y.ReadingQuestionTrialId, QuestionId = y.ReadingQuestionTrialId,
QuestionName = y.ReadingQuestionTrial.QuestionName, QuestionName = y.ReadingQuestionTrial.QuestionName,
Type=y.ReadingQuestionTrial.Type, Type=y.ReadingQuestionTrial.Type,
VisitTaskId=x.Id,
TypeValue=y.ReadingQuestionTrial.TypeValue, TypeValue=y.ReadingQuestionTrial.TypeValue,
Answer = y.Answer Answer = y.Answer
}).ToList() }).ToList()
@ -154,6 +155,7 @@ namespace IRaCIS.Application.Services
QuestionId =lr.question.QuestionId, QuestionId =lr.question.QuestionId,
QuestionName=lr.question.QuestionName, QuestionName=lr.question.QuestionName,
Type = lr.question.Type, Type = lr.question.Type,
VisitTaskId=x.VisitTaskId,
TypeValue = lr.question.TypeValue, TypeValue = lr.question.TypeValue,
}).ToList(); }).ToList();