From 85af1b981a1a65fa10e8849245a66944b17fdb14 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Wed, 14 Jun 2023 08:23:22 +0800 Subject: [PATCH] =?UTF-8?q?#=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1=E6=8A=BD?= =?UTF-8?q?=E7=A6=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/hnac/hzims/equipment/vo/EminfoAndEmParamVo.java | 3 +++ .../src/main/java/com/hnac/hzims/equipment/mapper/EmInfoMapper.xml | 2 +- .../hnac/hzims/operational/main/service/impl/AppHomeServiceImpl.java | 3 ++- .../src/main/java/com/hnac/hzims/operational/main/vo/EmShowVo.java | 4 ++++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/vo/EminfoAndEmParamVo.java b/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/vo/EminfoAndEmParamVo.java index 9c896c6..8bcdfca 100644 --- a/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/vo/EminfoAndEmParamVo.java +++ b/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/vo/EminfoAndEmParamVo.java @@ -31,4 +31,7 @@ public class EminfoAndEmParamVo extends EmInfoExtendVo { @ApiModelProperty(value = "监测点位:key-属性标识 value-realId") private Map point; + + @ApiModelProperty(value = "机组运行状态") + private Integer ord; } diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/EmInfoMapper.xml b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/EmInfoMapper.xml index c8cfad0..fae049a 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/EmInfoMapper.xml +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/EmInfoMapper.xml @@ -91,7 +91,7 @@ SELECT * FROM `hzims_em_info` WHERE IS_DELETED = 0 AND HOME_PAGE_DISPLAY = 1 and `NUMBER` = #{emCode} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AppHomeServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AppHomeServiceImpl.java index b7882fc..5b4094b 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AppHomeServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AppHomeServiceImpl.java @@ -246,6 +246,7 @@ public class AppHomeServiceImpl implements IAppHomeService { emShowVo.setName(em.getName()); emShowVo.setPoint(em.getPoint()); emShowVo.setOnOff(false); + emShowVo.setOrd(em.getOrd()); emShowVo.setInstalledCapacity(em.getInstalledCapacity()); // 有功功率 if (MapUtils.isEmpty(em.getPoint())) { @@ -280,7 +281,7 @@ public class AppHomeServiceImpl implements IAppHomeService { } emShowVoList.add(emShowVo); }); - return emShowVoList; + return emShowVoList.stream().sorted(Comparator.comparing(EmShowVo::getOrd)).collect(Collectors.toList()); } /** diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/vo/EmShowVo.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/vo/EmShowVo.java index 37f130d..83803c8 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/vo/EmShowVo.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/vo/EmShowVo.java @@ -34,4 +34,8 @@ public class EmShowVo { @ApiModelProperty(value = "监测点位:key-属性标识 value-realId") private Map point; + + @ApiModelProperty("排序") + private Integer ord; + }