| | |
| | | /** |
| | | * 查询考勤信息 |
| | | */ |
| | | List<StuStudent> findAttendanceList(Integer limit, Integer pageNum, String keyword); |
| | | List<StuStudent> findAttendanceList(Integer limit, Integer pageNum, String keyword, String subjectId); |
| | | |
| | | /** |
| | | *修改打卡状态 |
| | | */ |
| | | Result updateAttendanceStatus(String studentId, String attendanceStatus); |
| | | |
| | | int findAttendanceListCount(String keyword); |
| | | int findAttendanceListCount(String keyword, String subjectId); |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<StuStudent> findAttendanceList(Integer limit, Integer pageNum, String keyword) { |
| | | StringBuffer hql=new StringBuffer("from StuStudent where name like ? and deleteFlag is false"); |
| | | public List<StuStudent> findAttendanceList(Integer limit, Integer pageNum, String keyword, String subjectId) { |
| | | StringBuffer hql=new StringBuffer("from StuStudent where name like ? and subjectId = ? and deleteFlag is false"); |
| | | |
| | | List<Object> args = CollectionUtils.newList(keyword + "%"); |
| | | List<Object> args = CollectionUtils.newList(keyword + "%",subjectId); |
| | | |
| | | hql.append(" order by createTime desc"); |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public int findAttendanceListCount(String keyword) { |
| | | StringBuffer hql=new StringBuffer("from StuStudent where name like ? and deleteFlag is false"); |
| | | public int findAttendanceListCount(String keyword, String subjectId) { |
| | | StringBuffer hql=new StringBuffer("from StuStudent where name like ? and subjectId = ? and deleteFlag is false"); |
| | | |
| | | List<Object> args = CollectionUtils.newList(keyword + "%"); |
| | | List<Object> args = CollectionUtils.newList(keyword + "%",subjectId); |
| | | |
| | | return findCount(hql.toString(),args); |
| | | } |
| | |
| | | |
| | | @ApiOperation(value = "考勤信息", notes = "") |
| | | @GetMapping(value = "/attendanceList") |
| | | public Result attendanceList(@RequestParam(defaultValue = "10") Integer limit, @RequestParam(defaultValue = "1") Integer pageNum, String keyword) { |
| | | public Result attendanceList(@RequestParam(defaultValue = "10") Integer limit, @RequestParam(defaultValue = "1") Integer pageNum, String keyword, String subjectId) { |
| | | |
| | | List<StuStudent> attendanceList = attendanceService.findAttendanceList(limit, pageNum, keyword); |
| | | List<StuStudent> attendanceList = attendanceService.findAttendanceList(limit, pageNum, keyword,subjectId); |
| | | |
| | | int count = attendanceService.findAttendanceListCount(keyword); |
| | | int count = attendanceService.findAttendanceListCount(keyword,subjectId); |
| | | |
| | | |
| | | return new Result(true,"success", CollectionUtils.newObjectMap("attendanceList", |