Commit 40299cf4 authored by 黄奎's avatar 黄奎

页面修改

parent 5434c5d8
...@@ -31,5 +31,10 @@ namespace Edu.Model.ViewModel.Question ...@@ -31,5 +31,10 @@ namespace Edu.Model.ViewModel.Question
/// 问题知识点编号【查询使用】 /// 问题知识点编号【查询使用】
/// </summary> /// </summary>
public string QPointIds { get; set; } public string QPointIds { get; set; }
/// <summary>
/// 是否选中
/// </summary>
public bool IsCheck { get; set; }
} }
} }
...@@ -152,6 +152,10 @@ namespace Edu.Module.Question ...@@ -152,6 +152,10 @@ namespace Edu.Module.Question
if (extModel != null) if (extModel != null)
{ {
extModel.AnswerObj = analysisQuestion.ParsingQuestion(extModel.QuestionTypeKey, extModel.Answer); extModel.AnswerObj = analysisQuestion.ParsingQuestion(extModel.QuestionTypeKey, extModel.Answer);
if (!string.IsNullOrEmpty(extModel.Knowledge))
{
extModel.QuestionPointList = GetPointListModule(new RB_Question_Point_ViewModel() { QPointIds = extModel.Knowledge });
}
} }
return extModel; return extModel;
} }
......
...@@ -3,6 +3,7 @@ using Edu.Model.ViewModel.Question; ...@@ -3,6 +3,7 @@ using Edu.Model.ViewModel.Question;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using VT.FW.DB.Dapper;
namespace Edu.Repository.Question namespace Edu.Repository.Question
{ {
...@@ -33,7 +34,7 @@ WHERE 1=1 ...@@ -33,7 +34,7 @@ WHERE 1=1
} }
if (!string.IsNullOrEmpty(query.QPointIds)) if (!string.IsNullOrEmpty(query.QPointIds))
{ {
builder.AppendFormat(" AND {0} IN({1}) ", nameof(RB_Question_Point_ViewModel.CourseId), query.QPointIds); builder.AppendFormat(" AND {0} IN({1}) ", nameof(RB_Question_Point_ViewModel.PointId), query.QPointIds);
} }
} }
return Get<RB_Question_Point_ViewModel>(builder.ToString()).ToList(); return Get<RB_Question_Point_ViewModel>(builder.ToString()).ToList();
...@@ -49,6 +50,7 @@ WHERE 1=1 ...@@ -49,6 +50,7 @@ WHERE 1=1
/// <returns></returns> /// <returns></returns>
public List<RB_Question_Point_ViewModel> GetPointPageListRepository(int pageIndex, int pageSize, out long rowsCount, RB_Question_Point_ViewModel query) public List<RB_Question_Point_ViewModel> GetPointPageListRepository(int pageIndex, int pageSize, out long rowsCount, RB_Question_Point_ViewModel query)
{ {
var parameters = new DynamicParameters();
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
builder.AppendFormat(@" builder.AppendFormat(@"
SELECT * SELECT *
...@@ -64,10 +66,15 @@ WHERE 1=1 ...@@ -64,10 +66,15 @@ WHERE 1=1
} }
if (!string.IsNullOrEmpty(query.QPointIds)) if (!string.IsNullOrEmpty(query.QPointIds))
{ {
builder.AppendFormat(" AND {0} IN({1}) ", nameof(RB_Question_Point_ViewModel.CourseId), query.QPointIds); builder.AppendFormat(" AND {0} IN({1}) ", nameof(RB_Question_Point_ViewModel.PointId), query.QPointIds);
}
if (!string.IsNullOrEmpty(query.PointName))
{
builder.AppendFormat(" AND {0} LIKE @PointName ", nameof(RB_Question_Point_ViewModel.PointName));
parameters.Add("PointName", "%" + query.PointName.Trim() + "%");
} }
} }
return GetPage<RB_Question_Point_ViewModel>(pageIndex,pageSize,out rowsCount,builder.ToString()).ToList(); return GetPage<RB_Question_Point_ViewModel>(pageIndex,pageSize,out rowsCount,builder.ToString(), parameters).ToList();
} }
} }
} }
\ No newline at end of file
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