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