From fc504a1afb020387c044e132275128e9f89d7409 Mon Sep 17 00:00:00 2001
From: TanYibin <5491541@qq.com>
Date: Mon, 19 Jun 2023 16:45:32 +0800
Subject: [PATCH] 空指针异常修复

---
 huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/service/impl/LocationServiceImpl.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/service/impl/LocationServiceImpl.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/service/impl/LocationServiceImpl.java
index 59851a6..cfe0c6c 100644
--- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/service/impl/LocationServiceImpl.java
+++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/service/impl/LocationServiceImpl.java
@@ -98,8 +98,11 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i
 
     @Override
     public Location getLocationByCode(String locationCode, String warehouseCode) {
+        if (StringUtils.isEmpty(locationCode)) {
+            throw new JeecgBootException("库位不能为空");
+        }
         if (StringUtils.havaLowerCase(locationCode)) {
-            throw new JeecgBootException("库位不能有小字母" + locationCode);
+            throw new JeecgBootException("库位不能有小字母:" + locationCode);
         }
         LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery();
         locationLambdaQueryWrapper.eq(Location::getCode, locationCode).eq(Location::getEnable, QuantityConstant.STATUS_ENABLE).eq(Location::getWarehouseCode,
--
libgit2 0.22.2