|
@@ -1,5 +1,7 @@
|
|
|
package com.ozs.web.controller.accountmanagment;
|
|
|
|
|
|
+import com.alibaba.fastjson2.JSON;
|
|
|
+import com.alibaba.fastjson2.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.ozs.common.annotation.Log;
|
|
@@ -9,6 +11,7 @@ import com.ozs.common.core.domain.entity.SysDictData;
|
|
|
import com.ozs.common.core.redis.RedisCache;
|
|
|
import com.ozs.common.enums.BusinessType;
|
|
|
import com.ozs.common.utils.ChineseToPingyin;
|
|
|
+import com.ozs.common.utils.HeartbeatUtils;
|
|
|
import com.ozs.common.utils.StringUtils;
|
|
|
import com.ozs.common.utils.file.FileUtils;
|
|
|
import com.ozs.common.utils.poi.ExcelUtil;
|
|
@@ -68,6 +71,8 @@ public class BaseVehicleController extends BaseController {
|
|
|
BaseDeviceDynamicManagementService baseDeviceDynamicManagementService;
|
|
|
@Autowired
|
|
|
private RedisCache redisCache;
|
|
|
+ @Autowired
|
|
|
+ private HeartbeatUtils heartbeatUtils;
|
|
|
|
|
|
/**
|
|
|
* 车载终端挂载列表
|
|
@@ -343,7 +348,8 @@ public class BaseVehicleController extends BaseController {
|
|
|
@GetMapping("/vehicleCurrentStream")
|
|
|
@Log(title = "通过终端编码获取流", businessType = BusinessType.SELECT)
|
|
|
public AjaxResult vehicleCurrentStream(String zdCode) {
|
|
|
- Map<String, Object> cacheMap = redisCache.getCacheMap(Constant.HERTBEA_KEY + zdCode);
|
|
|
+ String heartbeat = heartbeatUtils.getHeartbeat(zdCode);
|
|
|
+ Map<String, Object> cacheMap = JSON.parseObject(heartbeat);
|
|
|
if (!ObjectUtils.isEmpty(cacheMap)) {
|
|
|
Map<String, String> ccMap = new HashMap<>();
|
|
|
Object cameraCode = cacheMap.get("cameraCode");
|