Commit d5551dff authored by caotao's avatar caotao

更新风机状态、更新光伏相关客户现场对接问题

parent 3e57ff14
......@@ -50,7 +50,7 @@ public class CommonConstans {
put("故障状态", "故障停机");
put("待机状态", "待机状态");
put("维护状态", "维护状态");
put("限功率", "限功率");
put("限功率", "实时故障22");
put("通讯中断", "通讯中断");
}
......
......@@ -318,7 +318,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
// }
// });
StationBasic stationBasic = getOneByStationNumber(stationId);
String sql = String.format("SELECT equipmentNumber, equipmentIndexName as state FROM \"indicators_%s\" WHERE equipmentIndexName =~/^发电状态|报警状态|停机状态|故障状态|待机状态|维护状态|正常发电状态$/ and value = 'true'", stationBasic.getFanGatewayId());
String sql = String.format("SELECT equipmentNumber, equipmentIndexName as state FROM \"indicators_%s\" WHERE (equipmentIndexName =~/^发电状态|报警状态|停机状态|故障状态|待机状态|维护状态|正常发电状态$/ and value = 'true') or (equipmentIndexName ='实时故障22' and value='9')", stationBasic.getFanGatewayId());
List<IndexDto> influxDBList = influxDButils.getListData(sql, IndexDto.class);
String sqlEquipNumList = String.format("SELECT (DISTINCT equipmentNumber) as equipmentNumber FROM \"indicators_%s\"", stationBasic.getFanGatewayId());
List<IndexDto> equipNumList = influxDButils.getListData(sqlEquipNumList, IndexDto.class);
......@@ -1398,7 +1398,6 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
url = pictureUrl + urls[1];
} else {
url = pictureUrl + urls[0];
;
}
if (data.getDisplayName().split("_").length > 2) {
photoUrls.put(KGName.getCode(data.getDisplayName().split("_")[1]), url);
......@@ -1463,8 +1462,11 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
String sql = "SELECT * FROM indicators_" + gatewayId + " WHERE equipmentNumber ='" + equipmentNumber + "' limit 1 ";
List<IndicatorsDto> list = influxDButils.getListData(sql, IndicatorsDto.class);
if (!ValidationUtil.isEmpty(list)) {
resultMap.put("equipmentSpecificName", list.get(0).getEquipmentSpecificName());
resultMap.put("equipmentIndexName", list.get(0).getEquipmentSpecificName());
// resultMap.put("equipmentSpecificName", list.get(0).getEquipmentSpecificName());
// resultMap.put("equipmentIndexName", list.get(0).getEquipmentSpecificName());
//箱变名称与箱变型号去掉区域
resultMap.put("equipmentSpecificName", list.get(0).getEquipmentSpecificName().split("区域/")[1]);
resultMap.put("equipmentIndexName", list.get(0).getEquipmentSpecificName().split("区域/")[1]);
resultMap.put("equipmentInfoName", list.get(0).getEquipmentSpecificName().substring(5).replace("/", " "));
resultMap.put("status", list.get(0).getValue().equals("false") ? "异常" : "正常运行");
}
......
......@@ -223,8 +223,8 @@ public class MonitoringServiceImpl {
mapList1 = influxdbUtil.query("SELECT * FROM indicators_" + stationBasic.getBoosterGatewayId() + " where equipmentIndexName='WTX-801_25_WTX-801_总辐射'");
completionOfPowerIndicatorsDto.setWindSpeedOrIrradiance(String.valueOf(commonServiceImpl.getTotalByIndicatior(mapList1, "WTX-801_25_WTX-801_总辐射")));
completionOfPowerIndicatorsDto.setActivePower(String.valueOf(commonServiceImpl.getTotalByIndicatior(mapList, "有功功率")));
completionOfPowerIndicatorsDto.setDailyPower(String.valueOf(commonServiceImpl.getTotalByIndicatior(mapList, "日发电量") * CommonConstans.pvGenPoweActor));
completionOfPowerIndicatorsDto.setMonthlyPower(String.valueOf(commonServiceImpl.getTotalByIndicatior(mapList, "月发电量") * CommonConstans.pvGenPoweActor));
completionOfPowerIndicatorsDto.setDailyPower(String.format("%.2f",commonServiceImpl.getTotalByIndicatior(mapList, "日发电量") * CommonConstans.pvGenPoweActor));
completionOfPowerIndicatorsDto.setMonthlyPower(String.format("%.2f",commonServiceImpl.getTotalByIndicatior(mapList, "月发电量") * CommonConstans.pvGenPoweActor));
completionOfPowerIndicatorsDto.setAnnualPower(String.format("%.2f", new BigDecimal(commonServiceImpl.getTotalByIndicatior(mapList, "年发电量") * CommonConstans.pvGenPoweActor)));
}
......@@ -680,7 +680,6 @@ public class MonitoringServiceImpl {
if (!stationBasic.getStationType().equals("FDZ")) {
mapListData = influxdbUtil.query("SELECT * FROM indicators_" + stationBasic.getFanGatewayId() + " where frontModule=~/逆变器/ and (equipmentIndexName='" + finalIndicator + "' )");
total = commonServiceImpl.getTotalByIndicatior(mapListData, finalIndicator) * CommonConstans.pvGenPoweActor;
} else {
mapListData = influxdbUtil.query("SELECT * FROM indicators_" + stationBasic.getFanGatewayId() + " where (equipmentIndexName='" + finalIndicator + "' )");
total = commonServiceImpl.getTotalByIndicatior(mapListData, finalIndicator);
......
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