1、增加倾角计数据解析和界面
This commit is contained in:
parent
d7067dbe88
commit
440044c0ab
@ -67,7 +67,7 @@ public class GZYMQTTForwarder extends Forwarder {
|
|||||||
logger.debug("gzy mqtt forwardGnss");
|
logger.debug("gzy mqtt forwardGnss");
|
||||||
if(mqttClient.isConnected()) {
|
if(mqttClient.isConnected()) {
|
||||||
forwardCurrentGnss();
|
forwardCurrentGnss();
|
||||||
//forwardAngleData();
|
forwardAngleData();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
try{
|
try{
|
||||||
@ -130,6 +130,7 @@ public class GZYMQTTForwarder extends Forwarder {
|
|||||||
|
|
||||||
GZYMQTTAngle tranData = new GZYMQTTAngle();
|
GZYMQTTAngle tranData = new GZYMQTTAngle();
|
||||||
tranData.setDeviceSn(msg.getDeviceid());
|
tranData.setDeviceSn(msg.getDeviceid());
|
||||||
|
tranData.setDeviceType(8);
|
||||||
tranData.setCollectTime(msg.getCreatetime().format(formatter));
|
tranData.setCollectTime(msg.getCreatetime().format(formatter));
|
||||||
float x = msg.getRoll()==null?0:msg.getRoll();
|
float x = msg.getRoll()==null?0:msg.getRoll();
|
||||||
float y = msg.getPitch()==null?0:msg.getPitch();
|
float y = msg.getPitch()==null?0:msg.getPitch();
|
||||||
|
|||||||
@ -3,7 +3,6 @@ package com.imdroid.sideslope.executor;
|
|||||||
import com.imdroid.common.util.ThreadManager;
|
import com.imdroid.common.util.ThreadManager;
|
||||||
import com.imdroid.secapi.dto.*;
|
import com.imdroid.secapi.dto.*;
|
||||||
import com.imdroid.sideslope.message.D350SurfaceInclineMessage;
|
import com.imdroid.sideslope.message.D350SurfaceInclineMessage;
|
||||||
import com.imdroid.sideslope.service.DataPersistService;
|
|
||||||
import com.imdroid.sideslope.service.Device;
|
import com.imdroid.sideslope.service.Device;
|
||||||
import com.imdroid.sideslope.service.DeviceService;
|
import com.imdroid.sideslope.service.DeviceService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -20,9 +19,6 @@ import org.springframework.stereotype.Component;
|
|||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class D350SurfaceInclineMessageExecutor implements Executor<D350SurfaceInclineMessage, Void> {
|
public class D350SurfaceInclineMessageExecutor implements Executor<D350SurfaceInclineMessage, Void> {
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private DataPersistService dataPersistService;
|
|
||||||
@Autowired
|
@Autowired
|
||||||
SurfaceInclineDataMapper dataMapper;
|
SurfaceInclineDataMapper dataMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -32,7 +28,7 @@ public class D350SurfaceInclineMessageExecutor implements Executor<D350SurfaceIn
|
|||||||
Device device = deviceService.findByDeviceId(message.getId());
|
Device device = deviceService.findByDeviceId(message.getId());
|
||||||
if(device == null) return null;
|
if(device == null) return null;
|
||||||
// 补齐tenantId
|
// 补齐tenantId
|
||||||
message.setTenantId(device.getTenantId());
|
message.getInclineData().setTenantid(device.getTenantId());
|
||||||
|
|
||||||
ThreadManager.getFixedThreadPool().submit(() -> {
|
ThreadManager.getFixedThreadPool().submit(() -> {
|
||||||
|
|
||||||
|
|||||||
@ -411,7 +411,6 @@ CREATE TABLE IF NOT EXISTS `surface_incline_data` (
|
|||||||
`id` bigint AUTO_INCREMENT,
|
`id` bigint AUTO_INCREMENT,
|
||||||
`tenantid` int NOT NULL,
|
`tenantid` int NOT NULL,
|
||||||
`createtime` datetime DEFAULT NULL,
|
`createtime` datetime DEFAULT NULL,
|
||||||
`devicetime` time DEFAULT NULL,
|
|
||||||
`deviceid` varchar(20) NOT NULL,
|
`deviceid` varchar(20) NOT NULL,
|
||||||
`sensorid` smallint DEFAULT NULL,
|
`sensorid` smallint DEFAULT NULL,
|
||||||
`anglex` float DEFAULT NULL,
|
`anglex` float DEFAULT NULL,
|
||||||
@ -427,4 +426,4 @@ CREATE TABLE IF NOT EXISTS `surface_incline_data` (
|
|||||||
`minaccy` float DEFAULT NULL,
|
`minaccy` float DEFAULT NULL,
|
||||||
`minaccz` float DEFAULT NULL,
|
`minaccz` float DEFAULT NULL,
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user