| | |
| | | |
| | | @GetMapping("/page") |
| | | @Operation(summary = "获得考勤统计汇总分页") |
| | | @PreAuthorize("@ss.hasPermission('hrm:attendance:query')") |
| | | @PreAuthorize("@ss.hasPermission('hrm:attendance-summary:query')") |
| | | public CommonResult<PageResult<HrmAttendanceSummaryRespVO>> getAttendanceSummaryPage(@Valid HrmAttendanceSummaryPageReqVO pageReqVO) { |
| | | PageResult<HrmAttendanceSummaryDO> pageResult = attendanceSummaryService.getAttendanceSummaryPage(pageReqVO); |
| | | List<HrmAttendanceSummaryRespVO> list = BeanUtils.toBean(pageResult.getList(), HrmAttendanceSummaryRespVO.class); |
| | |
| | | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "获得员工月度考勤汇总") |
| | | @PreAuthorize("@ss.hasPermission('hrm:attendance:query')") |
| | | @PreAuthorize("@ss.hasPermission('hrm:attendance-summary:query')") |
| | | public CommonResult<HrmAttendanceSummaryRespVO> getMonthlySummary( |
| | | @RequestParam("userId") Long userId, |
| | | @RequestParam("yearMonth") String yearMonth) { |
| | |
| | | @PostMapping("/generate") |
| | | @Operation(summary = "生成月度考勤汇总") |
| | | @Parameter(name = "yearMonth", description = "年月,格式:yyyy-MM", required = true) |
| | | @PreAuthorize("@ss.hasPermission('hrm:attendance:calculate')") |
| | | @PreAuthorize("@ss.hasPermission('hrm:attendance-summary:generate')") |
| | | public CommonResult<Boolean> generateMonthlySummary(@RequestParam("yearMonth") String yearMonth, |
| | | @RequestParam(value = "deptId", required = false) Long deptId, |
| | | @RequestParam(value = "userId", required = false) Long userId) { |
| | |
| | | |
| | | @GetMapping("/export-excel") |
| | | @Operation(summary = "导出考勤统计汇总 Excel") |
| | | @PreAuthorize("@ss.hasPermission('hrm:attendance:export')") |
| | | @PreAuthorize("@ss.hasPermission('hrm:attendance-summary:export')") |
| | | @ApiAccessLog(operateType = EXPORT) |
| | | public void exportAttendanceSummaryExcel(@Valid HrmAttendanceSummaryPageReqVO pageReqVO, |
| | | HttpServletResponse response) throws IOException { |