xiatian před 5 roky
rodič
revize
ae5a8f361d

+ 4 - 2
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamStudentServiceImpl.java

@@ -652,7 +652,8 @@ public class ExamStudentServiceImpl implements ExamStudentService {
             Map<Long,ExamStudentOrgStatistic> finishMap=finishList.stream().collect(Collectors.toMap(ExamStudentOrgStatistic::getOrgId, account -> account));
             
             for(ExamStudentOrgStatistic statistic:totalList) {
-                statistic.setFinishedCount(finishMap.get(statistic.getOrgId()).getFinishedCount());
+                ExamStudentOrgStatistic finish=finishMap.get(statistic.getOrgId());
+                statistic.setFinishedCount(finish==null?0:finish.getFinishedCount());
                 OrgCacheBean orgBean = gainBaseDataService.getOrgBean(statistic.getOrgId());
                 statistic.setOrgCode(orgBean.getCode());
                 statistic.setOrgName(orgBean.getName());
@@ -767,7 +768,8 @@ public class ExamStudentServiceImpl implements ExamStudentService {
             Map<Long,CourseProgressInfo> finishMap=finishList.stream().collect(Collectors.toMap(CourseProgressInfo::getCourseId, account -> account));
             
             for(CourseProgressInfo statistic:totalList) {
-                statistic.setCompletedNum(finishMap.get(statistic.getCourseId()).getCompletedNum());
+                CourseProgressInfo finish=finishMap.get(statistic.getCourseId());
+                statistic.setCompletedNum(finish==null?0:finish.getCompletedNum());
                 if (statistic.getAllNum() == 0 || statistic.getCompletedNum() == 0) {
                     statistic.setCompletedProportion(0.0D);
                     statistic.setNoCompletedNum(0);