修改
This commit is contained in:
@@ -272,6 +272,17 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public class ReadingTableQuestionTrialAddOrEdit
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 自定义计算标记
|
||||
/// </summary>
|
||||
public CustomCalculateMark? CustomCalculateMark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 自定义计算标记
|
||||
/// </summary>
|
||||
public string CalculateQuestions { get; set; } = "[]";
|
||||
|
||||
/// <summary>
|
||||
/// 数值类型
|
||||
/// </summary>
|
||||
@@ -803,6 +814,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// 单位
|
||||
/// </summary>
|
||||
public ValueUnit? Unit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 自定义计算标记
|
||||
/// </summary>
|
||||
public CustomCalculateMark? CustomCalculateMark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 自定义计算标记
|
||||
/// </summary>
|
||||
public string CalculateQuestions { get; set; }
|
||||
}
|
||||
|
||||
public class ReadingQuestionSystemView
|
||||
@@ -1017,8 +1038,36 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public bool IsJudgeQuestion { get; set; }
|
||||
}
|
||||
|
||||
public class GetCalculateQuestionsOutDto
|
||||
{
|
||||
public Guid QuestionId { get; set; }
|
||||
|
||||
public string QuestionName{ get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class GetCalculateTableQuestionsOutDto
|
||||
{
|
||||
public Guid TableQuestionId { get; set; }
|
||||
|
||||
public string TableQuestionName { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class GetCalculateTableQuestionsInDto
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid QuestionId { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class GetCalculateQuestionsInDto
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid TrialCriterionId { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class GetTrialGroupNameListInDto
|
||||
{
|
||||
@@ -1449,6 +1498,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// 单位
|
||||
/// </summary>
|
||||
public ValueUnit? Unit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 自定义计算标记
|
||||
/// </summary>
|
||||
public CustomCalculateMark? CustomCalculateMark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 自定义计算标记
|
||||
/// </summary>
|
||||
public string CalculateQuestions { get; set; } = "[]";
|
||||
}
|
||||
|
||||
public class GetSystemCriterionSelectDto
|
||||
|
||||
@@ -73,7 +73,58 @@ namespace IRaCIS.Application.Services
|
||||
this._previousPDFRepository = previousPDFRepository;
|
||||
}
|
||||
|
||||
#region 获取计算问题
|
||||
|
||||
/// <summary>
|
||||
/// 获取数值问题
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<GetCalculateQuestionsOutDto>> GetCalculateQuestions(GetCalculateQuestionsInDto inDto)
|
||||
{
|
||||
var result =await _readingQuestionTrialRepository
|
||||
|
||||
.Where(x => x.ReadingQuestionCriterionTrialId == inDto.TrialCriterionId)
|
||||
.Where(x => x.Type == "number")
|
||||
.OrderBy(x => x.ShowOrder)
|
||||
.Select(x => new GetCalculateQuestionsOutDto
|
||||
(){
|
||||
QuestionId = x.Id,
|
||||
QuestionName = x.QuestionName
|
||||
|
||||
}).ToListAsync();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取表格数值问题
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<GetCalculateTableQuestionsOutDto>> GetCalculateTableQuestions(GetCalculateTableQuestionsInDto inDto)
|
||||
{
|
||||
|
||||
var result = await _readingTableQuestionTrialRepository
|
||||
|
||||
.Where(x => x.ReadingQuestionId == inDto.QuestionId)
|
||||
.Where(x=>x.Type== "number")
|
||||
.OrderBy(x => x.ShowOrder)
|
||||
.Select(x => new GetCalculateTableQuestionsOutDto
|
||||
()
|
||||
{
|
||||
TableQuestionId = x.Id,
|
||||
TableQuestionName = x.QuestionName
|
||||
|
||||
}).ToListAsync();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 系统标准问题
|
||||
|
||||
Reference in New Issue
Block a user