|  |  | 
 |  |  |     @ApiOperation("新建") | 
 |  |  |     @PostMapping("/create") | 
 |  |  |     @CloudRequiredPermission("business:ywoutinbound:create") | 
 |  |  |     public ApiResponse create(@RequestBody YwOutinbound ywOutinbound) { | 
 |  |  |     public ApiResponse create(@RequestBody YwOutinbound ywOutinbound,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
 |  |  |         ywOutinbound.setLoginUserInfo(this.getLoginUser(token)); | 
 |  |  |         return ApiResponse.success(ywOutinboundService.create(ywOutinbound)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @ApiOperation("根据ID删除") | 
 |  |  |     @GetMapping("/delete/{id}") | 
 |  |  |     @CloudRequiredPermission("business:ywoutinbound:delete") | 
 |  |  |     public ApiResponse deleteById(@PathVariable Integer id) { | 
 |  |  |     public ApiResponse deleteById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
 |  |  |         ywOutinboundService.deleteById(id); | 
 |  |  |         return ApiResponse.success(null); | 
 |  |  |     } | 
 |  |  | 
 |  |  |     @ApiOperation("批量删除") | 
 |  |  |     @GetMapping("/delete/batch") | 
 |  |  |     @CloudRequiredPermission("business:ywoutinbound:delete") | 
 |  |  |     public ApiResponse deleteByIdInBatch(@RequestParam String ids) { | 
 |  |  |     public ApiResponse deleteByIdInBatch(@RequestParam String ids,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
 |  |  |         String [] idArray = ids.split(","); | 
 |  |  |         List<Integer> idList = new ArrayList<>(); | 
 |  |  |         for (String id : idArray) { | 
 |  |  | 
 |  |  |     @ApiOperation("根据ID修改") | 
 |  |  |     @PostMapping("/updateById") | 
 |  |  |     @CloudRequiredPermission("business:ywoutinbound:update") | 
 |  |  |     public ApiResponse updateById(@RequestBody YwOutinbound ywOutinbound) { | 
 |  |  |     public ApiResponse updateById(@RequestBody YwOutinbound ywOutinbound,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
 |  |  |         ywOutinbound.setLoginUserInfo(this.getLoginUser(token)); | 
 |  |  |         ywOutinboundService.updateById(ywOutinbound); | 
 |  |  |         return ApiResponse.success(null); | 
 |  |  |     } | 
 |  |  | 
 |  |  |     @ApiOperation("分页查询") | 
 |  |  |     @PostMapping("/page") | 
 |  |  |     @CloudRequiredPermission("business:ywoutinbound:query") | 
 |  |  |     public ApiResponse<PageData<YwOutinbound>> findPage (@RequestBody PageWrap<YwOutinbound> pageWrap) { | 
 |  |  |     public ApiResponse<PageData<YwOutinbound>> findPage (@RequestBody PageWrap<YwOutinbound> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
 |  |  |         return ApiResponse.success(ywOutinboundService.findPage(pageWrap)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @ApiOperation("导出Excel") | 
 |  |  |     @PostMapping("/exportExcel") | 
 |  |  |     @CloudRequiredPermission("business:ywoutinbound:exportExcel") | 
 |  |  |     public void exportExcel (@RequestBody PageWrap<YwOutinbound> pageWrap, HttpServletResponse response) { | 
 |  |  |     public void exportExcel (@RequestBody PageWrap<YwOutinbound> pageWrap, HttpServletResponse response,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
 |  |  |         ExcelExporter.build(YwOutinbound.class).export(ywOutinboundService.findPage(pageWrap).getRecords(), "运维出入库信息表", response); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @ApiOperation("根据ID查询") | 
 |  |  |     @GetMapping("/{id}") | 
 |  |  |     @CloudRequiredPermission("business:ywoutinbound:query") | 
 |  |  |     public ApiResponse findById(@PathVariable Integer id) { | 
 |  |  |     public ApiResponse findById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
 |  |  |         return ApiResponse.success(ywOutinboundService.getDetail(id)); | 
 |  |  |     } | 
 |  |  | } |