简化代码,不用依赖于dt.common和dt.utils包了
This commit is contained in:
parent
588a47e94f
commit
de53818994
1
pom.xml
1
pom.xml
@ -13,7 +13,6 @@
|
||||
<module>sec-beidou</module>
|
||||
<module>sec-beidou-rtcm</module>
|
||||
<module>sec-api</module>
|
||||
<module>sec-beidou-rtcm-api</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>security-monitor</artifactId>
|
||||
<groupId>com.imdroid</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>sec-beidou-rtcm-api</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- SpringCloud OpenFeign -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.google.code.findbugs</groupId>
|
||||
<artifactId>jsr305</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
</project>
|
||||
@ -1,16 +0,0 @@
|
||||
package com.imdroid.sideslope.api;
|
||||
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
/**
|
||||
* @author LiGang
|
||||
* @date 2023/10/22 19:40
|
||||
*/
|
||||
@FeignClient(name = "rtcm-server", url = "http://localhost:9904/gnss")
|
||||
public interface BeidouRtcmApi {
|
||||
|
||||
@GetMapping("/clean-tilt")
|
||||
String cleanTilt(@RequestParam(name = "deviceId") String deviceId);
|
||||
}
|
||||
@ -16,8 +16,7 @@
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<dt20.common.version>1.0-SNAPSHOT</dt20.common.version>
|
||||
<dt20.util.version>1.0-SNAPSHOT</dt20.util.version>
|
||||
|
||||
</properties>
|
||||
|
||||
|
||||
@ -110,16 +109,6 @@
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>dt20.io</groupId>
|
||||
<artifactId>dt20-common</artifactId>
|
||||
<version>${dt20.common.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>dt20.io</groupId>
|
||||
<artifactId>dt20-util</artifactId>
|
||||
<version>${dt20.util.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
|
||||
@ -6,7 +6,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.domain.EntityScan;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
|
||||
|
||||
|
||||
/**
|
||||
@ -15,9 +14,8 @@ import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
|
||||
*/
|
||||
@SpringBootApplication(scanBasePackages = {"com.imdroid"})
|
||||
@MapperScan({"com.imdroid.secapi","com.imdroid.beidou.entity"})
|
||||
@ComponentScan({"io.dt20.*", "com.imdroid.*"})
|
||||
@EntityScan({"io.dt20.common.persistence", "com.imdroid.*"})
|
||||
@EnableJpaRepositories({"io.dt20.common.repo", "com.imdroid.*"})
|
||||
@ComponentScan({"com.imdroid.*"})
|
||||
@EntityScan({"com.imdroid.*"})
|
||||
@EnableFeignClients(basePackages = "com.imdroid.*")
|
||||
public class SideSlopeRtcmApp {
|
||||
|
||||
|
||||
@ -4,10 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.imdroid.secapi.dto.*;
|
||||
import com.imdroid.sideslope.bd.Tilt;
|
||||
import com.imdroid.sideslope.message.D341LocationMessage;
|
||||
import com.imdroid.sideslope.util.GsonUtil;
|
||||
import com.imdroid.sideslope.util.NumberUtils;
|
||||
import io.dt20.common.persistence.Attribute;
|
||||
import io.dt20.common.repo.AttributeRepository;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -40,9 +37,6 @@ public class GNSSDeviceLocationRecordServiceImpl implements GNSSDeviceLocationRe
|
||||
//private RabbitTemplate rabbitTemplate;
|
||||
ThirdPartyClient thirdPartyClient;
|
||||
|
||||
@Autowired
|
||||
private AttributeRepository attributeRepository;
|
||||
|
||||
public static final long FILTER_SHORT_CYCLE = 4 * 60 * 60 * 1000;
|
||||
public static final long FILTER_LONG_CYCLE = 25 * 60 * 60 * 1000;
|
||||
static final int FILTER_MAX_RECORD_NUM = 50;
|
||||
|
||||
@ -13,7 +13,7 @@ import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@ -42,7 +42,6 @@ public class GnssLocationFilterTest {
|
||||
int end = 0;
|
||||
int pos = 0;
|
||||
boolean beginFound = false;
|
||||
boolean endFound = false;
|
||||
double[] value = {0,0,0};
|
||||
int valueId = 0;
|
||||
long now = System.currentTimeMillis();
|
||||
@ -65,13 +64,10 @@ public class GnssLocationFilterTest {
|
||||
else continue;
|
||||
}
|
||||
// 找结束位
|
||||
if(!endFound) {
|
||||
if (dataSrc.charAt(pos) == ' ') {
|
||||
endFound = true;
|
||||
end = pos;
|
||||
}
|
||||
else continue;
|
||||
}
|
||||
// 读数据
|
||||
value[valueId] = Double.parseDouble(dataSrc.substring(begin, end));
|
||||
valueId++;
|
||||
@ -85,7 +81,6 @@ public class GnssLocationFilterTest {
|
||||
else now += 30*60*1000;
|
||||
}
|
||||
beginFound = false;
|
||||
endFound = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -96,7 +91,7 @@ public class GnssLocationFilterTest {
|
||||
gnssCalcData.setB562e(xyz[0]);
|
||||
gnssCalcData.setB562n(xyz[1]);
|
||||
gnssCalcData.setB562d(xyz[2]);
|
||||
gnssCalcData.setCreatetime(new Timestamp(recordTime));
|
||||
gnssCalcData.setCreatetime(new Date(recordTime));
|
||||
gnssCalcData.setTenantid(0);
|
||||
gnssCalcData.setEnabled(true);
|
||||
|
||||
|
||||
@ -205,32 +205,6 @@ CREATE TABLE IF NOT EXISTS `gnsstrxmsg` (
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `metadatas` (
|
||||
`id` bigint NOT NULL,
|
||||
`object` varchar(32) NOT NULL,
|
||||
`keyname` varchar(32) NOT NULL,
|
||||
`type` varchar(1) NOT NULL,
|
||||
`mandatory` int NOT NULL,
|
||||
`message` varchar(64) DEFAULT NULL,
|
||||
`notes` varchar(256) DEFAULT NULL,
|
||||
`format` varchar(128) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `object` (`object`,`keyname`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `attributes` (
|
||||
`id` bigint NOT NULL,
|
||||
`object` varchar(32) NOT NULL,
|
||||
`pid` bigint NOT NULL,
|
||||
`keyname` varchar(32) NOT NULL,
|
||||
`type` varchar(1) NOT NULL,
|
||||
`valuestring` varchar(255) DEFAULT NULL,
|
||||
`valuenumber` double DEFAULT NULL,
|
||||
`valuedate` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `object` (`object`,`pid`,`keyname`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `warninginfo` (
|
||||
`id` bigint AUTO_INCREMENT,
|
||||
`tenantid` int NOT NULL,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user