From 87a9a720b6e8f06a07194eab5dfd2078040e9606 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Wed, 22 Nov 2023 16:46:17 +0800 Subject: [PATCH] =?UTF-8?q?#HZ100C=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/hnac/hzims/emParam/service/impl/ParamServiceImpl.java | 6 +++--- .../hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java | 4 ++-- .../ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java | 6 ++++++ 3 files changed, 11 insertions(+), 5 deletions(-) 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()); diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java index c3c6d20..4d5ec7e 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java @@ -423,10 +423,10 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl pages = this.page(Condition.getPage(query), lqw); //数据转换