| | |
| | | private final IEmpAccessoryService empAccessoryService; |
| | | |
| | | @GetMapping |
| | | @PreAuthorize("hasAuthority('empAccessory:list')") |
| | | public FebsResponse getAllEmpAccessorys(EmpAccessory empAccessory) { |
| | | return new FebsResponse().data(empAccessoryService.findEmpAccessorys(empAccessory)); |
| | | } |
| | |
| | | } |
| | | |
| | | @PostMapping |
| | | @PreAuthorize("hasAuthority('empAccessory:add')") |
| | | public void addEmpAccessory(@NotNull(message = "{required}") Long labelid,@NotNull(message = "{required}") Long empId, MultipartFile file) throws FebsException { |
| | | try { |
| | | this.empAccessoryService.createEmpAccessory(labelid,file,empId); |
| | |
| | | } catch (Exception e) { |
| | | String message = "修改EmpAccessory失败"; |
| | | log.error(message, e); |
| | | throw new FebsException(message); |
| | | throw new FebsException(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | |
| | | throw new FebsException(message); |
| | | } |
| | | } |
| | | |
| | | |
| | | @PostMapping("autoInstall") |
| | | public void autoInstall( String fileids) throws FebsException { |
| | | try { |
| | | this.empAccessoryService.autoInstall(fileids); |
| | | } catch (Exception e) { |
| | | String message = "插入文件失败"; |
| | | log.error(message, e); |
| | | throw new FebsException(message); |
| | | } |
| | | } |
| | | } |