//// if (resultCircuitVo.getEndTime() != null && resultCircuitVo.getEndTime() != 0) {
//// sql = "SELECT "+field+" FROM \"tdl_policy\".\"" + device + "\" where \"tdl\"='" + devList.get(i) + "' and time >=" + startTime + " and time<=" + resultCircuitVo.getEndTime() * 1000000l + " ORDER BY time ";
//// } else {
//// sql = "SELECT "+field+" FROM \"tdl_policy\".\"" + device + "\" where \"tdl\"='" + devList.get(i) + "' and time >=" + startTime + " ORDER BY time";
@@ -324,7 +325,9 @@ public class WarehouseController {
...
@@ -324,7 +325,9 @@ public class WarehouseController {
}else{
}else{
gatewayOnLineVo.setState(6);
gatewayOnLineVo.setState(6);
}
}
Stringsql="SELECT \"battery\" FROM \"tdl_policy\".\""+list.get(a).getDevice()+"\"where time >="+list.get(a).getCreateTime()+" ORDER BY time DESC LIMIT 1";
Stringsqls="SELECT \"b\", \"T\", \"h\" FROM \"tdl_policy\".\""+list.get(a).getDevice()+"\" WHERE (\"tdl\" = '"+tdls.get(b)+"') and time>="+list.get(a).getEndTime()+" ORDER BY time DESC LIMIT 1";
Stringsqls="SELECT \"b\", \"T\", \"h\" FROM \"tdl_policy\".\""+list.get(a).getDevice()+"\" WHERE (\"tdl\" = '"+tdls.get(b)+"') and time>="+startTime*1000000l+" ORDER BY time DESC LIMIT 1";
Stringsql="SELECT \"battery\" FROM \"tdl_policy\".\""+device+"\" where time >="+gatewayOnLineVos.get(a).getStartTime()*1000000l+" ORDER BY time DESC LIMIT 1";
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+" ORDER BY time ";
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 ";