Commit 4f488db7 authored by tangwei's avatar tangwei

修改bug

parent 4fab24f8
...@@ -123,8 +123,8 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -123,8 +123,8 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
page.setCurrent(current); page.setCurrent(current);
page.setSize(size); page.setSize(size);
String table = gateway; String table = gateway;
StringBuffer querysql = new StringBuffer("SELECT createdTime ,equipmentNumber,gatewayId,address,valueLabel,equipmentSpecificName,value FROM indicators_%s WHERE isAlarm='1' and value!='0.0' and gatewayId= %s ORDER BY time desc LIMIT %d OFFSET %d "); StringBuffer querysql = new StringBuffer("SELECT createdTime ,equipmentNumber,gatewayId,address,valueLabel,equipmentSpecificName,value FROM indicators_%s WHERE isAlarm='1' and value!='0.0' and value!=valueLabel and gatewayId= %s ORDER BY time desc LIMIT %d OFFSET %d ");
StringBuffer querysqlcount = new StringBuffer("SELECT count(value) FROM indicators_%s WHERE isAlarm='1' and value!='0.0' and gatewayId= %s "); StringBuffer querysqlcount = new StringBuffer("SELECT count(value) FROM indicators_%s WHERE isAlarm='1' and value!='0.0' and value!=valueLabel and gatewayId= %s ");
if (StringUtils.isNotEmpty(equipmentNumber)) { if (StringUtils.isNotEmpty(equipmentNumber)) {
String date = "'%s' and equipmentNumber = '%s' "; String date = "'%s' and equipmentNumber = '%s' ";
gateway = String.format(date, gateway, equipmentNumber); gateway = String.format(date, gateway, equipmentNumber);
...@@ -160,8 +160,8 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -160,8 +160,8 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
page.setCurrent(current); page.setCurrent(current);
page.setSize(size); page.setSize(size);
String table = gateway; String table = gateway;
StringBuffer querysql = new StringBuffer("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 "); StringBuffer querysql = new StringBuffer("SELECT createdTime ,gatewayId,address,valueLabel,equipmentSpecificName,value FROM iot_data_%s WHERE isAlarm='1' and value!=valueLabel and value!='0.0' and gatewayId= %s ORDER BY time desc LIMIT %d OFFSET %d ");
StringBuffer querysqlcount = new StringBuffer("SELECT count(value) FROM iot_data_%s WHERE isAlarm='1' and value!='0.0' and gatewayId= %s "); StringBuffer querysqlcount = new StringBuffer("SELECT count(value) FROM iot_data_%s WHERE isAlarm='1' and value!='0.0' and value!=valueLabel and gatewayId= %s ");
if (StringUtils.isNotEmpty(equipmentNumber)) { if (StringUtils.isNotEmpty(equipmentNumber)) {
String date = " '%s' and equipmentSpecificName=~/.*%s风机.*/ "; String date = " '%s' and equipmentSpecificName=~/.*%s风机.*/ ";
gateway = String.format(date, gateway, equipmentNumber); gateway = String.format(date, gateway, equipmentNumber);
......
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