| | |
| | | return mobileService.getReceiptAreas(getLoginUser()); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:warehouseAreas:list')") |
| | | @ApiOperation("获取可用库区") |
| | | @GetMapping("/areas/user/all") |
| | | public R getAreasUserAll() { |
| | | return mobileService.getAreasUserAll(getLoginUser()); |
| | | } |
| | | |
| | | |
| | | @PreAuthorize("hasAuthority('manager:asnOrder:list')") |
| | | @GetMapping("/orders/asn") |
| | |
| | | public R pikinOrder(@RequestBody WaitPakinParam waitPakin) { |
| | | Long userId = getLoginUserId(); |
| | | if (Objects.isNull(waitPakin)) { |
| | | return R.error("参数不能为空!!"); |
| | | return R.error( "参数不能为空!!"); |
| | | } |
| | | if (org.apache.commons.lang3.StringUtils.isBlank(waitPakin.getBarcode())) { |
| | | return R.error("托盘码不能为空!!"); |
| | |
| | | if (Objects.isNull(waitPakin.getItems()) || waitPakin.getItems().isEmpty()) { |
| | | return R.error("跟踪码不能为空!!"); |
| | | } |
| | | // return R.ok(mobileService.mergeItems(waitPakin, userId)); |
| | | try{ |
| | | mobileService.mergeItems(waitPakin, userId); |
| | | if (waitPakin.getAgvSign()==1) { |
| | | asyncProcessAfterValidation(waitPakin,userId); |
| | | } |
| | | mobileService.mergeItemsWcs(waitPakin, userId); |
| | | } catch (Exception e){ |
| | | return R.error(e.getMessage()); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Async |
| | | public void asyncProcessAfterValidation(WaitPakinParam waitPakinPda,Long userId) { |
| | | try { |
| | | Thread.sleep(500); |
| | | // WaitPakin waitPakin = waitPakinService.getOne(new LambdaQueryWrapper<WaitPakin>().eq(WaitPakin::getBarcode, waitPakinPda.getBarcode())); |
| | | agvService.AGVBindAndInTaskStart(waitPakinPda, userId); |
| | | // mobileService.mergeItemsWcs(waitPakin,userId); |
| | | } catch (Exception e) { |
| | | // log.error("异步处理AGV后续逻辑失败", e); |
| | | } |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:waitPakin:update')") |