1、swagger接口文档

beetlsql3-dev
陈沅 1 year ago
parent 91f432de9a
commit 7c7e32efc2

@ -125,4 +125,5 @@ public interface StudentDao extends BaseMapper<Student>{
List<Student> getStudentByStudentNoAndOrgId(String studentNo,Long orgId);
List<Student>getValuesByOrgId(Long orgId);
}

@ -462,27 +462,30 @@ public class StatisticalAnalysisService {
public Map<String, Object> adminIndexDetail(Date stime, Date etime, UniversitiesColleges universitiesColleges, CoreUser coreUser) {
// Date startTime = DateUtil.beginOfDay(new Date());
// Date endTime = DateUtil.endOfDay(new Date());
Date startTime = null;
Date endTime = null;
if (!Objects.isNull(stime)) {
startTime = DateUtil.beginOfDay(stime);
}
if (!Objects.isNull(stime)) {
endTime = DateUtil.endOfDay(etime);
}
Long orgId = coreUser.getOrgId();
Long universitiesCollegesId = (universitiesColleges == null ? orgId : universitiesColleges.getUniversitiesCollegesId());
Long uniOrgId = (universitiesColleges == null ? orgId : universitiesColleges.getOrgId());
List<Student> studentList = studentService.getStudentByStimeAndEtime(startTime, endTime, uniOrgId);
//--------------------------------------------------
// Date startTime = null;
// Date endTime = null;
// if (!Objects.isNull(stime)) {
// startTime = DateUtil.beginOfDay(stime);
// }
//
// if (!Objects.isNull(stime)) {
// endTime = DateUtil.endOfDay(etime);
// }
//
// Long orgId = coreUser.getOrgId();
// Long universitiesCollegesId = (universitiesColleges == null ? orgId : universitiesColleges.getUniversitiesCollegesId());
// Long uniOrgId = (universitiesColleges == null ? orgId : universitiesColleges.getOrgId());
//
// List<Student> studentList = studentService.getStudentByStimeAndEtime(startTime, endTime, uniOrgId);
Map<String, Object> data = new HashMap<>();
//注册学生数
data.put("studentNumber", studentList.size());
//注册老师数
List<Teacher> teachers = teacherService.getTeacherByStimeAndEtime(startTime, endTime, uniOrgId);
data.put("teacherNumber", teachers.size());
// //注册学生数
// data.put("studentNumber", studentList.size());
// //注册老师数
// List<Teacher> teachers = teacherService.getTeacherByStimeAndEtime(startTime, endTime, uniOrgId);
// data.put("teacherNumber", teachers.size());
//--------------------------------------------
// LambdaQuery<CoreUser> lambdaQuery = coreUserDao.createLambdaQuery();
// if (uniOrgId != null && uniOrgId != 1) {
// lambdaQuery.andEq(CoreUser::getOrgId, uniOrgId);
@ -511,187 +514,187 @@ public class StatisticalAnalysisService {
// loginDistinctCountQuery.andIsNotNull(CoreUser::getLoginCount);
// long loginDistinctCount = loginDistinctCountQuery.count();
StudentLoginLogQuery condition = new StudentLoginLogQuery();
if (ObjectUtil.isNotEmpty(startTime)){
condition.setLoginStartTime(startTime);
}
if (ObjectUtil.isNotEmpty(endTime)){
condition.setLoginEndTime(endTime);
}
condition.setLoginPath(ResponseControllerAdvice.LOGIN_URL);
condition.setLogoutPath(KeyExpiredListener.TOKEN_EXPIRED_MESSAGE);
UniversitiesColleges uniAdmin = getUniAdmin();
if (null != uniAdmin) {
condition.getPageQuery().setPara("universitiesCollegesId", uniAdmin.getUniversitiesCollegesId());
}
//登录人数
PageQuery<StudentLogAnalysisVO> studentLogAnalysisVOPageQuery = studentService.queryStatisticalStatementNumberPeopleByCondition(condition.getPageQuery());
long loginDistinctCount = studentLogAnalysisVOPageQuery.getList().stream().mapToLong(i -> Integer.parseInt(i.getLoginCount())).sum();
data.put("loginNumber", loginDistinctCount);
// 获取登录次数
PageQuery<StudentLoginLogVO> studentLoginLogVOPageQuery = studentService.queryUserLoginLogByCondition(condition.getPageQuery());
Long loginCount = studentLoginLogVOPageQuery.getTotalRow();
// Long loginCount = coreUserDao.getSumLoginCount(stime, etime, orgId == 1 ? null : orgId);
//登录人次
data.put("studentPersonTime", loginCount);
//上线课程数
// Long courseInfoCount = courseInfoService.getCourseInfoByStimeAndEtime(stime, etime, uniOrgId);
// List<CourseInfo> theoryCourseList = universitiesCollegesJurisdictionCurriculumResourcesService.getResourcesCourseInfoAuthDetails(orgId).getTheoryCourseList();
TeacherOpenCourseQuery teacherOpenCourseQuery = new TeacherOpenCourseQuery();
if (ObjectUtil.isNotEmpty(startTime)){
teacherOpenCourseQuery.setFilterStartTime(startTime);
}
if (ObjectUtil.isNotEmpty(endTime)){
teacherOpenCourseQuery.setFilterEndTime(endTime);
}
List<TeacherOpenCourse> teacherOpenCourseMergeCourseInfo = teacherOpenCourseService.getTeacherOpenCourseMergeCourseInfo(teacherOpenCourseQuery, coreUser);
data.put("courseNumber", teacherOpenCourseMergeCourseInfo.size());
Long resourcesApplicationCount = 0L;
// 如果是学校管理员身份
if (coreUser.isUniAdmin()) {
resourcesApplicationCount = universitiesCollegesJurisdictionExperimentalSystemDao.createLambdaQuery()
.andEq(UniversitiesCollegesJurisdictionExperimentalSystem::getUniversitiesCollegesId, universitiesCollegesId)
.andNotEq(UniversitiesCollegesJurisdictionExperimentalSystem::getUseType, 0)
.andBetween(UniversitiesCollegesJurisdictionExperimentalSystem::getAddTime, startTime, endTime)
.count();
}
// 超管
else {
//上线应用数
resourcesApplicationCount = resourcesApplicationService.getApplicationByStimeAndEtime(startTime, endTime, uniOrgId);
}
data.put("applicationNumber", resourcesApplicationCount);
TeacherOpenCourseQuestionSettingQuery teacherOpenCourseQuestionSettingQuery = new TeacherOpenCourseQuestionSettingQuery();
List<TeacherOpenCourse> select11 = teacherOpenCourseService.createLambdaQuery().andEq(TeacherOpenCourse::getOrgId, uniOrgId)
.andEq(TeacherOpenCourse::getTeacherOpenCourseStatus, 1).select();
Set<Long> collect11 = select11.stream().map(TeacherOpenCourse::getTeacherOpenCourseId).collect(Collectors.toSet());
if (orgId != null && orgId != 1) {
teacherOpenCourseQuestionSettingQuery.setOrgId(uniOrgId);
}
teacherOpenCourseQuestionSettingQuery.setTeacherOpenCourseQuestionSettingPushStatus(GlobalPushStatusEnum.PUSH);
teacherOpenCourseQuestionSettingQuery.setTeacherOpenCourseQuestionSettingStatus(1);
if (ObjectUtil.isNotEmpty(startTime)){
teacherOpenCourseQuestionSettingQuery.setStartTime(startTime);
}
if (ObjectUtil.isNotEmpty(endTime)){
teacherOpenCourseQuestionSettingQuery.setEndTime(endTime);
}
List<TeacherOpenCourseQuestionSettingPure> courseQuestionSettings = teacherOpenCourseQuestionSettingDao.getValuesByQueryNotWithPermission2(teacherOpenCourseQuestionSettingQuery);
// 学生做题:读取【文档存档】中所有课程的【章节】、【课程实操】、【作业—题库作业】、【考试】,这几个模块的任务数量
// List<Long> questionSettingIdList = courseQuestionSettings.stream().map(item -> item.getTeacherOpenCourseQuestionSettingId()).collect(Collectors.toList());
// long allQuestionSettingNumber = resourcesQuestionSnapshotDao.createLambdaQuery().andIn(ResourcesQuestionSnapshot::getTeacherOpenCourseQuestionSettingId, questionSettingIdList)
// .count();
long homeWorkNumber = courseQuestionSettings.stream().filter(item -> !HOMEWORK_FILE.equals(item.getTeacherOpenCourseQuestionSettingType())).count();
//批改作业数
data.put("homeWorkNumber", homeWorkNumber);
//课件学习
TeacherOpenCourseHandsOnSimulationTasksQuery tasksQuery = new TeacherOpenCourseHandsOnSimulationTasksQuery();
tasksQuery.setTeacherOpenCourseIdPlural(CollectionUtil.join(collect11, ","));
if (ObjectUtil.isNotEmpty(startTime)){
tasksQuery.setStartTime(startTime);
}
if (ObjectUtil.isNotEmpty(endTime)){
tasksQuery.setEndTime(endTime);
}
if (orgId != 1) {
tasksQuery.setOrgId(orgId);
}
List<TeacherOpenCourseHandsOnSimulationTasks> teacherOpenCourseHandsOnSimulationTasks = teacherOpenCourseHandsOnSimulationTasksService.getValuesByQueryNotWithPermission(tasksQuery);
long count = teacherOpenCourseHandsOnSimulationTasks.stream().filter(v -> "1".equals(v.getTaskType()) || "2".equals(v.getTaskType())).count();
data.put("studyNumber", count);
// StudentLoginLogQuery condition = new StudentLoginLogQuery();
// if (ObjectUtil.isNotEmpty(startTime)){
// condition.setLoginStartTime(startTime);
// }
// if (ObjectUtil.isNotEmpty(endTime)){
// condition.setLoginEndTime(endTime);
// }
// condition.setLoginPath(ResponseControllerAdvice.LOGIN_URL);
// condition.setLogoutPath(KeyExpiredListener.TOKEN_EXPIRED_MESSAGE);
// UniversitiesColleges uniAdmin = getUniAdmin();
// if (null != uniAdmin) {
// condition.getPageQuery().setPara("universitiesCollegesId", uniAdmin.getUniversitiesCollegesId());
// }
//
// //登录人数
// PageQuery<StudentLogAnalysisVO> studentLogAnalysisVOPageQuery = studentService.queryStatisticalStatementNumberPeopleByCondition(condition.getPageQuery());
// long loginDistinctCount = studentLogAnalysisVOPageQuery.getList().stream().mapToLong(i -> Integer.parseInt(i.getLoginCount())).sum();
// data.put("loginNumber", loginDistinctCount);
//
// // 获取登录次数
// PageQuery<StudentLoginLogVO> studentLoginLogVOPageQuery = studentService.queryUserLoginLogByCondition(condition.getPageQuery());
// Long loginCount = studentLoginLogVOPageQuery.getTotalRow();
//// Long loginCount = coreUserDao.getSumLoginCount(stime, etime, orgId == 1 ? null : orgId);
// //登录人次
// data.put("studentPersonTime", loginCount);
// //上线课程数
//// Long courseInfoCount = courseInfoService.getCourseInfoByStimeAndEtime(stime, etime, uniOrgId);
//
//// List<CourseInfo> theoryCourseList = universitiesCollegesJurisdictionCurriculumResourcesService.getResourcesCourseInfoAuthDetails(orgId).getTheoryCourseList();
// TeacherOpenCourseQuery teacherOpenCourseQuery = new TeacherOpenCourseQuery();
// if (ObjectUtil.isNotEmpty(startTime)){
// teacherOpenCourseQuery.setFilterStartTime(startTime);
// }
// if (ObjectUtil.isNotEmpty(endTime)){
// teacherOpenCourseQuery.setFilterEndTime(endTime);
// }
// List<TeacherOpenCourse> teacherOpenCourseMergeCourseInfo = teacherOpenCourseService.getTeacherOpenCourseMergeCourseInfo(teacherOpenCourseQuery, coreUser);
// data.put("courseNumber", teacherOpenCourseMergeCourseInfo.size());
//
// Long resourcesApplicationCount = 0L;
//
// // 如果是学校管理员身份
// if (coreUser.isUniAdmin()) {
// resourcesApplicationCount = universitiesCollegesJurisdictionExperimentalSystemDao.createLambdaQuery()
// .andEq(UniversitiesCollegesJurisdictionExperimentalSystem::getUniversitiesCollegesId, universitiesCollegesId)
// .andNotEq(UniversitiesCollegesJurisdictionExperimentalSystem::getUseType, 0)
// .andBetween(UniversitiesCollegesJurisdictionExperimentalSystem::getAddTime, startTime, endTime)
// .count();
// }
// // 超管
// else {
// //上线应用数
// resourcesApplicationCount = resourcesApplicationService.getApplicationByStimeAndEtime(startTime, endTime, uniOrgId);
// }
// data.put("applicationNumber", resourcesApplicationCount);
//
// TeacherOpenCourseQuestionSettingQuery teacherOpenCourseQuestionSettingQuery = new TeacherOpenCourseQuestionSettingQuery();
// List<TeacherOpenCourse> select11 = teacherOpenCourseService.createLambdaQuery().andEq(TeacherOpenCourse::getOrgId, uniOrgId)
// .andEq(TeacherOpenCourse::getTeacherOpenCourseStatus, 1).select();
// Set<Long> collect11 = select11.stream().map(TeacherOpenCourse::getTeacherOpenCourseId).collect(Collectors.toSet());
// if (orgId != null && orgId != 1) {
// teacherOpenCourseQuestionSettingQuery.setOrgId(uniOrgId);
// }
// teacherOpenCourseQuestionSettingQuery.setTeacherOpenCourseQuestionSettingPushStatus(GlobalPushStatusEnum.PUSH);
// teacherOpenCourseQuestionSettingQuery.setTeacherOpenCourseQuestionSettingStatus(1);
// if (ObjectUtil.isNotEmpty(startTime)){
// teacherOpenCourseQuestionSettingQuery.setStartTime(startTime);
// }
// if (ObjectUtil.isNotEmpty(endTime)){
// teacherOpenCourseQuestionSettingQuery.setEndTime(endTime);
// }
// List<TeacherOpenCourseQuestionSettingPure> courseQuestionSettings = teacherOpenCourseQuestionSettingDao.getValuesByQueryNotWithPermission2(teacherOpenCourseQuestionSettingQuery);
//
// // 学生做题:读取【文档存档】中所有课程的【章节】、【课程实操】、【作业—题库作业】、【考试】,这几个模块的任务数量
//// List<Long> questionSettingIdList = courseQuestionSettings.stream().map(item -> item.getTeacherOpenCourseQuestionSettingId()).collect(Collectors.toList());
//// long allQuestionSettingNumber = resourcesQuestionSnapshotDao.createLambdaQuery().andIn(ResourcesQuestionSnapshot::getTeacherOpenCourseQuestionSettingId, questionSettingIdList)
//// .count();
//
// long homeWorkNumber = courseQuestionSettings.stream().filter(item -> !HOMEWORK_FILE.equals(item.getTeacherOpenCourseQuestionSettingType())).count();
//
// //批改作业数
// data.put("homeWorkNumber", homeWorkNumber);
// //课件学习
// TeacherOpenCourseHandsOnSimulationTasksQuery tasksQuery = new TeacherOpenCourseHandsOnSimulationTasksQuery();
// tasksQuery.setTeacherOpenCourseIdPlural(CollectionUtil.join(collect11, ","));
// if (ObjectUtil.isNotEmpty(startTime)){
// tasksQuery.setStartTime(startTime);
// }
// if (ObjectUtil.isNotEmpty(endTime)){
// tasksQuery.setEndTime(endTime);
// }
// if (orgId != 1) {
// tasksQuery.setOrgId(orgId);
// }
// List<TeacherOpenCourseHandsOnSimulationTasks> teacherOpenCourseHandsOnSimulationTasks = teacherOpenCourseHandsOnSimulationTasksService.getValuesByQueryNotWithPermission(tasksQuery);
// long count = teacherOpenCourseHandsOnSimulationTasks.stream().filter(v -> "1".equals(v.getTaskType()) || "2".equals(v.getTaskType())).count();
// data.put("studyNumber", count);
//学生做题 课程实操。学生做题:读取【文档存档】中所有课程的【章节】、【课程实操】、【作业—题库作业】、【考试】,这几个模块的任务数量 (题目配置数量,非题目数量)
data.put("exerciseNumber", teacherOpenCourseHandsOnSimulationTasks.size() + courseQuestionSettings.size() + homeWorkNumber);
// data.put("exerciseNumber", teacherOpenCourseHandsOnSimulationTasks.size() + courseQuestionSettings.size() + homeWorkNumber);
//学校动态码
data.put("universitiesCollegesAuthCode", universitiesColleges != null ? universitiesColleges.getUniversitiesCollegesAuthCode() : "暂无动态码");
//注册用户数
LambdaQuery<CoreUser> lambdaQuery2 = coreUserDao.createLambdaQuery();
if (uniOrgId != null && uniOrgId != 1) {
lambdaQuery2.andEq(CoreUser::getOrgId, uniOrgId);
}
if (ObjectUtil.isNotEmpty(startTime) && ObjectUtil.isNotEmpty(endTime)){
lambdaQuery2.andBetween(CoreUser::getCreateTime, startTime, endTime);
}
int size = lambdaQuery2.andEq(CoreUser::getDelFlag, DelFlagEnum.NORMAL.getValue())
.andNotEq(CoreUser::getId, 1)
.select().size();
data.put("userNumber", size);
//案例数量
LambdaQuery<HandsOn> lambdaQuery3 = handsOnService.createLambdaQuery();
if (uniOrgId != null && uniOrgId != 1) {
lambdaQuery3.andEq(HandsOn::getOrgId, uniOrgId);
}
if (ObjectUtil.isNotEmpty(startTime) && ObjectUtil.isNotEmpty(endTime)){
lambdaQuery3.andBetween(HandsOn::getAddTime, startTime, endTime);
}
int values = lambdaQuery3.andEq(HandsOn::getHandsOnStatus, 1)
.select().size();
LambdaQuery<ResourcesTraining> lambdaQuery4 = resourcesTrainingService.createLambdaQuery();
if (uniOrgId != null && uniOrgId != 1) {
lambdaQuery4.andEq(ResourcesTraining::getOrgId, uniOrgId);
}
if (ObjectUtil.isNotEmpty(startTime) && ObjectUtil.isNotEmpty(endTime)){
lambdaQuery4.andBetween(ResourcesTraining::getAddTime, startTime, endTime);
}
int values2 = lambdaQuery4.andEq(ResourcesTraining::getResourcesTrainingStatus, 1)
.select().size();
LambdaQuery<ResourcesCompetition> lambdaQuery5 = resourcesCompetitionService.createLambdaQuery();
if (uniOrgId != null && uniOrgId != 1) {
lambdaQuery5.andEq(ResourcesCompetition::getOrgId, uniOrgId);
}
if (ObjectUtil.isNotEmpty(startTime) && ObjectUtil.isNotEmpty(endTime)){
lambdaQuery5.andBetween(ResourcesCompetition::getAddTime, startTime, endTime);
}
int values3 = lambdaQuery5.andEq(ResourcesCompetition::getResourcesCompetitionStatus, 1)
.select().size();
data.put("caseNumber", values + values2 + values3);
//视频数量
ResourcesInfoQuery resourcesInfoQuery = new ResourcesInfoQuery();
resourcesInfoQuery.setResourcesInfoType(1);
resourcesInfoQuery.setStartTime(stime);
resourcesInfoQuery.setEndTime(etime);
if (uniOrgId != null && uniOrgId != 1) {
resourcesInfoQuery.setOrgId(uniOrgId);
}
List<ResourcesInfo> videoNumber = resourcesInfoService.getValues(resourcesInfoQuery);
data.put("videoNumber", videoNumber.size());
//题库数量
ResourcesQuestionQuery paras1 = new ResourcesQuestionQuery();
paras1.setQuestionStatus(1);
if (uniOrgId != null && uniOrgId != 1) {
paras1.setOrgId(uniOrgId);
}
if (ObjectUtil.isNotEmpty(startTime)){
paras1.setStartTime(startTime);
}
if (ObjectUtil.isNotEmpty(endTime)){
paras1.setEndTime(endTime);
}
List<ResourcesQuestion> questionList = resourcesQuestionService.getValues(paras1);
data.put("questionNumber", questionList.size());
//院校数量
UniversitiesCollegesQuery paras = new UniversitiesCollegesQuery();
paras.setUniversitiesCollegesStatus(1);
if (uniOrgId != null && uniOrgId != 1) {
paras.setOrgId(uniOrgId);
}
if (ObjectUtil.isNotEmpty(startTime)){
paras.setStartTime(startTime);
}
if (ObjectUtil.isNotEmpty(endTime)){
paras.setEndTime(endTime);
}
List<UniversitiesColleges> schoolList = universitiesCollegesService.getValues(paras);
data.put("schoolNumber", schoolList.size());
// LambdaQuery<CoreUser> lambdaQuery2 = coreUserDao.createLambdaQuery();
// if (uniOrgId != null && uniOrgId != 1) {
// lambdaQuery2.andEq(CoreUser::getOrgId, uniOrgId);
// }
// if (ObjectUtil.isNotEmpty(startTime) && ObjectUtil.isNotEmpty(endTime)){
// lambdaQuery2.andBetween(CoreUser::getCreateTime, startTime, endTime);
// }
// int size = lambdaQuery2.andEq(CoreUser::getDelFlag, DelFlagEnum.NORMAL.getValue())
// .andNotEq(CoreUser::getId, 1)
// .select().size();
// data.put("userNumber", size);
// //案例数量
// LambdaQuery<HandsOn> lambdaQuery3 = handsOnService.createLambdaQuery();
// if (uniOrgId != null && uniOrgId != 1) {
// lambdaQuery3.andEq(HandsOn::getOrgId, uniOrgId);
// }
// if (ObjectUtil.isNotEmpty(startTime) && ObjectUtil.isNotEmpty(endTime)){
// lambdaQuery3.andBetween(HandsOn::getAddTime, startTime, endTime);
// }
// int values = lambdaQuery3.andEq(HandsOn::getHandsOnStatus, 1)
// .select().size();
// LambdaQuery<ResourcesTraining> lambdaQuery4 = resourcesTrainingService.createLambdaQuery();
// if (uniOrgId != null && uniOrgId != 1) {
// lambdaQuery4.andEq(ResourcesTraining::getOrgId, uniOrgId);
// }
// if (ObjectUtil.isNotEmpty(startTime) && ObjectUtil.isNotEmpty(endTime)){
// lambdaQuery4.andBetween(ResourcesTraining::getAddTime, startTime, endTime);
// }
// int values2 = lambdaQuery4.andEq(ResourcesTraining::getResourcesTrainingStatus, 1)
// .select().size();
// LambdaQuery<ResourcesCompetition> lambdaQuery5 = resourcesCompetitionService.createLambdaQuery();
// if (uniOrgId != null && uniOrgId != 1) {
// lambdaQuery5.andEq(ResourcesCompetition::getOrgId, uniOrgId);
// }
// if (ObjectUtil.isNotEmpty(startTime) && ObjectUtil.isNotEmpty(endTime)){
// lambdaQuery5.andBetween(ResourcesCompetition::getAddTime, startTime, endTime);
// }
// int values3 = lambdaQuery5.andEq(ResourcesCompetition::getResourcesCompetitionStatus, 1)
// .select().size();
// data.put("caseNumber", values + values2 + values3);
// //视频数量
// ResourcesInfoQuery resourcesInfoQuery = new ResourcesInfoQuery();
// resourcesInfoQuery.setResourcesInfoType(1);
// resourcesInfoQuery.setStartTime(stime);
// resourcesInfoQuery.setEndTime(etime);
// if (uniOrgId != null && uniOrgId != 1) {
// resourcesInfoQuery.setOrgId(uniOrgId);
// }
// List<ResourcesInfo> videoNumber = resourcesInfoService.getValues(resourcesInfoQuery);
// data.put("videoNumber", videoNumber.size());
// //题库数量
// ResourcesQuestionQuery paras1 = new ResourcesQuestionQuery();
// paras1.setQuestionStatus(1);
// if (uniOrgId != null && uniOrgId != 1) {
// paras1.setOrgId(uniOrgId);
// }
// if (ObjectUtil.isNotEmpty(startTime)){
// paras1.setStartTime(startTime);
// }
// if (ObjectUtil.isNotEmpty(endTime)){
// paras1.setEndTime(endTime);
// }
// List<ResourcesQuestion> questionList = resourcesQuestionService.getValues(paras1);
// data.put("questionNumber", questionList.size());
// //院校数量
// UniversitiesCollegesQuery paras = new UniversitiesCollegesQuery();
// paras.setUniversitiesCollegesStatus(1);
// if (uniOrgId != null && uniOrgId != 1) {
// paras.setOrgId(uniOrgId);
// }
// if (ObjectUtil.isNotEmpty(startTime)){
// paras.setStartTime(startTime);
// }
// if (ObjectUtil.isNotEmpty(endTime)){
// paras.setEndTime(endTime);
// }
// List<UniversitiesColleges> schoolList = universitiesCollegesService.getValues(paras);
// data.put("schoolNumber", schoolList.size());
return data;
}

@ -833,6 +833,11 @@ public class StudentService extends CoreBaseService<Student> {
return sqlManager.select(SqlId.of("jlw.student.getStudentValues"), Student.class, paras);
}
public List<Student> getValuesByOrgId(Long orgId) {
return studentDao.getValuesByOrgId(orgId);
}
public List<Student> getValuesByQuery(StudentQuery studentQuery) {
List<Student> valuesByQuery = studentDao.getValuesByQuery(studentQuery);
queryListAfter(valuesByQuery);

@ -138,20 +138,19 @@ public class AccountController {
}
@ApiOperation("为学生账号创建基础资金表")
@PostMapping("createFund.json")
public void createFund() throws SQLException {
List<Student> students = studentService.getValues(null);
int i =0;
List<Student> students = studentService.getValuesByOrgId(115L);
int i = 0;
if (students != null && students.size() > 0) {
for (Student student : students) {
// List<StudentAccountAssetAllocation> studentAccountAssetAllocations = studentAccountAssetAllocationService.getInfoByStudentId(student.getStudentId());
// if (studentAccountAssetAllocations != null && studentAccountAssetAllocations.size() > 0) {
// continue;
// }
System.out.println("已处理------------->"+i++);
System.out.println("已处理------------->" + i++);
Connection connection = openConn();
String username = student.getStudentSn();
StudentAccountAssetAllocationQuery query = new StudentAccountAssetAllocationQuery();
@ -180,7 +179,13 @@ public class AccountController {
PreparedStatement preparedStatement = connection.prepareStatement(sql);
ResultSet resultSet = preparedStatement.executeQuery();
while (resultSet.next()) {
List<StudentAccountAssetAllocation> studentAccountAssetAllocations = studentAccountAssetAllocationService.getInfoByStudentId(student.getStudentId());
if (studentAccountAssetAllocations != null && studentAccountAssetAllocations.size() == 8) {
continue;
}
StudentAccountAssetAllocationQuery allocationQuery = new StudentAccountAssetAllocationQuery();
Integer applicationId = resultSet.getInt("ApplicationId");
String applicationName = resultSet.getString("name");
Double initialCapital = resultSet.getDouble("InitialCapital");
@ -207,7 +212,7 @@ public class AccountController {
allocationQuery.setApplicationId(Long.valueOf(4));
allocationQuery.setName(AccountTypeEnum.P2P_ACCOUNT);
StudentAccountCrowdfundingSystem info = studentAccountCrowdfundingSystemService.getInfo(student.getStudentId());
if(info!=null){
if (info != null) {
continue;
}
Connection connection1 = openConn();
@ -287,7 +292,7 @@ public class AccountController {
allocationQuery.setName(AccountTypeEnum.CROWDFUNDING_ACCOUNT);
StudentAccountCrowdfundingSystem info = studentAccountCrowdfundingSystemService.getInfo(student.getStudentId());
if(info!=null)continue;
if (info != null) continue;
Connection connection1 = openConn();
String sql1 = "SELECT\n" +
@ -931,19 +936,19 @@ public class AccountController {
@ApiOperation("根据学校id获取学生信息")
@GetMapping("findAllStudentBySchoolId.json")
public JsonResult<List<Map<String,Object>>> findAllStudentBySchoolId(Long schoolId) {
return JsonResult.success(studentService.findAllBySchoolId(schoolId));
public JsonResult<List<Map<String, Object>>> findAllStudentBySchoolId(Long schoolId) {
return JsonResult.success(studentService.findAllBySchoolId(schoolId));
}
@ApiOperation("根据学校id获取教师信息")
@GetMapping("findAllTeacherBySchoolId.json")
public JsonResult<List<Map<String,Object>>> findAllTeacherBySchoolId(Long schoolId) {
public JsonResult<List<Map<String, Object>>> findAllTeacherBySchoolId(Long schoolId) {
return JsonResult.success(teacherService.findAllTeacherBySchoolId(schoolId));
}
@ApiOperation("获取已开通证券大赛及模拟交易的学校")
@GetMapping("findByAuthorization.json")
public JsonResult<List<Map<String,Object>>> findByAuthorization(){
public JsonResult<List<Map<String, Object>>> findByAuthorization() {
return null;
}

@ -73,8 +73,8 @@ public class StatisticalAnalysisController {
@RequestParam(value = "etime", required = false) Date etime,
@SCoreUser CoreUser coreUser) {
UniversitiesColleges uc = universitiesCollegesService.getByOrgId(coreUser.getOrgId());
// Map<String, Object> detail = statisticalAnalysisService.adminIndexDetail(stime, etime, uc, coreUser);
Map<String, Object> detail = null;
Map<String, Object> detail = statisticalAnalysisService.adminIndexDetail(stime, etime, uc, coreUser);
// Map<String, Object> detail = null;
return JsonResult.success(detail);
}

@ -2219,3 +2219,7 @@ select student.student_sn as studentNo,student.student_name as name,school_class
getStudentByStudentNoAndOrgId
===
select * from student where student_sn = #studentNo# and org_id = #orgId#
getValuesByOrgId
===
select * from student where org_id = #orgId#

@ -81,9 +81,7 @@
$("#InformationURL").show();
$("#twxs").hide();
$("#player-con").hide();
// $('#InformationURL').attr('src', 'https://view.officeapps.live.com/op/view.aspx?src='+Common.isHttp(resourcesInfoContent));
resourcesInfoContent = 'http://zycloud.sztzjy.com'+resourcesInfoContent;
$('#InformationURL').attr('src', 'https://view.officeapps.live.com/op/view.aspx?src='+resourcesInfoContent);
$('#InformationURL').attr('src', 'https://view.officeapps.live.com/op/view.aspx?src='+Common.isHttp(resourcesInfoContent));
}else if(resourcesInfoType == 1){
$(".wordHeader").hide();//隐藏
$("#pdfInfo").hide();

Loading…
Cancel
Save