StringBufferquerysql=newStringBuffer("SELECT createdTime ,gatewayId,address,valueLabel,equipmentSpecificName,value FROM iot_data_%s WHERE isAlarm='1' and value!='0.0' and gatewayId= %s ORDER BY time desc LIMIT %d OFFSET %d ");
StringBufferquerysqlcount=newStringBuffer("SELECT count(value) FROM iot_data_%s WHERE isAlarm='1' and value!='0.0' and gatewayId= %s ");
if(StringUtils.isNotEmpty(equipmentNumber)){
Stringdate=" '%s' and equipmentSpecificName=~/.*%s风机.*/ ";
sql=String.format("SELECT equipmentIndexName, value, frontModule FROM \"indicators_%s\" WHERE equipmentNumber = '%s' and frontModule =~/%s/ and systemType =~/%s/ ",stationBasic.getFanGatewayId(),equipNum,frontModule,systemType);
}else{
sql=String.format("SELECT equipmentIndexName, value, frontModule FROM \"indicators_%s\" WHERE equipmentNumber = '%s' and frontModule =~/%s/",stationBasic.getFanGatewayId(),equipNum,frontModule);
Stringsql=String.format("SELECT equipmentNumber, equipmentSpecificName, equipmentIndexName FROM \"indicators_%s\" WHERE equipmentNumber = '%s' and value = 'true' order by time desc limit 1",stationBasic.getFanGatewayId(),equipNum);