he2802 1 рік тому
батько
коміт
8e94cf54ed

+ 5 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsServiceImpl.java

@@ -395,6 +395,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
                 goods.setCopyTime(msg);
                 goods.setCopyTime(msg);
             }*/
             }*/
         });
         });
+        log.info("学时"+bo.getChapterNum());
         //继教二建统计学时
         //继教二建统计学时
         if (Validator.isNotEmpty(bo.getChapterNum())) {
         if (Validator.isNotEmpty(bo.getChapterNum())) {
             list.forEach(goodsVo -> {
             list.forEach(goodsVo -> {
@@ -411,6 +412,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
                         List<CourseMenuVo> courseMenuVoList = iCourseMenuService.selectList(bo1);
                         List<CourseMenuVo> courseMenuVoList = iCourseMenuService.selectList(bo1);
                         if (courseMenuVoList != null && courseMenuVoList.size() > 0) {
                         if (courseMenuVoList != null && courseMenuVoList.size() > 0) {
                             courseMenuVoList.forEach(courseMenuVo -> {
                             courseMenuVoList.forEach(courseMenuVo -> {
+                                log.info("模块"+courseMenuVo.getClassHours());
                                 classHours.updateAndGet(v -> v + Math.round(courseMenuVo.getClassHours()));
                                 classHours.updateAndGet(v -> v + Math.round(courseMenuVo.getClassHours()));
                                 //获取章信息
                                 //获取章信息
                                 List<CourseModuleChapterVo> courseModuleChapterVoList = iCourseModuleChapterService.getListById(courseMenuVo.getMenuId());
                                 List<CourseModuleChapterVo> courseModuleChapterVoList = iCourseModuleChapterService.getListById(courseMenuVo.getMenuId());
@@ -422,15 +424,18 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
                                         if (courseChapterSectionVoList != null && courseChapterSectionVoList.size() > 0) {
                                         if (courseChapterSectionVoList != null && courseChapterSectionVoList.size() > 0) {
                                             courseChapterSectionVoList.forEach(courseChapterSectionVo -> {
                                             courseChapterSectionVoList.forEach(courseChapterSectionVo -> {
                                                 chapterHours.updateAndGet(v -> v + courseChapterSectionVo.getClassHours());
                                                 chapterHours.updateAndGet(v -> v + courseChapterSectionVo.getClassHours());
+                                                log.info("章节"+courseChapterSectionVo.getClassHours());
                                             });
                                             });
                                         }
                                         }
                                     });
                                     });
                                 }
                                 }
                                 classHours.updateAndGet(v -> v + Math.round(chapterHours.get()));
                                 classHours.updateAndGet(v -> v + Math.round(chapterHours.get()));
+                                log.info("模块节"+chapterHours.get());
                             });
                             });
                         }
                         }
                     });
                     });
                 }
                 }
+                log.info("总学时"+classHours.get());
                 goodsVo.setClassHours((new BigDecimal(String.valueOf(classHours))).setScale(0, HALF_UP));
                 goodsVo.setClassHours((new BigDecimal(String.valueOf(classHours))).setScale(0, HALF_UP));
             });
             });
         }
         }