| | |
| | | package com.qxueyou.scc.controller; |
| | | |
| | | import com.qxueyou.scc.admin.classes.model.ClsClass; |
| | | import com.qxueyou.scc.admin.schoolRoll.ISchoolRollService; |
| | | import com.qxueyou.scc.base.model.Pager; |
| | | import com.qxueyou.scc.base.model.Result; |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 学籍管理控制器 |
| | | * 学籍管理控制器 |
| | | * |
| | | * @author hurenrong |
| | | */ |
| | | @Api(tags="学籍管理接口") |
| | | @Api(tags="学籍管理接口") |
| | | @RestController |
| | | @RequestMapping("/admin/schoolRoller") |
| | | public class SchoolRollController { |
| | |
| | | private ISchoolRollService iSchoolRollService; |
| | | |
| | | /** |
| | | * 获取正常学员列表 |
| | | * 获取正常学员列表 |
| | | * |
| | | * @param keyword |
| | | * @param limit |
| | | * @param pageNum |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "获取正常班级列表", notes = "") |
| | | @ApiOperation(value = "获取学籍列表", notes = "") |
| | | @GetMapping(value = "/schoolList") |
| | | public Result schoolList(@RequestParam(defaultValue = "10") Integer limit, @RequestParam(defaultValue = "1") Integer pageNum,String keyword,String status) { |
| | | |
| | |
| | | |
| | | return new Result(true,"success", CollectionUtils.newObjectMap("schoolRollList", |
| | | QBeanUtils.listBean2ListMap(schoolRollList, |
| | | CollectionUtils.newStringMap("name", "studentName", "studentNo", "studentNo","sex","sex", "status", |
| | | "status", "createTime", "createTime")), |
| | | CollectionUtils.newStringMap("name", "studentName","studentId","studentId", "studentNo", "studentNo","sex","sex", "status", |
| | | "status", "createTime", "createTime","mobilePhone","mobilePhone","studentNumber","studentNumber")), |
| | | "schoolrollCount", count)); |
| | | } |
| | | |
| | | /** |
| | | * 给学员分配班级 |
| | | * |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "给学员分配班级", notes = "") |
| | | @GetMapping(value = "/updateSchoolClass") |
| | | public Result updateSchoolClass(String [] studentIds,String classId) { |
| | | return iSchoolRollService.updateSchool(studentIds, classId); |
| | | } |
| | | |
| | | /** |
| | | * 审核学员并生成学号 |
| | | * |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "审核学员并生成学号", notes = "") |
| | | @GetMapping(value = "/auditStudent") |
| | | public Result auditStudent(String studentIds) { |
| | | return iSchoolRollService.loopStudentIds(studentIds.split(",")); |
| | | } |
| | | |
| | | /** |
| | | * 导出学员信息 |
| | | * |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "导出学员信息", notes = "") |
| | | @GetMapping(value = "/deriveStudentMessage") |
| | | public void deriveStudentMessage(String StudentId,String ClassId) { |
| | | iSchoolRollService.deriveStudentMessage(); |
| | | } |
| | | |
| | | /** |
| | | * 查询班级 |
| | | * |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "查询班级", notes = "") |
| | | @GetMapping(value = "/findClass") |
| | | public Result findClass() { |
| | | List<ClsClass> aClass = iSchoolRollService.findClass(); |
| | | return new Result(true,"success",CollectionUtils.newObjectMap("schoolRollList", QBeanUtils.listBean2ListMap(aClass, |
| | | CollectionUtils.newStringMap("name","classname","classId","classId")) |
| | | )); |
| | | } |
| | | |
| | | } |