|
@@ -1,24 +1,17 @@
|
|
|
package com.ym.mec.web.controller;
|
|
|
|
|
|
-import io.swagger.annotations.Api;
|
|
|
-import io.swagger.annotations.ApiImplicitParam;
|
|
|
-import io.swagger.annotations.ApiImplicitParams;
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
-import io.swagger.annotations.ApiParam;
|
|
|
-
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.Arrays;
|
|
|
-import java.util.Collections;
|
|
|
-import java.util.Comparator;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-import java.util.stream.Collectors;
|
|
|
-
|
|
|
+import com.ym.mec.biz.dal.dto.*;
|
|
|
+import com.ym.mec.biz.dal.entity.Organization;
|
|
|
+import com.ym.mec.biz.dal.entity.Student;
|
|
|
+import com.ym.mec.biz.dal.page.*;
|
|
|
+import com.ym.mec.biz.service.*;
|
|
|
+import com.ym.mec.common.controller.BaseController;
|
|
|
+import com.ym.mec.common.entity.HttpResponseResult;
|
|
|
+import com.ym.mec.common.exception.BizException;
|
|
|
+import com.ym.mec.common.page.PageInfo;
|
|
|
+import com.ym.mec.common.page.QueryInfo;
|
|
|
+import io.swagger.annotations.*;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.slf4j.Logger;
|
|
|
-import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
@@ -27,40 +20,8 @@ import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
-import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
|
-import com.ym.mec.auth.api.entity.SysUser;
|
|
|
-import com.ym.mec.biz.dal.dto.ActivityCourseDetailDto;
|
|
|
-import com.ym.mec.biz.dal.dto.CloudStudyStudentDataDto;
|
|
|
-import com.ym.mec.biz.dal.dto.EduOrganStudentDataDto;
|
|
|
-import com.ym.mec.biz.dal.dto.IndexCloudStudyListDto;
|
|
|
-import com.ym.mec.biz.dal.dto.StatDto;
|
|
|
-import com.ym.mec.biz.dal.dto.UpdateStudentFeeDto;
|
|
|
-import com.ym.mec.biz.dal.entity.Organization;
|
|
|
-import com.ym.mec.biz.dal.entity.Student;
|
|
|
-import com.ym.mec.biz.dal.page.CloudTeacherActiveQueryInfo;
|
|
|
-import com.ym.mec.biz.dal.page.MusicGroupStudentQueryInfo;
|
|
|
-import com.ym.mec.biz.dal.page.OrganCloudStudyStudentDataQueryInfo;
|
|
|
-import com.ym.mec.biz.dal.page.StudentActivityQueryInfo;
|
|
|
-import com.ym.mec.biz.dal.page.StudentErrorLeaveQueryInfo;
|
|
|
-import com.ym.mec.biz.dal.page.StudentManageAttendanceQueryInfo;
|
|
|
-import com.ym.mec.biz.dal.page.StudentManageCourseQueryInfo;
|
|
|
-import com.ym.mec.biz.dal.page.StudentManageQueryInfo;
|
|
|
-import com.ym.mec.biz.dal.page.StudentManageVipClassQueryInfo;
|
|
|
-import com.ym.mec.biz.dal.page.StudentOperatingQueryInfo;
|
|
|
-import com.ym.mec.biz.dal.page.StudentQueryInfo;
|
|
|
-import com.ym.mec.biz.dal.page.StudentSignQueryInfo;
|
|
|
-import com.ym.mec.biz.dal.page.TeacherPaymentRecordInfo;
|
|
|
-import com.ym.mec.biz.service.MusicGroupStudentFeeService;
|
|
|
-import com.ym.mec.biz.service.OrganizationService;
|
|
|
-import com.ym.mec.biz.service.StudentCourseHomeworkService;
|
|
|
-import com.ym.mec.biz.service.StudentManageService;
|
|
|
-import com.ym.mec.biz.service.StudentRegistrationService;
|
|
|
-import com.ym.mec.biz.service.StudentService;
|
|
|
-import com.ym.mec.common.controller.BaseController;
|
|
|
-import com.ym.mec.common.entity.HttpResponseResult;
|
|
|
-import com.ym.mec.common.exception.BizException;
|
|
|
-import com.ym.mec.common.page.PageInfo;
|
|
|
-import com.ym.mec.common.page.QueryInfo;
|
|
|
+import java.util.*;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
@Api(tags = "学生管理")
|
|
|
@RestController
|
|
@@ -70,8 +31,6 @@ public class StudentManageController extends BaseController {
|
|
|
@Autowired
|
|
|
private StudentManageService studentManageService;
|
|
|
@Autowired
|
|
|
- private SysUserFeignService sysUserFeignService;
|
|
|
- @Autowired
|
|
|
private StudentRegistrationService studentRegistrationService;
|
|
|
@Autowired
|
|
|
private MusicGroupStudentFeeService musicGroupStudentFeeService;
|
|
@@ -82,8 +41,6 @@ public class StudentManageController extends BaseController {
|
|
|
@Autowired
|
|
|
private StudentService studentService;
|
|
|
|
|
|
- private final Logger LOGGER = LoggerFactory.getLogger(this.getClass());
|
|
|
-
|
|
|
@ApiOperation(value = "获取学生请假异常列表")
|
|
|
@GetMapping("/queryStudentErrorLeaveList")
|
|
|
@PreAuthorize("@pcs.hasPermissions('studentManage/queryStudentErrorLeaveList')")
|
|
@@ -116,6 +73,14 @@ public class StudentManageController extends BaseController {
|
|
|
return succeed(studentManageService.queryStudent(queryInfo));
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "获取学生列表(基本信息)")
|
|
|
+ @GetMapping("/queryStudentBasicInfo")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('studentManage/queryStudentBasicInfo')")
|
|
|
+ public Object queryStudentBasicInfo(UserBasicQueryInfo queryInfo){
|
|
|
+ queryInfo.setOrganId(organizationService.getEmployeeOrgan(queryInfo.getOrganId()));
|
|
|
+ return succeed(studentService.queryStudentBasicInfo(queryInfo));
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation(value = "获取61活动学生列表")
|
|
|
@GetMapping("/queryChildrenDayStudentList")
|
|
|
@PreAuthorize("@pcs.hasPermissions('studentManage/queryChildrenDayStudentList')")
|
|
@@ -128,10 +93,6 @@ public class StudentManageController extends BaseController {
|
|
|
@PostMapping("/updateChildrenDayStudent")
|
|
|
@PreAuthorize("@pcs.hasPermissions('studentManage/updateChildrenDayStudent')")
|
|
|
public Object updateChildrenDayStudent(ActivityCourseDetailDto activityCourseDetailDto){
|
|
|
- SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
- if (sysUser == null) {
|
|
|
- return failed("用户信息获取失败");
|
|
|
- }
|
|
|
studentManageService.updateChildrenDayStudent(activityCourseDetailDto);
|
|
|
return succeed();
|
|
|
}
|
|
@@ -289,11 +250,6 @@ public class StudentManageController extends BaseController {
|
|
|
@PostMapping(value = "/updateStudentFee")
|
|
|
@PreAuthorize("@pcs.hasPermissions('studentManage/updateStudentFee')")
|
|
|
public Object updateStudentFee(UpdateStudentFeeDto studentFeeDto) {
|
|
|
- SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
- if(sysUser == null){
|
|
|
- throw new BizException("用户信息获取失败");
|
|
|
- }
|
|
|
- LOGGER.info("修改学员缴费金额和缴费周期,user:{},参数:{}",sysUser.getId(),studentFeeDto);
|
|
|
musicGroupStudentFeeService.updateStudentFee(studentFeeDto);
|
|
|
return succeed();
|
|
|
}
|
|
@@ -305,11 +261,6 @@ public class StudentManageController extends BaseController {
|
|
|
@PostMapping(value = "/updateStudentFeeIsLock")
|
|
|
@PreAuthorize("@pcs.hasPermissions('studentManage/updateStudentFeeIsLock')")
|
|
|
public Object updateStudentFeeIsLock(UpdateStudentFeeDto studentFeeDto) {
|
|
|
- SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
- if(sysUser == null){
|
|
|
- throw new BizException("用户信息获取失败");
|
|
|
- }
|
|
|
- LOGGER.info("修改学员缴费周期锁定状态,user:{},参数:{}",sysUser.getId(),studentFeeDto);
|
|
|
musicGroupStudentFeeService.updateStudentFeeIsLock(studentFeeDto);
|
|
|
return succeed();
|
|
|
}
|
|
@@ -324,10 +275,6 @@ public class StudentManageController extends BaseController {
|
|
|
if(studentId == null || StringUtils.isEmpty(musicGroupId)){
|
|
|
throw new BizException("参数校验异常");
|
|
|
}
|
|
|
- SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
- if(sysUser == null){
|
|
|
- throw new BizException("用户信息获取失败");
|
|
|
- }
|
|
|
return succeed(musicGroupStudentFeeService.findByUser(studentId,musicGroupId));
|
|
|
}
|
|
|
|
|
@@ -338,10 +285,6 @@ public class StudentManageController extends BaseController {
|
|
|
@GetMapping(value = "/findStudentCourseHomeworks")
|
|
|
@PreAuthorize("@pcs.hasPermissions('studentManage/findStudentCourseHomeworks')")
|
|
|
public Object findStudentCourseHomeworks(QueryInfo queryInfo) {
|
|
|
- SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
- if(sysUser == null){
|
|
|
- throw new BizException("用户信息获取失败");
|
|
|
- }
|
|
|
return succeed(studentCourseHomeworkService.findStudentCourseHomeworks(queryInfo));
|
|
|
}
|
|
|
|
|
@@ -352,10 +295,6 @@ public class StudentManageController extends BaseController {
|
|
|
@GetMapping(value = "/sumStudentAttendance")
|
|
|
@PreAuthorize("@pcs.hasPermissions('studentManage/sumStudentAttendance')")
|
|
|
public Object sumStudentAttendance(Integer courseScheduleId) {
|
|
|
- SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
- if(sysUser == null){
|
|
|
- throw new BizException("用户信息获取失败");
|
|
|
- }
|
|
|
return succeed(studentManageService.sumStudentAttendance(courseScheduleId));
|
|
|
}
|
|
|
|