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