|
|
|
@ -114,20 +114,20 @@ public class ExtraResolveStrategyService {
|
|
|
|
|
real.setTime(DateUtil.format(date,DateUtil.PATTERN_DATETIME)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if(Func.isNotEmpty(data.getItem())) { |
|
|
|
|
if("历史".equals(data.getType())) { |
|
|
|
|
// 历史数据需要手动查询功能ID供前端使用
|
|
|
|
|
DataItemVO item = data.getItem(); |
|
|
|
|
R<List<DeviceInstanceAttrVO>> attrR = deviceClient.getOnlineAttr(item.getDeviceId()); |
|
|
|
|
if(attrR.isSuccess() && CollectionUtil.isNotEmpty(attrR.getData())) { |
|
|
|
|
List<DeviceInstanceAttrVO> attrList = attrR.getData(); |
|
|
|
|
Optional<String> facDeviceIdOptional = attrList.stream().parallel().filter(f -> item.getSignage().equals(f.getSignage())) |
|
|
|
|
.map(DeviceInstanceAttrVO::getFacDeviceAttrId).findFirst(); |
|
|
|
|
logger.info("hzims-big-model:resolveShowParam:facDeviceId",facDeviceIdOptional.orElse("")); |
|
|
|
|
item.setAttrId(facDeviceIdOptional.orElse(null)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// if(Func.isNotEmpty(data.getItem())) {
|
|
|
|
|
// if("历史".equals(data.getType())) {
|
|
|
|
|
// // 历史数据需要手动查询功能ID供前端使用
|
|
|
|
|
// DataItemVO item = data.getItem();
|
|
|
|
|
// R<List<DeviceInstanceAttrVO>> attrR = deviceClient.getOnlineAttr(item.getDeviceId());
|
|
|
|
|
// if(attrR.isSuccess() && CollectionUtil.isNotEmpty(attrR.getData())) {
|
|
|
|
|
// List<DeviceInstanceAttrVO> attrList = attrR.getData();
|
|
|
|
|
// Optional<String> facDeviceIdOptional = attrList.stream().parallel().filter(f -> item.getSignage().equals(f.getSignage()))
|
|
|
|
|
// .map(DeviceInstanceAttrVO::getFacDeviceAttrId).findFirst();
|
|
|
|
|
// logger.info("hzims-big-model:resolveShowParam:facDeviceId",facDeviceIdOptional.orElse(""));
|
|
|
|
|
// item.setAttrId(facDeviceIdOptional.orElse(null));
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
} |
|
|
|
|
param.put("data", data); |
|
|
|
|
result.setParams(param); |
|
|
|
|