| | |
| | | |
| | | @PostMapping("/create") |
| | | @Operation(summary = "创建员工社保公积金档案") |
| | | @PreAuthorize("@ss.hasPermission('hrm:social-security:create')") |
| | | @PreAuthorize("@ss.hasPermission('hrm:employee-social-security:create')") |
| | | public CommonResult<Long> createEmployeeSocialSecurity(@Valid @RequestBody HrmEmployeeSocialSecuritySaveReqVO createReqVO) { |
| | | HrmEmployeeSocialSecurityDO socialSecurity = BeanUtils.toBean(createReqVO, HrmEmployeeSocialSecurityDO.class); |
| | | return success(employeeSocialSecurityService.createEmployeeSocialSecurity(socialSecurity)); |
| | |
| | | |
| | | @PutMapping("/update") |
| | | @Operation(summary = "更新员工社保公积金档案") |
| | | @PreAuthorize("@ss.hasPermission('hrm:social-security:update')") |
| | | @PreAuthorize("@ss.hasPermission('hrm:employee-social-security:update')") |
| | | public CommonResult<Boolean> updateEmployeeSocialSecurity(@Valid @RequestBody HrmEmployeeSocialSecuritySaveReqVO updateReqVO) { |
| | | HrmEmployeeSocialSecurityDO socialSecurity = BeanUtils.toBean(updateReqVO, HrmEmployeeSocialSecurityDO.class); |
| | | employeeSocialSecurityService.updateEmployeeSocialSecurity(socialSecurity); |
| | |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary = "删除员工社保公积金档案") |
| | | @Parameter(name = "id", description = "档案ID", required = true) |
| | | @PreAuthorize("@ss.hasPermission('hrm:social-security:delete')") |
| | | @PreAuthorize("@ss.hasPermission('hrm:employee-social-security:delete')") |
| | | public CommonResult<Boolean> deleteEmployeeSocialSecurity(@RequestParam("id") Long id) { |
| | | employeeSocialSecurityService.deleteEmployeeSocialSecurity(id); |
| | | return success(true); |
| | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "获取员工社保公积金档案") |
| | | @Parameter(name = "id", description = "档案ID", required = true) |
| | | @PreAuthorize("@ss.hasPermission('hrm:social-security:query')") |
| | | @PreAuthorize("@ss.hasPermission('hrm:employee-social-security:query')") |
| | | public CommonResult<HrmEmployeeSocialSecurityRespVO> getEmployeeSocialSecurity(@RequestParam("id") Long id) { |
| | | HrmEmployeeSocialSecurityDO socialSecurity = employeeSocialSecurityService.getEmployeeSocialSecurity(id); |
| | | if (socialSecurity == null) { |
| | |
| | | |
| | | @GetMapping("/page") |
| | | @Operation(summary = "获取员工社保公积金档案分页") |
| | | @PreAuthorize("@ss.hasPermission('hrm:social-security:query')") |
| | | @PreAuthorize("@ss.hasPermission('hrm:employee-social-security:query')") |
| | | public CommonResult<PageResult<HrmEmployeeSocialSecurityRespVO>> getEmployeeSocialSecurityPage( |
| | | @Valid HrmEmployeeSocialSecurityPageReqVO pageReqVO) { |
| | | PageResult<HrmEmployeeSocialSecurityDO> pageResult = employeeSocialSecurityService.getEmployeeSocialSecurityPage(pageReqVO); |
| | |
| | | @GetMapping("/list-by-user") |
| | | @Operation(summary = "获取员工社保公积金档案历史列表") |
| | | @Parameter(name = "userId", description = "系统用户ID", required = true) |
| | | @PreAuthorize("@ss.hasPermission('hrm:social-security:query')") |
| | | @PreAuthorize("@ss.hasPermission('hrm:employee-social-security:query')") |
| | | public CommonResult<List<HrmEmployeeSocialSecurityRespVO>> getEmployeeSocialSecurityList( |
| | | @RequestParam("userId") Long userId) { |
| | | List<HrmEmployeeSocialSecurityDO> list = employeeSocialSecurityService.getEmployeeSocialSecurityList(userId); |
| | |
| | | @GetMapping("/get-latest") |
| | | @Operation(summary = "获取员工最新生效的社保公积金档案") |
| | | @Parameter(name = "userId", description = "系统用户ID", required = true) |
| | | @PreAuthorize("@ss.hasPermission('hrm:social-security:query')") |
| | | @PreAuthorize("@ss.hasPermission('hrm:employee-social-security:query')") |
| | | public CommonResult<HrmEmployeeSocialSecurityRespVO> getLatestEmployeeSocialSecurity( |
| | | @RequestParam("userId") Long userId) { |
| | | HrmEmployeeSocialSecurityDO socialSecurity = employeeSocialSecurityService.getLatestEmployeeSocialSecurity(userId); |