| | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "获取个税税率配置") |
| | | @Parameter(name = "id", description = "配置ID", required = true) |
| | | @PreAuthorize("@ss.hasPermission('hrm:tax-rate:query')") |
| | | public CommonResult<HrmTaxRateConfigRespVO> getTaxRateConfig(@RequestParam("id") Long id) { |
| | | HrmTaxRateConfigDO config = taxRateConfigService.getTaxRateConfig(id); |
| | | return success(BeanUtils.toBean(config, HrmTaxRateConfigRespVO.class)); |
| | |
| | | |
| | | @GetMapping("/list") |
| | | @Operation(summary = "获取个税税率配置列表") |
| | | @PreAuthorize("@ss.hasPermission('hrm:tax-rate:query')") |
| | | public CommonResult<List<HrmTaxRateConfigRespVO>> getTaxRateConfigList() { |
| | | List<HrmTaxRateConfigDO> list = taxRateConfigService.getTaxRateConfigList(); |
| | | return success(BeanUtils.toBean(list, HrmTaxRateConfigRespVO.class)); |
| | |
| | | @GetMapping("/get-effective") |
| | | @Operation(summary = "获取生效的个税税率配置列表(按级数排序)") |
| | | @Parameter(name = "effectiveDate", description = "生效日期", required = true) |
| | | @PreAuthorize("@ss.hasPermission('hrm:tax-rate:query')") |
| | | public CommonResult<List<HrmTaxRateConfigRespVO>> getEffectiveTaxRateConfigList( |
| | | @RequestParam("effectiveDate") LocalDate effectiveDate) { |
| | | List<HrmTaxRateConfigDO> list = taxRateConfigService.getEffectiveTaxRateConfigList(effectiveDate); |
| | |
| | | .taxRate(new BigDecimal("3")).quickDeduction(new BigDecimal("0")).status(0).remark("").build() |
| | | ); |
| | | // 输出 |
| | | ExcelUtils.write(response, "个税税率配置导入模板.xls", "个税税率配置列表", |
| | | ExcelUtils.writeTemplate(response, "个税税率配置导入模板.xls", "个税税率配置列表", |
| | | HrmTaxRateConfigImportExcelVO.class, list); |
| | | } |
| | | |