| | |
| | | } |
| | | steps.add("查询到物料数量:" + matnrs.size()); |
| | | |
| | | // 3.3 生成随机托盘码 |
| | | // 3.3 生成随机料箱码 |
| | | barcode = generateBarcode(); |
| | | steps.add("生成托盘码:" + barcode); |
| | | log.info("生成的托盘码:{}", barcode); |
| | | steps.add("生成料箱码:" + barcode); |
| | | log.info("生成的料箱码:{}", barcode); |
| | | |
| | | // 3.4 自动组托 |
| | | WaitPakinParam waitPakinParam = new WaitPakinParam(); |
| | |
| | | throw new CoolException("组托失败,返回结果为空!"); |
| | | } |
| | | steps.add("组托成功,组托编码:" + waitPakin.getCode()); |
| | | log.info("组托成功,组托编码:{},托盘码:{}", waitPakin.getCode(), barcode); |
| | | log.info("组托成功,组托编码:{},料箱码:{}", waitPakin.getCode(), barcode); |
| | | |
| | | // 3.5 自动入库 |
| | | String inboundStation = params.getInboundStation(); |
| | |
| | | } |
| | | |
| | | if ("location_allocate".equals(params.getInboundApiType())) { |
| | | // 使用 location_allocate 接口(内部调用createInTask) |
| | | R allocateResult = wcsService.allocateLocation(barcode, inboundStation, 1); |
| | | // 使用 location_allocate 接口(内部调用createInTask);full=null 表示普通入库 |
| | | R allocateResult = wcsService.allocateLocation(barcode, inboundStation, 1, null); |
| | | if (allocateResult != null) { |
| | | Object dataObj = allocateResult.get("data"); |
| | | if (dataObj != null) { |
| | |
| | | } |
| | | |
| | | /** |
| | | * 生成随机托盘码 |
| | | * 生成随机料箱码 |
| | | */ |
| | | private String generateBarcode() { |
| | | return "TEST_" + System.currentTimeMillis() + "_" + (int)(Math.random() * 10000); |