修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
4621ed9e67
commit
5f898ed93a
|
@ -11331,6 +11331,13 @@
|
||||||
<param name="inDto"></param>
|
<param name="inDto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.GetSystemCalculateQuestions(IRaCIS.Core.Application.Service.Reading.Dto.GetSystemCalculateQuestionsInDto)">
|
||||||
|
<summary>
|
||||||
|
获取系统计算问题
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.GetCalculateTableQuestions(IRaCIS.Core.Application.Service.Reading.Dto.GetCalculateTableQuestionsInDto)">
|
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.GetCalculateTableQuestions(IRaCIS.Core.Application.Service.Reading.Dto.GetCalculateTableQuestionsInDto)">
|
||||||
<summary>
|
<summary>
|
||||||
获取表格问题
|
获取表格问题
|
||||||
|
@ -11338,6 +11345,13 @@
|
||||||
<param name="inDto"></param>
|
<param name="inDto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.GetSystemCalculateTableQuestions(IRaCIS.Core.Application.Service.Reading.Dto.GetCalculateTableQuestionsInDto)">
|
||||||
|
<summary>
|
||||||
|
获取系统表格问题
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.GetSystemGroupNameList(IRaCIS.Core.Application.Service.Reading.Dto.GetTrialGroupNameListInDto)">
|
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.GetSystemGroupNameList(IRaCIS.Core.Application.Service.Reading.Dto.GetTrialGroupNameListInDto)">
|
||||||
<summary>
|
<summary>
|
||||||
获取系统问题分组
|
获取系统问题分组
|
||||||
|
|
|
@ -1556,6 +1556,18 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
[NotDefault]
|
[NotDefault]
|
||||||
public Guid TrialReadingCriterionId { get; set; }
|
public Guid TrialReadingCriterionId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class GetSystemCalculateQuestionsInDto
|
||||||
|
{
|
||||||
|
[NotDefault]
|
||||||
|
public Guid SystemCriterionId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public string Type { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public class GetCalculateQuestionsInDto
|
public class GetCalculateQuestionsInDto
|
||||||
{
|
{
|
||||||
[NotDefault]
|
[NotDefault]
|
||||||
|
|
|
@ -126,6 +126,50 @@ namespace IRaCIS.Core.Application.Service
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取系统计算问题
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<List<GetCalculateQuestionsOutDto>> GetSystemCalculateQuestions(GetSystemCalculateQuestionsInDto inDto)
|
||||||
|
{
|
||||||
|
var result = await _readingQuestionSystemRepository
|
||||||
|
|
||||||
|
.Where(x => x.ReadingQuestionCriterionSystemId == inDto.SystemCriterionId)
|
||||||
|
.WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type == inDto.Type)
|
||||||
|
.OrderBy(x => x.ShowOrder)
|
||||||
|
.Select(x => new GetCalculateQuestionsOutDto
|
||||||
|
()
|
||||||
|
{
|
||||||
|
QuestionId = x.Id,
|
||||||
|
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us)
|
||||||
|
|
||||||
|
}).ToListAsync();
|
||||||
|
|
||||||
|
var tablequestion = await _readingTableQuestionSystemRepository.Where(x => x.SystemCriterionId == inDto.SystemCriterionId && x.Type == "number").Select(x =>
|
||||||
|
new
|
||||||
|
{
|
||||||
|
QuestionId = x.Id,
|
||||||
|
x.ReadingQuestionId,
|
||||||
|
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us)
|
||||||
|
}).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
result.ForEach(x =>
|
||||||
|
{
|
||||||
|
x.TableQuestions = tablequestion.Where(y => x.QuestionId == y.ReadingQuestionId).Select(y => new CalculateQuestion()
|
||||||
|
{
|
||||||
|
|
||||||
|
QuestionId = y.QuestionId,
|
||||||
|
QuestionName = y.QuestionName
|
||||||
|
|
||||||
|
}).ToList();
|
||||||
|
});
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取表格问题
|
/// 获取表格问题
|
||||||
|
@ -152,7 +196,30 @@ namespace IRaCIS.Core.Application.Service
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取系统表格问题
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<List<GetCalculateTableQuestionsOutDto>> GetSystemCalculateTableQuestions(GetCalculateTableQuestionsInDto inDto)
|
||||||
|
{
|
||||||
|
|
||||||
|
var result = await _readingTableQuestionSystemRepository
|
||||||
|
|
||||||
|
.Where(x => x.ReadingQuestionId == inDto.QuestionId)
|
||||||
|
.WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type == inDto.Type)
|
||||||
|
.OrderBy(x => x.ShowOrder)
|
||||||
|
.Select(x => new GetCalculateTableQuestionsOutDto
|
||||||
|
()
|
||||||
|
{
|
||||||
|
QuestionId = x.Id,
|
||||||
|
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us)
|
||||||
|
|
||||||
|
}).ToListAsync();
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
Loading…
Reference in New Issue