dzx преди 1 месец
родител
ревизия
6b74153b1b

+ 21 - 18
src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentAssessmentInspectionServiceImpl.java

@@ -331,22 +331,24 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
                     for(CalssQuantitativeAssessmentPageVo c: resultList){
                         Long classId = Long.parseLong(c.getClassId());
                         if(individualBehaviorMap.get(classId) != null){
-                            c.setStuPersonalBehaviorSubScore(individualBehaviorMap.get(classId).getSumScore());
-                            c.setStuPersonalBehaviorScore((100 + individualBehaviorMap.get(classId).getSumScore())/100*25);
+                            c.setStuPersonalBehaviorSubScore(individualBehaviorMap.get(classId).getSumScore()==null?"":individualBehaviorMap.get(classId).getSumScore().toString());
+                            double v = (100 + individualBehaviorMap.get(classId).getSumScore()) / 100 * 25;
+                            c.setStuPersonalBehaviorScore(v + "");
                         }
 
                         if(conventionalManagementMap.get(classId) != null){
                             QuantitativeAssessmentSingleScoreVo scoreVo = conventionalManagementMap.get(classId);
-                            c.setClassConventionalManageSubScore(conventionalManagementMap.get(classId).getSumScore());
-                            c.setClassConventionalManageScore((100 + conventionalManagementMap.get(classId).getSumScore())/100*25);
+                            c.setClassConventionalManageSubScore(scoreVo.getSumScore() == null?"":scoreVo.getSumScore().toString());
+                            double v = (100 + scoreVo.getSumScore()) / 100 * 25;
+                            c.setClassConventionalManageScore(v + "");
                         }
 
                         if(awardsAndHonorableMap.get(classId) != null){
-                            c.setHonorSumScore(awardsAndHonorableMap.get(classId).getSumScore());
+                            c.setHonorSumScore(awardsAndHonorableMap.get(classId).getSumScore()==null?"":awardsAndHonorableMap.get(classId).getSumScore().toString());
                             if(awardsAndHonorableMap.get(classId).getSumScore() < 10){
-                                c.setHonorScore(awardsAndHonorableMap.get(classId).getSumScore());
+                                c.setHonorScore(awardsAndHonorableMap.get(classId).getSumScore()==null?"":awardsAndHonorableMap.get(classId).getSumScore().toString());
                             }else {
-                                c.setHonorScore(10D);
+                                c.setHonorScore("10");
                             }
                         }
 
@@ -373,14 +375,14 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
 
                             double sum = evaluateSocreList.stream().mapToDouble(Double::doubleValue).sum();
                             double jskhValue = BigDecimal.valueOf(sum).divide(BigDecimal.valueOf(size),2, RoundingMode.HALF_UP).doubleValue();
-                            c.setTeacherAssessComprehensiveIndex(jskhValue);
+                            c.setTeacherAssessComprehensiveIndex(jskhValue + "");
                             String replacedExpression = jskhFormula.replace("JSKH", Double.toString(jskhValue));
 
                             ScriptEngineManager manager = new ScriptEngineManager();
                             ScriptEngine engine = manager.getEngineByName("JavaScript");
                             try {
                                 double result = ((Number) engine.eval(replacedExpression)).doubleValue();
-                                c.setTeacherAssessScore(result);
+                                c.setTeacherAssessScore(result + "");
                             } catch (ScriptException e) {
                                 Log.error(e.getMessage(), e);
                             }
@@ -498,8 +500,9 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
             for(CalssQuantitativeAssessmentPageVo c: resultPage.getRecords()){
                 Long classId = Long.parseLong(c.getClassId());
                 if(individualBehaviorMap.get(classId) != null){
-                    c.setStuPersonalBehaviorSubScore(individualBehaviorMap.get(classId).getSumScore());
-                    c.setStuPersonalBehaviorScore((100 + individualBehaviorMap.get(classId).getSumScore())/100*25);
+                    c.setStuPersonalBehaviorSubScore(individualBehaviorMap.get(classId).getSumScore()==null?"":individualBehaviorMap.get(classId).getSumScore().toString());
+                    double v = (100 + individualBehaviorMap.get(classId).getSumScore()) / 100 * 25;
+                    c.setStuPersonalBehaviorScore(v + "");
                     /* ScriptEngine engine = new ScriptEngineManager().getEngineByName("js");
                     String geRenXingWeiGongShi = "sumSubScore/itemCount";
                     int totalScore = scoreBySubmitRecordId.get(mobileResultPageVo.getEvaluateSubmitRecordId()).getTotalScore();
@@ -519,20 +522,20 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
                 }
 
                 if(conventionalManagementMap.get(classId) != null){
-                    c.setClassConventionalManageSubScore(conventionalManagementMap.get(classId).getSumScore());
+                    c.setClassConventionalManageSubScore(conventionalManagementMap.get(classId).getSumScore()==null?"":conventionalManagementMap.get(classId).getSumScore().toString());
                     Double SumScore = 0D;
                     if(conventionalManagementMap.get(classId).getSumScore() != null){
                         SumScore = conventionalManagementMap.get(classId).getSumScore();
                     }
-                    c.setClassConventionalManageScore((100 + SumScore)/100*25);
+                    c.setClassConventionalManageScore(((100 + SumScore)/100*25) + "");
                 }
 
                 if(awardsAndHonorableMap.get(classId) != null){
-                    c.setHonorSumScore(awardsAndHonorableMap.get(classId).getSumScore());
+                    c.setHonorSumScore(awardsAndHonorableMap.get(classId).getSumScore() ==null?"":awardsAndHonorableMap.get(classId).getSumScore().toString());
                     if(awardsAndHonorableMap.get(classId).getSumScore() < 10){
-                        c.setHonorScore(awardsAndHonorableMap.get(classId).getSumScore());
+                        c.setHonorScore(awardsAndHonorableMap.get(classId).getSumScore() ==null?"":awardsAndHonorableMap.get(classId).getSumScore().toString());
                     }else {
-                        c.setHonorScore(10D);
+                        c.setHonorScore("10");
                     }
                 }
 
@@ -548,14 +551,14 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
                     }
                     double sum = evaluateSocreList.stream().mapToDouble(Double::doubleValue).sum();
                     double jskhValue = BigDecimal.valueOf(sum).divide(BigDecimal.valueOf(size),2, RoundingMode.HALF_UP).doubleValue();
-                    c.setTeacherAssessComprehensiveIndex(jskhValue);
+                    c.setTeacherAssessComprehensiveIndex(jskhValue + "");
                     String replacedExpression = jskhFormula.replace("JSKH", Double.toString(jskhValue));
 
                     ScriptEngineManager manager = new ScriptEngineManager();
                     ScriptEngine engine = manager.getEngineByName("JavaScript");
                     try {
                         double result = ((Number) engine.eval(replacedExpression)).doubleValue();
-                        c.setTeacherAssessScore(result);
+                        c.setTeacherAssessScore(result + "");
                     } catch (ScriptException e) {
                         Log.error(e.getMessage(), e);
                     }

+ 12 - 12
src/main/java/com/xjrsoft/module/student/vo/CalssQuantitativeAssessmentPageVo.java

@@ -54,60 +54,60 @@ public class CalssQuantitativeAssessmentPageVo {
     @ApiModelProperty("学生个人行为扣分")
     @ExcelProperty(value = "学生个人行为扣分")
     @ColumnWidth(10)
-    private Double stuPersonalBehaviorSubScore;
+    private String stuPersonalBehaviorSubScore;
 
     @ApiModelProperty("学生个人行为得分")
     @ExcelProperty(value = "学生个人行为得分")
     @ColumnWidth(10)
-    private Double stuPersonalBehaviorScore;
+    private String stuPersonalBehaviorScore;
 
     @ApiModelProperty("常规管理扣分")
     @ExcelProperty(value = "常规管理扣分")
     @ColumnWidth(10)
-    private Double classConventionalManageSubScore;
+    private String classConventionalManageSubScore;
 
     @ApiModelProperty("常规管理得分")
     @ExcelProperty(value = "常规管理得分")
     @ColumnWidth(10)
-    private Double classConventionalManageScore;
+    private String classConventionalManageScore;
 
     @ApiModelProperty("获奖及荣誉表彰汇总")
     @ExcelProperty(value = "获奖及荣誉表彰汇总")
     @ColumnWidth(10)
-    private Double honorSumScore;
+    private String honorSumScore;
 
     @ApiModelProperty("获奖及荣誉表彰得分")
     @ExcelProperty(value = "获奖及荣誉表彰得分")
     @ColumnWidth(10)
-    private Double honorScore;
+    private String honorScore;
 
     @ApiModelProperty("准军事化管理效果综合指数")
     @ExcelProperty(value = "准军事化管理效果综合指数")
     @ColumnWidth(10)
-    private Double militaryManageComprehensiveIndex;
+    private String militaryManageComprehensiveIndex;
 
     @ApiModelProperty("准军事化管理效果得分")
     @ExcelProperty(value = "准军事化管理效果得分")
     @ColumnWidth(10)
-    private Double militaryManageScore;
+    private String militaryManageScore;
 
     @ApiModelProperty("任课教师考核综合指数")
     @ExcelProperty(value = "任课教师考核综合指数")
     @ColumnWidth(10)
-    private Double teacherAssessComprehensiveIndex;
+    private String teacherAssessComprehensiveIndex;
 
     @ApiModelProperty("任课教师考核得分")
     @ExcelProperty(value = "任课教师考核得分")
     @ColumnWidth(10)
-    private Double teacherAssessScore;
+    private String teacherAssessScore;
 
     @ApiModelProperty("考核总得分")
     @ExcelProperty(value = "考核总得分")
     @ColumnWidth(10)
-    private Double assessSumScore;
+    private String assessSumScore;
 
     @ApiModelProperty("考核金额")
     @ExcelProperty(value = "考核金额")
     @ColumnWidth(10)
-    private Double assessMoney;
+    private String assessMoney;
 }