| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.tika.utils.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @ApiOperation("获取收货区") |
| | | @GetMapping("/areas/receipt") |
| | | public R getReceiptAreas() { |
| | | return mobileService.getReceiptAreas(); |
| | | return mobileService.getReceiptAreas(getLoginUser()); |
| | | } |
| | | |
| | | |
| | |
| | | if (Objects.isNull(waitPakin.getItems()) || waitPakin.getItems().isEmpty()) { |
| | | return R.error("跟踪码不能为空!!"); |
| | | } |
| | | return R.ok(mobileService.mergeItems(waitPakin, userId)); |
| | | // return R.ok(mobileService.mergeItems(waitPakin, userId)); |
| | | try{ |
| | | mobileService.mergeItems(waitPakin, userId); |
| | | if (waitPakin.getAgvSign()==1) { |
| | | asyncProcessAfterValidation(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())); |
| | | taskService.generateFlatWarehouseTasks(waitPakin, waitPakinPda.getStaNo(), userId); |
| | | // mobileService.mergeItemsWcs(waitPakin,userId); |
| | | } catch (Exception e) { |
| | | // log.error("异步处理AGV后续逻辑失败", e); |
| | | } |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:waitPakin:update')") |