From f65b43534f153aa5e72afdc20ab2b74d5c06dd87 Mon Sep 17 00:00:00 2001 From: Kane Wang Date: Wed, 16 Mar 2022 15:55:05 +0800 Subject: [PATCH 01/49] ... --- .gitignore | 2 +- code/java/天气灾害预警/.idea/.gitignore | 8 -- .../天气灾害预警/.idea/compiler.xml | 14 -- .../天气灾害预警/.idea/encodings.xml | 8 -- .../.idea/jarRepositories.xml | 25 ---- code/java/天气灾害预警/.idea/misc.xml | 14 -- .../.idea/runConfigurations/compile.xml | 29 ---- .../天气灾害预警/.idea/uiDesigner.xml | 124 ------------------ code/java/天气灾害预警/.idea/vcs.xml | 6 - .../天气灾害预警/src/main/java/App.java | 10 -- .../target/maven-archiver/pom.properties | 5 - .../compile/default-cli/createdFiles.lst | 0 .../compile/default-cli/inputFiles.lst | 1 - .../compile/default-compile/createdFiles.lst | 1 - .../compile/default-compile/inputFiles.lst | 1 - .../default-testCompile/inputFiles.lst | 0 16 files changed, 1 insertion(+), 247 deletions(-) delete mode 100644 code/java/天气灾害预警/.idea/.gitignore delete mode 100644 code/java/天气灾害预警/.idea/compiler.xml delete mode 100644 code/java/天气灾害预警/.idea/encodings.xml delete mode 100644 code/java/天气灾害预警/.idea/jarRepositories.xml delete mode 100644 code/java/天气灾害预警/.idea/misc.xml delete mode 100644 code/java/天气灾害预警/.idea/runConfigurations/compile.xml delete mode 100644 code/java/天气灾害预警/.idea/uiDesigner.xml delete mode 100644 code/java/天气灾害预警/.idea/vcs.xml delete mode 100644 code/java/天气灾害预警/src/main/java/App.java delete mode 100644 code/java/天气灾害预警/target/maven-archiver/pom.properties delete mode 100644 code/java/天气灾害预警/target/maven-status/maven-compiler-plugin/compile/default-cli/createdFiles.lst delete mode 100644 code/java/天气灾害预警/target/maven-status/maven-compiler-plugin/compile/default-cli/inputFiles.lst delete mode 100644 code/java/天气灾害预警/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst delete mode 100644 code/java/天气灾害预警/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst delete mode 100644 code/java/天气灾害预警/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst diff --git a/.gitignore b/.gitignore index 90a6b2b..7a6a144 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -target/* +code/java/天气灾害预警/target/* *.jar */.idea/* \ No newline at end of file diff --git a/code/java/天气灾害预警/.idea/.gitignore b/code/java/天气灾害预警/.idea/.gitignore deleted file mode 100644 index 13566b8..0000000 --- a/code/java/天气灾害预警/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/code/java/天气灾害预警/.idea/compiler.xml b/code/java/天气灾害预警/.idea/compiler.xml deleted file mode 100644 index 9b4349e..0000000 --- a/code/java/天气灾害预警/.idea/compiler.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/code/java/天气灾害预警/.idea/encodings.xml b/code/java/天气灾害预警/.idea/encodings.xml deleted file mode 100644 index 78bf31c..0000000 --- a/code/java/天气灾害预警/.idea/encodings.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/code/java/天气灾害预警/.idea/jarRepositories.xml b/code/java/天气灾害预警/.idea/jarRepositories.xml deleted file mode 100644 index c7ea920..0000000 --- a/code/java/天气灾害预警/.idea/jarRepositories.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/code/java/天气灾害预警/.idea/misc.xml b/code/java/天气灾害预警/.idea/misc.xml deleted file mode 100644 index 132404b..0000000 --- a/code/java/天气灾害预警/.idea/misc.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/code/java/天气灾害预警/.idea/runConfigurations/compile.xml b/code/java/天气灾害预警/.idea/runConfigurations/compile.xml deleted file mode 100644 index 780c17d..0000000 --- a/code/java/天气灾害预警/.idea/runConfigurations/compile.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/code/java/天气灾害预警/.idea/uiDesigner.xml b/code/java/天气灾害预警/.idea/uiDesigner.xml deleted file mode 100644 index e96534f..0000000 --- a/code/java/天气灾害预警/.idea/uiDesigner.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/code/java/天气灾害预警/.idea/vcs.xml b/code/java/天气灾害预警/.idea/vcs.xml deleted file mode 100644 index c2365ab..0000000 --- a/code/java/天气灾害预警/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/code/java/天气灾害预警/src/main/java/App.java b/code/java/天气灾害预警/src/main/java/App.java deleted file mode 100644 index be91c35..0000000 --- a/code/java/天气灾害预警/src/main/java/App.java +++ /dev/null @@ -1,10 +0,0 @@ - -public class App -{ - public static void main( String[] args ) - { - System.out.println( "111!!" ); - - return; - } -} diff --git a/code/java/天气灾害预警/target/maven-archiver/pom.properties b/code/java/天气灾害预警/target/maven-archiver/pom.properties deleted file mode 100644 index f2a08d6..0000000 --- a/code/java/天气灾害预警/target/maven-archiver/pom.properties +++ /dev/null @@ -1,5 +0,0 @@ -#Generated by Maven -#Tue Mar 15 15:14:48 CST 2022 -groupId=com.cpic.xim -artifactId=disaster_warning -version=1.0-SNAPSHOT diff --git a/code/java/天气灾害预警/target/maven-status/maven-compiler-plugin/compile/default-cli/createdFiles.lst b/code/java/天气灾害预警/target/maven-status/maven-compiler-plugin/compile/default-cli/createdFiles.lst deleted file mode 100644 index e69de29..0000000 diff --git a/code/java/天气灾害预警/target/maven-status/maven-compiler-plugin/compile/default-cli/inputFiles.lst b/code/java/天气灾害预警/target/maven-status/maven-compiler-plugin/compile/default-cli/inputFiles.lst deleted file mode 100644 index e8b7e6e..0000000 --- a/code/java/天气灾害预警/target/maven-status/maven-compiler-plugin/compile/default-cli/inputFiles.lst +++ /dev/null @@ -1 +0,0 @@ -D:\develop\ŷֹ˾Ŀ\Ԥ\code\java\ֺԤ\src\main\java\com\cpic\xim\App.java diff --git a/code/java/天气灾害预警/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/code/java/天气灾害预警/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst deleted file mode 100644 index 2ef6228..0000000 --- a/code/java/天气灾害预警/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst +++ /dev/null @@ -1 +0,0 @@ -App.class diff --git a/code/java/天气灾害预警/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/code/java/天气灾害预警/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst deleted file mode 100644 index 635f517..0000000 --- a/code/java/天气灾害预警/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +++ /dev/null @@ -1 +0,0 @@ -D:\develop\太保项目\disaster-warning\code\java\天气灾害预警\src\main\java\App.java diff --git a/code/java/天气灾害预警/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/code/java/天气灾害预警/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst deleted file mode 100644 index e69de29..0000000 From 91cef7bf0eb3cdf887a6f81ba15bce4d2c28e77e Mon Sep 17 00:00:00 2001 From: Kane Wang Date: Wed, 16 Mar 2022 15:55:59 +0800 Subject: [PATCH 02/49] ... --- .gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 7a6a144..ec45057 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -code/java/天气灾害预警/target/* +code/java/天气灾害预警/target/ *.jar -*/.idea/* \ No newline at end of file +*/.idea/ \ No newline at end of file From d2cbc91e9d9f573d6461919b11370c285e7131c3 Mon Sep 17 00:00:00 2001 From: Kane Wang Date: Wed, 16 Mar 2022 15:57:04 +0800 Subject: [PATCH 03/49] ... --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index ec45057..8e9e7d5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ code/java/天气灾害预警/target/ +code/java/天气灾害预警/out/ *.jar */.idea/ \ No newline at end of file From a27a1c8d85347c6a9a8d4eb3a6fbc055c0a3ad9b Mon Sep 17 00:00:00 2001 From: Kane Wang Date: Wed, 16 Mar 2022 15:57:45 +0800 Subject: [PATCH 04/49] ... --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8e9e7d5..8aa11a0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ code/java/天气灾害预警/target/ code/java/天气灾害预警/out/ *.jar -*/.idea/ \ No newline at end of file From f2c340d3cbc445d5667010bf35d79697f2048b06 Mon Sep 17 00:00:00 2001 From: Kane Wang Date: Wed, 16 Mar 2022 15:58:00 +0800 Subject: [PATCH 05/49] =?UTF-8?q?=E5=AE=8C=E6=88=90=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=8A=93=E5=8F=96=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/java/天气灾害预警/.idea/.gitignore | 8 ++ .../天气灾害预警/.idea/compiler.xml | 13 ++ .../天气灾害预警/.idea/encodings.xml | 8 ++ .../.idea/jarRepositories.xml | 25 ++++ code/java/天气灾害预警/.idea/misc.xml | 14 ++ .../.idea/runConfigurations/compile.xml | 29 ++++ .../天气灾害预警/.idea/uiDesigner.xml | 124 ++++++++++++++++++ code/java/天气灾害预警/.idea/vcs.xml | 6 + .../.idea/天气灾害预警.iml | 13 ++ code/java/天气灾害预警/pom.xml | 51 +++++-- .../src/main/java/AppMain.java | 13 ++ .../WeatherDisasterWarningGrabber.java | 104 +++++++++++++++ 12 files changed, 399 insertions(+), 9 deletions(-) create mode 100644 code/java/天气灾害预警/.idea/.gitignore create mode 100644 code/java/天气灾害预警/.idea/compiler.xml create mode 100644 code/java/天气灾害预警/.idea/encodings.xml create mode 100644 code/java/天气灾害预警/.idea/jarRepositories.xml create mode 100644 code/java/天气灾害预警/.idea/misc.xml create mode 100644 code/java/天气灾害预警/.idea/runConfigurations/compile.xml create mode 100644 code/java/天气灾害预警/.idea/uiDesigner.xml create mode 100644 code/java/天气灾害预警/.idea/vcs.xml create mode 100644 code/java/天气灾害预警/.idea/天气灾害预警.iml create mode 100644 code/java/天气灾害预警/src/main/java/AppMain.java create mode 100644 code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/WeatherDisasterWarningGrabber.java diff --git a/code/java/天气灾害预警/.idea/.gitignore b/code/java/天气灾害预警/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/code/java/天气灾害预警/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/code/java/天气灾害预警/.idea/compiler.xml b/code/java/天气灾害预警/.idea/compiler.xml new file mode 100644 index 0000000..7ffa0fe --- /dev/null +++ b/code/java/天气灾害预警/.idea/compiler.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/code/java/天气灾害预警/.idea/encodings.xml b/code/java/天气灾害预警/.idea/encodings.xml new file mode 100644 index 0000000..78bf31c --- /dev/null +++ b/code/java/天气灾害预警/.idea/encodings.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/code/java/天气灾害预警/.idea/jarRepositories.xml b/code/java/天气灾害预警/.idea/jarRepositories.xml new file mode 100644 index 0000000..c7ea920 --- /dev/null +++ b/code/java/天气灾害预警/.idea/jarRepositories.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/code/java/天气灾害预警/.idea/misc.xml b/code/java/天气灾害预警/.idea/misc.xml new file mode 100644 index 0000000..132404b --- /dev/null +++ b/code/java/天气灾害预警/.idea/misc.xml @@ -0,0 +1,14 @@ + + + + + + + + + + \ No newline at end of file diff --git a/code/java/天气灾害预警/.idea/runConfigurations/compile.xml b/code/java/天气灾害预警/.idea/runConfigurations/compile.xml new file mode 100644 index 0000000..780c17d --- /dev/null +++ b/code/java/天气灾害预警/.idea/runConfigurations/compile.xml @@ -0,0 +1,29 @@ + + + + + + + + \ No newline at end of file diff --git a/code/java/天气灾害预警/.idea/uiDesigner.xml b/code/java/天气灾害预警/.idea/uiDesigner.xml new file mode 100644 index 0000000..e96534f --- /dev/null +++ b/code/java/天气灾害预警/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/code/java/天气灾害预警/.idea/vcs.xml b/code/java/天气灾害预警/.idea/vcs.xml new file mode 100644 index 0000000..c2365ab --- /dev/null +++ b/code/java/天气灾害预警/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/code/java/天气灾害预警/.idea/天气灾害预警.iml b/code/java/天气灾害预警/.idea/天气灾害预警.iml new file mode 100644 index 0000000..13a38a8 --- /dev/null +++ b/code/java/天气灾害预警/.idea/天气灾害预警.iml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/code/java/天气灾害预警/pom.xml b/code/java/天气灾害预警/pom.xml index aafea85..6e0a068 100644 --- a/code/java/天气灾害预警/pom.xml +++ b/code/java/天气灾害预警/pom.xml @@ -1,20 +1,55 @@ - + 4.0.0 - com.cpic.xim disaster_warning 1.0-SNAPSHOT - + + + org.apache.httpcomponents + httpclient + 4.5.2 + + + commons-beanutils + commons-beanutils + 1.9.3 + + + commons-collections + commons-collections + 3.2.1 + + + commons-lang + commons-lang + 2.6 + + + commons-logging + commons-logging + 1.1.1 + + + net.sf.ezmorph + ezmorph + 1.0.6 + + + net.sf.json-lib + json-lib + 2.4 + jdk15 + + - 17 - 17 + 1.8 + 1.8 - compile - dev @@ -39,6 +74,4 @@ - - \ No newline at end of file diff --git a/code/java/天气灾害预警/src/main/java/AppMain.java b/code/java/天气灾害预警/src/main/java/AppMain.java new file mode 100644 index 0000000..4cb78ef --- /dev/null +++ b/code/java/天气灾害预警/src/main/java/AppMain.java @@ -0,0 +1,13 @@ +import com.cpic.xim.disaster_warning.WeatherDisasterWarningGrabber; + +public class AppMain +{ + public static void main( String[] args ) + { + String cityCode = "101091103"; + + WeatherDisasterWarningGrabber.getWeatherDisasterWarningJSON( cityCode ); + + System.out.println( "1111" ); + } +} \ No newline at end of file diff --git a/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/WeatherDisasterWarningGrabber.java b/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/WeatherDisasterWarningGrabber.java new file mode 100644 index 0000000..2930890 --- /dev/null +++ b/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/WeatherDisasterWarningGrabber.java @@ -0,0 +1,104 @@ +package com.cpic.xim.disaster_warning; + +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.BufferedReader; + +import java.net.MalformedURLException; +import java.net.URL; +import java.net.HttpURLConnection; +import java.util.zip.GZIPInputStream; + + +public class WeatherDisasterWarningGrabber +{ + private static String QUERY_URL = "https://devapi.qweather.com/v7/warning/now?"; + private static String USER_KEY = "fe9fa8eeeb6f4301a92541eed565dd15"; + + public static String getWeatherDisasterWarningJSON( String cityCode ) + { + //拼接url字符串 + String json = ""; + String requestURL = QUERY_URL + "key=" + USER_KEY + "&location=" + cityCode; + + //requestURL = "http://127.0.0.1:8000/ajax"; + + //链接用 + HttpURLConnection connection = null; + URL url = null; + InputStream inputStream = null; + BufferedReader bufferedReader = null; + StringBuilder buffer = new StringBuilder(); + + try + { + url = new URL( requestURL ); + connection = (HttpURLConnection) url.openConnection(); + + connection.setRequestMethod( "GET" ); + connection.setConnectTimeout( 15000 ); + connection.setReadTimeout( 60000 ); + connection.connect(); + + int reponseCode = connection.getResponseCode(); + + //如果responseCode为200,说明访问成功! + if ( connection.getResponseCode() == 200 ) + { + inputStream = new GZIPInputStream( connection.getInputStream() ); + bufferedReader = new BufferedReader( new InputStreamReader( inputStream, "UTF-8" ) ); + + //读出数据 + String temp = bufferedReader.readLine(); + + while ( temp != null ) + { + buffer.append( temp ); + + temp = bufferedReader.readLine(); + } + + json = buffer.toString(); + } + } + catch ( MalformedURLException error ) + { + error.printStackTrace(); + } + catch ( IOException error ) + { + System.out.println( "读取失败!" ); + } + finally + { + if ( bufferedReader != null ) + { + try + { + bufferedReader.close(); + } + catch ( IOException error ) + { + error.printStackTrace(); + } + } + + if ( inputStream != null ) + { + try + { + inputStream.close(); + } + catch ( IOException error ) + { + error.printStackTrace(); + } + } + + connection.disconnect(); + } + + return json; + } +} From 0e574c70315e4ea1a8fde033d07d3527fefbd16f Mon Sep 17 00:00:00 2001 From: Kane Wang Date: Wed, 16 Mar 2022 16:05:17 +0800 Subject: [PATCH 06/49] ... --- .../disaster_warning/WeatherDisasterWarningGrabber.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/WeatherDisasterWarningGrabber.java b/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/WeatherDisasterWarningGrabber.java index 2930890..9f2d925 100644 --- a/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/WeatherDisasterWarningGrabber.java +++ b/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/WeatherDisasterWarningGrabber.java @@ -16,14 +16,17 @@ public class WeatherDisasterWarningGrabber private static String QUERY_URL = "https://devapi.qweather.com/v7/warning/now?"; private static String USER_KEY = "fe9fa8eeeb6f4301a92541eed565dd15"; + /*** + * 从和风天气获取天气警报json字符串 + * @param cityCode 城市或区域代码 + * @return 返回警报的json字符串 + */ public static String getWeatherDisasterWarningJSON( String cityCode ) { //拼接url字符串 String json = ""; String requestURL = QUERY_URL + "key=" + USER_KEY + "&location=" + cityCode; - //requestURL = "http://127.0.0.1:8000/ajax"; - //链接用 HttpURLConnection connection = null; URL url = null; @@ -46,6 +49,7 @@ public class WeatherDisasterWarningGrabber //如果responseCode为200,说明访问成功! if ( connection.getResponseCode() == 200 ) { + //注意,和风使用了gizp压缩响应体 inputStream = new GZIPInputStream( connection.getInputStream() ); bufferedReader = new BufferedReader( new InputStreamReader( inputStream, "UTF-8" ) ); From cea1ff78f71b89061df7a822ebf75de82cf20b4c Mon Sep 17 00:00:00 2001 From: Kane Wang Date: Wed, 16 Mar 2022 17:51:25 +0800 Subject: [PATCH 07/49] ... --- code/java/天气灾害预警/pom.xml | 16 ++ .../QWeatherDisasterWarning.java | 11 + .../QWeatherDisasterWarningItem.java | 207 ++++++++++++++++++ .../WeatherDisasterWarningGrabber.java | 3 +- 4 files changed, 236 insertions(+), 1 deletion(-) create mode 100644 code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/QWeatherDisasterWarning.java create mode 100644 code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/QWeatherDisasterWarningItem.java diff --git a/code/java/天气灾害预警/pom.xml b/code/java/天气灾害预警/pom.xml index 6e0a068..fbbc87e 100644 --- a/code/java/天气灾害预警/pom.xml +++ b/code/java/天气灾害预警/pom.xml @@ -42,6 +42,22 @@ 2.4 jdk15 + + + com.fasterxml.jackson.core + jackson-core + 2.9.8 + + + com.fasterxml.jackson.core + jackson-databind + 2.9.8 + + + com.fasterxml.jackson.core + jackson-annotations + 2.9.8 + 1.8 diff --git a/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/QWeatherDisasterWarning.java b/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/QWeatherDisasterWarning.java new file mode 100644 index 0000000..c83ec94 --- /dev/null +++ b/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/QWeatherDisasterWarning.java @@ -0,0 +1,11 @@ +package com.cpic.xim.disaster_warning; + +import java.util.Vector; + +public class QWeatherDisasterWarning +{ + private String code; + private String updateTime; + private String flLink; + private Vector warningItems; +} diff --git a/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/QWeatherDisasterWarningItem.java b/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/QWeatherDisasterWarningItem.java new file mode 100644 index 0000000..203ddba --- /dev/null +++ b/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/QWeatherDisasterWarningItem.java @@ -0,0 +1,207 @@ +package com.cpic.xim.disaster_warning; + +import java.util.Objects; + +public class QWeatherDisasterWarningItem +{ + public QWeatherDisasterWarningItem( String id, + String sender, + String pubTime, + String title, + String status, + String level, + String type, + String typeName, + String text, + String related, + String urgency, String centainy ) + { + this.id = id; + this.sender = sender; + this.pubTime = pubTime; + this.title = title; + this.status = status; + this.level = level; + this.type = type; + this.typeName = typeName; + this.text = text; + this.related = related; + this.urgency = urgency; + this.centainy = centainy; + } + + @Override + public boolean equals( Object o ) + { + if ( this == o ) + { + return true; + } + if ( o == null || getClass() != o.getClass() ) + { + return false; + } + QWeatherDisasterWarningItem that = (QWeatherDisasterWarningItem) o; + return id.equals( that.id ) && Objects.equals( sender, that.sender ) && Objects.equals( pubTime, + that.pubTime ) && Objects.equals( + title, + that.title ) && Objects.equals( status, that.status ) && Objects.equals( level, + that.level ) && Objects.equals( + type, + that.type ) && Objects.equals( typeName, that.typeName ) && Objects.equals( text, + that.text ) && Objects.equals( + related, + that.related ) && Objects.equals( urgency, that.urgency ) && Objects.equals( centainy, + that.centainy ); + } + + @Override + public int hashCode() + { + return Objects.hash( id, + sender, + pubTime, + title, + status, + level, + type, + typeName, + text, + related, + urgency, + centainy ); + } + + public String getId() + { + return id; + } + + public void setId( String id ) + { + this.id = id; + } + + public String getSender() + { + return sender; + } + + public void setSender( String sender ) + { + this.sender = sender; + } + + public String getPubTime() + { + return pubTime; + } + + public void setPubTime( String pubTime ) + { + this.pubTime = pubTime; + } + + public String getTitle() + { + return title; + } + + public void setTitle( String title ) + { + this.title = title; + } + + public String getStatus() + { + return status; + } + + public void setStatus( String status ) + { + this.status = status; + } + + public String getLevel() + { + return level; + } + + public void setLevel( String level ) + { + this.level = level; + } + + public String getType() + { + return type; + } + + public void setType( String type ) + { + this.type = type; + } + + public String getTypeName() + { + return typeName; + } + + public void setTypeName( String typeName ) + { + this.typeName = typeName; + } + + public String getText() + { + return text; + } + + public void setText( String text ) + { + this.text = text; + } + + public String getRelated() + { + return related; + } + + public void setRelated( String related ) + { + this.related = related; + } + + public String getUrgency() + { + return urgency; + } + + public void setUrgency( String urgency ) + { + this.urgency = urgency; + } + + public String getCentainy() + { + return centainy; + } + + public void setCentainy( String centainy ) + { + this.centainy = centainy; + } + + private String id; + private String sender; + private String pubTime; + private String title; + private String status; + private String level; + private String type; + private String typeName; + private String text; + private String related; + private String urgency; + private String centainy; +} diff --git a/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/WeatherDisasterWarningGrabber.java b/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/WeatherDisasterWarningGrabber.java index 9f2d925..bc42e7b 100644 --- a/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/WeatherDisasterWarningGrabber.java +++ b/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/WeatherDisasterWarningGrabber.java @@ -10,11 +10,11 @@ import java.net.URL; import java.net.HttpURLConnection; import java.util.zip.GZIPInputStream; - public class WeatherDisasterWarningGrabber { private static String QUERY_URL = "https://devapi.qweather.com/v7/warning/now?"; private static String USER_KEY = "fe9fa8eeeb6f4301a92541eed565dd15"; + private static QWeatherDisasterWarningItem item = null; /*** * 从和风天气获取天气警报json字符串 @@ -105,4 +105,5 @@ public class WeatherDisasterWarningGrabber return json; } + } From 36166f5b603889cb99f164906c4ac4d7f41e1eb2 Mon Sep 17 00:00:00 2001 From: Kane Wang Date: Wed, 16 Mar 2022 18:26:36 +0800 Subject: [PATCH 08/49] =?UTF-8?q?=E5=81=9A=E4=BA=86=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E5=B0=8F=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/java/天气灾害预警/.idea/compiler.xml | 3 +++ .../WeatherDisasterWarningGrabber.java | 11 +++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/code/java/天气灾害预警/.idea/compiler.xml b/code/java/天气灾害预警/.idea/compiler.xml index 7ffa0fe..15902b2 100644 --- a/code/java/天气灾害预警/.idea/compiler.xml +++ b/code/java/天气灾害预警/.idea/compiler.xml @@ -9,5 +9,8 @@ + + + \ No newline at end of file diff --git a/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/WeatherDisasterWarningGrabber.java b/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/WeatherDisasterWarningGrabber.java index bc42e7b..858543a 100644 --- a/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/WeatherDisasterWarningGrabber.java +++ b/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/WeatherDisasterWarningGrabber.java @@ -12,9 +12,9 @@ import java.util.zip.GZIPInputStream; public class WeatherDisasterWarningGrabber { - private static String QUERY_URL = "https://devapi.qweather.com/v7/warning/now?"; - private static String USER_KEY = "fe9fa8eeeb6f4301a92541eed565dd15"; - private static QWeatherDisasterWarningItem item = null; + private final static String QUERY_URL = "https://devapi.qweather.com/v7/warning/now?"; + private final static String USER_KEY = "fe9fa8eeeb6f4301a92541eed565dd15"; + //private static QWeatherDisasterWarningItem item = null; /*** * 从和风天气获取天气警报json字符串 @@ -44,12 +44,10 @@ public class WeatherDisasterWarningGrabber connection.setReadTimeout( 60000 ); connection.connect(); - int reponseCode = connection.getResponseCode(); - //如果responseCode为200,说明访问成功! if ( connection.getResponseCode() == 200 ) { - //注意,和风使用了gizp压缩响应体 + //注意,和风使用了gzip压缩响应体 inputStream = new GZIPInputStream( connection.getInputStream() ); bufferedReader = new BufferedReader( new InputStreamReader( inputStream, "UTF-8" ) ); @@ -100,6 +98,7 @@ public class WeatherDisasterWarningGrabber } } + assert connection != null; connection.disconnect(); } From 5825b7a929b9cf6100bf0a4037c4dcefc8389ba0 Mon Sep 17 00:00:00 2001 From: Kane Wang Date: Thu, 17 Mar 2022 09:29:35 +0800 Subject: [PATCH 09/49] ... --- .../QWeatherDisasterWarning.java | 72 +++++++++++++++++-- .../QWeatherDisasterWarningRefer.java | 56 +++++++++++++++ .../WeatherDisasterWarningGrabber.java | 6 +- 3 files changed, 128 insertions(+), 6 deletions(-) create mode 100644 code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/QWeatherDisasterWarningRefer.java diff --git a/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/QWeatherDisasterWarning.java b/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/QWeatherDisasterWarning.java index c83ec94..e45c45c 100644 --- a/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/QWeatherDisasterWarning.java +++ b/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/QWeatherDisasterWarning.java @@ -4,8 +4,72 @@ import java.util.Vector; public class QWeatherDisasterWarning { - private String code; - private String updateTime; - private String flLink; - private Vector warningItems; + public QWeatherDisasterWarning( String code, + String updateTime, + String flLink, + Vector warning, + QWeatherDisasterWarningRefer refer ) + { + this.code = code; + this.updateTime = updateTime; + this.flLink = flLink; + this.warning = warning; + this.refer = refer; + } + + public String getCode() + { + return code; + } + + public void setCode( String code ) + { + this.code = code; + } + + public String getUpdateTime() + { + return updateTime; + } + + public void setUpdateTime( String updateTime ) + { + this.updateTime = updateTime; + } + + public String getFlLink() + { + return flLink; + } + + public void setFlLink( String flLink ) + { + this.flLink = flLink; + } + + public Vector getWarning() + { + return warning; + } + + public void setWarning( Vector warning ) + { + this.warning = warning; + } + + public QWeatherDisasterWarningRefer getRefer() + { + return refer; + } + + public void setRefer( QWeatherDisasterWarningRefer refer ) + { + this.refer = refer; + } + + private String code; + private String updateTime; + private String flLink; + private Vector warning; + private QWeatherDisasterWarningRefer refer; } diff --git a/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/QWeatherDisasterWarningRefer.java b/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/QWeatherDisasterWarningRefer.java new file mode 100644 index 0000000..963e10a --- /dev/null +++ b/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/QWeatherDisasterWarningRefer.java @@ -0,0 +1,56 @@ +package com.cpic.xim.disaster_warning; + +import java.util.Objects; + +public class QWeatherDisasterWarningRefer +{ + public QWeatherDisasterWarningRefer( String source, String license ) + { + this.source = source; + this.license = license; + } + + public String getSource() + { + return source; + } + + public void setSource( String source ) + { + this.source = source; + } + + public String getLicense() + { + return license; + } + + public void setLicense( String license ) + { + this.license = license; + } + + @Override + public boolean equals( Object o ) + { + if ( this == o ) + { + return true; + } + if ( o == null || getClass() != o.getClass() ) + { + return false; + } + QWeatherDisasterWarningRefer that = (QWeatherDisasterWarningRefer) o; + return source.equals( that.source ) && license.equals( that.license ); + } + + @Override + public int hashCode() + { + return Objects.hash( source, license ); + } + + private String source; + private String license; +} diff --git a/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/WeatherDisasterWarningGrabber.java b/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/WeatherDisasterWarningGrabber.java index 858543a..98fb958 100644 --- a/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/WeatherDisasterWarningGrabber.java +++ b/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/WeatherDisasterWarningGrabber.java @@ -98,8 +98,10 @@ public class WeatherDisasterWarningGrabber } } - assert connection != null; - connection.disconnect(); + if ( connection != null ) + { + connection.disconnect(); + } } return json; From 479eb32f7eb26994d33076432214b79f3b4533b9 Mon Sep 17 00:00:00 2001 From: Kane Wang Date: Thu, 17 Mar 2022 16:40:09 +0800 Subject: [PATCH 10/49] =?UTF-8?q?=E5=AE=8C=E6=88=90json=E5=8F=8D=E5=BA=8F?= =?UTF-8?q?=E5=88=97=E5=8C=96=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/java/天气灾害预警/pom.xml | 1 + .../src/main/java/AppMain.java | 23 +++++++++- .../QWeatherDisasterWarning.java | 16 ++++--- .../QWeatherDisasterWarningItem.java | 27 ++++++----- .../QWeatherDisasterWarningRefer.java | 45 +++++-------------- .../WeatherDisasterWarningGrabber.java | 10 +++++ 6 files changed, 67 insertions(+), 55 deletions(-) diff --git a/code/java/天气灾害预警/pom.xml b/code/java/天气灾害预警/pom.xml index fbbc87e..3bfdadc 100644 --- a/code/java/天气灾害预警/pom.xml +++ b/code/java/天气灾害预警/pom.xml @@ -58,6 +58,7 @@ jackson-annotations 2.9.8 + 1.8 diff --git a/code/java/天气灾害预警/src/main/java/AppMain.java b/code/java/天气灾害预警/src/main/java/AppMain.java index 4cb78ef..459cc73 100644 --- a/code/java/天气灾害预警/src/main/java/AppMain.java +++ b/code/java/天气灾害预警/src/main/java/AppMain.java @@ -1,12 +1,31 @@ +import com.cpic.xim.disaster_warning.QWeatherDisasterWarning; import com.cpic.xim.disaster_warning.WeatherDisasterWarningGrabber; +import java.io.IOException; + public class AppMain { public static void main( String[] args ) { - String cityCode = "101091103"; + String cityCode = "101230201"; + String json; + QWeatherDisasterWarning warning; + json = WeatherDisasterWarningGrabber.getWeatherDisasterWarningJSON( cityCode ); + //json = "{\"code\":\"200\",\"updateTime\":\"2022-03-17T15:46+08:00\",\"fxLink\":\"http://hfx.link/2qg5\",\"warning\":[{\"id\":\"10109110320220317152846295440963\",\"sender\":\"秦皇岛市气象台\",\"pubTime\":\"2022-03-17T15:28+08:00\",\"title\":\"秦皇岛市气象台更新大风蓝色预警[Ⅳ级/一般]\",\"status\":\"update\",\"level\":\"蓝色\",\"type\":\"1006\",\"typeName\":\"大风\",\"text\":\"秦皇岛市气象台2022年03月17日15时26分继续发布大风蓝色预警信号:预计今天下午到夜间,我市沿岸海域和沿海地区仍有东北风5~6级,阵风7~8级,其他地区4~5级,阵风6级,请防范。\",\"related\":\"10109110320220315152346034785400\",\"urgency\":\"\",\"certainty\":\"\"},{\"id\":\"10109110320220317111800391536363\",\"sender\":\"河北省气象台\",\"pubTime\":\"2022-03-17T11:18+08:00\",\"title\":\"河北省气象台更新寒潮黄色预警[Ⅲ级/较重]\",\"status\":\"update\",\"level\":\"黄色\",\"type\":\"1005\",\"typeName\":\"寒潮\",\"text\":\"河北省气象台2022年03月17日11时17分继续发布寒潮黄色预警信号:受冷空气影响,目前全省大部分地区最低气温已下降6~8℃,局地下降8~12℃,预计今天夜间到19日,全省仍有明显降温过程,大部分地区最低气温继续下降3~5℃,西北部地区局地下降8℃以上;18日到19日早晨,北部地区最低气温降至-15~-5℃,其中坝上地区降至-20~-15℃,其他地区降至-5~0℃。请防范!\",\"related\":\"10109110320220316110012116815176\",\"urgency\":\"\",\"certainty\":\"\"},{\"id\":\"10109110320220316154314834852572\",\"sender\":\"昌黎县气象台\",\"pubTime\":\"2022-03-16T15:43+08:00\",\"title\":\"昌黎县气象台更新寒潮蓝色预警[Ⅳ级/一般]\",\"status\":\"update\",\"level\":\"蓝色\",\"type\":\"1005\",\"typeName\":\"寒潮\",\"text\":\"昌黎县气象台2022年03月16日15时39分继续发布寒潮蓝色预警信号:受冷空气影响,预计今天下午到18日,我县平均气温将继续下降6-8℃,17日白天最高气温为3℃,18日早晨最低气温可达-5℃,请防范。\",\"related\":\"10109110320220315155452789394523\",\"urgency\":\"\",\"certainty\":\"\"}],\"refer\":{\"sources\":[\"12379\"],\"license\":[\"no commercial use\"]}}"; - WeatherDisasterWarningGrabber.getWeatherDisasterWarningJSON( cityCode ); + if ( json.isEmpty() == true ) + { + System.out.println( "获取天气信息失败!" ); + } + + try + { + warning = WeatherDisasterWarningGrabber.convertWeatherDisasterWarning( json ); + } + catch ( IOException error ) + { + error.printStackTrace(); + } System.out.println( "1111" ); } diff --git a/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/QWeatherDisasterWarning.java b/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/QWeatherDisasterWarning.java index e45c45c..7b0d677 100644 --- a/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/QWeatherDisasterWarning.java +++ b/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/QWeatherDisasterWarning.java @@ -6,17 +6,19 @@ public class QWeatherDisasterWarning { public QWeatherDisasterWarning( String code, String updateTime, - String flLink, + String fxLink, Vector warning, QWeatherDisasterWarningRefer refer ) { this.code = code; this.updateTime = updateTime; - this.flLink = flLink; + this.fxLink = fxLink; this.warning = warning; this.refer = refer; } + public QWeatherDisasterWarning() {} + public String getCode() { return code; @@ -37,14 +39,14 @@ public class QWeatherDisasterWarning this.updateTime = updateTime; } - public String getFlLink() + public String getFxLink() { - return flLink; + return fxLink; } - public void setFlLink( String flLink ) + public void setFxLink( String fxLink ) { - this.flLink = flLink; + this.fxLink = fxLink; } public Vector getWarning() @@ -69,7 +71,7 @@ public class QWeatherDisasterWarning private String code; private String updateTime; - private String flLink; + private String fxLink; private Vector warning; private QWeatherDisasterWarningRefer refer; } diff --git a/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/QWeatherDisasterWarningItem.java b/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/QWeatherDisasterWarningItem.java index 203ddba..b0b4e5c 100644 --- a/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/QWeatherDisasterWarningItem.java +++ b/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/QWeatherDisasterWarningItem.java @@ -2,8 +2,12 @@ package com.cpic.xim.disaster_warning; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; + public class QWeatherDisasterWarningItem { + public QWeatherDisasterWarningItem() {} public QWeatherDisasterWarningItem( String id, String sender, String pubTime, @@ -14,7 +18,7 @@ public class QWeatherDisasterWarningItem String typeName, String text, String related, - String urgency, String centainy ) + String urgency, String certainty ) { this.id = id; this.sender = sender; @@ -26,8 +30,8 @@ public class QWeatherDisasterWarningItem this.typeName = typeName; this.text = text; this.related = related; - this.urgency = urgency; - this.centainy = centainy; + this.urgency = urgency; + this.certainty = certainty; } @Override @@ -51,8 +55,8 @@ public class QWeatherDisasterWarningItem that.type ) && Objects.equals( typeName, that.typeName ) && Objects.equals( text, that.text ) && Objects.equals( related, - that.related ) && Objects.equals( urgency, that.urgency ) && Objects.equals( centainy, - that.centainy ); + that.related ) && Objects.equals( urgency, that.urgency ) && Objects.equals( certainty, + that.certainty ); } @Override @@ -69,7 +73,7 @@ public class QWeatherDisasterWarningItem text, related, urgency, - centainy ); + certainty ); } public String getId() @@ -182,18 +186,19 @@ public class QWeatherDisasterWarningItem this.urgency = urgency; } - public String getCentainy() + public String getCertainty() { - return centainy; + return certainty; } - public void setCentainy( String centainy ) + public void setCertainty( String certainty ) { - this.centainy = centainy; + this.certainty = certainty; } private String id; private String sender; + @JsonFormat(pattern="yyyy-MM-dd'T'HH:mm") private String pubTime; private String title; private String status; @@ -203,5 +208,5 @@ public class QWeatherDisasterWarningItem private String text; private String related; private String urgency; - private String centainy; + private String certainty; } diff --git a/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/QWeatherDisasterWarningRefer.java b/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/QWeatherDisasterWarningRefer.java index 963e10a..d225193 100644 --- a/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/QWeatherDisasterWarningRefer.java +++ b/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/QWeatherDisasterWarningRefer.java @@ -4,53 +4,28 @@ import java.util.Objects; public class QWeatherDisasterWarningRefer { - public QWeatherDisasterWarningRefer( String source, String license ) + public QWeatherDisasterWarningRefer() {} + + public String[] getSources() { - this.source = source; - this.license = license; + return sources; } - public String getSource() + public void setSources( String[] sources ) { - return source; + this.sources = sources; } - public void setSource( String source ) - { - this.source = source; - } - - public String getLicense() + public String[] getLicense() { return license; } - public void setLicense( String license ) + public void setLicense( String[] license ) { this.license = license; } - @Override - public boolean equals( Object o ) - { - if ( this == o ) - { - return true; - } - if ( o == null || getClass() != o.getClass() ) - { - return false; - } - QWeatherDisasterWarningRefer that = (QWeatherDisasterWarningRefer) o; - return source.equals( that.source ) && license.equals( that.license ); - } - - @Override - public int hashCode() - { - return Objects.hash( source, license ); - } - - private String source; - private String license; + private String[] sources; + private String[] license; } diff --git a/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/WeatherDisasterWarningGrabber.java b/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/WeatherDisasterWarningGrabber.java index 98fb958..3b70e8d 100644 --- a/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/WeatherDisasterWarningGrabber.java +++ b/code/java/天气灾害预警/src/main/java/com/cpic/xim/disaster_warning/WeatherDisasterWarningGrabber.java @@ -1,5 +1,7 @@ package com.cpic.xim.disaster_warning; +import com.fasterxml.jackson.databind.ObjectMapper; + import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; @@ -107,4 +109,12 @@ public class WeatherDisasterWarningGrabber return json; } + public static QWeatherDisasterWarning convertWeatherDisasterWarning( String json ) + throws IOException + { + ObjectMapper mapper = new ObjectMapper(); + QWeatherDisasterWarning warning = mapper.readValue( json, QWeatherDisasterWarning.class ); + + return warning; + } } From 540b44cf9d46a89099d501fb5381de4ab12acb7b Mon Sep 17 00:00:00 2001 From: Kane Wang Date: Fri, 18 Mar 2022 01:40:59 +0800 Subject: [PATCH 11/49] =?UTF-8?q?=E3=80=82=E3=80=82=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../.idea/disaster_warning.iml | 25 ++ .../天气灾害预警/.idea/encodings.xml | 1 - .../.idea/天气灾害预警.iml | 13 - .../.idea/天气灾害预警.xml | 147 ++++++ .../天气灾害预警/disaster_warning.ipr | 241 ++++++++++ .../天气灾害预警/disaster_warning.iws | 423 ++++++++++++++++++ code/java/天气灾害预警/pom.xml | 31 +- .../src/main/java/AppMain.java | 18 +- .../QWeatherDisasterWarningItem.java | 2 +- .../QWeatherDisasterWarningRefer.java | 12 +- .../WeatherDisasterWarningGrabber.java | 2 +- .../workspace.code-workspace | 10 + 12 files changed, 887 insertions(+), 38 deletions(-) create mode 100644 code/java/天气灾害预警/.idea/disaster_warning.iml delete mode 100644 code/java/天气灾害预警/.idea/天气灾害预警.iml create mode 100644 code/java/天气灾害预警/.idea/天气灾害预警.xml create mode 100644 code/java/天气灾害预警/disaster_warning.ipr create mode 100644 code/java/天气灾害预警/disaster_warning.iws create mode 100644 code/java/天气灾害预警/workspace.code-workspace diff --git a/code/java/天气灾害预警/.idea/disaster_warning.iml b/code/java/天气灾害预警/.idea/disaster_warning.iml new file mode 100644 index 0000000..6b8502e --- /dev/null +++ b/code/java/天气灾害预警/.idea/disaster_warning.iml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/code/java/天气灾害预警/.idea/encodings.xml b/code/java/天气灾害预警/.idea/encodings.xml index 78bf31c..860a155 100644 --- a/code/java/天气灾害预警/.idea/encodings.xml +++ b/code/java/天气灾害预警/.idea/encodings.xml @@ -2,7 +2,6 @@ - \ No newline at end of file diff --git a/code/java/天气灾害预警/.idea/天气灾害预警.iml b/code/java/天气灾害预警/.idea/天气灾害预警.iml deleted file mode 100644 index 13a38a8..0000000 --- a/code/java/天气灾害预警/.idea/天气灾害预警.iml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/code/java/天气灾害预警/.idea/天气灾害预警.xml b/code/java/天气灾害预警/.idea/天气灾害预警.xml new file mode 100644 index 0000000..db0d286 --- /dev/null +++ b/code/java/天气灾害预警/.idea/天气灾害预警.xml @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1647326463353 + + + + + + + + + + +