修改一版
parent
f0d3d0b190
commit
61ee182bea
|
@ -4148,6 +4148,20 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.GetTrialCriterionJudgeQuestionList(IRaCIS.Core.Application.Service.Reading.Dto.GetTrialCriterionJudgeQuestionListInDto)">
|
||||
<summary>
|
||||
获取项目标准的裁判问题
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.SetTrialCriterionJudgeQuestionAnswerGroup(IRaCIS.Core.Application.Service.Reading.Dto.SetTrialCriterionJudgeQuestionAnswerGroupInDto)">
|
||||
<summary>
|
||||
设置裁判问题的答案分组
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.GetTrialReadingQuestion(IRaCIS.Core.Application.Service.Reading.Dto.GetTrialReadingQuestionInDto)">
|
||||
<summary>
|
||||
获取项目的阅片问题
|
||||
|
|
|
@ -67,7 +67,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
|
||||
[NotDefault]
|
||||
public string AnswerGroup { get; set; }
|
||||
public List<string> AnswerGroup { get; set; }
|
||||
}
|
||||
|
||||
public class GetTrialCriterionJudgeQuestionListOutDto
|
||||
|
|
|
@ -13,6 +13,7 @@ using IRaCIS.Core.Infra.EFCore.Common;
|
|||
using Panda.DynamicWebApi.Attributes;
|
||||
using AutoMapper;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
{
|
||||
|
@ -67,6 +68,10 @@ namespace IRaCIS.Application.Services
|
|||
VisistId = x.ReadingCategory == ReadingCategory.Visit ? x.SourceSubjectVisitId.Value : x.ReadModule.SubjectVisitId,
|
||||
VisitNum = x.ReadingCategory == ReadingCategory.Visit ? x.SubjectVisit.VisitNum : x.ReadModule.VisitNum
|
||||
}).OrderBy(x => x.VisitNum).ThenBy(x => x.ReadingCategory).FirstOrDefaultAsync();
|
||||
if (task == null)
|
||||
{
|
||||
throw new BusinessValidationFailedException("任务都已经完成");
|
||||
}
|
||||
task.SubjectId = subjectId.Value;
|
||||
|
||||
|
||||
|
@ -80,7 +85,10 @@ namespace IRaCIS.Application.Services
|
|||
VisistId = x.ReadingCategory == ReadingCategory.Visit ? x.SourceSubjectVisitId.Value : x.ReadModule.SubjectVisitId,
|
||||
VisitNum = x.ReadingCategory == ReadingCategory.Visit ? x.SubjectVisit.VisitNum : x.ReadModule.VisitNum
|
||||
}).FirstOrDefaultAsync();
|
||||
|
||||
if (task == null)
|
||||
{
|
||||
throw new BusinessValidationFailedException("任务都已经完成");
|
||||
}
|
||||
task.SubjectId = await _subjectVisitRepository.Where(x => x.Id == task.VisistId).Select(x => x.SubjectId).FirstOrDefaultAsync();
|
||||
}
|
||||
|
||||
|
@ -171,7 +179,7 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
await _readingQuestionTrialRepository.UpdatePartialFromQueryAsync(inDto.ReadingQuestionTrialId, x => new ReadingQuestionTrial()
|
||||
{
|
||||
AnswerGroup = inDto.AnswerGroup
|
||||
AnswerGroup = inDto.AnswerGroup.ToString()
|
||||
}) ;
|
||||
|
||||
var result = await _readingQuestionTrialRepository.SaveChangesAsync();
|
||||
|
@ -185,8 +193,10 @@ namespace IRaCIS.Application.Services
|
|||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<GetTrialReadingQuestionOutDto>> GetTrialReadingQuestion(GetTrialReadingQuestionInDto inDto)
|
||||
public async Task<(List<GetTrialReadingQuestionOutDto>, TaskState)> GetTrialReadingQuestion(GetTrialReadingQuestionInDto inDto)
|
||||
{
|
||||
|
||||
var readingTaskState = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => x.TaskState).FirstOrDefaultAsync();
|
||||
var query= from data in _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId==inDto.ReadingQuestionCriterionTrialId )
|
||||
join questionAnswer in _readingTaskQuestionAnswerRepository.Where(x=>x.VisitTaskId==inDto.VisitTaskId) on data.Id equals questionAnswer.ReadingQuestionTrialId into questionAnswerTemp
|
||||
from leftquestionAnswer in questionAnswerTemp.DefaultIfEmpty()
|
||||
|
@ -215,7 +225,7 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
FindChildQuestion(x, qusetionList);
|
||||
});
|
||||
return groupList;
|
||||
return (groupList, readingTaskState);
|
||||
}
|
||||
|
||||
|
||||
|
@ -258,17 +268,12 @@ namespace IRaCIS.Application.Services
|
|||
TrialId = inDto.TrialId
|
||||
}).ToList();
|
||||
await _readingTaskQuestionAnswerRepository.AddRangeAsync(readingTaskAnswerList);
|
||||
|
||||
|
||||
var result = await _visitTaskRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok(result);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 提交问题
|
||||
/// </summary>
|
||||
|
@ -284,7 +289,6 @@ namespace IRaCIS.Application.Services
|
|||
});
|
||||
var result = await _visitTaskRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok(result);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue