Commit 86bb350a authored by zhangsen's avatar zhangsen

文档问题处理

parent 5c4720de
...@@ -79,6 +79,8 @@ public class CommonConstans { ...@@ -79,6 +79,8 @@ public class CommonConstans {
}; };
//es EquipIndexName 查绚关键字 //es EquipIndexName 查绚关键字
public static final String QueryStringEquipmentIndexName = "equipmentIndexName.keyword"; public static final String QueryStringEquipmentIndexName = "equipmentIndexName.keyword";
//es EquipIndexName 查绚关键字
public static final String QueryStringEquipmentIndexNameNotKeyword = "equipmentIndexName.keyword";
//es gatewayId 查绚关键字 //es gatewayId 查绚关键字
public static final String QueryStringGateWayId = "gatewayId.keyword"; public static final String QueryStringGateWayId = "gatewayId.keyword";
public static final String QueryStringFrontMoudle = "frontModule.keyword"; public static final String QueryStringFrontMoudle = "frontModule.keyword";
......
...@@ -1570,15 +1570,15 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -1570,15 +1570,15 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
ArrayList<Map<String, Object>> resultList = new ArrayList<>(); ArrayList<Map<String, Object>> resultList = new ArrayList<>();
Map<String, List<String>> queryConditon = new HashMap<>(); Map<String, List<String>> queryConditon = new HashMap<>();
queryConditon.put(CommonConstans.QueryStringGateWayId, Arrays.asList(gatewayId)); queryConditon.put(CommonConstans.QueryStringGateWayId, Arrays.asList(gatewayId));
Map<String, String> shouldConditon = new HashMap<>(); Map<String, String> likeMap = new HashMap<>();
shouldConditon.put(CommonConstans.QueryStringEquipmentIndexName, "路电流"); likeMap.put(CommonConstans.QueryStringEquipmentIndexNameNotKeyword, "路电流");
List<ESEquipments> list = commonServiceImpl.getListDataByCondtions(queryConditon, shouldConditon, ESEquipments.class); List<ESEquipments> list = commonServiceImpl.getListDataByCondtionsAndLike(queryConditon, null, ESEquipments.class, likeMap);
Map<String, List<String>> queryConditon1 = new HashMap<>(); Map<String, List<String>> queryConditon1 = new HashMap<>();
queryConditon1.put(CommonConstans.QueryStringGateWayId, Arrays.asList(gatewayId)); queryConditon1.put(CommonConstans.QueryStringGateWayId, Arrays.asList(gatewayId));
Map<String, String> shouldConditon1 = new HashMap<>(); Map<String, String> likeMap1 = new HashMap<>();
shouldConditon1.put(CommonConstans.QueryStringEquipmentIndexName, "平均电流"); likeMap1.put(CommonConstans.QueryStringEquipmentIndexNameNotKeyword, "平均电流");
List<ESEquipments> list1 = commonServiceImpl.getListDataByCondtions(queryConditon, shouldConditon, ESEquipments.class); List<ESEquipments> list1 = commonServiceImpl.getListDataByCondtions(queryConditon, null, ESEquipments.class, likeMap1);
if (!ValidationUtil.isEmpty(list)) { if (!ValidationUtil.isEmpty(list)) {
Map<String, List<ESEquipments>> collect = list.stream().collect(Collectors.groupingBy(ESEquipments::getEquipmentNumber)); Map<String, List<ESEquipments>> collect = list.stream().collect(Collectors.groupingBy(ESEquipments::getEquipmentNumber));
...@@ -1586,7 +1586,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -1586,7 +1586,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
List<ESEquipments> indicatorsDtos = collect.get(s); List<ESEquipments> indicatorsDtos = collect.get(s);
HashMap<String, Object> resultMap = new HashMap<>(); HashMap<String, Object> resultMap = new HashMap<>();
Double avageValue = 0.0; Double avageValue = 0.0;
avageValue = indicatorsDtos.stream().filter(e -> !ObjectUtils.isEmpty(e.getValue())).mapToDouble(l -> Double.parseDouble((String) l.getValue())).average().getAsDouble(); avageValue = indicatorsDtos.stream().filter(e -> !ObjectUtils.isEmpty(e.getValueDouble())).mapToDouble(l -> Double.parseDouble(l.getValueDouble().toString())).average().getAsDouble();
avageValue = Double.valueOf(String.format(CommonConstans.Twodecimalplaces, avageValue)); avageValue = Double.valueOf(String.format(CommonConstans.Twodecimalplaces, avageValue));
resultMap.put("avg", avageValue); resultMap.put("avg", avageValue);
String[] name = s.split("-"); String[] name = s.split("-");
......
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