debug,设备刷新
This commit is contained in:
parent
b9cfc3ef88
commit
b1059f807f
|
@ -15,6 +15,7 @@ import com.ruoyi.bst.area.service.AreaService;
|
||||||
import com.ruoyi.bst.area.utils.AreaUtil;
|
import com.ruoyi.bst.area.utils.AreaUtil;
|
||||||
import com.ruoyi.bst.areaSub.domain.AreaSubVO;
|
import com.ruoyi.bst.areaSub.domain.AreaSubVO;
|
||||||
import com.ruoyi.bst.areaSub.service.AreaSubService;
|
import com.ruoyi.bst.areaSub.service.AreaSubService;
|
||||||
|
import com.ruoyi.bst.device.domain.Device;
|
||||||
import com.ruoyi.bst.device.domain.DeviceVO;
|
import com.ruoyi.bst.device.domain.DeviceVO;
|
||||||
import com.ruoyi.bst.device.domain.enums.DeviceLockStatus;
|
import com.ruoyi.bst.device.domain.enums.DeviceLockStatus;
|
||||||
import com.ruoyi.bst.device.domain.enums.DeviceQuality;
|
import com.ruoyi.bst.device.domain.enums.DeviceQuality;
|
||||||
|
@ -76,6 +77,7 @@ public class IotReceiveServiceImpl implements IotReceiveService {
|
||||||
}
|
}
|
||||||
// 数据点推送
|
// 数据点推送
|
||||||
if (ReceiveType.DATA_POINT.getType().equals(msg.getType())) {
|
if (ReceiveType.DATA_POINT.getType().equals(msg.getType())) {
|
||||||
|
// 设备数据
|
||||||
if (IotConstants.DS_SYS.equals(msg.getDsId())) {
|
if (IotConstants.DS_SYS.equals(msg.getDsId())) {
|
||||||
// 查询设备信息
|
// 查询设备信息
|
||||||
DeviceVO device = deviceService.selectSimpleByMacForLocationLog(msg.getDevName());
|
DeviceVO device = deviceService.selectSimpleByMacForLocationLog(msg.getDevName());
|
||||||
|
@ -118,6 +120,16 @@ public class IotReceiveServiceImpl implements IotReceiveService {
|
||||||
// 处理定位日志
|
// 处理定位日志
|
||||||
this.handleLocationLog(device);
|
this.handleLocationLog(device);
|
||||||
}
|
}
|
||||||
|
// 软件版本
|
||||||
|
else if (IotConstants.DS_VER.equals(msg.getDsId())) {
|
||||||
|
Device data = new Device();
|
||||||
|
data.setVersion(msg.getValue().toString());
|
||||||
|
data.setMac(msg.getDevName());
|
||||||
|
int update = deviceIotService.updateIot(data);
|
||||||
|
if (update != 1) {
|
||||||
|
log.error("更新设备软件版本失败: {},版本:{}", msg.getDevName(), msg.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 生命周期(暂时不做,需要测试)
|
// 生命周期(暂时不做,需要测试)
|
||||||
else if (ReceiveType.DEVICE_STATUS.getType().equals(msg.getType())) {
|
else if (ReceiveType.DEVICE_STATUS.getType().equals(msg.getType())) {
|
||||||
|
|
|
@ -18,11 +18,11 @@
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
<!-- spring-boot-devtools -->
|
<!-- spring-boot-devtools -->
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>org.springframework.boot</groupId>
|
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||||
<artifactId>spring-boot-devtools</artifactId>
|
<!-- <artifactId>spring-boot-devtools</artifactId>-->
|
||||||
<optional>true</optional> <!-- 表示依赖不会传递 -->
|
<!-- <optional>true</optional> <!– 表示依赖不会传递 –>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
|
|
||||||
<!-- Mysql驱动包 -->
|
<!-- Mysql驱动包 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user