1、把倾角计数据的处理挪到一个新的服务InclineServer
2、InclineServer处理D350,推送第三方
This commit is contained in:
parent
ab74a6b250
commit
7f1c2d6f8b
@ -8,6 +8,8 @@ import com.imdroid.secapi.dto.GnssDevice;
|
||||
import com.imdroid.secapi.dto.GnssDeviceJoin;
|
||||
import com.imdroid.secapi.dto.GnssDeviceMapper;
|
||||
import com.imdroid.secapi.dto.SurfaceInclineDataMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
@ -29,6 +31,8 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
@Configuration
|
||||
@EnableScheduling
|
||||
public class D350SurfaceInclineMessageExecutor implements Executor<D350SurfaceInclineMessage, Void> {
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
@Autowired
|
||||
SurfaceInclineDataMapper dataMapper;
|
||||
@Autowired
|
||||
@ -41,8 +45,12 @@ public class D350SurfaceInclineMessageExecutor implements Executor<D350SurfaceIn
|
||||
|
||||
@Override
|
||||
public Void execute(D350SurfaceInclineMessage message) {
|
||||
logger.debug("{} proc d350", message.getId());
|
||||
GnssDeviceJoin device = getDevice(message.getId());
|
||||
if(device == null) return null;
|
||||
if(device == null) {
|
||||
logger.debug("{} not existed", message.getId());
|
||||
return null;
|
||||
}
|
||||
|
||||
deviceAliveMap.put(message.getId(), LocalDateTime.now());
|
||||
// 补齐tenantId
|
||||
|
||||
@ -23,7 +23,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
@Service
|
||||
public class InclineDataForwarder{
|
||||
final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
final Logger logger = LoggerFactory.getLogger(InclineDataForwarder.class);
|
||||
final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
@Autowired
|
||||
GnssGroupFwdMapper fwdMapper;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user