|
|
|
@ -1,12 +1,12 @@
|
|
|
|
|
package com.ibeetl.jlw.service;
|
|
|
|
|
|
|
|
|
|
import com.ibeetl.admin.core.entity.CoreUser;
|
|
|
|
|
import com.ibeetl.admin.core.service.CoreUserService;
|
|
|
|
|
import com.ibeetl.jlw.dao.StatisticalAnalysisDao;
|
|
|
|
|
import com.ibeetl.jlw.dao.SysLogDao;
|
|
|
|
|
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 com.ibeetl.jlw.web.query.*;
|
|
|
|
|
import org.beetl.sql.core.query.LambdaQuery;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
@ -37,6 +37,11 @@ public class StatisticalAnalysisService {
|
|
|
|
|
@Autowired private ResourcesApplicationService resourcesApplicationService;
|
|
|
|
|
@Autowired private UniversitiesCollegesDao universitiesCollegesDao;
|
|
|
|
|
@Autowired private SysLogDao sysLogDao;
|
|
|
|
|
@Autowired private UniversitiesCollegesService universitiesCollegesService;
|
|
|
|
|
@Autowired private CoreUserService coreUserService;
|
|
|
|
|
@Autowired private ResourcesTrainingService resourcesTrainingService;
|
|
|
|
|
@Autowired private ResourcesInfoService resourcesInfoService;
|
|
|
|
|
@Autowired private ResourcesQuestionService resourcesQuestionService;
|
|
|
|
|
|
|
|
|
|
private static final String PATTERN = "(?<=\"code\":\\[\").*?(?=\"\\],)";
|
|
|
|
|
Pattern r = Pattern.compile(PATTERN);
|
|
|
|
@ -132,13 +137,13 @@ public class StatisticalAnalysisService {
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Map<String, Object> adminIndexDetail(Date stime, Date etime) {
|
|
|
|
|
List<Student> studentList = studentService.getStudentByStimeAndEtime(stime, etime);
|
|
|
|
|
public Map<String, Object> adminIndexDetail(Date stime, Date etime, String universitiesCollegesId) {
|
|
|
|
|
List<Student> studentList = studentService.getStudentByStimeAndEtime(stime, etime, universitiesCollegesId);
|
|
|
|
|
Map<String, Object> data = new HashMap<>();
|
|
|
|
|
//注册学生数
|
|
|
|
|
data.put("studentNumber", studentList.size());
|
|
|
|
|
//注册老师数
|
|
|
|
|
List<Teacher> teachers = teacherService.getTeacherByStimeAndEtime(stime, etime);
|
|
|
|
|
List<Teacher> teachers = teacherService.getTeacherByStimeAndEtime(stime, etime, universitiesCollegesId);
|
|
|
|
|
data.put("teacherNumber", teachers.size());
|
|
|
|
|
LambdaQuery<SysLog> logDaoLambdaQuery = sysLogDao.createLambdaQuery();
|
|
|
|
|
if (stime != null && etime != null) {
|
|
|
|
@ -158,7 +163,7 @@ public class StatisticalAnalysisService {
|
|
|
|
|
//登录人次
|
|
|
|
|
data.put("studentPersonTime", sysLogs.size());
|
|
|
|
|
//上线课程数
|
|
|
|
|
List<CourseInfo> courseInfoList = courseInfoService.getCourseInfoByStimeAndEtime(stime, etime);
|
|
|
|
|
List<CourseInfo> courseInfoList = courseInfoService.getCourseInfoByStimeAndEtime(stime, etime, universitiesCollegesId);
|
|
|
|
|
data.put("courseNumber", courseInfoList.size());
|
|
|
|
|
//上线应用数
|
|
|
|
|
List<ResourcesApplication> resourcesApplicationList = resourcesApplicationService.getApplicationByStimeAndEtime(stime, etime);
|
|
|
|
@ -169,6 +174,26 @@ public class StatisticalAnalysisService {
|
|
|
|
|
data.put("studyNumber", studentList.size());
|
|
|
|
|
//学生做题
|
|
|
|
|
data.put("exerciseNumber", studentList.size());
|
|
|
|
|
UniversitiesColleges universitiesColleges = universitiesCollegesService.queryById(universitiesCollegesId);
|
|
|
|
|
//学校动态码
|
|
|
|
|
data.put("universitiesCollegesAuthCode", universitiesColleges != null ? universitiesColleges.getUniversitiesCollegesAuthCode() : "暂无动态码");
|
|
|
|
|
//注册用户数
|
|
|
|
|
List<CoreUser> coreUserList = coreUserService.getCoreUserList(new CoreUser());
|
|
|
|
|
data.put("userNumber", coreUserList.size());
|
|
|
|
|
//案例数量
|
|
|
|
|
List<ResourcesTraining> values = resourcesTrainingService.getValuesByQuery(new ResourcesTrainingQuery());
|
|
|
|
|
data.put("caseNumber", values.size());
|
|
|
|
|
//视频数量
|
|
|
|
|
ResourcesInfoQuery resourcesInfoQuery = new ResourcesInfoQuery();
|
|
|
|
|
resourcesInfoQuery.setResourcesInfoType(1);
|
|
|
|
|
List<ResourcesInfo> videoNumber = resourcesInfoService.getValuesByQuery(resourcesInfoQuery);
|
|
|
|
|
data.put("videoNumber", videoNumber.size());
|
|
|
|
|
//题库数量
|
|
|
|
|
List<ResourcesQuestion> questionList = resourcesQuestionService.getValuesByQuery(new ResourcesQuestionQuery());
|
|
|
|
|
data.put("questionNumber", questionList.size());
|
|
|
|
|
//院校数量
|
|
|
|
|
List<UniversitiesColleges> schoolList = universitiesCollegesService.getValuesByQuery(new UniversitiesCollegesQuery());
|
|
|
|
|
data.put("schoolNumber", schoolList.size());
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|