提交 e3cc2dfc authored 作者: zhoushaopan's avatar zhoushaopan

fix(3D模块): 修改3D对象为null的情况

修改3D对象为null的情况
上级 b9db508d
......@@ -1325,17 +1325,17 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
Map<Integer, DeviceLibraryPosition> positionMap =
deviceLibraryPositionService.findByDeviceIds(deviceIds).stream().collect(toMap(DeviceLibraryPosition::getDeviceId, Function.identity()));
//取出key 在3d的装备id
Set<Integer> integers = positionMap.keySet();
// Set<Integer> integers = positionMap.keySet();
//然后就行过滤
deviceLibraries = deviceLibraries.stream().filter(deviceLibrary -> integers.contains(deviceLibrary.getId()))
.collect(Collectors.toList());
// deviceLibraries = deviceLibraries.stream().filter(deviceLibrary -> integers.contains(deviceLibrary.getId()))
// .collect(Collectors.toList());
List<AllVO> allVOS = new ArrayList<>();
//开始遍历装备
deviceLibraries.forEach(deviceLibrary -> {
AllVO allVO = new AllVO();
//开始赋值
allVO.setDeviceLibrary(deviceLibrary);
DeviceLibraryPosition deviceLibraryPosition = positionMap.getOrDefault(deviceLibrary.getId(),null);
DeviceLibraryPosition deviceLibraryPosition = positionMap.getOrDefault(deviceLibrary.getId(),new DeviceLibraryPosition());
if (deviceLibraryPosition != null){
toJson(deviceLibraryPosition);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论