From ac909029d6df3cf499e9332b7dd1c735b3d25728 Mon Sep 17 00:00:00 2001 From: pjb <123456> Date: 星期一, 07 七月 2025 10:44:49 +0800 Subject: [PATCH] 平库组托失败 --- zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/ZpalletBarcodeController.java | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/ZpalletBarcodeController.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/ZpalletBarcodeController.java index 9f8d543..5838111 100644 --- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/ZpalletBarcodeController.java +++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/ZpalletBarcodeController.java @@ -120,16 +120,18 @@ pakinType = "ctu"; } } - ZpalletBarcode one = zpalletBarcodeService.getOne(new LambdaQueryWrapper<ZpalletBarcode>().eq(ZpalletBarcode::getBarcode, barcode)); - if (one != null) { - return R.error("鏉$爜璧峰鍊煎凡瀛樺湪"); - } + if (pakinType.equals("flat")) { int barcodeInt = Integer.parseInt(String.valueOf(barcode)); for (int i = 0; i < Integer.parseInt(String.valueOf(num)); i++) { ZpalletBarcode zpalletBarcode = new ZpalletBarcode(); String strBarcode = String.format("%08d", barcodeInt); zpalletBarcode.setBarcode("PK" + strBarcode); + ZpalletBarcode one = zpalletBarcodeService.getOne(new LambdaQueryWrapper<ZpalletBarcode>() + .eq(ZpalletBarcode::getBarcode, strBarcode)); + if (one != null) { + continue; + } zpalletBarcodeService.save(zpalletBarcode); barcodeInt += 1; } @@ -139,6 +141,11 @@ ZpalletBarcode zpalletBarcode = new ZpalletBarcode(); String strBarcode = String.format("%08d", barcodeInt); zpalletBarcode.setBarcode(strBarcode); + ZpalletBarcode one = zpalletBarcodeService.getOne(new LambdaQueryWrapper<ZpalletBarcode>() + .eq(ZpalletBarcode::getBarcode, strBarcode)); + if (one != null) { + continue; + } zpalletBarcodeService.save(zpalletBarcode); barcodeInt += 1; } -- Gitblit v1.9.1