| | |
| | | package com.qxueyou.scc.controller; |
| | | |
| | | import com.qxueyou.scc.admin.studentFiles.StudentFilesService; |
| | | import com.qxueyou.scc.base.model.Pager; |
| | | import com.qxueyou.scc.base.model.Result; |
| | | import com.qxueyou.scc.base.util.CollectionUtils; |
| | | import com.qxueyou.scc.base.util.QBeanUtils; |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | 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 java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Api(tags="学生档案管理接口") |
| | | @RestController |
| | |
| | | private StudentFilesService studentFilesService; |
| | | @ApiOperation(value = "学生档案", notes = "") |
| | | @GetMapping(value = "/studentFilesList") |
| | | public Result studentFilesList(String classId, @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "") String keyword) { |
| | | public Result studentFilesList(@RequestParam(defaultValue = "10") Integer limit, @RequestParam(defaultValue = "1") Integer pageNum, String keyword, String classId) { |
| | | |
| | | List<Map<String, Object>> students = studentFilesService.getStudentLst(classId, keyword, new Pager(limit, pageNum)); |
| | | int studentCount = studentFilesService.getStudentsCount(classId, keyword); |
| | | List<StuStudent> stuStudents = studentFilesService.findStudentFiles(limit, pageNum, keyword,classId); |
| | | |
| | | return new Result(true, "success", |
| | | CollectionUtils.newObjectMap("studentCount", studentCount, "studentLst", students)); |
| | | } |
| | | int count = studentFilesService.findfindStudentFilesListCount(keyword,classId); |
| | | |
| | | @ApiOperation(value = "学生评语", notes = "") |
| | | @PostMapping(value = "/studentCommentAddAndUp") |
| | | public String studentCommentAddAndUp(String[] studentIds, String comment) { |
| | | return studentFilesService.studentCommentAddAndUp(studentIds,comment); |
| | | return new Result(true,"success", CollectionUtils.newObjectMap("attendanceList", |
| | | QBeanUtils.listBean2ListMap(stuStudents, |
| | | CollectionUtils.newStringMap("name", "studentName","studentId","studentId", "studentNo", "studentNo","sex","sex", "status", "status", "createTime", "createTime","mobilePhone","mobilePhone","studentNumber","studentNumber","photo","photo","passporName","passporName","nationality","nationality","ancestralHome","ancestralHome","birthday","birthday","birthplace","birthplace","chinaStatus","chinaStatus","registeredAddress","registeredAddress","homeAddress","homeAddress","religiousBelief","religiousBelief","email","email","workUnit","workUnit","graduationDestination","graduationDestination","attendanceStatus", "attendanceStatus")), |
| | | "attendanceCount", count)); |
| | | } |
| | | } |