浏览代码

志愿报录比,定向过滤后重统计知识点正确率

mingfu 1 月之前
父节点
当前提交
fe79d0106b

+ 3 - 0
ie-admin/src/main/java/com/ruoyi/web/controller/front/FrontPaperController.java

@@ -101,14 +101,17 @@ public class FrontPaperController {
             }
             parent.setQuestionCount(0);
             parent.setFinishedCount(0);
+            parent.setRightCount(0);
             List<LearnTeacherService.TreeNode> childList = Lists.newArrayList();
             for(LearnTeacherService.TreeNode child : parent.getChildren()) {
                 if(child.getStatus().equals(1)) { // TODO 暂不过滤无题的  && child.getQuestionCount() > 0
                     childList.add(child);
                     parent.setQuestionCount(parent.getQuestionCount() + child.getQuestionCount());
                     parent.setFinishedCount(parent.getFinishedCount() + child.getFinishedCount());
+                    parent.setRightCount(parent.getRightCount() + child.getRightCount());
                 }
             }
+            parent.calcRatio();
             if(childList.size() > 0) {
                 parent.setChildren(childList);
                 finalList.add(parent);

+ 8 - 2
ie-admin/src/main/java/com/ruoyi/web/service/VoluntaryService.java

@@ -354,8 +354,14 @@ public class VoluntaryService {
                 h.setDiff(null);
             }
             h.setRuleContent(s.getEnrollFormula());
-            h.setApplication("");
-            h.setAdmission("");
+            String[] rates;
+            if(StringUtils.isNotBlank(p.getAcceptanceRate()) && 2 == (rates = p.getAcceptanceRate().split(":")).length) {
+                h.setApplication(rates[0]);
+                h.setAdmission(rates[1]);
+            } else {
+                h.setApplication("");
+                h.setAdmission("");
+            }
             histories.add(h);
         }
 

+ 1 - 1
ie-system/src/main/resources/mapper/ie/AMarjorPlanMapper.xml

@@ -55,7 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
     <select id="selectListByRuleCond" parameterType="Map" resultMap="AMarjorPlanResult">
-      SELECT m1.code majorCode, p.id, p.year, p.universityId, p.universityName, p.level, majorGroup, majorName, majorDirection, enrollCode, majorEnrollCode, examineeType, planTotal, xuefei, lengthOfSchooling, score, culturalScore, profScore, schoolScore, chinessScore, mathScore, englishScore, custCond, comment, company
+      SELECT m1.code majorCode, p.id, p.year, p.universityId, p.universityName, p.level, majorGroup, majorName, majorDirection, enrollCode, majorEnrollCode, examineeType, planTotal, xuefei, lengthOfSchooling, score, culturalScore, profScore, schoolScore, chinessScore, mathScore, englishScore, custCond, comment, company, p.acceptanceRate
         FROM `a_marjor_plan` p
         JOIN `b_busi_wish_universities` u ON p.`universityId` = u.`id`
         LEFT JOIN `sy_major` m1 ON m1.`name` = p.`majorName` and m1.`exam_type` = p.examineeType