|
|
|
@ -1,17 +1,17 @@
|
|
|
|
|
package com.ibeetl.jlw.service;
|
|
|
|
|
|
|
|
|
|
import com.ibeetl.jlw.dao.StatisticalAnalysisDao;
|
|
|
|
|
import com.ibeetl.jlw.dao.UniversitiesCollegesDao;
|
|
|
|
|
import com.ibeetl.jlw.entity.*;
|
|
|
|
|
import com.ibeetl.jlw.web.query.TeacherOpenCourseMergeSchoolClassQuery;
|
|
|
|
|
import com.ibeetl.jlw.web.query.TeacherOpenCourseMergeStudentQuery;
|
|
|
|
|
import com.ibeetl.jlw.web.query.TeacherOpenCourseNoticeQuery;
|
|
|
|
|
import org.beetl.sql.core.query.LambdaQuery;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 统计分析service
|
|
|
|
@ -32,6 +32,7 @@ public class StatisticalAnalysisService {
|
|
|
|
|
@Autowired private TeacherService teacherService;
|
|
|
|
|
@Autowired private CourseInfoService courseInfoService;
|
|
|
|
|
@Autowired private ResourcesApplicationService resourcesApplicationService;
|
|
|
|
|
@Autowired private UniversitiesCollegesDao universitiesCollegesDao;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 统计分析
|
|
|
|
@ -150,4 +151,25 @@ public class StatisticalAnalysisService {
|
|
|
|
|
data.put("exerciseNumber", studentList.size());
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Map<String, Object> adminIndexBarchart(Date stime, Date etime) {
|
|
|
|
|
|
|
|
|
|
LambdaQuery<UniversitiesColleges> lambdaQuery = universitiesCollegesDao.createLambdaQuery();
|
|
|
|
|
if (stime != null && etime != null) {
|
|
|
|
|
lambdaQuery.andBetween(UniversitiesColleges::getAddTime, stime, etime);
|
|
|
|
|
}
|
|
|
|
|
List<UniversitiesColleges> universitiesColleges = lambdaQuery.select();
|
|
|
|
|
Map<String, Long> collect = universitiesColleges.stream().collect(Collectors.groupingBy(UniversitiesColleges::getUniversitiesCollegesProvince, Collectors.counting()));
|
|
|
|
|
List<String> xList = new ArrayList<>();
|
|
|
|
|
List<Long> yList = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
collect.forEach((x,y) -> {
|
|
|
|
|
xList.add(x);
|
|
|
|
|
yList.add(y);
|
|
|
|
|
});
|
|
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
|
|
map.put("xList" , xList);
|
|
|
|
|
map.put("yList" , yList);
|
|
|
|
|
return map;
|
|
|
|
|
}
|
|
|
|
|
}
|