From fc6d449566fd02245cb6f1fe1e67627c6b2dac90 Mon Sep 17 00:00:00 2001 From: mashuai Date: Tue, 2 Apr 2024 15:15:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=98=E7=82=B9=E5=85=A5=E5=BA=93youhua?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/InventoryAndWarehousingServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/InventoryAndWarehousingServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/InventoryAndWarehousingServiceImpl.java index 88a0a445..2283b043 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/InventoryAndWarehousingServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/InventoryAndWarehousingServiceImpl.java @@ -55,7 +55,7 @@ public class InventoryAndWarehousingServiceImpl implements InventoryAndWarehousi while (codeList.size() < dto.getNum()) { String code = FieldGenerator.generateField(); int count = selectByCode(code); - if (count == 0) { + if (count == 0 && !codeList.contains(code)) { codeList.add(code); } }