Stringsqls="SELECT \"tdl\",\"b\",\"T\",\"h\" FROM \"tdl_policy\".\""+device+"\" WHERE \"tdl\" = '"+tdls.get(b)+"' AND time >="+gatewayOnLineVos.get(a).getStartTime()*1000000l+" ORDER BY time desc limit 1 ";
Stringsqls="SELECT \"tdl\",\"b\",\"T\",\"h\" FROM \"tdl_policy\".\""+device+"\" WHERE \"tdl\" = '"+tdls.get(b)+"' AND time >="+gatewayOnLineVos.get(a).getStartTime()*1000000l+" and time <="+endTime*1000000l+" ORDER BY time desc limit 1 ";
@@ -1049,7 +1050,7 @@ public class WarehouseController {
...
@@ -1049,7 +1050,7 @@ public class WarehouseController {
warehouseDataVo.setTemperature("NA");
warehouseDataVo.setTemperature("NA");
warehouseDataVo.setHumidity("NA");
warehouseDataVo.setHumidity("NA");
}
}
Stringsql3="SELECT \"tdl\",\"T\",\"h\" FROM \"tdl_policy\".\""+device+"\" WHERE \"tdl\" = '"+tdls.get(b)+"' AND time >="+gatewayOnLineVos.get(a).getStartTime()*1000000l+" ORDER BY time ";
Stringsql3="SELECT \"tdl\",\"T\",\"h\" FROM \"tdl_policy\".\""+device+"\" WHERE \"tdl\" = '"+tdls.get(b)+"' AND time >="+gatewayOnLineVos.get(a).getStartTime()*1000000l+" and time <="+endTime*1000000l+" ORDER BY time ";