diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/emParam/service/impl/ParamServiceImpl.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/emParam/service/impl/ParamServiceImpl.java index 10b4a7b..12fced6 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/emParam/service/impl/ParamServiceImpl.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/emParam/service/impl/ParamServiceImpl.java @@ -70,17 +70,17 @@ public class ParamServiceImpl implements IParamService { public List recall(String emCode,String stationCode) { List result = Lists.newArrayList(); // 获取设备物模型中是参数的属性 - Result> paramDeviceAttrR = deviceDataClient.getIsParamDeviceAttr(emCode); + R> paramDeviceAttrR = deviceClient.getOnlineAttr(emCode); Assert.isTrue(paramDeviceAttrR.isSuccess() && CollectionUtil.isNotEmpty(paramDeviceAttrR.getData()),() -> { throw new ServiceException("获取设备实例物模型属性失败!"); }); // 获取实时数据 - List signageList = paramDeviceAttrR.getData().stream().map(DeviceInstanceAttrVO::getSignage).filter(StringUtil::isNotBlank).collect(Collectors.toList()); + List signageList = paramDeviceAttrR.getData().stream().filter(o->StringUtil.isNotBlank(o.getSignage()) && StringUtil.isNotBlank(o.getFacDeviceAttrId())).map(DeviceInstanceAttrVO::getSignage).collect(Collectors.toList()); Result realDataR = deviceDataClient.getDeviceRealDataByCode(emCode, signageList); Assert.isTrue(realDataR.isSuccess(),() -> { throw new ServiceException("参数召回获取实时数据失败"); }); - Map> paramGroupVOListMap = paramDeviceAttrR.getData().stream().map(this::convert).collect(Collectors.groupingBy(p -> { + Map> paramGroupVOListMap = paramDeviceAttrR.getData().stream().filter(o->StringUtil.isNotBlank(o.getFacDeviceAttrId())).map(this::convert).collect(Collectors.groupingBy(p -> { ParamGroupVO paramGroupVO = new ParamGroupVO(); paramGroupVO.setGroupId(String.valueOf(p.getModelClassifyId())); paramGroupVO.setGroupName(p.getModelClassifyName());