1、增加广西交科推送
2、规范推送设备ID、设备别名、设备名的编码
This commit is contained in:
parent
8fc19d9e71
commit
3916b89920
@ -28,6 +28,9 @@ public class SaasForwarder extends Forwarder{
|
||||
@Value("${sass.server.port}")
|
||||
private int port;
|
||||
|
||||
@Value("${sass.server.enabled}")
|
||||
boolean enabled;
|
||||
|
||||
private TCPClient tcpClient;
|
||||
|
||||
static class MyTCPListener implements TCPListener {
|
||||
@ -59,22 +62,28 @@ public class SaasForwarder extends Forwarder{
|
||||
@PostConstruct
|
||||
void registerMe(){
|
||||
init(FORWARDER_NAME, "TCP "+host+":"+port,0,FWD_DEVICE_ID,30);
|
||||
if(enabled) {
|
||||
tcpClient = new TCPClient();
|
||||
tcpClient.init(host, port, listener);
|
||||
tcpClient.start();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 每半小时转发GNSS解算结果
|
||||
*/
|
||||
@Scheduled(cron = "0 20,50 * * * ?") // 每30分钟执行一次
|
||||
private void forwardGnss() {
|
||||
if(enabled) {
|
||||
logger.info("saas forwardGnss");
|
||||
forwardCurrentGnss();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
int send(String projectId, List<GnssCalcData> records, LocalDateTime sentTime){
|
||||
if(!enabled) return 0;
|
||||
|
||||
int sendNum = 0;
|
||||
if(records.size() == 0) return 0;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user