Commit fc504a1afb020387c044e132275128e9f89d7409
1 parent
fc064c9c
空指针异常修复
Signed-off-by: TanYibin <5491541@qq.com>
Showing
1 changed file
with
4 additions
and
1 deletions
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 |
98 | 98 | |
99 | 99 | @Override |
100 | 100 | public Location getLocationByCode(String locationCode, String warehouseCode) { |
101 | + if (StringUtils.isEmpty(locationCode)) { | |
102 | + throw new JeecgBootException("库位不能为空"); | |
103 | + } | |
101 | 104 | if (StringUtils.havaLowerCase(locationCode)) { |
102 | - throw new JeecgBootException("库位不能有小字母" + locationCode); | |
105 | + throw new JeecgBootException("库位不能有小字母:" + locationCode); | |
103 | 106 | } |
104 | 107 | LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery(); |
105 | 108 | locationLambdaQueryWrapper.eq(Location::getCode, locationCode).eq(Location::getEnable, QuantityConstant.STATUS_ENABLE).eq(Location::getWarehouseCode, |
... | ... |