Commit d1c0612d authored by 黄奎's avatar 黄奎

页面修改

parent b3bffeb0
......@@ -121,18 +121,18 @@ namespace Edu.Common.Data
{
if (rootItem.QuestionList != null && rootItem.QuestionList.Count > 0)
{
if (rootItem.BigTitle == "阅读理解")
if (rootItem.BigTitle == "阅读选择")
{
foreach (var item in rootItem.QuestionList)
{
if(!string.IsNullOrEmpty(item))
{
string readStr = item.Replace("阅读理解", "").Trim();
string readStr = item.Replace("阅读选择", "").Trim();
if (!string.IsNullOrEmpty(readStr))
{
ImportModel model = new ImportModel
{
Category = rootItem.BigTitle,
Category = rootItem.BigTitle.Trim(),
SubQuestionList = new List<ImportModel>(),
QuestionTypeName= "阅读理解"
};
......@@ -148,7 +148,7 @@ namespace Edu.Common.Data
{
ImportModel model = new ImportModel()
{
Category = rootItem.BigTitle
Category = rootItem.BigTitle.Trim()
};
if (!string.IsNullOrEmpty(item))
{
......@@ -541,7 +541,7 @@ namespace Edu.Common.Data
ImportModel subQuestion = new ImportModel();
AnalysisQuestionTitle(item, subQuestion);
model.SubQuestionList.Add(subQuestion);
model.AnswerAnalysis += (index) + "、" + subQuestion.AnswerAnalysis;
model.AnswerAnalysis += "<p>"+(index) + "、" + subQuestion.AnswerAnalysis+"</p>";
}
index++;
}
......
......@@ -15,32 +15,51 @@ namespace Edu.Common.Enum.Course
/// </summary>
[EnumField("默认")]
Default = 0,
/// <summary>
/// <读音选择题>
/// 日语选择题
/// </summary>
[EnumField("日语选择题")]
JapaneseChoose = 1,
[EnumField("读音选择题")]
JapaneseSoundChoose = 1,
/// <summary>
/// 中文选择题
/// 汉字选择题
/// </summary>
[EnumField("中文选择题")]
[EnumField("汉字选择题")]
ChineseChoose = 2,
/// <summary>
/// 阅读理解
/// 选择最适当的单词
/// </summary>
[EnumField("选择最适当的单词")]
ChooseWord = 3,
/// <summary>
/// 选择意义最接近的单词
/// </summary>
[EnumField("阅读理解")]
ReadingComprehensio = 3,
[EnumField("选择意义最接近的单词")]
ChooseMean = 4,
/// <summary>
/// 文字词汇
/// 选择单词正确用法
/// </summary>
[EnumField("文字词汇")]
WordVocabulary = 4,
[EnumField("选择单词正确用法")]
ChooseWordUse =5,
/// <summary>
///
/// 选择单词正确用
/// </summary>
[EnumField("语法")]
Grammar =5
[EnumField("选择语法正确的一项")]
ChooseGrammarUse = 6,
/// <summary>
/// 选择★应该填入的词
/// </summary>
[EnumField("选择★应该填入的词")]
ChooseFillInWord = 7,
/// <summary>
/// 阅读选择
/// </summary>
[EnumField("阅读选择")]
ReadingChoose = 8,
}
}
\ No newline at end of file
......@@ -80,5 +80,10 @@ namespace Edu.Model.ViewModel.Question
return Common.Plugin.EnumHelper.ToName(this.Category);
}
}
/// <summary>
/// 分类编号
/// </summary>
public string QCategoryId { get; set; }
}
}
\ No newline at end of file
......@@ -85,6 +85,10 @@ WHERE 1=1 ");
{
builder.AppendFormat(" AND A.{0} IN({1}) ", nameof(RB_Question_ViewModel.DifficultyType), query.QDifficultyType);
}
if (!string.IsNullOrEmpty(query.QCategoryId))
{
builder.AppendFormat(" AND A.{0} IN({1}) ", nameof(RB_Question_ViewModel.Category), query.QCategoryId);
}
builder.AppendFormat(" ORDER BY A.{0} DESC ", nameof(RB_Question_ViewModel.QuestionId));
return GetPage<RB_Question_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString(), parameters).ToList();
}
......
......@@ -21,6 +21,7 @@
<ProjectReference Include="..\Edu.Module.User\Edu.Module.User.csproj" />
<ProjectReference Include="..\Edu.Repository\Edu.Repository.csproj" />
<ProjectReference Include="..\Edu.ThirdCore\Edu.ThirdCore.csproj" />
<ProjectReference Include="..\Edu.WebApi\Edu.WebApi.csproj" />
</ItemGroup>
</Project>
using System;
using Edu.WebApi.Controllers.Course;
using System;
namespace Edu.Test
{
......@@ -7,14 +8,12 @@ namespace Edu.Test
static void Main(string[] args)
{
string filePath = "";
filePath = @"C:/Users/qiaoyajun/Desktop/源模板.docx";
filePath = @"C:/Users/qiaoyajun/Desktop/EduWordTemplate.doc";
//filePath = @"C:/Users/qiaoyajun/Desktop/EduWordTemplate.doc";
var data = Common.Data.QuestionHelper.GetWordQuestionData(filePath);
Console.WriteLine(Common.Plugin.JsonHelper.Serialize(data));
if (data != null && data.Count > 0)
{
Console.WriteLine("总共:" + data.Count);
}
//var data = Common.Data.QuestionHelper.GetWordQuestionData(filePath);
var data2= new QuestionController().ImportWordQuestion(filePath, 1, 1);
Console.WriteLine(Common.Plugin.JsonHelper.Serialize(data2));
}
}
}
......@@ -76,6 +76,18 @@ namespace Edu.WebApi.Controllers.Course
}
catch
{
}
try
{
var categoryList = Common.Plugin.JsonHelper.DeserializeObject<List<int>>(base.ParmJObj.GetStringValue("QCategoryId"));
if (categoryList != null && categoryList.Count > 0)
{
query.QCategoryId = string.Join(",", categoryList);
}
}
catch
{
}
var list = questionModule.GetQuestionPageListModule(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, query);
List<object> resultList = new List<object>();
......@@ -753,20 +765,29 @@ namespace Edu.WebApi.Controllers.Course
{
switch (item.Category)
{
case "日语选择题":
Category = QuestionCategoryEnum.JapaneseChoose;
case "读音选择题":
Category = QuestionCategoryEnum.JapaneseSoundChoose;
break;
case "中文选择题":
case "汉字选择题":
Category = QuestionCategoryEnum.ChineseChoose;
break;
case "阅读理解":
Category = QuestionCategoryEnum.ReadingComprehensio;
case "选择最适当的单词":
Category = QuestionCategoryEnum.ChooseWord;
break;
case "选择意义最接近的单词":
Category = QuestionCategoryEnum.ChooseMean;
break;
case "选择单词正确用法":
Category = QuestionCategoryEnum.ChooseWordUse;
break;
case "选择语法正确的一项":
Category = QuestionCategoryEnum.ChooseGrammarUse;
break;
case "文字词汇":
Category = QuestionCategoryEnum.WordVocabulary;
case "选择★应该填入的词":
Category = QuestionCategoryEnum.ChooseFillInWord;
break;
case "语法":
Category = QuestionCategoryEnum.Grammar;
case "阅读选择":
Category = QuestionCategoryEnum.ReadingChoose;
break;
}
}
......
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