Kaynağa Gözat

fix. 去掉一个评价方式(自定义)只能被一个课程目标使用的限制

caozixuan 8 ay önce
ebeveyn
işleme
7dc5be4ea6

+ 9 - 9
teachcloud-obe/src/main/java/com/qmth/teachcloud/obe/service/impl/ObeCourseWeightServiceImpl.java

@@ -178,8 +178,8 @@ public class ObeCourseWeightServiceImpl extends ServiceImpl<ObeCourseWeightMappe
         // 课程目标整体权重检测
         BigDecimal checkTargetTotalWeight = BigDecimal.ZERO;
 
-        // 一个评价方式必须在一个目标下
-        Map<Long, CourseEvaluationTypeEnum> evaluationMap = new HashMap<>();
+//         一个评价方式必须在一个目标下
+//        Map<Long, CourseEvaluationTypeEnum> evaluationMap = new HashMap<>();
 
         for (CourseWeightDto courseWeightDto : submitForm) {
             Long courseTargetId = courseWeightDto.getCourseTargetId();
@@ -209,13 +209,13 @@ public class ObeCourseWeightServiceImpl extends ServiceImpl<ObeCourseWeightMappe
                     checkWeight = checkWeight.add(weight);
                 }
 
-                if (enable && CourseEvaluationTypeEnum.CUSTOM.equals(evaluationType)) {
-                    if (evaluationMap.containsKey(evaluationId)) {
-                        throw ExceptionResultEnum.ERROR.exception("平时成绩类评价方式只能被一个课程目标使用");
-                    } else {
-                        evaluationMap.put(evaluationId, evaluationType);
-                    }
-                }
+//                if (enable && CourseEvaluationTypeEnum.CUSTOM.equals(evaluationType)) {
+//                    if (evaluationMap.containsKey(evaluationId)) {
+//                        throw ExceptionResultEnum.ERROR.exception("平时成绩类评价方式只能被一个课程目标使用");
+//                    } else {
+//                        evaluationMap.put(evaluationId, evaluationType);
+//                    }
+//                }
 
                 ObeCourseWeight obeCourseWeight = new ObeCourseWeight();
                 obeCourseWeight.setObeCourseOutlineId(obeCourseOutlineId);