diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataGoodsAreaServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataGoodsAreaServiceImpl.java index 30d008e18..34aff4ef4 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataGoodsAreaServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataGoodsAreaServiceImpl.java @@ -167,11 +167,13 @@ public class BasicdataGoodsAreaServiceImpl extends BaseServiceImpl myWarehouseList = basicdataWarehouseService.getMyWarehouseList(); - myWarehouseList.forEach(w->{ - LambdaQueryWrapper qw = Wrappers.query().lambda().eq(BasicdataGoodsAreaEntity::getWarehouseId, w.getId()); - List basicdataGoodsAreaEntities = basicdataGoodsAreaMapper.selectList(qw); - w.setChildren(basicdataGoodsAreaEntities); - }); + if (Func.isNotEmpty(myWarehouseList)){ + myWarehouseList.forEach(w->{ + LambdaQueryWrapper qw = Wrappers.query().lambda().eq(BasicdataGoodsAreaEntity::getWarehouseId, w.getId()); + List basicdataGoodsAreaEntities = basicdataGoodsAreaMapper.selectList(qw); + w.setChildren(basicdataGoodsAreaEntities); + }); + } // //查询一级仓库节点信息 // List basicdataWarehouseVOList = baseMapper.selectFirstNode(); // //获取二节点的货区