| | |
| | | import doumeemes.core.model.PageWrap; |
| | | import doumeemes.core.model.PageData; |
| | | import doumeemes.dao.business.model.SalaryParam; |
| | | import doumeemes.dao.business.vo.SalaryParamVO; |
| | | import doumeemes.dao.ext.dto.SalaryParamDTO; |
| | | import doumeemes.service.business.SalaryParamService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | @PreventRepeat |
| | | @ApiOperation("新建") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:salaryparam:create") |
| | | // @RequiresPermissions("business:salaryparam:create") |
| | | public ApiResponse create(@RequestBody SalaryParam salaryParam) { |
| | | return ApiResponse.success(salaryParamService.create(salaryParam)); |
| | | } |
| | |
| | | |
| | | @ApiOperation("分页查询") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:salaryparam:query") |
| | | public ApiResponse<PageData<SalaryParam>> findPage (@RequestBody PageWrap<SalaryParam> pageWrap) { |
| | | // @RequiresPermissions("business:salaryparam:query") |
| | | public ApiResponse<PageData<SalaryParamVO>> findPage (@RequestBody PageWrap<SalaryParamDTO> pageWrap) { |
| | | return ApiResponse.success(salaryParamService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导出Excel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:salaryparam:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<SalaryParam> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(SalaryParam.class).export(salaryParamService.findPage(pageWrap).getRecords(), "设置类-绩效工资配置表", response); |
| | | public void exportExcel (@RequestBody PageWrap<SalaryParamDTO> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(SalaryParamVO.class).export(salaryParamService.findPage(pageWrap).getRecords(), "设置类-绩效工资配置表", response); |
| | | } |
| | | |
| | | @ApiOperation("根据ID查询") |