修改获取实时状态类型
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
|
||||
|
@ -20,6 +20,12 @@ public class InstructionRecordDto {
|
||||
* 设备IMEI
|
||||
*/
|
||||
private String deviceImei;
|
||||
|
||||
/**
|
||||
* content
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 操作时间-开始时间
|
||||
*/
|
||||
|
@ -113,4 +113,6 @@ public class DeviceQueryCriteria extends BaseEntity {
|
||||
*/
|
||||
private String area;
|
||||
|
||||
private String content;
|
||||
|
||||
}
|
||||
|
@ -36,6 +36,6 @@ public class LocationHistoryDetailVo {
|
||||
* 轨迹详情
|
||||
*/
|
||||
@ExcelProperty(value = "轨迹详情")
|
||||
private List<JSONObject> detailList;
|
||||
private List<Object> detailList;
|
||||
|
||||
}
|
||||
|
@ -28,6 +28,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="bo.deviceImei != null and bo.deviceImei != ''">
|
||||
AND b.device_imei = #{bo.deviceImei}
|
||||
</if>
|
||||
<if test="bo.content != null and bo.content != ''">
|
||||
AND b.device_imei = #{bo.content} or b.device_mac = #{bo.content}
|
||||
</if>
|
||||
<if test="bo.startTime != null and bo.startTime != ''">
|
||||
AND a.create_time <![CDATA[>=]]> #{bo.startTime}
|
||||
</if>
|
||||
|
@ -257,8 +257,11 @@
|
||||
<if test="criteria.deviceName != null and criteria.deviceName != ''">
|
||||
and d.device_name like concat('%', #{criteria.deviceName}, '%')
|
||||
</if>
|
||||
<if test="criteria.deviceImei != null">
|
||||
and (d.device_imei = #{criteria.deviceImei} or d.device_mac = #{criteria.deviceImei})
|
||||
<if test="criteria.deviceImei != null and criteria.deviceImei != ''">
|
||||
and (d.device_imei = #{criteria.deviceImei}
|
||||
</if>
|
||||
<if test="criteria.content != null and criteria.content != ''">
|
||||
AND d.device_imei = #{criteria.content} or d.device_mac = #{criteria.content}
|
||||
</if>
|
||||
<if test="criteria.deviceStatus != null">
|
||||
and d.device_status = #{criteria.deviceStatus}
|
||||
@ -289,6 +292,9 @@
|
||||
<if test="bo.deviceImei != null and bo.deviceImei != ''">
|
||||
AND a.device_imei = #{bo.deviceImei}
|
||||
</if>
|
||||
<if test="bo.content != null and bo.content != ''">
|
||||
AND a.device_imei = #{bo.content} or a.device_mac = #{bo.content}
|
||||
</if>
|
||||
<if test="bo.startTime != null and bo.startTime != ''">
|
||||
AND a.create_time <![CDATA[>=]]> #{bo.startTime}
|
||||
</if>
|
||||
|
Reference in New Issue
Block a user