sql="SELECT \"battery\" FROM \"tdl_policy\".\""+gatewayVo.getgType()+"_"+gatewayVo.getgSN()+"\" where time >="+circuitVo.getStartTime()+" and time<="+circuitVo.getEndTime()*1000000l+" ORDER BY time desc limit 1";
}else{
sql="SELECT \"battery\" FROM \"tdl_policy\".\""+gatewayVo.getgType()+"_"+gatewayVo.getgSN()+"\" where time >="+circuitVo.getStartTime()+" ORDER BY time desc limit 1";
sql1="SELECT \"b\" FROM \"tdl_policy\".\""+gatewayVo.getgType()+"_"+gatewayVo.getgSN()+"\" where \"tdl\"='"+TDL.get(i)+"' and time >="+circuitVo.getStartTime()+" and time<="+circuitVo.getEndTime()*1000000l+" ORDER BY time desc limit 1";
}else{
sql1="SELECT \"b\" FROM \"tdl_policy\".\""+gatewayVo.getgType()+"_"+gatewayVo.getgSN()+"\" where \"tdl\"='"+TDL.get(i)+"' and time >="+circuitVo.getStartTime()+" ORDER BY time desc limit 1";