| | |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.Map; |
| | |
| | | } |
| | | } |
| | | |
| | | @PostMapping("/mvFiles") |
| | | @PreAuthorize("hasAuthority('empAccessory:mv')") |
| | | public void mvFiles(@NotBlank(message = "{required}") String accessoryids,@NotNull(message = "{required}") Long labelid,@NotNull(message = "{required}") Long empId) throws FebsException { |
| | | try { |
| | | this.empAccessoryService.mvFiles(accessoryids,labelid,empId); |
| | | } catch (Exception e) { |
| | | String message = "移动文件失败"; |
| | | log.error(message, e); |
| | | throw new FebsException(message); |
| | | } |
| | | } |
| | | @PostMapping("/singledownload") |
| | | @PreAuthorize("hasAuthority('empAccessory:singledownload')") |
| | | public void singledownload(@NotBlank(message = "{required}") String empIds, @NotNull(message = "{required}") Long labelid, HttpServletRequest request, HttpServletResponse response) throws FebsException { |
| | | try { |
| | | this.empAccessoryService.singledownload(empIds,labelid,request,response); |
| | | } catch (Exception e) { |
| | | String message = "下载文件失败"; |
| | | log.error(message, e); |
| | | throw new FebsException(message); |
| | | } |
| | | } |
| | | @GetMapping("{labelid}") |
| | | @PreAuthorize("hasAuthority('empAccessory:delete')") |
| | | public FebsResponse getLabelCount(@PathVariable(value = "labelid") String labelid) throws FebsException { |
| | | try { |
| | | return new FebsResponse().data(empAccessoryService.getLabelCount(Long.valueOf(labelid))); |
| | | } catch (Exception e) { |
| | | String message = "修改Label失败"; |
| | | log.error(message, e); |
| | | throw new FebsException(message); |
| | | } |
| | | } |
| | | } |