查询既往信息
parent
c3ed54f05f
commit
5735383cd7
|
@ -438,7 +438,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
{
|
{
|
||||||
public Guid VisitTaskId { get; set; }
|
public Guid VisitTaskId { get; set; }
|
||||||
|
|
||||||
public string? OtherPicturePath { get; set; }
|
public string? PicturePath { get; set; }
|
||||||
|
|
||||||
public string TaskBlindName { get; set; } = string.Empty;
|
public string TaskBlindName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
@ -447,7 +447,14 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
public class GetPreviousOtherPicturePathInDto
|
public class GetPreviousOtherPicturePathInDto
|
||||||
{
|
{
|
||||||
public Guid RowId { get; set; }
|
public Guid? RowId { get; set; }
|
||||||
|
|
||||||
|
public Guid? VisitTaskId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 问题类型
|
||||||
|
/// </summary>
|
||||||
|
public QuestionType? QuestionType { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GetReadingCalculationDataInDto
|
public class GetReadingCalculationDataInDto
|
||||||
|
|
|
@ -176,18 +176,38 @@ namespace IRaCIS.Application.Services
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<List<GetPreviousOtherPicturePathOutDto>> GetPreviousOtherPicturePath(GetPreviousOtherPicturePathInDto inDto)
|
public async Task<List<GetPreviousOtherPicturePathOutDto>> GetPreviousOtherPicturePath(GetPreviousOtherPicturePathInDto inDto)
|
||||||
|
{
|
||||||
|
List<GetPreviousOtherPicturePathOutDto> result = new List<GetPreviousOtherPicturePathOutDto>() { };
|
||||||
|
|
||||||
|
if (inDto.RowId != null)
|
||||||
{
|
{
|
||||||
var rowinfo = await _readingTableAnswerRowInfoRepository.Where(x => x.Id == inDto.RowId).FirstNotNullAsync();
|
var rowinfo = await _readingTableAnswerRowInfoRepository.Where(x => x.Id == inDto.RowId).FirstNotNullAsync();
|
||||||
var taskInfoList = await _generalCalculateService.GetReadingReportTaskList(rowinfo.VisitTaskId);
|
var taskInfoList = await _generalCalculateService.GetReadingReportTaskList(rowinfo.VisitTaskId);
|
||||||
var visitTaskIds = taskInfoList.Select(x => x.VisitTaskId).ToList();
|
var visitTaskIds = taskInfoList.Select(x => x.VisitTaskId).ToList();
|
||||||
List<GetPreviousOtherPicturePathOutDto> result = await _readingTableAnswerRowInfoRepository.Where(x => x.QuestionId == rowinfo.QuestionId && x.RowIndex == rowinfo.RowIndex && visitTaskIds.Contains(x.VisitTaskId))
|
result = await _readingTableAnswerRowInfoRepository.Where(x => x.QuestionId == rowinfo.QuestionId && x.RowIndex == rowinfo.RowIndex && visitTaskIds.Contains(x.VisitTaskId))
|
||||||
.Where(x=>x.OtherPicturePath!=null&&x.OtherPicturePath!=string.Empty)
|
|
||||||
.OrderBy(x => x.VisitTask.VisitTaskNum).Select(x => new GetPreviousOtherPicturePathOutDto()
|
.OrderBy(x => x.VisitTask.VisitTaskNum).Select(x => new GetPreviousOtherPicturePathOutDto()
|
||||||
{
|
{
|
||||||
VisitTaskId = x.VisitTaskId,
|
VisitTaskId = x.VisitTaskId,
|
||||||
OtherPicturePath = x.OtherPicturePath,
|
PicturePath = x.OtherPicturePath,
|
||||||
TaskBlindName = x.VisitTask.TaskBlindName
|
TaskBlindName = x.VisitTask.TaskBlindName
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
}
|
||||||
|
else if(inDto.VisitTaskId!=null&&inDto.QuestionType!=null)
|
||||||
|
{
|
||||||
|
var taskInfoList = await _generalCalculateService.GetReadingReportTaskList(inDto.VisitTaskId.Value);
|
||||||
|
var visitTaskIds = taskInfoList.Select(x => x.VisitTaskId).ToList();
|
||||||
|
result = await _readingTaskQuestionMarkRepository.Where(x => x.ReadingQuestionTrial.QuestionType == inDto.QuestionType && visitTaskIds.Contains(x.VisitTaskId))
|
||||||
|
|
||||||
|
.OrderBy(x => x.VisitTask.VisitTaskNum).Select(x => new GetPreviousOtherPicturePathOutDto()
|
||||||
|
{
|
||||||
|
VisitTaskId = x.VisitTaskId,
|
||||||
|
PicturePath = x.PicturePath,
|
||||||
|
TaskBlindName = x.VisitTask.TaskBlindName
|
||||||
|
}).ToListAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,13 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
public int? OtherNumberOfFrames { get; set; }
|
public int? OtherNumberOfFrames { get; set; }
|
||||||
public string? OtherMeasureData { get; set; } = string.Empty;
|
public string? OtherMeasureData { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
[ForeignKey("QuestionId")]
|
||||||
|
public ReadingQuestionTrial ReadingQuestionTrial { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
[ForeignKey("VisitTaskId")]
|
||||||
|
public VisitTask VisitTask { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue