Commit ea1d93bb authored by chenzhao's avatar chenzhao

Merge branch 'developer' of http://39.98.45.134:8090/moa/amos-boot-biz into developer

parents 2f6aeaf6 7c78f7ce
...@@ -231,7 +231,7 @@ ...@@ -231,7 +231,7 @@
<select id="getHealthInfoByStation" resultType="java.util.Map"> <select id="getHealthInfoByStation" resultType="java.util.Map">
SELECT SELECT
a.STATION as station, a.STATION as station,
avg( a.avgHealthIndex ) AS healthIndex CEILING(avg( a.avgHealthIndex )) AS healthIndex
FROM FROM
( (
SELECT SELECT
...@@ -593,7 +593,7 @@ ...@@ -593,7 +593,7 @@
<select id="getPvSubSystemInfo" resultType="java.util.Map"> <select id="getPvSubSystemInfo" resultType="java.util.Map">
SELECT SELECT
IFNULL( AVG( HEALTH_INDEX ), 0 ) AS avgHealthIndex, CEILING(IFNULL( AVG( HEALTH_INDEX ), 100 )) AS avgHealthIndex,
EQUIPMENT_NAME AS equipmentName EQUIPMENT_NAME AS equipmentName
FROM FROM
idx_biz_pv_health_index idx_biz_pv_health_index
......
...@@ -259,12 +259,12 @@ public class DemoController extends BaseController { ...@@ -259,12 +259,12 @@ public class DemoController extends BaseController {
equipmentsJxiopDocMysqlList.forEach(equipmentsJxiopDocMysql -> { equipmentsJxiopDocMysqlList.forEach(equipmentsJxiopDocMysql -> {
ESEquipments esEquipments = equipmentsRepository.findById(equipmentsJxiopDocMysql.getId()).get(); ESEquipments esEquipments = equipmentsRepository.findById(equipmentsJxiopDocMysql.getId()).get();
//更新模块 //更新模块
if (equipmentsJxiopDocMysql.getFrontModule().contains(pointImportDto.getFrontModule())) { if (!equipmentsJxiopDocMysql.getFrontModule().contains(pointImportDto.getFrontModule())) {
equipmentsJxiopDocMysql.setFrontModule(equipmentsJxiopDocMysql.getFrontModule() + "," + pointImportDto.getFrontModule()); equipmentsJxiopDocMysql.setFrontModule(equipmentsJxiopDocMysql.getFrontModule() + "," + pointImportDto.getFrontModule());
esEquipments.setFrontModule(equipmentsJxiopDocMysql.getFrontModule() + "," + pointImportDto.getFrontModule()); esEquipments.setFrontModule(equipmentsJxiopDocMysql.getFrontModule() + "," + pointImportDto.getFrontModule());
} }
//更新类型 //更新类型
if (equipmentsJxiopDocMysql.getSystemType().contains(pointImportDto.getSystemType())) { if (!equipmentsJxiopDocMysql.getSystemType().contains(pointImportDto.getSystemType())) {
equipmentsJxiopDocMysql.setSystemType(equipmentsJxiopDocMysql.getSystemType()+","+pointImportDto.getSystemType()); equipmentsJxiopDocMysql.setSystemType(equipmentsJxiopDocMysql.getSystemType()+","+pointImportDto.getSystemType());
esEquipments.setSystemType(equipmentsJxiopDocMysql.getSystemType()+","+pointImportDto.getSystemType()); esEquipments.setSystemType(equipmentsJxiopDocMysql.getSystemType()+","+pointImportDto.getSystemType());
} }
......
...@@ -1378,8 +1378,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -1378,8 +1378,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
Map<String, List<String>> queryCodtion = new HashMap<>(); Map<String, List<String>> queryCodtion = new HashMap<>();
Map<String, String> likeMap = new HashMap<>(); Map<String, String> likeMap = new HashMap<>();
queryCodtion.put(CommonConstans.QueryStringGateWayId, Arrays.asList(gatewayId)); queryCodtion.put(CommonConstans.QueryStringGateWayId, Arrays.asList(gatewayId));
queryCodtion.put(CommonConstans.QueryStringSystemTypeKeyword, Arrays.asList("模拟量")); // queryCodtion.put(CommonConstans.QueryStringSystemTypeKeyword, Arrays.asList("模拟量"));
likeMap.put(CommonConstans.QueryStringFrontMoudle, map.get("boosterName")); likeMap.put(CommonConstans.QueryStringFrontMoudle, map.get("boosterName"));
likeMap.put(CommonConstans.QueryStringSystemTypeKeyword, "模拟量");
if ("1主变高压侧".equals(map.get("boosterName")) || "1主变低压侧".equals(map.get("boosterName"))) { if ("1主变高压侧".equals(map.get("boosterName")) || "1主变低压侧".equals(map.get("boosterName"))) {
likeMap.put(CommonConstans.QueryStringFrontMoudle, "压侧"); likeMap.put(CommonConstans.QueryStringFrontMoudle, "压侧");
List<ESEquipments> listData = commonServiceImpl.getListDataByCondtions(queryCodtion, null, ESEquipments.class, likeMap); List<ESEquipments> listData = commonServiceImpl.getListDataByCondtions(queryCodtion, null, ESEquipments.class, likeMap);
...@@ -1407,6 +1408,11 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -1407,6 +1408,11 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
} }
} else { } else {
List<ESEquipments> listData = commonServiceImpl.getListDataByCondtions(queryCodtion, null, ESEquipments.class, likeMap); List<ESEquipments> listData = commonServiceImpl.getListDataByCondtions(queryCodtion, null, ESEquipments.class, likeMap);
Integer traceIdCount = listData.stream().filter(esEquipments -> !StringUtils.isEmpty(esEquipments.getTraceId())).collect(Collectors.toList()).size();
if (traceIdCount > 0) {
listData = listData.stream().filter(esEquipments -> !StringUtils.isEmpty(esEquipments.getTraceId())).collect(Collectors.toList());
listData.sort(Comparator.comparing(ESEquipments::getTraceId, Comparator.comparingInt(Integer::parseInt)));
}
ArrayList<Map<String, String>> resultList = new ArrayList<>(); ArrayList<Map<String, String>> resultList = new ArrayList<>();
listData.forEach(item -> { listData.forEach(item -> {
HashMap<String, String> stringStringHashMap = new HashMap<>(); HashMap<String, String> stringStringHashMap = new HashMap<>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment