CrazyIter 5 éve
szülő
commit
bbf4d47fb8
22 módosított fájl, 97 hozzáadás és 107 törlés
  1. 5 5
      TEAMModelOS.SDK/Helper/Common/JsonHelper/JsonPatchHelper.cs
  2. 1 1
      TEAMModelOS.Service/Models/Evaluation/Models/ExamAnswer.cs
  3. 1 1
      TEAMModelOS.Service/Models/Evaluation/Models/ExamInfo.cs
  4. 6 6
      TEAMModelOS.Service/Models/Evaluation/Models/ItemInfo.cs
  5. 3 3
      TEAMModelOS.Service/Models/Evaluation/Models/ExamPaper.cs
  6. 1 1
      TEAMModelOS.Service/Models/Evaluation/Models/SimpleExam.cs
  7. 2 2
      TEAMModelOS.Service/Models/PowerPoint/Slide.cs
  8. 1 1
      TEAMModelOS.Service/Services/Analysis/Implements/AchievementService.cs
  9. 1 1
      TEAMModelOS.Service/Services/Analysis/Interfaces/IAchievementService.cs
  10. 2 2
      TEAMModelOS.Service/Services/Evaluation/Implements/EvaluatingService.cs
  11. 35 35
      TEAMModelOS.Service/Services/Evaluation/Implements/HtmlAnalyzeService.cs
  12. 2 2
      TEAMModelOS.Service/Services/Evaluation/Implements/ImportExerciseService.cs
  13. 1 1
      TEAMModelOS.Service/Services/Evaluation/Interfaces/IEvaluatingService.cs
  14. 3 3
      TEAMModelOS.Service/Services/Evaluation/Interfaces/IHtmlAnalyzeService.cs
  15. 1 1
      TEAMModelOS.Service/Services/Evaluation/Interfaces/IImportExerciseService.cs
  16. 4 4
      TEAMModelOS.Service/Services/PowerPoint/Implement/HtexService.cs
  17. 0 10
      TEAMModelOS.Service/TEAMModelOS.Service.csproj
  18. 2 2
      TEAMModelOS/Controllers/Analysis/AchievementController.cs
  19. 1 1
      TEAMModelOS/Controllers/Analysis/ChangeController.cs
  20. 14 14
      TEAMModelOS/Controllers/Evaluation/ExamController.cs
  21. 5 5
      TEAMModelOS/Controllers/Evaluation/ImportExerciseController.cs
  22. 6 6
      TEAMModelOS/Controllers/Evaluation/ItemInfoController.cs

+ 5 - 5
TEAMModelOS.SDK/Helper/Common/JsonHelper/JsonPatchHelper.cs

