修改获取实时状态类型
This commit is contained in:
@ -14,7 +14,7 @@ public class AppRealTimeStatusDto {
|
||||
private String deviceImei;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
* 获取实时状态类型:FunctionAccessBatchStatusRule 批量 ,FunctionAccessStatusRule 单个
|
||||
*/
|
||||
private String typeName;
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.fuyuanshen.web.controller.device;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.fuyuanshen.app.domain.dto.APPReNameDTO;
|
||||
import com.fuyuanshen.app.domain.dto.AppRealTimeStatusDto;
|
||||
import com.fuyuanshen.app.domain.vo.APPDeviceTypeVo;
|
||||
@ -142,7 +141,7 @@ public class DeviceControlCenterController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 历史轨迹导出
|
||||
* 历史轨迹播放
|
||||
*/
|
||||
@GetMapping("/getLocationHistoryDetail")
|
||||
public R<List<LocationHistoryDetailVo>> getLocationHistoryDetail(Long id) {
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.fuyuanshen.web.service.device;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
@ -310,8 +311,8 @@ public class DeviceBizService {
|
||||
|
||||
public Map<String, Object> getRealTimeStatus(AppRealTimeStatusDto statusDto) {
|
||||
try {
|
||||
String commandType = statusDto.getTypeName()+"_" + statusDto.getFunctionMode();
|
||||
DeviceStatusRule rule = realTimeStatusEngine.getDeviceStatusRule(commandType);
|
||||
// String commandType = statusDto.getTypeName()+"_" + statusDto.getFunctionMode();"FunctionAccessBatchStatusRule"
|
||||
DeviceStatusRule rule = realTimeStatusEngine.getDeviceStatusRule(statusDto.getTypeName());
|
||||
if(rule == null){
|
||||
throw new ServiceException("未匹配到处理命令");
|
||||
}
|
||||
@ -382,11 +383,14 @@ public class DeviceBizService {
|
||||
detailVo.setDeviceName(device.getDeviceName());
|
||||
detailVo.setStartLocation(entry.getValue().get(0).getString("address"));
|
||||
detailVo.setEndLocation(entry.getValue().get(entry.getValue().size()-1).getString("address"));
|
||||
detailVo.setDetailList(entry.getValue());
|
||||
String jsonString = JSONArray.toJSONString(entry.getValue());
|
||||
List<Object> strings = JSONArray.parseArray(jsonString);
|
||||
detailVo.setDetailList(strings);
|
||||
result.add(detailVo);
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ import static com.fuyuanshen.common.core.constant.GlobalConstants.FUNCTION_ACCES
|
||||
public class FunctionAccessBatchStatusRule implements DeviceStatusRule {
|
||||
@Override
|
||||
public String getCommandType() {
|
||||
return DeviceTypeConstants.TYPE_BJQ6170+"_2";
|
||||
return "FunctionAccessBatchStatusRule";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -21,7 +21,7 @@ import static com.fuyuanshen.common.core.constant.GlobalConstants.FUNCTION_ACCES
|
||||
public class FunctionAccessStatusRule implements DeviceStatusRule {
|
||||
@Override
|
||||
public String getCommandType() {
|
||||
return DeviceTypeConstants.TYPE_BJQ6170+"_1";
|
||||
return "FunctionAccessStatusRule";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user