台站相关查询增加根据台站id排序
新增模块jeecg-spectrum-analysis相关类
This commit is contained in:
parent
f506e0ab28
commit
d6914426fa
27
jeecg-module-spectrum-analysis/pom.xml
Normal file
27
jeecg-module-spectrum-analysis/pom.xml
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
<?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">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.jeecgframework.boot</groupId>
|
||||||
|
<artifactId>jeecg-boot-parent</artifactId>
|
||||||
|
<version>3.5.1</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>jeecg-module-spectrum-analysis</artifactId>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<!-- 引入jeecg-boot-starter-cloud依赖 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jeecgframework.boot</groupId>
|
||||||
|
<artifactId>jeecg-boot-starter-cloud</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jeecgframework.boot</groupId>
|
||||||
|
<artifactId>jeecg-boot-base-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
|
@ -183,13 +183,13 @@ public class StationOperationServiceImpl extends ServiceImpl<StationOperationMap
|
||||||
stationChildTree.setCode(country);
|
stationChildTree.setCode(country);
|
||||||
List<GardsStations> stationsList = gardsStationsList.stream().filter(station-> station.getCountryCode().equals(countryCode)).collect(Collectors.toList());
|
List<GardsStations> stationsList = gardsStationsList.stream().filter(station-> station.getCountryCode().equals(countryCode)).collect(Collectors.toList());
|
||||||
if (i == 0){
|
if (i == 0){
|
||||||
stationsList = stationsList.stream().filter(item-> item.getStationId()<=200).collect(Collectors.toList());
|
stationsList = stationsList.stream().filter(item-> item.getStationId()<=200).sorted(Comparator.comparing(GardsStations::getStationId)).collect(Collectors.toList());
|
||||||
stations.addAll(stationsList);
|
stations.addAll(stationsList);
|
||||||
}else if(i == 1){
|
}else if(i == 1){
|
||||||
stationsList = stationsList.stream().filter(item-> item.getStationId()>200 && item.getStationId()<=300).collect(Collectors.toList());
|
stationsList = stationsList.stream().filter(item-> item.getStationId()>200 && item.getStationId()<=300).sorted(Comparator.comparing(GardsStations::getStationId)).collect(Collectors.toList());
|
||||||
stations.addAll(stationsList);
|
stations.addAll(stationsList);
|
||||||
}else if(i == 2){
|
}else if(i == 2){
|
||||||
stationsList = stationsList.stream().filter(item-> item.getStationId()>300).collect(Collectors.toList());
|
stationsList = stationsList.stream().filter(item-> item.getStationId()>300).sorted(Comparator.comparing(GardsStations::getStationId)).collect(Collectors.toList());
|
||||||
stations.addAll(stationsList);
|
stations.addAll(stationsList);
|
||||||
}
|
}
|
||||||
stationChildTree.setChildren(stations);
|
stationChildTree.setChildren(stations);
|
||||||
|
@ -522,7 +522,7 @@ public class StationOperationServiceImpl extends ServiceImpl<StationOperationMap
|
||||||
//获取所有的台站信息
|
//获取所有的台站信息
|
||||||
HashMap<String, GardsStations> stationInfoMap = (HashMap<String, GardsStations>) redisUtil.get("stationInfoMap");
|
HashMap<String, GardsStations> stationInfoMap = (HashMap<String, GardsStations>) redisUtil.get("stationInfoMap");
|
||||||
//获取所有的台站信息
|
//获取所有的台站信息
|
||||||
List<GardsStations> stations = stationInfoMap.values().stream().collect(Collectors.toList());
|
List<GardsStations> stations = stationInfoMap.values().stream().sorted(Comparator.comparing(GardsStations::getStationId)).collect(Collectors.toList());
|
||||||
List<StationInfo> stationInfos = new ArrayList<>();
|
List<StationInfo> stationInfos = new ArrayList<>();
|
||||||
for (GardsStations gardsStations:stations) {
|
for (GardsStations gardsStations:stations) {
|
||||||
StationInfo stationInfo = new StationInfo();
|
StationInfo stationInfo = new StationInfo();
|
||||||
|
|
|
@ -15,10 +15,7 @@ import org.jeecg.modules.system.entity.GardsStations;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.*;
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Service("sysDictService")
|
@Service("sysDictService")
|
||||||
|
@ -37,7 +34,7 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl
|
||||||
List<GardsStations> gardsStationsList = new LinkedList<>();
|
List<GardsStations> gardsStationsList = new LinkedList<>();
|
||||||
//获取台站信息
|
//获取台站信息
|
||||||
HashMap<String, GardsStations> stationInfoMap = (HashMap<String, GardsStations>) redisUtil.get("stationInfoMap");
|
HashMap<String, GardsStations> stationInfoMap = (HashMap<String, GardsStations>) redisUtil.get("stationInfoMap");
|
||||||
List<GardsStations> stationsList = stationInfoMap.values().stream().collect(Collectors.toList());
|
List<GardsStations> stationsList = stationInfoMap.values().stream().sorted(Comparator.comparing(GardsStations::getStationId)).collect(Collectors.toList());
|
||||||
//如果传递的菜单名称不为空 则需要过滤出所需的台站信息
|
//如果传递的菜单名称不为空 则需要过滤出所需的台站信息
|
||||||
if (StringUtils.isNotBlank(menuName)){
|
if (StringUtils.isNotBlank(menuName)){
|
||||||
//根据菜单名称查询出数据字典中对应的内容
|
//根据菜单名称查询出数据字典中对应的内容
|
||||||
|
|
52
jeecg-server-cloud/jeecg-spectrum-analysis-start/pom.xml
Normal file
52
jeecg-server-cloud/jeecg-spectrum-analysis-start/pom.xml
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
<?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">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.jeecgframework.boot</groupId>
|
||||||
|
<artifactId>jeecg-server-cloud</artifactId>
|
||||||
|
<version>3.5.1</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>jeecg-spectrum-analysis-start</artifactId>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<!-- jeecg-system-cloud-api -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jeecgframework.boot</groupId>
|
||||||
|
<artifactId>jeecg-system-cloud-api</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jeecgframework.boot</groupId>
|
||||||
|
<artifactId>jeecg-module-spectrum-analysis</artifactId>
|
||||||
|
<version>3.5.1</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<layout>ZIP</layout>
|
||||||
|
<includes>
|
||||||
|
<include>
|
||||||
|
<groupId>nothing</groupId>
|
||||||
|
<artifactId>nothing</artifactId>
|
||||||
|
</include>
|
||||||
|
</includes>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>repackage</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
|
@ -0,0 +1,46 @@
|
||||||
|
package org.jeecg;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
|
import org.springframework.boot.CommandLineRunner;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||||
|
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
|
||||||
|
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||||
|
import org.springframework.context.ConfigurableApplicationContext;
|
||||||
|
import org.springframework.core.env.Environment;
|
||||||
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
|
|
||||||
|
import java.net.InetAddress;
|
||||||
|
import java.net.UnknownHostException;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@SpringBootApplication
|
||||||
|
@EnableFeignClients(basePackages = {"org.jeecg"})
|
||||||
|
@EnableScheduling
|
||||||
|
public class JeecgSpectrumAnalysisApplication extends SpringBootServletInitializer implements CommandLineRunner {
|
||||||
|
@Override
|
||||||
|
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
|
||||||
|
return application.sources(JeecgSpectrumAnalysisApplication.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) throws UnknownHostException {
|
||||||
|
ConfigurableApplicationContext application = SpringApplication.run(JeecgSpectrumAnalysisApplication.class, args);
|
||||||
|
Environment env = application.getEnvironment();
|
||||||
|
String ip = InetAddress.getLocalHost().getHostAddress();
|
||||||
|
String port = env.getProperty("server.port");
|
||||||
|
String path = oConvertUtils.getString(env.getProperty("server.servlet.context-path"));
|
||||||
|
log.info("\n----------------------------------------------------------\n\t" +
|
||||||
|
"Application Jeecg-Boot is running! Access URLs:\n\t" +
|
||||||
|
"Local: \t\thttp://localhost:" + port + path + "/doc.html\n" +
|
||||||
|
"External: \thttp://" + ip + ":" + port + path + "/doc.html\n" +
|
||||||
|
"Swagger文档: \thttp://" + ip + ":" + port + path + "/doc.html\n" +
|
||||||
|
"----------------------------------------------------------");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run(String... args) throws Exception {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -29,6 +29,22 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<layout>ZIP</layout>
|
||||||
|
<includes>
|
||||||
|
<include>
|
||||||
|
<groupId>nothing</groupId>
|
||||||
|
<artifactId>nothing</artifactId>
|
||||||
|
</include>
|
||||||
|
</includes>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>repackage</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
<module>jeecg-log-manage-start</module>
|
<module>jeecg-log-manage-start</module>
|
||||||
<module>jeecg-abnormal-alarm-start</module>
|
<module>jeecg-abnormal-alarm-start</module>
|
||||||
<module>jeecg-auto-process-start</module>
|
<module>jeecg-auto-process-start</module>
|
||||||
|
<module>jeecg-spectrum-analysis-start</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
</project>
|
</project>
|
13
pom.xml
13
pom.xml
|
@ -83,6 +83,7 @@
|
||||||
<module>jeecg-module-web-statistics</module>
|
<module>jeecg-module-web-statistics</module>
|
||||||
<module>jeecg-module-abnormal-alarm</module>
|
<module>jeecg-module-abnormal-alarm</module>
|
||||||
<module>jeecg-module-auto-process</module>
|
<module>jeecg-module-auto-process</module>
|
||||||
|
<module>jeecg-module-spectrum-analysis</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
|
@ -188,6 +189,18 @@
|
||||||
<artifactId>jeecg-module-web-statistics</artifactId>
|
<artifactId>jeecg-module-web-statistics</artifactId>
|
||||||
<version>${jeecgboot.version}</version>
|
<version>${jeecgboot.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- jeecg-module-abnormal-alarm模块 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jeecgframework.boot</groupId>
|
||||||
|
<artifactId>jeecg-module-abnormal-alarm</artifactId>
|
||||||
|
<version>${jeecgboot.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- jeecg-module-spectrum-analysis模块 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jeecgframework.boot</groupId>
|
||||||
|
<artifactId>jeecg-module-spectrum-analysis</artifactId>
|
||||||
|
<version>${jeecgboot.version}</version>
|
||||||
|
</dependency>
|
||||||
<!-- jeecg tools -->
|
<!-- jeecg tools -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jeecgframework.boot</groupId>
|
<groupId>org.jeecgframework.boot</groupId>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user