| | |
| | | @ApiOperation(value = "人员基本信息增加") |
| | | @PostMapping |
| | | @PreAuthorize("hasAuthority('empBaseinfo:add')") |
| | | public void addEmpBaseInfo( MultipartFile file,@Valid EmpBaseInfo empBaseinfo) throws FebsException { |
| | | public void addEmpBaseInfo(@Valid EmpBaseInfo empBaseinfo) throws FebsException { |
| | | if(this.empBaseInfoService.verifyEmpNumb(empBaseinfo)){ |
| | | throw new FebsException("已存在此员工编号"); |
| | | } |
| | | try { |
| | | //EmpBaseInfo tempInfo = this.empBaseInfoService. |
| | | this.empBaseInfoService.createEmpBaseInfo(empBaseinfo); |
| | | } catch (Exception e) { |
| | | String message = "新增员工基本信息失败"; |
| | |
| | | @ApiOperation(value = "人员基本信息修改") |
| | | @PutMapping |
| | | @PreAuthorize("hasAuthority('empBaseinfo:update')") |
| | | public void updateEmpBaseInfo(MultipartFile file,@Valid EmpBaseInfo empBaseinfo) throws FebsException { |
| | | public void updateEmpBaseInfo(@Valid EmpBaseInfo empBaseinfo) throws FebsException { |
| | | if(this.empBaseInfoService.verifyEmpNumb(empBaseinfo)){ |
| | | throw new FebsException("已存在此员工编号:" + empBaseinfo.getEmpNumb()); |
| | | } |
| | |
| | | throw new FebsException(message); |
| | | } |
| | | } |
| | | |
| | | @GetMapping("image/{empId}") |
| | | public void getImage(@PathVariable String empId, HttpServletResponse response) throws FebsException { |
| | | try { |
| | | this.empBaseInfoService.getImage(empId,response); |
| | | } catch (Exception e) { |
| | | String message = "获取员工图片异常"; |
| | | log.error(message, e); |
| | | throw new FebsException(message); |
| | | } |
| | | |
| | | } |
| | | } |