Browse Source

#定时任务抽离

zhongwei
yang_shj 1 year ago
parent
commit
85af1b981a
  1. 3
      hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/vo/EminfoAndEmParamVo.java
  2. 2
      hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/EmInfoMapper.xml
  3. 3
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AppHomeServiceImpl.java
  4. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/vo/EmShowVo.java

3
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") @ApiModelProperty(value = "监测点位:key-属性标识 value-realId")
private Map<String,String> point; private Map<String,String> point;
@ApiModelProperty(value = "机组运行状态")
private Integer ord;
} }

2
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} SELECT * FROM `hzims_em_info` WHERE IS_DELETED = 0 AND HOME_PAGE_DISPLAY = 1 and `NUMBER` = #{emCode}
</select> </select>
<select id="selectEminfoAndEmParamVoList" resultType="com.hnac.hzims.equipment.vo.EminfoAndEmParamVo"> <select id="selectEminfoAndEmParamVoList" resultType="com.hnac.hzims.equipment.vo.EminfoAndEmParamVo">
SELECT ID AS id, `NAME` as name,`NUMBER` as emCode,CREATE_DEPT as createDept,RUN_STATUS as runStatus FROM `hzims_em_info` WHERE IS_DELETED = 0 AND HOME_PAGE_DISPLAY = 1 SELECT ID AS id, `NAME` as name,`NUMBER` as emCode,CREATE_DEPT as createDept,RUN_STATUS as runStatus,EM_INDEX as ord FROM `hzims_em_info` WHERE IS_DELETED = 0 AND HOME_PAGE_DISPLAY = 1
</select> </select>
<update id="updateBachEmState"> <update id="updateBachEmState">

3
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.setName(em.getName());
emShowVo.setPoint(em.getPoint()); emShowVo.setPoint(em.getPoint());
emShowVo.setOnOff(false); emShowVo.setOnOff(false);
emShowVo.setOrd(em.getOrd());
emShowVo.setInstalledCapacity(em.getInstalledCapacity()); emShowVo.setInstalledCapacity(em.getInstalledCapacity());
// 有功功率 // 有功功率
if (MapUtils.isEmpty(em.getPoint())) { if (MapUtils.isEmpty(em.getPoint())) {
@ -280,7 +281,7 @@ public class AppHomeServiceImpl implements IAppHomeService {
} }
emShowVoList.add(emShowVo); emShowVoList.add(emShowVo);
}); });
return emShowVoList; return emShowVoList.stream().sorted(Comparator.comparing(EmShowVo::getOrd)).collect(Collectors.toList());
} }
/** /**

4
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") @ApiModelProperty(value = "监测点位:key-属性标识 value-realId")
private Map<String,String> point; private Map<String,String> point;
@ApiModelProperty("排序")
private Integer ord;
} }

Loading…
Cancel
Save