@@ -7,35 +7,35 @@ namespace System
 {
     public static class JsonPatchHelper
     {
-        public static T add<T>(this T t, string path, object value) where T : class
+        public static T JsonAdd<T>(this T t, string path, object value) where T : class
         {
             JsonPatchDocument<T> jsonPatch = new JsonPatchDocument<T>();
             jsonPatch.Operations.Add(new Operation<T>("add", path, null, value));
             jsonPatch.ApplyTo(t);
             return t;
         }
-        public static T remove<T>(this T t, string path) where T : class
+        public static T JsonRemove<T>(this T t, string path) where T : class
         {
             JsonPatchDocument<T> jsonPatch = new JsonPatchDocument<T>();
             jsonPatch.Operations.Add(new Operation<T>("remove", path, null, null));
             jsonPatch.ApplyTo(t);
             return t;
         }
-        public static T replace<T>(this T t, string path, object value) where T : class
+        public static T JsonReplace<T>(this T t, string path, object value) where T : class
         {
             JsonPatchDocument<T> jsonPatch = new JsonPatchDocument<T>();
             jsonPatch.Operations.Add(new Operation<T>("replace", path, null, value));
             jsonPatch.ApplyTo(t);
             return t;
         }
-        public static T move<T>(this T t, string from, string path) where T : class
+        public static T JsonMove<T>(this T t, string from, string path) where T : class
         {
             JsonPatchDocument<T> jsonPatch = new JsonPatchDocument<T>();
             jsonPatch.Operations.Add(new Operation<T>("move", path, from));
             jsonPatch.ApplyTo(t);
             return t;
         }
-        public static T copy<T>(this T t, string from, string path) where T : class
+        public static T JsonCopy<T>(this T t, string from, string path) where T : class
         {
             JsonPatchDocument<T> jsonPatch = new JsonPatchDocument<T>();
             jsonPatch.Operations.Add(new Operation<T>("copy", path, from));

+ 1 - 1
TEAMModelOS.Service/Models/Evaluation/Models/ExamAnswer.cs

@@ -5,7 +5,7 @@ using System.Text;
 using TEAMModelOS.SDK.Context.Attributes.Azure;
 using TEAMModelOS.SDK.Module.AzureCosmosDBV3;
 
-namespace TEAMModelOS.Service.Models.Evaluation.Models
+namespace TEAMModelOS.Service.Models.Exam.Models
 {
     /// <summary>
     /// 考生作答信息

+ 1 - 1
TEAMModelOS.Service/Models/Evaluation/Models/ExamInfo.cs

@@ -6,7 +6,7 @@ using System.Text.Json.Serialization;
 using TEAMModelOS.SDK.Context.Attributes.Azure;
 using TEAMModelOS.SDK.Module.AzureCosmosDBV3;
 
-namespace TEAMModelOS.Service.Models.Evaluation.Models
+namespace TEAMModelOS.Service.Models.Exam.Models
 {
     /// <summary>
     /// 考试基础信息

+ 6 - 6
TEAMModelOS.Service/Models/Evaluation/Models/ItemInfo.cs

@@ -6,17 +6,17 @@ using TEAMModelOS.SDK.Context.Attributes.Azure;
 using TEAMModelOS.SDK.Module.AzureCosmosDBV3;
 using TEAMModelOS.Service.Models.Core;
 
-namespace TEAMModelOS.Service.Models.Evaluation.Models
+namespace TEAMModelOS.Service.Models.Exam.Models
 {
     /// <summary>
     /// 题目信息
     /// </summary>
-    [CosmosDB(RU = 400, Name = "ItemInfo")]
-    public class ItemInfo :ID
+    [CosmosDB(RU = 400, Name = "ExamItem")]
+    public class ExamItem :ID
     {
-        public ItemInfo()
+        public ExamItem()
         {
-            children = new List<ItemInfo>();
+            children = new List<ExamItem>();
             option = new List<CodeValue>();
             answer = new List<string>();
             points = new List<string>();
@@ -42,7 +42,7 @@ namespace TEAMModelOS.Service.Models.Evaluation.Models
         public List<string> points { get; set; }
         //认知层次 应用 综合 理解 评鉴 知识
         public string field { get; set; }
-        public List<ItemInfo> children { get; set; }
+        public List<ExamItem> children { get; set; }
         // 配分  
         public double score { get; set; }
         /// <summary>

+ 3 - 3
TEAMModelOS.Service/Models/Evaluation/Models/ExamPaper.cs

@@ -5,7 +5,7 @@ using System.Text;
 using TEAMModelOS.SDK.Context.Attributes.Azure;
 using TEAMModelOS.SDK.Module.AzureCosmosDBV3;
 
-namespace TEAMModelOS.Service.Models.Evaluation.Models
+namespace TEAMModelOS.Service.Models.Exam.Models
 {
     /// <summary>
     /// 试卷信息
@@ -15,7 +15,7 @@ namespace TEAMModelOS.Service.Models.Evaluation.Models
     {
 
         public ExamPaper() {
-            item = new List<ItemInfo>();
+            item = new List<ExamItem>();
         }
         [JsonProperty(PropertyName = "id")]
         public string id { get; set; }
@@ -25,7 +25,7 @@ namespace TEAMModelOS.Service.Models.Evaluation.Models
         /// 考试活动code
         /// </summary>
         public string examCode { get; set; }
-        public List<ItemInfo> item { get; set; }       
+        public List<ExamItem> item { get; set; }       
         public string subject { get; set; }
         public string period { get; set; }
     }

+ 1 - 1
TEAMModelOS.Service/Models/Evaluation/Models/SimpleExam.cs

@@ -5,7 +5,7 @@ using System.Text;
 using TEAMModelOS.SDK.Context.Attributes.Azure;
 using TEAMModelOS.SDK.Module.AzureCosmosDBV3;
 
-namespace TEAMModelOS.Service.Model.Evaluation.Models
+namespace TEAMModelOS.Service.Model.Exam.Models
 {
     /// <summary>
     /// 考试成绩信息

+ 2 - 2
TEAMModelOS.Service/Models/PowerPoint/Slide.cs

@@ -2,7 +2,7 @@ using System;
 using System.Collections.Generic;
 using System.Text;
 using TEAMModelOS.Service.Models.Core;
-using TEAMModelOS.Service.Models.Evaluation.Models;
+using TEAMModelOS.Service.Models.Exam.Models;
 
 namespace TEAMModelOS.Service.Model.PowerPoint
 {
@@ -15,7 +15,7 @@ namespace TEAMModelOS.Service.Model.PowerPoint
         public double width { get; set; }
         //高度
         public double height { get; set; }
-        public ItemInfo exercise { get; set; }
+        public ExamItem exercise { get; set; }
         //1 PPTX  2 HTML  来源
         public int source { get; set; }
         /// <summary>

+ 1 - 1
TEAMModelOS.Service/Services/Analysis/Implements/AchievementService.cs

@@ -1,7 +1,7 @@
 using System;
 using System.Collections.Generic;
 using System.Linq;
-using TEAMModelOS.Service.Model.Evaluation.Models;
+using TEAMModelOS.Service.Model.Exam.Models;
 using TEAMModelOS.SDK.Helper.Common.CollectionHelper;
 using TEAMModelOS.SDK.Module.AzureCosmosDB.Interfaces;
 using TEAMModelOS.Service.Analysis.Interfaces;

+ 1 - 1
TEAMModelOS.Service/Services/Analysis/Interfaces/IAchievementService.cs

@@ -1,5 +1,5 @@
 using System.Collections.Generic;
-using TEAMModelOS.Service.Model.Evaluation.Models;
+using TEAMModelOS.Service.Model.Exam.Models;
 using TEAMModelOS.SDK.Context.Configuration;
 using TEAMModelOS.Service.Models.Core;
 

+ 2 - 2
TEAMModelOS.Service/Services/Evaluation/Implements/EvaluatingService.cs

@@ -1,9 +1,9 @@
 using System;
 using System.Collections.Generic;
 using System.Text;
-using TEAMModelOS.Service.Evaluation.Interfaces;
+using TEAMModelOS.Service.Exam.Interfaces;
 
-namespace TEAMModelOS.Service.Evaluation.Implements
+namespace TEAMModelOS.Service.Exam.Implements
 {
     public class EvaluatingService :  IEvaluatingService
     {

+ 35 - 35
TEAMModelOS.Service/Services/Evaluation/Implements/HtmlAnalyzeService.cs

@@ -16,9 +16,9 @@ using TEAMModelOS.SDK.Helper.Common.StringHelper;
 using TEAMModelOS.SDK.Helper.Security.ShaHash;
 using TEAMModelOS.Service.Model.PowerPoint;
 using TEAMModelOS.Service.Models.Core;
-using TEAMModelOS.Service.Models.Evaluation.Models;
-using TEAMModelOS.Service.Services.Evaluation.Interfaces;
-namespace TEAMModelOS.Service.Services.Evaluation.Implements
+using TEAMModelOS.Service.Models.Exam.Models;
+using TEAMModelOS.Service.Services.Exam.Interfaces;
+namespace TEAMModelOS.Service.Services.Exam.Implements
 {
    public class HtmlAnalyzeService : IHtmlAnalyzeService
     {
@@ -36,7 +36,7 @@ namespace TEAMModelOS.Service.Services.Evaluation.Implements
             { "Single", "【单选题】|【结束】" }, { "Multiple", "【多选题】|【结束】" },
             { "Judge", "【判断题】|【结束】" }, { "Complete", "【填空题】|【结束】" },
             { "Subjective", "【问答题】|【结束】" } , { "Compose", "【综合题】|【完结】" }};
-        public List<ItemInfo> AnalyzeWordAsync(string html, string Lang)
+        public List<ExamItem> AnalyzeWordAsync(string html, string Lang)
         { 
             //去除class 以及span标签"
             string classpattern = "class=\"([^\"]*)\"";
@@ -45,33 +45,33 @@ namespace TEAMModelOS.Service.Services.Evaluation.Implements
             html = Regex.Replace(html, pattern, "");
             html = html.Replace("\t", " ").Replace("<span>", "").Replace("</span>", "").Replace("dir=\"ltr\"", "");
             Dictionary<string, List<string>> TestInType = ConvertTest(html);
-            List<ItemInfo> tests = new List<ItemInfo>();
+            List<ExamItem> tests = new List<ExamItem>();
             foreach (string key in TestInType.Keys)
             {
                 switch (key)
                 {
                     case "Single":
-                        List<ItemInfo> exercisesSingle = SingleConvert(key, TestInType[key]);
+                        List<ExamItem> exercisesSingle = SingleConvert(key, TestInType[key]);
                         exercisesSingle.ForEach(x => { x.pShaCode = x.shaCode; });
                         tests.AddRange(exercisesSingle); break;
                     case "Multiple":
-                        List<ItemInfo> exercisesMultiple = MultipleConvert(key, TestInType[key]);
+                        List<ExamItem> exercisesMultiple = MultipleConvert(key, TestInType[key]);
                         exercisesMultiple.ForEach(x => { x.pShaCode = x.shaCode; });
                         tests.AddRange(exercisesMultiple); break;
                     case "Judge":
-                        List<ItemInfo> exercisesJudge = JudgeConvert(key, TestInType[key]);
+                        List<ExamItem> exercisesJudge = JudgeConvert(key, TestInType[key]);
                         exercisesJudge.ForEach(x => { x.pShaCode = x.shaCode; });
                         tests.AddRange(exercisesJudge); break;
                     case "Complete":
-                        List<ItemInfo> exercisesComplete = CompleteConvert(key, TestInType[key]);
+                        List<ExamItem> exercisesComplete = CompleteConvert(key, TestInType[key]);
                         exercisesComplete.ForEach(x => { x.pShaCode = x.shaCode; });
                         tests.AddRange(exercisesComplete); break;
                     case "Subjective":
-                        List<ItemInfo> exercisesSubjective = SubjectiveConvert(key, TestInType[key]);
+                        List<ExamItem> exercisesSubjective = SubjectiveConvert(key, TestInType[key]);
                         exercisesSubjective.ForEach(x => { x.pShaCode = x.shaCode; });
                         tests.AddRange(exercisesSubjective); break;
                     case "Compose":
-                        List<ItemInfo> exercisesCompose = ComposeConvert(key, TestInType[key], Lang);
+                        List<ExamItem> exercisesCompose = ComposeConvert(key, TestInType[key], Lang);
                         exercisesCompose.ForEach(x => { x.pShaCode = x.shaCode; });
                         tests.AddRange(exercisesCompose);
                         break;
@@ -81,36 +81,36 @@ namespace TEAMModelOS.Service.Services.Evaluation.Implements
             return tests;
         }
 
-        private List<ItemInfo> SingleConvert(string TypeKey, List<string> list)
+        private List<ExamItem> SingleConvert(string TypeKey, List<string> list)
         {
-            List<ItemInfo> testInfos = OptionProcess(TypeKey, list);
+            List<ExamItem> testInfos = OptionProcess(TypeKey, list);
             return testInfos;
         }
 
-        private List<ItemInfo> MultipleConvert(string TypeKey, List<string> list)
+        private List<ExamItem> MultipleConvert(string TypeKey, List<string> list)
         {
-            List<ItemInfo> testInfos = OptionProcess(TypeKey, list);
+            List<ExamItem> testInfos = OptionProcess(TypeKey, list);
             return testInfos;
         }
 
-        private List<ItemInfo> JudgeConvert(string TypeKey, List<string> list)
+        private List<ExamItem> JudgeConvert(string TypeKey, List<string> list)
         {
-            List<ItemInfo> testInfos = OptionProcess(TypeKey, list);
+            List<ExamItem> testInfos = OptionProcess(TypeKey, list);
             return testInfos;
         }
 
 
-        private List<ItemInfo> CompleteConvert(string TypeKey, List<string> list)
+        private List<ExamItem> CompleteConvert(string TypeKey, List<string> list)
         {
-            List<ItemInfo> testInfos = CompleteProcess(TypeKey, list);
+            List<ExamItem> testInfos = CompleteProcess(TypeKey, list);
             return testInfos;
         }
-        private List<ItemInfo> CompleteProcess(string TypeKey, List<string> tests)
+        private List<ExamItem> CompleteProcess(string TypeKey, List<string> tests)
         {
             //List<string> tests = ConvertTest(testHtml);
-            List<ItemInfo> testInfos = ConvertTestInfo(tests, TypeKey);
+            List<ExamItem> testInfos = ConvertTestInfo(tests, TypeKey);
             HtmlDocument doc = new HtmlDocument();
-            foreach (ItemInfo testInfo in testInfos)
+            foreach (ExamItem testInfo in testInfos)
             {
                 List<string> ans = new List<string>();
                 testInfo.question = testInfo.question.Replace(AnalysisTag, "").Replace(SummaryTag, "").Replace(AnswerTag, "");
@@ -156,11 +156,11 @@ namespace TEAMModelOS.Service.Services.Evaluation.Implements
             return testInfos;
         }
 
-        private List<ItemInfo> OptionProcess(string typeKey, List<string> list)
+        private List<ExamItem> OptionProcess(string typeKey, List<string> list)
         {
             string[] optionsKeys = Options.Select(s => s.ToString()).ToArray();
-            List<ItemInfo> testInfos = ConvertTestInfo(list, typeKey);
-            foreach (ItemInfo testInfo in testInfos)
+            List<ExamItem> testInfos = ConvertTestInfo(list, typeKey);
+            foreach (ExamItem testInfo in testInfos)
             {
                 string optsRgex = optionsKeys[0] + "(\\.|\\.|\\、|\\:|\\:)([\\s\\S]*?)" + AnswerTag;
                 string optsHtml = Regex.Match(testInfo.question, optsRgex).Value;
@@ -222,12 +222,12 @@ namespace TEAMModelOS.Service.Services.Evaluation.Implements
         }
 
 
-        private List<ItemInfo> SubjectiveConvert(string TypeKey, List<string> tests)
+        private List<ExamItem> SubjectiveConvert(string TypeKey, List<string> tests)
         {
             // List<string> tests = ConvertTest(testHtml);
-            List<ItemInfo> testInfos = ConvertTestInfo(tests, TypeKey);
+            List<ExamItem> testInfos = ConvertTestInfo(tests, TypeKey);
 
-            foreach (ItemInfo testInfo in testInfos)
+            foreach (ExamItem testInfo in testInfos)
             {
                 testInfo.question = testInfo.question.Replace(AnalysisTag, "").Replace(SummaryTag, "").Replace(AnswerTag, "");
                 testInfo.question = HtmlHelper.DoUselessTag(testInfo.question);
@@ -244,19 +244,19 @@ namespace TEAMModelOS.Service.Services.Evaluation.Implements
             return testInfos;
         }
 
-        private List<ItemInfo> ComposeConvert(string TypeKey, List<string> list, string Lang)
+        private List<ExamItem> ComposeConvert(string TypeKey, List<string> list, string Lang)
         {
-            List<ItemInfo> exerciseDtos = new List<ItemInfo>();
+            List<ExamItem> exerciseDtos = new List<ExamItem>();
             foreach (string html in list)
             {
-                ItemInfo exercise = new ItemInfo() { type = TypeKey };
+                ExamItem exercise = new ExamItem() { type = TypeKey };
                 string RegexStr = ComposeStart + "([\\s\\S]*?)" + ComposeEnd;
                 Match mt = Regex.Match(html, RegexStr);
                 exercise.question = HtmlHelper.DoUselessTag(mt.Value.Replace(ComposeStart, "").Replace(ComposeEnd, ""));
                 string testinfo = Regex.Replace(html, RegexStr, "").Replace(ComposeTag, CompleteStart);
                 //获取综合题的材料加每个小题的sha1Code
                 string testQs = HtmlHelper.DoTextImg(exercise.question);
-                List<ItemInfo> dtos = AnalyzeWordAsync(testinfo, Lang);
+                List<ExamItem> dtos = AnalyzeWordAsync(testinfo, Lang);
                 if (dtos.IsNotEmpty())
                 {
                     dtos.ForEach(x => { testQs = testQs + x.shaCode; });
@@ -268,15 +268,15 @@ namespace TEAMModelOS.Service.Services.Evaluation.Implements
             }
             return exerciseDtos;
         }
-        public static List<ItemInfo> ConvertTestInfo(List<string> tests, string TypeKey)
+        public static List<ExamItem> ConvertTestInfo(List<string> tests, string TypeKey)
         {
-            List<ItemInfo> testInfos = new List<ItemInfo>();
+            List<ExamItem> testInfos = new List<ExamItem>();
             foreach (string html in tests)
             {
                 Dictionary<string, string> regex = new Dictionary<string, string>();
                 Dictionary<string, string> question = new Dictionary<string, string> { { "Summary", TestType[TypeKey].Split("|")[0] + "|" + AnswerTag }, { "Answer", AnswerTag + "|" + AnalysisTag }, { "Analysis", AnalysisTag + "|" + EndedTag } };
                 Dictionary<string, string> compquestion = new Dictionary<string, string> { { "Summary", TestType[TypeKey].Split("|")[0] + "|" + AnalysisTag }, { "Analysis", AnalysisTag + "|" + EndedTag } };
-                ItemInfo test = new ItemInfo();
+                ExamItem test = new ExamItem();
                 test.type = TypeKey;
                 List<string> keys = new List<string>();
                 if (TypeKey.Equals("Complete"))

+ 2 - 2
TEAMModelOS.Service/Services/Evaluation/Implements/ImportExerciseService.cs

@@ -22,9 +22,9 @@ using TEAMModelOS.SDK.Module.AzureBlob.Container;
 using TEAMModelOS.SDK.Module.AzureBlob.Interfaces;
 using TEAMModelOS.SDK.Module.AzureTable.Interfaces;
 using TEAMModelOS.Service.Models.Core;
-using TEAMModelOS.Service.Services.Evaluation.Interfaces;
+using TEAMModelOS.Service.Services.Exam.Interfaces;
 
-namespace TEAMModelOS.Service.Services.Evaluation.Implements
+namespace TEAMModelOS.Service.Services.Exam.Implements
 {
     public class ImportExerciseService : IImportExerciseService
     {

+ 1 - 1
TEAMModelOS.Service/Services/Evaluation/Interfaces/IEvaluatingService.cs

@@ -1,6 +1,6 @@
 using TEAMModelOS.SDK.Context.Configuration;
 
-namespace TEAMModelOS.Service.Evaluation.Interfaces
+namespace TEAMModelOS.Service.Exam.Interfaces
 {
     public interface IEvaluatingService : IBusinessService
     {

+ 3 - 3
TEAMModelOS.Service/Services/Evaluation/Interfaces/IHtmlAnalyzeService.cs

@@ -3,13 +3,13 @@ using System.Collections.Generic;
 using System.Text;
 using TEAMModelOS.SDK.Context.Configuration;
 using TEAMModelOS.Service.Model.PowerPoint;
-using TEAMModelOS.Service.Models.Evaluation.Models;
+using TEAMModelOS.Service.Models.Exam.Models;
 
-namespace TEAMModelOS.Service.Services.Evaluation.Interfaces
+namespace TEAMModelOS.Service.Services.Exam.Interfaces
 {
     public interface IHtmlAnalyzeService: IBusinessService
     {
-        List<ItemInfo> AnalyzeWordAsync(string htmlString, string Lang);
+        List<ExamItem> AnalyzeWordAsync(string htmlString, string Lang);
   
     }
 }

+ 1 - 1
TEAMModelOS.Service/Services/Evaluation/Interfaces/IImportExerciseService.cs

@@ -6,7 +6,7 @@ using System.Threading.Tasks;
 
 using TEAMModelOS.SDK.Context.Configuration;
 
-namespace TEAMModelOS.Service.Services.Evaluation.Interfaces
+namespace TEAMModelOS.Service.Services.Exam.Interfaces
 {
     public interface IImportExerciseService: IBusinessService
     {

+ 4 - 4
TEAMModelOS.Service/Services/PowerPoint/Implement/HtexService.cs

@@ -20,8 +20,8 @@ using Fill = TEAMModelOS.Service.Model.PowerPoint.Fill;
 using Media = TEAMModelOS.Service.Model.PowerPoint.Media;
 using Position = TEAMModelOS.Service.Model.PowerPoint.Position;
 using TEAMModelOS.Service.Services.PowerPoint.Interface;
-using TEAMModelOS.Service.Models.Evaluation.Models;
-using TEAMModelOS.Service.Services.Evaluation.Interfaces;
+using TEAMModelOS.Service.Models.Exam.Models;
+using TEAMModelOS.Service.Services.Exam.Interfaces;
 using TEAMModelOS.SDK.Helper.Common.JsonHelper;
 
 namespace TEAMModelOS.Service.Services.PowerPoint.Implement
@@ -44,10 +44,10 @@ namespace TEAMModelOS.Service.Services.PowerPoint.Implement
         public async Task<Htex> AnalyzeHtmlToHtex(string htmlString, string Lang)
         {
             Htex htex = new Htex();
-            List<ItemInfo> items = htmlAnalyzeService.AnalyzeWordAsync(htmlString, Lang);
+            List<ExamItem> items = htmlAnalyzeService.AnalyzeWordAsync(htmlString, Lang);
             string sha=  ShaHashHelper.GetSHA1(htmlString);
             int index = 0;
-            foreach (ItemInfo item in items)
+            foreach (ExamItem item in items)
             {
                 Slide slide = new Slide { exercise = item, index = index, source = 2, flag = 2 };
                 index++;

+ 0 - 10
TEAMModelOS.Service/TEAMModelOS.Service.csproj

@@ -4,18 +4,8 @@
     <TargetFramework>netcoreapp3.0</TargetFramework>
   </PropertyGroup>
 
-  <ItemGroup>
-    <Compile Remove="Models\Evaluation\Dtos\Third\**" />
-    <EmbeddedResource Remove="Models\Evaluation\Dtos\Third\**" />
-    <None Remove="Models\Evaluation\Dtos\Third\**" />
-  </ItemGroup>
-
   <ItemGroup>
     <ProjectReference Include="..\TEAMModelOS.SDK\TEAMModelOS.SDK.csproj" />
   </ItemGroup>
 
-  <ItemGroup>
-    <Folder Include="Models\Evaluation\Dtos\" />
-  </ItemGroup>
-
 </Project>

+ 2 - 2
TEAMModelOS/Controllers/Analysis/AchievementController.cs

@@ -4,7 +4,7 @@ using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Threading.Tasks;
-using TEAMModelOS.Service.Model.Evaluation.Models;
+using TEAMModelOS.Service.Model.Exam.Models;
 using TEAMModelOS.SDK.Extension.DataResult.JsonRpcRequest;
 using TEAMModelOS.SDK.Extension.DataResult.JsonRpcResponse;
 using TEAMModelOS.SDK.Helper.Common.CollectionHelper;
@@ -14,7 +14,7 @@ using TEAMModelOS.SDK.Module.AzureTable.Interfaces;
 using TEAMModelOS.Service.Analysis.Interfaces;
 
 using TEAMModelOS.Service.Models.Core;
-using TEAMModelOS.Service.Models.Evaluation.Models;
+using TEAMModelOS.Service.Models.Exam.Models;
 using TEAMModelOS.SDK.Module.AzureCosmosDBV3;
 
 namespace TEAMModelOS.Controllers.Analysis

+ 1 - 1
TEAMModelOS/Controllers/Analysis/ChangeController.cs

@@ -5,7 +5,7 @@ using System;
 using System.Collections.Generic;
 using System.Linq;
 using TEAMModelOS.Helper.Common.FileHelper;
-using TEAMModelOS.Service.Model.Evaluation.Models;
+using TEAMModelOS.Service.Model.Exam.Models;
 using TEAMModelOS.SDK.Extension.DataResult.JsonRpcResponse;
 using TEAMModelOS.SDK.Helper.Common.JsonHelper.JsonPath;
 using TEAMModelOS.SDK.Module.AzureCosmosDB.Interfaces;

+ 14 - 14
TEAMModelOS/Controllers/Evaluation/ExamController.cs

@@ -7,9 +7,9 @@ using TEAMModelOS.SDK.Extension.DataResult.JsonRpcRequest;
 using TEAMModelOS.SDK.Extension.DataResult.JsonRpcResponse;
 using TEAMModelOS.SDK.Helper.Common.CollectionHelper;
 using TEAMModelOS.SDK.Module.AzureCosmosDBV3;
-using TEAMModelOS.Service.Models.Evaluation.Models;
+using TEAMModelOS.Service.Models.Exam.Models;
 
-namespace TEAMModelOS.Controllers.Evaluation
+namespace TEAMModelOS.Controllers.Exam
 {
     [Route("api/[controller]")]
     [ApiController]
@@ -67,7 +67,7 @@ namespace TEAMModelOS.Controllers.Evaluation
         /// <param name="request"></param>
         /// <returns></returns>
         [HttpPost("Gen")]
-        public async Task<BaseJosnRPCResponse> Gen(JosnRPCRequest<List<ItemInfo>> request)
+        public async Task<BaseJosnRPCResponse> Gen(JosnRPCRequest<List<ExamItem>> request)
         {
             JsonRPCResponseBuilder builder = JsonRPCResponseBuilder.custom();
             List<string> poins = new List<string>();
@@ -79,7 +79,7 @@ namespace TEAMModelOS.Controllers.Evaluation
             // Single单选,Multiple多选,Judge判断,Complete填空,Subjective问答,Compose综合
             List<string> types = new List<string>() { "Single", "Multiple", "Judge", "Complete", "Subjective", "Compose" };
             List<string> field = new List<string>() { "应用", "综合", "理解", "评鉴", "知识" };
-            foreach (ItemInfo item in request.@params) {
+            foreach (ExamItem item in request.@params) {
                 item.subject = "Subject_Chinese";
                 item.period = "period_2";
                 item.type = types.OrderBy(x => Guid.NewGuid()).First() ;
@@ -131,8 +131,8 @@ namespace TEAMModelOS.Controllers.Evaluation
                 }
             }
             
-            List<ItemInfo> retnInfos = new List<ItemInfo>();
-            List<ItemInfo> itemInfos = new List<ItemInfo>();
+            List<ExamItem> retnInfos = new List<ExamItem>();
+            List<ExamItem> itemInfos = new List<ExamItem>();
             List<TempItem> tempItems = new List<TempItem>();
             if (request.@params.quInfos.IsNotEmpty())
             {
@@ -163,7 +163,7 @@ namespace TEAMModelOS.Controllers.Evaluation
                             ///
                             dict.Add("type", quInfo.type);
                             dict.Add("level", custom.level);
-                            List<ItemInfo> items = await cosmosDBV3Repository.FindByDict<ItemInfo>(dict);
+                            List<ExamItem> items = await cosmosDBV3Repository.FindByDict<ExamItem>(dict);
                             //id去重
                             items = items.Where((x, i) => items.FindIndex(z => z.id == x.id) == i).ToList();
                             ////均分知识点题目
@@ -186,7 +186,7 @@ namespace TEAMModelOS.Controllers.Evaluation
                         }
                         dict.Add("lite", false);
                         dict.Add("type", quInfo.type);
-                        List<ItemInfo> items = await cosmosDBV3Repository.FindByDict<ItemInfo>(dict);
+                        List<ExamItem> items = await cosmosDBV3Repository.FindByDict<ExamItem>(dict);
                         //id去重
                         items = items.Where((x, i) => items.FindIndex(z => z.id == x.id) == i).ToList();
                         itemInfos.AddRange(items);
@@ -230,22 +230,22 @@ namespace TEAMModelOS.Controllers.Evaluation
             itemInfos = itemInfos.OrderBy(x=>Guid.NewGuid()).ToList();
             tempItems = tempItems.OrderBy(x => Guid.NewGuid()).ToList();
             foreach (TempItem temp in tempItems) {
-                ItemInfo itemInfo= itemInfos.Where(x => x.level == temp.level && x.type==temp.type).OrderBy(x => Guid.NewGuid()).FirstOrDefault();
+                ExamItem itemInfo= itemInfos.Where(x => x.level == temp.level && x.type==temp.type).OrderBy(x => Guid.NewGuid()).FirstOrDefault();
                 if (itemInfo != null) {
                     retnInfos.Add(itemInfo);
                     itemInfos.Remove(itemInfo);
                 }
             }
-            List<List<ItemInfo>>   listInfo = new  List<List<ItemInfo>> ();
-            foreach (IGrouping<string, ItemInfo> group in retnInfos.GroupBy(c => c.type))
+            List<List<ExamItem>>   listInfo = new  List<List<ExamItem>> ();
+            foreach (IGrouping<string, ExamItem> group in retnInfos.GroupBy(c => c.type))
             {
                 Dictionary<string, object>  dictInfo = new   Dictionary<string, object>();
                 listInfo.Add(group.ToList());
             }
             List<Dictionary<string, object>> list = new List<Dictionary<string, object>>();
-            foreach (List<ItemInfo> infos in listInfo) {
+            foreach (List<ExamItem> infos in listInfo) {
                 List<Dictionary<string, object>> dict = new List<Dictionary<string, object>>();
-                foreach (IGrouping<int, ItemInfo> group in infos.GroupBy(c => c.level))
+                foreach (IGrouping<int, ExamItem> group in infos.GroupBy(c => c.level))
                 {
                     Dictionary<string, object> dictInfo = new Dictionary<string, object>();
                     dictInfo.Add("level", group.Key);
@@ -266,7 +266,7 @@ namespace TEAMModelOS.Controllers.Evaluation
     public class TempItem { 
         public string type { get; set; }
         public int level { get; set; }
-        public ItemInfo itemInfo { get; set; }
+        public ExamItem itemInfo { get; set; }
     }
 
 

+ 5 - 5
TEAMModelOS/Controllers/Evaluation/ImportExerciseController.cs

@@ -8,12 +8,12 @@ using TEAMModelOS.SDK.Context.Constant.Common;
 using TEAMModelOS.SDK.Extension.DataResult.JsonRpcRequest;
 using TEAMModelOS.SDK.Extension.DataResult.JsonRpcResponse;
 using TEAMModelOS.Service.Model.PowerPoint;
-using TEAMModelOS.Service.Models.Evaluation.Models;
-using TEAMModelOS.Service.Services.Evaluation.Implements;
-using TEAMModelOS.Service.Services.Evaluation.Interfaces;
+using TEAMModelOS.Service.Models.Exam.Models;
+using TEAMModelOS.Service.Services.Exam.Implements;
+using TEAMModelOS.Service.Services.Exam.Interfaces;
 using TEAMModelOS.Service.Services.PowerPoint.Interface;
 
-namespace TEAMModelOS.Controllers.Evaluation
+namespace TEAMModelOS.Controllers.Exam
 {
     [Route("api/[controller]")]
     [ApiController]
@@ -75,7 +75,7 @@ namespace TEAMModelOS.Controllers.Evaluation
             bool flag = request.@params.TryGetValue("htmlString", out object htmlString);
             if (flag && htmlString != null && !string.IsNullOrEmpty(htmlString.ToString()))
             {
-                List<ItemInfo> exercises = htmlAnalyzeService.AnalyzeWordAsync(htmlString.ToString(), request.lang);
+                List<ExamItem> exercises = htmlAnalyzeService.AnalyzeWordAsync(htmlString.ToString(), request.lang);
                 return builder.Data(exercises).build();
             }
             else

+ 6 - 6
TEAMModelOS/Controllers/Evaluation/ItemInfoController.cs

@@ -6,9 +6,9 @@ using System.Threading.Tasks;
 using TEAMModelOS.SDK.Extension.DataResult.JsonRpcRequest;
 using TEAMModelOS.SDK.Extension.DataResult.JsonRpcResponse;
 using TEAMModelOS.SDK.Module.AzureCosmosDBV3;
-using TEAMModelOS.Service.Models.Evaluation.Models;
+using TEAMModelOS.Service.Models.Exam.Models;
 
-namespace TEAMModelOS.Controllers.Evaluation
+namespace TEAMModelOS.Controllers.Exam
 {
     [Route("api/[controller]")]
     [ApiController]
@@ -26,7 +26,7 @@ namespace TEAMModelOS.Controllers.Evaluation
         /// <param name="request"></param>
         /// <returns></returns>
         [HttpPost("SaveAll")]
-        public async Task<BaseJosnRPCResponse> SaveAll(JosnRPCRequest<List<ItemInfo>> request)
+        public async Task<BaseJosnRPCResponse> SaveAll(JosnRPCRequest<List<ExamItem>> request)
         {
             JsonRPCResponseBuilder builder = JsonRPCResponseBuilder.custom();
             //// habook#0001
@@ -43,7 +43,7 @@ namespace TEAMModelOS.Controllers.Evaluation
             //    }
             //}
             request.@params.ForEach(x => {
-                x.scopeCode = x.scopeCode.replace("#", "");
+                x.scopeCode = x.scopeCode.Replace("#", "");
                 if (string.IsNullOrEmpty(x.id)) {
                     x.id = Guid.NewGuid().ToString();
                 };
@@ -51,7 +51,7 @@ namespace TEAMModelOS.Controllers.Evaluation
             return builder.Data(await cosmosDBV3Repository.SaveOrUpdateAll(request.@params)).build();
         }
         [HttpPost("Save")]
-        public async Task<BaseJosnRPCResponse> Save(JosnRPCRequest<ItemInfo> request)
+        public async Task<BaseJosnRPCResponse> Save(JosnRPCRequest<ExamItem> request)
         {
             JsonRPCResponseBuilder builder = JsonRPCResponseBuilder.custom();
             //// habook#0001
@@ -84,7 +84,7 @@ namespace TEAMModelOS.Controllers.Evaluation
         public async Task<BaseJosnRPCResponse> Find(JosnRPCRequest<Dictionary<string, object>> request)
         {
             JsonRPCResponseBuilder builder = JsonRPCResponseBuilder.custom();
-            List<ItemInfo> items = await cosmosDBV3Repository.FindByDict<ItemInfo>(request.@params);
+            List<ExamItem> items = await cosmosDBV3Repository.FindByDict<ExamItem>(request.@params);
             return builder.Data(items).build();
         }
     }