sqls="SELECT count(\"p\") FROM \"tdl_policy\".\""+device+"\" WHERE \"event\" = 'Regular measurement' and \"tdl\"='"+devList.get(i)+"' and time>="+startTime+" and time <="+resultCircuitVo.getEndTime()*1000000l;
}else{
sqls="SELECT count(\"p\") FROM \"tdl_policy\".\""+device+"\" WHERE \"event\" = 'Regular measurement' and \"tdl\"='"+devList.get(i)+"' and time>="+startTime;
sql="SELECT \"p\" FROM \"tdl_policy\".\""+device+"\" where \"data_type\" = 'data' AND \"tdl\"='"+devList.get(i)+"' and time >="+startTime+" and time<="+resultCircuitVo.getEndTime()*1000000l;
}else{
sql="SELECT \"p\" FROM \"tdl_policy\".\""+device+"\" where \"data_type\" = 'data' AND \"tdl\"='"+devList.get(i)+"' and time >="+startTime;