Commit d7065bea authored by 吴春's avatar 吴春

Merge branch 'master' of http://gitlab.oytour.com/Kui2/education

parents 65c8af14 67599ff6
...@@ -219,10 +219,10 @@ namespace Edu.Common.Data ...@@ -219,10 +219,10 @@ namespace Edu.Common.Data
{ {
if (!string.IsNullOrEmpty(subItem)) if (!string.IsNullOrEmpty(subItem))
{ {
if (subItem.Contains("答案解析:") || subItem.Contains("解析:")) if (subItem.Contains("答案解析:")|| subItem.Contains("答案解析:") || subItem.Contains("解析:") || subItem.Contains("解析:"))
{ {
string answerReg1 = @"答案解析"; string answerReg1 = @"答案解析[::]";
string answerReg2 = @"解析"; string answerReg2 = @"解析[::]";
Regex reg = new Regex(answerReg1); Regex reg = new Regex(answerReg1);
Regex reg2 = new Regex(answerReg2); Regex reg2 = new Regex(answerReg2);
string[] answerAnalysisArray = null; string[] answerAnalysisArray = null;
...@@ -239,19 +239,19 @@ namespace Edu.Common.Data ...@@ -239,19 +239,19 @@ namespace Edu.Common.Data
model.AnswerAnalysis = answerAnalysisArray.Length > 1 ? answerAnalysisArray[1] : ""; model.AnswerAnalysis = answerAnalysisArray.Length > 1 ? answerAnalysisArray[1] : "";
} }
} }
if (subItem.Contains("答案:")) if (subItem.Contains("答案:")|| subItem.Contains("答案:"))
{ {
answerObj = subItem; answerObj = subItem;
var answerArray = Regex.Split(subItem, "答案:"); var answerArray = Regex.Split(subItem, "[答][案][::]");
if (answerArray != null && answerArray.Length > 0) if (answerArray != null && answerArray.Length > 0)
{ {
model.QuestionAnswer = answerArray.Length > 1 ? answerArray[1] : ""; model.QuestionAnswer = answerArray.Length > 1 ? answerArray[1] : "";
} }
} }
if (subItem.Contains("难易程度:") || subItem.Contains("难易度:")) if (subItem.Contains("难易程度:")||subItem.Contains("难易程度:") || subItem.Contains("难易度:") || subItem.Contains("难易度:"))
{ {
string easyReg1 = @"难易程度"; string easyReg1 = @"难易程度[::]";
string easyReg2 = @"难易度"; string easyReg2 = @"难易度[::]";
Regex reg = new Regex(easyReg1); Regex reg = new Regex(easyReg1);
Regex reg2 = new Regex(easyReg2); Regex reg2 = new Regex(easyReg2);
string[] easyTypeArray = null; string[] easyTypeArray = null;
......
...@@ -102,8 +102,9 @@ namespace Edu.Common.Plugin ...@@ -102,8 +102,9 @@ namespace Edu.Common.Plugin
string para = paragraph.Text; string para = paragraph.Text;
foreach (DocumentObject docObject in paragraph.ChildObjects) foreach (DocumentObject docObject in paragraph.ChildObjects)
{ {
if (docObject is DocPicture pic) if ( docObject.DocumentObjectType == DocumentObjectType.Picture)
{ {
DocPicture pic = docObject as DocPicture;
string imageName = string.Format(@"WordImage_{0}.png", DateTime.Now.Ticks); string imageName = string.Format(@"WordImage_{0}.png", DateTime.Now.Ticks);
using MemoryStream ms = new MemoryStream(pic.ImageBytes); using MemoryStream ms = new MemoryStream(pic.ImageBytes);
Image outputImg = Image.FromStream(ms); Image outputImg = Image.FromStream(ms);
...@@ -194,7 +195,8 @@ namespace Edu.Common.Plugin ...@@ -194,7 +195,8 @@ namespace Edu.Common.Plugin
Regex reg1 = new Regex(pattern1); Regex reg1 = new Regex(pattern1);
if (isBigType) if (isBigType)
{ {
string pattern2 = @"[\r\n][(][一二三四五六七八九十]*[)]"; //注意“[ ]”为word里面的空格(出现0-N次)
string pattern2 = @"[\r\n][ ]*[((][一二三四五六七八九十]*[))]";
Regex reg2 = new Regex(pattern2); Regex reg2 = new Regex(pattern2);
if (reg2.IsMatch(questionStr)) if (reg2.IsMatch(questionStr))
{ {
......
...@@ -46,5 +46,10 @@ namespace Edu.Model.Entity.Course ...@@ -46,5 +46,10 @@ namespace Edu.Model.Entity.Course
/// 修改时间 /// 修改时间
/// </summary> /// </summary>
public DateTime UpdateTime { get; set; } public DateTime UpdateTime { get; set; }
/// <summary>
/// 基础课时
/// </summary>
public int BasicHours { get; set; }
} }
} }
...@@ -58,6 +58,7 @@ namespace Edu.Module.Public ...@@ -58,6 +58,7 @@ namespace Edu.Module.Public
{nameof(RB_Class_Config_ViewModel.BasicMinutes),extModel.BasicMinutes }, {nameof(RB_Class_Config_ViewModel.BasicMinutes),extModel.BasicMinutes },
{nameof(RB_Class_Config_ViewModel.UpdateBy),extModel.UpdateBy }, {nameof(RB_Class_Config_ViewModel.UpdateBy),extModel.UpdateBy },
{nameof(RB_Class_Config_ViewModel.UpdateTime),extModel.UpdateTime }, {nameof(RB_Class_Config_ViewModel.UpdateTime),extModel.UpdateTime },
{nameof(RB_Class_Config_ViewModel.BasicHours),extModel.BasicHours },
}; };
flag = class_ConfigRepository.Update(fileds, new WhereHelper(nameof(RB_Class_Config_ViewModel.ConfigId), oldModel.ConfigId)); flag = class_ConfigRepository.Update(fileds, new WhereHelper(nameof(RB_Class_Config_ViewModel.ConfigId), oldModel.ConfigId));
} }
......
...@@ -173,7 +173,17 @@ namespace Edu.Module.Question ...@@ -173,7 +173,17 @@ namespace Edu.Module.Question
break; break;
//单选题(数字) //单选题(数字)
case "single-number": case "single-number":
try
{
if (!string.IsNullOrEmpty(data))
{
obj = Common.Plugin.JsonHelper.DeserializeObject<List<optionItem>>(data); obj = Common.Plugin.JsonHelper.DeserializeObject<List<optionItem>>(data);
}
}
catch (Exception ex)
{
string str = ex.Message;
}
break; break;
} }
return obj; return obj;
......
...@@ -464,6 +464,7 @@ namespace Edu.WebApi.Controllers.Public ...@@ -464,6 +464,7 @@ namespace Edu.WebApi.Controllers.Public
BasicHourFee=base.ParmJObj.GetDecimal("BasicHourFee"), BasicHourFee=base.ParmJObj.GetDecimal("BasicHourFee"),
BasicClassNum=base.ParmJObj.GetInt("BasicClassNum"), BasicClassNum=base.ParmJObj.GetInt("BasicClassNum"),
BasicMinutes=base.ParmJObj.GetInt("BasicMinutes"), BasicMinutes=base.ParmJObj.GetInt("BasicMinutes"),
BasicHours=base.ParmJObj.GetInt("BasicHours"),
}; };
extModel.Group_Id = base.UserInfo.Group_Id; extModel.Group_Id = base.UserInfo.Group_Id;
extModel.UpdateBy = base.UserInfo.Id; extModel.UpdateBy = base.UserInfo.Id;
......
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