@@ -197,14 +199,14 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
sql=String.format("SELECT equipmentIndexName, value, frontModule, unit FROM \"indicators_%s\" WHERE equipmentNumber = '%s' and frontModule =~/%s/",stationBasic.getFanGatewayId(),equipNum,frontModule);
// String sql = String.format("SELECT equipmentNumber, equipmentIndexName as state FROM \"indicators_%s\" WHERE equipmentIndexName =~/^报警状态|停机状态|故障状态|待机状态|维护状态|正常发电状态$/ and value = 'true'", stationBasic.getFanGatewayId());
// String powerSql = String.format("SELECT equipmentNumber, value FROM \"indicators_%s\" WHERE equipmentSpecificName =~/^%s$/ and value = '9.0'", stationBasic.getFanGatewayId(), equipmentSpecificNames);
Stringsql=String.format("SELECT equipmentNumber, equipmentIndexName as state FROM \"indicators_%s\" WHERE equipmentIndexName =~/^报警状态|停机状态|故障状态|待机状态|维护状态|正常发电状态$/ and value = 'true'",stationBasic.getFanGatewayId());
...
...
@@ -465,6 +469,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
/**
* 根据风机号 场站号 模块获取实时温度
*
* @param equipNum
* @param stationId
* @param frontModule
...
...
@@ -479,7 +484,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
@@ -556,31 +561,31 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}catch(ParseExceptione){
e.printStackTrace();
}
Stringsql="SELECT DISTINCT value FROM iot_data_"+gatewayId+" WHERE equipmentIndexName = '瞬时风速' and equipmentSpecificName =~/"+name+"/and time >='"+time+"'GROUP BY time(2m)";
Stringsql1="SELECT DISTINCT value FROM iot_data_"+gatewayId+" WHERE equipmentIndexName = '有功功率' and equipmentSpecificName =~/"+name+"/ and time >='"+time+"'GROUP BY time(2m)";
Stringsql="SELECT DISTINCT value FROM iot_data_"+gatewayId+" WHERE equipmentIndexName = '瞬时风速' and equipmentSpecificName =~/"+name+"/and time >='"+time+"'GROUP BY time(2m)";
Stringsql1="SELECT DISTINCT value FROM iot_data_"+gatewayId+" WHERE equipmentIndexName = '有功功率' and equipmentSpecificName =~/"+name+"/ and time >='"+time+"'GROUP BY time(2m)";
Stringsql=" SELECT displayName , value as state,equipmentIndexName FROM indicators_"+gatewayId+" WHERE frontModule =~/"+frontModule+"/ and systemType = '"+systemType+"'";
if(null!=equipNum){
sql=" SELECT displayName , value as state,equipmentIndexName FROM indicators_"+gatewayId+" WHERE frontModule =~/"+frontModule+"/ and systemType = '"+systemType+"' and equipmentNumber ='"+equipNum+"'";
Stringsql=" SELECT displayName , value as state,equipmentIndexName FROM indicators_"+gatewayId+" WHERE frontModule =~/"+frontModule+"/ and systemType = '"+systemType+"'";
if(null!=equipNum){
sql=" SELECT displayName , value as state,equipmentIndexName FROM indicators_"+gatewayId+" WHERE frontModule =~/"+frontModule+"/ and systemType = '"+systemType+"' and equipmentNumber ='"+equipNum+"'";
StringbaseSql="SELECT equipmentNumber, value, equipmentIndexName FROM \"indicators_%s\" where equipmentIndexName = '%s' or equipmentIndexName = '%s' or equipmentIndexName = '%s' or equipmentIndexName = '%s'";
Stringzb1Sql=String.format("SELECT * FROM \"indicators_%s\" WHERE frontModule = '1主变' and systemType = '模拟量' and (displayName = '档位' or displayName = '油面温1' or displayName = '油面温2' or displayName = '绕组温度' ) ",gatewayId);
Stringsql=" SELECT equipmentNumber, equipmentSpecificName FROM indicators_"+gatewayId+" WHERE frontModule = '"+frontModule+"' and equipmentNumber !=''";
if(null!=equipmentNumber){
sql=" SELECT equipmentNumber, equipmentSpecificName FROM indicators_"+gatewayId+" WHERE equipmentNumber =~/"+equipmentNumber+"/ and frontModule = '"+frontModule+"'";
Stringsql=" SELECT equipmentNumber, equipmentSpecificName FROM indicators_"+gatewayId+" WHERE frontModule = '"+frontModule+"' and equipmentNumber !=''";
if(null!=equipmentNumber){
sql=" SELECT equipmentNumber, equipmentSpecificName FROM indicators_"+gatewayId+" WHERE equipmentNumber =~/"+equipmentNumber+"/ and frontModule = '"+frontModule+"'";
Stringsql="SELECT * FROM indicators_"+gatewayId+" WHERE equipmentIndexName = '有功功率' or equipmentIndexName = '逆变器效率' or equipmentIndexName ='总直流功率' or equipmentIndexName ='日发电量' or equipmentIndexName ='总发电量' ";
Stringsql="SELECT * FROM indicators_"+gatewayId+" WHERE equipmentIndexName = '有功功率' or equipmentIndexName = '逆变器效率' or equipmentIndexName ='总直流功率' or equipmentIndexName ='日发电量' or equipmentIndexName ='总发电量' ";
@@ -1640,41 +1642,41 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
e.printStackTrace();
}
String[]equipNumber=equipNum.split("-");
Stringsql="SELECT time ,equipmentIndexName ,value FROM iot_data_"+gatewayId+" WHERE time >'"+time+"' and equipmentSpecificName =~/"+equipNumber[0]+"子阵/ and equipmentSpecificName =~/逆变器"+equipNumber[1]+"/ and equipmentSpecificName =~/"+Integer.parseInt(equipNumber[2])+"汇流箱/ and equipmentIndexName =~/路电流/";
StringtimeSql="SELECT DISTINCT value FROM iot_data_"+gatewayId+" WHERE time >'"+time+"' and equipmentSpecificName =~/"+equipNumber[0]+"子阵/ and equipmentSpecificName =~/逆变器"+equipNumber[1]+"/ and equipmentSpecificName =~/"+Integer.parseInt(equipNumber[2])+"汇流箱/ and equipmentIndexName =~/路电流/ group by time(2m)";
Stringsql="SELECT time ,equipmentIndexName ,value FROM iot_data_"+gatewayId+" WHERE time >'"+time+"' and equipmentSpecificName =~/"+equipNumber[0]+"子阵/ and equipmentSpecificName =~/逆变器"+equipNumber[1]+"/ and equipmentSpecificName =~/"+Integer.parseInt(equipNumber[2])+"汇流箱/ and equipmentIndexName =~/路电流/";
StringtimeSql="SELECT DISTINCT value FROM iot_data_"+gatewayId+" WHERE time >'"+time+"' and equipmentSpecificName =~/"+equipNumber[0]+"子阵/ and equipmentSpecificName =~/逆变器"+equipNumber[1]+"/ and equipmentSpecificName =~/"+Integer.parseInt(equipNumber[2])+"汇流箱/ and equipmentIndexName =~/路电流/ group by time(2m)";
Stringsql=" SELECT * FROM indicators_"+gatewayId+" WHERE (equipmentIndexName ='待机' or equipmentIndexName ='故障停机' or equipmentIndexName ='告警运行' or equipmentIndexName ='限额运行' or equipmentIndexName ='停机') and value = 'true'";
Stringsql=" SELECT * FROM indicators_"+gatewayId+" WHERE (equipmentIndexName ='待机' or equipmentIndexName ='故障停机' or equipmentIndexName ='告警运行' or equipmentIndexName ='限额运行' or equipmentIndexName ='停机') and value = 'true'";
mapList=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where (equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量' or equipmentIndexName='有功功率' or equipmentIndexName='30秒平均风速' )");
mapList=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where frontModule=~/逆变器/ and(equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量' or equipmentIndexName='有功功率')");
mapList1=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getBoosterGatewayId()+" where equipmentIndexName='WTX-801_25_WTX-801_总辐射'");
mapListData=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where frontModule=~/逆变器/ and (equipmentIndexName='"+finalIndicator+"' )");
mapListData=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where frontModule=~/逆变器/ and (equipmentIndexName='"+finalIndicator+"' )");
@@ -615,14 +623,14 @@ public class MonitoringServiceImpl {
mapList=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where frontModule=~/逆变器/ and (equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量' )");
mapListData=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where frontModule=~/逆变器/ and (equipmentIndexName='"+finalIndicator+"' )");
mapListData=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where frontModule=~/逆变器/ and (equipmentIndexName='"+finalIndicator+"' )");
mapListData=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where frontModule=~/逆变器/ and (equipmentIndexName='"+finalIndicator+"' )");
mapList=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()+" where frontModule=~/逆变器/ and (equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量' )");