From 5358dcca317dcceca1eb0aab7b28927020e0f381 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=90=8D=E5=96=9C?= Date: Tue, 17 Dec 2024 10:16:27 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ktg/mes/md/mapper/BaseKnifeMapper.java | 2 +- .../ktg/mes/wm/service/impl/WmStorageLocationServiceImpl.java | 4 ++-- ktg-mes/src/main/resources/mapper/md/BaseKnifeMapper.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/mapper/BaseKnifeMapper.java b/ktg-mes/src/main/java/com/ktg/mes/md/mapper/BaseKnifeMapper.java index 43bfe59..9c17bf1 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/mapper/BaseKnifeMapper.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/mapper/BaseKnifeMapper.java @@ -122,5 +122,5 @@ public interface BaseKnifeMapper { List selectBaseKnifeNotValidList(BaseKnife baseKnifeWrapper); - List selectAreaCodeList(); + List selectNotEmptyAreaCodeList(); } diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmStorageLocationServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmStorageLocationServiceImpl.java index bb9a120..5fdad83 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmStorageLocationServiceImpl.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmStorageLocationServiceImpl.java @@ -160,7 +160,7 @@ public class WmStorageLocationServiceImpl implements IWmStorageLocationService { if (wmStorageLocationByCode == null) throw new RuntimeException("自动获取库位失败,该库区不存在"); // 获取台账中已经使用的库位编码 - List selectAreaCodeList = this.baseKnifeMapper.selectAreaCodeList(); + List selectNotEmptyAreaCodeList = this.baseKnifeMapper.selectNotEmptyAreaCodeList(); // 获取库位列表 WmStorageArea wmStorageAreaQuery = new WmStorageArea(); @@ -168,7 +168,7 @@ public class WmStorageLocationServiceImpl implements IWmStorageLocationService { if (isBig) wmStorageAreaQuery.setAttr3(1L); List wmStorageAreaList = this.wmStorageAreaMapper.selectWmStorageAreaList(wmStorageAreaQuery).stream() // 过滤掉全部存在物品的库位 - .filter(it -> !selectAreaCodeList.contains(it.getAreaCode())) + .filter(it -> !selectNotEmptyAreaCodeList.contains(it.getAreaCode())) .collect(Collectors.toList()); if (wmStorageAreaList.isEmpty()) throw new RuntimeException("自动获取库位失败,无可用库位"); diff --git a/ktg-mes/src/main/resources/mapper/md/BaseKnifeMapper.xml b/ktg-mes/src/main/resources/mapper/md/BaseKnifeMapper.xml index 7f70eda..431e94b 100644 --- a/ktg-mes/src/main/resources/mapper/md/BaseKnifeMapper.xml +++ b/ktg-mes/src/main/resources/mapper/md/BaseKnifeMapper.xml @@ -613,7 +613,7 @@ WHERE RFID = #{value} - SELECT AREA_CODE FROM BASE_KNIFE WHERE KNIFE_FINE_STATE == 1