Commit c00dd070 authored by 黄奎's avatar 黄奎

页面修改

parent bc682a4f
using Edu.Common.Enum; using Edu.Common.Enum;
using Edu.Common.Enum.Question;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
......
...@@ -24,5 +24,10 @@ namespace Edu.Model.ViewModel.Exam ...@@ -24,5 +24,10 @@ namespace Edu.Model.ViewModel.Exam
/// 选项 /// 选项
/// </summary> /// </summary>
public object QuestionContentObj { get; set; } public object QuestionContentObj { get; set; }
/// <summary>
/// 问题数量
/// </summary>
public int QuestionCount { get; set; }
} }
} }
...@@ -13,6 +13,11 @@ namespace Edu.Model.ViewModel.Exam ...@@ -13,6 +13,11 @@ namespace Edu.Model.ViewModel.Exam
/// <summary> /// <summary>
/// 是否保存未组卷模板(1-是) /// 是否保存未组卷模板(1-是)
/// </summary> /// </summary>
public int IsSaveTemplate { get; set; } public bool IsSaveTemplate { get; set; }
/// <summary>
/// 模板数据
/// </summary>
public List<ExamTemplate> TempDataList { get; set; }
} }
} }
This diff is collapsed.
...@@ -40,6 +40,35 @@ WHERE 1=1 ...@@ -40,6 +40,35 @@ WHERE 1=1
} }
return Get<RB_Examination_Details_ViewModel>(builder.ToString()).ToList(); return Get<RB_Examination_Details_ViewModel>(builder.ToString()).ToList();
} }
/// <summary>
/// 获取试卷题目列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Examination_Details_ViewModel> GetExaminationDetailsStaticListRepository(RB_Examination_Details_ViewModel query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.PaperId,COUNT(1) AS QuestionCount
FROM RB_Examination_Details AS A
WHERE 1=1
");
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Examination_Details_ViewModel.Status), (int)DateStateEnum.Normal);
if (query != null)
{
if (query.PaperId > 0)
{
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_Examination_Details_ViewModel.PaperId), query.PaperId);
}
if (!string.IsNullOrEmpty(query.QPaperIds))
{
builder.AppendFormat(@" AND A.{0} IN({1}) ", nameof(RB_Examination_Details_ViewModel.PaperId), query.QPaperIds);
}
}
builder.Append(" GROUP BY A.PaperId ");
return Get<RB_Examination_Details_ViewModel>(builder.ToString()).ToList();
}
} }
} }
...@@ -175,7 +175,7 @@ namespace Edu.WebApi.Controllers.Exam ...@@ -175,7 +175,7 @@ namespace Edu.WebApi.Controllers.Exam
Group_Id = base.UserInfo.Group_Id, Group_Id = base.UserInfo.Group_Id,
School_Id=base.UserInfo.School_Id, School_Id=base.UserInfo.School_Id,
Status= Common.Enum.DateStateEnum.Normal, Status= Common.Enum.DateStateEnum.Normal,
IsSaveTemplate=base.ParmJObj.GetInt("IsSaveTemplate"), IsSaveTemplate=base.ParmJObj.GetBoolValue("IsSaveTemplate"),
}; };
string TemplateData = base.ParmJObj.GetStringValue("TemplateData"); string TemplateData = base.ParmJObj.GetStringValue("TemplateData");
if (!string.IsNullOrEmpty(TemplateData)) if (!string.IsNullOrEmpty(TemplateData))
...@@ -184,6 +184,7 @@ namespace Edu.WebApi.Controllers.Exam ...@@ -184,6 +184,7 @@ namespace Edu.WebApi.Controllers.Exam
if (list != null && list.Count > 0) if (list != null && list.Count > 0)
{ {
extModel.TemplateData = Common.Plugin.JsonHelper.Serialize(list); extModel.TemplateData = Common.Plugin.JsonHelper.Serialize(list);
extModel.TempDataList = list;
} }
} }
bool flag = paperModule.SetPaperTemplateModule(extModel); bool flag = paperModule.SetPaperTemplateModule(extModel);
......
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