// String sql = "SELECT \"T\",\"h\" FROM \"tdl_policy\".\""+deviceMessageVo.getType()+"_"+deviceMessageVo.getSN()+"\" where \"tdl\" = \'TDL-"+searchTdlVo.getTdlSN()+"\' order by time ";
Stringsql="SELECT \"T\",\"h\" FROM \"tdl_policy\".\""+deviceMessageVo.getType()+"_"+deviceMessageVo.getSN()+"\" where \"tdl\" = \'TDL-"+searchTdlVo.getTDLSN()+"\' order by time ";
Stringsql="SELECT \"T\",\"h\" FROM \"tdl_policy\".\"WTD93LG_17110194\" where \"tdl\" = \'TDL-1706190193608\' order by time ";
// String sql = "SELECT \"T\",\"h\" FROM \"tdl_policy\".\"WTD93LG_17110194\" where \"tdl\" = \'TDL-1706190193608\' order by time ";
select warehouseNo,w.img,warehouseName,c.country,c.city,CONCAT_WS("-",c.country,c.city) regions ,w.addressDetail,r.regionName,lng,lat,a.alarmType,property,
select w.warehouseNo,w.img,warehouseName,ct.country,ct.city,CONCAT_WS("-",ct.country,ct.city) regions ,w.addressDetail,r.regionName,lng,lat,property,
select warehouseNo,w.img,warehouseName,c.country,c.city,CONCAT_WS("-",c.country,c.city) regions ,w.addressDetail,r.regionName,lng,lat,a.alarmType,property,
select warehouseNo,w.img,warehouseName,ct.country,ct.city,CONCAT_WS("-",ct.country,ct.city) regions ,w.addressDetail,r.regionName,lng,lat,property,
select warehouseNo,w.img,warehouseName,c.country,c.city,CONCAT_WS("-",c.country,c.city) regions ,w.addressDetail,r.regionName,lng,lat,a.alarmType,property,
select warehouseNo,w.img,warehouseName,ct.country,ct.city,CONCAT_WS("-",ct.country,ct.city) regions ,w.addressDetail,r.regionName,lng,lat,property,
select warehouseNo, warehouseName,CONCAT_WS("-",c.country,c.city) regions,c.country,c.city, (select count(id) from tdldevice t where t.warehouse_id = w.id ) count,property,type,hardwareLevel,areaPlanIndoor
select warehouseNo, warehouseName,CONCAT_WS("-",ct.country,ct.city) regions,ct.country,ct.city, (select count(id) from tdldevice t where t.warehouse_id = w.id ) count,property,type,hardwareLevel,areaPlanIndoor
SELECT warehouseNo,warehouseName,c.country,c.city,addressDetail,(SELECT COUNT(id) from gateway_warehouse WHERE warehouse_id=w.id) gatewayCounts,
SELECT warehouseNo,warehouseName,c.country,c.city,addressDetail,(SELECT COUNT(DISTINCT gatewaySN) from tdl_gateway_log WHERE warehouseNo=w.warehouseNo) gatewayCounts,
(SELECT COUNT(id) FROM tdldevice WHERE warehouse_id=w.id) tdlCounts,,property,type,hardwareLevel,areaPlanIndoor
(SELECT COUNT(TDLSN) from tdl_gateway_log WHERE warehouseNo=w.warehouseNo) tdlCounts,property,type,hardwareLevel,areaPlanIndoor
from warehouse w INNER JOIN city c ON w.city_id=c.id
from warehouse w INNER JOIN city c ON w.city_id=c.id