This commit is contained in:
he
2022-06-17 14:53:15 +08:00
parent 665ca1b7ae
commit b1f629f56e
7 changed files with 58 additions and 26 deletions
@@ -46,7 +46,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public class GetTrialReadingQuestionInDto
{
[NotDefault]
public Guid CriterionId { get; set; }
public Guid ReadingQuestionCriterionTrialId { get; set; }
}
/// <summary>
@@ -6,7 +6,6 @@
using IRaCIS.Core.Application.Service.Reading.Dto;
using IRaCIS.Core.Domain.Share.Reading;
namespace IRaCIS.Core.Application.Contracts
{
@@ -6,7 +6,6 @@
using IRaCIS.Core.Application.Service.Reading.Dto;
using IRaCIS.Core.Domain.Share.Reading;
namespace IRaCIS.Core.Application.Contracts
{
@@ -33,9 +33,9 @@ namespace IRaCIS.Application.Services
IMapper mapper,
IRepository<NoneDicomStudy> noneDicomStudyRepository,
IRepository<VisitTask> visitTaskRepository,
IRepository<ReadingTaskQuestionAnswer> readingTaskQuestionAnswerRepository,
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository,
IRepository<ReadingQuestionTrial> readingQuestionTrialRepository
IRepository<ReadingTaskQuestionAnswer> readingTaskQuestionAnswerRepository,
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository,
IRepository<ReadingQuestionTrial> readingQuestionTrialRepository
)
{
this.mapper = mapper;
@@ -46,23 +46,27 @@ namespace IRaCIS.Application.Services
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
}
///// <summary>
///// 获取阅片非Dicom文件
///// </summary>
///// <param name="inDto"></param>
///// <returns></returns>
//[HttpPost]
//public async Task<List<GetReadingImgOutDto>> GetReadingImageFile(GetReadingImgInDto inDto)
//{
// var subjectVisitId=await _visitTaskRepository.Where(x=>x.Id==inDto.VisitTaskId).Select(x=>x.vi)
// List<GetReadingImgOutDto> imgList =await _noneDicomStudyRepository.Where(x => x.SubjectVisitId == inDto.SubjectVisitId)
// .SelectMany(x => x.NoneDicomFileList).Select(x=> new GetReadingImgOutDto() {
// FileName=x.FileName,
// Path=x.Path
// }).ToListAsync();
// return imgList;
//}
/// <summary>
/// 获取阅片非Dicom文件
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<List<GetReadingImgOutDto>> GetReadingImageFile(GetReadingImgInDto inDto)
{
Guid? subjectVisitId = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => x.SourceSubjectVisitId).FirstOrDefaultAsync();
if (subjectVisitId == null)
{
throw new QueryBusinessObjectNotExistException($"数据异常,当前任务没有访视Id");
}
List<GetReadingImgOutDto> imgList = await _noneDicomStudyRepository.Where(x => x.SubjectVisitId == subjectVisitId)
.SelectMany(x => x.NoneDicomFileList).Select(x => new GetReadingImgOutDto()
{
FileName = x.FileName,
Path = x.Path
}).ToListAsync();
return imgList;
}
/// <summary>
/// 获取项目已确认的标准
@@ -89,7 +93,7 @@ namespace IRaCIS.Application.Services
[HttpPost]
public async Task<List<GetTrialReadingQuestionOutDto>> GetTrialReadingQuestion(GetTrialReadingQuestionInDto inDto)
{
var qusetionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.CriterionId).ToListAsync();
var qusetionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.ReadingQuestionCriterionTrialId).ToListAsync();
List<GetTrialReadingQuestionOutDto> groupList = _mapper.Map<List<GetTrialReadingQuestionOutDto>>(qusetionList.Where(x => x.ParentId == null));
groupList.ForEach(x =>