xiaofei преди 2 години
родител
ревизия
247c1b1875

+ 11 - 2
src/main/java/com/qmth/eds/service/impl/WhuDataSyncServiceImpl.java

@@ -357,8 +357,13 @@ public class WhuDataSyncServiceImpl implements WhuDataSyncService {
             // a为卷面成绩,y为赋分系数
             String formula1 = "a+(100-a)/b";
             for (ExamSyncStudentDto studentDto : examSyncStudentDtoList) {
+                double totalScoreDouble = Double.parseDouble(studentDto.getTotalScore());
+                // 0分不参与赋分计算
+                if (totalScoreDouble == 0) {
+                    continue;
+                }
                 Map<String, Object> paramMap = new HashMap<>();
-                paramMap.put("a", Double.parseDouble(studentDto.getTotalScore()));
+                paramMap.put("a", totalScoreDouble);
                 // 判断是否重修
                 Double bValue = StringUtils.isNotBlank(studentDto.getCxbj()) && "1".equals(studentDto.getCxbj()) && rebuildValue != null && rebuildValue.doubleValue() != 0 ? rebuildValue : value;
                 paramMap.put("b", bValue);
@@ -380,10 +385,14 @@ public class WhuDataSyncServiceImpl implements WhuDataSyncService {
             String formula2_2 = "(a*50/b)*2";
 
             for (ExamSyncStudentDto studentDto : examSyncStudentDtoList) {
+                Double totalScore = Double.valueOf(studentDto.getTotalScore());
+                // 0分不参与赋分计算
+                if (totalScore.doubleValue() == 0) {
+                    continue;
+                }
                 // 判断是否重修
                 Double bValue = StringUtils.isNotBlank(studentDto.getCxbj()) && "1".equals(studentDto.getCxbj()) && rebuildValue != null && rebuildValue.doubleValue() != 0 ? rebuildValue : value;
                 Map<String, Object> paramMap = new HashMap<>();
-                Double totalScore = Double.valueOf(studentDto.getTotalScore());
                 String tempAssignScore;
                 if (totalScore >= value) {
                     paramMap.put("a", totalScore.doubleValue());

+ 3 - 3
src/main/resources/mapper/CloudMarkingScoreMapper.xml

@@ -21,10 +21,10 @@
                 WHEN 3 THEN '违纪'
                 END status,
             cms.total_score totalScore,
-            cms.assign_score assignScore,
+            ifnull(cms.assign_score, '/') assignScore,
             cms.objective_score objectiveScore,
             cms.subjective_score subjectiveScore,
-            case cms.exam_sync_student_id when null then '未关联' else '已关联' end relateExamData
+            case when cms.exam_sync_student_id is null then '未关联' else '已关联' end relateExamData
         FROM
             cloud_marking_score cms
                 join
@@ -134,7 +134,7 @@
             ess.jgmc,
             cms.total_score totalScore,
             cms.assign_score assignScore,
-            case cms.exam_sync_student_id when null then '未关联' else '已关联' end relateExamData
+            case when cms.exam_sync_student_id is null then '未关联' else '已关联' end relateExamData
         FROM
             cloud_marking_score cms
                 LEFT JOIN

+ 1 - 0
src/main/resources/mapper/ExamAssignMapper.xml

@@ -103,6 +103,7 @@
                semester_id semesterId,
                exam_type_id examTypeId,
                course_code courseCode,
+               course_name courseName,
                open_college openCollege,
                formula,
                coefficient,