Commit 3cc31800 authored by 黄奎's avatar 黄奎

页面修改

parent 61d8a6d4
......@@ -60,6 +60,11 @@ namespace Edu.Model.ViewModel.Question
/// </summary>
public string QBankIds { get; set; }
/// <summary>
/// 题目类型
/// </summary>
public string Q_QuestionTypeIds { get; set; }
/// <summary>
/// 选项
/// </summary>
......
......@@ -392,10 +392,17 @@ namespace Edu.Module.Exam
}
}
//获取问题列表
var questionList = questionRepository.GetQuestionListRepository(new RB_Question_ViewModel()
var questionList = new List<RB_Question_ViewModel>();
string Q_QuestionTypeIds = "";
if (model.TempDataList != null && model.TempDataList.Count > 0)
{
QBankIds = model.TemplateBankIds
});
Q_QuestionTypeIds = string.Join(",", model.TempDataList.Select(qitem => qitem.QuestionTypeId));
}
questionList = questionRepository.GetQuestionListRepository(new RB_Question_ViewModel()
{
QBankIds = model.TemplateBankIds,
Q_QuestionTypeIds = Q_QuestionTypeIds
});
//文件夹
var paperModel = new RB_Examination_Paper_ViewModel()
{
......
......@@ -103,7 +103,7 @@ WHERE 1=1
builder.AppendFormat(tempSql);
}
}
builder.AppendFormat(" ORDER BY A.{0} DESC ", nameof(RB_Examination_Paper_ViewModel.PaperId));
builder.AppendFormat(" ORDER BY A.{0} ASC,A.{0} DESC ", nameof(RB_Examination_Paper_ViewModel.PaperType),nameof(RB_Examination_Paper_ViewModel.PaperId));
return GetPage<RB_Examination_Paper_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString(), parameters).ToList();
}
......
......@@ -40,6 +40,10 @@ WHERE 1=1
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Question_ViewModel.CourseId), query.CourseId);
}
if (!string.IsNullOrEmpty(query.Q_QuestionTypeIds))
{
builder.AppendFormat(" AND {0} IN({1}) ", nameof(RB_Question_ViewModel.QuestionTypeId), query.Q_QuestionTypeIds);
}
return Get<RB_Question_ViewModel>(builder.ToString()).ToList();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment