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