Commit b6aede8c authored by chenzhao's avatar chenzhao

修改集电线路图左侧接口

parent 3f6756c8
......@@ -695,29 +695,25 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
public void getStatusJDX(String gatewayId, String dataName, String werks,String stationId){
String sql = " SELECT * FROM indicators_"+gatewayId+" WHERE frontModule =~/集电/ and systemType = '光字牌'";
String sql = " SELECT * FROM indicators_"+gatewayId+" WHERE frontModule =~/集电/ and displayName =~/合位$/";
List<IndicatorsDto> listData = influxDButils.getListData(sql, IndicatorsDto.class);
TpriDmpDatabook tpriDmpDatabookByDataName = tpriDmpDatabookServiceImpl.getTpriDmpDatabookByDataName(dataName);
List<SjglZsjZsbtz> sjglZsjZsbtzList = sjglZsjZsbtzServiceImpl.getSjglZsjZsbtzList(tpriDmpDatabookByDataName.getDataid(), werks);
List<Map<String,Object>> statusMaps = new ArrayList<>();
Map<String, List<IndicatorsDto>> collect = listData.stream().collect(Collectors.groupingBy(IndicatorsDto::getFrontModule));
Map<String, List<IndicatorsDto>> collect = listData.stream().collect(Collectors.groupingBy(IndicatorsDto::getFrontModule,LinkedHashMap::new,Collectors.toList()));
for (String s : collect.keySet()) {
Map<String, Object> statusMap = new HashMap<>();
String[] split = s.replace("#", "").replace("保护测控装置", "").split("集电线路");
for (SjglZsjZsbtz listDatum : sjglZsjZsbtzList) {
statusMap.put("title",listDatum.getSbmc().replace("风机系统",""));
String[] strings = listDatum.getSbbm().split(" ");
if (Integer.parseInt(strings[1]) == Integer.parseInt(split[0])) {
String sql1 = " SELECT * FROM indicators_"+gatewayId+" WHERE displayName = '"+split[1]+"断路器合位'";
List<IndicatorsDto> listData1 = influxDButils.getListData(sql1, IndicatorsDto.class);
statusMap.put("type",listData1.get(0).getValue());
statusMap.put("position",split[1]+"开关位置");
List<IndicatorsDto> indicatorsDtos = collect.get(s);
for (IndicatorsDto indicatorsDto : indicatorsDtos) {
if (indicatorsDto.getDisplayName().contains("合位")){
statusMap.put("type",indicatorsDto.getValue());
statusMap.put("position",indicatorsDto.getDisplayName().split("_")[0]+"开关位置");
}
statusMap.put("power","有功 (kW)");
statusMap.put("windSpeed","风速 (m/s)");
}
statusMap.put("title",s);
statusMap.put("power","有功 (kW)");
statusMap.put("windSpeed","风速 (m/s)");
statusMaps.add(statusMap);
}
......
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