sqls=sqls+"SELECT \"time\",\"lng\",\"lat\" FROM \"tdl_policy\".\""+device+"\" where time <='"+circuitAlarmVos.get(a).getTime()+"' ORDER BY time desc limit 1;";
from gateway WHERE id=(SELECT gateway_id from tdldevice where circuit_id =(SELECT id from circuit WHERE transportationNo=#{transportationNo,jdbcType=VARCHAR}))
from gateway WHERE id=(SELECT gateway_id from tdldevice where circuit_id =(
SELECT id from circuit WHERE transportationNo=#{transportationNo,jdbcType=VARCHAR}) LIMIT 1)