| | |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入attendance") |
| | | public R<IPage<AttendanceVO>> page(AttendanceVO attendance, Query query, Long department) { |
| | | IPage<Attendance> pages = attendanceService.selectAttendancePage(Condition.getPage(query), department, attendance); |
| | | return R.data(AttendanceWrapper.build().pageVO(pages)); |
| | | public R<IPage<AttendanceVO>> page(AttendanceVO attendance, Query query) { |
| | | IPage<AttendanceVO> pages = attendanceService.selectAttendancePage(Condition.getPage(query), attendance); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | // /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 导出用户 |
| | | * 导出考勤数据 |
| | | * @param response |
| | | * @param attendance |
| | | */ |
| | | @GetMapping("/export-Attendance") |
| | | public void exportAttendane(String name, String beginTime, String endTime, String attendancetype, HttpServletResponse response) { |
| | | String beginTimes = null; |
| | | String endTimes = null; |
| | | String attendancetypes = null; |
| | | if (beginTime.equals("undefined ") && endTime.equals("undefined")) { |
| | | beginTimes=null; |
| | | endTimes=null; |
| | | attendancetypes=attendancetype; |
| | | } |
| | | else if (attendancetype.equals("undefined")){ |
| | | attendancetypes=null; |
| | | } |
| | | else { |
| | | beginTimes=beginTime; |
| | | endTimes=endTime; |
| | | attendancetypes=attendancetype; |
| | | } |
| | | |
| | | List<AttendanceExcel> list = attendanceService.exportAttendane(name, beginTimes, endTimes, attendancetypes); |
| | | public void exportAttendane(AttendanceVO attendance, HttpServletResponse response) { |
| | | List<AttendanceExcel> list = attendanceService.exportAttendane(attendance); |
| | | ExcelUtil.export(response, "考勤数据" + DateUtil.time(), "考勤数据表", list, AttendanceExcel.class); |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | } |