From d6914426fa06aea4e0eb9a5bdab70538e7ee614b Mon Sep 17 00:00:00 2001 From: qiaoqinzheng Date: Wed, 5 Jul 2023 09:07:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=B0=E7=AB=99=E7=9B=B8=E5=85=B3=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=A2=9E=E5=8A=A0=E6=A0=B9=E6=8D=AE=E5=8F=B0=E7=AB=99?= =?UTF-8?q?id=E6=8E=92=E5=BA=8F=20=E6=96=B0=E5=A2=9E=E6=A8=A1=E5=9D=97jeec?= =?UTF-8?q?g-spectrum-analysis=E7=9B=B8=E5=85=B3=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jeecg-module-spectrum-analysis/pom.xml | 27 ++++++++++ .../impl/StationOperationServiceImpl.java | 8 +-- .../service/impl/SysDictServiceImpl.java | 7 +-- .../jeecg-spectrum-analysis-start/pom.xml | 52 +++++++++++++++++++ .../JeecgSpectrumAnalysisApplication.java | 46 ++++++++++++++++ .../jeecg-station-operation-start/pom.xml | 16 ++++++ jeecg-server-cloud/pom.xml | 1 + pom.xml | 13 +++++ 8 files changed, 161 insertions(+), 9 deletions(-) create mode 100644 jeecg-module-spectrum-analysis/pom.xml create mode 100644 jeecg-server-cloud/jeecg-spectrum-analysis-start/pom.xml create mode 100644 jeecg-server-cloud/jeecg-spectrum-analysis-start/src/main/java/org/jeecg/JeecgSpectrumAnalysisApplication.java diff --git a/jeecg-module-spectrum-analysis/pom.xml b/jeecg-module-spectrum-analysis/pom.xml new file mode 100644 index 00000000..9078fa1b --- /dev/null +++ b/jeecg-module-spectrum-analysis/pom.xml @@ -0,0 +1,27 @@ + + + 4.0.0 + + org.jeecgframework.boot + jeecg-boot-parent + 3.5.1 + + + jeecg-module-spectrum-analysis + + + + + org.jeecgframework.boot + jeecg-boot-starter-cloud + + + + org.jeecgframework.boot + jeecg-boot-base-core + + + + \ No newline at end of file diff --git a/jeecg-module-station-operation/src/main/java/org/jeecg/modules/service/impl/StationOperationServiceImpl.java b/jeecg-module-station-operation/src/main/java/org/jeecg/modules/service/impl/StationOperationServiceImpl.java index 27bbb9be..d0792387 100644 --- a/jeecg-module-station-operation/src/main/java/org/jeecg/modules/service/impl/StationOperationServiceImpl.java +++ b/jeecg-module-station-operation/src/main/java/org/jeecg/modules/service/impl/StationOperationServiceImpl.java @@ -183,13 +183,13 @@ public class StationOperationServiceImpl extends ServiceImpl stationsList = gardsStationsList.stream().filter(station-> station.getCountryCode().equals(countryCode)).collect(Collectors.toList()); 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); }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); }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); } stationChildTree.setChildren(stations); @@ -522,7 +522,7 @@ public class StationOperationServiceImpl extends ServiceImpl stationInfoMap = (HashMap) redisUtil.get("stationInfoMap"); //获取所有的台站信息 - List stations = stationInfoMap.values().stream().collect(Collectors.toList()); + List stations = stationInfoMap.values().stream().sorted(Comparator.comparing(GardsStations::getStationId)).collect(Collectors.toList()); List stationInfos = new ArrayList<>(); for (GardsStations gardsStations:stations) { StationInfo stationInfo = new StationInfo(); diff --git a/jeecg-module-web-statistics/src/main/java/org/jeecg/modules/service/impl/SysDictServiceImpl.java b/jeecg-module-web-statistics/src/main/java/org/jeecg/modules/service/impl/SysDictServiceImpl.java index 26f1775e..626d1071 100644 --- a/jeecg-module-web-statistics/src/main/java/org/jeecg/modules/service/impl/SysDictServiceImpl.java +++ b/jeecg-module-web-statistics/src/main/java/org/jeecg/modules/service/impl/SysDictServiceImpl.java @@ -15,10 +15,7 @@ import org.jeecg.modules.system.entity.GardsStations; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Objects; +import java.util.*; import java.util.stream.Collectors; @Service("sysDictService") @@ -37,7 +34,7 @@ public class SysDictServiceImpl extends ServiceImpl impl List gardsStationsList = new LinkedList<>(); //获取台站信息 HashMap stationInfoMap = (HashMap) redisUtil.get("stationInfoMap"); - List stationsList = stationInfoMap.values().stream().collect(Collectors.toList()); + List stationsList = stationInfoMap.values().stream().sorted(Comparator.comparing(GardsStations::getStationId)).collect(Collectors.toList()); //如果传递的菜单名称不为空 则需要过滤出所需的台站信息 if (StringUtils.isNotBlank(menuName)){ //根据菜单名称查询出数据字典中对应的内容 diff --git a/jeecg-server-cloud/jeecg-spectrum-analysis-start/pom.xml b/jeecg-server-cloud/jeecg-spectrum-analysis-start/pom.xml new file mode 100644 index 00000000..77627e03 --- /dev/null +++ b/jeecg-server-cloud/jeecg-spectrum-analysis-start/pom.xml @@ -0,0 +1,52 @@ + + + 4.0.0 + + org.jeecgframework.boot + jeecg-server-cloud + 3.5.1 + + + jeecg-spectrum-analysis-start + + + + + org.jeecgframework.boot + jeecg-system-cloud-api + + + org.jeecgframework.boot + jeecg-module-spectrum-analysis + 3.5.1 + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + ZIP + + + nothing + nothing + + + + + + + repackage + + + + + + + + \ No newline at end of file diff --git a/jeecg-server-cloud/jeecg-spectrum-analysis-start/src/main/java/org/jeecg/JeecgSpectrumAnalysisApplication.java b/jeecg-server-cloud/jeecg-spectrum-analysis-start/src/main/java/org/jeecg/JeecgSpectrumAnalysisApplication.java new file mode 100644 index 00000000..886b4b1c --- /dev/null +++ b/jeecg-server-cloud/jeecg-spectrum-analysis-start/src/main/java/org/jeecg/JeecgSpectrumAnalysisApplication.java @@ -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 { + + } +} \ No newline at end of file diff --git a/jeecg-server-cloud/jeecg-station-operation-start/pom.xml b/jeecg-server-cloud/jeecg-station-operation-start/pom.xml index 76b20966..56a52c0e 100644 --- a/jeecg-server-cloud/jeecg-station-operation-start/pom.xml +++ b/jeecg-server-cloud/jeecg-station-operation-start/pom.xml @@ -29,6 +29,22 @@ org.springframework.boot spring-boot-maven-plugin + + ZIP + + + nothing + nothing + + + + + + + repackage + + + diff --git a/jeecg-server-cloud/pom.xml b/jeecg-server-cloud/pom.xml index 137fef12..3d22dd33 100644 --- a/jeecg-server-cloud/pom.xml +++ b/jeecg-server-cloud/pom.xml @@ -26,6 +26,7 @@ jeecg-log-manage-start jeecg-abnormal-alarm-start jeecg-auto-process-start + jeecg-spectrum-analysis-start \ No newline at end of file diff --git a/pom.xml b/pom.xml index 3c9672c0..8d656818 100644 --- a/pom.xml +++ b/pom.xml @@ -83,6 +83,7 @@ jeecg-module-web-statistics jeecg-module-abnormal-alarm jeecg-module-auto-process + jeecg-module-spectrum-analysis @@ -188,6 +189,18 @@ jeecg-module-web-statistics ${jeecgboot.version} + + + org.jeecgframework.boot + jeecg-module-abnormal-alarm + ${jeecgboot.version} + + + + org.jeecgframework.boot + jeecg-module-spectrum-analysis + ${jeecgboot.version} + org.jeecgframework.boot