| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | throw new FebsException("已存在此身份证号:" + empBaseinfo.getCertificateNumb()); |
| | | } |
| | | try { |
| | | empBaseinfo.setEntryType("20"); |
| | | this.empBaseInfoService.createEmpBaseInfo(empBaseinfo); |
| | | } catch (Exception e) { |
| | | String message = "新增员工基本信息失败"; |
| | |
| | | |
| | | @ApiOperation(value = "人员基本信息逻辑删除") |
| | | @DeleteMapping("{ids}") |
| | | @PreAuthorize("hasAuthority('empBaseinfo:delete')") |
| | | public void logicDeleteEmpBaseInfo(@NotBlank(message = "{required}") @PathVariable("ids") String ids) throws FebsException { |
| | | try { |
| | | this.empBaseInfoService.logicDelEmpBaseInfo(ids); |
| | |
| | | |
| | | @ApiOperation(value = "关闭员工档案") |
| | | @PostMapping("dimission") |
| | | @PreAuthorize("hasAuthority('empBaseinfo:dimission')") |
| | | public void dimissionEmp(EmpDimissionLog empDimissionLog) throws FebsException { |
| | | try { |
| | | this.empBaseInfoService.closeEmpArchives(empDimissionLog); |
| | |
| | | } |
| | | @ApiOperation(value = "员工岗位变更") |
| | | @PostMapping("jobChange") |
| | | @PreAuthorize("hasAuthority('empBaseinfo:jobChange')") |
| | | public void changeEmpJob(EmpJobChange empJobChange) throws FebsException { |
| | | try { |
| | | this.empBaseInfoService.changeEmpJob(empJobChange); |