Stringsql="SELECT \"battery\" FROM \"tdl_policy\".\""+device+"\" where 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 ";
Stringsqls="SELECT \"tdl\",\"b\",\"T\",\"h\" FROM \"tdl_policy\".\""+device+"\" WHERE \"tdl\" = '"+tdlDeviceVo.getTDLSN()+"' AND time >="+gatewayOnLineVos.get(a).getStartTime()*1000000l+" and time <="+endTime*1000000l+" ORDER BY time desc limit 1 ";
@@ -1049,7 +1062,7 @@ public class WarehouseController {
warehouseDataVo.setTemperature("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+" and time <="+endTime*1000000l+" ORDER BY time ";
Stringsql3="SELECT \"tdl\",\"T\",\"h\" FROM \"tdl_policy\".\""+device+"\" WHERE \"tdl\" = '"+tdlDeviceVo.getTDLSN()+"' AND time >="+gatewayOnLineVos.get(a).getStartTime()*1000000l+" and time <="+endTime*1000000l+" ORDER BY time ";