wangliang hai 9 meses
pai
achega
8e14c10e0a

+ 4 - 0
teachcloud-obe/src/main/java/com/qmth/teachcloud/obe/service/impl/TRBasicInfoServiceImpl.java

@@ -1058,6 +1058,10 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
         if (CollectionUtils.isEmpty(courseWeightDtoList)) {
             throw ExceptionResultEnum.ERROR.exception("未设置课程目标,报告生成失败,请在课程大纲管理菜单设置课程目标");
         }
+        for (CourseWeightDto c : obeCourseWeightResult.getSubmitForm()) {
+            Objects.requireNonNull(c.getTotalWeight(), "[" + c.getCourseTargetName() + "]未设置权重,报告生成失败,请在课程考核设置菜单设置各课程目标所包含考核方式及权重");
+        }
+
         ObeCourseOutline obeCourseOutline = obeCourseOutlineService.getById(obeCourseOutlineId);
         TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(obeCourseOutline.getCultureProgramId(), obeCourseOutline.getCourseId(), null);
         if (Objects.nonNull(tcPaperStruct) && Objects.nonNull(tcPaperStruct.getPaperStructDimension())) {