| | |
| | | @PostMapping("addInEmp") |
| | | @PreAuthorize("hasAuthority('empBaseinfo:add')") |
| | | public FebsResponse addInEmpBaseInfo(@Valid EmpBaseInfo empBaseinfo) throws FebsException { |
| | | if(this.empBaseInfoService.verifyEmpNumb(empBaseinfo)){ |
| | | throw new FebsException("已存在此员工编号:" + empBaseinfo.getEmpNumb()); |
| | | } |
| | | if(this.empBaseInfoService.verifyCertificateNumb(empBaseinfo)){ |
| | | throw new FebsException("已存在此身份证号:" + empBaseinfo.getCertificateNumb()); |
| | | } |
| | | try { |
| | | return new FebsResponse().data(empBaseInfoService.addInEmpBaseInfo(empBaseinfo)); |
| | | } catch (Exception e) { |