@@ -222,9 +223,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
...
@@ -222,9 +223,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
Page<IndexDto>page=newPage<>(current,size);
Page<IndexDto>page=newPage<>(current,size);
Stringsql="";
Stringsql="";
if(StringUtils.isNotEmpty(systemType)){
if(StringUtils.isNotEmpty(systemType)){
sql=String.format("SELECT equipmentIndexName, value, frontModule, unit FROM \"indicators_%s\" WHERE equipmentNumber = '%s' and frontModule =~/%s/ and systemType =~/%s/ ",stationBasic.getFanGatewayId(),equipNum,frontModule,systemType);
sql=String.format("SELECT equipmentIndexName, value, frontModule,systemType, unit FROM \"indicators_%s\" WHERE equipmentNumber = '%s' and frontModule =~/%s/ and systemType =~/%s/ ",stationBasic.getFanGatewayId(),equipNum,frontModule,systemType);
}else{
}else{
sql=String.format("SELECT equipmentIndexName, value, frontModule, unit FROM \"indicators_%s\" WHERE equipmentNumber = '%s' and frontModule =~/%s/",stationBasic.getFanGatewayId(),equipNum,frontModule);
sql=String.format("SELECT equipmentIndexName, value, frontModule,systemType, 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());
Stringsql=String.format("SELECT equipmentNumber, equipmentIndexName as state FROM \"indicators_%s\" WHERE (equipmentIndexName =~/^发电状态|报警状态|停机状态|故障状态|待机状态|维护状态|正常发电状态$/ and value = 'true') or (equipmentIndexName ='实时故障22' and value='9')",stationBasic.getFanGatewayId());
StringpowerSql=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());
// String sql = String.format("SELECT equipmentNumber, equipmentIndexName as state FROM \"indicators_%s\" WHERE equipmentIndexName =~/^报警状态|停机状态|故障状态|待机状态|维护状态|正常发电状态$/ and value = 'true'", stationBasic.getFanGatewayId());
StringpowerSql=String.format("SELECT equipmentNumber, value FROM \"indicators_%s\" WHERE equipmentSpecificName =~/^%s$/ and value = '9.0'",stationBasic.getFanGatewayId(),equipmentSpecificNames);
// String powerSql = String.format("SELECT equipmentNumber, value FROM \"indicators_%s\" WHERE equipmentSpecificName =~/^%s$/ and value = '9.0'", stationBasic.getFanGatewayId(), equipmentSpecificNames);