Commit 0b9d46d3 authored by caotao's avatar caotao

泰和-升压站-箱变-实时运行数据 测点显示及排序

parent 1279dda1
......@@ -219,13 +219,19 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
likeMap.put("systemType", systemType);
}
List<ESEquipments> result = commonServiceImpl.getListDataByCondtionsAndLike(queryCondtion, null, ESEquipments.class, likeMap);
List<String> needDisplayDisplayNameFrontModule = Arrays.asList("箱变");
List<String> needDisplayDisplayNameSystemType = Arrays.asList("实时运行数据");
result.stream().forEach(e -> {
e.setValue(String.format(CommonConstans.Twodecimalplaces, e.getValueF()));
});
Collator instance = Collator.getInstance(Locale.CHINA);
if (needDisplayDisplayNameSystemType.contains(systemType) && needDisplayDisplayNameFrontModule.contains(frontModule)) {
result.sort(Comparator.comparing(ESEquipments::getTraceId,Comparator.comparingInt(Integer::parseInt)));
} else {
Collections.sort(result, (e1, e2) -> {
return instance.compare(e1.getEquipmentIndexName(), e2.getEquipmentIndexName());
});
}
List<ESEquipments> collect = result.stream()
.skip((long) (current - 1) * size)
.limit(size)
......@@ -1126,37 +1132,37 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
ArrayList<Map<String, String>> resultList1 = new ArrayList<>();
List<String> nameList = new ArrayList<>();
Map<String, String> handleData = new HashMap<>();
Map<String,List<String>> originalData = new HashMap<>();
Map<String, List<String>> originalData = new HashMap<>();
if ("FDZ".equals(stationBasic.getStationType())) {
handleData = windSqlList.stream().collect(Collectors.toMap(ESEquipments::getEquipmentIndexName, esEquipments -> String.format(CommonConstans.Threedecimalplaces, esEquipments.getValueF())));
nameList = CommonConstans.xiazaoElectricityMeter;
originalData = CommonConstans.xiazaoElectricityMeterPointSort;
} else {
handleData=windSqlList.stream().collect(Collectors.toMap(ESEquipments::getEquipmentIndexName, esEquipments -> String.format(CommonConstans.Twodecimalplaces, esEquipments.getValueF()*0.01)));
handleData = windSqlList.stream().collect(Collectors.toMap(ESEquipments::getEquipmentIndexName, esEquipments -> String.format(CommonConstans.Twodecimalplaces, esEquipments.getValueF() * 0.01)));
nameList = CommonConstans.taiheElectricityMeter;
originalData= CommonConstans.taiheElectricityMeterPointSort;
originalData = CommonConstans.taiheElectricityMeterPointSort;
}
for (int i = 0; i < nameList.size(); i++) {
HashMap<String, String> stringStringHashMap = new HashMap<>();
String name = nameList.get(i);
stringStringHashMap.put("name",name);
stringStringHashMap.put("name", name);
Double electricityIndicator = 1.0;
List<String> dataList = originalData.get(name);
stringStringHashMap.put("zxzyg",handleData.get(dataList.get(0)));
stringStringHashMap.put("fxzyg",handleData.get(dataList.get(1)));
stringStringHashMap.put("zxzwg",handleData.get(dataList.get(2)));
stringStringHashMap.put("fxzwg",handleData.get(dataList.get(3)));
if(name.equals("夏雩线212主表")){
stringStringHashMap.put("zxzyg",String.format(CommonConstans.Threedecimalplaces,Double.valueOf(handleData.get(dataList.get(0)))*0.001));
stringStringHashMap.put("fxzyg",String.format(CommonConstans.Threedecimalplaces,Double.valueOf(handleData.get(dataList.get(1)))*0.001));
stringStringHashMap.put("zxzwg",String.format(CommonConstans.Threedecimalplaces,Double.valueOf(handleData.get(dataList.get(2)))*0.001));
stringStringHashMap.put("fxzwg",String.format(CommonConstans.Threedecimalplaces,Double.valueOf(handleData.get(dataList.get(3)))*0.001));
}
if(name.equals("夏雩线212副表")){
stringStringHashMap.put("zxzyg",String.format(CommonConstans.Threedecimalplaces,Double.valueOf(handleData.get(dataList.get(0)))*0.01));
stringStringHashMap.put("fxzyg",String.format(CommonConstans.Threedecimalplaces,Double.valueOf(handleData.get(dataList.get(1)))*0.01));
stringStringHashMap.put("zxzwg",String.format(CommonConstans.Threedecimalplaces,Double.valueOf(handleData.get(dataList.get(2)))*0.01));
stringStringHashMap.put("fxzwg",String.format(CommonConstans.Threedecimalplaces,Double.valueOf(handleData.get(dataList.get(3)))*0.01));
stringStringHashMap.put("zxzyg", handleData.get(dataList.get(0)));
stringStringHashMap.put("fxzyg", handleData.get(dataList.get(1)));
stringStringHashMap.put("zxzwg", handleData.get(dataList.get(2)));
stringStringHashMap.put("fxzwg", handleData.get(dataList.get(3)));
if (name.equals("夏雩线212主表")) {
stringStringHashMap.put("zxzyg", String.format(CommonConstans.Threedecimalplaces, Double.valueOf(handleData.get(dataList.get(0))) * 0.001));
stringStringHashMap.put("fxzyg", String.format(CommonConstans.Threedecimalplaces, Double.valueOf(handleData.get(dataList.get(1))) * 0.001));
stringStringHashMap.put("zxzwg", String.format(CommonConstans.Threedecimalplaces, Double.valueOf(handleData.get(dataList.get(2))) * 0.001));
stringStringHashMap.put("fxzwg", String.format(CommonConstans.Threedecimalplaces, Double.valueOf(handleData.get(dataList.get(3))) * 0.001));
}
if (name.equals("夏雩线212副表")) {
stringStringHashMap.put("zxzyg", String.format(CommonConstans.Threedecimalplaces, Double.valueOf(handleData.get(dataList.get(0))) * 0.01));
stringStringHashMap.put("fxzyg", String.format(CommonConstans.Threedecimalplaces, Double.valueOf(handleData.get(dataList.get(1))) * 0.01));
stringStringHashMap.put("zxzwg", String.format(CommonConstans.Threedecimalplaces, Double.valueOf(handleData.get(dataList.get(2))) * 0.01));
stringStringHashMap.put("fxzwg", String.format(CommonConstans.Threedecimalplaces, Double.valueOf(handleData.get(dataList.get(3))) * 0.01));
}
resultList.add(stringStringHashMap);
}
......@@ -1367,12 +1373,12 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
queryCondition.put(CommonConstans.QueryStringGateWayId, Arrays.asList(gatewayId));
queryCondition.put(CommonConstans.QueryStringSystemTypeKeyword, Arrays.asList("模拟量"));
List<ESEquipments> esEquipmentsList = commonServiceImpl.getListDataByCondtions(queryCondition, null, ESEquipments.class);
List<String> displayName = Arrays.asList("Ua","Ub","Uc");
List<String> displayName = Arrays.asList("Ua", "Ub", "Uc");
// 10kVⅡ段母线数据
List<ESEquipments> xianData = esEquipmentsList.stream().filter(esEquipments -> esEquipments.getFrontModule().contains("35kVⅠ母PT")&&!displayName.contains(esEquipments.getDisplayName())).collect(Collectors.toList());
List<ESEquipments> xianData = esEquipmentsList.stream().filter(esEquipments -> esEquipments.getFrontModule().contains("35kVⅠ母PT") && !displayName.contains(esEquipments.getDisplayName())).collect(Collectors.toList());
HashMap<String, Object> resultMap = new HashMap<>();
xianData.forEach(item -> resultMap.put(item.getDisplayName(), keepTwoDecimalPlaces(item.getValueF().toString())));
List<ESEquipments> xianData1 = esEquipmentsList.stream().filter(esEquipments -> esEquipments.getEquipmentIndexName().contains("南瑞光差保护_313")&&displayName.contains(esEquipments.getDisplayName())).collect(Collectors.toList());
List<ESEquipments> xianData1 = esEquipmentsList.stream().filter(esEquipments -> esEquipments.getEquipmentIndexName().contains("南瑞光差保护_313") && displayName.contains(esEquipments.getDisplayName())).collect(Collectors.toList());
xianData1.forEach(item -> resultMap.put(item.getDisplayName(), keepTwoDecimalPlaces(item.getValueF().toString())));
List<String> xyxDisplayNameList = Arrays.asList("Ia", "P", "Q");
List<ESEquipments> xyxSqlData = esEquipmentsList.stream().filter(esEquipments -> esEquipments.getFrontModule().equals("35kV前万线") && xyxDisplayNameList.contains(esEquipments.getDisplayName())).collect(Collectors.toList());
......@@ -1944,7 +1950,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
});
}
statusMaps.sort(Comparator.comparingInt(o->Integer.parseInt(o.get("titie").toString())));
statusMaps.sort(Comparator.comparingInt(o -> Integer.parseInt(o.get("titie").toString())));
IPage<Map<String, String>> result = new Page<>();
result.setRecords(statusMaps);
result.setCurrent(1);
......
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