Browse Source

add:站点数量统计

zhongwei
haungxing 6 months ago
parent
commit
4eb705f531
  1. 28
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/ExtraResolveStrategyService.java

28
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/ExtraResolveStrategyService.java

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

Loading…
Cancel
Save