Uat_Study
parent
45cf5f1242
commit
264db455ff
|
@ -1035,6 +1035,27 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public string OrderMark { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class GetQuestionCalculateRelationInDto
|
||||
{
|
||||
public Guid? TrialReadingCriterionId { get; set; }
|
||||
|
||||
public Guid? ReadingQuestionId { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
//public class GetQuestionCalculateRelationOutDto
|
||||
//{
|
||||
// public List<CalculateRelationDto> CalculateRelationList { get; set; }
|
||||
//}
|
||||
|
||||
|
||||
public class CalculateRelationDto
|
||||
{
|
||||
public Guid QuestionId { get; set; }
|
||||
|
||||
public List<CalculateInfo> CalculateQuestionList { get; set; }
|
||||
}
|
||||
|
||||
public class ReadingQuestionTrialViewInDto
|
||||
{
|
||||
|
|
|
@ -298,7 +298,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
}).ToListAsync();
|
||||
|
||||
var globalTaskAnswer = await (from global in _readingGlobalTaskInfoRepository.Where(x => taskIds.Contains(x.GlobalTaskId) && x.GlobalAnswerType == GlobalAnswerType.Question && x.TrialReadingQuestion.IsJudgeQuestion).Include(x=>x.TrialReadingQuestion)
|
||||
join taskAnswer in _readingTaskQuestionAnswerRepository.AsQueryable() on new { TaskId= global.TaskId, QuestionId=global.QuestionId??default(Guid) } equals new { TaskId=taskAnswer.VisitTaskId, QuestionId=taskAnswer.ReadingQuestionTrialId }
|
||||
join taskAnswer in _readingTaskQuestionAnswerRepository.Where(x=>taskIds.Contains(x.VisitTaskId)) on new { TaskId= global.TaskId, QuestionId=global.QuestionId??default(Guid) } equals new { TaskId=taskAnswer.VisitTaskId, QuestionId=taskAnswer.ReadingQuestionTrialId }
|
||||
select new JudgeQuestionAnswerInfo()
|
||||
{
|
||||
Answer = global.Answer.Trim().IsNullOrEmpty()? taskAnswer.Answer: global.Answer,
|
||||
|
|
|
@ -411,6 +411,37 @@ namespace IRaCIS.Application.Services
|
|||
return await query.ToListAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取问题计算关系
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<CalculateRelationDto>> GetQuestionCalculateRelation(GetQuestionCalculateRelationInDto inDto)
|
||||
{
|
||||
if (inDto.TrialReadingCriterionId != null)
|
||||
{
|
||||
return await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId)
|
||||
.Select(x => new CalculateRelationDto()
|
||||
{
|
||||
QuestionId = x.Id,
|
||||
CalculateQuestionList = x.CalculateQuestionList
|
||||
|
||||
}).ToListAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
return await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionId == inDto.ReadingQuestionId)
|
||||
.Select(x => new CalculateRelationDto()
|
||||
{
|
||||
QuestionId = x.Id,
|
||||
CalculateQuestionList = x.CalculateQuestionList
|
||||
|
||||
}).ToListAsync();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目标准的其他问题(项目)
|
||||
/// </summary>
|
||||
|
@ -483,7 +514,7 @@ namespace IRaCIS.Application.Services
|
|||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<ReadingTableQuestionTrialView>> GetReadingTableQuestionTrialList(ReadingTableQuestionSystemQuery inDto)
|
||||
public async Task<(List<ReadingTableQuestionTrialView>,bool)> GetReadingTableQuestionTrialList(ReadingTableQuestionSystemQuery inDto)
|
||||
{
|
||||
|
||||
var readingTableQuestionSystemQueryable = _readingTableQuestionTrialRepository
|
||||
|
@ -491,7 +522,7 @@ namespace IRaCIS.Application.Services
|
|||
.Where(x => x.ReadingQuestionId == inDto.ReadingQuestionId).ProjectTo<ReadingTableQuestionTrialView>(_mapper.ConfigurationProvider);
|
||||
|
||||
var result = await readingTableQuestionSystemQueryable.OrderBy(x => x.ShowOrder).ToListAsync();
|
||||
return result;
|
||||
return (result,true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue