Browse Source

删除paper里面的几个废弃的能力字段

4228306 5 years ago
parent
commit
74ca233b87

+ 43 - 9
src/main/java/edu/math/diagnosis/entity/PaperResult.java

@@ -154,13 +154,31 @@ public class PaperResult {
     @ApiModelProperty("{\"计算能力\":{\"score\":4.5,\"evaluate\":\"您的成绩...\",\"keep\":[1,0,1,2,0,1,0],\"explain\":\"这是示例与解释\"}}")
     private String abilityEvaluate;
 
+    @ApiModelProperty("答错的题目,先判断是否选择,没选择则答错;选择了,答错了算错误,若该题没答案,则不算错误")
+    private String wrongQuestion;
+
     /**
-     * 题目问题
-     *
+     * 该问题在所有题目中的占比,比如10个错题,8个有粗心大意,则粗心大意占比为80
+     * {
+     * "知识记忆不牢":{
+     * "percent":88.88,
+     * "wrong":[1,2,3]
+     * }
+     * }
      */
-    @Lob
-    @ApiModelProperty("题目问题")
-    private String questionMatter;
+    private String commonMatters;
+
+    /**
+     * {
+     * "基础不好":{
+     * "commonMatter":"知识记忆不牢,学习动力问题",
+     * "percent":88.10,
+     * "isStudy":true,
+     * "isEmotion":true
+     * }
+     * }
+     */
+    private String mistakeMatters;
 
     public PaperResult() {
     }
@@ -317,11 +335,27 @@ public class PaperResult {
         this.abilityEvaluate = abilityEvaluate;
     }
 
-    public String getQuestionMatter() {
-        return questionMatter;
+    public String getWrongQuestion() {
+        return wrongQuestion;
+    }
+
+    public void setWrongQuestion(String wrongQuestion) {
+        this.wrongQuestion = wrongQuestion;
+    }
+
+    public String getCommonMatters() {
+        return commonMatters;
+    }
+
+    public void setCommonMatters(String commonMatters) {
+        this.commonMatters = commonMatters;
+    }
+
+    public String getMistakeMatters() {
+        return mistakeMatters;
     }
 
-    public void setQuestionMatter(String questionMatter) {
-        this.questionMatter = questionMatter;
+    public void setMistakeMatters(String mistakeMatters) {
+        this.mistakeMatters = mistakeMatters;
     }
 }

+ 0 - 77
src/main/java/edu/math/diagnosis/entity/Question.java

@@ -50,30 +50,6 @@ public class Question {
     @ApiModelProperty("题目时间")
     private int duration;
 
-    @Column(nullable = false, columnDefinition = " double(10,2) default 0")
-    @ApiModelProperty("计算能力分数")
-    private Double calculation;
-
-    @Column(nullable = false, columnDefinition = " double(10,2) default 0")
-    @ApiModelProperty("归纳类比分数")
-    private Double induction;
-
-    @Column(nullable = false, columnDefinition = " double(10,2) default 0")
-    @ApiModelProperty("逻辑推理")
-    private Double logic;
-
-    @Column(nullable = false, columnDefinition = " double(10,2) default 0")
-    @ApiModelProperty("空间想象")
-    private Double space;
-
-    @Column(nullable = false, columnDefinition = " double(10,2) default 0")
-    @ApiModelProperty("语言能力")
-    private Double language;
-
-    @Column(nullable = false, columnDefinition = " double(10,2) default 0")
-    @ApiModelProperty("转化能力")
-    private Double conversion;
-
     @Column(nullable = false, columnDefinition = "double(10,2) default 0")
     @ApiModelProperty("单题得分")
     private Double score;//单题得分
@@ -182,53 +158,7 @@ public class Question {
         this.duration = duration;
     }
 
-    public Double getCalculation() {
-        return calculation;
-    }
-
-    public void setCalculation(Double calculation) {
-        this.calculation = calculation;
-    }
-
-    public Double getInduction() {
-        return induction;
-    }
-
-    public void setInduction(Double induction) {
-        this.induction = induction;
-    }
-
-    public Double getLogic() {
-        return logic;
-    }
 
-    public void setLogic(Double logic) {
-        this.logic = logic;
-    }
-
-    public Double getSpace() {
-        return space;
-    }
-
-    public void setSpace(Double space) {
-        this.space = space;
-    }
-
-    public Double getLanguage() {
-        return language;
-    }
-
-    public void setLanguage(Double language) {
-        this.language = language;
-    }
-
-    public Double getConversion() {
-        return conversion;
-    }
-
-    public void setConversion(Double conversion) {
-        this.conversion = conversion;
-    }
 
     public Double getScore() {
         return score;
@@ -327,11 +257,4 @@ public class Question {
         this.jsonScore = jsonScore;
     }
 
-//    public String getMatter() {
-//        return matter;
-//    }
-//
-//    public void setMatter(String matter) {
-//        this.matter = matter;
-//    }
 }

+ 14 - 16
src/main/java/edu/math/diagnosis/service/PaperResultService.java

@@ -148,7 +148,7 @@ public class PaperResultService {
         //第二部分 学科能力
         r.setChapterAbility(chapterAbility(r, paper));
         r.setAbilityEvaluate(abilityEvaluate(r, paper));
-        r.setQuestionMatter(questionMatter(r, paper));
+        questionMatter(r, paper);
 
 //        paperResultRepo.save(r);
     }
@@ -558,33 +558,31 @@ public class PaperResultService {
 
     /**
      * 该问题在所有题目中的占比,比如10个错题,8个有粗心大意,则粗心大意占比为80
-     *
-     * 该问题在所有题目中的占比,比如10个错题,8个有基础不好,则基础不好占比为80
      * {
-     *     "知识记忆不牢":{
-     *         "percent":88.88,
-     *         "wrong":[1,2,3]
-     *     }
+     * "知识记忆不牢":{
+     * "percent":88.88,
+     * "wrong":[1,2,3]
+     * }
      * }
      *
+     * 该问题在所有题目中的占比,比如10个错题,8个有基础不好,则基础不好占比为80
      * {
-     *     "基础不好":{
-     *         "commonMatter":"知识记忆不牢,学习动力问题",
-     *         "percent":88.10,
-     *         "isStudy":true,
-     *         "isEmotion":true
-     *     }
+     * "基础不好":{
+     * "commonMatter":"知识记忆不牢,学习动力问题",
+     * "percent":88.10,
+     * "isStudy":true,
+     * "isEmotion":true
+     * }
      * }
      */
-    public String questionMatter(PaperResult result, Paper paper) {
+    public void questionMatter(PaperResult result, Paper paper) {
         List<Integer> collects = convertCollectQuestion(result.getCollectQuestion());
         List<Integer> wrongs = convertWrongQuestion(paper, collects);
 
-        return "{}";
     }
 
     private List<Integer> convertWrongQuestion(Paper paper, List<Integer> collects) {
-        return paper.getQuestions().stream().map(Question::getNumber).filter(q->!collects.contains(q)).collect(Collectors.toList());
+        return paper.getQuestions().stream().map(Question::getNumber).filter(q -> !collects.contains(q)).collect(Collectors.toList());
     }
 
     private List<Answer> convertAnswer(String json) {

+ 0 - 1
src/main/java/edu/math/diagnosis/service/PaperService.java

@@ -332,7 +332,6 @@ public class PaperService {
             currentNumber = currentNumber + list.size();
             qs.put(s, list);
         }
-        ;
         List<Question> list = new ArrayList<>();
         qs.values().forEach(list::addAll);
         paper.setQuestions(list);