| | |
| | | |
| | | @GetMapping("/page") |
| | | @Operation(summary = "获得薪酬核算分页") |
| | | @PreAuthorize("@ss.hasPermission('hrm:salary:query')") |
| | | public CommonResult<PageResult<HrmSalaryCalculationRespVO>> getSalaryCalculationPage(@Valid HrmSalaryCalculationPageReqVO pageReqVO) { |
| | | PageResult<HrmSalaryCalculationDO> pageResult = salaryCalculationService.getSalaryCalculationPage(pageReqVO); |
| | | // 转换为 VO |
| | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "获得薪酬核算") |
| | | @Parameter(name = "id", description = "核算ID", required = true) |
| | | @PreAuthorize("@ss.hasPermission('hrm:salary:query')") |
| | | public CommonResult<HrmSalaryCalculationRespVO> getSalaryCalculation(@RequestParam("id") Long id) { |
| | | HrmSalaryCalculationDO salaryCalculation = salaryCalculationService.getSalaryCalculation(id); |
| | | if (salaryCalculation == null) { |
| | |
| | | |
| | | @GetMapping("/export-excel") |
| | | @Operation(summary = "导出薪酬核算 Excel") |
| | | @PreAuthorize("@ss.hasPermission('hrm:salary:export')") |
| | | @PreAuthorize("@ss.hasAnyPermissions('hrm:salary:export', 'hrm:salary-calculation:export')") |
| | | @ApiAccessLog(operateType = EXPORT) |
| | | public void exportSalaryCalculationExcel(@Valid HrmSalaryCalculationPageReqVO pageReqVO, |
| | | HttpServletResponse response) throws IOException { |
| | |
| | | @Operation(summary = "预览部门下所有员工的薪资核算信息") |
| | | @Parameter(name = "period", description = "核算周期", required = true, example = "2024-01") |
| | | @Parameter(name = "deptId", description = "部门ID,为空则查询全部", example = "1") |
| | | @PreAuthorize("@ss.hasPermission('hrm:salary:query')") |
| | | public CommonResult<List<HrmSalaryCalculationRespVO>> previewSalaryCalculation( |
| | | @RequestParam("period") String period, |
| | | @RequestParam(value = "deptId", required = false) Long deptId) { |
| | |
| | | return success(true); |
| | | } |
| | | |
| | | } |
| | | } |