sqls="SELECT \"tdl\",\"T\", \"b\", \"h\", \"p\" FROM \"tdl_policy\".\""+device+"\" where \"tdl\"= "+tdl+" AND \"time\"<='"+locationDataVos.get(a).getTime()+"' AND \"time\">='"+locationDataVos.get(a+1).getTime()+"' order by time limit 1";
}else{
sqls="SELECT \"tdl\",\"T\", \"b\", \"h\", \"p\" FROM \"tdl_policy\".\""+device+"\" where \"tdl\"= "+tdl+" AND \"time\"<='"+locationDataVos.get(a).getTime()+"' order by time limit 1";
sqls="SELECT \"tdl\",\"T\", \"b\", \"h\", \"p\" FROM \"tdl_policy\".\""+device+"\" where \"tdl\"= "+tdl+" AND \"time\"<='"+locationDataVos.get(a).getTime()+"' AND \"time\">='"+locationDataVos.get(a+1).getTime()+"' order by time limit 1";
}else{
sqls="SELECT \"tdl\",\"T\", \"b\", \"h\", \"p\" FROM \"tdl_policy\".\""+device+"\" where \"tdl\"= "+tdl+" AND \"time\"<='"+locationDataVos.get(a).getTime()+"' order by time limit 1";
// SELECT "tdl","T", "b", "h", "p" FROM "tdl_policy"."WTD93LG_20180314" WHERE ("tdl" = 'tdl-0F0D0C0B0A') or "tdl" = 'tdl-0A0B0C0D0F' AND $timeFilter
// String sqls = "SELECT \"time\",\"b\",\"t\",\"h\",\"p\" FROM \"tdl_policy\".\""+device+"\" where \"tdl\"= "+tdl+" and \"time\"<='"+locationDataVos.get(a).getTime()+"' ORDER BY time desc limit 1;";
returngson.toJson(trackVos);
// List<LocationDataVo> locationDataVos1 = new ArrayList<>();
// for(int a=0;a<locationDataVos.size();a++){
// String sqls="SELECT \"time\",\"T\",\"h\",\"b\",\"p\" FROM \"tdl_policy\".\""+device+"\" where time <='"+locationDataVos.get(a).getTime()+"' ORDER BY time desc limit 1;";
// List<LocationDataVo> locationDataVos1 = new ArrayList<>();
// if (queryResult1.getResults().get(0).getSeries()!=null){
// locationDataVos1=getAllAddress(queryResult1);
// }
// for (int a=0;a<locationDataVos1.size();a++){
// for (int b=0;b<locationDataVos.size();b++){
// if (locationDataVos1.get(a).getLng().equals(locationDataVos.get(b).getLng())&&locationDataVos1.get(a).getLat().equals(locationDataVos.get(b).getLat())){
// locationDataVos1.get(a).setError(1);
// }
// }
// }
}
...
@@ -245,7 +365,7 @@ public class AlarmDataController {
...
@@ -245,7 +365,7 @@ public class AlarmDataController {