|
@@ -134,38 +134,6 @@ class RouteMap extends CatchController
|
|
|
$end_time=strtotime($params['time_range'][1]);
|
|
|
}
|
|
|
|
|
|
- // 判断设备是否为第三方的,如果是则调用第三方接口获取
|
|
|
- $isThirdParty = \catchAdmin\student\model\ThirdPartyDevices::isThirdPartyDevice($active_rfid);
|
|
|
- // var_dump('isThirdParty', $isThirdParty);
|
|
|
- if ($isThirdParty) {
|
|
|
- $options = [
|
|
|
- 'startTime' => $start_time,
|
|
|
- 'endTime' => $end_time,
|
|
|
- // 'positionTypes' => 1, //1,2
|
|
|
- ];
|
|
|
- $api_routes = \thirdapi\ThirdDeviceApi2::getHistoryLocations($active_rfid, $options);
|
|
|
- if (!$api_routes) {
|
|
|
- return CatchResponse::fail("查询轨迹失败");
|
|
|
- }
|
|
|
- $routes = [];
|
|
|
- if (isset($api_routes['content']) && !empty($api_routes['content'])) {
|
|
|
- foreach ($api_routes['content'] as $info) {
|
|
|
- $routes[] = [
|
|
|
- 'AlarmType' => 0,
|
|
|
- 'Altitude' => '',
|
|
|
- 'DeviceNumber' => $info['imei'],
|
|
|
- 'Latitude' => $info['lat'],
|
|
|
- 'Longitude' => $info['lon'],
|
|
|
- 'PassTime' => $info['receiveAt'],
|
|
|
- 'Battery' => $info['battery'],
|
|
|
- 'CollectDt' => $info['collectDt'],
|
|
|
- 'PositionType' => $info['positionType'],
|
|
|
- 'IsOnline' => $info['isOnline'],
|
|
|
- ];
|
|
|
- }
|
|
|
- }
|
|
|
- return CatchResponse::success($routes, "查询轨迹成功");
|
|
|
- }
|
|
|
|
|
|
// 非第三方设备从表格存储获取
|
|
|
// $otsClient = new OTSClient (array (
|