Stringsql="SELECT DM_EXT_DEVICE_MAPPING.ID, DM_EXT_DEVICE_MAPPING.TRACCAR_DEVICE_ID, DM_EXT_DEVICE_MAPPING.DEVICE_ID, DM_EXT_DEVICE_MAPPING.TENANT_ID, DM_EXT_DEVICE_MAPPING.STATUS FROM DM_EXT_DEVICE_MAPPING JOIN DM_DEVICE ON DM_EXT_DEVICE_MAPPING.DEVICE_ID=DM_DEVICE.ID WHERE "+
"DM_EXT_DEVICE_MAPPING.DEVICE_ID = ? AND DM_EXT_DEVICE_MAPPING.TENANT_ID = ? ORDER BY DM_EXT_DEVICE_MAPPING.ID DESC LIMIT 1";
Stringsql="SELECT "+
"DM_EXT_DEVICE_MAPPING.ID, "+
"DM_EXT_DEVICE_MAPPING.TRACCAR_DEVICE_ID, "+
"DM_EXT_DEVICE_MAPPING.DEVICE_ID, "+
"DM_EXT_DEVICE_MAPPING.TENANT_ID, "+
"DM_EXT_DEVICE_MAPPING.STATUS "+
"FROM DM_EXT_DEVICE_MAPPING "+
"JOIN DM_DEVICE ON DM_EXT_DEVICE_MAPPING.DEVICE_ID=DM_DEVICE.ID "+
"WHERE DM_EXT_DEVICE_MAPPING.DEVICE_ID = ? AND DM_EXT_DEVICE_MAPPING.TENANT_ID = ? "+