diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..8396364 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,31 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel.DataBean data) { + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..8396364 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,31 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel.DataBean data) { + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java index a34da1b..0c5225d 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -1,8 +1,8 @@ package com.casic.missiles.modular.system.dto; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; import lombok.Data; import java.util.ArrayList; @@ -142,7 +142,7 @@ private String centerPosition; } - public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + public TyphoonDetailDTO(TyphoonDetail detail, List landPoints, List routePoints) { this.typhoonId = detail.getTyphoonId(); this.name = detail.getName(); this.engName = detail.getEngName(); @@ -152,8 +152,9 @@ this.startTime = detail.getStartTime(); this.endTime = detail.getEndTime(); this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); - for (TyphoonLand landBean : landBeans) { + for (LandPoint landBean : landPoints) { LandBan bean = new LandBan(); bean.landAddress = landBean.getLandAddress(); bean.landTime = landBean.getLandTime(); @@ -164,8 +165,9 @@ lands.add(bean); } this.land = lands; + List points = new ArrayList<>(); - for (TyphoonPoint point : pointBeans) { + for (RoutePoint point : routePoints) { PointBean pointBean = new PointBean(); pointBean.time = point.getTime(); pointBean.centerPressure = point.getCenterPressure(); diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..8396364 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,31 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel.DataBean data) { + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java index a34da1b..0c5225d 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -1,8 +1,8 @@ package com.casic.missiles.modular.system.dto; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; import lombok.Data; import java.util.ArrayList; @@ -142,7 +142,7 @@ private String centerPosition; } - public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + public TyphoonDetailDTO(TyphoonDetail detail, List landPoints, List routePoints) { this.typhoonId = detail.getTyphoonId(); this.name = detail.getName(); this.engName = detail.getEngName(); @@ -152,8 +152,9 @@ this.startTime = detail.getStartTime(); this.endTime = detail.getEndTime(); this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); - for (TyphoonLand landBean : landBeans) { + for (LandPoint landBean : landPoints) { LandBan bean = new LandBan(); bean.landAddress = landBean.getLandAddress(); bean.landTime = landBean.getLandTime(); @@ -164,8 +165,9 @@ lands.add(bean); } this.land = lands; + List points = new ArrayList<>(); - for (TyphoonPoint point : pointBeans) { + for (RoutePoint point : routePoints) { PointBean pointBean = new PointBean(); pointBean.time = point.getTime(); pointBean.centerPressure = point.getCenterPressure(); diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java new file mode 100644 index 0000000..b0b2e7a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java @@ -0,0 +1,265 @@ +package com.casic.missiles.modular.system.dto.remote; + +/** + * 洋流数据模型 + * + * @author a203 + */ +public class OceanDetailModel { + + /** + * code : 200 + * data : {"altitude":0,"forecast":{"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34},"oceanDir":135.22,"pressure":100925.19,"speed":7.97,"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"temperature":28.6,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34,"windDir":71.84,"windSpeed":7.97} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * altitude : 0 + * forecast : {"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34} + * oceanDir : 135.22 + * pressure : 100925.19 + * speed : 7.97 + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * temperature : 28.6 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + * windDir : 71.84 + * windSpeed : 7.97 + */ + + private double altitude; + private ForecastBean forecast; + private double oceanDir; + private double pressure; + private double speed; + private double swellDir; + private double swellHeight; + private double swellPrd; + private double temperature; + private double waveDir; + private double waveHeight; + private double wavePrd; + private double windDir; + private double windSpeed; + + public double getAltitude() { + return altitude; + } + + public void setAltitude(double altitude) { + this.altitude = altitude; + } + + public ForecastBean getForecast() { + return forecast; + } + + public void setForecast(ForecastBean forecast) { + this.forecast = forecast; + } + + public double getOceanDir() { + return oceanDir; + } + + public void setOceanDir(double oceanDir) { + this.oceanDir = oceanDir; + } + + public double getPressure() { + return pressure; + } + + public void setPressure(double pressure) { + this.pressure = pressure; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getTemperature() { + return temperature; + } + + public void setTemperature(double temperature) { + this.temperature = temperature; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + + public double getWindDir() { + return windDir; + } + + public void setWindDir(double windDir) { + this.windDir = windDir; + } + + public double getWindSpeed() { + return windSpeed; + } + + public void setWindSpeed(double windSpeed) { + this.windSpeed = windSpeed; + } + + public static class ForecastBean { + /** + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + */ + + private double swellDir; + private double swellHeight; + private double swellPrd; + private double waveDir; + private double waveHeight; + private double wavePrd; + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + } + } +} diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..8396364 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,31 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel.DataBean data) { + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java index a34da1b..0c5225d 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -1,8 +1,8 @@ package com.casic.missiles.modular.system.dto; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; import lombok.Data; import java.util.ArrayList; @@ -142,7 +142,7 @@ private String centerPosition; } - public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + public TyphoonDetailDTO(TyphoonDetail detail, List landPoints, List routePoints) { this.typhoonId = detail.getTyphoonId(); this.name = detail.getName(); this.engName = detail.getEngName(); @@ -152,8 +152,9 @@ this.startTime = detail.getStartTime(); this.endTime = detail.getEndTime(); this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); - for (TyphoonLand landBean : landBeans) { + for (LandPoint landBean : landPoints) { LandBan bean = new LandBan(); bean.landAddress = landBean.getLandAddress(); bean.landTime = landBean.getLandTime(); @@ -164,8 +165,9 @@ lands.add(bean); } this.land = lands; + List points = new ArrayList<>(); - for (TyphoonPoint point : pointBeans) { + for (RoutePoint point : routePoints) { PointBean pointBean = new PointBean(); pointBean.time = point.getTime(); pointBean.centerPressure = point.getCenterPressure(); diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java new file mode 100644 index 0000000..b0b2e7a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java @@ -0,0 +1,265 @@ +package com.casic.missiles.modular.system.dto.remote; + +/** + * 洋流数据模型 + * + * @author a203 + */ +public class OceanDetailModel { + + /** + * code : 200 + * data : {"altitude":0,"forecast":{"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34},"oceanDir":135.22,"pressure":100925.19,"speed":7.97,"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"temperature":28.6,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34,"windDir":71.84,"windSpeed":7.97} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * altitude : 0 + * forecast : {"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34} + * oceanDir : 135.22 + * pressure : 100925.19 + * speed : 7.97 + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * temperature : 28.6 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + * windDir : 71.84 + * windSpeed : 7.97 + */ + + private double altitude; + private ForecastBean forecast; + private double oceanDir; + private double pressure; + private double speed; + private double swellDir; + private double swellHeight; + private double swellPrd; + private double temperature; + private double waveDir; + private double waveHeight; + private double wavePrd; + private double windDir; + private double windSpeed; + + public double getAltitude() { + return altitude; + } + + public void setAltitude(double altitude) { + this.altitude = altitude; + } + + public ForecastBean getForecast() { + return forecast; + } + + public void setForecast(ForecastBean forecast) { + this.forecast = forecast; + } + + public double getOceanDir() { + return oceanDir; + } + + public void setOceanDir(double oceanDir) { + this.oceanDir = oceanDir; + } + + public double getPressure() { + return pressure; + } + + public void setPressure(double pressure) { + this.pressure = pressure; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getTemperature() { + return temperature; + } + + public void setTemperature(double temperature) { + this.temperature = temperature; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + + public double getWindDir() { + return windDir; + } + + public void setWindDir(double windDir) { + this.windDir = windDir; + } + + public double getWindSpeed() { + return windSpeed; + } + + public void setWindSpeed(double windSpeed) { + this.windSpeed = windSpeed; + } + + public static class ForecastBean { + /** + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + */ + + private double swellDir; + private double swellHeight; + private double swellPrd; + private double waveDir; + private double waveHeight; + private double wavePrd; + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java deleted file mode 100644 index 5ad3a22..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java +++ /dev/null @@ -1,439 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方洋流数据模型 - * - * @author a203 - */ -public class OceanDetailRemoteData { - - /** - * code : 0 - * data : {"lon":114.338597,"lat":18.273134,"date":"2021-10-21","hour":10,"list":[{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}]} - * message : success - * etime : 1634786517992 - */ - - private int code; - private DataBean data; - private String message; - private long etime; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public DataBean getData() { - return data; - } - - public void setData(DataBean data) { - this.data = data; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public long getEtime() { - return etime; - } - - public void setEtime(long etime) { - this.etime = etime; - } - - public static class DataBean { - /** - * lon : 114.338597 - * lat : 18.273134 - * date : 2021-10-21 - * hour : 10 - * list : [{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}] - */ - - private double lon; - private double lat; - private String date; - private int hour; - private List list; - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public int getHour() { - return hour; - } - - public void setHour(int hour) { - this.hour = hour; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * date : 2021-10-21 - * ytx : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - * meteo : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - */ - - private String date; - private YtxBean ytx; - private MeteoBean meteo; - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public YtxBean getYtx() { - return ytx; - } - - public void setYtx(YtxBean ytx) { - this.ytx = ytx; - } - - public MeteoBean getMeteo() { - return meteo; - } - - public void setMeteo(MeteoBean meteo) { - this.meteo = meteo; - } - - public static class YtxBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - - public static class MeteoBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - } - } -} diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..8396364 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,31 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel.DataBean data) { + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java index a34da1b..0c5225d 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -1,8 +1,8 @@ package com.casic.missiles.modular.system.dto; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; import lombok.Data; import java.util.ArrayList; @@ -142,7 +142,7 @@ private String centerPosition; } - public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + public TyphoonDetailDTO(TyphoonDetail detail, List landPoints, List routePoints) { this.typhoonId = detail.getTyphoonId(); this.name = detail.getName(); this.engName = detail.getEngName(); @@ -152,8 +152,9 @@ this.startTime = detail.getStartTime(); this.endTime = detail.getEndTime(); this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); - for (TyphoonLand landBean : landBeans) { + for (LandPoint landBean : landPoints) { LandBan bean = new LandBan(); bean.landAddress = landBean.getLandAddress(); bean.landTime = landBean.getLandTime(); @@ -164,8 +165,9 @@ lands.add(bean); } this.land = lands; + List points = new ArrayList<>(); - for (TyphoonPoint point : pointBeans) { + for (RoutePoint point : routePoints) { PointBean pointBean = new PointBean(); pointBean.time = point.getTime(); pointBean.centerPressure = point.getCenterPressure(); diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java new file mode 100644 index 0000000..b0b2e7a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java @@ -0,0 +1,265 @@ +package com.casic.missiles.modular.system.dto.remote; + +/** + * 洋流数据模型 + * + * @author a203 + */ +public class OceanDetailModel { + + /** + * code : 200 + * data : {"altitude":0,"forecast":{"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34},"oceanDir":135.22,"pressure":100925.19,"speed":7.97,"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"temperature":28.6,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34,"windDir":71.84,"windSpeed":7.97} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * altitude : 0 + * forecast : {"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34} + * oceanDir : 135.22 + * pressure : 100925.19 + * speed : 7.97 + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * temperature : 28.6 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + * windDir : 71.84 + * windSpeed : 7.97 + */ + + private double altitude; + private ForecastBean forecast; + private double oceanDir; + private double pressure; + private double speed; + private double swellDir; + private double swellHeight; + private double swellPrd; + private double temperature; + private double waveDir; + private double waveHeight; + private double wavePrd; + private double windDir; + private double windSpeed; + + public double getAltitude() { + return altitude; + } + + public void setAltitude(double altitude) { + this.altitude = altitude; + } + + public ForecastBean getForecast() { + return forecast; + } + + public void setForecast(ForecastBean forecast) { + this.forecast = forecast; + } + + public double getOceanDir() { + return oceanDir; + } + + public void setOceanDir(double oceanDir) { + this.oceanDir = oceanDir; + } + + public double getPressure() { + return pressure; + } + + public void setPressure(double pressure) { + this.pressure = pressure; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getTemperature() { + return temperature; + } + + public void setTemperature(double temperature) { + this.temperature = temperature; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + + public double getWindDir() { + return windDir; + } + + public void setWindDir(double windDir) { + this.windDir = windDir; + } + + public double getWindSpeed() { + return windSpeed; + } + + public void setWindSpeed(double windSpeed) { + this.windSpeed = windSpeed; + } + + public static class ForecastBean { + /** + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + */ + + private double swellDir; + private double swellHeight; + private double swellPrd; + private double waveDir; + private double waveHeight; + private double wavePrd; + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java deleted file mode 100644 index 5ad3a22..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java +++ /dev/null @@ -1,439 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方洋流数据模型 - * - * @author a203 - */ -public class OceanDetailRemoteData { - - /** - * code : 0 - * data : {"lon":114.338597,"lat":18.273134,"date":"2021-10-21","hour":10,"list":[{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}]} - * message : success - * etime : 1634786517992 - */ - - private int code; - private DataBean data; - private String message; - private long etime; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public DataBean getData() { - return data; - } - - public void setData(DataBean data) { - this.data = data; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public long getEtime() { - return etime; - } - - public void setEtime(long etime) { - this.etime = etime; - } - - public static class DataBean { - /** - * lon : 114.338597 - * lat : 18.273134 - * date : 2021-10-21 - * hour : 10 - * list : [{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}] - */ - - private double lon; - private double lat; - private String date; - private int hour; - private List list; - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public int getHour() { - return hour; - } - - public void setHour(int hour) { - this.hour = hour; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * date : 2021-10-21 - * ytx : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - * meteo : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - */ - - private String date; - private YtxBean ytx; - private MeteoBean meteo; - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public YtxBean getYtx() { - return ytx; - } - - public void setYtx(YtxBean ytx) { - this.ytx = ytx; - } - - public MeteoBean getMeteo() { - return meteo; - } - - public void setMeteo(MeteoBean meteo) { - this.meteo = meteo; - } - - public static class YtxBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - - public static class MeteoBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java new file mode 100644 index 0000000..3a2e068 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java @@ -0,0 +1,374 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风数据模型 + * + * @author a203 + */ +public class TyphoonDetailModel { + + /** + * code : 200 + * data : {"centerLat":20.65,"centerLng":128.1,"endTime":"2021-10-11 8:00:00","engName":"Kompasu","isActive":"1","land":[],"name":"圆规","points":[{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}],"startTime":"2021-10-8 2:00:00","typhoonId":"202118","warnLevel":"white"} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * centerLat : 20.65 + * centerLng : 128.1 + * endTime : 2021-10-11 8:00:00 + * engName : Kompasu + * isActive : 1 + * land : [] + * name : 圆规 + * points : [{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}] + * startTime : 2021-10-8 2:00:00 + * typhoonId : 202118 + * warnLevel : white + */ + + private double centerLat; + private double centerLng; + private String endTime; + private String engName; + private String isActive; + private String name; + private String startTime; + private String typhoonId; + private String warnLevel; + private List land; + private List points; + + public double getCenterLat() { + return centerLat; + } + + public void setCenterLat(double centerLat) { + this.centerLat = centerLat; + } + + public double getCenterLng() { + return centerLng; + } + + public void setCenterLng(double centerLng) { + this.centerLng = centerLng; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public String getIsActive() { + return isActive; + } + + public void setIsActive(String isActive) { + this.isActive = isActive; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getWarnLevel() { + return warnLevel; + } + + public void setWarnLevel(String warnLevel) { + this.warnLevel = warnLevel; + } + + public List getLand() { + return land; + } + + public void setLand(List land) { + this.land = land; + } + + public static class LandBean { + private String landAddress; + private String type; + private Double lng; + private Double lat; + private String info; + private String landTime; + + public String getLandAddress() { + return landAddress; + } + + public void setLandAddress(String landAddress) { + this.landAddress = landAddress; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Double getLng() { + return lng; + } + + public void setLng(Double lng) { + this.lng = lng; + } + + public Double getLat() { + return lat; + } + + public void setLat(Double lat) { + this.lat = lat; + } + + public String getInfo() { + return info; + } + + public void setInfo(String info) { + this.info = info; + } + + public String getLandTime() { + return landTime; + } + + public void setLandTime(String landTime) { + this.landTime = landTime; + } + } + + public List getPoints() { + return points; + } + + public void setPoints(List points) { + this.points = points; + } + + public static class PointsBean { + /** + * centerPosition : 距离菲律宾马尼拉东北方向约600公里 + * centerPressure : 990 + * lat : 18.7 + * lng : 124.7 + * moveDirection : 西北西 + * moveSpeed : 25 + * power : 9 + * radius10 : + * radius12 : + * radius7 : 160|140|200|180 + * routePrediction : “圆规”将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分) + * speed : 23 + * time : 2021-10-11 8:00:00 + * typhoonType : 热带风暴 + */ + + private String centerPosition; + private String centerPressure; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private int power; + private String radius10; + private String radius12; + private String radius7; + private String routePrediction; + private String speed; + private String time; + private String typhoonType; + + public String getCenterPosition() { + return centerPosition; + } + + public void setCenterPosition(String centerPosition) { + this.centerPosition = centerPosition; + } + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius12() { + return radius12; + } + + public void setRadius12(String radius12) { + this.radius12 = radius12; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getRoutePrediction() { + return routePrediction; + } + + public void setRoutePrediction(String routePrediction) { + this.routePrediction = routePrediction; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } + } +} diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..8396364 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,31 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel.DataBean data) { + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java index a34da1b..0c5225d 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -1,8 +1,8 @@ package com.casic.missiles.modular.system.dto; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; import lombok.Data; import java.util.ArrayList; @@ -142,7 +142,7 @@ private String centerPosition; } - public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + public TyphoonDetailDTO(TyphoonDetail detail, List landPoints, List routePoints) { this.typhoonId = detail.getTyphoonId(); this.name = detail.getName(); this.engName = detail.getEngName(); @@ -152,8 +152,9 @@ this.startTime = detail.getStartTime(); this.endTime = detail.getEndTime(); this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); - for (TyphoonLand landBean : landBeans) { + for (LandPoint landBean : landPoints) { LandBan bean = new LandBan(); bean.landAddress = landBean.getLandAddress(); bean.landTime = landBean.getLandTime(); @@ -164,8 +165,9 @@ lands.add(bean); } this.land = lands; + List points = new ArrayList<>(); - for (TyphoonPoint point : pointBeans) { + for (RoutePoint point : routePoints) { PointBean pointBean = new PointBean(); pointBean.time = point.getTime(); pointBean.centerPressure = point.getCenterPressure(); diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java new file mode 100644 index 0000000..b0b2e7a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java @@ -0,0 +1,265 @@ +package com.casic.missiles.modular.system.dto.remote; + +/** + * 洋流数据模型 + * + * @author a203 + */ +public class OceanDetailModel { + + /** + * code : 200 + * data : {"altitude":0,"forecast":{"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34},"oceanDir":135.22,"pressure":100925.19,"speed":7.97,"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"temperature":28.6,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34,"windDir":71.84,"windSpeed":7.97} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * altitude : 0 + * forecast : {"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34} + * oceanDir : 135.22 + * pressure : 100925.19 + * speed : 7.97 + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * temperature : 28.6 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + * windDir : 71.84 + * windSpeed : 7.97 + */ + + private double altitude; + private ForecastBean forecast; + private double oceanDir; + private double pressure; + private double speed; + private double swellDir; + private double swellHeight; + private double swellPrd; + private double temperature; + private double waveDir; + private double waveHeight; + private double wavePrd; + private double windDir; + private double windSpeed; + + public double getAltitude() { + return altitude; + } + + public void setAltitude(double altitude) { + this.altitude = altitude; + } + + public ForecastBean getForecast() { + return forecast; + } + + public void setForecast(ForecastBean forecast) { + this.forecast = forecast; + } + + public double getOceanDir() { + return oceanDir; + } + + public void setOceanDir(double oceanDir) { + this.oceanDir = oceanDir; + } + + public double getPressure() { + return pressure; + } + + public void setPressure(double pressure) { + this.pressure = pressure; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getTemperature() { + return temperature; + } + + public void setTemperature(double temperature) { + this.temperature = temperature; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + + public double getWindDir() { + return windDir; + } + + public void setWindDir(double windDir) { + this.windDir = windDir; + } + + public double getWindSpeed() { + return windSpeed; + } + + public void setWindSpeed(double windSpeed) { + this.windSpeed = windSpeed; + } + + public static class ForecastBean { + /** + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + */ + + private double swellDir; + private double swellHeight; + private double swellPrd; + private double waveDir; + private double waveHeight; + private double wavePrd; + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java deleted file mode 100644 index 5ad3a22..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java +++ /dev/null @@ -1,439 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方洋流数据模型 - * - * @author a203 - */ -public class OceanDetailRemoteData { - - /** - * code : 0 - * data : {"lon":114.338597,"lat":18.273134,"date":"2021-10-21","hour":10,"list":[{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}]} - * message : success - * etime : 1634786517992 - */ - - private int code; - private DataBean data; - private String message; - private long etime; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public DataBean getData() { - return data; - } - - public void setData(DataBean data) { - this.data = data; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public long getEtime() { - return etime; - } - - public void setEtime(long etime) { - this.etime = etime; - } - - public static class DataBean { - /** - * lon : 114.338597 - * lat : 18.273134 - * date : 2021-10-21 - * hour : 10 - * list : [{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}] - */ - - private double lon; - private double lat; - private String date; - private int hour; - private List list; - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public int getHour() { - return hour; - } - - public void setHour(int hour) { - this.hour = hour; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * date : 2021-10-21 - * ytx : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - * meteo : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - */ - - private String date; - private YtxBean ytx; - private MeteoBean meteo; - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public YtxBean getYtx() { - return ytx; - } - - public void setYtx(YtxBean ytx) { - this.ytx = ytx; - } - - public MeteoBean getMeteo() { - return meteo; - } - - public void setMeteo(MeteoBean meteo) { - this.meteo = meteo; - } - - public static class YtxBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - - public static class MeteoBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java new file mode 100644 index 0000000..3a2e068 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java @@ -0,0 +1,374 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风数据模型 + * + * @author a203 + */ +public class TyphoonDetailModel { + + /** + * code : 200 + * data : {"centerLat":20.65,"centerLng":128.1,"endTime":"2021-10-11 8:00:00","engName":"Kompasu","isActive":"1","land":[],"name":"圆规","points":[{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}],"startTime":"2021-10-8 2:00:00","typhoonId":"202118","warnLevel":"white"} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * centerLat : 20.65 + * centerLng : 128.1 + * endTime : 2021-10-11 8:00:00 + * engName : Kompasu + * isActive : 1 + * land : [] + * name : 圆规 + * points : [{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}] + * startTime : 2021-10-8 2:00:00 + * typhoonId : 202118 + * warnLevel : white + */ + + private double centerLat; + private double centerLng; + private String endTime; + private String engName; + private String isActive; + private String name; + private String startTime; + private String typhoonId; + private String warnLevel; + private List land; + private List points; + + public double getCenterLat() { + return centerLat; + } + + public void setCenterLat(double centerLat) { + this.centerLat = centerLat; + } + + public double getCenterLng() { + return centerLng; + } + + public void setCenterLng(double centerLng) { + this.centerLng = centerLng; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public String getIsActive() { + return isActive; + } + + public void setIsActive(String isActive) { + this.isActive = isActive; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getWarnLevel() { + return warnLevel; + } + + public void setWarnLevel(String warnLevel) { + this.warnLevel = warnLevel; + } + + public List getLand() { + return land; + } + + public void setLand(List land) { + this.land = land; + } + + public static class LandBean { + private String landAddress; + private String type; + private Double lng; + private Double lat; + private String info; + private String landTime; + + public String getLandAddress() { + return landAddress; + } + + public void setLandAddress(String landAddress) { + this.landAddress = landAddress; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Double getLng() { + return lng; + } + + public void setLng(Double lng) { + this.lng = lng; + } + + public Double getLat() { + return lat; + } + + public void setLat(Double lat) { + this.lat = lat; + } + + public String getInfo() { + return info; + } + + public void setInfo(String info) { + this.info = info; + } + + public String getLandTime() { + return landTime; + } + + public void setLandTime(String landTime) { + this.landTime = landTime; + } + } + + public List getPoints() { + return points; + } + + public void setPoints(List points) { + this.points = points; + } + + public static class PointsBean { + /** + * centerPosition : 距离菲律宾马尼拉东北方向约600公里 + * centerPressure : 990 + * lat : 18.7 + * lng : 124.7 + * moveDirection : 西北西 + * moveSpeed : 25 + * power : 9 + * radius10 : + * radius12 : + * radius7 : 160|140|200|180 + * routePrediction : “圆规”将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分) + * speed : 23 + * time : 2021-10-11 8:00:00 + * typhoonType : 热带风暴 + */ + + private String centerPosition; + private String centerPressure; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private int power; + private String radius10; + private String radius12; + private String radius7; + private String routePrediction; + private String speed; + private String time; + private String typhoonType; + + public String getCenterPosition() { + return centerPosition; + } + + public void setCenterPosition(String centerPosition) { + this.centerPosition = centerPosition; + } + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius12() { + return radius12; + } + + public void setRadius12(String radius12) { + this.radius12 = radius12; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getRoutePrediction() { + return routePrediction; + } + + public void setRoutePrediction(String routePrediction) { + this.routePrediction = routePrediction; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java deleted file mode 100644 index 5b70924..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java +++ /dev/null @@ -1,419 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonDetailRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 6155596a0de376ce34c7b594 - * showapi_res_body : {"ret_code":0,"obj":{"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"}} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * obj : {"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"} - */ - - private int ret_code; - private ObjBean obj; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public ObjBean getObj() { - return obj; - } - - public void setObj(ObjBean obj) { - this.obj = obj; - } - - public static class ObjBean { - /** - * endtime : 2021-9-30 8:00:00 - * centerlng : 139.300000 - * starttime : 2021-9-23 20:00:00 - * tfid : 202116 - * isactive : 1 - * centerlat : 25.200000 - * name : 蒲公英 - * land : [{"landaddress":"朱家尖镇","strong":"强台风","lng":"122.39","lat":"29.83","info":"\u201c灿鸿\u201d11日16时40分前后登陆浙江舟山市朱家尖镇","landtime":"2015/7/11 16:40:00"}] - * warnlevel : white - * points : [{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}] - * enname : Mindulle - */ - - private String endtime; - private String centerlng; - private String starttime; - private String tfid; - private String isactive; - private String centerlat; - private String name; - private String warnlevel; - private String enname; - private List land; - private List points; - - public String getEndtime() { - return endtime; - } - - public void setEndtime(String endtime) { - this.endtime = endtime; - } - - public String getCenterlng() { - return centerlng; - } - - public void setCenterlng(String centerlng) { - this.centerlng = centerlng; - } - - public String getStarttime() { - return starttime; - } - - public void setStarttime(String starttime) { - this.starttime = starttime; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getIsactive() { - return isactive; - } - - public void setIsactive(String isactive) { - this.isactive = isactive; - } - - public String getCenterlat() { - return centerlat; - } - - public void setCenterlat(String centerlat) { - this.centerlat = centerlat; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getWarnlevel() { - return warnlevel; - } - - public void setWarnlevel(String warnlevel) { - this.warnlevel = warnlevel; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - - public List getLand() { - return land; - } - - public void setLand(List land) { - this.land = land; - } - - public static class LandBan { - /** - * landaddress : 朱家尖镇 - * strong : 强台风 - * lng : 122.39 - * lat : 29.83 - * info : “灿鸿”11日16时40分前后登陆浙江舟山市朱家尖镇 - * landtime : 2015/7/11 16:40:00 - */ - - private String landaddress; - private String strong; - private Double lng; - private Double lat; - private String info; - private String landtime; - - public String getLandaddress() { - return landaddress; - } - - public void setLandaddress(String landaddress) { - this.landaddress = landaddress; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getInfo() { - return info; - } - - public void setInfo(String info) { - this.info = info; - } - - public String getLandtime() { - return landtime; - } - - public void setLandtime(String landtime) { - this.landtime = landtime; - } - } - - public List getPoints() { - return points; - } - - public void setPoints(List points) { - this.points = points; - } - - public static class PointsBean { - /** - * time : 2021-9-23 20:00:00 - * pressure : 998 - * radius10 : - * speed : 18 - * strong : 热带风暴 - * movespeed : 20 - * radius12 : - * power : 8 - * lng : 143.30 - * movedirection : 西北西 - * lat : 13.80 - * radius7 : 250|220|200|180 - * jl : “蒲公英”将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分) - * ckposition : 距离日本东京南偏西方向约1060公里 - */ - - private String time; - private String pressure; - private String radius10; - private String speed; - private String strong; - private String movespeed; - private String radius12; - private String power; - private Double lng; - private String movedirection; - private Double lat; - private String radius7; - private String jl; - private String ckposition; - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getRadius12() { - return radius12; - } - - public void setRadius12(String radius12) { - this.radius12 = radius12; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getJl() { - return jl; - } - - public void setJl(String jl) { - this.jl = jl; - } - - public String getCkposition() { - return ckposition; - } - - public void setCkposition(String ckposition) { - this.ckposition = ckposition; - } - } - } - } -} diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..8396364 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,31 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel.DataBean data) { + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java index a34da1b..0c5225d 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -1,8 +1,8 @@ package com.casic.missiles.modular.system.dto; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; import lombok.Data; import java.util.ArrayList; @@ -142,7 +142,7 @@ private String centerPosition; } - public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + public TyphoonDetailDTO(TyphoonDetail detail, List landPoints, List routePoints) { this.typhoonId = detail.getTyphoonId(); this.name = detail.getName(); this.engName = detail.getEngName(); @@ -152,8 +152,9 @@ this.startTime = detail.getStartTime(); this.endTime = detail.getEndTime(); this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); - for (TyphoonLand landBean : landBeans) { + for (LandPoint landBean : landPoints) { LandBan bean = new LandBan(); bean.landAddress = landBean.getLandAddress(); bean.landTime = landBean.getLandTime(); @@ -164,8 +165,9 @@ lands.add(bean); } this.land = lands; + List points = new ArrayList<>(); - for (TyphoonPoint point : pointBeans) { + for (RoutePoint point : routePoints) { PointBean pointBean = new PointBean(); pointBean.time = point.getTime(); pointBean.centerPressure = point.getCenterPressure(); diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java new file mode 100644 index 0000000..b0b2e7a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java @@ -0,0 +1,265 @@ +package com.casic.missiles.modular.system.dto.remote; + +/** + * 洋流数据模型 + * + * @author a203 + */ +public class OceanDetailModel { + + /** + * code : 200 + * data : {"altitude":0,"forecast":{"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34},"oceanDir":135.22,"pressure":100925.19,"speed":7.97,"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"temperature":28.6,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34,"windDir":71.84,"windSpeed":7.97} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * altitude : 0 + * forecast : {"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34} + * oceanDir : 135.22 + * pressure : 100925.19 + * speed : 7.97 + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * temperature : 28.6 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + * windDir : 71.84 + * windSpeed : 7.97 + */ + + private double altitude; + private ForecastBean forecast; + private double oceanDir; + private double pressure; + private double speed; + private double swellDir; + private double swellHeight; + private double swellPrd; + private double temperature; + private double waveDir; + private double waveHeight; + private double wavePrd; + private double windDir; + private double windSpeed; + + public double getAltitude() { + return altitude; + } + + public void setAltitude(double altitude) { + this.altitude = altitude; + } + + public ForecastBean getForecast() { + return forecast; + } + + public void setForecast(ForecastBean forecast) { + this.forecast = forecast; + } + + public double getOceanDir() { + return oceanDir; + } + + public void setOceanDir(double oceanDir) { + this.oceanDir = oceanDir; + } + + public double getPressure() { + return pressure; + } + + public void setPressure(double pressure) { + this.pressure = pressure; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getTemperature() { + return temperature; + } + + public void setTemperature(double temperature) { + this.temperature = temperature; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + + public double getWindDir() { + return windDir; + } + + public void setWindDir(double windDir) { + this.windDir = windDir; + } + + public double getWindSpeed() { + return windSpeed; + } + + public void setWindSpeed(double windSpeed) { + this.windSpeed = windSpeed; + } + + public static class ForecastBean { + /** + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + */ + + private double swellDir; + private double swellHeight; + private double swellPrd; + private double waveDir; + private double waveHeight; + private double wavePrd; + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java deleted file mode 100644 index 5ad3a22..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java +++ /dev/null @@ -1,439 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方洋流数据模型 - * - * @author a203 - */ -public class OceanDetailRemoteData { - - /** - * code : 0 - * data : {"lon":114.338597,"lat":18.273134,"date":"2021-10-21","hour":10,"list":[{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}]} - * message : success - * etime : 1634786517992 - */ - - private int code; - private DataBean data; - private String message; - private long etime; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public DataBean getData() { - return data; - } - - public void setData(DataBean data) { - this.data = data; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public long getEtime() { - return etime; - } - - public void setEtime(long etime) { - this.etime = etime; - } - - public static class DataBean { - /** - * lon : 114.338597 - * lat : 18.273134 - * date : 2021-10-21 - * hour : 10 - * list : [{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}] - */ - - private double lon; - private double lat; - private String date; - private int hour; - private List list; - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public int getHour() { - return hour; - } - - public void setHour(int hour) { - this.hour = hour; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * date : 2021-10-21 - * ytx : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - * meteo : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - */ - - private String date; - private YtxBean ytx; - private MeteoBean meteo; - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public YtxBean getYtx() { - return ytx; - } - - public void setYtx(YtxBean ytx) { - this.ytx = ytx; - } - - public MeteoBean getMeteo() { - return meteo; - } - - public void setMeteo(MeteoBean meteo) { - this.meteo = meteo; - } - - public static class YtxBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - - public static class MeteoBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java new file mode 100644 index 0000000..3a2e068 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java @@ -0,0 +1,374 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风数据模型 + * + * @author a203 + */ +public class TyphoonDetailModel { + + /** + * code : 200 + * data : {"centerLat":20.65,"centerLng":128.1,"endTime":"2021-10-11 8:00:00","engName":"Kompasu","isActive":"1","land":[],"name":"圆规","points":[{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}],"startTime":"2021-10-8 2:00:00","typhoonId":"202118","warnLevel":"white"} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * centerLat : 20.65 + * centerLng : 128.1 + * endTime : 2021-10-11 8:00:00 + * engName : Kompasu + * isActive : 1 + * land : [] + * name : 圆规 + * points : [{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}] + * startTime : 2021-10-8 2:00:00 + * typhoonId : 202118 + * warnLevel : white + */ + + private double centerLat; + private double centerLng; + private String endTime; + private String engName; + private String isActive; + private String name; + private String startTime; + private String typhoonId; + private String warnLevel; + private List land; + private List points; + + public double getCenterLat() { + return centerLat; + } + + public void setCenterLat(double centerLat) { + this.centerLat = centerLat; + } + + public double getCenterLng() { + return centerLng; + } + + public void setCenterLng(double centerLng) { + this.centerLng = centerLng; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public String getIsActive() { + return isActive; + } + + public void setIsActive(String isActive) { + this.isActive = isActive; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getWarnLevel() { + return warnLevel; + } + + public void setWarnLevel(String warnLevel) { + this.warnLevel = warnLevel; + } + + public List getLand() { + return land; + } + + public void setLand(List land) { + this.land = land; + } + + public static class LandBean { + private String landAddress; + private String type; + private Double lng; + private Double lat; + private String info; + private String landTime; + + public String getLandAddress() { + return landAddress; + } + + public void setLandAddress(String landAddress) { + this.landAddress = landAddress; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Double getLng() { + return lng; + } + + public void setLng(Double lng) { + this.lng = lng; + } + + public Double getLat() { + return lat; + } + + public void setLat(Double lat) { + this.lat = lat; + } + + public String getInfo() { + return info; + } + + public void setInfo(String info) { + this.info = info; + } + + public String getLandTime() { + return landTime; + } + + public void setLandTime(String landTime) { + this.landTime = landTime; + } + } + + public List getPoints() { + return points; + } + + public void setPoints(List points) { + this.points = points; + } + + public static class PointsBean { + /** + * centerPosition : 距离菲律宾马尼拉东北方向约600公里 + * centerPressure : 990 + * lat : 18.7 + * lng : 124.7 + * moveDirection : 西北西 + * moveSpeed : 25 + * power : 9 + * radius10 : + * radius12 : + * radius7 : 160|140|200|180 + * routePrediction : “圆规”将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分) + * speed : 23 + * time : 2021-10-11 8:00:00 + * typhoonType : 热带风暴 + */ + + private String centerPosition; + private String centerPressure; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private int power; + private String radius10; + private String radius12; + private String radius7; + private String routePrediction; + private String speed; + private String time; + private String typhoonType; + + public String getCenterPosition() { + return centerPosition; + } + + public void setCenterPosition(String centerPosition) { + this.centerPosition = centerPosition; + } + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius12() { + return radius12; + } + + public void setRadius12(String radius12) { + this.radius12 = radius12; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getRoutePrediction() { + return routePrediction; + } + + public void setRoutePrediction(String routePrediction) { + this.routePrediction = routePrediction; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java deleted file mode 100644 index 5b70924..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java +++ /dev/null @@ -1,419 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonDetailRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 6155596a0de376ce34c7b594 - * showapi_res_body : {"ret_code":0,"obj":{"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"}} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * obj : {"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"} - */ - - private int ret_code; - private ObjBean obj; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public ObjBean getObj() { - return obj; - } - - public void setObj(ObjBean obj) { - this.obj = obj; - } - - public static class ObjBean { - /** - * endtime : 2021-9-30 8:00:00 - * centerlng : 139.300000 - * starttime : 2021-9-23 20:00:00 - * tfid : 202116 - * isactive : 1 - * centerlat : 25.200000 - * name : 蒲公英 - * land : [{"landaddress":"朱家尖镇","strong":"强台风","lng":"122.39","lat":"29.83","info":"\u201c灿鸿\u201d11日16时40分前后登陆浙江舟山市朱家尖镇","landtime":"2015/7/11 16:40:00"}] - * warnlevel : white - * points : [{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}] - * enname : Mindulle - */ - - private String endtime; - private String centerlng; - private String starttime; - private String tfid; - private String isactive; - private String centerlat; - private String name; - private String warnlevel; - private String enname; - private List land; - private List points; - - public String getEndtime() { - return endtime; - } - - public void setEndtime(String endtime) { - this.endtime = endtime; - } - - public String getCenterlng() { - return centerlng; - } - - public void setCenterlng(String centerlng) { - this.centerlng = centerlng; - } - - public String getStarttime() { - return starttime; - } - - public void setStarttime(String starttime) { - this.starttime = starttime; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getIsactive() { - return isactive; - } - - public void setIsactive(String isactive) { - this.isactive = isactive; - } - - public String getCenterlat() { - return centerlat; - } - - public void setCenterlat(String centerlat) { - this.centerlat = centerlat; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getWarnlevel() { - return warnlevel; - } - - public void setWarnlevel(String warnlevel) { - this.warnlevel = warnlevel; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - - public List getLand() { - return land; - } - - public void setLand(List land) { - this.land = land; - } - - public static class LandBan { - /** - * landaddress : 朱家尖镇 - * strong : 强台风 - * lng : 122.39 - * lat : 29.83 - * info : “灿鸿”11日16时40分前后登陆浙江舟山市朱家尖镇 - * landtime : 2015/7/11 16:40:00 - */ - - private String landaddress; - private String strong; - private Double lng; - private Double lat; - private String info; - private String landtime; - - public String getLandaddress() { - return landaddress; - } - - public void setLandaddress(String landaddress) { - this.landaddress = landaddress; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getInfo() { - return info; - } - - public void setInfo(String info) { - this.info = info; - } - - public String getLandtime() { - return landtime; - } - - public void setLandtime(String landtime) { - this.landtime = landtime; - } - } - - public List getPoints() { - return points; - } - - public void setPoints(List points) { - this.points = points; - } - - public static class PointsBean { - /** - * time : 2021-9-23 20:00:00 - * pressure : 998 - * radius10 : - * speed : 18 - * strong : 热带风暴 - * movespeed : 20 - * radius12 : - * power : 8 - * lng : 143.30 - * movedirection : 西北西 - * lat : 13.80 - * radius7 : 250|220|200|180 - * jl : “蒲公英”将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分) - * ckposition : 距离日本东京南偏西方向约1060公里 - */ - - private String time; - private String pressure; - private String radius10; - private String speed; - private String strong; - private String movespeed; - private String radius12; - private String power; - private Double lng; - private String movedirection; - private Double lat; - private String radius7; - private String jl; - private String ckposition; - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getRadius12() { - return radius12; - } - - public void setRadius12(String radius12) { - this.radius12 = radius12; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getJl() { - return jl; - } - - public void setJl(String jl) { - this.jl = jl; - } - - public String getCkposition() { - return ckposition; - } - - public void setCkposition(String ckposition) { - this.ckposition = ckposition; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java new file mode 100644 index 0000000..91bad37 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java @@ -0,0 +1,201 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风列表数据模型 + * + * @author a203 + */ +public class TyphoonListModel { + + /** + * code : 200 + * data : [{"centerPressure":"990","engName":"Kompasu","lat":18.7,"lng":125,"moveDirection":"西北西","moveSpeed":"23","name":"圆规","power":9,"radius10":"","radius7":"200","speed":"23","time":"2021-10-11 05:00:00","typhoonId":"202118","typhoonType":"热带风暴"}] + * message : 请求成功 + * success : true + */ + + private int code; + private String message; + private boolean success; + private List data; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public static class DataBean { + /** + * centerPressure : 990 + * engName : Kompasu + * lat : 18.7 + * lng : 125 + * moveDirection : 西北西 + * moveSpeed : 23 + * name : 圆规 + * power : 9 + * radius10 : + * radius7 : 200 + * speed : 23 + * time : 2021-10-11 05:00:00 + * typhoonId : 202118 + * typhoonType : 热带风暴 + */ + + private String centerPressure; + private String engName; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private String name; + private int power; + private String radius10; + private String radius7; + private String speed; + private String time; + private String typhoonId; + private String typhoonType; + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } +} diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..8396364 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,31 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel.DataBean data) { + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java index a34da1b..0c5225d 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -1,8 +1,8 @@ package com.casic.missiles.modular.system.dto; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; import lombok.Data; import java.util.ArrayList; @@ -142,7 +142,7 @@ private String centerPosition; } - public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + public TyphoonDetailDTO(TyphoonDetail detail, List landPoints, List routePoints) { this.typhoonId = detail.getTyphoonId(); this.name = detail.getName(); this.engName = detail.getEngName(); @@ -152,8 +152,9 @@ this.startTime = detail.getStartTime(); this.endTime = detail.getEndTime(); this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); - for (TyphoonLand landBean : landBeans) { + for (LandPoint landBean : landPoints) { LandBan bean = new LandBan(); bean.landAddress = landBean.getLandAddress(); bean.landTime = landBean.getLandTime(); @@ -164,8 +165,9 @@ lands.add(bean); } this.land = lands; + List points = new ArrayList<>(); - for (TyphoonPoint point : pointBeans) { + for (RoutePoint point : routePoints) { PointBean pointBean = new PointBean(); pointBean.time = point.getTime(); pointBean.centerPressure = point.getCenterPressure(); diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java new file mode 100644 index 0000000..b0b2e7a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java @@ -0,0 +1,265 @@ +package com.casic.missiles.modular.system.dto.remote; + +/** + * 洋流数据模型 + * + * @author a203 + */ +public class OceanDetailModel { + + /** + * code : 200 + * data : {"altitude":0,"forecast":{"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34},"oceanDir":135.22,"pressure":100925.19,"speed":7.97,"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"temperature":28.6,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34,"windDir":71.84,"windSpeed":7.97} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * altitude : 0 + * forecast : {"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34} + * oceanDir : 135.22 + * pressure : 100925.19 + * speed : 7.97 + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * temperature : 28.6 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + * windDir : 71.84 + * windSpeed : 7.97 + */ + + private double altitude; + private ForecastBean forecast; + private double oceanDir; + private double pressure; + private double speed; + private double swellDir; + private double swellHeight; + private double swellPrd; + private double temperature; + private double waveDir; + private double waveHeight; + private double wavePrd; + private double windDir; + private double windSpeed; + + public double getAltitude() { + return altitude; + } + + public void setAltitude(double altitude) { + this.altitude = altitude; + } + + public ForecastBean getForecast() { + return forecast; + } + + public void setForecast(ForecastBean forecast) { + this.forecast = forecast; + } + + public double getOceanDir() { + return oceanDir; + } + + public void setOceanDir(double oceanDir) { + this.oceanDir = oceanDir; + } + + public double getPressure() { + return pressure; + } + + public void setPressure(double pressure) { + this.pressure = pressure; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getTemperature() { + return temperature; + } + + public void setTemperature(double temperature) { + this.temperature = temperature; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + + public double getWindDir() { + return windDir; + } + + public void setWindDir(double windDir) { + this.windDir = windDir; + } + + public double getWindSpeed() { + return windSpeed; + } + + public void setWindSpeed(double windSpeed) { + this.windSpeed = windSpeed; + } + + public static class ForecastBean { + /** + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + */ + + private double swellDir; + private double swellHeight; + private double swellPrd; + private double waveDir; + private double waveHeight; + private double wavePrd; + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java deleted file mode 100644 index 5ad3a22..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java +++ /dev/null @@ -1,439 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方洋流数据模型 - * - * @author a203 - */ -public class OceanDetailRemoteData { - - /** - * code : 0 - * data : {"lon":114.338597,"lat":18.273134,"date":"2021-10-21","hour":10,"list":[{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}]} - * message : success - * etime : 1634786517992 - */ - - private int code; - private DataBean data; - private String message; - private long etime; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public DataBean getData() { - return data; - } - - public void setData(DataBean data) { - this.data = data; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public long getEtime() { - return etime; - } - - public void setEtime(long etime) { - this.etime = etime; - } - - public static class DataBean { - /** - * lon : 114.338597 - * lat : 18.273134 - * date : 2021-10-21 - * hour : 10 - * list : [{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}] - */ - - private double lon; - private double lat; - private String date; - private int hour; - private List list; - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public int getHour() { - return hour; - } - - public void setHour(int hour) { - this.hour = hour; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * date : 2021-10-21 - * ytx : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - * meteo : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - */ - - private String date; - private YtxBean ytx; - private MeteoBean meteo; - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public YtxBean getYtx() { - return ytx; - } - - public void setYtx(YtxBean ytx) { - this.ytx = ytx; - } - - public MeteoBean getMeteo() { - return meteo; - } - - public void setMeteo(MeteoBean meteo) { - this.meteo = meteo; - } - - public static class YtxBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - - public static class MeteoBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java new file mode 100644 index 0000000..3a2e068 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java @@ -0,0 +1,374 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风数据模型 + * + * @author a203 + */ +public class TyphoonDetailModel { + + /** + * code : 200 + * data : {"centerLat":20.65,"centerLng":128.1,"endTime":"2021-10-11 8:00:00","engName":"Kompasu","isActive":"1","land":[],"name":"圆规","points":[{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}],"startTime":"2021-10-8 2:00:00","typhoonId":"202118","warnLevel":"white"} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * centerLat : 20.65 + * centerLng : 128.1 + * endTime : 2021-10-11 8:00:00 + * engName : Kompasu + * isActive : 1 + * land : [] + * name : 圆规 + * points : [{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}] + * startTime : 2021-10-8 2:00:00 + * typhoonId : 202118 + * warnLevel : white + */ + + private double centerLat; + private double centerLng; + private String endTime; + private String engName; + private String isActive; + private String name; + private String startTime; + private String typhoonId; + private String warnLevel; + private List land; + private List points; + + public double getCenterLat() { + return centerLat; + } + + public void setCenterLat(double centerLat) { + this.centerLat = centerLat; + } + + public double getCenterLng() { + return centerLng; + } + + public void setCenterLng(double centerLng) { + this.centerLng = centerLng; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public String getIsActive() { + return isActive; + } + + public void setIsActive(String isActive) { + this.isActive = isActive; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getWarnLevel() { + return warnLevel; + } + + public void setWarnLevel(String warnLevel) { + this.warnLevel = warnLevel; + } + + public List getLand() { + return land; + } + + public void setLand(List land) { + this.land = land; + } + + public static class LandBean { + private String landAddress; + private String type; + private Double lng; + private Double lat; + private String info; + private String landTime; + + public String getLandAddress() { + return landAddress; + } + + public void setLandAddress(String landAddress) { + this.landAddress = landAddress; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Double getLng() { + return lng; + } + + public void setLng(Double lng) { + this.lng = lng; + } + + public Double getLat() { + return lat; + } + + public void setLat(Double lat) { + this.lat = lat; + } + + public String getInfo() { + return info; + } + + public void setInfo(String info) { + this.info = info; + } + + public String getLandTime() { + return landTime; + } + + public void setLandTime(String landTime) { + this.landTime = landTime; + } + } + + public List getPoints() { + return points; + } + + public void setPoints(List points) { + this.points = points; + } + + public static class PointsBean { + /** + * centerPosition : 距离菲律宾马尼拉东北方向约600公里 + * centerPressure : 990 + * lat : 18.7 + * lng : 124.7 + * moveDirection : 西北西 + * moveSpeed : 25 + * power : 9 + * radius10 : + * radius12 : + * radius7 : 160|140|200|180 + * routePrediction : “圆规”将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分) + * speed : 23 + * time : 2021-10-11 8:00:00 + * typhoonType : 热带风暴 + */ + + private String centerPosition; + private String centerPressure; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private int power; + private String radius10; + private String radius12; + private String radius7; + private String routePrediction; + private String speed; + private String time; + private String typhoonType; + + public String getCenterPosition() { + return centerPosition; + } + + public void setCenterPosition(String centerPosition) { + this.centerPosition = centerPosition; + } + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius12() { + return radius12; + } + + public void setRadius12(String radius12) { + this.radius12 = radius12; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getRoutePrediction() { + return routePrediction; + } + + public void setRoutePrediction(String routePrediction) { + this.routePrediction = routePrediction; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java deleted file mode 100644 index 5b70924..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java +++ /dev/null @@ -1,419 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonDetailRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 6155596a0de376ce34c7b594 - * showapi_res_body : {"ret_code":0,"obj":{"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"}} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * obj : {"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"} - */ - - private int ret_code; - private ObjBean obj; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public ObjBean getObj() { - return obj; - } - - public void setObj(ObjBean obj) { - this.obj = obj; - } - - public static class ObjBean { - /** - * endtime : 2021-9-30 8:00:00 - * centerlng : 139.300000 - * starttime : 2021-9-23 20:00:00 - * tfid : 202116 - * isactive : 1 - * centerlat : 25.200000 - * name : 蒲公英 - * land : [{"landaddress":"朱家尖镇","strong":"强台风","lng":"122.39","lat":"29.83","info":"\u201c灿鸿\u201d11日16时40分前后登陆浙江舟山市朱家尖镇","landtime":"2015/7/11 16:40:00"}] - * warnlevel : white - * points : [{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}] - * enname : Mindulle - */ - - private String endtime; - private String centerlng; - private String starttime; - private String tfid; - private String isactive; - private String centerlat; - private String name; - private String warnlevel; - private String enname; - private List land; - private List points; - - public String getEndtime() { - return endtime; - } - - public void setEndtime(String endtime) { - this.endtime = endtime; - } - - public String getCenterlng() { - return centerlng; - } - - public void setCenterlng(String centerlng) { - this.centerlng = centerlng; - } - - public String getStarttime() { - return starttime; - } - - public void setStarttime(String starttime) { - this.starttime = starttime; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getIsactive() { - return isactive; - } - - public void setIsactive(String isactive) { - this.isactive = isactive; - } - - public String getCenterlat() { - return centerlat; - } - - public void setCenterlat(String centerlat) { - this.centerlat = centerlat; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getWarnlevel() { - return warnlevel; - } - - public void setWarnlevel(String warnlevel) { - this.warnlevel = warnlevel; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - - public List getLand() { - return land; - } - - public void setLand(List land) { - this.land = land; - } - - public static class LandBan { - /** - * landaddress : 朱家尖镇 - * strong : 强台风 - * lng : 122.39 - * lat : 29.83 - * info : “灿鸿”11日16时40分前后登陆浙江舟山市朱家尖镇 - * landtime : 2015/7/11 16:40:00 - */ - - private String landaddress; - private String strong; - private Double lng; - private Double lat; - private String info; - private String landtime; - - public String getLandaddress() { - return landaddress; - } - - public void setLandaddress(String landaddress) { - this.landaddress = landaddress; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getInfo() { - return info; - } - - public void setInfo(String info) { - this.info = info; - } - - public String getLandtime() { - return landtime; - } - - public void setLandtime(String landtime) { - this.landtime = landtime; - } - } - - public List getPoints() { - return points; - } - - public void setPoints(List points) { - this.points = points; - } - - public static class PointsBean { - /** - * time : 2021-9-23 20:00:00 - * pressure : 998 - * radius10 : - * speed : 18 - * strong : 热带风暴 - * movespeed : 20 - * radius12 : - * power : 8 - * lng : 143.30 - * movedirection : 西北西 - * lat : 13.80 - * radius7 : 250|220|200|180 - * jl : “蒲公英”将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分) - * ckposition : 距离日本东京南偏西方向约1060公里 - */ - - private String time; - private String pressure; - private String radius10; - private String speed; - private String strong; - private String movespeed; - private String radius12; - private String power; - private Double lng; - private String movedirection; - private Double lat; - private String radius7; - private String jl; - private String ckposition; - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getRadius12() { - return radius12; - } - - public void setRadius12(String radius12) { - this.radius12 = radius12; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getJl() { - return jl; - } - - public void setJl(String jl) { - this.jl = jl; - } - - public String getCkposition() { - return ckposition; - } - - public void setCkposition(String ckposition) { - this.ckposition = ckposition; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java new file mode 100644 index 0000000..91bad37 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java @@ -0,0 +1,201 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风列表数据模型 + * + * @author a203 + */ +public class TyphoonListModel { + + /** + * code : 200 + * data : [{"centerPressure":"990","engName":"Kompasu","lat":18.7,"lng":125,"moveDirection":"西北西","moveSpeed":"23","name":"圆规","power":9,"radius10":"","radius7":"200","speed":"23","time":"2021-10-11 05:00:00","typhoonId":"202118","typhoonType":"热带风暴"}] + * message : 请求成功 + * success : true + */ + + private int code; + private String message; + private boolean success; + private List data; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public static class DataBean { + /** + * centerPressure : 990 + * engName : Kompasu + * lat : 18.7 + * lng : 125 + * moveDirection : 西北西 + * moveSpeed : 23 + * name : 圆规 + * power : 9 + * radius10 : + * radius7 : 200 + * speed : 23 + * time : 2021-10-11 05:00:00 + * typhoonId : 202118 + * typhoonType : 热带风暴 + */ + + private String centerPressure; + private String engName; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private String name; + private int power; + private String radius10; + private String radius7; + private String speed; + private String time; + private String typhoonId; + private String typhoonType; + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java deleted file mode 100644 index 38a9257..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java +++ /dev/null @@ -1,237 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 61554fbe0de376d03494057c - * showapi_res_body : {"ret_code":0,"list":[{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}]} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * list : [{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}] - */ - - private int ret_code; - private List list; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * pressure : 945 - * tfid : 202116 - * radius10 : 150 - * speed : 48 - * lng : 136.40 - * radius7 : 350 - * time : 2021-09-30 08:00:00 - * movespeed : 23 - * strong : 强台风 - * name : 蒲公英 - * power : 15 - * movedirection : 北北东 - * lat : 26.60 - * enname : Mindulle - */ - - private String pressure; - private String tfid; - private String radius10; - private String speed; - private String lng; - private String radius7; - private String time; - private String movespeed; - private String strong; - private String name; - private String power; - private String movedirection; - private String lat; - private String enname; - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getLng() { - return lng; - } - - public void setLng(String lng) { - this.lng = lng; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public String getLat() { - return lat; - } - - public void setLat(String lat) { - this.lat = lat; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - } - } -} diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..8396364 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,31 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel.DataBean data) { + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java index a34da1b..0c5225d 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -1,8 +1,8 @@ package com.casic.missiles.modular.system.dto; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; import lombok.Data; import java.util.ArrayList; @@ -142,7 +142,7 @@ private String centerPosition; } - public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + public TyphoonDetailDTO(TyphoonDetail detail, List landPoints, List routePoints) { this.typhoonId = detail.getTyphoonId(); this.name = detail.getName(); this.engName = detail.getEngName(); @@ -152,8 +152,9 @@ this.startTime = detail.getStartTime(); this.endTime = detail.getEndTime(); this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); - for (TyphoonLand landBean : landBeans) { + for (LandPoint landBean : landPoints) { LandBan bean = new LandBan(); bean.landAddress = landBean.getLandAddress(); bean.landTime = landBean.getLandTime(); @@ -164,8 +165,9 @@ lands.add(bean); } this.land = lands; + List points = new ArrayList<>(); - for (TyphoonPoint point : pointBeans) { + for (RoutePoint point : routePoints) { PointBean pointBean = new PointBean(); pointBean.time = point.getTime(); pointBean.centerPressure = point.getCenterPressure(); diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java new file mode 100644 index 0000000..b0b2e7a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java @@ -0,0 +1,265 @@ +package com.casic.missiles.modular.system.dto.remote; + +/** + * 洋流数据模型 + * + * @author a203 + */ +public class OceanDetailModel { + + /** + * code : 200 + * data : {"altitude":0,"forecast":{"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34},"oceanDir":135.22,"pressure":100925.19,"speed":7.97,"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"temperature":28.6,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34,"windDir":71.84,"windSpeed":7.97} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * altitude : 0 + * forecast : {"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34} + * oceanDir : 135.22 + * pressure : 100925.19 + * speed : 7.97 + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * temperature : 28.6 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + * windDir : 71.84 + * windSpeed : 7.97 + */ + + private double altitude; + private ForecastBean forecast; + private double oceanDir; + private double pressure; + private double speed; + private double swellDir; + private double swellHeight; + private double swellPrd; + private double temperature; + private double waveDir; + private double waveHeight; + private double wavePrd; + private double windDir; + private double windSpeed; + + public double getAltitude() { + return altitude; + } + + public void setAltitude(double altitude) { + this.altitude = altitude; + } + + public ForecastBean getForecast() { + return forecast; + } + + public void setForecast(ForecastBean forecast) { + this.forecast = forecast; + } + + public double getOceanDir() { + return oceanDir; + } + + public void setOceanDir(double oceanDir) { + this.oceanDir = oceanDir; + } + + public double getPressure() { + return pressure; + } + + public void setPressure(double pressure) { + this.pressure = pressure; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getTemperature() { + return temperature; + } + + public void setTemperature(double temperature) { + this.temperature = temperature; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + + public double getWindDir() { + return windDir; + } + + public void setWindDir(double windDir) { + this.windDir = windDir; + } + + public double getWindSpeed() { + return windSpeed; + } + + public void setWindSpeed(double windSpeed) { + this.windSpeed = windSpeed; + } + + public static class ForecastBean { + /** + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + */ + + private double swellDir; + private double swellHeight; + private double swellPrd; + private double waveDir; + private double waveHeight; + private double wavePrd; + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java deleted file mode 100644 index 5ad3a22..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java +++ /dev/null @@ -1,439 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方洋流数据模型 - * - * @author a203 - */ -public class OceanDetailRemoteData { - - /** - * code : 0 - * data : {"lon":114.338597,"lat":18.273134,"date":"2021-10-21","hour":10,"list":[{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}]} - * message : success - * etime : 1634786517992 - */ - - private int code; - private DataBean data; - private String message; - private long etime; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public DataBean getData() { - return data; - } - - public void setData(DataBean data) { - this.data = data; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public long getEtime() { - return etime; - } - - public void setEtime(long etime) { - this.etime = etime; - } - - public static class DataBean { - /** - * lon : 114.338597 - * lat : 18.273134 - * date : 2021-10-21 - * hour : 10 - * list : [{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}] - */ - - private double lon; - private double lat; - private String date; - private int hour; - private List list; - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public int getHour() { - return hour; - } - - public void setHour(int hour) { - this.hour = hour; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * date : 2021-10-21 - * ytx : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - * meteo : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - */ - - private String date; - private YtxBean ytx; - private MeteoBean meteo; - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public YtxBean getYtx() { - return ytx; - } - - public void setYtx(YtxBean ytx) { - this.ytx = ytx; - } - - public MeteoBean getMeteo() { - return meteo; - } - - public void setMeteo(MeteoBean meteo) { - this.meteo = meteo; - } - - public static class YtxBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - - public static class MeteoBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java new file mode 100644 index 0000000..3a2e068 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java @@ -0,0 +1,374 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风数据模型 + * + * @author a203 + */ +public class TyphoonDetailModel { + + /** + * code : 200 + * data : {"centerLat":20.65,"centerLng":128.1,"endTime":"2021-10-11 8:00:00","engName":"Kompasu","isActive":"1","land":[],"name":"圆规","points":[{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}],"startTime":"2021-10-8 2:00:00","typhoonId":"202118","warnLevel":"white"} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * centerLat : 20.65 + * centerLng : 128.1 + * endTime : 2021-10-11 8:00:00 + * engName : Kompasu + * isActive : 1 + * land : [] + * name : 圆规 + * points : [{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}] + * startTime : 2021-10-8 2:00:00 + * typhoonId : 202118 + * warnLevel : white + */ + + private double centerLat; + private double centerLng; + private String endTime; + private String engName; + private String isActive; + private String name; + private String startTime; + private String typhoonId; + private String warnLevel; + private List land; + private List points; + + public double getCenterLat() { + return centerLat; + } + + public void setCenterLat(double centerLat) { + this.centerLat = centerLat; + } + + public double getCenterLng() { + return centerLng; + } + + public void setCenterLng(double centerLng) { + this.centerLng = centerLng; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public String getIsActive() { + return isActive; + } + + public void setIsActive(String isActive) { + this.isActive = isActive; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getWarnLevel() { + return warnLevel; + } + + public void setWarnLevel(String warnLevel) { + this.warnLevel = warnLevel; + } + + public List getLand() { + return land; + } + + public void setLand(List land) { + this.land = land; + } + + public static class LandBean { + private String landAddress; + private String type; + private Double lng; + private Double lat; + private String info; + private String landTime; + + public String getLandAddress() { + return landAddress; + } + + public void setLandAddress(String landAddress) { + this.landAddress = landAddress; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Double getLng() { + return lng; + } + + public void setLng(Double lng) { + this.lng = lng; + } + + public Double getLat() { + return lat; + } + + public void setLat(Double lat) { + this.lat = lat; + } + + public String getInfo() { + return info; + } + + public void setInfo(String info) { + this.info = info; + } + + public String getLandTime() { + return landTime; + } + + public void setLandTime(String landTime) { + this.landTime = landTime; + } + } + + public List getPoints() { + return points; + } + + public void setPoints(List points) { + this.points = points; + } + + public static class PointsBean { + /** + * centerPosition : 距离菲律宾马尼拉东北方向约600公里 + * centerPressure : 990 + * lat : 18.7 + * lng : 124.7 + * moveDirection : 西北西 + * moveSpeed : 25 + * power : 9 + * radius10 : + * radius12 : + * radius7 : 160|140|200|180 + * routePrediction : “圆规”将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分) + * speed : 23 + * time : 2021-10-11 8:00:00 + * typhoonType : 热带风暴 + */ + + private String centerPosition; + private String centerPressure; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private int power; + private String radius10; + private String radius12; + private String radius7; + private String routePrediction; + private String speed; + private String time; + private String typhoonType; + + public String getCenterPosition() { + return centerPosition; + } + + public void setCenterPosition(String centerPosition) { + this.centerPosition = centerPosition; + } + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius12() { + return radius12; + } + + public void setRadius12(String radius12) { + this.radius12 = radius12; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getRoutePrediction() { + return routePrediction; + } + + public void setRoutePrediction(String routePrediction) { + this.routePrediction = routePrediction; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java deleted file mode 100644 index 5b70924..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java +++ /dev/null @@ -1,419 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonDetailRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 6155596a0de376ce34c7b594 - * showapi_res_body : {"ret_code":0,"obj":{"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"}} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * obj : {"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"} - */ - - private int ret_code; - private ObjBean obj; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public ObjBean getObj() { - return obj; - } - - public void setObj(ObjBean obj) { - this.obj = obj; - } - - public static class ObjBean { - /** - * endtime : 2021-9-30 8:00:00 - * centerlng : 139.300000 - * starttime : 2021-9-23 20:00:00 - * tfid : 202116 - * isactive : 1 - * centerlat : 25.200000 - * name : 蒲公英 - * land : [{"landaddress":"朱家尖镇","strong":"强台风","lng":"122.39","lat":"29.83","info":"\u201c灿鸿\u201d11日16时40分前后登陆浙江舟山市朱家尖镇","landtime":"2015/7/11 16:40:00"}] - * warnlevel : white - * points : [{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}] - * enname : Mindulle - */ - - private String endtime; - private String centerlng; - private String starttime; - private String tfid; - private String isactive; - private String centerlat; - private String name; - private String warnlevel; - private String enname; - private List land; - private List points; - - public String getEndtime() { - return endtime; - } - - public void setEndtime(String endtime) { - this.endtime = endtime; - } - - public String getCenterlng() { - return centerlng; - } - - public void setCenterlng(String centerlng) { - this.centerlng = centerlng; - } - - public String getStarttime() { - return starttime; - } - - public void setStarttime(String starttime) { - this.starttime = starttime; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getIsactive() { - return isactive; - } - - public void setIsactive(String isactive) { - this.isactive = isactive; - } - - public String getCenterlat() { - return centerlat; - } - - public void setCenterlat(String centerlat) { - this.centerlat = centerlat; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getWarnlevel() { - return warnlevel; - } - - public void setWarnlevel(String warnlevel) { - this.warnlevel = warnlevel; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - - public List getLand() { - return land; - } - - public void setLand(List land) { - this.land = land; - } - - public static class LandBan { - /** - * landaddress : 朱家尖镇 - * strong : 强台风 - * lng : 122.39 - * lat : 29.83 - * info : “灿鸿”11日16时40分前后登陆浙江舟山市朱家尖镇 - * landtime : 2015/7/11 16:40:00 - */ - - private String landaddress; - private String strong; - private Double lng; - private Double lat; - private String info; - private String landtime; - - public String getLandaddress() { - return landaddress; - } - - public void setLandaddress(String landaddress) { - this.landaddress = landaddress; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getInfo() { - return info; - } - - public void setInfo(String info) { - this.info = info; - } - - public String getLandtime() { - return landtime; - } - - public void setLandtime(String landtime) { - this.landtime = landtime; - } - } - - public List getPoints() { - return points; - } - - public void setPoints(List points) { - this.points = points; - } - - public static class PointsBean { - /** - * time : 2021-9-23 20:00:00 - * pressure : 998 - * radius10 : - * speed : 18 - * strong : 热带风暴 - * movespeed : 20 - * radius12 : - * power : 8 - * lng : 143.30 - * movedirection : 西北西 - * lat : 13.80 - * radius7 : 250|220|200|180 - * jl : “蒲公英”将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分) - * ckposition : 距离日本东京南偏西方向约1060公里 - */ - - private String time; - private String pressure; - private String radius10; - private String speed; - private String strong; - private String movespeed; - private String radius12; - private String power; - private Double lng; - private String movedirection; - private Double lat; - private String radius7; - private String jl; - private String ckposition; - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getRadius12() { - return radius12; - } - - public void setRadius12(String radius12) { - this.radius12 = radius12; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getJl() { - return jl; - } - - public void setJl(String jl) { - this.jl = jl; - } - - public String getCkposition() { - return ckposition; - } - - public void setCkposition(String ckposition) { - this.ckposition = ckposition; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java new file mode 100644 index 0000000..91bad37 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java @@ -0,0 +1,201 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风列表数据模型 + * + * @author a203 + */ +public class TyphoonListModel { + + /** + * code : 200 + * data : [{"centerPressure":"990","engName":"Kompasu","lat":18.7,"lng":125,"moveDirection":"西北西","moveSpeed":"23","name":"圆规","power":9,"radius10":"","radius7":"200","speed":"23","time":"2021-10-11 05:00:00","typhoonId":"202118","typhoonType":"热带风暴"}] + * message : 请求成功 + * success : true + */ + + private int code; + private String message; + private boolean success; + private List data; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public static class DataBean { + /** + * centerPressure : 990 + * engName : Kompasu + * lat : 18.7 + * lng : 125 + * moveDirection : 西北西 + * moveSpeed : 23 + * name : 圆规 + * power : 9 + * radius10 : + * radius7 : 200 + * speed : 23 + * time : 2021-10-11 05:00:00 + * typhoonId : 202118 + * typhoonType : 热带风暴 + */ + + private String centerPressure; + private String engName; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private String name; + private int power; + private String radius10; + private String radius7; + private String speed; + private String time; + private String typhoonId; + private String typhoonType; + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java deleted file mode 100644 index 38a9257..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java +++ /dev/null @@ -1,237 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 61554fbe0de376d03494057c - * showapi_res_body : {"ret_code":0,"list":[{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}]} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * list : [{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}] - */ - - private int ret_code; - private List list; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * pressure : 945 - * tfid : 202116 - * radius10 : 150 - * speed : 48 - * lng : 136.40 - * radius7 : 350 - * time : 2021-09-30 08:00:00 - * movespeed : 23 - * strong : 强台风 - * name : 蒲公英 - * power : 15 - * movedirection : 北北东 - * lat : 26.60 - * enname : Mindulle - */ - - private String pressure; - private String tfid; - private String radius10; - private String speed; - private String lng; - private String radius7; - private String time; - private String movespeed; - private String strong; - private String name; - private String power; - private String movedirection; - private String lat; - private String enname; - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getLng() { - return lng; - } - - public void setLng(String lng) { - this.lng = lng; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public String getLat() { - return lat; - } - - public void setLat(String lat) { - this.lat = lat; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java new file mode 100644 index 0000000..c488237 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风移动点数据信息 服务类 + * + * @author a203 + */ +public interface ILandPointService extends IService { + +} diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..8396364 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,31 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel.DataBean data) { + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java index a34da1b..0c5225d 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -1,8 +1,8 @@ package com.casic.missiles.modular.system.dto; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; import lombok.Data; import java.util.ArrayList; @@ -142,7 +142,7 @@ private String centerPosition; } - public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + public TyphoonDetailDTO(TyphoonDetail detail, List landPoints, List routePoints) { this.typhoonId = detail.getTyphoonId(); this.name = detail.getName(); this.engName = detail.getEngName(); @@ -152,8 +152,9 @@ this.startTime = detail.getStartTime(); this.endTime = detail.getEndTime(); this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); - for (TyphoonLand landBean : landBeans) { + for (LandPoint landBean : landPoints) { LandBan bean = new LandBan(); bean.landAddress = landBean.getLandAddress(); bean.landTime = landBean.getLandTime(); @@ -164,8 +165,9 @@ lands.add(bean); } this.land = lands; + List points = new ArrayList<>(); - for (TyphoonPoint point : pointBeans) { + for (RoutePoint point : routePoints) { PointBean pointBean = new PointBean(); pointBean.time = point.getTime(); pointBean.centerPressure = point.getCenterPressure(); diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java new file mode 100644 index 0000000..b0b2e7a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java @@ -0,0 +1,265 @@ +package com.casic.missiles.modular.system.dto.remote; + +/** + * 洋流数据模型 + * + * @author a203 + */ +public class OceanDetailModel { + + /** + * code : 200 + * data : {"altitude":0,"forecast":{"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34},"oceanDir":135.22,"pressure":100925.19,"speed":7.97,"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"temperature":28.6,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34,"windDir":71.84,"windSpeed":7.97} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * altitude : 0 + * forecast : {"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34} + * oceanDir : 135.22 + * pressure : 100925.19 + * speed : 7.97 + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * temperature : 28.6 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + * windDir : 71.84 + * windSpeed : 7.97 + */ + + private double altitude; + private ForecastBean forecast; + private double oceanDir; + private double pressure; + private double speed; + private double swellDir; + private double swellHeight; + private double swellPrd; + private double temperature; + private double waveDir; + private double waveHeight; + private double wavePrd; + private double windDir; + private double windSpeed; + + public double getAltitude() { + return altitude; + } + + public void setAltitude(double altitude) { + this.altitude = altitude; + } + + public ForecastBean getForecast() { + return forecast; + } + + public void setForecast(ForecastBean forecast) { + this.forecast = forecast; + } + + public double getOceanDir() { + return oceanDir; + } + + public void setOceanDir(double oceanDir) { + this.oceanDir = oceanDir; + } + + public double getPressure() { + return pressure; + } + + public void setPressure(double pressure) { + this.pressure = pressure; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getTemperature() { + return temperature; + } + + public void setTemperature(double temperature) { + this.temperature = temperature; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + + public double getWindDir() { + return windDir; + } + + public void setWindDir(double windDir) { + this.windDir = windDir; + } + + public double getWindSpeed() { + return windSpeed; + } + + public void setWindSpeed(double windSpeed) { + this.windSpeed = windSpeed; + } + + public static class ForecastBean { + /** + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + */ + + private double swellDir; + private double swellHeight; + private double swellPrd; + private double waveDir; + private double waveHeight; + private double wavePrd; + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java deleted file mode 100644 index 5ad3a22..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java +++ /dev/null @@ -1,439 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方洋流数据模型 - * - * @author a203 - */ -public class OceanDetailRemoteData { - - /** - * code : 0 - * data : {"lon":114.338597,"lat":18.273134,"date":"2021-10-21","hour":10,"list":[{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}]} - * message : success - * etime : 1634786517992 - */ - - private int code; - private DataBean data; - private String message; - private long etime; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public DataBean getData() { - return data; - } - - public void setData(DataBean data) { - this.data = data; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public long getEtime() { - return etime; - } - - public void setEtime(long etime) { - this.etime = etime; - } - - public static class DataBean { - /** - * lon : 114.338597 - * lat : 18.273134 - * date : 2021-10-21 - * hour : 10 - * list : [{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}] - */ - - private double lon; - private double lat; - private String date; - private int hour; - private List list; - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public int getHour() { - return hour; - } - - public void setHour(int hour) { - this.hour = hour; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * date : 2021-10-21 - * ytx : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - * meteo : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - */ - - private String date; - private YtxBean ytx; - private MeteoBean meteo; - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public YtxBean getYtx() { - return ytx; - } - - public void setYtx(YtxBean ytx) { - this.ytx = ytx; - } - - public MeteoBean getMeteo() { - return meteo; - } - - public void setMeteo(MeteoBean meteo) { - this.meteo = meteo; - } - - public static class YtxBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - - public static class MeteoBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java new file mode 100644 index 0000000..3a2e068 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java @@ -0,0 +1,374 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风数据模型 + * + * @author a203 + */ +public class TyphoonDetailModel { + + /** + * code : 200 + * data : {"centerLat":20.65,"centerLng":128.1,"endTime":"2021-10-11 8:00:00","engName":"Kompasu","isActive":"1","land":[],"name":"圆规","points":[{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}],"startTime":"2021-10-8 2:00:00","typhoonId":"202118","warnLevel":"white"} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * centerLat : 20.65 + * centerLng : 128.1 + * endTime : 2021-10-11 8:00:00 + * engName : Kompasu + * isActive : 1 + * land : [] + * name : 圆规 + * points : [{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}] + * startTime : 2021-10-8 2:00:00 + * typhoonId : 202118 + * warnLevel : white + */ + + private double centerLat; + private double centerLng; + private String endTime; + private String engName; + private String isActive; + private String name; + private String startTime; + private String typhoonId; + private String warnLevel; + private List land; + private List points; + + public double getCenterLat() { + return centerLat; + } + + public void setCenterLat(double centerLat) { + this.centerLat = centerLat; + } + + public double getCenterLng() { + return centerLng; + } + + public void setCenterLng(double centerLng) { + this.centerLng = centerLng; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public String getIsActive() { + return isActive; + } + + public void setIsActive(String isActive) { + this.isActive = isActive; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getWarnLevel() { + return warnLevel; + } + + public void setWarnLevel(String warnLevel) { + this.warnLevel = warnLevel; + } + + public List getLand() { + return land; + } + + public void setLand(List land) { + this.land = land; + } + + public static class LandBean { + private String landAddress; + private String type; + private Double lng; + private Double lat; + private String info; + private String landTime; + + public String getLandAddress() { + return landAddress; + } + + public void setLandAddress(String landAddress) { + this.landAddress = landAddress; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Double getLng() { + return lng; + } + + public void setLng(Double lng) { + this.lng = lng; + } + + public Double getLat() { + return lat; + } + + public void setLat(Double lat) { + this.lat = lat; + } + + public String getInfo() { + return info; + } + + public void setInfo(String info) { + this.info = info; + } + + public String getLandTime() { + return landTime; + } + + public void setLandTime(String landTime) { + this.landTime = landTime; + } + } + + public List getPoints() { + return points; + } + + public void setPoints(List points) { + this.points = points; + } + + public static class PointsBean { + /** + * centerPosition : 距离菲律宾马尼拉东北方向约600公里 + * centerPressure : 990 + * lat : 18.7 + * lng : 124.7 + * moveDirection : 西北西 + * moveSpeed : 25 + * power : 9 + * radius10 : + * radius12 : + * radius7 : 160|140|200|180 + * routePrediction : “圆规”将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分) + * speed : 23 + * time : 2021-10-11 8:00:00 + * typhoonType : 热带风暴 + */ + + private String centerPosition; + private String centerPressure; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private int power; + private String radius10; + private String radius12; + private String radius7; + private String routePrediction; + private String speed; + private String time; + private String typhoonType; + + public String getCenterPosition() { + return centerPosition; + } + + public void setCenterPosition(String centerPosition) { + this.centerPosition = centerPosition; + } + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius12() { + return radius12; + } + + public void setRadius12(String radius12) { + this.radius12 = radius12; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getRoutePrediction() { + return routePrediction; + } + + public void setRoutePrediction(String routePrediction) { + this.routePrediction = routePrediction; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java deleted file mode 100644 index 5b70924..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java +++ /dev/null @@ -1,419 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonDetailRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 6155596a0de376ce34c7b594 - * showapi_res_body : {"ret_code":0,"obj":{"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"}} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * obj : {"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"} - */ - - private int ret_code; - private ObjBean obj; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public ObjBean getObj() { - return obj; - } - - public void setObj(ObjBean obj) { - this.obj = obj; - } - - public static class ObjBean { - /** - * endtime : 2021-9-30 8:00:00 - * centerlng : 139.300000 - * starttime : 2021-9-23 20:00:00 - * tfid : 202116 - * isactive : 1 - * centerlat : 25.200000 - * name : 蒲公英 - * land : [{"landaddress":"朱家尖镇","strong":"强台风","lng":"122.39","lat":"29.83","info":"\u201c灿鸿\u201d11日16时40分前后登陆浙江舟山市朱家尖镇","landtime":"2015/7/11 16:40:00"}] - * warnlevel : white - * points : [{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}] - * enname : Mindulle - */ - - private String endtime; - private String centerlng; - private String starttime; - private String tfid; - private String isactive; - private String centerlat; - private String name; - private String warnlevel; - private String enname; - private List land; - private List points; - - public String getEndtime() { - return endtime; - } - - public void setEndtime(String endtime) { - this.endtime = endtime; - } - - public String getCenterlng() { - return centerlng; - } - - public void setCenterlng(String centerlng) { - this.centerlng = centerlng; - } - - public String getStarttime() { - return starttime; - } - - public void setStarttime(String starttime) { - this.starttime = starttime; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getIsactive() { - return isactive; - } - - public void setIsactive(String isactive) { - this.isactive = isactive; - } - - public String getCenterlat() { - return centerlat; - } - - public void setCenterlat(String centerlat) { - this.centerlat = centerlat; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getWarnlevel() { - return warnlevel; - } - - public void setWarnlevel(String warnlevel) { - this.warnlevel = warnlevel; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - - public List getLand() { - return land; - } - - public void setLand(List land) { - this.land = land; - } - - public static class LandBan { - /** - * landaddress : 朱家尖镇 - * strong : 强台风 - * lng : 122.39 - * lat : 29.83 - * info : “灿鸿”11日16时40分前后登陆浙江舟山市朱家尖镇 - * landtime : 2015/7/11 16:40:00 - */ - - private String landaddress; - private String strong; - private Double lng; - private Double lat; - private String info; - private String landtime; - - public String getLandaddress() { - return landaddress; - } - - public void setLandaddress(String landaddress) { - this.landaddress = landaddress; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getInfo() { - return info; - } - - public void setInfo(String info) { - this.info = info; - } - - public String getLandtime() { - return landtime; - } - - public void setLandtime(String landtime) { - this.landtime = landtime; - } - } - - public List getPoints() { - return points; - } - - public void setPoints(List points) { - this.points = points; - } - - public static class PointsBean { - /** - * time : 2021-9-23 20:00:00 - * pressure : 998 - * radius10 : - * speed : 18 - * strong : 热带风暴 - * movespeed : 20 - * radius12 : - * power : 8 - * lng : 143.30 - * movedirection : 西北西 - * lat : 13.80 - * radius7 : 250|220|200|180 - * jl : “蒲公英”将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分) - * ckposition : 距离日本东京南偏西方向约1060公里 - */ - - private String time; - private String pressure; - private String radius10; - private String speed; - private String strong; - private String movespeed; - private String radius12; - private String power; - private Double lng; - private String movedirection; - private Double lat; - private String radius7; - private String jl; - private String ckposition; - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getRadius12() { - return radius12; - } - - public void setRadius12(String radius12) { - this.radius12 = radius12; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getJl() { - return jl; - } - - public void setJl(String jl) { - this.jl = jl; - } - - public String getCkposition() { - return ckposition; - } - - public void setCkposition(String ckposition) { - this.ckposition = ckposition; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java new file mode 100644 index 0000000..91bad37 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java @@ -0,0 +1,201 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风列表数据模型 + * + * @author a203 + */ +public class TyphoonListModel { + + /** + * code : 200 + * data : [{"centerPressure":"990","engName":"Kompasu","lat":18.7,"lng":125,"moveDirection":"西北西","moveSpeed":"23","name":"圆规","power":9,"radius10":"","radius7":"200","speed":"23","time":"2021-10-11 05:00:00","typhoonId":"202118","typhoonType":"热带风暴"}] + * message : 请求成功 + * success : true + */ + + private int code; + private String message; + private boolean success; + private List data; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public static class DataBean { + /** + * centerPressure : 990 + * engName : Kompasu + * lat : 18.7 + * lng : 125 + * moveDirection : 西北西 + * moveSpeed : 23 + * name : 圆规 + * power : 9 + * radius10 : + * radius7 : 200 + * speed : 23 + * time : 2021-10-11 05:00:00 + * typhoonId : 202118 + * typhoonType : 热带风暴 + */ + + private String centerPressure; + private String engName; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private String name; + private int power; + private String radius10; + private String radius7; + private String speed; + private String time; + private String typhoonId; + private String typhoonType; + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java deleted file mode 100644 index 38a9257..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java +++ /dev/null @@ -1,237 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 61554fbe0de376d03494057c - * showapi_res_body : {"ret_code":0,"list":[{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}]} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * list : [{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}] - */ - - private int ret_code; - private List list; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * pressure : 945 - * tfid : 202116 - * radius10 : 150 - * speed : 48 - * lng : 136.40 - * radius7 : 350 - * time : 2021-09-30 08:00:00 - * movespeed : 23 - * strong : 强台风 - * name : 蒲公英 - * power : 15 - * movedirection : 北北东 - * lat : 26.60 - * enname : Mindulle - */ - - private String pressure; - private String tfid; - private String radius10; - private String speed; - private String lng; - private String radius7; - private String time; - private String movespeed; - private String strong; - private String name; - private String power; - private String movedirection; - private String lat; - private String enname; - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getLng() { - return lng; - } - - public void setLng(String lng) { - this.lng = lng; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public String getLat() { - return lat; - } - - public void setLat(String lat) { - this.lat = lat; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java new file mode 100644 index 0000000..c488237 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风移动点数据信息 服务类 + * + * @author a203 + */ +public interface ILandPointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java new file mode 100644 index 0000000..ab05570 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风登陆点数据信息 服务类 + * + * @author a203 + */ +public interface IRoutePointService extends IService { + +} diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..8396364 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,31 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel.DataBean data) { + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java index a34da1b..0c5225d 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -1,8 +1,8 @@ package com.casic.missiles.modular.system.dto; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; import lombok.Data; import java.util.ArrayList; @@ -142,7 +142,7 @@ private String centerPosition; } - public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + public TyphoonDetailDTO(TyphoonDetail detail, List landPoints, List routePoints) { this.typhoonId = detail.getTyphoonId(); this.name = detail.getName(); this.engName = detail.getEngName(); @@ -152,8 +152,9 @@ this.startTime = detail.getStartTime(); this.endTime = detail.getEndTime(); this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); - for (TyphoonLand landBean : landBeans) { + for (LandPoint landBean : landPoints) { LandBan bean = new LandBan(); bean.landAddress = landBean.getLandAddress(); bean.landTime = landBean.getLandTime(); @@ -164,8 +165,9 @@ lands.add(bean); } this.land = lands; + List points = new ArrayList<>(); - for (TyphoonPoint point : pointBeans) { + for (RoutePoint point : routePoints) { PointBean pointBean = new PointBean(); pointBean.time = point.getTime(); pointBean.centerPressure = point.getCenterPressure(); diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java new file mode 100644 index 0000000..b0b2e7a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java @@ -0,0 +1,265 @@ +package com.casic.missiles.modular.system.dto.remote; + +/** + * 洋流数据模型 + * + * @author a203 + */ +public class OceanDetailModel { + + /** + * code : 200 + * data : {"altitude":0,"forecast":{"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34},"oceanDir":135.22,"pressure":100925.19,"speed":7.97,"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"temperature":28.6,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34,"windDir":71.84,"windSpeed":7.97} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * altitude : 0 + * forecast : {"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34} + * oceanDir : 135.22 + * pressure : 100925.19 + * speed : 7.97 + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * temperature : 28.6 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + * windDir : 71.84 + * windSpeed : 7.97 + */ + + private double altitude; + private ForecastBean forecast; + private double oceanDir; + private double pressure; + private double speed; + private double swellDir; + private double swellHeight; + private double swellPrd; + private double temperature; + private double waveDir; + private double waveHeight; + private double wavePrd; + private double windDir; + private double windSpeed; + + public double getAltitude() { + return altitude; + } + + public void setAltitude(double altitude) { + this.altitude = altitude; + } + + public ForecastBean getForecast() { + return forecast; + } + + public void setForecast(ForecastBean forecast) { + this.forecast = forecast; + } + + public double getOceanDir() { + return oceanDir; + } + + public void setOceanDir(double oceanDir) { + this.oceanDir = oceanDir; + } + + public double getPressure() { + return pressure; + } + + public void setPressure(double pressure) { + this.pressure = pressure; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getTemperature() { + return temperature; + } + + public void setTemperature(double temperature) { + this.temperature = temperature; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + + public double getWindDir() { + return windDir; + } + + public void setWindDir(double windDir) { + this.windDir = windDir; + } + + public double getWindSpeed() { + return windSpeed; + } + + public void setWindSpeed(double windSpeed) { + this.windSpeed = windSpeed; + } + + public static class ForecastBean { + /** + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + */ + + private double swellDir; + private double swellHeight; + private double swellPrd; + private double waveDir; + private double waveHeight; + private double wavePrd; + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java deleted file mode 100644 index 5ad3a22..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java +++ /dev/null @@ -1,439 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方洋流数据模型 - * - * @author a203 - */ -public class OceanDetailRemoteData { - - /** - * code : 0 - * data : {"lon":114.338597,"lat":18.273134,"date":"2021-10-21","hour":10,"list":[{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}]} - * message : success - * etime : 1634786517992 - */ - - private int code; - private DataBean data; - private String message; - private long etime; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public DataBean getData() { - return data; - } - - public void setData(DataBean data) { - this.data = data; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public long getEtime() { - return etime; - } - - public void setEtime(long etime) { - this.etime = etime; - } - - public static class DataBean { - /** - * lon : 114.338597 - * lat : 18.273134 - * date : 2021-10-21 - * hour : 10 - * list : [{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}] - */ - - private double lon; - private double lat; - private String date; - private int hour; - private List list; - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public int getHour() { - return hour; - } - - public void setHour(int hour) { - this.hour = hour; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * date : 2021-10-21 - * ytx : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - * meteo : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - */ - - private String date; - private YtxBean ytx; - private MeteoBean meteo; - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public YtxBean getYtx() { - return ytx; - } - - public void setYtx(YtxBean ytx) { - this.ytx = ytx; - } - - public MeteoBean getMeteo() { - return meteo; - } - - public void setMeteo(MeteoBean meteo) { - this.meteo = meteo; - } - - public static class YtxBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - - public static class MeteoBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java new file mode 100644 index 0000000..3a2e068 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java @@ -0,0 +1,374 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风数据模型 + * + * @author a203 + */ +public class TyphoonDetailModel { + + /** + * code : 200 + * data : {"centerLat":20.65,"centerLng":128.1,"endTime":"2021-10-11 8:00:00","engName":"Kompasu","isActive":"1","land":[],"name":"圆规","points":[{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}],"startTime":"2021-10-8 2:00:00","typhoonId":"202118","warnLevel":"white"} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * centerLat : 20.65 + * centerLng : 128.1 + * endTime : 2021-10-11 8:00:00 + * engName : Kompasu + * isActive : 1 + * land : [] + * name : 圆规 + * points : [{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}] + * startTime : 2021-10-8 2:00:00 + * typhoonId : 202118 + * warnLevel : white + */ + + private double centerLat; + private double centerLng; + private String endTime; + private String engName; + private String isActive; + private String name; + private String startTime; + private String typhoonId; + private String warnLevel; + private List land; + private List points; + + public double getCenterLat() { + return centerLat; + } + + public void setCenterLat(double centerLat) { + this.centerLat = centerLat; + } + + public double getCenterLng() { + return centerLng; + } + + public void setCenterLng(double centerLng) { + this.centerLng = centerLng; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public String getIsActive() { + return isActive; + } + + public void setIsActive(String isActive) { + this.isActive = isActive; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getWarnLevel() { + return warnLevel; + } + + public void setWarnLevel(String warnLevel) { + this.warnLevel = warnLevel; + } + + public List getLand() { + return land; + } + + public void setLand(List land) { + this.land = land; + } + + public static class LandBean { + private String landAddress; + private String type; + private Double lng; + private Double lat; + private String info; + private String landTime; + + public String getLandAddress() { + return landAddress; + } + + public void setLandAddress(String landAddress) { + this.landAddress = landAddress; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Double getLng() { + return lng; + } + + public void setLng(Double lng) { + this.lng = lng; + } + + public Double getLat() { + return lat; + } + + public void setLat(Double lat) { + this.lat = lat; + } + + public String getInfo() { + return info; + } + + public void setInfo(String info) { + this.info = info; + } + + public String getLandTime() { + return landTime; + } + + public void setLandTime(String landTime) { + this.landTime = landTime; + } + } + + public List getPoints() { + return points; + } + + public void setPoints(List points) { + this.points = points; + } + + public static class PointsBean { + /** + * centerPosition : 距离菲律宾马尼拉东北方向约600公里 + * centerPressure : 990 + * lat : 18.7 + * lng : 124.7 + * moveDirection : 西北西 + * moveSpeed : 25 + * power : 9 + * radius10 : + * radius12 : + * radius7 : 160|140|200|180 + * routePrediction : “圆规”将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分) + * speed : 23 + * time : 2021-10-11 8:00:00 + * typhoonType : 热带风暴 + */ + + private String centerPosition; + private String centerPressure; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private int power; + private String radius10; + private String radius12; + private String radius7; + private String routePrediction; + private String speed; + private String time; + private String typhoonType; + + public String getCenterPosition() { + return centerPosition; + } + + public void setCenterPosition(String centerPosition) { + this.centerPosition = centerPosition; + } + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius12() { + return radius12; + } + + public void setRadius12(String radius12) { + this.radius12 = radius12; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getRoutePrediction() { + return routePrediction; + } + + public void setRoutePrediction(String routePrediction) { + this.routePrediction = routePrediction; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java deleted file mode 100644 index 5b70924..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java +++ /dev/null @@ -1,419 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonDetailRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 6155596a0de376ce34c7b594 - * showapi_res_body : {"ret_code":0,"obj":{"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"}} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * obj : {"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"} - */ - - private int ret_code; - private ObjBean obj; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public ObjBean getObj() { - return obj; - } - - public void setObj(ObjBean obj) { - this.obj = obj; - } - - public static class ObjBean { - /** - * endtime : 2021-9-30 8:00:00 - * centerlng : 139.300000 - * starttime : 2021-9-23 20:00:00 - * tfid : 202116 - * isactive : 1 - * centerlat : 25.200000 - * name : 蒲公英 - * land : [{"landaddress":"朱家尖镇","strong":"强台风","lng":"122.39","lat":"29.83","info":"\u201c灿鸿\u201d11日16时40分前后登陆浙江舟山市朱家尖镇","landtime":"2015/7/11 16:40:00"}] - * warnlevel : white - * points : [{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}] - * enname : Mindulle - */ - - private String endtime; - private String centerlng; - private String starttime; - private String tfid; - private String isactive; - private String centerlat; - private String name; - private String warnlevel; - private String enname; - private List land; - private List points; - - public String getEndtime() { - return endtime; - } - - public void setEndtime(String endtime) { - this.endtime = endtime; - } - - public String getCenterlng() { - return centerlng; - } - - public void setCenterlng(String centerlng) { - this.centerlng = centerlng; - } - - public String getStarttime() { - return starttime; - } - - public void setStarttime(String starttime) { - this.starttime = starttime; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getIsactive() { - return isactive; - } - - public void setIsactive(String isactive) { - this.isactive = isactive; - } - - public String getCenterlat() { - return centerlat; - } - - public void setCenterlat(String centerlat) { - this.centerlat = centerlat; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getWarnlevel() { - return warnlevel; - } - - public void setWarnlevel(String warnlevel) { - this.warnlevel = warnlevel; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - - public List getLand() { - return land; - } - - public void setLand(List land) { - this.land = land; - } - - public static class LandBan { - /** - * landaddress : 朱家尖镇 - * strong : 强台风 - * lng : 122.39 - * lat : 29.83 - * info : “灿鸿”11日16时40分前后登陆浙江舟山市朱家尖镇 - * landtime : 2015/7/11 16:40:00 - */ - - private String landaddress; - private String strong; - private Double lng; - private Double lat; - private String info; - private String landtime; - - public String getLandaddress() { - return landaddress; - } - - public void setLandaddress(String landaddress) { - this.landaddress = landaddress; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getInfo() { - return info; - } - - public void setInfo(String info) { - this.info = info; - } - - public String getLandtime() { - return landtime; - } - - public void setLandtime(String landtime) { - this.landtime = landtime; - } - } - - public List getPoints() { - return points; - } - - public void setPoints(List points) { - this.points = points; - } - - public static class PointsBean { - /** - * time : 2021-9-23 20:00:00 - * pressure : 998 - * radius10 : - * speed : 18 - * strong : 热带风暴 - * movespeed : 20 - * radius12 : - * power : 8 - * lng : 143.30 - * movedirection : 西北西 - * lat : 13.80 - * radius7 : 250|220|200|180 - * jl : “蒲公英”将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分) - * ckposition : 距离日本东京南偏西方向约1060公里 - */ - - private String time; - private String pressure; - private String radius10; - private String speed; - private String strong; - private String movespeed; - private String radius12; - private String power; - private Double lng; - private String movedirection; - private Double lat; - private String radius7; - private String jl; - private String ckposition; - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getRadius12() { - return radius12; - } - - public void setRadius12(String radius12) { - this.radius12 = radius12; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getJl() { - return jl; - } - - public void setJl(String jl) { - this.jl = jl; - } - - public String getCkposition() { - return ckposition; - } - - public void setCkposition(String ckposition) { - this.ckposition = ckposition; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java new file mode 100644 index 0000000..91bad37 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java @@ -0,0 +1,201 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风列表数据模型 + * + * @author a203 + */ +public class TyphoonListModel { + + /** + * code : 200 + * data : [{"centerPressure":"990","engName":"Kompasu","lat":18.7,"lng":125,"moveDirection":"西北西","moveSpeed":"23","name":"圆规","power":9,"radius10":"","radius7":"200","speed":"23","time":"2021-10-11 05:00:00","typhoonId":"202118","typhoonType":"热带风暴"}] + * message : 请求成功 + * success : true + */ + + private int code; + private String message; + private boolean success; + private List data; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public static class DataBean { + /** + * centerPressure : 990 + * engName : Kompasu + * lat : 18.7 + * lng : 125 + * moveDirection : 西北西 + * moveSpeed : 23 + * name : 圆规 + * power : 9 + * radius10 : + * radius7 : 200 + * speed : 23 + * time : 2021-10-11 05:00:00 + * typhoonId : 202118 + * typhoonType : 热带风暴 + */ + + private String centerPressure; + private String engName; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private String name; + private int power; + private String radius10; + private String radius7; + private String speed; + private String time; + private String typhoonId; + private String typhoonType; + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java deleted file mode 100644 index 38a9257..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java +++ /dev/null @@ -1,237 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 61554fbe0de376d03494057c - * showapi_res_body : {"ret_code":0,"list":[{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}]} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * list : [{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}] - */ - - private int ret_code; - private List list; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * pressure : 945 - * tfid : 202116 - * radius10 : 150 - * speed : 48 - * lng : 136.40 - * radius7 : 350 - * time : 2021-09-30 08:00:00 - * movespeed : 23 - * strong : 强台风 - * name : 蒲公英 - * power : 15 - * movedirection : 北北东 - * lat : 26.60 - * enname : Mindulle - */ - - private String pressure; - private String tfid; - private String radius10; - private String speed; - private String lng; - private String radius7; - private String time; - private String movespeed; - private String strong; - private String name; - private String power; - private String movedirection; - private String lat; - private String enname; - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getLng() { - return lng; - } - - public void setLng(String lng) { - this.lng = lng; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public String getLat() { - return lat; - } - - public void setLat(String lat) { - this.lat = lat; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java new file mode 100644 index 0000000..c488237 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风移动点数据信息 服务类 + * + * @author a203 + */ +public interface ILandPointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java new file mode 100644 index 0000000..ab05570 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风登陆点数据信息 服务类 + * + * @author a203 + */ +public interface IRoutePointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java deleted file mode 100644 index d16a48b..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonLandService extends IService { - -} diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..8396364 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,31 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel.DataBean data) { + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java index a34da1b..0c5225d 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -1,8 +1,8 @@ package com.casic.missiles.modular.system.dto; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; import lombok.Data; import java.util.ArrayList; @@ -142,7 +142,7 @@ private String centerPosition; } - public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + public TyphoonDetailDTO(TyphoonDetail detail, List landPoints, List routePoints) { this.typhoonId = detail.getTyphoonId(); this.name = detail.getName(); this.engName = detail.getEngName(); @@ -152,8 +152,9 @@ this.startTime = detail.getStartTime(); this.endTime = detail.getEndTime(); this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); - for (TyphoonLand landBean : landBeans) { + for (LandPoint landBean : landPoints) { LandBan bean = new LandBan(); bean.landAddress = landBean.getLandAddress(); bean.landTime = landBean.getLandTime(); @@ -164,8 +165,9 @@ lands.add(bean); } this.land = lands; + List points = new ArrayList<>(); - for (TyphoonPoint point : pointBeans) { + for (RoutePoint point : routePoints) { PointBean pointBean = new PointBean(); pointBean.time = point.getTime(); pointBean.centerPressure = point.getCenterPressure(); diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java new file mode 100644 index 0000000..b0b2e7a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java @@ -0,0 +1,265 @@ +package com.casic.missiles.modular.system.dto.remote; + +/** + * 洋流数据模型 + * + * @author a203 + */ +public class OceanDetailModel { + + /** + * code : 200 + * data : {"altitude":0,"forecast":{"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34},"oceanDir":135.22,"pressure":100925.19,"speed":7.97,"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"temperature":28.6,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34,"windDir":71.84,"windSpeed":7.97} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * altitude : 0 + * forecast : {"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34} + * oceanDir : 135.22 + * pressure : 100925.19 + * speed : 7.97 + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * temperature : 28.6 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + * windDir : 71.84 + * windSpeed : 7.97 + */ + + private double altitude; + private ForecastBean forecast; + private double oceanDir; + private double pressure; + private double speed; + private double swellDir; + private double swellHeight; + private double swellPrd; + private double temperature; + private double waveDir; + private double waveHeight; + private double wavePrd; + private double windDir; + private double windSpeed; + + public double getAltitude() { + return altitude; + } + + public void setAltitude(double altitude) { + this.altitude = altitude; + } + + public ForecastBean getForecast() { + return forecast; + } + + public void setForecast(ForecastBean forecast) { + this.forecast = forecast; + } + + public double getOceanDir() { + return oceanDir; + } + + public void setOceanDir(double oceanDir) { + this.oceanDir = oceanDir; + } + + public double getPressure() { + return pressure; + } + + public void setPressure(double pressure) { + this.pressure = pressure; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getTemperature() { + return temperature; + } + + public void setTemperature(double temperature) { + this.temperature = temperature; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + + public double getWindDir() { + return windDir; + } + + public void setWindDir(double windDir) { + this.windDir = windDir; + } + + public double getWindSpeed() { + return windSpeed; + } + + public void setWindSpeed(double windSpeed) { + this.windSpeed = windSpeed; + } + + public static class ForecastBean { + /** + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + */ + + private double swellDir; + private double swellHeight; + private double swellPrd; + private double waveDir; + private double waveHeight; + private double wavePrd; + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java deleted file mode 100644 index 5ad3a22..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java +++ /dev/null @@ -1,439 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方洋流数据模型 - * - * @author a203 - */ -public class OceanDetailRemoteData { - - /** - * code : 0 - * data : {"lon":114.338597,"lat":18.273134,"date":"2021-10-21","hour":10,"list":[{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}]} - * message : success - * etime : 1634786517992 - */ - - private int code; - private DataBean data; - private String message; - private long etime; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public DataBean getData() { - return data; - } - - public void setData(DataBean data) { - this.data = data; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public long getEtime() { - return etime; - } - - public void setEtime(long etime) { - this.etime = etime; - } - - public static class DataBean { - /** - * lon : 114.338597 - * lat : 18.273134 - * date : 2021-10-21 - * hour : 10 - * list : [{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}] - */ - - private double lon; - private double lat; - private String date; - private int hour; - private List list; - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public int getHour() { - return hour; - } - - public void setHour(int hour) { - this.hour = hour; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * date : 2021-10-21 - * ytx : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - * meteo : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - */ - - private String date; - private YtxBean ytx; - private MeteoBean meteo; - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public YtxBean getYtx() { - return ytx; - } - - public void setYtx(YtxBean ytx) { - this.ytx = ytx; - } - - public MeteoBean getMeteo() { - return meteo; - } - - public void setMeteo(MeteoBean meteo) { - this.meteo = meteo; - } - - public static class YtxBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - - public static class MeteoBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java new file mode 100644 index 0000000..3a2e068 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java @@ -0,0 +1,374 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风数据模型 + * + * @author a203 + */ +public class TyphoonDetailModel { + + /** + * code : 200 + * data : {"centerLat":20.65,"centerLng":128.1,"endTime":"2021-10-11 8:00:00","engName":"Kompasu","isActive":"1","land":[],"name":"圆规","points":[{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}],"startTime":"2021-10-8 2:00:00","typhoonId":"202118","warnLevel":"white"} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * centerLat : 20.65 + * centerLng : 128.1 + * endTime : 2021-10-11 8:00:00 + * engName : Kompasu + * isActive : 1 + * land : [] + * name : 圆规 + * points : [{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}] + * startTime : 2021-10-8 2:00:00 + * typhoonId : 202118 + * warnLevel : white + */ + + private double centerLat; + private double centerLng; + private String endTime; + private String engName; + private String isActive; + private String name; + private String startTime; + private String typhoonId; + private String warnLevel; + private List land; + private List points; + + public double getCenterLat() { + return centerLat; + } + + public void setCenterLat(double centerLat) { + this.centerLat = centerLat; + } + + public double getCenterLng() { + return centerLng; + } + + public void setCenterLng(double centerLng) { + this.centerLng = centerLng; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public String getIsActive() { + return isActive; + } + + public void setIsActive(String isActive) { + this.isActive = isActive; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getWarnLevel() { + return warnLevel; + } + + public void setWarnLevel(String warnLevel) { + this.warnLevel = warnLevel; + } + + public List getLand() { + return land; + } + + public void setLand(List land) { + this.land = land; + } + + public static class LandBean { + private String landAddress; + private String type; + private Double lng; + private Double lat; + private String info; + private String landTime; + + public String getLandAddress() { + return landAddress; + } + + public void setLandAddress(String landAddress) { + this.landAddress = landAddress; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Double getLng() { + return lng; + } + + public void setLng(Double lng) { + this.lng = lng; + } + + public Double getLat() { + return lat; + } + + public void setLat(Double lat) { + this.lat = lat; + } + + public String getInfo() { + return info; + } + + public void setInfo(String info) { + this.info = info; + } + + public String getLandTime() { + return landTime; + } + + public void setLandTime(String landTime) { + this.landTime = landTime; + } + } + + public List getPoints() { + return points; + } + + public void setPoints(List points) { + this.points = points; + } + + public static class PointsBean { + /** + * centerPosition : 距离菲律宾马尼拉东北方向约600公里 + * centerPressure : 990 + * lat : 18.7 + * lng : 124.7 + * moveDirection : 西北西 + * moveSpeed : 25 + * power : 9 + * radius10 : + * radius12 : + * radius7 : 160|140|200|180 + * routePrediction : “圆规”将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分) + * speed : 23 + * time : 2021-10-11 8:00:00 + * typhoonType : 热带风暴 + */ + + private String centerPosition; + private String centerPressure; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private int power; + private String radius10; + private String radius12; + private String radius7; + private String routePrediction; + private String speed; + private String time; + private String typhoonType; + + public String getCenterPosition() { + return centerPosition; + } + + public void setCenterPosition(String centerPosition) { + this.centerPosition = centerPosition; + } + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius12() { + return radius12; + } + + public void setRadius12(String radius12) { + this.radius12 = radius12; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getRoutePrediction() { + return routePrediction; + } + + public void setRoutePrediction(String routePrediction) { + this.routePrediction = routePrediction; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java deleted file mode 100644 index 5b70924..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java +++ /dev/null @@ -1,419 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonDetailRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 6155596a0de376ce34c7b594 - * showapi_res_body : {"ret_code":0,"obj":{"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"}} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * obj : {"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"} - */ - - private int ret_code; - private ObjBean obj; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public ObjBean getObj() { - return obj; - } - - public void setObj(ObjBean obj) { - this.obj = obj; - } - - public static class ObjBean { - /** - * endtime : 2021-9-30 8:00:00 - * centerlng : 139.300000 - * starttime : 2021-9-23 20:00:00 - * tfid : 202116 - * isactive : 1 - * centerlat : 25.200000 - * name : 蒲公英 - * land : [{"landaddress":"朱家尖镇","strong":"强台风","lng":"122.39","lat":"29.83","info":"\u201c灿鸿\u201d11日16时40分前后登陆浙江舟山市朱家尖镇","landtime":"2015/7/11 16:40:00"}] - * warnlevel : white - * points : [{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}] - * enname : Mindulle - */ - - private String endtime; - private String centerlng; - private String starttime; - private String tfid; - private String isactive; - private String centerlat; - private String name; - private String warnlevel; - private String enname; - private List land; - private List points; - - public String getEndtime() { - return endtime; - } - - public void setEndtime(String endtime) { - this.endtime = endtime; - } - - public String getCenterlng() { - return centerlng; - } - - public void setCenterlng(String centerlng) { - this.centerlng = centerlng; - } - - public String getStarttime() { - return starttime; - } - - public void setStarttime(String starttime) { - this.starttime = starttime; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getIsactive() { - return isactive; - } - - public void setIsactive(String isactive) { - this.isactive = isactive; - } - - public String getCenterlat() { - return centerlat; - } - - public void setCenterlat(String centerlat) { - this.centerlat = centerlat; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getWarnlevel() { - return warnlevel; - } - - public void setWarnlevel(String warnlevel) { - this.warnlevel = warnlevel; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - - public List getLand() { - return land; - } - - public void setLand(List land) { - this.land = land; - } - - public static class LandBan { - /** - * landaddress : 朱家尖镇 - * strong : 强台风 - * lng : 122.39 - * lat : 29.83 - * info : “灿鸿”11日16时40分前后登陆浙江舟山市朱家尖镇 - * landtime : 2015/7/11 16:40:00 - */ - - private String landaddress; - private String strong; - private Double lng; - private Double lat; - private String info; - private String landtime; - - public String getLandaddress() { - return landaddress; - } - - public void setLandaddress(String landaddress) { - this.landaddress = landaddress; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getInfo() { - return info; - } - - public void setInfo(String info) { - this.info = info; - } - - public String getLandtime() { - return landtime; - } - - public void setLandtime(String landtime) { - this.landtime = landtime; - } - } - - public List getPoints() { - return points; - } - - public void setPoints(List points) { - this.points = points; - } - - public static class PointsBean { - /** - * time : 2021-9-23 20:00:00 - * pressure : 998 - * radius10 : - * speed : 18 - * strong : 热带风暴 - * movespeed : 20 - * radius12 : - * power : 8 - * lng : 143.30 - * movedirection : 西北西 - * lat : 13.80 - * radius7 : 250|220|200|180 - * jl : “蒲公英”将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分) - * ckposition : 距离日本东京南偏西方向约1060公里 - */ - - private String time; - private String pressure; - private String radius10; - private String speed; - private String strong; - private String movespeed; - private String radius12; - private String power; - private Double lng; - private String movedirection; - private Double lat; - private String radius7; - private String jl; - private String ckposition; - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getRadius12() { - return radius12; - } - - public void setRadius12(String radius12) { - this.radius12 = radius12; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getJl() { - return jl; - } - - public void setJl(String jl) { - this.jl = jl; - } - - public String getCkposition() { - return ckposition; - } - - public void setCkposition(String ckposition) { - this.ckposition = ckposition; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java new file mode 100644 index 0000000..91bad37 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java @@ -0,0 +1,201 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风列表数据模型 + * + * @author a203 + */ +public class TyphoonListModel { + + /** + * code : 200 + * data : [{"centerPressure":"990","engName":"Kompasu","lat":18.7,"lng":125,"moveDirection":"西北西","moveSpeed":"23","name":"圆规","power":9,"radius10":"","radius7":"200","speed":"23","time":"2021-10-11 05:00:00","typhoonId":"202118","typhoonType":"热带风暴"}] + * message : 请求成功 + * success : true + */ + + private int code; + private String message; + private boolean success; + private List data; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public static class DataBean { + /** + * centerPressure : 990 + * engName : Kompasu + * lat : 18.7 + * lng : 125 + * moveDirection : 西北西 + * moveSpeed : 23 + * name : 圆规 + * power : 9 + * radius10 : + * radius7 : 200 + * speed : 23 + * time : 2021-10-11 05:00:00 + * typhoonId : 202118 + * typhoonType : 热带风暴 + */ + + private String centerPressure; + private String engName; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private String name; + private int power; + private String radius10; + private String radius7; + private String speed; + private String time; + private String typhoonId; + private String typhoonType; + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java deleted file mode 100644 index 38a9257..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java +++ /dev/null @@ -1,237 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 61554fbe0de376d03494057c - * showapi_res_body : {"ret_code":0,"list":[{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}]} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * list : [{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}] - */ - - private int ret_code; - private List list; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * pressure : 945 - * tfid : 202116 - * radius10 : 150 - * speed : 48 - * lng : 136.40 - * radius7 : 350 - * time : 2021-09-30 08:00:00 - * movespeed : 23 - * strong : 强台风 - * name : 蒲公英 - * power : 15 - * movedirection : 北北东 - * lat : 26.60 - * enname : Mindulle - */ - - private String pressure; - private String tfid; - private String radius10; - private String speed; - private String lng; - private String radius7; - private String time; - private String movespeed; - private String strong; - private String name; - private String power; - private String movedirection; - private String lat; - private String enname; - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getLng() { - return lng; - } - - public void setLng(String lng) { - this.lng = lng; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public String getLat() { - return lat; - } - - public void setLat(String lat) { - this.lat = lat; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java new file mode 100644 index 0000000..c488237 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风移动点数据信息 服务类 + * + * @author a203 + */ +public interface ILandPointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java new file mode 100644 index 0000000..ab05570 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风登陆点数据信息 服务类 + * + * @author a203 + */ +public interface IRoutePointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java deleted file mode 100644 index d16a48b..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonLandService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java deleted file mode 100644 index 80e2765..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonPointService extends IService { - -} diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..8396364 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,31 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel.DataBean data) { + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java index a34da1b..0c5225d 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -1,8 +1,8 @@ package com.casic.missiles.modular.system.dto; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; import lombok.Data; import java.util.ArrayList; @@ -142,7 +142,7 @@ private String centerPosition; } - public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + public TyphoonDetailDTO(TyphoonDetail detail, List landPoints, List routePoints) { this.typhoonId = detail.getTyphoonId(); this.name = detail.getName(); this.engName = detail.getEngName(); @@ -152,8 +152,9 @@ this.startTime = detail.getStartTime(); this.endTime = detail.getEndTime(); this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); - for (TyphoonLand landBean : landBeans) { + for (LandPoint landBean : landPoints) { LandBan bean = new LandBan(); bean.landAddress = landBean.getLandAddress(); bean.landTime = landBean.getLandTime(); @@ -164,8 +165,9 @@ lands.add(bean); } this.land = lands; + List points = new ArrayList<>(); - for (TyphoonPoint point : pointBeans) { + for (RoutePoint point : routePoints) { PointBean pointBean = new PointBean(); pointBean.time = point.getTime(); pointBean.centerPressure = point.getCenterPressure(); diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java new file mode 100644 index 0000000..b0b2e7a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java @@ -0,0 +1,265 @@ +package com.casic.missiles.modular.system.dto.remote; + +/** + * 洋流数据模型 + * + * @author a203 + */ +public class OceanDetailModel { + + /** + * code : 200 + * data : {"altitude":0,"forecast":{"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34},"oceanDir":135.22,"pressure":100925.19,"speed":7.97,"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"temperature":28.6,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34,"windDir":71.84,"windSpeed":7.97} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * altitude : 0 + * forecast : {"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34} + * oceanDir : 135.22 + * pressure : 100925.19 + * speed : 7.97 + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * temperature : 28.6 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + * windDir : 71.84 + * windSpeed : 7.97 + */ + + private double altitude; + private ForecastBean forecast; + private double oceanDir; + private double pressure; + private double speed; + private double swellDir; + private double swellHeight; + private double swellPrd; + private double temperature; + private double waveDir; + private double waveHeight; + private double wavePrd; + private double windDir; + private double windSpeed; + + public double getAltitude() { + return altitude; + } + + public void setAltitude(double altitude) { + this.altitude = altitude; + } + + public ForecastBean getForecast() { + return forecast; + } + + public void setForecast(ForecastBean forecast) { + this.forecast = forecast; + } + + public double getOceanDir() { + return oceanDir; + } + + public void setOceanDir(double oceanDir) { + this.oceanDir = oceanDir; + } + + public double getPressure() { + return pressure; + } + + public void setPressure(double pressure) { + this.pressure = pressure; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getTemperature() { + return temperature; + } + + public void setTemperature(double temperature) { + this.temperature = temperature; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + + public double getWindDir() { + return windDir; + } + + public void setWindDir(double windDir) { + this.windDir = windDir; + } + + public double getWindSpeed() { + return windSpeed; + } + + public void setWindSpeed(double windSpeed) { + this.windSpeed = windSpeed; + } + + public static class ForecastBean { + /** + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + */ + + private double swellDir; + private double swellHeight; + private double swellPrd; + private double waveDir; + private double waveHeight; + private double wavePrd; + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java deleted file mode 100644 index 5ad3a22..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java +++ /dev/null @@ -1,439 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方洋流数据模型 - * - * @author a203 - */ -public class OceanDetailRemoteData { - - /** - * code : 0 - * data : {"lon":114.338597,"lat":18.273134,"date":"2021-10-21","hour":10,"list":[{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}]} - * message : success - * etime : 1634786517992 - */ - - private int code; - private DataBean data; - private String message; - private long etime; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public DataBean getData() { - return data; - } - - public void setData(DataBean data) { - this.data = data; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public long getEtime() { - return etime; - } - - public void setEtime(long etime) { - this.etime = etime; - } - - public static class DataBean { - /** - * lon : 114.338597 - * lat : 18.273134 - * date : 2021-10-21 - * hour : 10 - * list : [{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}] - */ - - private double lon; - private double lat; - private String date; - private int hour; - private List list; - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public int getHour() { - return hour; - } - - public void setHour(int hour) { - this.hour = hour; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * date : 2021-10-21 - * ytx : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - * meteo : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - */ - - private String date; - private YtxBean ytx; - private MeteoBean meteo; - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public YtxBean getYtx() { - return ytx; - } - - public void setYtx(YtxBean ytx) { - this.ytx = ytx; - } - - public MeteoBean getMeteo() { - return meteo; - } - - public void setMeteo(MeteoBean meteo) { - this.meteo = meteo; - } - - public static class YtxBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - - public static class MeteoBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java new file mode 100644 index 0000000..3a2e068 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java @@ -0,0 +1,374 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风数据模型 + * + * @author a203 + */ +public class TyphoonDetailModel { + + /** + * code : 200 + * data : {"centerLat":20.65,"centerLng":128.1,"endTime":"2021-10-11 8:00:00","engName":"Kompasu","isActive":"1","land":[],"name":"圆规","points":[{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}],"startTime":"2021-10-8 2:00:00","typhoonId":"202118","warnLevel":"white"} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * centerLat : 20.65 + * centerLng : 128.1 + * endTime : 2021-10-11 8:00:00 + * engName : Kompasu + * isActive : 1 + * land : [] + * name : 圆规 + * points : [{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}] + * startTime : 2021-10-8 2:00:00 + * typhoonId : 202118 + * warnLevel : white + */ + + private double centerLat; + private double centerLng; + private String endTime; + private String engName; + private String isActive; + private String name; + private String startTime; + private String typhoonId; + private String warnLevel; + private List land; + private List points; + + public double getCenterLat() { + return centerLat; + } + + public void setCenterLat(double centerLat) { + this.centerLat = centerLat; + } + + public double getCenterLng() { + return centerLng; + } + + public void setCenterLng(double centerLng) { + this.centerLng = centerLng; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public String getIsActive() { + return isActive; + } + + public void setIsActive(String isActive) { + this.isActive = isActive; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getWarnLevel() { + return warnLevel; + } + + public void setWarnLevel(String warnLevel) { + this.warnLevel = warnLevel; + } + + public List getLand() { + return land; + } + + public void setLand(List land) { + this.land = land; + } + + public static class LandBean { + private String landAddress; + private String type; + private Double lng; + private Double lat; + private String info; + private String landTime; + + public String getLandAddress() { + return landAddress; + } + + public void setLandAddress(String landAddress) { + this.landAddress = landAddress; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Double getLng() { + return lng; + } + + public void setLng(Double lng) { + this.lng = lng; + } + + public Double getLat() { + return lat; + } + + public void setLat(Double lat) { + this.lat = lat; + } + + public String getInfo() { + return info; + } + + public void setInfo(String info) { + this.info = info; + } + + public String getLandTime() { + return landTime; + } + + public void setLandTime(String landTime) { + this.landTime = landTime; + } + } + + public List getPoints() { + return points; + } + + public void setPoints(List points) { + this.points = points; + } + + public static class PointsBean { + /** + * centerPosition : 距离菲律宾马尼拉东北方向约600公里 + * centerPressure : 990 + * lat : 18.7 + * lng : 124.7 + * moveDirection : 西北西 + * moveSpeed : 25 + * power : 9 + * radius10 : + * radius12 : + * radius7 : 160|140|200|180 + * routePrediction : “圆规”将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分) + * speed : 23 + * time : 2021-10-11 8:00:00 + * typhoonType : 热带风暴 + */ + + private String centerPosition; + private String centerPressure; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private int power; + private String radius10; + private String radius12; + private String radius7; + private String routePrediction; + private String speed; + private String time; + private String typhoonType; + + public String getCenterPosition() { + return centerPosition; + } + + public void setCenterPosition(String centerPosition) { + this.centerPosition = centerPosition; + } + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius12() { + return radius12; + } + + public void setRadius12(String radius12) { + this.radius12 = radius12; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getRoutePrediction() { + return routePrediction; + } + + public void setRoutePrediction(String routePrediction) { + this.routePrediction = routePrediction; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java deleted file mode 100644 index 5b70924..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java +++ /dev/null @@ -1,419 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonDetailRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 6155596a0de376ce34c7b594 - * showapi_res_body : {"ret_code":0,"obj":{"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"}} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * obj : {"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"} - */ - - private int ret_code; - private ObjBean obj; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public ObjBean getObj() { - return obj; - } - - public void setObj(ObjBean obj) { - this.obj = obj; - } - - public static class ObjBean { - /** - * endtime : 2021-9-30 8:00:00 - * centerlng : 139.300000 - * starttime : 2021-9-23 20:00:00 - * tfid : 202116 - * isactive : 1 - * centerlat : 25.200000 - * name : 蒲公英 - * land : [{"landaddress":"朱家尖镇","strong":"强台风","lng":"122.39","lat":"29.83","info":"\u201c灿鸿\u201d11日16时40分前后登陆浙江舟山市朱家尖镇","landtime":"2015/7/11 16:40:00"}] - * warnlevel : white - * points : [{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}] - * enname : Mindulle - */ - - private String endtime; - private String centerlng; - private String starttime; - private String tfid; - private String isactive; - private String centerlat; - private String name; - private String warnlevel; - private String enname; - private List land; - private List points; - - public String getEndtime() { - return endtime; - } - - public void setEndtime(String endtime) { - this.endtime = endtime; - } - - public String getCenterlng() { - return centerlng; - } - - public void setCenterlng(String centerlng) { - this.centerlng = centerlng; - } - - public String getStarttime() { - return starttime; - } - - public void setStarttime(String starttime) { - this.starttime = starttime; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getIsactive() { - return isactive; - } - - public void setIsactive(String isactive) { - this.isactive = isactive; - } - - public String getCenterlat() { - return centerlat; - } - - public void setCenterlat(String centerlat) { - this.centerlat = centerlat; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getWarnlevel() { - return warnlevel; - } - - public void setWarnlevel(String warnlevel) { - this.warnlevel = warnlevel; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - - public List getLand() { - return land; - } - - public void setLand(List land) { - this.land = land; - } - - public static class LandBan { - /** - * landaddress : 朱家尖镇 - * strong : 强台风 - * lng : 122.39 - * lat : 29.83 - * info : “灿鸿”11日16时40分前后登陆浙江舟山市朱家尖镇 - * landtime : 2015/7/11 16:40:00 - */ - - private String landaddress; - private String strong; - private Double lng; - private Double lat; - private String info; - private String landtime; - - public String getLandaddress() { - return landaddress; - } - - public void setLandaddress(String landaddress) { - this.landaddress = landaddress; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getInfo() { - return info; - } - - public void setInfo(String info) { - this.info = info; - } - - public String getLandtime() { - return landtime; - } - - public void setLandtime(String landtime) { - this.landtime = landtime; - } - } - - public List getPoints() { - return points; - } - - public void setPoints(List points) { - this.points = points; - } - - public static class PointsBean { - /** - * time : 2021-9-23 20:00:00 - * pressure : 998 - * radius10 : - * speed : 18 - * strong : 热带风暴 - * movespeed : 20 - * radius12 : - * power : 8 - * lng : 143.30 - * movedirection : 西北西 - * lat : 13.80 - * radius7 : 250|220|200|180 - * jl : “蒲公英”将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分) - * ckposition : 距离日本东京南偏西方向约1060公里 - */ - - private String time; - private String pressure; - private String radius10; - private String speed; - private String strong; - private String movespeed; - private String radius12; - private String power; - private Double lng; - private String movedirection; - private Double lat; - private String radius7; - private String jl; - private String ckposition; - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getRadius12() { - return radius12; - } - - public void setRadius12(String radius12) { - this.radius12 = radius12; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getJl() { - return jl; - } - - public void setJl(String jl) { - this.jl = jl; - } - - public String getCkposition() { - return ckposition; - } - - public void setCkposition(String ckposition) { - this.ckposition = ckposition; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java new file mode 100644 index 0000000..91bad37 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java @@ -0,0 +1,201 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风列表数据模型 + * + * @author a203 + */ +public class TyphoonListModel { + + /** + * code : 200 + * data : [{"centerPressure":"990","engName":"Kompasu","lat":18.7,"lng":125,"moveDirection":"西北西","moveSpeed":"23","name":"圆规","power":9,"radius10":"","radius7":"200","speed":"23","time":"2021-10-11 05:00:00","typhoonId":"202118","typhoonType":"热带风暴"}] + * message : 请求成功 + * success : true + */ + + private int code; + private String message; + private boolean success; + private List data; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public static class DataBean { + /** + * centerPressure : 990 + * engName : Kompasu + * lat : 18.7 + * lng : 125 + * moveDirection : 西北西 + * moveSpeed : 23 + * name : 圆规 + * power : 9 + * radius10 : + * radius7 : 200 + * speed : 23 + * time : 2021-10-11 05:00:00 + * typhoonId : 202118 + * typhoonType : 热带风暴 + */ + + private String centerPressure; + private String engName; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private String name; + private int power; + private String radius10; + private String radius7; + private String speed; + private String time; + private String typhoonId; + private String typhoonType; + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java deleted file mode 100644 index 38a9257..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java +++ /dev/null @@ -1,237 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 61554fbe0de376d03494057c - * showapi_res_body : {"ret_code":0,"list":[{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}]} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * list : [{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}] - */ - - private int ret_code; - private List list; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * pressure : 945 - * tfid : 202116 - * radius10 : 150 - * speed : 48 - * lng : 136.40 - * radius7 : 350 - * time : 2021-09-30 08:00:00 - * movespeed : 23 - * strong : 强台风 - * name : 蒲公英 - * power : 15 - * movedirection : 北北东 - * lat : 26.60 - * enname : Mindulle - */ - - private String pressure; - private String tfid; - private String radius10; - private String speed; - private String lng; - private String radius7; - private String time; - private String movespeed; - private String strong; - private String name; - private String power; - private String movedirection; - private String lat; - private String enname; - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getLng() { - return lng; - } - - public void setLng(String lng) { - this.lng = lng; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public String getLat() { - return lat; - } - - public void setLat(String lat) { - this.lat = lat; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java new file mode 100644 index 0000000..c488237 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风移动点数据信息 服务类 + * + * @author a203 + */ +public interface ILandPointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java new file mode 100644 index 0000000..ab05570 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风登陆点数据信息 服务类 + * + * @author a203 + */ +public interface IRoutePointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java deleted file mode 100644 index d16a48b..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonLandService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java deleted file mode 100644 index 80e2765..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonPointService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java index c47a0f3..53bb971 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java @@ -19,13 +19,6 @@ void saveTyphoonList(); /** - * 更新台风详情 - */ - void updateTyphoonDetail(); - - /***上面接口从第三方存库,下面接口查库**********************/ - - /** * 查询台风列表 * * @return {@link List} diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..8396364 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,31 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel.DataBean data) { + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java index a34da1b..0c5225d 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -1,8 +1,8 @@ package com.casic.missiles.modular.system.dto; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; import lombok.Data; import java.util.ArrayList; @@ -142,7 +142,7 @@ private String centerPosition; } - public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + public TyphoonDetailDTO(TyphoonDetail detail, List landPoints, List routePoints) { this.typhoonId = detail.getTyphoonId(); this.name = detail.getName(); this.engName = detail.getEngName(); @@ -152,8 +152,9 @@ this.startTime = detail.getStartTime(); this.endTime = detail.getEndTime(); this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); - for (TyphoonLand landBean : landBeans) { + for (LandPoint landBean : landPoints) { LandBan bean = new LandBan(); bean.landAddress = landBean.getLandAddress(); bean.landTime = landBean.getLandTime(); @@ -164,8 +165,9 @@ lands.add(bean); } this.land = lands; + List points = new ArrayList<>(); - for (TyphoonPoint point : pointBeans) { + for (RoutePoint point : routePoints) { PointBean pointBean = new PointBean(); pointBean.time = point.getTime(); pointBean.centerPressure = point.getCenterPressure(); diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java new file mode 100644 index 0000000..b0b2e7a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java @@ -0,0 +1,265 @@ +package com.casic.missiles.modular.system.dto.remote; + +/** + * 洋流数据模型 + * + * @author a203 + */ +public class OceanDetailModel { + + /** + * code : 200 + * data : {"altitude":0,"forecast":{"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34},"oceanDir":135.22,"pressure":100925.19,"speed":7.97,"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"temperature":28.6,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34,"windDir":71.84,"windSpeed":7.97} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * altitude : 0 + * forecast : {"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34} + * oceanDir : 135.22 + * pressure : 100925.19 + * speed : 7.97 + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * temperature : 28.6 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + * windDir : 71.84 + * windSpeed : 7.97 + */ + + private double altitude; + private ForecastBean forecast; + private double oceanDir; + private double pressure; + private double speed; + private double swellDir; + private double swellHeight; + private double swellPrd; + private double temperature; + private double waveDir; + private double waveHeight; + private double wavePrd; + private double windDir; + private double windSpeed; + + public double getAltitude() { + return altitude; + } + + public void setAltitude(double altitude) { + this.altitude = altitude; + } + + public ForecastBean getForecast() { + return forecast; + } + + public void setForecast(ForecastBean forecast) { + this.forecast = forecast; + } + + public double getOceanDir() { + return oceanDir; + } + + public void setOceanDir(double oceanDir) { + this.oceanDir = oceanDir; + } + + public double getPressure() { + return pressure; + } + + public void setPressure(double pressure) { + this.pressure = pressure; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getTemperature() { + return temperature; + } + + public void setTemperature(double temperature) { + this.temperature = temperature; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + + public double getWindDir() { + return windDir; + } + + public void setWindDir(double windDir) { + this.windDir = windDir; + } + + public double getWindSpeed() { + return windSpeed; + } + + public void setWindSpeed(double windSpeed) { + this.windSpeed = windSpeed; + } + + public static class ForecastBean { + /** + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + */ + + private double swellDir; + private double swellHeight; + private double swellPrd; + private double waveDir; + private double waveHeight; + private double wavePrd; + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java deleted file mode 100644 index 5ad3a22..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java +++ /dev/null @@ -1,439 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方洋流数据模型 - * - * @author a203 - */ -public class OceanDetailRemoteData { - - /** - * code : 0 - * data : {"lon":114.338597,"lat":18.273134,"date":"2021-10-21","hour":10,"list":[{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}]} - * message : success - * etime : 1634786517992 - */ - - private int code; - private DataBean data; - private String message; - private long etime; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public DataBean getData() { - return data; - } - - public void setData(DataBean data) { - this.data = data; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public long getEtime() { - return etime; - } - - public void setEtime(long etime) { - this.etime = etime; - } - - public static class DataBean { - /** - * lon : 114.338597 - * lat : 18.273134 - * date : 2021-10-21 - * hour : 10 - * list : [{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}] - */ - - private double lon; - private double lat; - private String date; - private int hour; - private List list; - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public int getHour() { - return hour; - } - - public void setHour(int hour) { - this.hour = hour; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * date : 2021-10-21 - * ytx : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - * meteo : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - */ - - private String date; - private YtxBean ytx; - private MeteoBean meteo; - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public YtxBean getYtx() { - return ytx; - } - - public void setYtx(YtxBean ytx) { - this.ytx = ytx; - } - - public MeteoBean getMeteo() { - return meteo; - } - - public void setMeteo(MeteoBean meteo) { - this.meteo = meteo; - } - - public static class YtxBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - - public static class MeteoBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java new file mode 100644 index 0000000..3a2e068 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java @@ -0,0 +1,374 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风数据模型 + * + * @author a203 + */ +public class TyphoonDetailModel { + + /** + * code : 200 + * data : {"centerLat":20.65,"centerLng":128.1,"endTime":"2021-10-11 8:00:00","engName":"Kompasu","isActive":"1","land":[],"name":"圆规","points":[{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}],"startTime":"2021-10-8 2:00:00","typhoonId":"202118","warnLevel":"white"} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * centerLat : 20.65 + * centerLng : 128.1 + * endTime : 2021-10-11 8:00:00 + * engName : Kompasu + * isActive : 1 + * land : [] + * name : 圆规 + * points : [{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}] + * startTime : 2021-10-8 2:00:00 + * typhoonId : 202118 + * warnLevel : white + */ + + private double centerLat; + private double centerLng; + private String endTime; + private String engName; + private String isActive; + private String name; + private String startTime; + private String typhoonId; + private String warnLevel; + private List land; + private List points; + + public double getCenterLat() { + return centerLat; + } + + public void setCenterLat(double centerLat) { + this.centerLat = centerLat; + } + + public double getCenterLng() { + return centerLng; + } + + public void setCenterLng(double centerLng) { + this.centerLng = centerLng; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public String getIsActive() { + return isActive; + } + + public void setIsActive(String isActive) { + this.isActive = isActive; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getWarnLevel() { + return warnLevel; + } + + public void setWarnLevel(String warnLevel) { + this.warnLevel = warnLevel; + } + + public List getLand() { + return land; + } + + public void setLand(List land) { + this.land = land; + } + + public static class LandBean { + private String landAddress; + private String type; + private Double lng; + private Double lat; + private String info; + private String landTime; + + public String getLandAddress() { + return landAddress; + } + + public void setLandAddress(String landAddress) { + this.landAddress = landAddress; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Double getLng() { + return lng; + } + + public void setLng(Double lng) { + this.lng = lng; + } + + public Double getLat() { + return lat; + } + + public void setLat(Double lat) { + this.lat = lat; + } + + public String getInfo() { + return info; + } + + public void setInfo(String info) { + this.info = info; + } + + public String getLandTime() { + return landTime; + } + + public void setLandTime(String landTime) { + this.landTime = landTime; + } + } + + public List getPoints() { + return points; + } + + public void setPoints(List points) { + this.points = points; + } + + public static class PointsBean { + /** + * centerPosition : 距离菲律宾马尼拉东北方向约600公里 + * centerPressure : 990 + * lat : 18.7 + * lng : 124.7 + * moveDirection : 西北西 + * moveSpeed : 25 + * power : 9 + * radius10 : + * radius12 : + * radius7 : 160|140|200|180 + * routePrediction : “圆规”将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分) + * speed : 23 + * time : 2021-10-11 8:00:00 + * typhoonType : 热带风暴 + */ + + private String centerPosition; + private String centerPressure; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private int power; + private String radius10; + private String radius12; + private String radius7; + private String routePrediction; + private String speed; + private String time; + private String typhoonType; + + public String getCenterPosition() { + return centerPosition; + } + + public void setCenterPosition(String centerPosition) { + this.centerPosition = centerPosition; + } + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius12() { + return radius12; + } + + public void setRadius12(String radius12) { + this.radius12 = radius12; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getRoutePrediction() { + return routePrediction; + } + + public void setRoutePrediction(String routePrediction) { + this.routePrediction = routePrediction; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java deleted file mode 100644 index 5b70924..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java +++ /dev/null @@ -1,419 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonDetailRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 6155596a0de376ce34c7b594 - * showapi_res_body : {"ret_code":0,"obj":{"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"}} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * obj : {"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"} - */ - - private int ret_code; - private ObjBean obj; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public ObjBean getObj() { - return obj; - } - - public void setObj(ObjBean obj) { - this.obj = obj; - } - - public static class ObjBean { - /** - * endtime : 2021-9-30 8:00:00 - * centerlng : 139.300000 - * starttime : 2021-9-23 20:00:00 - * tfid : 202116 - * isactive : 1 - * centerlat : 25.200000 - * name : 蒲公英 - * land : [{"landaddress":"朱家尖镇","strong":"强台风","lng":"122.39","lat":"29.83","info":"\u201c灿鸿\u201d11日16时40分前后登陆浙江舟山市朱家尖镇","landtime":"2015/7/11 16:40:00"}] - * warnlevel : white - * points : [{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}] - * enname : Mindulle - */ - - private String endtime; - private String centerlng; - private String starttime; - private String tfid; - private String isactive; - private String centerlat; - private String name; - private String warnlevel; - private String enname; - private List land; - private List points; - - public String getEndtime() { - return endtime; - } - - public void setEndtime(String endtime) { - this.endtime = endtime; - } - - public String getCenterlng() { - return centerlng; - } - - public void setCenterlng(String centerlng) { - this.centerlng = centerlng; - } - - public String getStarttime() { - return starttime; - } - - public void setStarttime(String starttime) { - this.starttime = starttime; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getIsactive() { - return isactive; - } - - public void setIsactive(String isactive) { - this.isactive = isactive; - } - - public String getCenterlat() { - return centerlat; - } - - public void setCenterlat(String centerlat) { - this.centerlat = centerlat; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getWarnlevel() { - return warnlevel; - } - - public void setWarnlevel(String warnlevel) { - this.warnlevel = warnlevel; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - - public List getLand() { - return land; - } - - public void setLand(List land) { - this.land = land; - } - - public static class LandBan { - /** - * landaddress : 朱家尖镇 - * strong : 强台风 - * lng : 122.39 - * lat : 29.83 - * info : “灿鸿”11日16时40分前后登陆浙江舟山市朱家尖镇 - * landtime : 2015/7/11 16:40:00 - */ - - private String landaddress; - private String strong; - private Double lng; - private Double lat; - private String info; - private String landtime; - - public String getLandaddress() { - return landaddress; - } - - public void setLandaddress(String landaddress) { - this.landaddress = landaddress; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getInfo() { - return info; - } - - public void setInfo(String info) { - this.info = info; - } - - public String getLandtime() { - return landtime; - } - - public void setLandtime(String landtime) { - this.landtime = landtime; - } - } - - public List getPoints() { - return points; - } - - public void setPoints(List points) { - this.points = points; - } - - public static class PointsBean { - /** - * time : 2021-9-23 20:00:00 - * pressure : 998 - * radius10 : - * speed : 18 - * strong : 热带风暴 - * movespeed : 20 - * radius12 : - * power : 8 - * lng : 143.30 - * movedirection : 西北西 - * lat : 13.80 - * radius7 : 250|220|200|180 - * jl : “蒲公英”将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分) - * ckposition : 距离日本东京南偏西方向约1060公里 - */ - - private String time; - private String pressure; - private String radius10; - private String speed; - private String strong; - private String movespeed; - private String radius12; - private String power; - private Double lng; - private String movedirection; - private Double lat; - private String radius7; - private String jl; - private String ckposition; - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getRadius12() { - return radius12; - } - - public void setRadius12(String radius12) { - this.radius12 = radius12; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getJl() { - return jl; - } - - public void setJl(String jl) { - this.jl = jl; - } - - public String getCkposition() { - return ckposition; - } - - public void setCkposition(String ckposition) { - this.ckposition = ckposition; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java new file mode 100644 index 0000000..91bad37 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java @@ -0,0 +1,201 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风列表数据模型 + * + * @author a203 + */ +public class TyphoonListModel { + + /** + * code : 200 + * data : [{"centerPressure":"990","engName":"Kompasu","lat":18.7,"lng":125,"moveDirection":"西北西","moveSpeed":"23","name":"圆规","power":9,"radius10":"","radius7":"200","speed":"23","time":"2021-10-11 05:00:00","typhoonId":"202118","typhoonType":"热带风暴"}] + * message : 请求成功 + * success : true + */ + + private int code; + private String message; + private boolean success; + private List data; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public static class DataBean { + /** + * centerPressure : 990 + * engName : Kompasu + * lat : 18.7 + * lng : 125 + * moveDirection : 西北西 + * moveSpeed : 23 + * name : 圆规 + * power : 9 + * radius10 : + * radius7 : 200 + * speed : 23 + * time : 2021-10-11 05:00:00 + * typhoonId : 202118 + * typhoonType : 热带风暴 + */ + + private String centerPressure; + private String engName; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private String name; + private int power; + private String radius10; + private String radius7; + private String speed; + private String time; + private String typhoonId; + private String typhoonType; + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java deleted file mode 100644 index 38a9257..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java +++ /dev/null @@ -1,237 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 61554fbe0de376d03494057c - * showapi_res_body : {"ret_code":0,"list":[{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}]} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * list : [{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}] - */ - - private int ret_code; - private List list; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * pressure : 945 - * tfid : 202116 - * radius10 : 150 - * speed : 48 - * lng : 136.40 - * radius7 : 350 - * time : 2021-09-30 08:00:00 - * movespeed : 23 - * strong : 强台风 - * name : 蒲公英 - * power : 15 - * movedirection : 北北东 - * lat : 26.60 - * enname : Mindulle - */ - - private String pressure; - private String tfid; - private String radius10; - private String speed; - private String lng; - private String radius7; - private String time; - private String movespeed; - private String strong; - private String name; - private String power; - private String movedirection; - private String lat; - private String enname; - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getLng() { - return lng; - } - - public void setLng(String lng) { - this.lng = lng; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public String getLat() { - return lat; - } - - public void setLat(String lat) { - this.lat = lat; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java new file mode 100644 index 0000000..c488237 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风移动点数据信息 服务类 + * + * @author a203 + */ +public interface ILandPointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java new file mode 100644 index 0000000..ab05570 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风登陆点数据信息 服务类 + * + * @author a203 + */ +public interface IRoutePointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java deleted file mode 100644 index d16a48b..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonLandService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java deleted file mode 100644 index 80e2765..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonPointService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java index c47a0f3..53bb971 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java @@ -19,13 +19,6 @@ void saveTyphoonList(); /** - * 更新台风详情 - */ - void updateTyphoonDetail(); - - /***上面接口从第三方存库,下面接口查库**********************/ - - /** * 查询台风列表 * * @return {@link List} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java new file mode 100644 index 0000000..fed33c1 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.LandPointMapper; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.service.ILandPointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class LandPointServiceImpl extends ServiceImpl implements ILandPointService { + + public LandPointServiceImpl() { + + } +} diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..8396364 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,31 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel.DataBean data) { + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java index a34da1b..0c5225d 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -1,8 +1,8 @@ package com.casic.missiles.modular.system.dto; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; import lombok.Data; import java.util.ArrayList; @@ -142,7 +142,7 @@ private String centerPosition; } - public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + public TyphoonDetailDTO(TyphoonDetail detail, List landPoints, List routePoints) { this.typhoonId = detail.getTyphoonId(); this.name = detail.getName(); this.engName = detail.getEngName(); @@ -152,8 +152,9 @@ this.startTime = detail.getStartTime(); this.endTime = detail.getEndTime(); this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); - for (TyphoonLand landBean : landBeans) { + for (LandPoint landBean : landPoints) { LandBan bean = new LandBan(); bean.landAddress = landBean.getLandAddress(); bean.landTime = landBean.getLandTime(); @@ -164,8 +165,9 @@ lands.add(bean); } this.land = lands; + List points = new ArrayList<>(); - for (TyphoonPoint point : pointBeans) { + for (RoutePoint point : routePoints) { PointBean pointBean = new PointBean(); pointBean.time = point.getTime(); pointBean.centerPressure = point.getCenterPressure(); diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java new file mode 100644 index 0000000..b0b2e7a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java @@ -0,0 +1,265 @@ +package com.casic.missiles.modular.system.dto.remote; + +/** + * 洋流数据模型 + * + * @author a203 + */ +public class OceanDetailModel { + + /** + * code : 200 + * data : {"altitude":0,"forecast":{"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34},"oceanDir":135.22,"pressure":100925.19,"speed":7.97,"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"temperature":28.6,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34,"windDir":71.84,"windSpeed":7.97} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * altitude : 0 + * forecast : {"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34} + * oceanDir : 135.22 + * pressure : 100925.19 + * speed : 7.97 + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * temperature : 28.6 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + * windDir : 71.84 + * windSpeed : 7.97 + */ + + private double altitude; + private ForecastBean forecast; + private double oceanDir; + private double pressure; + private double speed; + private double swellDir; + private double swellHeight; + private double swellPrd; + private double temperature; + private double waveDir; + private double waveHeight; + private double wavePrd; + private double windDir; + private double windSpeed; + + public double getAltitude() { + return altitude; + } + + public void setAltitude(double altitude) { + this.altitude = altitude; + } + + public ForecastBean getForecast() { + return forecast; + } + + public void setForecast(ForecastBean forecast) { + this.forecast = forecast; + } + + public double getOceanDir() { + return oceanDir; + } + + public void setOceanDir(double oceanDir) { + this.oceanDir = oceanDir; + } + + public double getPressure() { + return pressure; + } + + public void setPressure(double pressure) { + this.pressure = pressure; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getTemperature() { + return temperature; + } + + public void setTemperature(double temperature) { + this.temperature = temperature; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + + public double getWindDir() { + return windDir; + } + + public void setWindDir(double windDir) { + this.windDir = windDir; + } + + public double getWindSpeed() { + return windSpeed; + } + + public void setWindSpeed(double windSpeed) { + this.windSpeed = windSpeed; + } + + public static class ForecastBean { + /** + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + */ + + private double swellDir; + private double swellHeight; + private double swellPrd; + private double waveDir; + private double waveHeight; + private double wavePrd; + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java deleted file mode 100644 index 5ad3a22..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java +++ /dev/null @@ -1,439 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方洋流数据模型 - * - * @author a203 - */ -public class OceanDetailRemoteData { - - /** - * code : 0 - * data : {"lon":114.338597,"lat":18.273134,"date":"2021-10-21","hour":10,"list":[{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}]} - * message : success - * etime : 1634786517992 - */ - - private int code; - private DataBean data; - private String message; - private long etime; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public DataBean getData() { - return data; - } - - public void setData(DataBean data) { - this.data = data; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public long getEtime() { - return etime; - } - - public void setEtime(long etime) { - this.etime = etime; - } - - public static class DataBean { - /** - * lon : 114.338597 - * lat : 18.273134 - * date : 2021-10-21 - * hour : 10 - * list : [{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}] - */ - - private double lon; - private double lat; - private String date; - private int hour; - private List list; - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public int getHour() { - return hour; - } - - public void setHour(int hour) { - this.hour = hour; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * date : 2021-10-21 - * ytx : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - * meteo : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - */ - - private String date; - private YtxBean ytx; - private MeteoBean meteo; - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public YtxBean getYtx() { - return ytx; - } - - public void setYtx(YtxBean ytx) { - this.ytx = ytx; - } - - public MeteoBean getMeteo() { - return meteo; - } - - public void setMeteo(MeteoBean meteo) { - this.meteo = meteo; - } - - public static class YtxBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - - public static class MeteoBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java new file mode 100644 index 0000000..3a2e068 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java @@ -0,0 +1,374 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风数据模型 + * + * @author a203 + */ +public class TyphoonDetailModel { + + /** + * code : 200 + * data : {"centerLat":20.65,"centerLng":128.1,"endTime":"2021-10-11 8:00:00","engName":"Kompasu","isActive":"1","land":[],"name":"圆规","points":[{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}],"startTime":"2021-10-8 2:00:00","typhoonId":"202118","warnLevel":"white"} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * centerLat : 20.65 + * centerLng : 128.1 + * endTime : 2021-10-11 8:00:00 + * engName : Kompasu + * isActive : 1 + * land : [] + * name : 圆规 + * points : [{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}] + * startTime : 2021-10-8 2:00:00 + * typhoonId : 202118 + * warnLevel : white + */ + + private double centerLat; + private double centerLng; + private String endTime; + private String engName; + private String isActive; + private String name; + private String startTime; + private String typhoonId; + private String warnLevel; + private List land; + private List points; + + public double getCenterLat() { + return centerLat; + } + + public void setCenterLat(double centerLat) { + this.centerLat = centerLat; + } + + public double getCenterLng() { + return centerLng; + } + + public void setCenterLng(double centerLng) { + this.centerLng = centerLng; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public String getIsActive() { + return isActive; + } + + public void setIsActive(String isActive) { + this.isActive = isActive; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getWarnLevel() { + return warnLevel; + } + + public void setWarnLevel(String warnLevel) { + this.warnLevel = warnLevel; + } + + public List getLand() { + return land; + } + + public void setLand(List land) { + this.land = land; + } + + public static class LandBean { + private String landAddress; + private String type; + private Double lng; + private Double lat; + private String info; + private String landTime; + + public String getLandAddress() { + return landAddress; + } + + public void setLandAddress(String landAddress) { + this.landAddress = landAddress; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Double getLng() { + return lng; + } + + public void setLng(Double lng) { + this.lng = lng; + } + + public Double getLat() { + return lat; + } + + public void setLat(Double lat) { + this.lat = lat; + } + + public String getInfo() { + return info; + } + + public void setInfo(String info) { + this.info = info; + } + + public String getLandTime() { + return landTime; + } + + public void setLandTime(String landTime) { + this.landTime = landTime; + } + } + + public List getPoints() { + return points; + } + + public void setPoints(List points) { + this.points = points; + } + + public static class PointsBean { + /** + * centerPosition : 距离菲律宾马尼拉东北方向约600公里 + * centerPressure : 990 + * lat : 18.7 + * lng : 124.7 + * moveDirection : 西北西 + * moveSpeed : 25 + * power : 9 + * radius10 : + * radius12 : + * radius7 : 160|140|200|180 + * routePrediction : “圆规”将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分) + * speed : 23 + * time : 2021-10-11 8:00:00 + * typhoonType : 热带风暴 + */ + + private String centerPosition; + private String centerPressure; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private int power; + private String radius10; + private String radius12; + private String radius7; + private String routePrediction; + private String speed; + private String time; + private String typhoonType; + + public String getCenterPosition() { + return centerPosition; + } + + public void setCenterPosition(String centerPosition) { + this.centerPosition = centerPosition; + } + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius12() { + return radius12; + } + + public void setRadius12(String radius12) { + this.radius12 = radius12; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getRoutePrediction() { + return routePrediction; + } + + public void setRoutePrediction(String routePrediction) { + this.routePrediction = routePrediction; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java deleted file mode 100644 index 5b70924..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java +++ /dev/null @@ -1,419 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonDetailRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 6155596a0de376ce34c7b594 - * showapi_res_body : {"ret_code":0,"obj":{"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"}} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * obj : {"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"} - */ - - private int ret_code; - private ObjBean obj; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public ObjBean getObj() { - return obj; - } - - public void setObj(ObjBean obj) { - this.obj = obj; - } - - public static class ObjBean { - /** - * endtime : 2021-9-30 8:00:00 - * centerlng : 139.300000 - * starttime : 2021-9-23 20:00:00 - * tfid : 202116 - * isactive : 1 - * centerlat : 25.200000 - * name : 蒲公英 - * land : [{"landaddress":"朱家尖镇","strong":"强台风","lng":"122.39","lat":"29.83","info":"\u201c灿鸿\u201d11日16时40分前后登陆浙江舟山市朱家尖镇","landtime":"2015/7/11 16:40:00"}] - * warnlevel : white - * points : [{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}] - * enname : Mindulle - */ - - private String endtime; - private String centerlng; - private String starttime; - private String tfid; - private String isactive; - private String centerlat; - private String name; - private String warnlevel; - private String enname; - private List land; - private List points; - - public String getEndtime() { - return endtime; - } - - public void setEndtime(String endtime) { - this.endtime = endtime; - } - - public String getCenterlng() { - return centerlng; - } - - public void setCenterlng(String centerlng) { - this.centerlng = centerlng; - } - - public String getStarttime() { - return starttime; - } - - public void setStarttime(String starttime) { - this.starttime = starttime; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getIsactive() { - return isactive; - } - - public void setIsactive(String isactive) { - this.isactive = isactive; - } - - public String getCenterlat() { - return centerlat; - } - - public void setCenterlat(String centerlat) { - this.centerlat = centerlat; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getWarnlevel() { - return warnlevel; - } - - public void setWarnlevel(String warnlevel) { - this.warnlevel = warnlevel; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - - public List getLand() { - return land; - } - - public void setLand(List land) { - this.land = land; - } - - public static class LandBan { - /** - * landaddress : 朱家尖镇 - * strong : 强台风 - * lng : 122.39 - * lat : 29.83 - * info : “灿鸿”11日16时40分前后登陆浙江舟山市朱家尖镇 - * landtime : 2015/7/11 16:40:00 - */ - - private String landaddress; - private String strong; - private Double lng; - private Double lat; - private String info; - private String landtime; - - public String getLandaddress() { - return landaddress; - } - - public void setLandaddress(String landaddress) { - this.landaddress = landaddress; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getInfo() { - return info; - } - - public void setInfo(String info) { - this.info = info; - } - - public String getLandtime() { - return landtime; - } - - public void setLandtime(String landtime) { - this.landtime = landtime; - } - } - - public List getPoints() { - return points; - } - - public void setPoints(List points) { - this.points = points; - } - - public static class PointsBean { - /** - * time : 2021-9-23 20:00:00 - * pressure : 998 - * radius10 : - * speed : 18 - * strong : 热带风暴 - * movespeed : 20 - * radius12 : - * power : 8 - * lng : 143.30 - * movedirection : 西北西 - * lat : 13.80 - * radius7 : 250|220|200|180 - * jl : “蒲公英”将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分) - * ckposition : 距离日本东京南偏西方向约1060公里 - */ - - private String time; - private String pressure; - private String radius10; - private String speed; - private String strong; - private String movespeed; - private String radius12; - private String power; - private Double lng; - private String movedirection; - private Double lat; - private String radius7; - private String jl; - private String ckposition; - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getRadius12() { - return radius12; - } - - public void setRadius12(String radius12) { - this.radius12 = radius12; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getJl() { - return jl; - } - - public void setJl(String jl) { - this.jl = jl; - } - - public String getCkposition() { - return ckposition; - } - - public void setCkposition(String ckposition) { - this.ckposition = ckposition; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java new file mode 100644 index 0000000..91bad37 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java @@ -0,0 +1,201 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风列表数据模型 + * + * @author a203 + */ +public class TyphoonListModel { + + /** + * code : 200 + * data : [{"centerPressure":"990","engName":"Kompasu","lat":18.7,"lng":125,"moveDirection":"西北西","moveSpeed":"23","name":"圆规","power":9,"radius10":"","radius7":"200","speed":"23","time":"2021-10-11 05:00:00","typhoonId":"202118","typhoonType":"热带风暴"}] + * message : 请求成功 + * success : true + */ + + private int code; + private String message; + private boolean success; + private List data; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public static class DataBean { + /** + * centerPressure : 990 + * engName : Kompasu + * lat : 18.7 + * lng : 125 + * moveDirection : 西北西 + * moveSpeed : 23 + * name : 圆规 + * power : 9 + * radius10 : + * radius7 : 200 + * speed : 23 + * time : 2021-10-11 05:00:00 + * typhoonId : 202118 + * typhoonType : 热带风暴 + */ + + private String centerPressure; + private String engName; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private String name; + private int power; + private String radius10; + private String radius7; + private String speed; + private String time; + private String typhoonId; + private String typhoonType; + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java deleted file mode 100644 index 38a9257..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java +++ /dev/null @@ -1,237 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 61554fbe0de376d03494057c - * showapi_res_body : {"ret_code":0,"list":[{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}]} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * list : [{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}] - */ - - private int ret_code; - private List list; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * pressure : 945 - * tfid : 202116 - * radius10 : 150 - * speed : 48 - * lng : 136.40 - * radius7 : 350 - * time : 2021-09-30 08:00:00 - * movespeed : 23 - * strong : 强台风 - * name : 蒲公英 - * power : 15 - * movedirection : 北北东 - * lat : 26.60 - * enname : Mindulle - */ - - private String pressure; - private String tfid; - private String radius10; - private String speed; - private String lng; - private String radius7; - private String time; - private String movespeed; - private String strong; - private String name; - private String power; - private String movedirection; - private String lat; - private String enname; - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getLng() { - return lng; - } - - public void setLng(String lng) { - this.lng = lng; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public String getLat() { - return lat; - } - - public void setLat(String lat) { - this.lat = lat; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java new file mode 100644 index 0000000..c488237 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风移动点数据信息 服务类 + * + * @author a203 + */ +public interface ILandPointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java new file mode 100644 index 0000000..ab05570 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风登陆点数据信息 服务类 + * + * @author a203 + */ +public interface IRoutePointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java deleted file mode 100644 index d16a48b..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonLandService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java deleted file mode 100644 index 80e2765..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonPointService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java index c47a0f3..53bb971 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java @@ -19,13 +19,6 @@ void saveTyphoonList(); /** - * 更新台风详情 - */ - void updateTyphoonDetail(); - - /***上面接口从第三方存库,下面接口查库**********************/ - - /** * 查询台风列表 * * @return {@link List} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java new file mode 100644 index 0000000..fed33c1 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.LandPointMapper; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.service.ILandPointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class LandPointServiceImpl extends ServiceImpl implements ILandPointService { + + public LandPointServiceImpl() { + + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java index f8cb771..58fce60 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java @@ -2,9 +2,12 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; +import com.casic.missiles.modular.system.dto.AddressConfigDTO; import com.casic.missiles.modular.system.dto.OceanDetailDTO; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; +import com.casic.missiles.modular.system.service.IAddressConfigService; import com.casic.missiles.modular.system.service.IOceanService; +import com.casic.missiles.modular.system.utils.Constant; import com.casic.missiles.modular.system.utils.HttpRequestHelper; import org.springframework.stereotype.Service; @@ -17,23 +20,32 @@ @Service public class OceanServiceImpl implements IOceanService { - private static final String SUCCESS_CODE = "0"; + private final IAddressConfigService configService; - public OceanServiceImpl() { - + public OceanServiceImpl(IAddressConfigService configService) { + this.configService = configService; } @Override public OceanDetailDTO oceanDetail(double lng, double lat, String date, String days, String hour) { - String oceanData = HttpRequestHelper.obtainOceanData(lng, lat, date, days, hour); + AddressConfigDTO addressConfig = configService.selectLastConfig(); + String envIp = addressConfig.getEnvIp(); + if (envIp.contains(Constant.HTTP_HEADER)) { + envIp = envIp.replace(Constant.HTTP_HEADER, ""); + } + String url = Constant.HTTP_HEADER + envIp + "/environment/ocean?" + + "lng=" + lng + "&lat=" + lat + + "&date=" + date + "&days=" + days + "&hour=" + hour; + + String oceanData = HttpRequestHelper.doGet(url); /** * 解析洋流数据返回给前端 * */ OceanDetailDTO oceanDetailDTO = null; - if (SUCCESS_CODE.equals(HttpRequestHelper.getOceanCode(oceanData))) { - OceanDetailRemoteData remoteData = JSON.parseObject(oceanData, new TypeReference() { + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(oceanData)) { + OceanDetailModel remoteData = JSON.parseObject(oceanData, new TypeReference() { }); - oceanDetailDTO = new OceanDetailDTO(remoteData); + oceanDetailDTO = new OceanDetailDTO(remoteData.getData()); } return oceanDetailDTO; } diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..8396364 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,31 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel.DataBean data) { + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java index a34da1b..0c5225d 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -1,8 +1,8 @@ package com.casic.missiles.modular.system.dto; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; import lombok.Data; import java.util.ArrayList; @@ -142,7 +142,7 @@ private String centerPosition; } - public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + public TyphoonDetailDTO(TyphoonDetail detail, List landPoints, List routePoints) { this.typhoonId = detail.getTyphoonId(); this.name = detail.getName(); this.engName = detail.getEngName(); @@ -152,8 +152,9 @@ this.startTime = detail.getStartTime(); this.endTime = detail.getEndTime(); this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); - for (TyphoonLand landBean : landBeans) { + for (LandPoint landBean : landPoints) { LandBan bean = new LandBan(); bean.landAddress = landBean.getLandAddress(); bean.landTime = landBean.getLandTime(); @@ -164,8 +165,9 @@ lands.add(bean); } this.land = lands; + List points = new ArrayList<>(); - for (TyphoonPoint point : pointBeans) { + for (RoutePoint point : routePoints) { PointBean pointBean = new PointBean(); pointBean.time = point.getTime(); pointBean.centerPressure = point.getCenterPressure(); diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java new file mode 100644 index 0000000..b0b2e7a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java @@ -0,0 +1,265 @@ +package com.casic.missiles.modular.system.dto.remote; + +/** + * 洋流数据模型 + * + * @author a203 + */ +public class OceanDetailModel { + + /** + * code : 200 + * data : {"altitude":0,"forecast":{"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34},"oceanDir":135.22,"pressure":100925.19,"speed":7.97,"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"temperature":28.6,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34,"windDir":71.84,"windSpeed":7.97} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * altitude : 0 + * forecast : {"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34} + * oceanDir : 135.22 + * pressure : 100925.19 + * speed : 7.97 + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * temperature : 28.6 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + * windDir : 71.84 + * windSpeed : 7.97 + */ + + private double altitude; + private ForecastBean forecast; + private double oceanDir; + private double pressure; + private double speed; + private double swellDir; + private double swellHeight; + private double swellPrd; + private double temperature; + private double waveDir; + private double waveHeight; + private double wavePrd; + private double windDir; + private double windSpeed; + + public double getAltitude() { + return altitude; + } + + public void setAltitude(double altitude) { + this.altitude = altitude; + } + + public ForecastBean getForecast() { + return forecast; + } + + public void setForecast(ForecastBean forecast) { + this.forecast = forecast; + } + + public double getOceanDir() { + return oceanDir; + } + + public void setOceanDir(double oceanDir) { + this.oceanDir = oceanDir; + } + + public double getPressure() { + return pressure; + } + + public void setPressure(double pressure) { + this.pressure = pressure; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getTemperature() { + return temperature; + } + + public void setTemperature(double temperature) { + this.temperature = temperature; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + + public double getWindDir() { + return windDir; + } + + public void setWindDir(double windDir) { + this.windDir = windDir; + } + + public double getWindSpeed() { + return windSpeed; + } + + public void setWindSpeed(double windSpeed) { + this.windSpeed = windSpeed; + } + + public static class ForecastBean { + /** + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + */ + + private double swellDir; + private double swellHeight; + private double swellPrd; + private double waveDir; + private double waveHeight; + private double wavePrd; + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java deleted file mode 100644 index 5ad3a22..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java +++ /dev/null @@ -1,439 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方洋流数据模型 - * - * @author a203 - */ -public class OceanDetailRemoteData { - - /** - * code : 0 - * data : {"lon":114.338597,"lat":18.273134,"date":"2021-10-21","hour":10,"list":[{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}]} - * message : success - * etime : 1634786517992 - */ - - private int code; - private DataBean data; - private String message; - private long etime; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public DataBean getData() { - return data; - } - - public void setData(DataBean data) { - this.data = data; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public long getEtime() { - return etime; - } - - public void setEtime(long etime) { - this.etime = etime; - } - - public static class DataBean { - /** - * lon : 114.338597 - * lat : 18.273134 - * date : 2021-10-21 - * hour : 10 - * list : [{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}] - */ - - private double lon; - private double lat; - private String date; - private int hour; - private List list; - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public int getHour() { - return hour; - } - - public void setHour(int hour) { - this.hour = hour; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * date : 2021-10-21 - * ytx : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - * meteo : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - */ - - private String date; - private YtxBean ytx; - private MeteoBean meteo; - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public YtxBean getYtx() { - return ytx; - } - - public void setYtx(YtxBean ytx) { - this.ytx = ytx; - } - - public MeteoBean getMeteo() { - return meteo; - } - - public void setMeteo(MeteoBean meteo) { - this.meteo = meteo; - } - - public static class YtxBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - - public static class MeteoBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java new file mode 100644 index 0000000..3a2e068 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java @@ -0,0 +1,374 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风数据模型 + * + * @author a203 + */ +public class TyphoonDetailModel { + + /** + * code : 200 + * data : {"centerLat":20.65,"centerLng":128.1,"endTime":"2021-10-11 8:00:00","engName":"Kompasu","isActive":"1","land":[],"name":"圆规","points":[{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}],"startTime":"2021-10-8 2:00:00","typhoonId":"202118","warnLevel":"white"} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * centerLat : 20.65 + * centerLng : 128.1 + * endTime : 2021-10-11 8:00:00 + * engName : Kompasu + * isActive : 1 + * land : [] + * name : 圆规 + * points : [{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}] + * startTime : 2021-10-8 2:00:00 + * typhoonId : 202118 + * warnLevel : white + */ + + private double centerLat; + private double centerLng; + private String endTime; + private String engName; + private String isActive; + private String name; + private String startTime; + private String typhoonId; + private String warnLevel; + private List land; + private List points; + + public double getCenterLat() { + return centerLat; + } + + public void setCenterLat(double centerLat) { + this.centerLat = centerLat; + } + + public double getCenterLng() { + return centerLng; + } + + public void setCenterLng(double centerLng) { + this.centerLng = centerLng; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public String getIsActive() { + return isActive; + } + + public void setIsActive(String isActive) { + this.isActive = isActive; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getWarnLevel() { + return warnLevel; + } + + public void setWarnLevel(String warnLevel) { + this.warnLevel = warnLevel; + } + + public List getLand() { + return land; + } + + public void setLand(List land) { + this.land = land; + } + + public static class LandBean { + private String landAddress; + private String type; + private Double lng; + private Double lat; + private String info; + private String landTime; + + public String getLandAddress() { + return landAddress; + } + + public void setLandAddress(String landAddress) { + this.landAddress = landAddress; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Double getLng() { + return lng; + } + + public void setLng(Double lng) { + this.lng = lng; + } + + public Double getLat() { + return lat; + } + + public void setLat(Double lat) { + this.lat = lat; + } + + public String getInfo() { + return info; + } + + public void setInfo(String info) { + this.info = info; + } + + public String getLandTime() { + return landTime; + } + + public void setLandTime(String landTime) { + this.landTime = landTime; + } + } + + public List getPoints() { + return points; + } + + public void setPoints(List points) { + this.points = points; + } + + public static class PointsBean { + /** + * centerPosition : 距离菲律宾马尼拉东北方向约600公里 + * centerPressure : 990 + * lat : 18.7 + * lng : 124.7 + * moveDirection : 西北西 + * moveSpeed : 25 + * power : 9 + * radius10 : + * radius12 : + * radius7 : 160|140|200|180 + * routePrediction : “圆规”将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分) + * speed : 23 + * time : 2021-10-11 8:00:00 + * typhoonType : 热带风暴 + */ + + private String centerPosition; + private String centerPressure; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private int power; + private String radius10; + private String radius12; + private String radius7; + private String routePrediction; + private String speed; + private String time; + private String typhoonType; + + public String getCenterPosition() { + return centerPosition; + } + + public void setCenterPosition(String centerPosition) { + this.centerPosition = centerPosition; + } + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius12() { + return radius12; + } + + public void setRadius12(String radius12) { + this.radius12 = radius12; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getRoutePrediction() { + return routePrediction; + } + + public void setRoutePrediction(String routePrediction) { + this.routePrediction = routePrediction; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java deleted file mode 100644 index 5b70924..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java +++ /dev/null @@ -1,419 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonDetailRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 6155596a0de376ce34c7b594 - * showapi_res_body : {"ret_code":0,"obj":{"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"}} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * obj : {"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"} - */ - - private int ret_code; - private ObjBean obj; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public ObjBean getObj() { - return obj; - } - - public void setObj(ObjBean obj) { - this.obj = obj; - } - - public static class ObjBean { - /** - * endtime : 2021-9-30 8:00:00 - * centerlng : 139.300000 - * starttime : 2021-9-23 20:00:00 - * tfid : 202116 - * isactive : 1 - * centerlat : 25.200000 - * name : 蒲公英 - * land : [{"landaddress":"朱家尖镇","strong":"强台风","lng":"122.39","lat":"29.83","info":"\u201c灿鸿\u201d11日16时40分前后登陆浙江舟山市朱家尖镇","landtime":"2015/7/11 16:40:00"}] - * warnlevel : white - * points : [{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}] - * enname : Mindulle - */ - - private String endtime; - private String centerlng; - private String starttime; - private String tfid; - private String isactive; - private String centerlat; - private String name; - private String warnlevel; - private String enname; - private List land; - private List points; - - public String getEndtime() { - return endtime; - } - - public void setEndtime(String endtime) { - this.endtime = endtime; - } - - public String getCenterlng() { - return centerlng; - } - - public void setCenterlng(String centerlng) { - this.centerlng = centerlng; - } - - public String getStarttime() { - return starttime; - } - - public void setStarttime(String starttime) { - this.starttime = starttime; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getIsactive() { - return isactive; - } - - public void setIsactive(String isactive) { - this.isactive = isactive; - } - - public String getCenterlat() { - return centerlat; - } - - public void setCenterlat(String centerlat) { - this.centerlat = centerlat; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getWarnlevel() { - return warnlevel; - } - - public void setWarnlevel(String warnlevel) { - this.warnlevel = warnlevel; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - - public List getLand() { - return land; - } - - public void setLand(List land) { - this.land = land; - } - - public static class LandBan { - /** - * landaddress : 朱家尖镇 - * strong : 强台风 - * lng : 122.39 - * lat : 29.83 - * info : “灿鸿”11日16时40分前后登陆浙江舟山市朱家尖镇 - * landtime : 2015/7/11 16:40:00 - */ - - private String landaddress; - private String strong; - private Double lng; - private Double lat; - private String info; - private String landtime; - - public String getLandaddress() { - return landaddress; - } - - public void setLandaddress(String landaddress) { - this.landaddress = landaddress; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getInfo() { - return info; - } - - public void setInfo(String info) { - this.info = info; - } - - public String getLandtime() { - return landtime; - } - - public void setLandtime(String landtime) { - this.landtime = landtime; - } - } - - public List getPoints() { - return points; - } - - public void setPoints(List points) { - this.points = points; - } - - public static class PointsBean { - /** - * time : 2021-9-23 20:00:00 - * pressure : 998 - * radius10 : - * speed : 18 - * strong : 热带风暴 - * movespeed : 20 - * radius12 : - * power : 8 - * lng : 143.30 - * movedirection : 西北西 - * lat : 13.80 - * radius7 : 250|220|200|180 - * jl : “蒲公英”将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分) - * ckposition : 距离日本东京南偏西方向约1060公里 - */ - - private String time; - private String pressure; - private String radius10; - private String speed; - private String strong; - private String movespeed; - private String radius12; - private String power; - private Double lng; - private String movedirection; - private Double lat; - private String radius7; - private String jl; - private String ckposition; - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getRadius12() { - return radius12; - } - - public void setRadius12(String radius12) { - this.radius12 = radius12; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getJl() { - return jl; - } - - public void setJl(String jl) { - this.jl = jl; - } - - public String getCkposition() { - return ckposition; - } - - public void setCkposition(String ckposition) { - this.ckposition = ckposition; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java new file mode 100644 index 0000000..91bad37 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java @@ -0,0 +1,201 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风列表数据模型 + * + * @author a203 + */ +public class TyphoonListModel { + + /** + * code : 200 + * data : [{"centerPressure":"990","engName":"Kompasu","lat":18.7,"lng":125,"moveDirection":"西北西","moveSpeed":"23","name":"圆规","power":9,"radius10":"","radius7":"200","speed":"23","time":"2021-10-11 05:00:00","typhoonId":"202118","typhoonType":"热带风暴"}] + * message : 请求成功 + * success : true + */ + + private int code; + private String message; + private boolean success; + private List data; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public static class DataBean { + /** + * centerPressure : 990 + * engName : Kompasu + * lat : 18.7 + * lng : 125 + * moveDirection : 西北西 + * moveSpeed : 23 + * name : 圆规 + * power : 9 + * radius10 : + * radius7 : 200 + * speed : 23 + * time : 2021-10-11 05:00:00 + * typhoonId : 202118 + * typhoonType : 热带风暴 + */ + + private String centerPressure; + private String engName; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private String name; + private int power; + private String radius10; + private String radius7; + private String speed; + private String time; + private String typhoonId; + private String typhoonType; + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java deleted file mode 100644 index 38a9257..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java +++ /dev/null @@ -1,237 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 61554fbe0de376d03494057c - * showapi_res_body : {"ret_code":0,"list":[{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}]} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * list : [{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}] - */ - - private int ret_code; - private List list; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * pressure : 945 - * tfid : 202116 - * radius10 : 150 - * speed : 48 - * lng : 136.40 - * radius7 : 350 - * time : 2021-09-30 08:00:00 - * movespeed : 23 - * strong : 强台风 - * name : 蒲公英 - * power : 15 - * movedirection : 北北东 - * lat : 26.60 - * enname : Mindulle - */ - - private String pressure; - private String tfid; - private String radius10; - private String speed; - private String lng; - private String radius7; - private String time; - private String movespeed; - private String strong; - private String name; - private String power; - private String movedirection; - private String lat; - private String enname; - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getLng() { - return lng; - } - - public void setLng(String lng) { - this.lng = lng; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public String getLat() { - return lat; - } - - public void setLat(String lat) { - this.lat = lat; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java new file mode 100644 index 0000000..c488237 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风移动点数据信息 服务类 + * + * @author a203 + */ +public interface ILandPointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java new file mode 100644 index 0000000..ab05570 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风登陆点数据信息 服务类 + * + * @author a203 + */ +public interface IRoutePointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java deleted file mode 100644 index d16a48b..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonLandService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java deleted file mode 100644 index 80e2765..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonPointService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java index c47a0f3..53bb971 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java @@ -19,13 +19,6 @@ void saveTyphoonList(); /** - * 更新台风详情 - */ - void updateTyphoonDetail(); - - /***上面接口从第三方存库,下面接口查库**********************/ - - /** * 查询台风列表 * * @return {@link List} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java new file mode 100644 index 0000000..fed33c1 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.LandPointMapper; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.service.ILandPointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class LandPointServiceImpl extends ServiceImpl implements ILandPointService { + + public LandPointServiceImpl() { + + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java index f8cb771..58fce60 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java @@ -2,9 +2,12 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; +import com.casic.missiles.modular.system.dto.AddressConfigDTO; import com.casic.missiles.modular.system.dto.OceanDetailDTO; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; +import com.casic.missiles.modular.system.service.IAddressConfigService; import com.casic.missiles.modular.system.service.IOceanService; +import com.casic.missiles.modular.system.utils.Constant; import com.casic.missiles.modular.system.utils.HttpRequestHelper; import org.springframework.stereotype.Service; @@ -17,23 +20,32 @@ @Service public class OceanServiceImpl implements IOceanService { - private static final String SUCCESS_CODE = "0"; + private final IAddressConfigService configService; - public OceanServiceImpl() { - + public OceanServiceImpl(IAddressConfigService configService) { + this.configService = configService; } @Override public OceanDetailDTO oceanDetail(double lng, double lat, String date, String days, String hour) { - String oceanData = HttpRequestHelper.obtainOceanData(lng, lat, date, days, hour); + AddressConfigDTO addressConfig = configService.selectLastConfig(); + String envIp = addressConfig.getEnvIp(); + if (envIp.contains(Constant.HTTP_HEADER)) { + envIp = envIp.replace(Constant.HTTP_HEADER, ""); + } + String url = Constant.HTTP_HEADER + envIp + "/environment/ocean?" + + "lng=" + lng + "&lat=" + lat + + "&date=" + date + "&days=" + days + "&hour=" + hour; + + String oceanData = HttpRequestHelper.doGet(url); /** * 解析洋流数据返回给前端 * */ OceanDetailDTO oceanDetailDTO = null; - if (SUCCESS_CODE.equals(HttpRequestHelper.getOceanCode(oceanData))) { - OceanDetailRemoteData remoteData = JSON.parseObject(oceanData, new TypeReference() { + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(oceanData)) { + OceanDetailModel remoteData = JSON.parseObject(oceanData, new TypeReference() { }); - oceanDetailDTO = new OceanDetailDTO(remoteData); + oceanDetailDTO = new OceanDetailDTO(remoteData.getData()); } return oceanDetailDTO; } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java new file mode 100644 index 0000000..24b06cd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.RoutePointMapper; +import com.casic.missiles.modular.system.model.RoutePoint; +import com.casic.missiles.modular.system.service.IRoutePointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class RoutePointServiceImpl extends ServiceImpl implements IRoutePointService { + + public RoutePointServiceImpl() { + + } +} diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..8396364 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,31 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel.DataBean data) { + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java index a34da1b..0c5225d 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -1,8 +1,8 @@ package com.casic.missiles.modular.system.dto; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; import lombok.Data; import java.util.ArrayList; @@ -142,7 +142,7 @@ private String centerPosition; } - public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + public TyphoonDetailDTO(TyphoonDetail detail, List landPoints, List routePoints) { this.typhoonId = detail.getTyphoonId(); this.name = detail.getName(); this.engName = detail.getEngName(); @@ -152,8 +152,9 @@ this.startTime = detail.getStartTime(); this.endTime = detail.getEndTime(); this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); - for (TyphoonLand landBean : landBeans) { + for (LandPoint landBean : landPoints) { LandBan bean = new LandBan(); bean.landAddress = landBean.getLandAddress(); bean.landTime = landBean.getLandTime(); @@ -164,8 +165,9 @@ lands.add(bean); } this.land = lands; + List points = new ArrayList<>(); - for (TyphoonPoint point : pointBeans) { + for (RoutePoint point : routePoints) { PointBean pointBean = new PointBean(); pointBean.time = point.getTime(); pointBean.centerPressure = point.getCenterPressure(); diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java new file mode 100644 index 0000000..b0b2e7a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java @@ -0,0 +1,265 @@ +package com.casic.missiles.modular.system.dto.remote; + +/** + * 洋流数据模型 + * + * @author a203 + */ +public class OceanDetailModel { + + /** + * code : 200 + * data : {"altitude":0,"forecast":{"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34},"oceanDir":135.22,"pressure":100925.19,"speed":7.97,"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"temperature":28.6,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34,"windDir":71.84,"windSpeed":7.97} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * altitude : 0 + * forecast : {"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34} + * oceanDir : 135.22 + * pressure : 100925.19 + * speed : 7.97 + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * temperature : 28.6 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + * windDir : 71.84 + * windSpeed : 7.97 + */ + + private double altitude; + private ForecastBean forecast; + private double oceanDir; + private double pressure; + private double speed; + private double swellDir; + private double swellHeight; + private double swellPrd; + private double temperature; + private double waveDir; + private double waveHeight; + private double wavePrd; + private double windDir; + private double windSpeed; + + public double getAltitude() { + return altitude; + } + + public void setAltitude(double altitude) { + this.altitude = altitude; + } + + public ForecastBean getForecast() { + return forecast; + } + + public void setForecast(ForecastBean forecast) { + this.forecast = forecast; + } + + public double getOceanDir() { + return oceanDir; + } + + public void setOceanDir(double oceanDir) { + this.oceanDir = oceanDir; + } + + public double getPressure() { + return pressure; + } + + public void setPressure(double pressure) { + this.pressure = pressure; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getTemperature() { + return temperature; + } + + public void setTemperature(double temperature) { + this.temperature = temperature; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + + public double getWindDir() { + return windDir; + } + + public void setWindDir(double windDir) { + this.windDir = windDir; + } + + public double getWindSpeed() { + return windSpeed; + } + + public void setWindSpeed(double windSpeed) { + this.windSpeed = windSpeed; + } + + public static class ForecastBean { + /** + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + */ + + private double swellDir; + private double swellHeight; + private double swellPrd; + private double waveDir; + private double waveHeight; + private double wavePrd; + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java deleted file mode 100644 index 5ad3a22..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java +++ /dev/null @@ -1,439 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方洋流数据模型 - * - * @author a203 - */ -public class OceanDetailRemoteData { - - /** - * code : 0 - * data : {"lon":114.338597,"lat":18.273134,"date":"2021-10-21","hour":10,"list":[{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}]} - * message : success - * etime : 1634786517992 - */ - - private int code; - private DataBean data; - private String message; - private long etime; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public DataBean getData() { - return data; - } - - public void setData(DataBean data) { - this.data = data; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public long getEtime() { - return etime; - } - - public void setEtime(long etime) { - this.etime = etime; - } - - public static class DataBean { - /** - * lon : 114.338597 - * lat : 18.273134 - * date : 2021-10-21 - * hour : 10 - * list : [{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}] - */ - - private double lon; - private double lat; - private String date; - private int hour; - private List list; - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public int getHour() { - return hour; - } - - public void setHour(int hour) { - this.hour = hour; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * date : 2021-10-21 - * ytx : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - * meteo : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - */ - - private String date; - private YtxBean ytx; - private MeteoBean meteo; - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public YtxBean getYtx() { - return ytx; - } - - public void setYtx(YtxBean ytx) { - this.ytx = ytx; - } - - public MeteoBean getMeteo() { - return meteo; - } - - public void setMeteo(MeteoBean meteo) { - this.meteo = meteo; - } - - public static class YtxBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - - public static class MeteoBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java new file mode 100644 index 0000000..3a2e068 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java @@ -0,0 +1,374 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风数据模型 + * + * @author a203 + */ +public class TyphoonDetailModel { + + /** + * code : 200 + * data : {"centerLat":20.65,"centerLng":128.1,"endTime":"2021-10-11 8:00:00","engName":"Kompasu","isActive":"1","land":[],"name":"圆规","points":[{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}],"startTime":"2021-10-8 2:00:00","typhoonId":"202118","warnLevel":"white"} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * centerLat : 20.65 + * centerLng : 128.1 + * endTime : 2021-10-11 8:00:00 + * engName : Kompasu + * isActive : 1 + * land : [] + * name : 圆规 + * points : [{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}] + * startTime : 2021-10-8 2:00:00 + * typhoonId : 202118 + * warnLevel : white + */ + + private double centerLat; + private double centerLng; + private String endTime; + private String engName; + private String isActive; + private String name; + private String startTime; + private String typhoonId; + private String warnLevel; + private List land; + private List points; + + public double getCenterLat() { + return centerLat; + } + + public void setCenterLat(double centerLat) { + this.centerLat = centerLat; + } + + public double getCenterLng() { + return centerLng; + } + + public void setCenterLng(double centerLng) { + this.centerLng = centerLng; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public String getIsActive() { + return isActive; + } + + public void setIsActive(String isActive) { + this.isActive = isActive; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getWarnLevel() { + return warnLevel; + } + + public void setWarnLevel(String warnLevel) { + this.warnLevel = warnLevel; + } + + public List getLand() { + return land; + } + + public void setLand(List land) { + this.land = land; + } + + public static class LandBean { + private String landAddress; + private String type; + private Double lng; + private Double lat; + private String info; + private String landTime; + + public String getLandAddress() { + return landAddress; + } + + public void setLandAddress(String landAddress) { + this.landAddress = landAddress; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Double getLng() { + return lng; + } + + public void setLng(Double lng) { + this.lng = lng; + } + + public Double getLat() { + return lat; + } + + public void setLat(Double lat) { + this.lat = lat; + } + + public String getInfo() { + return info; + } + + public void setInfo(String info) { + this.info = info; + } + + public String getLandTime() { + return landTime; + } + + public void setLandTime(String landTime) { + this.landTime = landTime; + } + } + + public List getPoints() { + return points; + } + + public void setPoints(List points) { + this.points = points; + } + + public static class PointsBean { + /** + * centerPosition : 距离菲律宾马尼拉东北方向约600公里 + * centerPressure : 990 + * lat : 18.7 + * lng : 124.7 + * moveDirection : 西北西 + * moveSpeed : 25 + * power : 9 + * radius10 : + * radius12 : + * radius7 : 160|140|200|180 + * routePrediction : “圆规”将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分) + * speed : 23 + * time : 2021-10-11 8:00:00 + * typhoonType : 热带风暴 + */ + + private String centerPosition; + private String centerPressure; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private int power; + private String radius10; + private String radius12; + private String radius7; + private String routePrediction; + private String speed; + private String time; + private String typhoonType; + + public String getCenterPosition() { + return centerPosition; + } + + public void setCenterPosition(String centerPosition) { + this.centerPosition = centerPosition; + } + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius12() { + return radius12; + } + + public void setRadius12(String radius12) { + this.radius12 = radius12; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getRoutePrediction() { + return routePrediction; + } + + public void setRoutePrediction(String routePrediction) { + this.routePrediction = routePrediction; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java deleted file mode 100644 index 5b70924..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java +++ /dev/null @@ -1,419 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonDetailRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 6155596a0de376ce34c7b594 - * showapi_res_body : {"ret_code":0,"obj":{"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"}} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * obj : {"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"} - */ - - private int ret_code; - private ObjBean obj; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public ObjBean getObj() { - return obj; - } - - public void setObj(ObjBean obj) { - this.obj = obj; - } - - public static class ObjBean { - /** - * endtime : 2021-9-30 8:00:00 - * centerlng : 139.300000 - * starttime : 2021-9-23 20:00:00 - * tfid : 202116 - * isactive : 1 - * centerlat : 25.200000 - * name : 蒲公英 - * land : [{"landaddress":"朱家尖镇","strong":"强台风","lng":"122.39","lat":"29.83","info":"\u201c灿鸿\u201d11日16时40分前后登陆浙江舟山市朱家尖镇","landtime":"2015/7/11 16:40:00"}] - * warnlevel : white - * points : [{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}] - * enname : Mindulle - */ - - private String endtime; - private String centerlng; - private String starttime; - private String tfid; - private String isactive; - private String centerlat; - private String name; - private String warnlevel; - private String enname; - private List land; - private List points; - - public String getEndtime() { - return endtime; - } - - public void setEndtime(String endtime) { - this.endtime = endtime; - } - - public String getCenterlng() { - return centerlng; - } - - public void setCenterlng(String centerlng) { - this.centerlng = centerlng; - } - - public String getStarttime() { - return starttime; - } - - public void setStarttime(String starttime) { - this.starttime = starttime; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getIsactive() { - return isactive; - } - - public void setIsactive(String isactive) { - this.isactive = isactive; - } - - public String getCenterlat() { - return centerlat; - } - - public void setCenterlat(String centerlat) { - this.centerlat = centerlat; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getWarnlevel() { - return warnlevel; - } - - public void setWarnlevel(String warnlevel) { - this.warnlevel = warnlevel; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - - public List getLand() { - return land; - } - - public void setLand(List land) { - this.land = land; - } - - public static class LandBan { - /** - * landaddress : 朱家尖镇 - * strong : 强台风 - * lng : 122.39 - * lat : 29.83 - * info : “灿鸿”11日16时40分前后登陆浙江舟山市朱家尖镇 - * landtime : 2015/7/11 16:40:00 - */ - - private String landaddress; - private String strong; - private Double lng; - private Double lat; - private String info; - private String landtime; - - public String getLandaddress() { - return landaddress; - } - - public void setLandaddress(String landaddress) { - this.landaddress = landaddress; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getInfo() { - return info; - } - - public void setInfo(String info) { - this.info = info; - } - - public String getLandtime() { - return landtime; - } - - public void setLandtime(String landtime) { - this.landtime = landtime; - } - } - - public List getPoints() { - return points; - } - - public void setPoints(List points) { - this.points = points; - } - - public static class PointsBean { - /** - * time : 2021-9-23 20:00:00 - * pressure : 998 - * radius10 : - * speed : 18 - * strong : 热带风暴 - * movespeed : 20 - * radius12 : - * power : 8 - * lng : 143.30 - * movedirection : 西北西 - * lat : 13.80 - * radius7 : 250|220|200|180 - * jl : “蒲公英”将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分) - * ckposition : 距离日本东京南偏西方向约1060公里 - */ - - private String time; - private String pressure; - private String radius10; - private String speed; - private String strong; - private String movespeed; - private String radius12; - private String power; - private Double lng; - private String movedirection; - private Double lat; - private String radius7; - private String jl; - private String ckposition; - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getRadius12() { - return radius12; - } - - public void setRadius12(String radius12) { - this.radius12 = radius12; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getJl() { - return jl; - } - - public void setJl(String jl) { - this.jl = jl; - } - - public String getCkposition() { - return ckposition; - } - - public void setCkposition(String ckposition) { - this.ckposition = ckposition; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java new file mode 100644 index 0000000..91bad37 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java @@ -0,0 +1,201 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风列表数据模型 + * + * @author a203 + */ +public class TyphoonListModel { + + /** + * code : 200 + * data : [{"centerPressure":"990","engName":"Kompasu","lat":18.7,"lng":125,"moveDirection":"西北西","moveSpeed":"23","name":"圆规","power":9,"radius10":"","radius7":"200","speed":"23","time":"2021-10-11 05:00:00","typhoonId":"202118","typhoonType":"热带风暴"}] + * message : 请求成功 + * success : true + */ + + private int code; + private String message; + private boolean success; + private List data; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public static class DataBean { + /** + * centerPressure : 990 + * engName : Kompasu + * lat : 18.7 + * lng : 125 + * moveDirection : 西北西 + * moveSpeed : 23 + * name : 圆规 + * power : 9 + * radius10 : + * radius7 : 200 + * speed : 23 + * time : 2021-10-11 05:00:00 + * typhoonId : 202118 + * typhoonType : 热带风暴 + */ + + private String centerPressure; + private String engName; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private String name; + private int power; + private String radius10; + private String radius7; + private String speed; + private String time; + private String typhoonId; + private String typhoonType; + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java deleted file mode 100644 index 38a9257..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java +++ /dev/null @@ -1,237 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 61554fbe0de376d03494057c - * showapi_res_body : {"ret_code":0,"list":[{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}]} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * list : [{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}] - */ - - private int ret_code; - private List list; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * pressure : 945 - * tfid : 202116 - * radius10 : 150 - * speed : 48 - * lng : 136.40 - * radius7 : 350 - * time : 2021-09-30 08:00:00 - * movespeed : 23 - * strong : 强台风 - * name : 蒲公英 - * power : 15 - * movedirection : 北北东 - * lat : 26.60 - * enname : Mindulle - */ - - private String pressure; - private String tfid; - private String radius10; - private String speed; - private String lng; - private String radius7; - private String time; - private String movespeed; - private String strong; - private String name; - private String power; - private String movedirection; - private String lat; - private String enname; - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getLng() { - return lng; - } - - public void setLng(String lng) { - this.lng = lng; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public String getLat() { - return lat; - } - - public void setLat(String lat) { - this.lat = lat; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java new file mode 100644 index 0000000..c488237 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风移动点数据信息 服务类 + * + * @author a203 + */ +public interface ILandPointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java new file mode 100644 index 0000000..ab05570 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风登陆点数据信息 服务类 + * + * @author a203 + */ +public interface IRoutePointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java deleted file mode 100644 index d16a48b..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonLandService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java deleted file mode 100644 index 80e2765..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonPointService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java index c47a0f3..53bb971 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java @@ -19,13 +19,6 @@ void saveTyphoonList(); /** - * 更新台风详情 - */ - void updateTyphoonDetail(); - - /***上面接口从第三方存库,下面接口查库**********************/ - - /** * 查询台风列表 * * @return {@link List} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java new file mode 100644 index 0000000..fed33c1 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.LandPointMapper; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.service.ILandPointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class LandPointServiceImpl extends ServiceImpl implements ILandPointService { + + public LandPointServiceImpl() { + + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java index f8cb771..58fce60 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java @@ -2,9 +2,12 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; +import com.casic.missiles.modular.system.dto.AddressConfigDTO; import com.casic.missiles.modular.system.dto.OceanDetailDTO; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; +import com.casic.missiles.modular.system.service.IAddressConfigService; import com.casic.missiles.modular.system.service.IOceanService; +import com.casic.missiles.modular.system.utils.Constant; import com.casic.missiles.modular.system.utils.HttpRequestHelper; import org.springframework.stereotype.Service; @@ -17,23 +20,32 @@ @Service public class OceanServiceImpl implements IOceanService { - private static final String SUCCESS_CODE = "0"; + private final IAddressConfigService configService; - public OceanServiceImpl() { - + public OceanServiceImpl(IAddressConfigService configService) { + this.configService = configService; } @Override public OceanDetailDTO oceanDetail(double lng, double lat, String date, String days, String hour) { - String oceanData = HttpRequestHelper.obtainOceanData(lng, lat, date, days, hour); + AddressConfigDTO addressConfig = configService.selectLastConfig(); + String envIp = addressConfig.getEnvIp(); + if (envIp.contains(Constant.HTTP_HEADER)) { + envIp = envIp.replace(Constant.HTTP_HEADER, ""); + } + String url = Constant.HTTP_HEADER + envIp + "/environment/ocean?" + + "lng=" + lng + "&lat=" + lat + + "&date=" + date + "&days=" + days + "&hour=" + hour; + + String oceanData = HttpRequestHelper.doGet(url); /** * 解析洋流数据返回给前端 * */ OceanDetailDTO oceanDetailDTO = null; - if (SUCCESS_CODE.equals(HttpRequestHelper.getOceanCode(oceanData))) { - OceanDetailRemoteData remoteData = JSON.parseObject(oceanData, new TypeReference() { + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(oceanData)) { + OceanDetailModel remoteData = JSON.parseObject(oceanData, new TypeReference() { }); - oceanDetailDTO = new OceanDetailDTO(remoteData); + oceanDetailDTO = new OceanDetailDTO(remoteData.getData()); } return oceanDetailDTO; } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java new file mode 100644 index 0000000..24b06cd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.RoutePointMapper; +import com.casic.missiles.modular.system.model.RoutePoint; +import com.casic.missiles.modular.system.service.IRoutePointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class RoutePointServiceImpl extends ServiceImpl implements IRoutePointService { + + public RoutePointServiceImpl() { + + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java deleted file mode 100644 index d1bf2c7..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.casic.missiles.modular.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.casic.missiles.modular.system.dao.TyphoonLandMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.service.ITyphoonLandService; -import org.springframework.stereotype.Service; - -/** - * 台风数据信息 服务实现类 - * - * @author a203 - */ - -@Service -public class TyphoonLandServiceImpl extends ServiceImpl implements ITyphoonLandService { - - public TyphoonLandServiceImpl() { - - } -} diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..8396364 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,31 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel.DataBean data) { + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java index a34da1b..0c5225d 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -1,8 +1,8 @@ package com.casic.missiles.modular.system.dto; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; import lombok.Data; import java.util.ArrayList; @@ -142,7 +142,7 @@ private String centerPosition; } - public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + public TyphoonDetailDTO(TyphoonDetail detail, List landPoints, List routePoints) { this.typhoonId = detail.getTyphoonId(); this.name = detail.getName(); this.engName = detail.getEngName(); @@ -152,8 +152,9 @@ this.startTime = detail.getStartTime(); this.endTime = detail.getEndTime(); this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); - for (TyphoonLand landBean : landBeans) { + for (LandPoint landBean : landPoints) { LandBan bean = new LandBan(); bean.landAddress = landBean.getLandAddress(); bean.landTime = landBean.getLandTime(); @@ -164,8 +165,9 @@ lands.add(bean); } this.land = lands; + List points = new ArrayList<>(); - for (TyphoonPoint point : pointBeans) { + for (RoutePoint point : routePoints) { PointBean pointBean = new PointBean(); pointBean.time = point.getTime(); pointBean.centerPressure = point.getCenterPressure(); diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java new file mode 100644 index 0000000..b0b2e7a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java @@ -0,0 +1,265 @@ +package com.casic.missiles.modular.system.dto.remote; + +/** + * 洋流数据模型 + * + * @author a203 + */ +public class OceanDetailModel { + + /** + * code : 200 + * data : {"altitude":0,"forecast":{"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34},"oceanDir":135.22,"pressure":100925.19,"speed":7.97,"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"temperature":28.6,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34,"windDir":71.84,"windSpeed":7.97} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * altitude : 0 + * forecast : {"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34} + * oceanDir : 135.22 + * pressure : 100925.19 + * speed : 7.97 + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * temperature : 28.6 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + * windDir : 71.84 + * windSpeed : 7.97 + */ + + private double altitude; + private ForecastBean forecast; + private double oceanDir; + private double pressure; + private double speed; + private double swellDir; + private double swellHeight; + private double swellPrd; + private double temperature; + private double waveDir; + private double waveHeight; + private double wavePrd; + private double windDir; + private double windSpeed; + + public double getAltitude() { + return altitude; + } + + public void setAltitude(double altitude) { + this.altitude = altitude; + } + + public ForecastBean getForecast() { + return forecast; + } + + public void setForecast(ForecastBean forecast) { + this.forecast = forecast; + } + + public double getOceanDir() { + return oceanDir; + } + + public void setOceanDir(double oceanDir) { + this.oceanDir = oceanDir; + } + + public double getPressure() { + return pressure; + } + + public void setPressure(double pressure) { + this.pressure = pressure; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getTemperature() { + return temperature; + } + + public void setTemperature(double temperature) { + this.temperature = temperature; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + + public double getWindDir() { + return windDir; + } + + public void setWindDir(double windDir) { + this.windDir = windDir; + } + + public double getWindSpeed() { + return windSpeed; + } + + public void setWindSpeed(double windSpeed) { + this.windSpeed = windSpeed; + } + + public static class ForecastBean { + /** + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + */ + + private double swellDir; + private double swellHeight; + private double swellPrd; + private double waveDir; + private double waveHeight; + private double wavePrd; + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java deleted file mode 100644 index 5ad3a22..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java +++ /dev/null @@ -1,439 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方洋流数据模型 - * - * @author a203 - */ -public class OceanDetailRemoteData { - - /** - * code : 0 - * data : {"lon":114.338597,"lat":18.273134,"date":"2021-10-21","hour":10,"list":[{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}]} - * message : success - * etime : 1634786517992 - */ - - private int code; - private DataBean data; - private String message; - private long etime; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public DataBean getData() { - return data; - } - - public void setData(DataBean data) { - this.data = data; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public long getEtime() { - return etime; - } - - public void setEtime(long etime) { - this.etime = etime; - } - - public static class DataBean { - /** - * lon : 114.338597 - * lat : 18.273134 - * date : 2021-10-21 - * hour : 10 - * list : [{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}] - */ - - private double lon; - private double lat; - private String date; - private int hour; - private List list; - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public int getHour() { - return hour; - } - - public void setHour(int hour) { - this.hour = hour; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * date : 2021-10-21 - * ytx : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - * meteo : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - */ - - private String date; - private YtxBean ytx; - private MeteoBean meteo; - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public YtxBean getYtx() { - return ytx; - } - - public void setYtx(YtxBean ytx) { - this.ytx = ytx; - } - - public MeteoBean getMeteo() { - return meteo; - } - - public void setMeteo(MeteoBean meteo) { - this.meteo = meteo; - } - - public static class YtxBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - - public static class MeteoBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java new file mode 100644 index 0000000..3a2e068 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java @@ -0,0 +1,374 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风数据模型 + * + * @author a203 + */ +public class TyphoonDetailModel { + + /** + * code : 200 + * data : {"centerLat":20.65,"centerLng":128.1,"endTime":"2021-10-11 8:00:00","engName":"Kompasu","isActive":"1","land":[],"name":"圆规","points":[{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}],"startTime":"2021-10-8 2:00:00","typhoonId":"202118","warnLevel":"white"} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * centerLat : 20.65 + * centerLng : 128.1 + * endTime : 2021-10-11 8:00:00 + * engName : Kompasu + * isActive : 1 + * land : [] + * name : 圆规 + * points : [{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}] + * startTime : 2021-10-8 2:00:00 + * typhoonId : 202118 + * warnLevel : white + */ + + private double centerLat; + private double centerLng; + private String endTime; + private String engName; + private String isActive; + private String name; + private String startTime; + private String typhoonId; + private String warnLevel; + private List land; + private List points; + + public double getCenterLat() { + return centerLat; + } + + public void setCenterLat(double centerLat) { + this.centerLat = centerLat; + } + + public double getCenterLng() { + return centerLng; + } + + public void setCenterLng(double centerLng) { + this.centerLng = centerLng; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public String getIsActive() { + return isActive; + } + + public void setIsActive(String isActive) { + this.isActive = isActive; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getWarnLevel() { + return warnLevel; + } + + public void setWarnLevel(String warnLevel) { + this.warnLevel = warnLevel; + } + + public List getLand() { + return land; + } + + public void setLand(List land) { + this.land = land; + } + + public static class LandBean { + private String landAddress; + private String type; + private Double lng; + private Double lat; + private String info; + private String landTime; + + public String getLandAddress() { + return landAddress; + } + + public void setLandAddress(String landAddress) { + this.landAddress = landAddress; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Double getLng() { + return lng; + } + + public void setLng(Double lng) { + this.lng = lng; + } + + public Double getLat() { + return lat; + } + + public void setLat(Double lat) { + this.lat = lat; + } + + public String getInfo() { + return info; + } + + public void setInfo(String info) { + this.info = info; + } + + public String getLandTime() { + return landTime; + } + + public void setLandTime(String landTime) { + this.landTime = landTime; + } + } + + public List getPoints() { + return points; + } + + public void setPoints(List points) { + this.points = points; + } + + public static class PointsBean { + /** + * centerPosition : 距离菲律宾马尼拉东北方向约600公里 + * centerPressure : 990 + * lat : 18.7 + * lng : 124.7 + * moveDirection : 西北西 + * moveSpeed : 25 + * power : 9 + * radius10 : + * radius12 : + * radius7 : 160|140|200|180 + * routePrediction : “圆规”将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分) + * speed : 23 + * time : 2021-10-11 8:00:00 + * typhoonType : 热带风暴 + */ + + private String centerPosition; + private String centerPressure; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private int power; + private String radius10; + private String radius12; + private String radius7; + private String routePrediction; + private String speed; + private String time; + private String typhoonType; + + public String getCenterPosition() { + return centerPosition; + } + + public void setCenterPosition(String centerPosition) { + this.centerPosition = centerPosition; + } + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius12() { + return radius12; + } + + public void setRadius12(String radius12) { + this.radius12 = radius12; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getRoutePrediction() { + return routePrediction; + } + + public void setRoutePrediction(String routePrediction) { + this.routePrediction = routePrediction; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java deleted file mode 100644 index 5b70924..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java +++ /dev/null @@ -1,419 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonDetailRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 6155596a0de376ce34c7b594 - * showapi_res_body : {"ret_code":0,"obj":{"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"}} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * obj : {"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"} - */ - - private int ret_code; - private ObjBean obj; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public ObjBean getObj() { - return obj; - } - - public void setObj(ObjBean obj) { - this.obj = obj; - } - - public static class ObjBean { - /** - * endtime : 2021-9-30 8:00:00 - * centerlng : 139.300000 - * starttime : 2021-9-23 20:00:00 - * tfid : 202116 - * isactive : 1 - * centerlat : 25.200000 - * name : 蒲公英 - * land : [{"landaddress":"朱家尖镇","strong":"强台风","lng":"122.39","lat":"29.83","info":"\u201c灿鸿\u201d11日16时40分前后登陆浙江舟山市朱家尖镇","landtime":"2015/7/11 16:40:00"}] - * warnlevel : white - * points : [{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}] - * enname : Mindulle - */ - - private String endtime; - private String centerlng; - private String starttime; - private String tfid; - private String isactive; - private String centerlat; - private String name; - private String warnlevel; - private String enname; - private List land; - private List points; - - public String getEndtime() { - return endtime; - } - - public void setEndtime(String endtime) { - this.endtime = endtime; - } - - public String getCenterlng() { - return centerlng; - } - - public void setCenterlng(String centerlng) { - this.centerlng = centerlng; - } - - public String getStarttime() { - return starttime; - } - - public void setStarttime(String starttime) { - this.starttime = starttime; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getIsactive() { - return isactive; - } - - public void setIsactive(String isactive) { - this.isactive = isactive; - } - - public String getCenterlat() { - return centerlat; - } - - public void setCenterlat(String centerlat) { - this.centerlat = centerlat; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getWarnlevel() { - return warnlevel; - } - - public void setWarnlevel(String warnlevel) { - this.warnlevel = warnlevel; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - - public List getLand() { - return land; - } - - public void setLand(List land) { - this.land = land; - } - - public static class LandBan { - /** - * landaddress : 朱家尖镇 - * strong : 强台风 - * lng : 122.39 - * lat : 29.83 - * info : “灿鸿”11日16时40分前后登陆浙江舟山市朱家尖镇 - * landtime : 2015/7/11 16:40:00 - */ - - private String landaddress; - private String strong; - private Double lng; - private Double lat; - private String info; - private String landtime; - - public String getLandaddress() { - return landaddress; - } - - public void setLandaddress(String landaddress) { - this.landaddress = landaddress; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getInfo() { - return info; - } - - public void setInfo(String info) { - this.info = info; - } - - public String getLandtime() { - return landtime; - } - - public void setLandtime(String landtime) { - this.landtime = landtime; - } - } - - public List getPoints() { - return points; - } - - public void setPoints(List points) { - this.points = points; - } - - public static class PointsBean { - /** - * time : 2021-9-23 20:00:00 - * pressure : 998 - * radius10 : - * speed : 18 - * strong : 热带风暴 - * movespeed : 20 - * radius12 : - * power : 8 - * lng : 143.30 - * movedirection : 西北西 - * lat : 13.80 - * radius7 : 250|220|200|180 - * jl : “蒲公英”将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分) - * ckposition : 距离日本东京南偏西方向约1060公里 - */ - - private String time; - private String pressure; - private String radius10; - private String speed; - private String strong; - private String movespeed; - private String radius12; - private String power; - private Double lng; - private String movedirection; - private Double lat; - private String radius7; - private String jl; - private String ckposition; - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getRadius12() { - return radius12; - } - - public void setRadius12(String radius12) { - this.radius12 = radius12; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getJl() { - return jl; - } - - public void setJl(String jl) { - this.jl = jl; - } - - public String getCkposition() { - return ckposition; - } - - public void setCkposition(String ckposition) { - this.ckposition = ckposition; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java new file mode 100644 index 0000000..91bad37 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java @@ -0,0 +1,201 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风列表数据模型 + * + * @author a203 + */ +public class TyphoonListModel { + + /** + * code : 200 + * data : [{"centerPressure":"990","engName":"Kompasu","lat":18.7,"lng":125,"moveDirection":"西北西","moveSpeed":"23","name":"圆规","power":9,"radius10":"","radius7":"200","speed":"23","time":"2021-10-11 05:00:00","typhoonId":"202118","typhoonType":"热带风暴"}] + * message : 请求成功 + * success : true + */ + + private int code; + private String message; + private boolean success; + private List data; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public static class DataBean { + /** + * centerPressure : 990 + * engName : Kompasu + * lat : 18.7 + * lng : 125 + * moveDirection : 西北西 + * moveSpeed : 23 + * name : 圆规 + * power : 9 + * radius10 : + * radius7 : 200 + * speed : 23 + * time : 2021-10-11 05:00:00 + * typhoonId : 202118 + * typhoonType : 热带风暴 + */ + + private String centerPressure; + private String engName; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private String name; + private int power; + private String radius10; + private String radius7; + private String speed; + private String time; + private String typhoonId; + private String typhoonType; + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java deleted file mode 100644 index 38a9257..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java +++ /dev/null @@ -1,237 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 61554fbe0de376d03494057c - * showapi_res_body : {"ret_code":0,"list":[{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}]} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * list : [{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}] - */ - - private int ret_code; - private List list; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * pressure : 945 - * tfid : 202116 - * radius10 : 150 - * speed : 48 - * lng : 136.40 - * radius7 : 350 - * time : 2021-09-30 08:00:00 - * movespeed : 23 - * strong : 强台风 - * name : 蒲公英 - * power : 15 - * movedirection : 北北东 - * lat : 26.60 - * enname : Mindulle - */ - - private String pressure; - private String tfid; - private String radius10; - private String speed; - private String lng; - private String radius7; - private String time; - private String movespeed; - private String strong; - private String name; - private String power; - private String movedirection; - private String lat; - private String enname; - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getLng() { - return lng; - } - - public void setLng(String lng) { - this.lng = lng; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public String getLat() { - return lat; - } - - public void setLat(String lat) { - this.lat = lat; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java new file mode 100644 index 0000000..c488237 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风移动点数据信息 服务类 + * + * @author a203 + */ +public interface ILandPointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java new file mode 100644 index 0000000..ab05570 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风登陆点数据信息 服务类 + * + * @author a203 + */ +public interface IRoutePointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java deleted file mode 100644 index d16a48b..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonLandService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java deleted file mode 100644 index 80e2765..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonPointService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java index c47a0f3..53bb971 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java @@ -19,13 +19,6 @@ void saveTyphoonList(); /** - * 更新台风详情 - */ - void updateTyphoonDetail(); - - /***上面接口从第三方存库,下面接口查库**********************/ - - /** * 查询台风列表 * * @return {@link List} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java new file mode 100644 index 0000000..fed33c1 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.LandPointMapper; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.service.ILandPointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class LandPointServiceImpl extends ServiceImpl implements ILandPointService { + + public LandPointServiceImpl() { + + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java index f8cb771..58fce60 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java @@ -2,9 +2,12 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; +import com.casic.missiles.modular.system.dto.AddressConfigDTO; import com.casic.missiles.modular.system.dto.OceanDetailDTO; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; +import com.casic.missiles.modular.system.service.IAddressConfigService; import com.casic.missiles.modular.system.service.IOceanService; +import com.casic.missiles.modular.system.utils.Constant; import com.casic.missiles.modular.system.utils.HttpRequestHelper; import org.springframework.stereotype.Service; @@ -17,23 +20,32 @@ @Service public class OceanServiceImpl implements IOceanService { - private static final String SUCCESS_CODE = "0"; + private final IAddressConfigService configService; - public OceanServiceImpl() { - + public OceanServiceImpl(IAddressConfigService configService) { + this.configService = configService; } @Override public OceanDetailDTO oceanDetail(double lng, double lat, String date, String days, String hour) { - String oceanData = HttpRequestHelper.obtainOceanData(lng, lat, date, days, hour); + AddressConfigDTO addressConfig = configService.selectLastConfig(); + String envIp = addressConfig.getEnvIp(); + if (envIp.contains(Constant.HTTP_HEADER)) { + envIp = envIp.replace(Constant.HTTP_HEADER, ""); + } + String url = Constant.HTTP_HEADER + envIp + "/environment/ocean?" + + "lng=" + lng + "&lat=" + lat + + "&date=" + date + "&days=" + days + "&hour=" + hour; + + String oceanData = HttpRequestHelper.doGet(url); /** * 解析洋流数据返回给前端 * */ OceanDetailDTO oceanDetailDTO = null; - if (SUCCESS_CODE.equals(HttpRequestHelper.getOceanCode(oceanData))) { - OceanDetailRemoteData remoteData = JSON.parseObject(oceanData, new TypeReference() { + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(oceanData)) { + OceanDetailModel remoteData = JSON.parseObject(oceanData, new TypeReference() { }); - oceanDetailDTO = new OceanDetailDTO(remoteData); + oceanDetailDTO = new OceanDetailDTO(remoteData.getData()); } return oceanDetailDTO; } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java new file mode 100644 index 0000000..24b06cd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.RoutePointMapper; +import com.casic.missiles.modular.system.model.RoutePoint; +import com.casic.missiles.modular.system.service.IRoutePointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class RoutePointServiceImpl extends ServiceImpl implements IRoutePointService { + + public RoutePointServiceImpl() { + + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java deleted file mode 100644 index d1bf2c7..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.casic.missiles.modular.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.casic.missiles.modular.system.dao.TyphoonLandMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.service.ITyphoonLandService; -import org.springframework.stereotype.Service; - -/** - * 台风数据信息 服务实现类 - * - * @author a203 - */ - -@Service -public class TyphoonLandServiceImpl extends ServiceImpl implements ITyphoonLandService { - - public TyphoonLandServiceImpl() { - - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java deleted file mode 100644 index 36815fa..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.casic.missiles.modular.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.casic.missiles.modular.system.dao.TyphoonPointMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; -import com.casic.missiles.modular.system.service.ITyphoonPointService; -import org.springframework.stereotype.Service; - -/** - * 台风数据信息 服务实现类 - * - * @author a203 - */ - -@Service -public class TyphoonPointServiceImpl extends ServiceImpl implements ITyphoonPointService { - - public TyphoonPointServiceImpl() { - - } -} diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..8396364 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,31 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel.DataBean data) { + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java index a34da1b..0c5225d 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -1,8 +1,8 @@ package com.casic.missiles.modular.system.dto; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; import lombok.Data; import java.util.ArrayList; @@ -142,7 +142,7 @@ private String centerPosition; } - public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + public TyphoonDetailDTO(TyphoonDetail detail, List landPoints, List routePoints) { this.typhoonId = detail.getTyphoonId(); this.name = detail.getName(); this.engName = detail.getEngName(); @@ -152,8 +152,9 @@ this.startTime = detail.getStartTime(); this.endTime = detail.getEndTime(); this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); - for (TyphoonLand landBean : landBeans) { + for (LandPoint landBean : landPoints) { LandBan bean = new LandBan(); bean.landAddress = landBean.getLandAddress(); bean.landTime = landBean.getLandTime(); @@ -164,8 +165,9 @@ lands.add(bean); } this.land = lands; + List points = new ArrayList<>(); - for (TyphoonPoint point : pointBeans) { + for (RoutePoint point : routePoints) { PointBean pointBean = new PointBean(); pointBean.time = point.getTime(); pointBean.centerPressure = point.getCenterPressure(); diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java new file mode 100644 index 0000000..b0b2e7a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java @@ -0,0 +1,265 @@ +package com.casic.missiles.modular.system.dto.remote; + +/** + * 洋流数据模型 + * + * @author a203 + */ +public class OceanDetailModel { + + /** + * code : 200 + * data : {"altitude":0,"forecast":{"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34},"oceanDir":135.22,"pressure":100925.19,"speed":7.97,"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"temperature":28.6,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34,"windDir":71.84,"windSpeed":7.97} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * altitude : 0 + * forecast : {"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34} + * oceanDir : 135.22 + * pressure : 100925.19 + * speed : 7.97 + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * temperature : 28.6 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + * windDir : 71.84 + * windSpeed : 7.97 + */ + + private double altitude; + private ForecastBean forecast; + private double oceanDir; + private double pressure; + private double speed; + private double swellDir; + private double swellHeight; + private double swellPrd; + private double temperature; + private double waveDir; + private double waveHeight; + private double wavePrd; + private double windDir; + private double windSpeed; + + public double getAltitude() { + return altitude; + } + + public void setAltitude(double altitude) { + this.altitude = altitude; + } + + public ForecastBean getForecast() { + return forecast; + } + + public void setForecast(ForecastBean forecast) { + this.forecast = forecast; + } + + public double getOceanDir() { + return oceanDir; + } + + public void setOceanDir(double oceanDir) { + this.oceanDir = oceanDir; + } + + public double getPressure() { + return pressure; + } + + public void setPressure(double pressure) { + this.pressure = pressure; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getTemperature() { + return temperature; + } + + public void setTemperature(double temperature) { + this.temperature = temperature; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + + public double getWindDir() { + return windDir; + } + + public void setWindDir(double windDir) { + this.windDir = windDir; + } + + public double getWindSpeed() { + return windSpeed; + } + + public void setWindSpeed(double windSpeed) { + this.windSpeed = windSpeed; + } + + public static class ForecastBean { + /** + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + */ + + private double swellDir; + private double swellHeight; + private double swellPrd; + private double waveDir; + private double waveHeight; + private double wavePrd; + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java deleted file mode 100644 index 5ad3a22..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java +++ /dev/null @@ -1,439 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方洋流数据模型 - * - * @author a203 - */ -public class OceanDetailRemoteData { - - /** - * code : 0 - * data : {"lon":114.338597,"lat":18.273134,"date":"2021-10-21","hour":10,"list":[{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}]} - * message : success - * etime : 1634786517992 - */ - - private int code; - private DataBean data; - private String message; - private long etime; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public DataBean getData() { - return data; - } - - public void setData(DataBean data) { - this.data = data; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public long getEtime() { - return etime; - } - - public void setEtime(long etime) { - this.etime = etime; - } - - public static class DataBean { - /** - * lon : 114.338597 - * lat : 18.273134 - * date : 2021-10-21 - * hour : 10 - * list : [{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}] - */ - - private double lon; - private double lat; - private String date; - private int hour; - private List list; - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public int getHour() { - return hour; - } - - public void setHour(int hour) { - this.hour = hour; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * date : 2021-10-21 - * ytx : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - * meteo : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - */ - - private String date; - private YtxBean ytx; - private MeteoBean meteo; - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public YtxBean getYtx() { - return ytx; - } - - public void setYtx(YtxBean ytx) { - this.ytx = ytx; - } - - public MeteoBean getMeteo() { - return meteo; - } - - public void setMeteo(MeteoBean meteo) { - this.meteo = meteo; - } - - public static class YtxBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - - public static class MeteoBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java new file mode 100644 index 0000000..3a2e068 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java @@ -0,0 +1,374 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风数据模型 + * + * @author a203 + */ +public class TyphoonDetailModel { + + /** + * code : 200 + * data : {"centerLat":20.65,"centerLng":128.1,"endTime":"2021-10-11 8:00:00","engName":"Kompasu","isActive":"1","land":[],"name":"圆规","points":[{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}],"startTime":"2021-10-8 2:00:00","typhoonId":"202118","warnLevel":"white"} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * centerLat : 20.65 + * centerLng : 128.1 + * endTime : 2021-10-11 8:00:00 + * engName : Kompasu + * isActive : 1 + * land : [] + * name : 圆规 + * points : [{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}] + * startTime : 2021-10-8 2:00:00 + * typhoonId : 202118 + * warnLevel : white + */ + + private double centerLat; + private double centerLng; + private String endTime; + private String engName; + private String isActive; + private String name; + private String startTime; + private String typhoonId; + private String warnLevel; + private List land; + private List points; + + public double getCenterLat() { + return centerLat; + } + + public void setCenterLat(double centerLat) { + this.centerLat = centerLat; + } + + public double getCenterLng() { + return centerLng; + } + + public void setCenterLng(double centerLng) { + this.centerLng = centerLng; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public String getIsActive() { + return isActive; + } + + public void setIsActive(String isActive) { + this.isActive = isActive; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getWarnLevel() { + return warnLevel; + } + + public void setWarnLevel(String warnLevel) { + this.warnLevel = warnLevel; + } + + public List getLand() { + return land; + } + + public void setLand(List land) { + this.land = land; + } + + public static class LandBean { + private String landAddress; + private String type; + private Double lng; + private Double lat; + private String info; + private String landTime; + + public String getLandAddress() { + return landAddress; + } + + public void setLandAddress(String landAddress) { + this.landAddress = landAddress; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Double getLng() { + return lng; + } + + public void setLng(Double lng) { + this.lng = lng; + } + + public Double getLat() { + return lat; + } + + public void setLat(Double lat) { + this.lat = lat; + } + + public String getInfo() { + return info; + } + + public void setInfo(String info) { + this.info = info; + } + + public String getLandTime() { + return landTime; + } + + public void setLandTime(String landTime) { + this.landTime = landTime; + } + } + + public List getPoints() { + return points; + } + + public void setPoints(List points) { + this.points = points; + } + + public static class PointsBean { + /** + * centerPosition : 距离菲律宾马尼拉东北方向约600公里 + * centerPressure : 990 + * lat : 18.7 + * lng : 124.7 + * moveDirection : 西北西 + * moveSpeed : 25 + * power : 9 + * radius10 : + * radius12 : + * radius7 : 160|140|200|180 + * routePrediction : “圆规”将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分) + * speed : 23 + * time : 2021-10-11 8:00:00 + * typhoonType : 热带风暴 + */ + + private String centerPosition; + private String centerPressure; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private int power; + private String radius10; + private String radius12; + private String radius7; + private String routePrediction; + private String speed; + private String time; + private String typhoonType; + + public String getCenterPosition() { + return centerPosition; + } + + public void setCenterPosition(String centerPosition) { + this.centerPosition = centerPosition; + } + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius12() { + return radius12; + } + + public void setRadius12(String radius12) { + this.radius12 = radius12; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getRoutePrediction() { + return routePrediction; + } + + public void setRoutePrediction(String routePrediction) { + this.routePrediction = routePrediction; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java deleted file mode 100644 index 5b70924..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java +++ /dev/null @@ -1,419 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonDetailRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 6155596a0de376ce34c7b594 - * showapi_res_body : {"ret_code":0,"obj":{"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"}} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * obj : {"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"} - */ - - private int ret_code; - private ObjBean obj; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public ObjBean getObj() { - return obj; - } - - public void setObj(ObjBean obj) { - this.obj = obj; - } - - public static class ObjBean { - /** - * endtime : 2021-9-30 8:00:00 - * centerlng : 139.300000 - * starttime : 2021-9-23 20:00:00 - * tfid : 202116 - * isactive : 1 - * centerlat : 25.200000 - * name : 蒲公英 - * land : [{"landaddress":"朱家尖镇","strong":"强台风","lng":"122.39","lat":"29.83","info":"\u201c灿鸿\u201d11日16时40分前后登陆浙江舟山市朱家尖镇","landtime":"2015/7/11 16:40:00"}] - * warnlevel : white - * points : [{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}] - * enname : Mindulle - */ - - private String endtime; - private String centerlng; - private String starttime; - private String tfid; - private String isactive; - private String centerlat; - private String name; - private String warnlevel; - private String enname; - private List land; - private List points; - - public String getEndtime() { - return endtime; - } - - public void setEndtime(String endtime) { - this.endtime = endtime; - } - - public String getCenterlng() { - return centerlng; - } - - public void setCenterlng(String centerlng) { - this.centerlng = centerlng; - } - - public String getStarttime() { - return starttime; - } - - public void setStarttime(String starttime) { - this.starttime = starttime; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getIsactive() { - return isactive; - } - - public void setIsactive(String isactive) { - this.isactive = isactive; - } - - public String getCenterlat() { - return centerlat; - } - - public void setCenterlat(String centerlat) { - this.centerlat = centerlat; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getWarnlevel() { - return warnlevel; - } - - public void setWarnlevel(String warnlevel) { - this.warnlevel = warnlevel; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - - public List getLand() { - return land; - } - - public void setLand(List land) { - this.land = land; - } - - public static class LandBan { - /** - * landaddress : 朱家尖镇 - * strong : 强台风 - * lng : 122.39 - * lat : 29.83 - * info : “灿鸿”11日16时40分前后登陆浙江舟山市朱家尖镇 - * landtime : 2015/7/11 16:40:00 - */ - - private String landaddress; - private String strong; - private Double lng; - private Double lat; - private String info; - private String landtime; - - public String getLandaddress() { - return landaddress; - } - - public void setLandaddress(String landaddress) { - this.landaddress = landaddress; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getInfo() { - return info; - } - - public void setInfo(String info) { - this.info = info; - } - - public String getLandtime() { - return landtime; - } - - public void setLandtime(String landtime) { - this.landtime = landtime; - } - } - - public List getPoints() { - return points; - } - - public void setPoints(List points) { - this.points = points; - } - - public static class PointsBean { - /** - * time : 2021-9-23 20:00:00 - * pressure : 998 - * radius10 : - * speed : 18 - * strong : 热带风暴 - * movespeed : 20 - * radius12 : - * power : 8 - * lng : 143.30 - * movedirection : 西北西 - * lat : 13.80 - * radius7 : 250|220|200|180 - * jl : “蒲公英”将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分) - * ckposition : 距离日本东京南偏西方向约1060公里 - */ - - private String time; - private String pressure; - private String radius10; - private String speed; - private String strong; - private String movespeed; - private String radius12; - private String power; - private Double lng; - private String movedirection; - private Double lat; - private String radius7; - private String jl; - private String ckposition; - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getRadius12() { - return radius12; - } - - public void setRadius12(String radius12) { - this.radius12 = radius12; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getJl() { - return jl; - } - - public void setJl(String jl) { - this.jl = jl; - } - - public String getCkposition() { - return ckposition; - } - - public void setCkposition(String ckposition) { - this.ckposition = ckposition; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java new file mode 100644 index 0000000..91bad37 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java @@ -0,0 +1,201 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风列表数据模型 + * + * @author a203 + */ +public class TyphoonListModel { + + /** + * code : 200 + * data : [{"centerPressure":"990","engName":"Kompasu","lat":18.7,"lng":125,"moveDirection":"西北西","moveSpeed":"23","name":"圆规","power":9,"radius10":"","radius7":"200","speed":"23","time":"2021-10-11 05:00:00","typhoonId":"202118","typhoonType":"热带风暴"}] + * message : 请求成功 + * success : true + */ + + private int code; + private String message; + private boolean success; + private List data; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public static class DataBean { + /** + * centerPressure : 990 + * engName : Kompasu + * lat : 18.7 + * lng : 125 + * moveDirection : 西北西 + * moveSpeed : 23 + * name : 圆规 + * power : 9 + * radius10 : + * radius7 : 200 + * speed : 23 + * time : 2021-10-11 05:00:00 + * typhoonId : 202118 + * typhoonType : 热带风暴 + */ + + private String centerPressure; + private String engName; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private String name; + private int power; + private String radius10; + private String radius7; + private String speed; + private String time; + private String typhoonId; + private String typhoonType; + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java deleted file mode 100644 index 38a9257..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java +++ /dev/null @@ -1,237 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 61554fbe0de376d03494057c - * showapi_res_body : {"ret_code":0,"list":[{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}]} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * list : [{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}] - */ - - private int ret_code; - private List list; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * pressure : 945 - * tfid : 202116 - * radius10 : 150 - * speed : 48 - * lng : 136.40 - * radius7 : 350 - * time : 2021-09-30 08:00:00 - * movespeed : 23 - * strong : 强台风 - * name : 蒲公英 - * power : 15 - * movedirection : 北北东 - * lat : 26.60 - * enname : Mindulle - */ - - private String pressure; - private String tfid; - private String radius10; - private String speed; - private String lng; - private String radius7; - private String time; - private String movespeed; - private String strong; - private String name; - private String power; - private String movedirection; - private String lat; - private String enname; - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getLng() { - return lng; - } - - public void setLng(String lng) { - this.lng = lng; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public String getLat() { - return lat; - } - - public void setLat(String lat) { - this.lat = lat; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java new file mode 100644 index 0000000..c488237 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风移动点数据信息 服务类 + * + * @author a203 + */ +public interface ILandPointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java new file mode 100644 index 0000000..ab05570 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风登陆点数据信息 服务类 + * + * @author a203 + */ +public interface IRoutePointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java deleted file mode 100644 index d16a48b..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonLandService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java deleted file mode 100644 index 80e2765..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonPointService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java index c47a0f3..53bb971 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java @@ -19,13 +19,6 @@ void saveTyphoonList(); /** - * 更新台风详情 - */ - void updateTyphoonDetail(); - - /***上面接口从第三方存库,下面接口查库**********************/ - - /** * 查询台风列表 * * @return {@link List} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java new file mode 100644 index 0000000..fed33c1 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.LandPointMapper; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.service.ILandPointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class LandPointServiceImpl extends ServiceImpl implements ILandPointService { + + public LandPointServiceImpl() { + + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java index f8cb771..58fce60 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java @@ -2,9 +2,12 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; +import com.casic.missiles.modular.system.dto.AddressConfigDTO; import com.casic.missiles.modular.system.dto.OceanDetailDTO; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; +import com.casic.missiles.modular.system.service.IAddressConfigService; import com.casic.missiles.modular.system.service.IOceanService; +import com.casic.missiles.modular.system.utils.Constant; import com.casic.missiles.modular.system.utils.HttpRequestHelper; import org.springframework.stereotype.Service; @@ -17,23 +20,32 @@ @Service public class OceanServiceImpl implements IOceanService { - private static final String SUCCESS_CODE = "0"; + private final IAddressConfigService configService; - public OceanServiceImpl() { - + public OceanServiceImpl(IAddressConfigService configService) { + this.configService = configService; } @Override public OceanDetailDTO oceanDetail(double lng, double lat, String date, String days, String hour) { - String oceanData = HttpRequestHelper.obtainOceanData(lng, lat, date, days, hour); + AddressConfigDTO addressConfig = configService.selectLastConfig(); + String envIp = addressConfig.getEnvIp(); + if (envIp.contains(Constant.HTTP_HEADER)) { + envIp = envIp.replace(Constant.HTTP_HEADER, ""); + } + String url = Constant.HTTP_HEADER + envIp + "/environment/ocean?" + + "lng=" + lng + "&lat=" + lat + + "&date=" + date + "&days=" + days + "&hour=" + hour; + + String oceanData = HttpRequestHelper.doGet(url); /** * 解析洋流数据返回给前端 * */ OceanDetailDTO oceanDetailDTO = null; - if (SUCCESS_CODE.equals(HttpRequestHelper.getOceanCode(oceanData))) { - OceanDetailRemoteData remoteData = JSON.parseObject(oceanData, new TypeReference() { + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(oceanData)) { + OceanDetailModel remoteData = JSON.parseObject(oceanData, new TypeReference() { }); - oceanDetailDTO = new OceanDetailDTO(remoteData); + oceanDetailDTO = new OceanDetailDTO(remoteData.getData()); } return oceanDetailDTO; } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java new file mode 100644 index 0000000..24b06cd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.RoutePointMapper; +import com.casic.missiles.modular.system.model.RoutePoint; +import com.casic.missiles.modular.system.service.IRoutePointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class RoutePointServiceImpl extends ServiceImpl implements IRoutePointService { + + public RoutePointServiceImpl() { + + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java deleted file mode 100644 index d1bf2c7..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.casic.missiles.modular.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.casic.missiles.modular.system.dao.TyphoonLandMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.service.ITyphoonLandService; -import org.springframework.stereotype.Service; - -/** - * 台风数据信息 服务实现类 - * - * @author a203 - */ - -@Service -public class TyphoonLandServiceImpl extends ServiceImpl implements ITyphoonLandService { - - public TyphoonLandServiceImpl() { - - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java deleted file mode 100644 index 36815fa..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.casic.missiles.modular.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.casic.missiles.modular.system.dao.TyphoonPointMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; -import com.casic.missiles.modular.system.service.ITyphoonPointService; -import org.springframework.stereotype.Service; - -/** - * 台风数据信息 服务实现类 - * - * @author a203 - */ - -@Service -public class TyphoonPointServiceImpl extends ServiceImpl implements ITyphoonPointService { - - public TyphoonPointServiceImpl() { - - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java index 861e2c1..1cbfb01 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java @@ -5,18 +5,16 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.casic.missiles.modular.system.dao.TyphoonMapper; +import com.casic.missiles.modular.system.dto.AddressConfigDTO; import com.casic.missiles.modular.system.dto.TyphoonDTO; import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; -import com.casic.missiles.modular.system.dto.remote.TyphoonDetailRemoteData; -import com.casic.missiles.modular.system.dto.remote.TyphoonRemoteData; +import com.casic.missiles.modular.system.dto.remote.TyphoonDetailModel; +import com.casic.missiles.modular.system.dto.remote.TyphoonListModel; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.Typhoon; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; -import com.casic.missiles.modular.system.service.ITyphoonDetailService; -import com.casic.missiles.modular.system.service.ITyphoonLandService; -import com.casic.missiles.modular.system.service.ITyphoonPointService; -import com.casic.missiles.modular.system.service.ITyphoonService; +import com.casic.missiles.modular.system.service.*; import com.casic.missiles.modular.system.utils.Constant; import com.casic.missiles.modular.system.utils.HttpRequestHelper; import org.springframework.stereotype.Service; @@ -33,17 +31,29 @@ @Service public class TyphoonServiceImpl extends ServiceImpl implements ITyphoonService { - private static final String SUCCESS_CODE = "0"; + private final IAddressConfigService configService; + private final ITyphoonDetailService detailService; + private final ILandPointService landPointService; + private final IRoutePointService routePointService; - private final ITyphoonDetailService typhoonDetailService; - private final ITyphoonLandService typhoonLandService; - private final ITyphoonPointService typhoonPointService; + public TyphoonServiceImpl(IAddressConfigService configService, + ITyphoonDetailService detailService, + ILandPointService landPointService, + IRoutePointService routePointService) { + this.configService = configService; + this.detailService = detailService; + this.landPointService = landPointService; + this.routePointService = routePointService; + } - public TyphoonServiceImpl(ITyphoonDetailService typhoonDetailService, - ITyphoonLandService typhoonLandService, ITyphoonPointService typhoonPointService) { - this.typhoonDetailService = typhoonDetailService; - this.typhoonLandService = typhoonLandService; - this.typhoonPointService = typhoonPointService; + private String obtainEnvAddress() { + //获取服务器配置的IP信息 + AddressConfigDTO addressConfig = configService.selectLastConfig(); + String envIp = addressConfig.getEnvIp(); + if (envIp.contains(Constant.HTTP_HEADER)) { + envIp = envIp.replace(Constant.HTTP_HEADER, ""); + } + return envIp; } /** @@ -51,107 +61,117 @@ */ @Override public void saveTyphoonList() { + String url = Constant.HTTP_HEADER + obtainEnvAddress() + "/environment/saveTyphoon?"; /** * 获取台风接口数据 * */ - String res = HttpRequestHelper.doGet(Constant.TYPHOON_LIST + System.currentTimeMillis()); - if (SUCCESS_CODE.equals(HttpRequestHelper.getTyphoonCode(res))) { - TyphoonRemoteData remoteData = JSON.parseObject(res, new TypeReference() { + String res = HttpRequestHelper.doGet(url); + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(res)) { + TyphoonListModel listModel = JSON.parseObject(res, new TypeReference() { }); - //先清空之前的台风表,再保存最新的台风 - remove(null); - List beans = remoteData.getShowapi_res_body().getList(); - for (TyphoonRemoteData.ShowapiResBodyBean.ListBean data : beans) { - //将获取到台风数据存到数据库 + for (TyphoonListModel.DataBean data : listModel.getData()) { Typhoon entity = new Typhoon(); - entity.setTyphoonId(data.getTfid()); + entity.setTyphoonId(data.getTyphoonId()); entity.setName(data.getName()); - entity.setEngName(data.getEnname()); - entity.setLng(Double.valueOf(data.getLng())); - entity.setLat(Double.valueOf(data.getLat())); - entity.setTyphoonType(data.getStrong()); - entity.setCenterPressure(data.getPressure()); + entity.setEngName(data.getEngName()); + entity.setLng(data.getLng()); + entity.setLat(data.getLat()); + entity.setTyphoonType(data.getTyphoonType()); + entity.setCenterPressure(data.getCenterPressure()); entity.setSpeed(data.getSpeed()); - entity.setPower(Integer.valueOf(data.getPower())); - entity.setMoveSpeed(data.getMovespeed()); - entity.setMoveDirection(data.getMovedirection()); + entity.setPower(data.getPower()); + entity.setMoveSpeed(data.getMoveSpeed()); + entity.setMoveDirection(data.getMoveDirection()); entity.setRadius7(data.getRadius7()); entity.setRadius10(data.getRadius10()); entity.setTime(data.getTime()); - save(entity); + entity.setIsActive("1"); + this.baseMapper.insert(entity); } } + updateTyphoonDetail(); } /** * 更新台风详情 */ - @Override - public void updateTyphoonDetail() { - for (Typhoon typhoon : list()) { + private void updateTyphoonDetail() { + //筛选出还未消散的台风并更新详情 + List typhoons = this.baseMapper.selectCurrentTyphoon(); + for (Typhoon typhoon : typhoons) { /** * 获取台风接口数据 * */ - String res = HttpRequestHelper.doGet( - Constant.TYPHOON_DETAIL.replace("ID", typhoon.getTyphoonId()) - + System.currentTimeMillis()); - if (SUCCESS_CODE.equals(HttpRequestHelper.getTyphoonCode(res))) { - TyphoonDetailRemoteData remoteData = JSON.parseObject(res, new TypeReference() { + String url = Constant.HTTP_HEADER + obtainEnvAddress() + "/environment/updateTyphoon?typhoonId=" + typhoon.getTyphoonId(); + String res = HttpRequestHelper.doGet(url); + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(res)) { + TyphoonDetailModel detailModel = JSON.parseObject(res, new TypeReference() { }); - TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean objBean = remoteData.getShowapi_res_body().getObj(); - //保存台风基本情况存到数据库 + TyphoonDetailModel.DataBean dataBean = detailModel.getData(); + String typhoonId = dataBean.getTyphoonId(); + /** + * 保存台风基本情况存到数据库 + * */ TyphoonDetail detail = new TyphoonDetail(); - detail.setTyphoonId(objBean.getTfid()); - detail.setName(objBean.getName()); - detail.setEngName(objBean.getEnname()); - detail.setWarnLevel(objBean.getWarnlevel()); - detail.setCenterLng(Double.parseDouble(objBean.getCenterlng())); - detail.setCenterLat(Double.parseDouble(objBean.getCenterlat())); - detail.setStartTime(objBean.getStarttime()); - detail.setEndTime(objBean.getEndtime()); - detail.setIsActive(objBean.getIsactive()); - typhoonDetailService.saveOrUpdate(detail, new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); + detail.setTyphoonId(typhoonId); + detail.setName(dataBean.getName()); + detail.setEngName(dataBean.getEngName()); + detail.setWarnLevel(dataBean.getWarnLevel()); + detail.setCenterLng(dataBean.getCenterLng()); + detail.setCenterLat(dataBean.getCenterLat()); + detail.setStartTime(dataBean.getStartTime()); + detail.setEndTime(dataBean.getEndTime()); + detail.setIsActive(dataBean.getIsActive()); + QueryWrapper queryWrapper = new QueryWrapper().eq("TYPHOON_ID", typhoonId); + detailService.saveOrUpdate(detail, queryWrapper); - //保存台风登陆情况存到数据库 - List land = objBean.getLand(); - typhoonLandService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); - for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.LandBan landBan : land) { - TyphoonLand typhoonLand = new TyphoonLand(); + /** + * 更新台风列表台风状态 + * */ + typhoon.setIsActive(dataBean.getIsActive()); + saveOrUpdate(typhoon, new QueryWrapper().eq("TYPHOON_ID", typhoonId)); - typhoonLand.setTyphoonId(objBean.getTfid()); - typhoonLand.setLandAddress(landBan.getLandaddress()); - typhoonLand.setLandTime(landBan.getLandtime()); - typhoonLand.setType(landBan.getStrong()); - typhoonLand.setLng(landBan.getLng()); - typhoonLand.setLat(landBan.getLat()); - typhoonLand.setInfo(landBan.getInfo()); + /** + * 保存台风登陆情况存到数据库 + * */ + List landBans = dataBean.getLand(); + for (TyphoonDetailModel.DataBean.LandBean bean : landBans) { + LandPoint landPoint = new LandPoint(); - typhoonLandService.save(typhoonLand); + landPoint.setTyphoonId(typhoonId); + landPoint.setLandAddress(bean.getLandAddress()); + landPoint.setLandTime(bean.getLandTime()); + landPoint.setType(bean.getType()); + landPoint.setLng(bean.getLng()); + landPoint.setLat(bean.getLat()); + landPoint.setInfo(bean.getInfo()); + landPointService.save(landPoint); } - //保存台风移动路径存到数据库 - List points = objBean.getPoints(); - typhoonPointService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); - for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.PointsBean point : points) { - TyphoonPoint typhoonPoint = new TyphoonPoint(); + /** + * 保存台风移动路径存到数据库 + * */ + List routePoints = dataBean.getPoints(); + routePointService.remove(new QueryWrapper().eq("TYPHOON_ID", typhoonId)); + for (TyphoonDetailModel.DataBean.PointsBean point : routePoints) { + RoutePoint routePoint = new RoutePoint(); - typhoonPoint.setTyphoonId(objBean.getTfid()); - typhoonPoint.setTime(point.getTime()); - typhoonPoint.setCenterPressure(point.getPressure()); - typhoonPoint.setSpeed(point.getSpeed()); - typhoonPoint.setTyphoonType(point.getStrong()); - typhoonPoint.setMoveSpeed(point.getMovespeed()); - typhoonPoint.setPower(Integer.parseInt(point.getPower())); - typhoonPoint.setMoveDirection(point.getMovedirection()); - typhoonPoint.setLng(point.getLng()); - typhoonPoint.setLat(point.getLat()); - typhoonPoint.setRadius12(point.getRadius12()); - typhoonPoint.setRadius10(point.getRadius10()); - typhoonPoint.setRadius7(point.getRadius7()); - typhoonPoint.setRoutePrediction(point.getJl()); - typhoonPoint.setCenterPosition(point.getCkposition()); - - typhoonPointService.save(typhoonPoint); + routePoint.setTyphoonId(typhoonId); + routePoint.setTime(point.getTime()); + routePoint.setCenterPressure(point.getCenterPressure()); + routePoint.setSpeed(point.getSpeed()); + routePoint.setTyphoonType(point.getTyphoonType()); + routePoint.setMoveSpeed(point.getMoveSpeed()); + routePoint.setPower(point.getPower()); + routePoint.setMoveDirection(point.getMoveDirection()); + routePoint.setLng(point.getLng()); + routePoint.setLat(point.getLat()); + routePoint.setRadius12(point.getRadius12()); + routePoint.setRadius10(point.getRadius10()); + routePoint.setRadius7(point.getRadius7()); + routePoint.setRoutePrediction(point.getRoutePrediction()); + routePoint.setCenterPosition(point.getCenterPosition()); + routePointService.save(routePoint); } } } @@ -160,7 +180,9 @@ @Override public List currentTyphoonList() { List typhoonList = new ArrayList<>(); - for (Typhoon typhoon : list()) { + //筛选出还未消散的台风并更新详情 + List typhoons = this.baseMapper.selectCurrentTyphoon(); + for (Typhoon typhoon : typhoons) { typhoonList.add(new TyphoonDTO(typhoon)); } return typhoonList; @@ -168,15 +190,18 @@ @Override public TyphoonDetailDTO typhoonDetail(String typhoonId) { - TyphoonDetail detail = typhoonDetailService.getOne( + TyphoonDetail typhoonDetail = detailService.getOne( new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - List landList = typhoonLandService.list( - new QueryWrapper().eq("TYPHOON_ID", typhoonId) + if (typhoonDetail == null) { + return null; + } + List landPoints = landPointService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - List pointList = typhoonPointService.list( - new QueryWrapper().eq("TYPHOON_ID", typhoonId) + List routePoints = routePointService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - return new TyphoonDetailDTO(detail, landList, pointList); + return new TyphoonDetailDTO(typhoonDetail, landPoints, routePoints); } } diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..8396364 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,31 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel.DataBean data) { + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java index a34da1b..0c5225d 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -1,8 +1,8 @@ package com.casic.missiles.modular.system.dto; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; import lombok.Data; import java.util.ArrayList; @@ -142,7 +142,7 @@ private String centerPosition; } - public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + public TyphoonDetailDTO(TyphoonDetail detail, List landPoints, List routePoints) { this.typhoonId = detail.getTyphoonId(); this.name = detail.getName(); this.engName = detail.getEngName(); @@ -152,8 +152,9 @@ this.startTime = detail.getStartTime(); this.endTime = detail.getEndTime(); this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); - for (TyphoonLand landBean : landBeans) { + for (LandPoint landBean : landPoints) { LandBan bean = new LandBan(); bean.landAddress = landBean.getLandAddress(); bean.landTime = landBean.getLandTime(); @@ -164,8 +165,9 @@ lands.add(bean); } this.land = lands; + List points = new ArrayList<>(); - for (TyphoonPoint point : pointBeans) { + for (RoutePoint point : routePoints) { PointBean pointBean = new PointBean(); pointBean.time = point.getTime(); pointBean.centerPressure = point.getCenterPressure(); diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java new file mode 100644 index 0000000..b0b2e7a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java @@ -0,0 +1,265 @@ +package com.casic.missiles.modular.system.dto.remote; + +/** + * 洋流数据模型 + * + * @author a203 + */ +public class OceanDetailModel { + + /** + * code : 200 + * data : {"altitude":0,"forecast":{"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34},"oceanDir":135.22,"pressure":100925.19,"speed":7.97,"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"temperature":28.6,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34,"windDir":71.84,"windSpeed":7.97} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * altitude : 0 + * forecast : {"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34} + * oceanDir : 135.22 + * pressure : 100925.19 + * speed : 7.97 + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * temperature : 28.6 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + * windDir : 71.84 + * windSpeed : 7.97 + */ + + private double altitude; + private ForecastBean forecast; + private double oceanDir; + private double pressure; + private double speed; + private double swellDir; + private double swellHeight; + private double swellPrd; + private double temperature; + private double waveDir; + private double waveHeight; + private double wavePrd; + private double windDir; + private double windSpeed; + + public double getAltitude() { + return altitude; + } + + public void setAltitude(double altitude) { + this.altitude = altitude; + } + + public ForecastBean getForecast() { + return forecast; + } + + public void setForecast(ForecastBean forecast) { + this.forecast = forecast; + } + + public double getOceanDir() { + return oceanDir; + } + + public void setOceanDir(double oceanDir) { + this.oceanDir = oceanDir; + } + + public double getPressure() { + return pressure; + } + + public void setPressure(double pressure) { + this.pressure = pressure; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getTemperature() { + return temperature; + } + + public void setTemperature(double temperature) { + this.temperature = temperature; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + + public double getWindDir() { + return windDir; + } + + public void setWindDir(double windDir) { + this.windDir = windDir; + } + + public double getWindSpeed() { + return windSpeed; + } + + public void setWindSpeed(double windSpeed) { + this.windSpeed = windSpeed; + } + + public static class ForecastBean { + /** + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + */ + + private double swellDir; + private double swellHeight; + private double swellPrd; + private double waveDir; + private double waveHeight; + private double wavePrd; + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java deleted file mode 100644 index 5ad3a22..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java +++ /dev/null @@ -1,439 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方洋流数据模型 - * - * @author a203 - */ -public class OceanDetailRemoteData { - - /** - * code : 0 - * data : {"lon":114.338597,"lat":18.273134,"date":"2021-10-21","hour":10,"list":[{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}]} - * message : success - * etime : 1634786517992 - */ - - private int code; - private DataBean data; - private String message; - private long etime; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public DataBean getData() { - return data; - } - - public void setData(DataBean data) { - this.data = data; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public long getEtime() { - return etime; - } - - public void setEtime(long etime) { - this.etime = etime; - } - - public static class DataBean { - /** - * lon : 114.338597 - * lat : 18.273134 - * date : 2021-10-21 - * hour : 10 - * list : [{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}] - */ - - private double lon; - private double lat; - private String date; - private int hour; - private List list; - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public int getHour() { - return hour; - } - - public void setHour(int hour) { - this.hour = hour; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * date : 2021-10-21 - * ytx : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - * meteo : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - */ - - private String date; - private YtxBean ytx; - private MeteoBean meteo; - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public YtxBean getYtx() { - return ytx; - } - - public void setYtx(YtxBean ytx) { - this.ytx = ytx; - } - - public MeteoBean getMeteo() { - return meteo; - } - - public void setMeteo(MeteoBean meteo) { - this.meteo = meteo; - } - - public static class YtxBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - - public static class MeteoBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java new file mode 100644 index 0000000..3a2e068 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java @@ -0,0 +1,374 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风数据模型 + * + * @author a203 + */ +public class TyphoonDetailModel { + + /** + * code : 200 + * data : {"centerLat":20.65,"centerLng":128.1,"endTime":"2021-10-11 8:00:00","engName":"Kompasu","isActive":"1","land":[],"name":"圆规","points":[{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}],"startTime":"2021-10-8 2:00:00","typhoonId":"202118","warnLevel":"white"} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * centerLat : 20.65 + * centerLng : 128.1 + * endTime : 2021-10-11 8:00:00 + * engName : Kompasu + * isActive : 1 + * land : [] + * name : 圆规 + * points : [{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}] + * startTime : 2021-10-8 2:00:00 + * typhoonId : 202118 + * warnLevel : white + */ + + private double centerLat; + private double centerLng; + private String endTime; + private String engName; + private String isActive; + private String name; + private String startTime; + private String typhoonId; + private String warnLevel; + private List land; + private List points; + + public double getCenterLat() { + return centerLat; + } + + public void setCenterLat(double centerLat) { + this.centerLat = centerLat; + } + + public double getCenterLng() { + return centerLng; + } + + public void setCenterLng(double centerLng) { + this.centerLng = centerLng; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public String getIsActive() { + return isActive; + } + + public void setIsActive(String isActive) { + this.isActive = isActive; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getWarnLevel() { + return warnLevel; + } + + public void setWarnLevel(String warnLevel) { + this.warnLevel = warnLevel; + } + + public List getLand() { + return land; + } + + public void setLand(List land) { + this.land = land; + } + + public static class LandBean { + private String landAddress; + private String type; + private Double lng; + private Double lat; + private String info; + private String landTime; + + public String getLandAddress() { + return landAddress; + } + + public void setLandAddress(String landAddress) { + this.landAddress = landAddress; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Double getLng() { + return lng; + } + + public void setLng(Double lng) { + this.lng = lng; + } + + public Double getLat() { + return lat; + } + + public void setLat(Double lat) { + this.lat = lat; + } + + public String getInfo() { + return info; + } + + public void setInfo(String info) { + this.info = info; + } + + public String getLandTime() { + return landTime; + } + + public void setLandTime(String landTime) { + this.landTime = landTime; + } + } + + public List getPoints() { + return points; + } + + public void setPoints(List points) { + this.points = points; + } + + public static class PointsBean { + /** + * centerPosition : 距离菲律宾马尼拉东北方向约600公里 + * centerPressure : 990 + * lat : 18.7 + * lng : 124.7 + * moveDirection : 西北西 + * moveSpeed : 25 + * power : 9 + * radius10 : + * radius12 : + * radius7 : 160|140|200|180 + * routePrediction : “圆规”将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分) + * speed : 23 + * time : 2021-10-11 8:00:00 + * typhoonType : 热带风暴 + */ + + private String centerPosition; + private String centerPressure; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private int power; + private String radius10; + private String radius12; + private String radius7; + private String routePrediction; + private String speed; + private String time; + private String typhoonType; + + public String getCenterPosition() { + return centerPosition; + } + + public void setCenterPosition(String centerPosition) { + this.centerPosition = centerPosition; + } + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius12() { + return radius12; + } + + public void setRadius12(String radius12) { + this.radius12 = radius12; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getRoutePrediction() { + return routePrediction; + } + + public void setRoutePrediction(String routePrediction) { + this.routePrediction = routePrediction; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java deleted file mode 100644 index 5b70924..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java +++ /dev/null @@ -1,419 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonDetailRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 6155596a0de376ce34c7b594 - * showapi_res_body : {"ret_code":0,"obj":{"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"}} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * obj : {"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"} - */ - - private int ret_code; - private ObjBean obj; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public ObjBean getObj() { - return obj; - } - - public void setObj(ObjBean obj) { - this.obj = obj; - } - - public static class ObjBean { - /** - * endtime : 2021-9-30 8:00:00 - * centerlng : 139.300000 - * starttime : 2021-9-23 20:00:00 - * tfid : 202116 - * isactive : 1 - * centerlat : 25.200000 - * name : 蒲公英 - * land : [{"landaddress":"朱家尖镇","strong":"强台风","lng":"122.39","lat":"29.83","info":"\u201c灿鸿\u201d11日16时40分前后登陆浙江舟山市朱家尖镇","landtime":"2015/7/11 16:40:00"}] - * warnlevel : white - * points : [{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}] - * enname : Mindulle - */ - - private String endtime; - private String centerlng; - private String starttime; - private String tfid; - private String isactive; - private String centerlat; - private String name; - private String warnlevel; - private String enname; - private List land; - private List points; - - public String getEndtime() { - return endtime; - } - - public void setEndtime(String endtime) { - this.endtime = endtime; - } - - public String getCenterlng() { - return centerlng; - } - - public void setCenterlng(String centerlng) { - this.centerlng = centerlng; - } - - public String getStarttime() { - return starttime; - } - - public void setStarttime(String starttime) { - this.starttime = starttime; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getIsactive() { - return isactive; - } - - public void setIsactive(String isactive) { - this.isactive = isactive; - } - - public String getCenterlat() { - return centerlat; - } - - public void setCenterlat(String centerlat) { - this.centerlat = centerlat; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getWarnlevel() { - return warnlevel; - } - - public void setWarnlevel(String warnlevel) { - this.warnlevel = warnlevel; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - - public List getLand() { - return land; - } - - public void setLand(List land) { - this.land = land; - } - - public static class LandBan { - /** - * landaddress : 朱家尖镇 - * strong : 强台风 - * lng : 122.39 - * lat : 29.83 - * info : “灿鸿”11日16时40分前后登陆浙江舟山市朱家尖镇 - * landtime : 2015/7/11 16:40:00 - */ - - private String landaddress; - private String strong; - private Double lng; - private Double lat; - private String info; - private String landtime; - - public String getLandaddress() { - return landaddress; - } - - public void setLandaddress(String landaddress) { - this.landaddress = landaddress; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getInfo() { - return info; - } - - public void setInfo(String info) { - this.info = info; - } - - public String getLandtime() { - return landtime; - } - - public void setLandtime(String landtime) { - this.landtime = landtime; - } - } - - public List getPoints() { - return points; - } - - public void setPoints(List points) { - this.points = points; - } - - public static class PointsBean { - /** - * time : 2021-9-23 20:00:00 - * pressure : 998 - * radius10 : - * speed : 18 - * strong : 热带风暴 - * movespeed : 20 - * radius12 : - * power : 8 - * lng : 143.30 - * movedirection : 西北西 - * lat : 13.80 - * radius7 : 250|220|200|180 - * jl : “蒲公英”将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分) - * ckposition : 距离日本东京南偏西方向约1060公里 - */ - - private String time; - private String pressure; - private String radius10; - private String speed; - private String strong; - private String movespeed; - private String radius12; - private String power; - private Double lng; - private String movedirection; - private Double lat; - private String radius7; - private String jl; - private String ckposition; - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getRadius12() { - return radius12; - } - - public void setRadius12(String radius12) { - this.radius12 = radius12; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getJl() { - return jl; - } - - public void setJl(String jl) { - this.jl = jl; - } - - public String getCkposition() { - return ckposition; - } - - public void setCkposition(String ckposition) { - this.ckposition = ckposition; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java new file mode 100644 index 0000000..91bad37 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java @@ -0,0 +1,201 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风列表数据模型 + * + * @author a203 + */ +public class TyphoonListModel { + + /** + * code : 200 + * data : [{"centerPressure":"990","engName":"Kompasu","lat":18.7,"lng":125,"moveDirection":"西北西","moveSpeed":"23","name":"圆规","power":9,"radius10":"","radius7":"200","speed":"23","time":"2021-10-11 05:00:00","typhoonId":"202118","typhoonType":"热带风暴"}] + * message : 请求成功 + * success : true + */ + + private int code; + private String message; + private boolean success; + private List data; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public static class DataBean { + /** + * centerPressure : 990 + * engName : Kompasu + * lat : 18.7 + * lng : 125 + * moveDirection : 西北西 + * moveSpeed : 23 + * name : 圆规 + * power : 9 + * radius10 : + * radius7 : 200 + * speed : 23 + * time : 2021-10-11 05:00:00 + * typhoonId : 202118 + * typhoonType : 热带风暴 + */ + + private String centerPressure; + private String engName; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private String name; + private int power; + private String radius10; + private String radius7; + private String speed; + private String time; + private String typhoonId; + private String typhoonType; + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java deleted file mode 100644 index 38a9257..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java +++ /dev/null @@ -1,237 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 61554fbe0de376d03494057c - * showapi_res_body : {"ret_code":0,"list":[{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}]} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * list : [{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}] - */ - - private int ret_code; - private List list; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * pressure : 945 - * tfid : 202116 - * radius10 : 150 - * speed : 48 - * lng : 136.40 - * radius7 : 350 - * time : 2021-09-30 08:00:00 - * movespeed : 23 - * strong : 强台风 - * name : 蒲公英 - * power : 15 - * movedirection : 北北东 - * lat : 26.60 - * enname : Mindulle - */ - - private String pressure; - private String tfid; - private String radius10; - private String speed; - private String lng; - private String radius7; - private String time; - private String movespeed; - private String strong; - private String name; - private String power; - private String movedirection; - private String lat; - private String enname; - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getLng() { - return lng; - } - - public void setLng(String lng) { - this.lng = lng; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public String getLat() { - return lat; - } - - public void setLat(String lat) { - this.lat = lat; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java new file mode 100644 index 0000000..c488237 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风移动点数据信息 服务类 + * + * @author a203 + */ +public interface ILandPointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java new file mode 100644 index 0000000..ab05570 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风登陆点数据信息 服务类 + * + * @author a203 + */ +public interface IRoutePointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java deleted file mode 100644 index d16a48b..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonLandService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java deleted file mode 100644 index 80e2765..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonPointService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java index c47a0f3..53bb971 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java @@ -19,13 +19,6 @@ void saveTyphoonList(); /** - * 更新台风详情 - */ - void updateTyphoonDetail(); - - /***上面接口从第三方存库,下面接口查库**********************/ - - /** * 查询台风列表 * * @return {@link List} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java new file mode 100644 index 0000000..fed33c1 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.LandPointMapper; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.service.ILandPointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class LandPointServiceImpl extends ServiceImpl implements ILandPointService { + + public LandPointServiceImpl() { + + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java index f8cb771..58fce60 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java @@ -2,9 +2,12 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; +import com.casic.missiles.modular.system.dto.AddressConfigDTO; import com.casic.missiles.modular.system.dto.OceanDetailDTO; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; +import com.casic.missiles.modular.system.service.IAddressConfigService; import com.casic.missiles.modular.system.service.IOceanService; +import com.casic.missiles.modular.system.utils.Constant; import com.casic.missiles.modular.system.utils.HttpRequestHelper; import org.springframework.stereotype.Service; @@ -17,23 +20,32 @@ @Service public class OceanServiceImpl implements IOceanService { - private static final String SUCCESS_CODE = "0"; + private final IAddressConfigService configService; - public OceanServiceImpl() { - + public OceanServiceImpl(IAddressConfigService configService) { + this.configService = configService; } @Override public OceanDetailDTO oceanDetail(double lng, double lat, String date, String days, String hour) { - String oceanData = HttpRequestHelper.obtainOceanData(lng, lat, date, days, hour); + AddressConfigDTO addressConfig = configService.selectLastConfig(); + String envIp = addressConfig.getEnvIp(); + if (envIp.contains(Constant.HTTP_HEADER)) { + envIp = envIp.replace(Constant.HTTP_HEADER, ""); + } + String url = Constant.HTTP_HEADER + envIp + "/environment/ocean?" + + "lng=" + lng + "&lat=" + lat + + "&date=" + date + "&days=" + days + "&hour=" + hour; + + String oceanData = HttpRequestHelper.doGet(url); /** * 解析洋流数据返回给前端 * */ OceanDetailDTO oceanDetailDTO = null; - if (SUCCESS_CODE.equals(HttpRequestHelper.getOceanCode(oceanData))) { - OceanDetailRemoteData remoteData = JSON.parseObject(oceanData, new TypeReference() { + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(oceanData)) { + OceanDetailModel remoteData = JSON.parseObject(oceanData, new TypeReference() { }); - oceanDetailDTO = new OceanDetailDTO(remoteData); + oceanDetailDTO = new OceanDetailDTO(remoteData.getData()); } return oceanDetailDTO; } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java new file mode 100644 index 0000000..24b06cd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.RoutePointMapper; +import com.casic.missiles.modular.system.model.RoutePoint; +import com.casic.missiles.modular.system.service.IRoutePointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class RoutePointServiceImpl extends ServiceImpl implements IRoutePointService { + + public RoutePointServiceImpl() { + + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java deleted file mode 100644 index d1bf2c7..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.casic.missiles.modular.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.casic.missiles.modular.system.dao.TyphoonLandMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.service.ITyphoonLandService; -import org.springframework.stereotype.Service; - -/** - * 台风数据信息 服务实现类 - * - * @author a203 - */ - -@Service -public class TyphoonLandServiceImpl extends ServiceImpl implements ITyphoonLandService { - - public TyphoonLandServiceImpl() { - - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java deleted file mode 100644 index 36815fa..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.casic.missiles.modular.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.casic.missiles.modular.system.dao.TyphoonPointMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; -import com.casic.missiles.modular.system.service.ITyphoonPointService; -import org.springframework.stereotype.Service; - -/** - * 台风数据信息 服务实现类 - * - * @author a203 - */ - -@Service -public class TyphoonPointServiceImpl extends ServiceImpl implements ITyphoonPointService { - - public TyphoonPointServiceImpl() { - - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java index 861e2c1..1cbfb01 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java @@ -5,18 +5,16 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.casic.missiles.modular.system.dao.TyphoonMapper; +import com.casic.missiles.modular.system.dto.AddressConfigDTO; import com.casic.missiles.modular.system.dto.TyphoonDTO; import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; -import com.casic.missiles.modular.system.dto.remote.TyphoonDetailRemoteData; -import com.casic.missiles.modular.system.dto.remote.TyphoonRemoteData; +import com.casic.missiles.modular.system.dto.remote.TyphoonDetailModel; +import com.casic.missiles.modular.system.dto.remote.TyphoonListModel; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.Typhoon; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; -import com.casic.missiles.modular.system.service.ITyphoonDetailService; -import com.casic.missiles.modular.system.service.ITyphoonLandService; -import com.casic.missiles.modular.system.service.ITyphoonPointService; -import com.casic.missiles.modular.system.service.ITyphoonService; +import com.casic.missiles.modular.system.service.*; import com.casic.missiles.modular.system.utils.Constant; import com.casic.missiles.modular.system.utils.HttpRequestHelper; import org.springframework.stereotype.Service; @@ -33,17 +31,29 @@ @Service public class TyphoonServiceImpl extends ServiceImpl implements ITyphoonService { - private static final String SUCCESS_CODE = "0"; + private final IAddressConfigService configService; + private final ITyphoonDetailService detailService; + private final ILandPointService landPointService; + private final IRoutePointService routePointService; - private final ITyphoonDetailService typhoonDetailService; - private final ITyphoonLandService typhoonLandService; - private final ITyphoonPointService typhoonPointService; + public TyphoonServiceImpl(IAddressConfigService configService, + ITyphoonDetailService detailService, + ILandPointService landPointService, + IRoutePointService routePointService) { + this.configService = configService; + this.detailService = detailService; + this.landPointService = landPointService; + this.routePointService = routePointService; + } - public TyphoonServiceImpl(ITyphoonDetailService typhoonDetailService, - ITyphoonLandService typhoonLandService, ITyphoonPointService typhoonPointService) { - this.typhoonDetailService = typhoonDetailService; - this.typhoonLandService = typhoonLandService; - this.typhoonPointService = typhoonPointService; + private String obtainEnvAddress() { + //获取服务器配置的IP信息 + AddressConfigDTO addressConfig = configService.selectLastConfig(); + String envIp = addressConfig.getEnvIp(); + if (envIp.contains(Constant.HTTP_HEADER)) { + envIp = envIp.replace(Constant.HTTP_HEADER, ""); + } + return envIp; } /** @@ -51,107 +61,117 @@ */ @Override public void saveTyphoonList() { + String url = Constant.HTTP_HEADER + obtainEnvAddress() + "/environment/saveTyphoon?"; /** * 获取台风接口数据 * */ - String res = HttpRequestHelper.doGet(Constant.TYPHOON_LIST + System.currentTimeMillis()); - if (SUCCESS_CODE.equals(HttpRequestHelper.getTyphoonCode(res))) { - TyphoonRemoteData remoteData = JSON.parseObject(res, new TypeReference() { + String res = HttpRequestHelper.doGet(url); + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(res)) { + TyphoonListModel listModel = JSON.parseObject(res, new TypeReference() { }); - //先清空之前的台风表,再保存最新的台风 - remove(null); - List beans = remoteData.getShowapi_res_body().getList(); - for (TyphoonRemoteData.ShowapiResBodyBean.ListBean data : beans) { - //将获取到台风数据存到数据库 + for (TyphoonListModel.DataBean data : listModel.getData()) { Typhoon entity = new Typhoon(); - entity.setTyphoonId(data.getTfid()); + entity.setTyphoonId(data.getTyphoonId()); entity.setName(data.getName()); - entity.setEngName(data.getEnname()); - entity.setLng(Double.valueOf(data.getLng())); - entity.setLat(Double.valueOf(data.getLat())); - entity.setTyphoonType(data.getStrong()); - entity.setCenterPressure(data.getPressure()); + entity.setEngName(data.getEngName()); + entity.setLng(data.getLng()); + entity.setLat(data.getLat()); + entity.setTyphoonType(data.getTyphoonType()); + entity.setCenterPressure(data.getCenterPressure()); entity.setSpeed(data.getSpeed()); - entity.setPower(Integer.valueOf(data.getPower())); - entity.setMoveSpeed(data.getMovespeed()); - entity.setMoveDirection(data.getMovedirection()); + entity.setPower(data.getPower()); + entity.setMoveSpeed(data.getMoveSpeed()); + entity.setMoveDirection(data.getMoveDirection()); entity.setRadius7(data.getRadius7()); entity.setRadius10(data.getRadius10()); entity.setTime(data.getTime()); - save(entity); + entity.setIsActive("1"); + this.baseMapper.insert(entity); } } + updateTyphoonDetail(); } /** * 更新台风详情 */ - @Override - public void updateTyphoonDetail() { - for (Typhoon typhoon : list()) { + private void updateTyphoonDetail() { + //筛选出还未消散的台风并更新详情 + List typhoons = this.baseMapper.selectCurrentTyphoon(); + for (Typhoon typhoon : typhoons) { /** * 获取台风接口数据 * */ - String res = HttpRequestHelper.doGet( - Constant.TYPHOON_DETAIL.replace("ID", typhoon.getTyphoonId()) - + System.currentTimeMillis()); - if (SUCCESS_CODE.equals(HttpRequestHelper.getTyphoonCode(res))) { - TyphoonDetailRemoteData remoteData = JSON.parseObject(res, new TypeReference() { + String url = Constant.HTTP_HEADER + obtainEnvAddress() + "/environment/updateTyphoon?typhoonId=" + typhoon.getTyphoonId(); + String res = HttpRequestHelper.doGet(url); + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(res)) { + TyphoonDetailModel detailModel = JSON.parseObject(res, new TypeReference() { }); - TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean objBean = remoteData.getShowapi_res_body().getObj(); - //保存台风基本情况存到数据库 + TyphoonDetailModel.DataBean dataBean = detailModel.getData(); + String typhoonId = dataBean.getTyphoonId(); + /** + * 保存台风基本情况存到数据库 + * */ TyphoonDetail detail = new TyphoonDetail(); - detail.setTyphoonId(objBean.getTfid()); - detail.setName(objBean.getName()); - detail.setEngName(objBean.getEnname()); - detail.setWarnLevel(objBean.getWarnlevel()); - detail.setCenterLng(Double.parseDouble(objBean.getCenterlng())); - detail.setCenterLat(Double.parseDouble(objBean.getCenterlat())); - detail.setStartTime(objBean.getStarttime()); - detail.setEndTime(objBean.getEndtime()); - detail.setIsActive(objBean.getIsactive()); - typhoonDetailService.saveOrUpdate(detail, new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); + detail.setTyphoonId(typhoonId); + detail.setName(dataBean.getName()); + detail.setEngName(dataBean.getEngName()); + detail.setWarnLevel(dataBean.getWarnLevel()); + detail.setCenterLng(dataBean.getCenterLng()); + detail.setCenterLat(dataBean.getCenterLat()); + detail.setStartTime(dataBean.getStartTime()); + detail.setEndTime(dataBean.getEndTime()); + detail.setIsActive(dataBean.getIsActive()); + QueryWrapper queryWrapper = new QueryWrapper().eq("TYPHOON_ID", typhoonId); + detailService.saveOrUpdate(detail, queryWrapper); - //保存台风登陆情况存到数据库 - List land = objBean.getLand(); - typhoonLandService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); - for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.LandBan landBan : land) { - TyphoonLand typhoonLand = new TyphoonLand(); + /** + * 更新台风列表台风状态 + * */ + typhoon.setIsActive(dataBean.getIsActive()); + saveOrUpdate(typhoon, new QueryWrapper().eq("TYPHOON_ID", typhoonId)); - typhoonLand.setTyphoonId(objBean.getTfid()); - typhoonLand.setLandAddress(landBan.getLandaddress()); - typhoonLand.setLandTime(landBan.getLandtime()); - typhoonLand.setType(landBan.getStrong()); - typhoonLand.setLng(landBan.getLng()); - typhoonLand.setLat(landBan.getLat()); - typhoonLand.setInfo(landBan.getInfo()); + /** + * 保存台风登陆情况存到数据库 + * */ + List landBans = dataBean.getLand(); + for (TyphoonDetailModel.DataBean.LandBean bean : landBans) { + LandPoint landPoint = new LandPoint(); - typhoonLandService.save(typhoonLand); + landPoint.setTyphoonId(typhoonId); + landPoint.setLandAddress(bean.getLandAddress()); + landPoint.setLandTime(bean.getLandTime()); + landPoint.setType(bean.getType()); + landPoint.setLng(bean.getLng()); + landPoint.setLat(bean.getLat()); + landPoint.setInfo(bean.getInfo()); + landPointService.save(landPoint); } - //保存台风移动路径存到数据库 - List points = objBean.getPoints(); - typhoonPointService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); - for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.PointsBean point : points) { - TyphoonPoint typhoonPoint = new TyphoonPoint(); + /** + * 保存台风移动路径存到数据库 + * */ + List routePoints = dataBean.getPoints(); + routePointService.remove(new QueryWrapper().eq("TYPHOON_ID", typhoonId)); + for (TyphoonDetailModel.DataBean.PointsBean point : routePoints) { + RoutePoint routePoint = new RoutePoint(); - typhoonPoint.setTyphoonId(objBean.getTfid()); - typhoonPoint.setTime(point.getTime()); - typhoonPoint.setCenterPressure(point.getPressure()); - typhoonPoint.setSpeed(point.getSpeed()); - typhoonPoint.setTyphoonType(point.getStrong()); - typhoonPoint.setMoveSpeed(point.getMovespeed()); - typhoonPoint.setPower(Integer.parseInt(point.getPower())); - typhoonPoint.setMoveDirection(point.getMovedirection()); - typhoonPoint.setLng(point.getLng()); - typhoonPoint.setLat(point.getLat()); - typhoonPoint.setRadius12(point.getRadius12()); - typhoonPoint.setRadius10(point.getRadius10()); - typhoonPoint.setRadius7(point.getRadius7()); - typhoonPoint.setRoutePrediction(point.getJl()); - typhoonPoint.setCenterPosition(point.getCkposition()); - - typhoonPointService.save(typhoonPoint); + routePoint.setTyphoonId(typhoonId); + routePoint.setTime(point.getTime()); + routePoint.setCenterPressure(point.getCenterPressure()); + routePoint.setSpeed(point.getSpeed()); + routePoint.setTyphoonType(point.getTyphoonType()); + routePoint.setMoveSpeed(point.getMoveSpeed()); + routePoint.setPower(point.getPower()); + routePoint.setMoveDirection(point.getMoveDirection()); + routePoint.setLng(point.getLng()); + routePoint.setLat(point.getLat()); + routePoint.setRadius12(point.getRadius12()); + routePoint.setRadius10(point.getRadius10()); + routePoint.setRadius7(point.getRadius7()); + routePoint.setRoutePrediction(point.getRoutePrediction()); + routePoint.setCenterPosition(point.getCenterPosition()); + routePointService.save(routePoint); } } } @@ -160,7 +180,9 @@ @Override public List currentTyphoonList() { List typhoonList = new ArrayList<>(); - for (Typhoon typhoon : list()) { + //筛选出还未消散的台风并更新详情 + List typhoons = this.baseMapper.selectCurrentTyphoon(); + for (Typhoon typhoon : typhoons) { typhoonList.add(new TyphoonDTO(typhoon)); } return typhoonList; @@ -168,15 +190,18 @@ @Override public TyphoonDetailDTO typhoonDetail(String typhoonId) { - TyphoonDetail detail = typhoonDetailService.getOne( + TyphoonDetail typhoonDetail = detailService.getOne( new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - List landList = typhoonLandService.list( - new QueryWrapper().eq("TYPHOON_ID", typhoonId) + if (typhoonDetail == null) { + return null; + } + List landPoints = landPointService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - List pointList = typhoonPointService.list( - new QueryWrapper().eq("TYPHOON_ID", typhoonId) + List routePoints = routePointService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - return new TyphoonDetailDTO(detail, landList, pointList); + return new TyphoonDetailDTO(typhoonDetail, landPoints, routePoints); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java deleted file mode 100644 index 552a6e9..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.casic.missiles.modular.system.utils; - -/** - * @author a203 - */ -public class Constant { - /** - * 热带气旋/台风相关常量 - */ - private static final String BASE_URL = "https://route.showapi.com"; - private static final String API_APPID = "780330"; - private static final String API_SIGN_KEY = "f30ac28b65cc447da936448c57bc5d99"; - - public static final String TYPHOON_LIST = BASE_URL - + "/342-1?" - + "showapi_appid=" + API_APPID + "&" - + "showapi_sign=" + API_SIGN_KEY + "&" - + "showapi_timestamp="; - - public static final String TYPHOON_DETAIL = BASE_URL - + "/342-2?" - + "showapi_appid=" + API_APPID + "&" - + "showapi_sign=" + API_SIGN_KEY + "&" - + "tfid=ID" + "&" - + "showapi_timestamp="; - - /** - * 洋流相关常量 - */ - private static final String OCEAN_BASE_URL = "http://api.meteo.open.ninecosmos.cn"; - public static final String OCEAN_HEADER_NAME = "Authorization"; - public static final String OCEAN_APPID = "WXZH888888"; - public static final String OCEAN_APP_KEY = "xb#bD&xtho@b80scbDb"; - - public static final String OCEAN_TOKEN = OCEAN_BASE_URL + "/us/users/open/token"; - public static final String OCEAN_DETAIL = OCEAN_BASE_URL + "/mr/netcdf/meteo/ytx"; -} diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..8396364 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,31 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel.DataBean data) { + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java index a34da1b..0c5225d 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -1,8 +1,8 @@ package com.casic.missiles.modular.system.dto; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; import lombok.Data; import java.util.ArrayList; @@ -142,7 +142,7 @@ private String centerPosition; } - public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + public TyphoonDetailDTO(TyphoonDetail detail, List landPoints, List routePoints) { this.typhoonId = detail.getTyphoonId(); this.name = detail.getName(); this.engName = detail.getEngName(); @@ -152,8 +152,9 @@ this.startTime = detail.getStartTime(); this.endTime = detail.getEndTime(); this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); - for (TyphoonLand landBean : landBeans) { + for (LandPoint landBean : landPoints) { LandBan bean = new LandBan(); bean.landAddress = landBean.getLandAddress(); bean.landTime = landBean.getLandTime(); @@ -164,8 +165,9 @@ lands.add(bean); } this.land = lands; + List points = new ArrayList<>(); - for (TyphoonPoint point : pointBeans) { + for (RoutePoint point : routePoints) { PointBean pointBean = new PointBean(); pointBean.time = point.getTime(); pointBean.centerPressure = point.getCenterPressure(); diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java new file mode 100644 index 0000000..b0b2e7a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java @@ -0,0 +1,265 @@ +package com.casic.missiles.modular.system.dto.remote; + +/** + * 洋流数据模型 + * + * @author a203 + */ +public class OceanDetailModel { + + /** + * code : 200 + * data : {"altitude":0,"forecast":{"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34},"oceanDir":135.22,"pressure":100925.19,"speed":7.97,"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"temperature":28.6,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34,"windDir":71.84,"windSpeed":7.97} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * altitude : 0 + * forecast : {"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34} + * oceanDir : 135.22 + * pressure : 100925.19 + * speed : 7.97 + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * temperature : 28.6 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + * windDir : 71.84 + * windSpeed : 7.97 + */ + + private double altitude; + private ForecastBean forecast; + private double oceanDir; + private double pressure; + private double speed; + private double swellDir; + private double swellHeight; + private double swellPrd; + private double temperature; + private double waveDir; + private double waveHeight; + private double wavePrd; + private double windDir; + private double windSpeed; + + public double getAltitude() { + return altitude; + } + + public void setAltitude(double altitude) { + this.altitude = altitude; + } + + public ForecastBean getForecast() { + return forecast; + } + + public void setForecast(ForecastBean forecast) { + this.forecast = forecast; + } + + public double getOceanDir() { + return oceanDir; + } + + public void setOceanDir(double oceanDir) { + this.oceanDir = oceanDir; + } + + public double getPressure() { + return pressure; + } + + public void setPressure(double pressure) { + this.pressure = pressure; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getTemperature() { + return temperature; + } + + public void setTemperature(double temperature) { + this.temperature = temperature; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + + public double getWindDir() { + return windDir; + } + + public void setWindDir(double windDir) { + this.windDir = windDir; + } + + public double getWindSpeed() { + return windSpeed; + } + + public void setWindSpeed(double windSpeed) { + this.windSpeed = windSpeed; + } + + public static class ForecastBean { + /** + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + */ + + private double swellDir; + private double swellHeight; + private double swellPrd; + private double waveDir; + private double waveHeight; + private double wavePrd; + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java deleted file mode 100644 index 5ad3a22..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java +++ /dev/null @@ -1,439 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方洋流数据模型 - * - * @author a203 - */ -public class OceanDetailRemoteData { - - /** - * code : 0 - * data : {"lon":114.338597,"lat":18.273134,"date":"2021-10-21","hour":10,"list":[{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}]} - * message : success - * etime : 1634786517992 - */ - - private int code; - private DataBean data; - private String message; - private long etime; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public DataBean getData() { - return data; - } - - public void setData(DataBean data) { - this.data = data; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public long getEtime() { - return etime; - } - - public void setEtime(long etime) { - this.etime = etime; - } - - public static class DataBean { - /** - * lon : 114.338597 - * lat : 18.273134 - * date : 2021-10-21 - * hour : 10 - * list : [{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}] - */ - - private double lon; - private double lat; - private String date; - private int hour; - private List list; - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public int getHour() { - return hour; - } - - public void setHour(int hour) { - this.hour = hour; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * date : 2021-10-21 - * ytx : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - * meteo : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - */ - - private String date; - private YtxBean ytx; - private MeteoBean meteo; - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public YtxBean getYtx() { - return ytx; - } - - public void setYtx(YtxBean ytx) { - this.ytx = ytx; - } - - public MeteoBean getMeteo() { - return meteo; - } - - public void setMeteo(MeteoBean meteo) { - this.meteo = meteo; - } - - public static class YtxBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - - public static class MeteoBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java new file mode 100644 index 0000000..3a2e068 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java @@ -0,0 +1,374 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风数据模型 + * + * @author a203 + */ +public class TyphoonDetailModel { + + /** + * code : 200 + * data : {"centerLat":20.65,"centerLng":128.1,"endTime":"2021-10-11 8:00:00","engName":"Kompasu","isActive":"1","land":[],"name":"圆规","points":[{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}],"startTime":"2021-10-8 2:00:00","typhoonId":"202118","warnLevel":"white"} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * centerLat : 20.65 + * centerLng : 128.1 + * endTime : 2021-10-11 8:00:00 + * engName : Kompasu + * isActive : 1 + * land : [] + * name : 圆规 + * points : [{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}] + * startTime : 2021-10-8 2:00:00 + * typhoonId : 202118 + * warnLevel : white + */ + + private double centerLat; + private double centerLng; + private String endTime; + private String engName; + private String isActive; + private String name; + private String startTime; + private String typhoonId; + private String warnLevel; + private List land; + private List points; + + public double getCenterLat() { + return centerLat; + } + + public void setCenterLat(double centerLat) { + this.centerLat = centerLat; + } + + public double getCenterLng() { + return centerLng; + } + + public void setCenterLng(double centerLng) { + this.centerLng = centerLng; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public String getIsActive() { + return isActive; + } + + public void setIsActive(String isActive) { + this.isActive = isActive; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getWarnLevel() { + return warnLevel; + } + + public void setWarnLevel(String warnLevel) { + this.warnLevel = warnLevel; + } + + public List getLand() { + return land; + } + + public void setLand(List land) { + this.land = land; + } + + public static class LandBean { + private String landAddress; + private String type; + private Double lng; + private Double lat; + private String info; + private String landTime; + + public String getLandAddress() { + return landAddress; + } + + public void setLandAddress(String landAddress) { + this.landAddress = landAddress; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Double getLng() { + return lng; + } + + public void setLng(Double lng) { + this.lng = lng; + } + + public Double getLat() { + return lat; + } + + public void setLat(Double lat) { + this.lat = lat; + } + + public String getInfo() { + return info; + } + + public void setInfo(String info) { + this.info = info; + } + + public String getLandTime() { + return landTime; + } + + public void setLandTime(String landTime) { + this.landTime = landTime; + } + } + + public List getPoints() { + return points; + } + + public void setPoints(List points) { + this.points = points; + } + + public static class PointsBean { + /** + * centerPosition : 距离菲律宾马尼拉东北方向约600公里 + * centerPressure : 990 + * lat : 18.7 + * lng : 124.7 + * moveDirection : 西北西 + * moveSpeed : 25 + * power : 9 + * radius10 : + * radius12 : + * radius7 : 160|140|200|180 + * routePrediction : “圆规”将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分) + * speed : 23 + * time : 2021-10-11 8:00:00 + * typhoonType : 热带风暴 + */ + + private String centerPosition; + private String centerPressure; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private int power; + private String radius10; + private String radius12; + private String radius7; + private String routePrediction; + private String speed; + private String time; + private String typhoonType; + + public String getCenterPosition() { + return centerPosition; + } + + public void setCenterPosition(String centerPosition) { + this.centerPosition = centerPosition; + } + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius12() { + return radius12; + } + + public void setRadius12(String radius12) { + this.radius12 = radius12; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getRoutePrediction() { + return routePrediction; + } + + public void setRoutePrediction(String routePrediction) { + this.routePrediction = routePrediction; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java deleted file mode 100644 index 5b70924..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java +++ /dev/null @@ -1,419 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonDetailRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 6155596a0de376ce34c7b594 - * showapi_res_body : {"ret_code":0,"obj":{"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"}} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * obj : {"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"} - */ - - private int ret_code; - private ObjBean obj; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public ObjBean getObj() { - return obj; - } - - public void setObj(ObjBean obj) { - this.obj = obj; - } - - public static class ObjBean { - /** - * endtime : 2021-9-30 8:00:00 - * centerlng : 139.300000 - * starttime : 2021-9-23 20:00:00 - * tfid : 202116 - * isactive : 1 - * centerlat : 25.200000 - * name : 蒲公英 - * land : [{"landaddress":"朱家尖镇","strong":"强台风","lng":"122.39","lat":"29.83","info":"\u201c灿鸿\u201d11日16时40分前后登陆浙江舟山市朱家尖镇","landtime":"2015/7/11 16:40:00"}] - * warnlevel : white - * points : [{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}] - * enname : Mindulle - */ - - private String endtime; - private String centerlng; - private String starttime; - private String tfid; - private String isactive; - private String centerlat; - private String name; - private String warnlevel; - private String enname; - private List land; - private List points; - - public String getEndtime() { - return endtime; - } - - public void setEndtime(String endtime) { - this.endtime = endtime; - } - - public String getCenterlng() { - return centerlng; - } - - public void setCenterlng(String centerlng) { - this.centerlng = centerlng; - } - - public String getStarttime() { - return starttime; - } - - public void setStarttime(String starttime) { - this.starttime = starttime; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getIsactive() { - return isactive; - } - - public void setIsactive(String isactive) { - this.isactive = isactive; - } - - public String getCenterlat() { - return centerlat; - } - - public void setCenterlat(String centerlat) { - this.centerlat = centerlat; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getWarnlevel() { - return warnlevel; - } - - public void setWarnlevel(String warnlevel) { - this.warnlevel = warnlevel; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - - public List getLand() { - return land; - } - - public void setLand(List land) { - this.land = land; - } - - public static class LandBan { - /** - * landaddress : 朱家尖镇 - * strong : 强台风 - * lng : 122.39 - * lat : 29.83 - * info : “灿鸿”11日16时40分前后登陆浙江舟山市朱家尖镇 - * landtime : 2015/7/11 16:40:00 - */ - - private String landaddress; - private String strong; - private Double lng; - private Double lat; - private String info; - private String landtime; - - public String getLandaddress() { - return landaddress; - } - - public void setLandaddress(String landaddress) { - this.landaddress = landaddress; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getInfo() { - return info; - } - - public void setInfo(String info) { - this.info = info; - } - - public String getLandtime() { - return landtime; - } - - public void setLandtime(String landtime) { - this.landtime = landtime; - } - } - - public List getPoints() { - return points; - } - - public void setPoints(List points) { - this.points = points; - } - - public static class PointsBean { - /** - * time : 2021-9-23 20:00:00 - * pressure : 998 - * radius10 : - * speed : 18 - * strong : 热带风暴 - * movespeed : 20 - * radius12 : - * power : 8 - * lng : 143.30 - * movedirection : 西北西 - * lat : 13.80 - * radius7 : 250|220|200|180 - * jl : “蒲公英”将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分) - * ckposition : 距离日本东京南偏西方向约1060公里 - */ - - private String time; - private String pressure; - private String radius10; - private String speed; - private String strong; - private String movespeed; - private String radius12; - private String power; - private Double lng; - private String movedirection; - private Double lat; - private String radius7; - private String jl; - private String ckposition; - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getRadius12() { - return radius12; - } - - public void setRadius12(String radius12) { - this.radius12 = radius12; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getJl() { - return jl; - } - - public void setJl(String jl) { - this.jl = jl; - } - - public String getCkposition() { - return ckposition; - } - - public void setCkposition(String ckposition) { - this.ckposition = ckposition; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java new file mode 100644 index 0000000..91bad37 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java @@ -0,0 +1,201 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风列表数据模型 + * + * @author a203 + */ +public class TyphoonListModel { + + /** + * code : 200 + * data : [{"centerPressure":"990","engName":"Kompasu","lat":18.7,"lng":125,"moveDirection":"西北西","moveSpeed":"23","name":"圆规","power":9,"radius10":"","radius7":"200","speed":"23","time":"2021-10-11 05:00:00","typhoonId":"202118","typhoonType":"热带风暴"}] + * message : 请求成功 + * success : true + */ + + private int code; + private String message; + private boolean success; + private List data; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public static class DataBean { + /** + * centerPressure : 990 + * engName : Kompasu + * lat : 18.7 + * lng : 125 + * moveDirection : 西北西 + * moveSpeed : 23 + * name : 圆规 + * power : 9 + * radius10 : + * radius7 : 200 + * speed : 23 + * time : 2021-10-11 05:00:00 + * typhoonId : 202118 + * typhoonType : 热带风暴 + */ + + private String centerPressure; + private String engName; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private String name; + private int power; + private String radius10; + private String radius7; + private String speed; + private String time; + private String typhoonId; + private String typhoonType; + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java deleted file mode 100644 index 38a9257..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java +++ /dev/null @@ -1,237 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 61554fbe0de376d03494057c - * showapi_res_body : {"ret_code":0,"list":[{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}]} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * list : [{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}] - */ - - private int ret_code; - private List list; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * pressure : 945 - * tfid : 202116 - * radius10 : 150 - * speed : 48 - * lng : 136.40 - * radius7 : 350 - * time : 2021-09-30 08:00:00 - * movespeed : 23 - * strong : 强台风 - * name : 蒲公英 - * power : 15 - * movedirection : 北北东 - * lat : 26.60 - * enname : Mindulle - */ - - private String pressure; - private String tfid; - private String radius10; - private String speed; - private String lng; - private String radius7; - private String time; - private String movespeed; - private String strong; - private String name; - private String power; - private String movedirection; - private String lat; - private String enname; - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getLng() { - return lng; - } - - public void setLng(String lng) { - this.lng = lng; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public String getLat() { - return lat; - } - - public void setLat(String lat) { - this.lat = lat; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java new file mode 100644 index 0000000..c488237 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风移动点数据信息 服务类 + * + * @author a203 + */ +public interface ILandPointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java new file mode 100644 index 0000000..ab05570 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风登陆点数据信息 服务类 + * + * @author a203 + */ +public interface IRoutePointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java deleted file mode 100644 index d16a48b..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonLandService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java deleted file mode 100644 index 80e2765..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonPointService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java index c47a0f3..53bb971 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java @@ -19,13 +19,6 @@ void saveTyphoonList(); /** - * 更新台风详情 - */ - void updateTyphoonDetail(); - - /***上面接口从第三方存库,下面接口查库**********************/ - - /** * 查询台风列表 * * @return {@link List} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java new file mode 100644 index 0000000..fed33c1 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.LandPointMapper; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.service.ILandPointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class LandPointServiceImpl extends ServiceImpl implements ILandPointService { + + public LandPointServiceImpl() { + + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java index f8cb771..58fce60 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java @@ -2,9 +2,12 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; +import com.casic.missiles.modular.system.dto.AddressConfigDTO; import com.casic.missiles.modular.system.dto.OceanDetailDTO; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; +import com.casic.missiles.modular.system.service.IAddressConfigService; import com.casic.missiles.modular.system.service.IOceanService; +import com.casic.missiles.modular.system.utils.Constant; import com.casic.missiles.modular.system.utils.HttpRequestHelper; import org.springframework.stereotype.Service; @@ -17,23 +20,32 @@ @Service public class OceanServiceImpl implements IOceanService { - private static final String SUCCESS_CODE = "0"; + private final IAddressConfigService configService; - public OceanServiceImpl() { - + public OceanServiceImpl(IAddressConfigService configService) { + this.configService = configService; } @Override public OceanDetailDTO oceanDetail(double lng, double lat, String date, String days, String hour) { - String oceanData = HttpRequestHelper.obtainOceanData(lng, lat, date, days, hour); + AddressConfigDTO addressConfig = configService.selectLastConfig(); + String envIp = addressConfig.getEnvIp(); + if (envIp.contains(Constant.HTTP_HEADER)) { + envIp = envIp.replace(Constant.HTTP_HEADER, ""); + } + String url = Constant.HTTP_HEADER + envIp + "/environment/ocean?" + + "lng=" + lng + "&lat=" + lat + + "&date=" + date + "&days=" + days + "&hour=" + hour; + + String oceanData = HttpRequestHelper.doGet(url); /** * 解析洋流数据返回给前端 * */ OceanDetailDTO oceanDetailDTO = null; - if (SUCCESS_CODE.equals(HttpRequestHelper.getOceanCode(oceanData))) { - OceanDetailRemoteData remoteData = JSON.parseObject(oceanData, new TypeReference() { + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(oceanData)) { + OceanDetailModel remoteData = JSON.parseObject(oceanData, new TypeReference() { }); - oceanDetailDTO = new OceanDetailDTO(remoteData); + oceanDetailDTO = new OceanDetailDTO(remoteData.getData()); } return oceanDetailDTO; } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java new file mode 100644 index 0000000..24b06cd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.RoutePointMapper; +import com.casic.missiles.modular.system.model.RoutePoint; +import com.casic.missiles.modular.system.service.IRoutePointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class RoutePointServiceImpl extends ServiceImpl implements IRoutePointService { + + public RoutePointServiceImpl() { + + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java deleted file mode 100644 index d1bf2c7..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.casic.missiles.modular.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.casic.missiles.modular.system.dao.TyphoonLandMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.service.ITyphoonLandService; -import org.springframework.stereotype.Service; - -/** - * 台风数据信息 服务实现类 - * - * @author a203 - */ - -@Service -public class TyphoonLandServiceImpl extends ServiceImpl implements ITyphoonLandService { - - public TyphoonLandServiceImpl() { - - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java deleted file mode 100644 index 36815fa..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.casic.missiles.modular.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.casic.missiles.modular.system.dao.TyphoonPointMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; -import com.casic.missiles.modular.system.service.ITyphoonPointService; -import org.springframework.stereotype.Service; - -/** - * 台风数据信息 服务实现类 - * - * @author a203 - */ - -@Service -public class TyphoonPointServiceImpl extends ServiceImpl implements ITyphoonPointService { - - public TyphoonPointServiceImpl() { - - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java index 861e2c1..1cbfb01 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java @@ -5,18 +5,16 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.casic.missiles.modular.system.dao.TyphoonMapper; +import com.casic.missiles.modular.system.dto.AddressConfigDTO; import com.casic.missiles.modular.system.dto.TyphoonDTO; import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; -import com.casic.missiles.modular.system.dto.remote.TyphoonDetailRemoteData; -import com.casic.missiles.modular.system.dto.remote.TyphoonRemoteData; +import com.casic.missiles.modular.system.dto.remote.TyphoonDetailModel; +import com.casic.missiles.modular.system.dto.remote.TyphoonListModel; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.Typhoon; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; -import com.casic.missiles.modular.system.service.ITyphoonDetailService; -import com.casic.missiles.modular.system.service.ITyphoonLandService; -import com.casic.missiles.modular.system.service.ITyphoonPointService; -import com.casic.missiles.modular.system.service.ITyphoonService; +import com.casic.missiles.modular.system.service.*; import com.casic.missiles.modular.system.utils.Constant; import com.casic.missiles.modular.system.utils.HttpRequestHelper; import org.springframework.stereotype.Service; @@ -33,17 +31,29 @@ @Service public class TyphoonServiceImpl extends ServiceImpl implements ITyphoonService { - private static final String SUCCESS_CODE = "0"; + private final IAddressConfigService configService; + private final ITyphoonDetailService detailService; + private final ILandPointService landPointService; + private final IRoutePointService routePointService; - private final ITyphoonDetailService typhoonDetailService; - private final ITyphoonLandService typhoonLandService; - private final ITyphoonPointService typhoonPointService; + public TyphoonServiceImpl(IAddressConfigService configService, + ITyphoonDetailService detailService, + ILandPointService landPointService, + IRoutePointService routePointService) { + this.configService = configService; + this.detailService = detailService; + this.landPointService = landPointService; + this.routePointService = routePointService; + } - public TyphoonServiceImpl(ITyphoonDetailService typhoonDetailService, - ITyphoonLandService typhoonLandService, ITyphoonPointService typhoonPointService) { - this.typhoonDetailService = typhoonDetailService; - this.typhoonLandService = typhoonLandService; - this.typhoonPointService = typhoonPointService; + private String obtainEnvAddress() { + //获取服务器配置的IP信息 + AddressConfigDTO addressConfig = configService.selectLastConfig(); + String envIp = addressConfig.getEnvIp(); + if (envIp.contains(Constant.HTTP_HEADER)) { + envIp = envIp.replace(Constant.HTTP_HEADER, ""); + } + return envIp; } /** @@ -51,107 +61,117 @@ */ @Override public void saveTyphoonList() { + String url = Constant.HTTP_HEADER + obtainEnvAddress() + "/environment/saveTyphoon?"; /** * 获取台风接口数据 * */ - String res = HttpRequestHelper.doGet(Constant.TYPHOON_LIST + System.currentTimeMillis()); - if (SUCCESS_CODE.equals(HttpRequestHelper.getTyphoonCode(res))) { - TyphoonRemoteData remoteData = JSON.parseObject(res, new TypeReference() { + String res = HttpRequestHelper.doGet(url); + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(res)) { + TyphoonListModel listModel = JSON.parseObject(res, new TypeReference() { }); - //先清空之前的台风表,再保存最新的台风 - remove(null); - List beans = remoteData.getShowapi_res_body().getList(); - for (TyphoonRemoteData.ShowapiResBodyBean.ListBean data : beans) { - //将获取到台风数据存到数据库 + for (TyphoonListModel.DataBean data : listModel.getData()) { Typhoon entity = new Typhoon(); - entity.setTyphoonId(data.getTfid()); + entity.setTyphoonId(data.getTyphoonId()); entity.setName(data.getName()); - entity.setEngName(data.getEnname()); - entity.setLng(Double.valueOf(data.getLng())); - entity.setLat(Double.valueOf(data.getLat())); - entity.setTyphoonType(data.getStrong()); - entity.setCenterPressure(data.getPressure()); + entity.setEngName(data.getEngName()); + entity.setLng(data.getLng()); + entity.setLat(data.getLat()); + entity.setTyphoonType(data.getTyphoonType()); + entity.setCenterPressure(data.getCenterPressure()); entity.setSpeed(data.getSpeed()); - entity.setPower(Integer.valueOf(data.getPower())); - entity.setMoveSpeed(data.getMovespeed()); - entity.setMoveDirection(data.getMovedirection()); + entity.setPower(data.getPower()); + entity.setMoveSpeed(data.getMoveSpeed()); + entity.setMoveDirection(data.getMoveDirection()); entity.setRadius7(data.getRadius7()); entity.setRadius10(data.getRadius10()); entity.setTime(data.getTime()); - save(entity); + entity.setIsActive("1"); + this.baseMapper.insert(entity); } } + updateTyphoonDetail(); } /** * 更新台风详情 */ - @Override - public void updateTyphoonDetail() { - for (Typhoon typhoon : list()) { + private void updateTyphoonDetail() { + //筛选出还未消散的台风并更新详情 + List typhoons = this.baseMapper.selectCurrentTyphoon(); + for (Typhoon typhoon : typhoons) { /** * 获取台风接口数据 * */ - String res = HttpRequestHelper.doGet( - Constant.TYPHOON_DETAIL.replace("ID", typhoon.getTyphoonId()) - + System.currentTimeMillis()); - if (SUCCESS_CODE.equals(HttpRequestHelper.getTyphoonCode(res))) { - TyphoonDetailRemoteData remoteData = JSON.parseObject(res, new TypeReference() { + String url = Constant.HTTP_HEADER + obtainEnvAddress() + "/environment/updateTyphoon?typhoonId=" + typhoon.getTyphoonId(); + String res = HttpRequestHelper.doGet(url); + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(res)) { + TyphoonDetailModel detailModel = JSON.parseObject(res, new TypeReference() { }); - TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean objBean = remoteData.getShowapi_res_body().getObj(); - //保存台风基本情况存到数据库 + TyphoonDetailModel.DataBean dataBean = detailModel.getData(); + String typhoonId = dataBean.getTyphoonId(); + /** + * 保存台风基本情况存到数据库 + * */ TyphoonDetail detail = new TyphoonDetail(); - detail.setTyphoonId(objBean.getTfid()); - detail.setName(objBean.getName()); - detail.setEngName(objBean.getEnname()); - detail.setWarnLevel(objBean.getWarnlevel()); - detail.setCenterLng(Double.parseDouble(objBean.getCenterlng())); - detail.setCenterLat(Double.parseDouble(objBean.getCenterlat())); - detail.setStartTime(objBean.getStarttime()); - detail.setEndTime(objBean.getEndtime()); - detail.setIsActive(objBean.getIsactive()); - typhoonDetailService.saveOrUpdate(detail, new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); + detail.setTyphoonId(typhoonId); + detail.setName(dataBean.getName()); + detail.setEngName(dataBean.getEngName()); + detail.setWarnLevel(dataBean.getWarnLevel()); + detail.setCenterLng(dataBean.getCenterLng()); + detail.setCenterLat(dataBean.getCenterLat()); + detail.setStartTime(dataBean.getStartTime()); + detail.setEndTime(dataBean.getEndTime()); + detail.setIsActive(dataBean.getIsActive()); + QueryWrapper queryWrapper = new QueryWrapper().eq("TYPHOON_ID", typhoonId); + detailService.saveOrUpdate(detail, queryWrapper); - //保存台风登陆情况存到数据库 - List land = objBean.getLand(); - typhoonLandService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); - for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.LandBan landBan : land) { - TyphoonLand typhoonLand = new TyphoonLand(); + /** + * 更新台风列表台风状态 + * */ + typhoon.setIsActive(dataBean.getIsActive()); + saveOrUpdate(typhoon, new QueryWrapper().eq("TYPHOON_ID", typhoonId)); - typhoonLand.setTyphoonId(objBean.getTfid()); - typhoonLand.setLandAddress(landBan.getLandaddress()); - typhoonLand.setLandTime(landBan.getLandtime()); - typhoonLand.setType(landBan.getStrong()); - typhoonLand.setLng(landBan.getLng()); - typhoonLand.setLat(landBan.getLat()); - typhoonLand.setInfo(landBan.getInfo()); + /** + * 保存台风登陆情况存到数据库 + * */ + List landBans = dataBean.getLand(); + for (TyphoonDetailModel.DataBean.LandBean bean : landBans) { + LandPoint landPoint = new LandPoint(); - typhoonLandService.save(typhoonLand); + landPoint.setTyphoonId(typhoonId); + landPoint.setLandAddress(bean.getLandAddress()); + landPoint.setLandTime(bean.getLandTime()); + landPoint.setType(bean.getType()); + landPoint.setLng(bean.getLng()); + landPoint.setLat(bean.getLat()); + landPoint.setInfo(bean.getInfo()); + landPointService.save(landPoint); } - //保存台风移动路径存到数据库 - List points = objBean.getPoints(); - typhoonPointService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); - for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.PointsBean point : points) { - TyphoonPoint typhoonPoint = new TyphoonPoint(); + /** + * 保存台风移动路径存到数据库 + * */ + List routePoints = dataBean.getPoints(); + routePointService.remove(new QueryWrapper().eq("TYPHOON_ID", typhoonId)); + for (TyphoonDetailModel.DataBean.PointsBean point : routePoints) { + RoutePoint routePoint = new RoutePoint(); - typhoonPoint.setTyphoonId(objBean.getTfid()); - typhoonPoint.setTime(point.getTime()); - typhoonPoint.setCenterPressure(point.getPressure()); - typhoonPoint.setSpeed(point.getSpeed()); - typhoonPoint.setTyphoonType(point.getStrong()); - typhoonPoint.setMoveSpeed(point.getMovespeed()); - typhoonPoint.setPower(Integer.parseInt(point.getPower())); - typhoonPoint.setMoveDirection(point.getMovedirection()); - typhoonPoint.setLng(point.getLng()); - typhoonPoint.setLat(point.getLat()); - typhoonPoint.setRadius12(point.getRadius12()); - typhoonPoint.setRadius10(point.getRadius10()); - typhoonPoint.setRadius7(point.getRadius7()); - typhoonPoint.setRoutePrediction(point.getJl()); - typhoonPoint.setCenterPosition(point.getCkposition()); - - typhoonPointService.save(typhoonPoint); + routePoint.setTyphoonId(typhoonId); + routePoint.setTime(point.getTime()); + routePoint.setCenterPressure(point.getCenterPressure()); + routePoint.setSpeed(point.getSpeed()); + routePoint.setTyphoonType(point.getTyphoonType()); + routePoint.setMoveSpeed(point.getMoveSpeed()); + routePoint.setPower(point.getPower()); + routePoint.setMoveDirection(point.getMoveDirection()); + routePoint.setLng(point.getLng()); + routePoint.setLat(point.getLat()); + routePoint.setRadius12(point.getRadius12()); + routePoint.setRadius10(point.getRadius10()); + routePoint.setRadius7(point.getRadius7()); + routePoint.setRoutePrediction(point.getRoutePrediction()); + routePoint.setCenterPosition(point.getCenterPosition()); + routePointService.save(routePoint); } } } @@ -160,7 +180,9 @@ @Override public List currentTyphoonList() { List typhoonList = new ArrayList<>(); - for (Typhoon typhoon : list()) { + //筛选出还未消散的台风并更新详情 + List typhoons = this.baseMapper.selectCurrentTyphoon(); + for (Typhoon typhoon : typhoons) { typhoonList.add(new TyphoonDTO(typhoon)); } return typhoonList; @@ -168,15 +190,18 @@ @Override public TyphoonDetailDTO typhoonDetail(String typhoonId) { - TyphoonDetail detail = typhoonDetailService.getOne( + TyphoonDetail typhoonDetail = detailService.getOne( new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - List landList = typhoonLandService.list( - new QueryWrapper().eq("TYPHOON_ID", typhoonId) + if (typhoonDetail == null) { + return null; + } + List landPoints = landPointService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - List pointList = typhoonPointService.list( - new QueryWrapper().eq("TYPHOON_ID", typhoonId) + List routePoints = routePointService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - return new TyphoonDetailDTO(detail, landList, pointList); + return new TyphoonDetailDTO(typhoonDetail, landPoints, routePoints); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java deleted file mode 100644 index 552a6e9..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.casic.missiles.modular.system.utils; - -/** - * @author a203 - */ -public class Constant { - /** - * 热带气旋/台风相关常量 - */ - private static final String BASE_URL = "https://route.showapi.com"; - private static final String API_APPID = "780330"; - private static final String API_SIGN_KEY = "f30ac28b65cc447da936448c57bc5d99"; - - public static final String TYPHOON_LIST = BASE_URL - + "/342-1?" - + "showapi_appid=" + API_APPID + "&" - + "showapi_sign=" + API_SIGN_KEY + "&" - + "showapi_timestamp="; - - public static final String TYPHOON_DETAIL = BASE_URL - + "/342-2?" - + "showapi_appid=" + API_APPID + "&" - + "showapi_sign=" + API_SIGN_KEY + "&" - + "tfid=ID" + "&" - + "showapi_timestamp="; - - /** - * 洋流相关常量 - */ - private static final String OCEAN_BASE_URL = "http://api.meteo.open.ninecosmos.cn"; - public static final String OCEAN_HEADER_NAME = "Authorization"; - public static final String OCEAN_APPID = "WXZH888888"; - public static final String OCEAN_APP_KEY = "xb#bD&xtho@b80scbDb"; - - public static final String OCEAN_TOKEN = OCEAN_BASE_URL + "/us/users/open/token"; - public static final String OCEAN_DETAIL = OCEAN_BASE_URL + "/mr/netcdf/meteo/ytx"; -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java deleted file mode 100644 index 1e0cd94..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java +++ /dev/null @@ -1,115 +0,0 @@ -package com.casic.missiles.modular.system.utils; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONException; -import com.alibaba.fastjson.JSONObject; -import lombok.NonNull; -import okhttp3.*; - -import java.io.IOException; -import java.util.Objects; -import java.util.concurrent.TimeUnit; - -/** - * 网络请求工具 - * - * @author a203 - */ -public class HttpRequestHelper { - - public static RequestBody createRequestBody(String value) { - return RequestBody.create(MediaType.parse("application/json; charset=utf-8"), value); - } - - public static String doPost(Request request) { - return streamResponse(request); - } - - public static String doGet(String url) { - return streamResponse(new Request.Builder() - .url(url) - .build()); - } - - private static String streamResponse(@NonNull Request request) { - OkHttpClient httpClient = new OkHttpClient.Builder() - .connectTimeout(10, TimeUnit.SECONDS) - .writeTimeout(10, TimeUnit.SECONDS) - .readTimeout(20, TimeUnit.SECONDS) - .build(); - Call call = httpClient.newCall(request); - try { - Response response = call.execute(); - return response.body() != null ? Objects.requireNonNull(response.body()).string() : ""; - } catch (IOException e) { - e.printStackTrace(); - } - return ""; - } - - public static String obtainOceanData(double lng, double lat, String date, String days, String hour) { - /** - * 获取洋流数据Token - * */ - JSONObject object = new JSONObject(); - try { - object.put("appId", Constant.OCEAN_APPID); - object.put("appKey", Constant.OCEAN_APP_KEY); - } catch (JSONException e) { - e.printStackTrace(); - } - Request tokenRequest = new Request.Builder() - .url(Constant.OCEAN_TOKEN) - .post(HttpRequestHelper.createRequestBody(object.toJSONString())) - .build(); - String tokenJson = HttpRequestHelper.doPost(tokenRequest); - if ("".equals(tokenJson)) { - return null; - } - /** - * 解析token - * */ - JSONObject tokenObject = JSON.parseObject(tokenJson); - JSONObject dataObject = tokenObject.getJSONObject("data"); - String token = dataObject.getString("token"); - /** - * 封装请求参数 - * */ - JSONObject jsonObject = new JSONObject(); - try { - jsonObject.put("lon", lng); - jsonObject.put("lat", lat); - jsonObject.put("date", date); - jsonObject.put("hour", days); - jsonObject.put("days", hour); - } catch (JSONException e) { - e.printStackTrace(); - } - /** - * 获取洋流数据 - * */ - Request request = new Request.Builder() - .addHeader(Constant.OCEAN_HEADER_NAME, token) - .url(Constant.OCEAN_DETAIL) - .post(HttpRequestHelper.createRequestBody(jsonObject.toJSONString())) - .build(); - return HttpRequestHelper.doPost(request); - } - - public static String getTyphoonCode(String value) { - if ("".equals(value)) { - return value; - } - JSONObject jsonObject = JSON.parseObject(value); - return jsonObject.getString("showapi_res_code"); - } - - public static String getOceanCode(String value) { - if ("".equals(value)) { - return value; - } - JSONObject jsonObject = JSON.parseObject(value); - Integer code = jsonObject.getInteger("code"); - return String.valueOf(code); - } -} diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..8396364 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,31 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel.DataBean data) { + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java index a34da1b..0c5225d 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -1,8 +1,8 @@ package com.casic.missiles.modular.system.dto; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; import lombok.Data; import java.util.ArrayList; @@ -142,7 +142,7 @@ private String centerPosition; } - public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + public TyphoonDetailDTO(TyphoonDetail detail, List landPoints, List routePoints) { this.typhoonId = detail.getTyphoonId(); this.name = detail.getName(); this.engName = detail.getEngName(); @@ -152,8 +152,9 @@ this.startTime = detail.getStartTime(); this.endTime = detail.getEndTime(); this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); - for (TyphoonLand landBean : landBeans) { + for (LandPoint landBean : landPoints) { LandBan bean = new LandBan(); bean.landAddress = landBean.getLandAddress(); bean.landTime = landBean.getLandTime(); @@ -164,8 +165,9 @@ lands.add(bean); } this.land = lands; + List points = new ArrayList<>(); - for (TyphoonPoint point : pointBeans) { + for (RoutePoint point : routePoints) { PointBean pointBean = new PointBean(); pointBean.time = point.getTime(); pointBean.centerPressure = point.getCenterPressure(); diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java new file mode 100644 index 0000000..b0b2e7a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java @@ -0,0 +1,265 @@ +package com.casic.missiles.modular.system.dto.remote; + +/** + * 洋流数据模型 + * + * @author a203 + */ +public class OceanDetailModel { + + /** + * code : 200 + * data : {"altitude":0,"forecast":{"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34},"oceanDir":135.22,"pressure":100925.19,"speed":7.97,"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"temperature":28.6,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34,"windDir":71.84,"windSpeed":7.97} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * altitude : 0 + * forecast : {"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34} + * oceanDir : 135.22 + * pressure : 100925.19 + * speed : 7.97 + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * temperature : 28.6 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + * windDir : 71.84 + * windSpeed : 7.97 + */ + + private double altitude; + private ForecastBean forecast; + private double oceanDir; + private double pressure; + private double speed; + private double swellDir; + private double swellHeight; + private double swellPrd; + private double temperature; + private double waveDir; + private double waveHeight; + private double wavePrd; + private double windDir; + private double windSpeed; + + public double getAltitude() { + return altitude; + } + + public void setAltitude(double altitude) { + this.altitude = altitude; + } + + public ForecastBean getForecast() { + return forecast; + } + + public void setForecast(ForecastBean forecast) { + this.forecast = forecast; + } + + public double getOceanDir() { + return oceanDir; + } + + public void setOceanDir(double oceanDir) { + this.oceanDir = oceanDir; + } + + public double getPressure() { + return pressure; + } + + public void setPressure(double pressure) { + this.pressure = pressure; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getTemperature() { + return temperature; + } + + public void setTemperature(double temperature) { + this.temperature = temperature; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + + public double getWindDir() { + return windDir; + } + + public void setWindDir(double windDir) { + this.windDir = windDir; + } + + public double getWindSpeed() { + return windSpeed; + } + + public void setWindSpeed(double windSpeed) { + this.windSpeed = windSpeed; + } + + public static class ForecastBean { + /** + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + */ + + private double swellDir; + private double swellHeight; + private double swellPrd; + private double waveDir; + private double waveHeight; + private double wavePrd; + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java deleted file mode 100644 index 5ad3a22..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java +++ /dev/null @@ -1,439 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方洋流数据模型 - * - * @author a203 - */ -public class OceanDetailRemoteData { - - /** - * code : 0 - * data : {"lon":114.338597,"lat":18.273134,"date":"2021-10-21","hour":10,"list":[{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}]} - * message : success - * etime : 1634786517992 - */ - - private int code; - private DataBean data; - private String message; - private long etime; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public DataBean getData() { - return data; - } - - public void setData(DataBean data) { - this.data = data; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public long getEtime() { - return etime; - } - - public void setEtime(long etime) { - this.etime = etime; - } - - public static class DataBean { - /** - * lon : 114.338597 - * lat : 18.273134 - * date : 2021-10-21 - * hour : 10 - * list : [{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}] - */ - - private double lon; - private double lat; - private String date; - private int hour; - private List list; - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public int getHour() { - return hour; - } - - public void setHour(int hour) { - this.hour = hour; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * date : 2021-10-21 - * ytx : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - * meteo : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - */ - - private String date; - private YtxBean ytx; - private MeteoBean meteo; - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public YtxBean getYtx() { - return ytx; - } - - public void setYtx(YtxBean ytx) { - this.ytx = ytx; - } - - public MeteoBean getMeteo() { - return meteo; - } - - public void setMeteo(MeteoBean meteo) { - this.meteo = meteo; - } - - public static class YtxBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - - public static class MeteoBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java new file mode 100644 index 0000000..3a2e068 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java @@ -0,0 +1,374 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风数据模型 + * + * @author a203 + */ +public class TyphoonDetailModel { + + /** + * code : 200 + * data : {"centerLat":20.65,"centerLng":128.1,"endTime":"2021-10-11 8:00:00","engName":"Kompasu","isActive":"1","land":[],"name":"圆规","points":[{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}],"startTime":"2021-10-8 2:00:00","typhoonId":"202118","warnLevel":"white"} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * centerLat : 20.65 + * centerLng : 128.1 + * endTime : 2021-10-11 8:00:00 + * engName : Kompasu + * isActive : 1 + * land : [] + * name : 圆规 + * points : [{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}] + * startTime : 2021-10-8 2:00:00 + * typhoonId : 202118 + * warnLevel : white + */ + + private double centerLat; + private double centerLng; + private String endTime; + private String engName; + private String isActive; + private String name; + private String startTime; + private String typhoonId; + private String warnLevel; + private List land; + private List points; + + public double getCenterLat() { + return centerLat; + } + + public void setCenterLat(double centerLat) { + this.centerLat = centerLat; + } + + public double getCenterLng() { + return centerLng; + } + + public void setCenterLng(double centerLng) { + this.centerLng = centerLng; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public String getIsActive() { + return isActive; + } + + public void setIsActive(String isActive) { + this.isActive = isActive; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getWarnLevel() { + return warnLevel; + } + + public void setWarnLevel(String warnLevel) { + this.warnLevel = warnLevel; + } + + public List getLand() { + return land; + } + + public void setLand(List land) { + this.land = land; + } + + public static class LandBean { + private String landAddress; + private String type; + private Double lng; + private Double lat; + private String info; + private String landTime; + + public String getLandAddress() { + return landAddress; + } + + public void setLandAddress(String landAddress) { + this.landAddress = landAddress; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Double getLng() { + return lng; + } + + public void setLng(Double lng) { + this.lng = lng; + } + + public Double getLat() { + return lat; + } + + public void setLat(Double lat) { + this.lat = lat; + } + + public String getInfo() { + return info; + } + + public void setInfo(String info) { + this.info = info; + } + + public String getLandTime() { + return landTime; + } + + public void setLandTime(String landTime) { + this.landTime = landTime; + } + } + + public List getPoints() { + return points; + } + + public void setPoints(List points) { + this.points = points; + } + + public static class PointsBean { + /** + * centerPosition : 距离菲律宾马尼拉东北方向约600公里 + * centerPressure : 990 + * lat : 18.7 + * lng : 124.7 + * moveDirection : 西北西 + * moveSpeed : 25 + * power : 9 + * radius10 : + * radius12 : + * radius7 : 160|140|200|180 + * routePrediction : “圆规”将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分) + * speed : 23 + * time : 2021-10-11 8:00:00 + * typhoonType : 热带风暴 + */ + + private String centerPosition; + private String centerPressure; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private int power; + private String radius10; + private String radius12; + private String radius7; + private String routePrediction; + private String speed; + private String time; + private String typhoonType; + + public String getCenterPosition() { + return centerPosition; + } + + public void setCenterPosition(String centerPosition) { + this.centerPosition = centerPosition; + } + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius12() { + return radius12; + } + + public void setRadius12(String radius12) { + this.radius12 = radius12; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getRoutePrediction() { + return routePrediction; + } + + public void setRoutePrediction(String routePrediction) { + this.routePrediction = routePrediction; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java deleted file mode 100644 index 5b70924..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java +++ /dev/null @@ -1,419 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonDetailRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 6155596a0de376ce34c7b594 - * showapi_res_body : {"ret_code":0,"obj":{"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"}} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * obj : {"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"} - */ - - private int ret_code; - private ObjBean obj; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public ObjBean getObj() { - return obj; - } - - public void setObj(ObjBean obj) { - this.obj = obj; - } - - public static class ObjBean { - /** - * endtime : 2021-9-30 8:00:00 - * centerlng : 139.300000 - * starttime : 2021-9-23 20:00:00 - * tfid : 202116 - * isactive : 1 - * centerlat : 25.200000 - * name : 蒲公英 - * land : [{"landaddress":"朱家尖镇","strong":"强台风","lng":"122.39","lat":"29.83","info":"\u201c灿鸿\u201d11日16时40分前后登陆浙江舟山市朱家尖镇","landtime":"2015/7/11 16:40:00"}] - * warnlevel : white - * points : [{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}] - * enname : Mindulle - */ - - private String endtime; - private String centerlng; - private String starttime; - private String tfid; - private String isactive; - private String centerlat; - private String name; - private String warnlevel; - private String enname; - private List land; - private List points; - - public String getEndtime() { - return endtime; - } - - public void setEndtime(String endtime) { - this.endtime = endtime; - } - - public String getCenterlng() { - return centerlng; - } - - public void setCenterlng(String centerlng) { - this.centerlng = centerlng; - } - - public String getStarttime() { - return starttime; - } - - public void setStarttime(String starttime) { - this.starttime = starttime; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getIsactive() { - return isactive; - } - - public void setIsactive(String isactive) { - this.isactive = isactive; - } - - public String getCenterlat() { - return centerlat; - } - - public void setCenterlat(String centerlat) { - this.centerlat = centerlat; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getWarnlevel() { - return warnlevel; - } - - public void setWarnlevel(String warnlevel) { - this.warnlevel = warnlevel; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - - public List getLand() { - return land; - } - - public void setLand(List land) { - this.land = land; - } - - public static class LandBan { - /** - * landaddress : 朱家尖镇 - * strong : 强台风 - * lng : 122.39 - * lat : 29.83 - * info : “灿鸿”11日16时40分前后登陆浙江舟山市朱家尖镇 - * landtime : 2015/7/11 16:40:00 - */ - - private String landaddress; - private String strong; - private Double lng; - private Double lat; - private String info; - private String landtime; - - public String getLandaddress() { - return landaddress; - } - - public void setLandaddress(String landaddress) { - this.landaddress = landaddress; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getInfo() { - return info; - } - - public void setInfo(String info) { - this.info = info; - } - - public String getLandtime() { - return landtime; - } - - public void setLandtime(String landtime) { - this.landtime = landtime; - } - } - - public List getPoints() { - return points; - } - - public void setPoints(List points) { - this.points = points; - } - - public static class PointsBean { - /** - * time : 2021-9-23 20:00:00 - * pressure : 998 - * radius10 : - * speed : 18 - * strong : 热带风暴 - * movespeed : 20 - * radius12 : - * power : 8 - * lng : 143.30 - * movedirection : 西北西 - * lat : 13.80 - * radius7 : 250|220|200|180 - * jl : “蒲公英”将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分) - * ckposition : 距离日本东京南偏西方向约1060公里 - */ - - private String time; - private String pressure; - private String radius10; - private String speed; - private String strong; - private String movespeed; - private String radius12; - private String power; - private Double lng; - private String movedirection; - private Double lat; - private String radius7; - private String jl; - private String ckposition; - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getRadius12() { - return radius12; - } - - public void setRadius12(String radius12) { - this.radius12 = radius12; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getJl() { - return jl; - } - - public void setJl(String jl) { - this.jl = jl; - } - - public String getCkposition() { - return ckposition; - } - - public void setCkposition(String ckposition) { - this.ckposition = ckposition; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java new file mode 100644 index 0000000..91bad37 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java @@ -0,0 +1,201 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风列表数据模型 + * + * @author a203 + */ +public class TyphoonListModel { + + /** + * code : 200 + * data : [{"centerPressure":"990","engName":"Kompasu","lat":18.7,"lng":125,"moveDirection":"西北西","moveSpeed":"23","name":"圆规","power":9,"radius10":"","radius7":"200","speed":"23","time":"2021-10-11 05:00:00","typhoonId":"202118","typhoonType":"热带风暴"}] + * message : 请求成功 + * success : true + */ + + private int code; + private String message; + private boolean success; + private List data; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public static class DataBean { + /** + * centerPressure : 990 + * engName : Kompasu + * lat : 18.7 + * lng : 125 + * moveDirection : 西北西 + * moveSpeed : 23 + * name : 圆规 + * power : 9 + * radius10 : + * radius7 : 200 + * speed : 23 + * time : 2021-10-11 05:00:00 + * typhoonId : 202118 + * typhoonType : 热带风暴 + */ + + private String centerPressure; + private String engName; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private String name; + private int power; + private String radius10; + private String radius7; + private String speed; + private String time; + private String typhoonId; + private String typhoonType; + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java deleted file mode 100644 index 38a9257..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java +++ /dev/null @@ -1,237 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 61554fbe0de376d03494057c - * showapi_res_body : {"ret_code":0,"list":[{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}]} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * list : [{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}] - */ - - private int ret_code; - private List list; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * pressure : 945 - * tfid : 202116 - * radius10 : 150 - * speed : 48 - * lng : 136.40 - * radius7 : 350 - * time : 2021-09-30 08:00:00 - * movespeed : 23 - * strong : 强台风 - * name : 蒲公英 - * power : 15 - * movedirection : 北北东 - * lat : 26.60 - * enname : Mindulle - */ - - private String pressure; - private String tfid; - private String radius10; - private String speed; - private String lng; - private String radius7; - private String time; - private String movespeed; - private String strong; - private String name; - private String power; - private String movedirection; - private String lat; - private String enname; - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getLng() { - return lng; - } - - public void setLng(String lng) { - this.lng = lng; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public String getLat() { - return lat; - } - - public void setLat(String lat) { - this.lat = lat; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java new file mode 100644 index 0000000..c488237 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风移动点数据信息 服务类 + * + * @author a203 + */ +public interface ILandPointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java new file mode 100644 index 0000000..ab05570 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风登陆点数据信息 服务类 + * + * @author a203 + */ +public interface IRoutePointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java deleted file mode 100644 index d16a48b..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonLandService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java deleted file mode 100644 index 80e2765..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonPointService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java index c47a0f3..53bb971 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java @@ -19,13 +19,6 @@ void saveTyphoonList(); /** - * 更新台风详情 - */ - void updateTyphoonDetail(); - - /***上面接口从第三方存库,下面接口查库**********************/ - - /** * 查询台风列表 * * @return {@link List} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java new file mode 100644 index 0000000..fed33c1 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.LandPointMapper; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.service.ILandPointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class LandPointServiceImpl extends ServiceImpl implements ILandPointService { + + public LandPointServiceImpl() { + + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java index f8cb771..58fce60 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java @@ -2,9 +2,12 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; +import com.casic.missiles.modular.system.dto.AddressConfigDTO; import com.casic.missiles.modular.system.dto.OceanDetailDTO; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; +import com.casic.missiles.modular.system.service.IAddressConfigService; import com.casic.missiles.modular.system.service.IOceanService; +import com.casic.missiles.modular.system.utils.Constant; import com.casic.missiles.modular.system.utils.HttpRequestHelper; import org.springframework.stereotype.Service; @@ -17,23 +20,32 @@ @Service public class OceanServiceImpl implements IOceanService { - private static final String SUCCESS_CODE = "0"; + private final IAddressConfigService configService; - public OceanServiceImpl() { - + public OceanServiceImpl(IAddressConfigService configService) { + this.configService = configService; } @Override public OceanDetailDTO oceanDetail(double lng, double lat, String date, String days, String hour) { - String oceanData = HttpRequestHelper.obtainOceanData(lng, lat, date, days, hour); + AddressConfigDTO addressConfig = configService.selectLastConfig(); + String envIp = addressConfig.getEnvIp(); + if (envIp.contains(Constant.HTTP_HEADER)) { + envIp = envIp.replace(Constant.HTTP_HEADER, ""); + } + String url = Constant.HTTP_HEADER + envIp + "/environment/ocean?" + + "lng=" + lng + "&lat=" + lat + + "&date=" + date + "&days=" + days + "&hour=" + hour; + + String oceanData = HttpRequestHelper.doGet(url); /** * 解析洋流数据返回给前端 * */ OceanDetailDTO oceanDetailDTO = null; - if (SUCCESS_CODE.equals(HttpRequestHelper.getOceanCode(oceanData))) { - OceanDetailRemoteData remoteData = JSON.parseObject(oceanData, new TypeReference() { + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(oceanData)) { + OceanDetailModel remoteData = JSON.parseObject(oceanData, new TypeReference() { }); - oceanDetailDTO = new OceanDetailDTO(remoteData); + oceanDetailDTO = new OceanDetailDTO(remoteData.getData()); } return oceanDetailDTO; } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java new file mode 100644 index 0000000..24b06cd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.RoutePointMapper; +import com.casic.missiles.modular.system.model.RoutePoint; +import com.casic.missiles.modular.system.service.IRoutePointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class RoutePointServiceImpl extends ServiceImpl implements IRoutePointService { + + public RoutePointServiceImpl() { + + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java deleted file mode 100644 index d1bf2c7..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.casic.missiles.modular.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.casic.missiles.modular.system.dao.TyphoonLandMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.service.ITyphoonLandService; -import org.springframework.stereotype.Service; - -/** - * 台风数据信息 服务实现类 - * - * @author a203 - */ - -@Service -public class TyphoonLandServiceImpl extends ServiceImpl implements ITyphoonLandService { - - public TyphoonLandServiceImpl() { - - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java deleted file mode 100644 index 36815fa..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.casic.missiles.modular.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.casic.missiles.modular.system.dao.TyphoonPointMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; -import com.casic.missiles.modular.system.service.ITyphoonPointService; -import org.springframework.stereotype.Service; - -/** - * 台风数据信息 服务实现类 - * - * @author a203 - */ - -@Service -public class TyphoonPointServiceImpl extends ServiceImpl implements ITyphoonPointService { - - public TyphoonPointServiceImpl() { - - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java index 861e2c1..1cbfb01 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java @@ -5,18 +5,16 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.casic.missiles.modular.system.dao.TyphoonMapper; +import com.casic.missiles.modular.system.dto.AddressConfigDTO; import com.casic.missiles.modular.system.dto.TyphoonDTO; import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; -import com.casic.missiles.modular.system.dto.remote.TyphoonDetailRemoteData; -import com.casic.missiles.modular.system.dto.remote.TyphoonRemoteData; +import com.casic.missiles.modular.system.dto.remote.TyphoonDetailModel; +import com.casic.missiles.modular.system.dto.remote.TyphoonListModel; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.Typhoon; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; -import com.casic.missiles.modular.system.service.ITyphoonDetailService; -import com.casic.missiles.modular.system.service.ITyphoonLandService; -import com.casic.missiles.modular.system.service.ITyphoonPointService; -import com.casic.missiles.modular.system.service.ITyphoonService; +import com.casic.missiles.modular.system.service.*; import com.casic.missiles.modular.system.utils.Constant; import com.casic.missiles.modular.system.utils.HttpRequestHelper; import org.springframework.stereotype.Service; @@ -33,17 +31,29 @@ @Service public class TyphoonServiceImpl extends ServiceImpl implements ITyphoonService { - private static final String SUCCESS_CODE = "0"; + private final IAddressConfigService configService; + private final ITyphoonDetailService detailService; + private final ILandPointService landPointService; + private final IRoutePointService routePointService; - private final ITyphoonDetailService typhoonDetailService; - private final ITyphoonLandService typhoonLandService; - private final ITyphoonPointService typhoonPointService; + public TyphoonServiceImpl(IAddressConfigService configService, + ITyphoonDetailService detailService, + ILandPointService landPointService, + IRoutePointService routePointService) { + this.configService = configService; + this.detailService = detailService; + this.landPointService = landPointService; + this.routePointService = routePointService; + } - public TyphoonServiceImpl(ITyphoonDetailService typhoonDetailService, - ITyphoonLandService typhoonLandService, ITyphoonPointService typhoonPointService) { - this.typhoonDetailService = typhoonDetailService; - this.typhoonLandService = typhoonLandService; - this.typhoonPointService = typhoonPointService; + private String obtainEnvAddress() { + //获取服务器配置的IP信息 + AddressConfigDTO addressConfig = configService.selectLastConfig(); + String envIp = addressConfig.getEnvIp(); + if (envIp.contains(Constant.HTTP_HEADER)) { + envIp = envIp.replace(Constant.HTTP_HEADER, ""); + } + return envIp; } /** @@ -51,107 +61,117 @@ */ @Override public void saveTyphoonList() { + String url = Constant.HTTP_HEADER + obtainEnvAddress() + "/environment/saveTyphoon?"; /** * 获取台风接口数据 * */ - String res = HttpRequestHelper.doGet(Constant.TYPHOON_LIST + System.currentTimeMillis()); - if (SUCCESS_CODE.equals(HttpRequestHelper.getTyphoonCode(res))) { - TyphoonRemoteData remoteData = JSON.parseObject(res, new TypeReference() { + String res = HttpRequestHelper.doGet(url); + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(res)) { + TyphoonListModel listModel = JSON.parseObject(res, new TypeReference() { }); - //先清空之前的台风表,再保存最新的台风 - remove(null); - List beans = remoteData.getShowapi_res_body().getList(); - for (TyphoonRemoteData.ShowapiResBodyBean.ListBean data : beans) { - //将获取到台风数据存到数据库 + for (TyphoonListModel.DataBean data : listModel.getData()) { Typhoon entity = new Typhoon(); - entity.setTyphoonId(data.getTfid()); + entity.setTyphoonId(data.getTyphoonId()); entity.setName(data.getName()); - entity.setEngName(data.getEnname()); - entity.setLng(Double.valueOf(data.getLng())); - entity.setLat(Double.valueOf(data.getLat())); - entity.setTyphoonType(data.getStrong()); - entity.setCenterPressure(data.getPressure()); + entity.setEngName(data.getEngName()); + entity.setLng(data.getLng()); + entity.setLat(data.getLat()); + entity.setTyphoonType(data.getTyphoonType()); + entity.setCenterPressure(data.getCenterPressure()); entity.setSpeed(data.getSpeed()); - entity.setPower(Integer.valueOf(data.getPower())); - entity.setMoveSpeed(data.getMovespeed()); - entity.setMoveDirection(data.getMovedirection()); + entity.setPower(data.getPower()); + entity.setMoveSpeed(data.getMoveSpeed()); + entity.setMoveDirection(data.getMoveDirection()); entity.setRadius7(data.getRadius7()); entity.setRadius10(data.getRadius10()); entity.setTime(data.getTime()); - save(entity); + entity.setIsActive("1"); + this.baseMapper.insert(entity); } } + updateTyphoonDetail(); } /** * 更新台风详情 */ - @Override - public void updateTyphoonDetail() { - for (Typhoon typhoon : list()) { + private void updateTyphoonDetail() { + //筛选出还未消散的台风并更新详情 + List typhoons = this.baseMapper.selectCurrentTyphoon(); + for (Typhoon typhoon : typhoons) { /** * 获取台风接口数据 * */ - String res = HttpRequestHelper.doGet( - Constant.TYPHOON_DETAIL.replace("ID", typhoon.getTyphoonId()) - + System.currentTimeMillis()); - if (SUCCESS_CODE.equals(HttpRequestHelper.getTyphoonCode(res))) { - TyphoonDetailRemoteData remoteData = JSON.parseObject(res, new TypeReference() { + String url = Constant.HTTP_HEADER + obtainEnvAddress() + "/environment/updateTyphoon?typhoonId=" + typhoon.getTyphoonId(); + String res = HttpRequestHelper.doGet(url); + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(res)) { + TyphoonDetailModel detailModel = JSON.parseObject(res, new TypeReference() { }); - TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean objBean = remoteData.getShowapi_res_body().getObj(); - //保存台风基本情况存到数据库 + TyphoonDetailModel.DataBean dataBean = detailModel.getData(); + String typhoonId = dataBean.getTyphoonId(); + /** + * 保存台风基本情况存到数据库 + * */ TyphoonDetail detail = new TyphoonDetail(); - detail.setTyphoonId(objBean.getTfid()); - detail.setName(objBean.getName()); - detail.setEngName(objBean.getEnname()); - detail.setWarnLevel(objBean.getWarnlevel()); - detail.setCenterLng(Double.parseDouble(objBean.getCenterlng())); - detail.setCenterLat(Double.parseDouble(objBean.getCenterlat())); - detail.setStartTime(objBean.getStarttime()); - detail.setEndTime(objBean.getEndtime()); - detail.setIsActive(objBean.getIsactive()); - typhoonDetailService.saveOrUpdate(detail, new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); + detail.setTyphoonId(typhoonId); + detail.setName(dataBean.getName()); + detail.setEngName(dataBean.getEngName()); + detail.setWarnLevel(dataBean.getWarnLevel()); + detail.setCenterLng(dataBean.getCenterLng()); + detail.setCenterLat(dataBean.getCenterLat()); + detail.setStartTime(dataBean.getStartTime()); + detail.setEndTime(dataBean.getEndTime()); + detail.setIsActive(dataBean.getIsActive()); + QueryWrapper queryWrapper = new QueryWrapper().eq("TYPHOON_ID", typhoonId); + detailService.saveOrUpdate(detail, queryWrapper); - //保存台风登陆情况存到数据库 - List land = objBean.getLand(); - typhoonLandService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); - for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.LandBan landBan : land) { - TyphoonLand typhoonLand = new TyphoonLand(); + /** + * 更新台风列表台风状态 + * */ + typhoon.setIsActive(dataBean.getIsActive()); + saveOrUpdate(typhoon, new QueryWrapper().eq("TYPHOON_ID", typhoonId)); - typhoonLand.setTyphoonId(objBean.getTfid()); - typhoonLand.setLandAddress(landBan.getLandaddress()); - typhoonLand.setLandTime(landBan.getLandtime()); - typhoonLand.setType(landBan.getStrong()); - typhoonLand.setLng(landBan.getLng()); - typhoonLand.setLat(landBan.getLat()); - typhoonLand.setInfo(landBan.getInfo()); + /** + * 保存台风登陆情况存到数据库 + * */ + List landBans = dataBean.getLand(); + for (TyphoonDetailModel.DataBean.LandBean bean : landBans) { + LandPoint landPoint = new LandPoint(); - typhoonLandService.save(typhoonLand); + landPoint.setTyphoonId(typhoonId); + landPoint.setLandAddress(bean.getLandAddress()); + landPoint.setLandTime(bean.getLandTime()); + landPoint.setType(bean.getType()); + landPoint.setLng(bean.getLng()); + landPoint.setLat(bean.getLat()); + landPoint.setInfo(bean.getInfo()); + landPointService.save(landPoint); } - //保存台风移动路径存到数据库 - List points = objBean.getPoints(); - typhoonPointService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); - for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.PointsBean point : points) { - TyphoonPoint typhoonPoint = new TyphoonPoint(); + /** + * 保存台风移动路径存到数据库 + * */ + List routePoints = dataBean.getPoints(); + routePointService.remove(new QueryWrapper().eq("TYPHOON_ID", typhoonId)); + for (TyphoonDetailModel.DataBean.PointsBean point : routePoints) { + RoutePoint routePoint = new RoutePoint(); - typhoonPoint.setTyphoonId(objBean.getTfid()); - typhoonPoint.setTime(point.getTime()); - typhoonPoint.setCenterPressure(point.getPressure()); - typhoonPoint.setSpeed(point.getSpeed()); - typhoonPoint.setTyphoonType(point.getStrong()); - typhoonPoint.setMoveSpeed(point.getMovespeed()); - typhoonPoint.setPower(Integer.parseInt(point.getPower())); - typhoonPoint.setMoveDirection(point.getMovedirection()); - typhoonPoint.setLng(point.getLng()); - typhoonPoint.setLat(point.getLat()); - typhoonPoint.setRadius12(point.getRadius12()); - typhoonPoint.setRadius10(point.getRadius10()); - typhoonPoint.setRadius7(point.getRadius7()); - typhoonPoint.setRoutePrediction(point.getJl()); - typhoonPoint.setCenterPosition(point.getCkposition()); - - typhoonPointService.save(typhoonPoint); + routePoint.setTyphoonId(typhoonId); + routePoint.setTime(point.getTime()); + routePoint.setCenterPressure(point.getCenterPressure()); + routePoint.setSpeed(point.getSpeed()); + routePoint.setTyphoonType(point.getTyphoonType()); + routePoint.setMoveSpeed(point.getMoveSpeed()); + routePoint.setPower(point.getPower()); + routePoint.setMoveDirection(point.getMoveDirection()); + routePoint.setLng(point.getLng()); + routePoint.setLat(point.getLat()); + routePoint.setRadius12(point.getRadius12()); + routePoint.setRadius10(point.getRadius10()); + routePoint.setRadius7(point.getRadius7()); + routePoint.setRoutePrediction(point.getRoutePrediction()); + routePoint.setCenterPosition(point.getCenterPosition()); + routePointService.save(routePoint); } } } @@ -160,7 +180,9 @@ @Override public List currentTyphoonList() { List typhoonList = new ArrayList<>(); - for (Typhoon typhoon : list()) { + //筛选出还未消散的台风并更新详情 + List typhoons = this.baseMapper.selectCurrentTyphoon(); + for (Typhoon typhoon : typhoons) { typhoonList.add(new TyphoonDTO(typhoon)); } return typhoonList; @@ -168,15 +190,18 @@ @Override public TyphoonDetailDTO typhoonDetail(String typhoonId) { - TyphoonDetail detail = typhoonDetailService.getOne( + TyphoonDetail typhoonDetail = detailService.getOne( new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - List landList = typhoonLandService.list( - new QueryWrapper().eq("TYPHOON_ID", typhoonId) + if (typhoonDetail == null) { + return null; + } + List landPoints = landPointService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - List pointList = typhoonPointService.list( - new QueryWrapper().eq("TYPHOON_ID", typhoonId) + List routePoints = routePointService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - return new TyphoonDetailDTO(detail, landList, pointList); + return new TyphoonDetailDTO(typhoonDetail, landPoints, routePoints); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java deleted file mode 100644 index 552a6e9..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.casic.missiles.modular.system.utils; - -/** - * @author a203 - */ -public class Constant { - /** - * 热带气旋/台风相关常量 - */ - private static final String BASE_URL = "https://route.showapi.com"; - private static final String API_APPID = "780330"; - private static final String API_SIGN_KEY = "f30ac28b65cc447da936448c57bc5d99"; - - public static final String TYPHOON_LIST = BASE_URL - + "/342-1?" - + "showapi_appid=" + API_APPID + "&" - + "showapi_sign=" + API_SIGN_KEY + "&" - + "showapi_timestamp="; - - public static final String TYPHOON_DETAIL = BASE_URL - + "/342-2?" - + "showapi_appid=" + API_APPID + "&" - + "showapi_sign=" + API_SIGN_KEY + "&" - + "tfid=ID" + "&" - + "showapi_timestamp="; - - /** - * 洋流相关常量 - */ - private static final String OCEAN_BASE_URL = "http://api.meteo.open.ninecosmos.cn"; - public static final String OCEAN_HEADER_NAME = "Authorization"; - public static final String OCEAN_APPID = "WXZH888888"; - public static final String OCEAN_APP_KEY = "xb#bD&xtho@b80scbDb"; - - public static final String OCEAN_TOKEN = OCEAN_BASE_URL + "/us/users/open/token"; - public static final String OCEAN_DETAIL = OCEAN_BASE_URL + "/mr/netcdf/meteo/ytx"; -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java deleted file mode 100644 index 1e0cd94..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java +++ /dev/null @@ -1,115 +0,0 @@ -package com.casic.missiles.modular.system.utils; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONException; -import com.alibaba.fastjson.JSONObject; -import lombok.NonNull; -import okhttp3.*; - -import java.io.IOException; -import java.util.Objects; -import java.util.concurrent.TimeUnit; - -/** - * 网络请求工具 - * - * @author a203 - */ -public class HttpRequestHelper { - - public static RequestBody createRequestBody(String value) { - return RequestBody.create(MediaType.parse("application/json; charset=utf-8"), value); - } - - public static String doPost(Request request) { - return streamResponse(request); - } - - public static String doGet(String url) { - return streamResponse(new Request.Builder() - .url(url) - .build()); - } - - private static String streamResponse(@NonNull Request request) { - OkHttpClient httpClient = new OkHttpClient.Builder() - .connectTimeout(10, TimeUnit.SECONDS) - .writeTimeout(10, TimeUnit.SECONDS) - .readTimeout(20, TimeUnit.SECONDS) - .build(); - Call call = httpClient.newCall(request); - try { - Response response = call.execute(); - return response.body() != null ? Objects.requireNonNull(response.body()).string() : ""; - } catch (IOException e) { - e.printStackTrace(); - } - return ""; - } - - public static String obtainOceanData(double lng, double lat, String date, String days, String hour) { - /** - * 获取洋流数据Token - * */ - JSONObject object = new JSONObject(); - try { - object.put("appId", Constant.OCEAN_APPID); - object.put("appKey", Constant.OCEAN_APP_KEY); - } catch (JSONException e) { - e.printStackTrace(); - } - Request tokenRequest = new Request.Builder() - .url(Constant.OCEAN_TOKEN) - .post(HttpRequestHelper.createRequestBody(object.toJSONString())) - .build(); - String tokenJson = HttpRequestHelper.doPost(tokenRequest); - if ("".equals(tokenJson)) { - return null; - } - /** - * 解析token - * */ - JSONObject tokenObject = JSON.parseObject(tokenJson); - JSONObject dataObject = tokenObject.getJSONObject("data"); - String token = dataObject.getString("token"); - /** - * 封装请求参数 - * */ - JSONObject jsonObject = new JSONObject(); - try { - jsonObject.put("lon", lng); - jsonObject.put("lat", lat); - jsonObject.put("date", date); - jsonObject.put("hour", days); - jsonObject.put("days", hour); - } catch (JSONException e) { - e.printStackTrace(); - } - /** - * 获取洋流数据 - * */ - Request request = new Request.Builder() - .addHeader(Constant.OCEAN_HEADER_NAME, token) - .url(Constant.OCEAN_DETAIL) - .post(HttpRequestHelper.createRequestBody(jsonObject.toJSONString())) - .build(); - return HttpRequestHelper.doPost(request); - } - - public static String getTyphoonCode(String value) { - if ("".equals(value)) { - return value; - } - JSONObject jsonObject = JSON.parseObject(value); - return jsonObject.getString("showapi_res_code"); - } - - public static String getOceanCode(String value) { - if ("".equals(value)) { - return value; - } - JSONObject jsonObject = JSON.parseObject(value); - Integer code = jsonObject.getInteger("code"); - return String.valueOf(code); - } -} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/LandPoint.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/LandPoint.java new file mode 100644 index 0000000..f6d61ba --- /dev/null +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/LandPoint.java @@ -0,0 +1,67 @@ +package com.casic.missiles.modular.system.model; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import lombok.Data; + +/** + * 台风登陆点数据库模型 + * + * @author a203 + */ +@Data +@TableName("tf_land_point") +public class LandPoint extends Model { + private static final long serialVersionUID = 1L; + + /** + * 台风数据库主键 + */ + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private Long id; + + /** + * 台风ID + */ + @TableField("TYPHOON_ID") + private String typhoonId; + + /** + * 台风登陆点 + */ + @TableField("LAND_ADDRESS") + private String landAddress; + + /** + * 台风登陆时间 + */ + @TableField("LAND_TIME") + private String landTime; + + /** + * 台风类型-热带风暴/强台风... + */ + @TableField("TYPE") + private String type; + + /** + * 经度 + */ + @TableField("LNG") + private Double lng; + + /** + * 纬度 + */ + @TableField("LAT") + private Double lat; + + /** + * 台风登陆细节 + */ + @TableField("INFO") + private String info; +} diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..8396364 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,31 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel.DataBean data) { + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java index a34da1b..0c5225d 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -1,8 +1,8 @@ package com.casic.missiles.modular.system.dto; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; import lombok.Data; import java.util.ArrayList; @@ -142,7 +142,7 @@ private String centerPosition; } - public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + public TyphoonDetailDTO(TyphoonDetail detail, List landPoints, List routePoints) { this.typhoonId = detail.getTyphoonId(); this.name = detail.getName(); this.engName = detail.getEngName(); @@ -152,8 +152,9 @@ this.startTime = detail.getStartTime(); this.endTime = detail.getEndTime(); this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); - for (TyphoonLand landBean : landBeans) { + for (LandPoint landBean : landPoints) { LandBan bean = new LandBan(); bean.landAddress = landBean.getLandAddress(); bean.landTime = landBean.getLandTime(); @@ -164,8 +165,9 @@ lands.add(bean); } this.land = lands; + List points = new ArrayList<>(); - for (TyphoonPoint point : pointBeans) { + for (RoutePoint point : routePoints) { PointBean pointBean = new PointBean(); pointBean.time = point.getTime(); pointBean.centerPressure = point.getCenterPressure(); diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java new file mode 100644 index 0000000..b0b2e7a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java @@ -0,0 +1,265 @@ +package com.casic.missiles.modular.system.dto.remote; + +/** + * 洋流数据模型 + * + * @author a203 + */ +public class OceanDetailModel { + + /** + * code : 200 + * data : {"altitude":0,"forecast":{"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34},"oceanDir":135.22,"pressure":100925.19,"speed":7.97,"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"temperature":28.6,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34,"windDir":71.84,"windSpeed":7.97} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * altitude : 0 + * forecast : {"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34} + * oceanDir : 135.22 + * pressure : 100925.19 + * speed : 7.97 + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * temperature : 28.6 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + * windDir : 71.84 + * windSpeed : 7.97 + */ + + private double altitude; + private ForecastBean forecast; + private double oceanDir; + private double pressure; + private double speed; + private double swellDir; + private double swellHeight; + private double swellPrd; + private double temperature; + private double waveDir; + private double waveHeight; + private double wavePrd; + private double windDir; + private double windSpeed; + + public double getAltitude() { + return altitude; + } + + public void setAltitude(double altitude) { + this.altitude = altitude; + } + + public ForecastBean getForecast() { + return forecast; + } + + public void setForecast(ForecastBean forecast) { + this.forecast = forecast; + } + + public double getOceanDir() { + return oceanDir; + } + + public void setOceanDir(double oceanDir) { + this.oceanDir = oceanDir; + } + + public double getPressure() { + return pressure; + } + + public void setPressure(double pressure) { + this.pressure = pressure; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getTemperature() { + return temperature; + } + + public void setTemperature(double temperature) { + this.temperature = temperature; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + + public double getWindDir() { + return windDir; + } + + public void setWindDir(double windDir) { + this.windDir = windDir; + } + + public double getWindSpeed() { + return windSpeed; + } + + public void setWindSpeed(double windSpeed) { + this.windSpeed = windSpeed; + } + + public static class ForecastBean { + /** + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + */ + + private double swellDir; + private double swellHeight; + private double swellPrd; + private double waveDir; + private double waveHeight; + private double wavePrd; + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java deleted file mode 100644 index 5ad3a22..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java +++ /dev/null @@ -1,439 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方洋流数据模型 - * - * @author a203 - */ -public class OceanDetailRemoteData { - - /** - * code : 0 - * data : {"lon":114.338597,"lat":18.273134,"date":"2021-10-21","hour":10,"list":[{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}]} - * message : success - * etime : 1634786517992 - */ - - private int code; - private DataBean data; - private String message; - private long etime; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public DataBean getData() { - return data; - } - - public void setData(DataBean data) { - this.data = data; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public long getEtime() { - return etime; - } - - public void setEtime(long etime) { - this.etime = etime; - } - - public static class DataBean { - /** - * lon : 114.338597 - * lat : 18.273134 - * date : 2021-10-21 - * hour : 10 - * list : [{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}] - */ - - private double lon; - private double lat; - private String date; - private int hour; - private List list; - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public int getHour() { - return hour; - } - - public void setHour(int hour) { - this.hour = hour; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * date : 2021-10-21 - * ytx : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - * meteo : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - */ - - private String date; - private YtxBean ytx; - private MeteoBean meteo; - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public YtxBean getYtx() { - return ytx; - } - - public void setYtx(YtxBean ytx) { - this.ytx = ytx; - } - - public MeteoBean getMeteo() { - return meteo; - } - - public void setMeteo(MeteoBean meteo) { - this.meteo = meteo; - } - - public static class YtxBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - - public static class MeteoBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java new file mode 100644 index 0000000..3a2e068 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java @@ -0,0 +1,374 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风数据模型 + * + * @author a203 + */ +public class TyphoonDetailModel { + + /** + * code : 200 + * data : {"centerLat":20.65,"centerLng":128.1,"endTime":"2021-10-11 8:00:00","engName":"Kompasu","isActive":"1","land":[],"name":"圆规","points":[{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}],"startTime":"2021-10-8 2:00:00","typhoonId":"202118","warnLevel":"white"} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * centerLat : 20.65 + * centerLng : 128.1 + * endTime : 2021-10-11 8:00:00 + * engName : Kompasu + * isActive : 1 + * land : [] + * name : 圆规 + * points : [{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}] + * startTime : 2021-10-8 2:00:00 + * typhoonId : 202118 + * warnLevel : white + */ + + private double centerLat; + private double centerLng; + private String endTime; + private String engName; + private String isActive; + private String name; + private String startTime; + private String typhoonId; + private String warnLevel; + private List land; + private List points; + + public double getCenterLat() { + return centerLat; + } + + public void setCenterLat(double centerLat) { + this.centerLat = centerLat; + } + + public double getCenterLng() { + return centerLng; + } + + public void setCenterLng(double centerLng) { + this.centerLng = centerLng; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public String getIsActive() { + return isActive; + } + + public void setIsActive(String isActive) { + this.isActive = isActive; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getWarnLevel() { + return warnLevel; + } + + public void setWarnLevel(String warnLevel) { + this.warnLevel = warnLevel; + } + + public List getLand() { + return land; + } + + public void setLand(List land) { + this.land = land; + } + + public static class LandBean { + private String landAddress; + private String type; + private Double lng; + private Double lat; + private String info; + private String landTime; + + public String getLandAddress() { + return landAddress; + } + + public void setLandAddress(String landAddress) { + this.landAddress = landAddress; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Double getLng() { + return lng; + } + + public void setLng(Double lng) { + this.lng = lng; + } + + public Double getLat() { + return lat; + } + + public void setLat(Double lat) { + this.lat = lat; + } + + public String getInfo() { + return info; + } + + public void setInfo(String info) { + this.info = info; + } + + public String getLandTime() { + return landTime; + } + + public void setLandTime(String landTime) { + this.landTime = landTime; + } + } + + public List getPoints() { + return points; + } + + public void setPoints(List points) { + this.points = points; + } + + public static class PointsBean { + /** + * centerPosition : 距离菲律宾马尼拉东北方向约600公里 + * centerPressure : 990 + * lat : 18.7 + * lng : 124.7 + * moveDirection : 西北西 + * moveSpeed : 25 + * power : 9 + * radius10 : + * radius12 : + * radius7 : 160|140|200|180 + * routePrediction : “圆规”将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分) + * speed : 23 + * time : 2021-10-11 8:00:00 + * typhoonType : 热带风暴 + */ + + private String centerPosition; + private String centerPressure; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private int power; + private String radius10; + private String radius12; + private String radius7; + private String routePrediction; + private String speed; + private String time; + private String typhoonType; + + public String getCenterPosition() { + return centerPosition; + } + + public void setCenterPosition(String centerPosition) { + this.centerPosition = centerPosition; + } + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius12() { + return radius12; + } + + public void setRadius12(String radius12) { + this.radius12 = radius12; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getRoutePrediction() { + return routePrediction; + } + + public void setRoutePrediction(String routePrediction) { + this.routePrediction = routePrediction; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java deleted file mode 100644 index 5b70924..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java +++ /dev/null @@ -1,419 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonDetailRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 6155596a0de376ce34c7b594 - * showapi_res_body : {"ret_code":0,"obj":{"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"}} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * obj : {"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"} - */ - - private int ret_code; - private ObjBean obj; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public ObjBean getObj() { - return obj; - } - - public void setObj(ObjBean obj) { - this.obj = obj; - } - - public static class ObjBean { - /** - * endtime : 2021-9-30 8:00:00 - * centerlng : 139.300000 - * starttime : 2021-9-23 20:00:00 - * tfid : 202116 - * isactive : 1 - * centerlat : 25.200000 - * name : 蒲公英 - * land : [{"landaddress":"朱家尖镇","strong":"强台风","lng":"122.39","lat":"29.83","info":"\u201c灿鸿\u201d11日16时40分前后登陆浙江舟山市朱家尖镇","landtime":"2015/7/11 16:40:00"}] - * warnlevel : white - * points : [{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}] - * enname : Mindulle - */ - - private String endtime; - private String centerlng; - private String starttime; - private String tfid; - private String isactive; - private String centerlat; - private String name; - private String warnlevel; - private String enname; - private List land; - private List points; - - public String getEndtime() { - return endtime; - } - - public void setEndtime(String endtime) { - this.endtime = endtime; - } - - public String getCenterlng() { - return centerlng; - } - - public void setCenterlng(String centerlng) { - this.centerlng = centerlng; - } - - public String getStarttime() { - return starttime; - } - - public void setStarttime(String starttime) { - this.starttime = starttime; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getIsactive() { - return isactive; - } - - public void setIsactive(String isactive) { - this.isactive = isactive; - } - - public String getCenterlat() { - return centerlat; - } - - public void setCenterlat(String centerlat) { - this.centerlat = centerlat; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getWarnlevel() { - return warnlevel; - } - - public void setWarnlevel(String warnlevel) { - this.warnlevel = warnlevel; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - - public List getLand() { - return land; - } - - public void setLand(List land) { - this.land = land; - } - - public static class LandBan { - /** - * landaddress : 朱家尖镇 - * strong : 强台风 - * lng : 122.39 - * lat : 29.83 - * info : “灿鸿”11日16时40分前后登陆浙江舟山市朱家尖镇 - * landtime : 2015/7/11 16:40:00 - */ - - private String landaddress; - private String strong; - private Double lng; - private Double lat; - private String info; - private String landtime; - - public String getLandaddress() { - return landaddress; - } - - public void setLandaddress(String landaddress) { - this.landaddress = landaddress; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getInfo() { - return info; - } - - public void setInfo(String info) { - this.info = info; - } - - public String getLandtime() { - return landtime; - } - - public void setLandtime(String landtime) { - this.landtime = landtime; - } - } - - public List getPoints() { - return points; - } - - public void setPoints(List points) { - this.points = points; - } - - public static class PointsBean { - /** - * time : 2021-9-23 20:00:00 - * pressure : 998 - * radius10 : - * speed : 18 - * strong : 热带风暴 - * movespeed : 20 - * radius12 : - * power : 8 - * lng : 143.30 - * movedirection : 西北西 - * lat : 13.80 - * radius7 : 250|220|200|180 - * jl : “蒲公英”将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分) - * ckposition : 距离日本东京南偏西方向约1060公里 - */ - - private String time; - private String pressure; - private String radius10; - private String speed; - private String strong; - private String movespeed; - private String radius12; - private String power; - private Double lng; - private String movedirection; - private Double lat; - private String radius7; - private String jl; - private String ckposition; - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getRadius12() { - return radius12; - } - - public void setRadius12(String radius12) { - this.radius12 = radius12; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getJl() { - return jl; - } - - public void setJl(String jl) { - this.jl = jl; - } - - public String getCkposition() { - return ckposition; - } - - public void setCkposition(String ckposition) { - this.ckposition = ckposition; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java new file mode 100644 index 0000000..91bad37 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java @@ -0,0 +1,201 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风列表数据模型 + * + * @author a203 + */ +public class TyphoonListModel { + + /** + * code : 200 + * data : [{"centerPressure":"990","engName":"Kompasu","lat":18.7,"lng":125,"moveDirection":"西北西","moveSpeed":"23","name":"圆规","power":9,"radius10":"","radius7":"200","speed":"23","time":"2021-10-11 05:00:00","typhoonId":"202118","typhoonType":"热带风暴"}] + * message : 请求成功 + * success : true + */ + + private int code; + private String message; + private boolean success; + private List data; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public static class DataBean { + /** + * centerPressure : 990 + * engName : Kompasu + * lat : 18.7 + * lng : 125 + * moveDirection : 西北西 + * moveSpeed : 23 + * name : 圆规 + * power : 9 + * radius10 : + * radius7 : 200 + * speed : 23 + * time : 2021-10-11 05:00:00 + * typhoonId : 202118 + * typhoonType : 热带风暴 + */ + + private String centerPressure; + private String engName; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private String name; + private int power; + private String radius10; + private String radius7; + private String speed; + private String time; + private String typhoonId; + private String typhoonType; + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java deleted file mode 100644 index 38a9257..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java +++ /dev/null @@ -1,237 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 61554fbe0de376d03494057c - * showapi_res_body : {"ret_code":0,"list":[{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}]} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * list : [{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}] - */ - - private int ret_code; - private List list; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * pressure : 945 - * tfid : 202116 - * radius10 : 150 - * speed : 48 - * lng : 136.40 - * radius7 : 350 - * time : 2021-09-30 08:00:00 - * movespeed : 23 - * strong : 强台风 - * name : 蒲公英 - * power : 15 - * movedirection : 北北东 - * lat : 26.60 - * enname : Mindulle - */ - - private String pressure; - private String tfid; - private String radius10; - private String speed; - private String lng; - private String radius7; - private String time; - private String movespeed; - private String strong; - private String name; - private String power; - private String movedirection; - private String lat; - private String enname; - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getLng() { - return lng; - } - - public void setLng(String lng) { - this.lng = lng; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public String getLat() { - return lat; - } - - public void setLat(String lat) { - this.lat = lat; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java new file mode 100644 index 0000000..c488237 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风移动点数据信息 服务类 + * + * @author a203 + */ +public interface ILandPointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java new file mode 100644 index 0000000..ab05570 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风登陆点数据信息 服务类 + * + * @author a203 + */ +public interface IRoutePointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java deleted file mode 100644 index d16a48b..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonLandService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java deleted file mode 100644 index 80e2765..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonPointService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java index c47a0f3..53bb971 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java @@ -19,13 +19,6 @@ void saveTyphoonList(); /** - * 更新台风详情 - */ - void updateTyphoonDetail(); - - /***上面接口从第三方存库,下面接口查库**********************/ - - /** * 查询台风列表 * * @return {@link List} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java new file mode 100644 index 0000000..fed33c1 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.LandPointMapper; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.service.ILandPointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class LandPointServiceImpl extends ServiceImpl implements ILandPointService { + + public LandPointServiceImpl() { + + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java index f8cb771..58fce60 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java @@ -2,9 +2,12 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; +import com.casic.missiles.modular.system.dto.AddressConfigDTO; import com.casic.missiles.modular.system.dto.OceanDetailDTO; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; +import com.casic.missiles.modular.system.service.IAddressConfigService; import com.casic.missiles.modular.system.service.IOceanService; +import com.casic.missiles.modular.system.utils.Constant; import com.casic.missiles.modular.system.utils.HttpRequestHelper; import org.springframework.stereotype.Service; @@ -17,23 +20,32 @@ @Service public class OceanServiceImpl implements IOceanService { - private static final String SUCCESS_CODE = "0"; + private final IAddressConfigService configService; - public OceanServiceImpl() { - + public OceanServiceImpl(IAddressConfigService configService) { + this.configService = configService; } @Override public OceanDetailDTO oceanDetail(double lng, double lat, String date, String days, String hour) { - String oceanData = HttpRequestHelper.obtainOceanData(lng, lat, date, days, hour); + AddressConfigDTO addressConfig = configService.selectLastConfig(); + String envIp = addressConfig.getEnvIp(); + if (envIp.contains(Constant.HTTP_HEADER)) { + envIp = envIp.replace(Constant.HTTP_HEADER, ""); + } + String url = Constant.HTTP_HEADER + envIp + "/environment/ocean?" + + "lng=" + lng + "&lat=" + lat + + "&date=" + date + "&days=" + days + "&hour=" + hour; + + String oceanData = HttpRequestHelper.doGet(url); /** * 解析洋流数据返回给前端 * */ OceanDetailDTO oceanDetailDTO = null; - if (SUCCESS_CODE.equals(HttpRequestHelper.getOceanCode(oceanData))) { - OceanDetailRemoteData remoteData = JSON.parseObject(oceanData, new TypeReference() { + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(oceanData)) { + OceanDetailModel remoteData = JSON.parseObject(oceanData, new TypeReference() { }); - oceanDetailDTO = new OceanDetailDTO(remoteData); + oceanDetailDTO = new OceanDetailDTO(remoteData.getData()); } return oceanDetailDTO; } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java new file mode 100644 index 0000000..24b06cd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.RoutePointMapper; +import com.casic.missiles.modular.system.model.RoutePoint; +import com.casic.missiles.modular.system.service.IRoutePointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class RoutePointServiceImpl extends ServiceImpl implements IRoutePointService { + + public RoutePointServiceImpl() { + + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java deleted file mode 100644 index d1bf2c7..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.casic.missiles.modular.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.casic.missiles.modular.system.dao.TyphoonLandMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.service.ITyphoonLandService; -import org.springframework.stereotype.Service; - -/** - * 台风数据信息 服务实现类 - * - * @author a203 - */ - -@Service -public class TyphoonLandServiceImpl extends ServiceImpl implements ITyphoonLandService { - - public TyphoonLandServiceImpl() { - - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java deleted file mode 100644 index 36815fa..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.casic.missiles.modular.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.casic.missiles.modular.system.dao.TyphoonPointMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; -import com.casic.missiles.modular.system.service.ITyphoonPointService; -import org.springframework.stereotype.Service; - -/** - * 台风数据信息 服务实现类 - * - * @author a203 - */ - -@Service -public class TyphoonPointServiceImpl extends ServiceImpl implements ITyphoonPointService { - - public TyphoonPointServiceImpl() { - - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java index 861e2c1..1cbfb01 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java @@ -5,18 +5,16 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.casic.missiles.modular.system.dao.TyphoonMapper; +import com.casic.missiles.modular.system.dto.AddressConfigDTO; import com.casic.missiles.modular.system.dto.TyphoonDTO; import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; -import com.casic.missiles.modular.system.dto.remote.TyphoonDetailRemoteData; -import com.casic.missiles.modular.system.dto.remote.TyphoonRemoteData; +import com.casic.missiles.modular.system.dto.remote.TyphoonDetailModel; +import com.casic.missiles.modular.system.dto.remote.TyphoonListModel; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.Typhoon; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; -import com.casic.missiles.modular.system.service.ITyphoonDetailService; -import com.casic.missiles.modular.system.service.ITyphoonLandService; -import com.casic.missiles.modular.system.service.ITyphoonPointService; -import com.casic.missiles.modular.system.service.ITyphoonService; +import com.casic.missiles.modular.system.service.*; import com.casic.missiles.modular.system.utils.Constant; import com.casic.missiles.modular.system.utils.HttpRequestHelper; import org.springframework.stereotype.Service; @@ -33,17 +31,29 @@ @Service public class TyphoonServiceImpl extends ServiceImpl implements ITyphoonService { - private static final String SUCCESS_CODE = "0"; + private final IAddressConfigService configService; + private final ITyphoonDetailService detailService; + private final ILandPointService landPointService; + private final IRoutePointService routePointService; - private final ITyphoonDetailService typhoonDetailService; - private final ITyphoonLandService typhoonLandService; - private final ITyphoonPointService typhoonPointService; + public TyphoonServiceImpl(IAddressConfigService configService, + ITyphoonDetailService detailService, + ILandPointService landPointService, + IRoutePointService routePointService) { + this.configService = configService; + this.detailService = detailService; + this.landPointService = landPointService; + this.routePointService = routePointService; + } - public TyphoonServiceImpl(ITyphoonDetailService typhoonDetailService, - ITyphoonLandService typhoonLandService, ITyphoonPointService typhoonPointService) { - this.typhoonDetailService = typhoonDetailService; - this.typhoonLandService = typhoonLandService; - this.typhoonPointService = typhoonPointService; + private String obtainEnvAddress() { + //获取服务器配置的IP信息 + AddressConfigDTO addressConfig = configService.selectLastConfig(); + String envIp = addressConfig.getEnvIp(); + if (envIp.contains(Constant.HTTP_HEADER)) { + envIp = envIp.replace(Constant.HTTP_HEADER, ""); + } + return envIp; } /** @@ -51,107 +61,117 @@ */ @Override public void saveTyphoonList() { + String url = Constant.HTTP_HEADER + obtainEnvAddress() + "/environment/saveTyphoon?"; /** * 获取台风接口数据 * */ - String res = HttpRequestHelper.doGet(Constant.TYPHOON_LIST + System.currentTimeMillis()); - if (SUCCESS_CODE.equals(HttpRequestHelper.getTyphoonCode(res))) { - TyphoonRemoteData remoteData = JSON.parseObject(res, new TypeReference() { + String res = HttpRequestHelper.doGet(url); + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(res)) { + TyphoonListModel listModel = JSON.parseObject(res, new TypeReference() { }); - //先清空之前的台风表,再保存最新的台风 - remove(null); - List beans = remoteData.getShowapi_res_body().getList(); - for (TyphoonRemoteData.ShowapiResBodyBean.ListBean data : beans) { - //将获取到台风数据存到数据库 + for (TyphoonListModel.DataBean data : listModel.getData()) { Typhoon entity = new Typhoon(); - entity.setTyphoonId(data.getTfid()); + entity.setTyphoonId(data.getTyphoonId()); entity.setName(data.getName()); - entity.setEngName(data.getEnname()); - entity.setLng(Double.valueOf(data.getLng())); - entity.setLat(Double.valueOf(data.getLat())); - entity.setTyphoonType(data.getStrong()); - entity.setCenterPressure(data.getPressure()); + entity.setEngName(data.getEngName()); + entity.setLng(data.getLng()); + entity.setLat(data.getLat()); + entity.setTyphoonType(data.getTyphoonType()); + entity.setCenterPressure(data.getCenterPressure()); entity.setSpeed(data.getSpeed()); - entity.setPower(Integer.valueOf(data.getPower())); - entity.setMoveSpeed(data.getMovespeed()); - entity.setMoveDirection(data.getMovedirection()); + entity.setPower(data.getPower()); + entity.setMoveSpeed(data.getMoveSpeed()); + entity.setMoveDirection(data.getMoveDirection()); entity.setRadius7(data.getRadius7()); entity.setRadius10(data.getRadius10()); entity.setTime(data.getTime()); - save(entity); + entity.setIsActive("1"); + this.baseMapper.insert(entity); } } + updateTyphoonDetail(); } /** * 更新台风详情 */ - @Override - public void updateTyphoonDetail() { - for (Typhoon typhoon : list()) { + private void updateTyphoonDetail() { + //筛选出还未消散的台风并更新详情 + List typhoons = this.baseMapper.selectCurrentTyphoon(); + for (Typhoon typhoon : typhoons) { /** * 获取台风接口数据 * */ - String res = HttpRequestHelper.doGet( - Constant.TYPHOON_DETAIL.replace("ID", typhoon.getTyphoonId()) - + System.currentTimeMillis()); - if (SUCCESS_CODE.equals(HttpRequestHelper.getTyphoonCode(res))) { - TyphoonDetailRemoteData remoteData = JSON.parseObject(res, new TypeReference() { + String url = Constant.HTTP_HEADER + obtainEnvAddress() + "/environment/updateTyphoon?typhoonId=" + typhoon.getTyphoonId(); + String res = HttpRequestHelper.doGet(url); + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(res)) { + TyphoonDetailModel detailModel = JSON.parseObject(res, new TypeReference() { }); - TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean objBean = remoteData.getShowapi_res_body().getObj(); - //保存台风基本情况存到数据库 + TyphoonDetailModel.DataBean dataBean = detailModel.getData(); + String typhoonId = dataBean.getTyphoonId(); + /** + * 保存台风基本情况存到数据库 + * */ TyphoonDetail detail = new TyphoonDetail(); - detail.setTyphoonId(objBean.getTfid()); - detail.setName(objBean.getName()); - detail.setEngName(objBean.getEnname()); - detail.setWarnLevel(objBean.getWarnlevel()); - detail.setCenterLng(Double.parseDouble(objBean.getCenterlng())); - detail.setCenterLat(Double.parseDouble(objBean.getCenterlat())); - detail.setStartTime(objBean.getStarttime()); - detail.setEndTime(objBean.getEndtime()); - detail.setIsActive(objBean.getIsactive()); - typhoonDetailService.saveOrUpdate(detail, new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); + detail.setTyphoonId(typhoonId); + detail.setName(dataBean.getName()); + detail.setEngName(dataBean.getEngName()); + detail.setWarnLevel(dataBean.getWarnLevel()); + detail.setCenterLng(dataBean.getCenterLng()); + detail.setCenterLat(dataBean.getCenterLat()); + detail.setStartTime(dataBean.getStartTime()); + detail.setEndTime(dataBean.getEndTime()); + detail.setIsActive(dataBean.getIsActive()); + QueryWrapper queryWrapper = new QueryWrapper().eq("TYPHOON_ID", typhoonId); + detailService.saveOrUpdate(detail, queryWrapper); - //保存台风登陆情况存到数据库 - List land = objBean.getLand(); - typhoonLandService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); - for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.LandBan landBan : land) { - TyphoonLand typhoonLand = new TyphoonLand(); + /** + * 更新台风列表台风状态 + * */ + typhoon.setIsActive(dataBean.getIsActive()); + saveOrUpdate(typhoon, new QueryWrapper().eq("TYPHOON_ID", typhoonId)); - typhoonLand.setTyphoonId(objBean.getTfid()); - typhoonLand.setLandAddress(landBan.getLandaddress()); - typhoonLand.setLandTime(landBan.getLandtime()); - typhoonLand.setType(landBan.getStrong()); - typhoonLand.setLng(landBan.getLng()); - typhoonLand.setLat(landBan.getLat()); - typhoonLand.setInfo(landBan.getInfo()); + /** + * 保存台风登陆情况存到数据库 + * */ + List landBans = dataBean.getLand(); + for (TyphoonDetailModel.DataBean.LandBean bean : landBans) { + LandPoint landPoint = new LandPoint(); - typhoonLandService.save(typhoonLand); + landPoint.setTyphoonId(typhoonId); + landPoint.setLandAddress(bean.getLandAddress()); + landPoint.setLandTime(bean.getLandTime()); + landPoint.setType(bean.getType()); + landPoint.setLng(bean.getLng()); + landPoint.setLat(bean.getLat()); + landPoint.setInfo(bean.getInfo()); + landPointService.save(landPoint); } - //保存台风移动路径存到数据库 - List points = objBean.getPoints(); - typhoonPointService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); - for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.PointsBean point : points) { - TyphoonPoint typhoonPoint = new TyphoonPoint(); + /** + * 保存台风移动路径存到数据库 + * */ + List routePoints = dataBean.getPoints(); + routePointService.remove(new QueryWrapper().eq("TYPHOON_ID", typhoonId)); + for (TyphoonDetailModel.DataBean.PointsBean point : routePoints) { + RoutePoint routePoint = new RoutePoint(); - typhoonPoint.setTyphoonId(objBean.getTfid()); - typhoonPoint.setTime(point.getTime()); - typhoonPoint.setCenterPressure(point.getPressure()); - typhoonPoint.setSpeed(point.getSpeed()); - typhoonPoint.setTyphoonType(point.getStrong()); - typhoonPoint.setMoveSpeed(point.getMovespeed()); - typhoonPoint.setPower(Integer.parseInt(point.getPower())); - typhoonPoint.setMoveDirection(point.getMovedirection()); - typhoonPoint.setLng(point.getLng()); - typhoonPoint.setLat(point.getLat()); - typhoonPoint.setRadius12(point.getRadius12()); - typhoonPoint.setRadius10(point.getRadius10()); - typhoonPoint.setRadius7(point.getRadius7()); - typhoonPoint.setRoutePrediction(point.getJl()); - typhoonPoint.setCenterPosition(point.getCkposition()); - - typhoonPointService.save(typhoonPoint); + routePoint.setTyphoonId(typhoonId); + routePoint.setTime(point.getTime()); + routePoint.setCenterPressure(point.getCenterPressure()); + routePoint.setSpeed(point.getSpeed()); + routePoint.setTyphoonType(point.getTyphoonType()); + routePoint.setMoveSpeed(point.getMoveSpeed()); + routePoint.setPower(point.getPower()); + routePoint.setMoveDirection(point.getMoveDirection()); + routePoint.setLng(point.getLng()); + routePoint.setLat(point.getLat()); + routePoint.setRadius12(point.getRadius12()); + routePoint.setRadius10(point.getRadius10()); + routePoint.setRadius7(point.getRadius7()); + routePoint.setRoutePrediction(point.getRoutePrediction()); + routePoint.setCenterPosition(point.getCenterPosition()); + routePointService.save(routePoint); } } } @@ -160,7 +180,9 @@ @Override public List currentTyphoonList() { List typhoonList = new ArrayList<>(); - for (Typhoon typhoon : list()) { + //筛选出还未消散的台风并更新详情 + List typhoons = this.baseMapper.selectCurrentTyphoon(); + for (Typhoon typhoon : typhoons) { typhoonList.add(new TyphoonDTO(typhoon)); } return typhoonList; @@ -168,15 +190,18 @@ @Override public TyphoonDetailDTO typhoonDetail(String typhoonId) { - TyphoonDetail detail = typhoonDetailService.getOne( + TyphoonDetail typhoonDetail = detailService.getOne( new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - List landList = typhoonLandService.list( - new QueryWrapper().eq("TYPHOON_ID", typhoonId) + if (typhoonDetail == null) { + return null; + } + List landPoints = landPointService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - List pointList = typhoonPointService.list( - new QueryWrapper().eq("TYPHOON_ID", typhoonId) + List routePoints = routePointService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - return new TyphoonDetailDTO(detail, landList, pointList); + return new TyphoonDetailDTO(typhoonDetail, landPoints, routePoints); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java deleted file mode 100644 index 552a6e9..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.casic.missiles.modular.system.utils; - -/** - * @author a203 - */ -public class Constant { - /** - * 热带气旋/台风相关常量 - */ - private static final String BASE_URL = "https://route.showapi.com"; - private static final String API_APPID = "780330"; - private static final String API_SIGN_KEY = "f30ac28b65cc447da936448c57bc5d99"; - - public static final String TYPHOON_LIST = BASE_URL - + "/342-1?" - + "showapi_appid=" + API_APPID + "&" - + "showapi_sign=" + API_SIGN_KEY + "&" - + "showapi_timestamp="; - - public static final String TYPHOON_DETAIL = BASE_URL - + "/342-2?" - + "showapi_appid=" + API_APPID + "&" - + "showapi_sign=" + API_SIGN_KEY + "&" - + "tfid=ID" + "&" - + "showapi_timestamp="; - - /** - * 洋流相关常量 - */ - private static final String OCEAN_BASE_URL = "http://api.meteo.open.ninecosmos.cn"; - public static final String OCEAN_HEADER_NAME = "Authorization"; - public static final String OCEAN_APPID = "WXZH888888"; - public static final String OCEAN_APP_KEY = "xb#bD&xtho@b80scbDb"; - - public static final String OCEAN_TOKEN = OCEAN_BASE_URL + "/us/users/open/token"; - public static final String OCEAN_DETAIL = OCEAN_BASE_URL + "/mr/netcdf/meteo/ytx"; -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java deleted file mode 100644 index 1e0cd94..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java +++ /dev/null @@ -1,115 +0,0 @@ -package com.casic.missiles.modular.system.utils; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONException; -import com.alibaba.fastjson.JSONObject; -import lombok.NonNull; -import okhttp3.*; - -import java.io.IOException; -import java.util.Objects; -import java.util.concurrent.TimeUnit; - -/** - * 网络请求工具 - * - * @author a203 - */ -public class HttpRequestHelper { - - public static RequestBody createRequestBody(String value) { - return RequestBody.create(MediaType.parse("application/json; charset=utf-8"), value); - } - - public static String doPost(Request request) { - return streamResponse(request); - } - - public static String doGet(String url) { - return streamResponse(new Request.Builder() - .url(url) - .build()); - } - - private static String streamResponse(@NonNull Request request) { - OkHttpClient httpClient = new OkHttpClient.Builder() - .connectTimeout(10, TimeUnit.SECONDS) - .writeTimeout(10, TimeUnit.SECONDS) - .readTimeout(20, TimeUnit.SECONDS) - .build(); - Call call = httpClient.newCall(request); - try { - Response response = call.execute(); - return response.body() != null ? Objects.requireNonNull(response.body()).string() : ""; - } catch (IOException e) { - e.printStackTrace(); - } - return ""; - } - - public static String obtainOceanData(double lng, double lat, String date, String days, String hour) { - /** - * 获取洋流数据Token - * */ - JSONObject object = new JSONObject(); - try { - object.put("appId", Constant.OCEAN_APPID); - object.put("appKey", Constant.OCEAN_APP_KEY); - } catch (JSONException e) { - e.printStackTrace(); - } - Request tokenRequest = new Request.Builder() - .url(Constant.OCEAN_TOKEN) - .post(HttpRequestHelper.createRequestBody(object.toJSONString())) - .build(); - String tokenJson = HttpRequestHelper.doPost(tokenRequest); - if ("".equals(tokenJson)) { - return null; - } - /** - * 解析token - * */ - JSONObject tokenObject = JSON.parseObject(tokenJson); - JSONObject dataObject = tokenObject.getJSONObject("data"); - String token = dataObject.getString("token"); - /** - * 封装请求参数 - * */ - JSONObject jsonObject = new JSONObject(); - try { - jsonObject.put("lon", lng); - jsonObject.put("lat", lat); - jsonObject.put("date", date); - jsonObject.put("hour", days); - jsonObject.put("days", hour); - } catch (JSONException e) { - e.printStackTrace(); - } - /** - * 获取洋流数据 - * */ - Request request = new Request.Builder() - .addHeader(Constant.OCEAN_HEADER_NAME, token) - .url(Constant.OCEAN_DETAIL) - .post(HttpRequestHelper.createRequestBody(jsonObject.toJSONString())) - .build(); - return HttpRequestHelper.doPost(request); - } - - public static String getTyphoonCode(String value) { - if ("".equals(value)) { - return value; - } - JSONObject jsonObject = JSON.parseObject(value); - return jsonObject.getString("showapi_res_code"); - } - - public static String getOceanCode(String value) { - if ("".equals(value)) { - return value; - } - JSONObject jsonObject = JSON.parseObject(value); - Integer code = jsonObject.getInteger("code"); - return String.valueOf(code); - } -} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/LandPoint.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/LandPoint.java new file mode 100644 index 0000000..f6d61ba --- /dev/null +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/LandPoint.java @@ -0,0 +1,67 @@ +package com.casic.missiles.modular.system.model; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import lombok.Data; + +/** + * 台风登陆点数据库模型 + * + * @author a203 + */ +@Data +@TableName("tf_land_point") +public class LandPoint extends Model { + private static final long serialVersionUID = 1L; + + /** + * 台风数据库主键 + */ + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private Long id; + + /** + * 台风ID + */ + @TableField("TYPHOON_ID") + private String typhoonId; + + /** + * 台风登陆点 + */ + @TableField("LAND_ADDRESS") + private String landAddress; + + /** + * 台风登陆时间 + */ + @TableField("LAND_TIME") + private String landTime; + + /** + * 台风类型-热带风暴/强台风... + */ + @TableField("TYPE") + private String type; + + /** + * 经度 + */ + @TableField("LNG") + private Double lng; + + /** + * 纬度 + */ + @TableField("LAT") + private Double lat; + + /** + * 台风登陆细节 + */ + @TableField("INFO") + private String info; +} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/RoutePoint.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/RoutePoint.java new file mode 100644 index 0000000..81981db --- /dev/null +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/RoutePoint.java @@ -0,0 +1,115 @@ +package com.casic.missiles.modular.system.model; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import lombok.Data; + +/** + * 台风移动点数据库模型 + * + * @author a203 + */ +@Data +@TableName("tf_route_point") +public class RoutePoint extends Model { + private static final long serialVersionUID = 1L; + + /** + * 台风数据库主键 + */ + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private Long id; + + /** + * 台风ID + */ + @TableField("TYPHOON_ID") + private String typhoonId; + + /** + * 数据更新时间 + */ + @TableField("TIME") + private String time; + + /** + * 台风中心气压,单位【百帕】 + */ + @TableField("CENTER_PRESSURE") + private String centerPressure; + + /** + * 风速,单位【米/每秒】 + */ + @TableField("SPEED") + private String speed; + + /** + * 台风风力等级描述 + */ + @TableField("TYPHOON_TYPE") + private String typhoonType; + + /** + * 台风整体移动速度,单位【公里/小时】 + */ + @TableField("MOVE_SPEED") + private String moveSpeed; + + /** + * 风力,单位【级】 + */ + @TableField("POWER") + private Integer power; + + /** + * 台风未来移动方向 + */ + @TableField("MOVE_DIRECTION") + private String moveDirection; + + /** + * 经度 + */ + @TableField("LNG") + private Double lng; + + /** + * 纬度 + */ + @TableField("LAT") + private Double lat; + + /** + * 12级风力影响半径 + */ + @TableField("RADIUS_12") + private String radius12; + + /** + * 10级风力影响半径 + */ + @TableField("RADIUS_10") + private String radius10; + + /** + * 7级风力影响半径 + */ + @TableField("RADIUS_7") + private String radius7; + + /** + * 台风路线预测 + */ + @TableField("ROUTE_PREDICTION") + private String routePrediction; + + /** + * 中心位置 + */ + @TableField("CENTER_POSITION") + private String centerPosition; +} diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..8396364 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,31 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel.DataBean data) { + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java index a34da1b..0c5225d 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -1,8 +1,8 @@ package com.casic.missiles.modular.system.dto; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; import lombok.Data; import java.util.ArrayList; @@ -142,7 +142,7 @@ private String centerPosition; } - public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + public TyphoonDetailDTO(TyphoonDetail detail, List landPoints, List routePoints) { this.typhoonId = detail.getTyphoonId(); this.name = detail.getName(); this.engName = detail.getEngName(); @@ -152,8 +152,9 @@ this.startTime = detail.getStartTime(); this.endTime = detail.getEndTime(); this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); - for (TyphoonLand landBean : landBeans) { + for (LandPoint landBean : landPoints) { LandBan bean = new LandBan(); bean.landAddress = landBean.getLandAddress(); bean.landTime = landBean.getLandTime(); @@ -164,8 +165,9 @@ lands.add(bean); } this.land = lands; + List points = new ArrayList<>(); - for (TyphoonPoint point : pointBeans) { + for (RoutePoint point : routePoints) { PointBean pointBean = new PointBean(); pointBean.time = point.getTime(); pointBean.centerPressure = point.getCenterPressure(); diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java new file mode 100644 index 0000000..b0b2e7a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java @@ -0,0 +1,265 @@ +package com.casic.missiles.modular.system.dto.remote; + +/** + * 洋流数据模型 + * + * @author a203 + */ +public class OceanDetailModel { + + /** + * code : 200 + * data : {"altitude":0,"forecast":{"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34},"oceanDir":135.22,"pressure":100925.19,"speed":7.97,"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"temperature":28.6,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34,"windDir":71.84,"windSpeed":7.97} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * altitude : 0 + * forecast : {"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34} + * oceanDir : 135.22 + * pressure : 100925.19 + * speed : 7.97 + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * temperature : 28.6 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + * windDir : 71.84 + * windSpeed : 7.97 + */ + + private double altitude; + private ForecastBean forecast; + private double oceanDir; + private double pressure; + private double speed; + private double swellDir; + private double swellHeight; + private double swellPrd; + private double temperature; + private double waveDir; + private double waveHeight; + private double wavePrd; + private double windDir; + private double windSpeed; + + public double getAltitude() { + return altitude; + } + + public void setAltitude(double altitude) { + this.altitude = altitude; + } + + public ForecastBean getForecast() { + return forecast; + } + + public void setForecast(ForecastBean forecast) { + this.forecast = forecast; + } + + public double getOceanDir() { + return oceanDir; + } + + public void setOceanDir(double oceanDir) { + this.oceanDir = oceanDir; + } + + public double getPressure() { + return pressure; + } + + public void setPressure(double pressure) { + this.pressure = pressure; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getTemperature() { + return temperature; + } + + public void setTemperature(double temperature) { + this.temperature = temperature; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + + public double getWindDir() { + return windDir; + } + + public void setWindDir(double windDir) { + this.windDir = windDir; + } + + public double getWindSpeed() { + return windSpeed; + } + + public void setWindSpeed(double windSpeed) { + this.windSpeed = windSpeed; + } + + public static class ForecastBean { + /** + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + */ + + private double swellDir; + private double swellHeight; + private double swellPrd; + private double waveDir; + private double waveHeight; + private double wavePrd; + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java deleted file mode 100644 index 5ad3a22..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java +++ /dev/null @@ -1,439 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方洋流数据模型 - * - * @author a203 - */ -public class OceanDetailRemoteData { - - /** - * code : 0 - * data : {"lon":114.338597,"lat":18.273134,"date":"2021-10-21","hour":10,"list":[{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}]} - * message : success - * etime : 1634786517992 - */ - - private int code; - private DataBean data; - private String message; - private long etime; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public DataBean getData() { - return data; - } - - public void setData(DataBean data) { - this.data = data; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public long getEtime() { - return etime; - } - - public void setEtime(long etime) { - this.etime = etime; - } - - public static class DataBean { - /** - * lon : 114.338597 - * lat : 18.273134 - * date : 2021-10-21 - * hour : 10 - * list : [{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}] - */ - - private double lon; - private double lat; - private String date; - private int hour; - private List list; - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public int getHour() { - return hour; - } - - public void setHour(int hour) { - this.hour = hour; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * date : 2021-10-21 - * ytx : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - * meteo : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - */ - - private String date; - private YtxBean ytx; - private MeteoBean meteo; - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public YtxBean getYtx() { - return ytx; - } - - public void setYtx(YtxBean ytx) { - this.ytx = ytx; - } - - public MeteoBean getMeteo() { - return meteo; - } - - public void setMeteo(MeteoBean meteo) { - this.meteo = meteo; - } - - public static class YtxBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - - public static class MeteoBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java new file mode 100644 index 0000000..3a2e068 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java @@ -0,0 +1,374 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风数据模型 + * + * @author a203 + */ +public class TyphoonDetailModel { + + /** + * code : 200 + * data : {"centerLat":20.65,"centerLng":128.1,"endTime":"2021-10-11 8:00:00","engName":"Kompasu","isActive":"1","land":[],"name":"圆规","points":[{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}],"startTime":"2021-10-8 2:00:00","typhoonId":"202118","warnLevel":"white"} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * centerLat : 20.65 + * centerLng : 128.1 + * endTime : 2021-10-11 8:00:00 + * engName : Kompasu + * isActive : 1 + * land : [] + * name : 圆规 + * points : [{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}] + * startTime : 2021-10-8 2:00:00 + * typhoonId : 202118 + * warnLevel : white + */ + + private double centerLat; + private double centerLng; + private String endTime; + private String engName; + private String isActive; + private String name; + private String startTime; + private String typhoonId; + private String warnLevel; + private List land; + private List points; + + public double getCenterLat() { + return centerLat; + } + + public void setCenterLat(double centerLat) { + this.centerLat = centerLat; + } + + public double getCenterLng() { + return centerLng; + } + + public void setCenterLng(double centerLng) { + this.centerLng = centerLng; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public String getIsActive() { + return isActive; + } + + public void setIsActive(String isActive) { + this.isActive = isActive; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getWarnLevel() { + return warnLevel; + } + + public void setWarnLevel(String warnLevel) { + this.warnLevel = warnLevel; + } + + public List getLand() { + return land; + } + + public void setLand(List land) { + this.land = land; + } + + public static class LandBean { + private String landAddress; + private String type; + private Double lng; + private Double lat; + private String info; + private String landTime; + + public String getLandAddress() { + return landAddress; + } + + public void setLandAddress(String landAddress) { + this.landAddress = landAddress; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Double getLng() { + return lng; + } + + public void setLng(Double lng) { + this.lng = lng; + } + + public Double getLat() { + return lat; + } + + public void setLat(Double lat) { + this.lat = lat; + } + + public String getInfo() { + return info; + } + + public void setInfo(String info) { + this.info = info; + } + + public String getLandTime() { + return landTime; + } + + public void setLandTime(String landTime) { + this.landTime = landTime; + } + } + + public List getPoints() { + return points; + } + + public void setPoints(List points) { + this.points = points; + } + + public static class PointsBean { + /** + * centerPosition : 距离菲律宾马尼拉东北方向约600公里 + * centerPressure : 990 + * lat : 18.7 + * lng : 124.7 + * moveDirection : 西北西 + * moveSpeed : 25 + * power : 9 + * radius10 : + * radius12 : + * radius7 : 160|140|200|180 + * routePrediction : “圆规”将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分) + * speed : 23 + * time : 2021-10-11 8:00:00 + * typhoonType : 热带风暴 + */ + + private String centerPosition; + private String centerPressure; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private int power; + private String radius10; + private String radius12; + private String radius7; + private String routePrediction; + private String speed; + private String time; + private String typhoonType; + + public String getCenterPosition() { + return centerPosition; + } + + public void setCenterPosition(String centerPosition) { + this.centerPosition = centerPosition; + } + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius12() { + return radius12; + } + + public void setRadius12(String radius12) { + this.radius12 = radius12; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getRoutePrediction() { + return routePrediction; + } + + public void setRoutePrediction(String routePrediction) { + this.routePrediction = routePrediction; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java deleted file mode 100644 index 5b70924..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java +++ /dev/null @@ -1,419 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonDetailRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 6155596a0de376ce34c7b594 - * showapi_res_body : {"ret_code":0,"obj":{"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"}} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * obj : {"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"} - */ - - private int ret_code; - private ObjBean obj; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public ObjBean getObj() { - return obj; - } - - public void setObj(ObjBean obj) { - this.obj = obj; - } - - public static class ObjBean { - /** - * endtime : 2021-9-30 8:00:00 - * centerlng : 139.300000 - * starttime : 2021-9-23 20:00:00 - * tfid : 202116 - * isactive : 1 - * centerlat : 25.200000 - * name : 蒲公英 - * land : [{"landaddress":"朱家尖镇","strong":"强台风","lng":"122.39","lat":"29.83","info":"\u201c灿鸿\u201d11日16时40分前后登陆浙江舟山市朱家尖镇","landtime":"2015/7/11 16:40:00"}] - * warnlevel : white - * points : [{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}] - * enname : Mindulle - */ - - private String endtime; - private String centerlng; - private String starttime; - private String tfid; - private String isactive; - private String centerlat; - private String name; - private String warnlevel; - private String enname; - private List land; - private List points; - - public String getEndtime() { - return endtime; - } - - public void setEndtime(String endtime) { - this.endtime = endtime; - } - - public String getCenterlng() { - return centerlng; - } - - public void setCenterlng(String centerlng) { - this.centerlng = centerlng; - } - - public String getStarttime() { - return starttime; - } - - public void setStarttime(String starttime) { - this.starttime = starttime; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getIsactive() { - return isactive; - } - - public void setIsactive(String isactive) { - this.isactive = isactive; - } - - public String getCenterlat() { - return centerlat; - } - - public void setCenterlat(String centerlat) { - this.centerlat = centerlat; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getWarnlevel() { - return warnlevel; - } - - public void setWarnlevel(String warnlevel) { - this.warnlevel = warnlevel; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - - public List getLand() { - return land; - } - - public void setLand(List land) { - this.land = land; - } - - public static class LandBan { - /** - * landaddress : 朱家尖镇 - * strong : 强台风 - * lng : 122.39 - * lat : 29.83 - * info : “灿鸿”11日16时40分前后登陆浙江舟山市朱家尖镇 - * landtime : 2015/7/11 16:40:00 - */ - - private String landaddress; - private String strong; - private Double lng; - private Double lat; - private String info; - private String landtime; - - public String getLandaddress() { - return landaddress; - } - - public void setLandaddress(String landaddress) { - this.landaddress = landaddress; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getInfo() { - return info; - } - - public void setInfo(String info) { - this.info = info; - } - - public String getLandtime() { - return landtime; - } - - public void setLandtime(String landtime) { - this.landtime = landtime; - } - } - - public List getPoints() { - return points; - } - - public void setPoints(List points) { - this.points = points; - } - - public static class PointsBean { - /** - * time : 2021-9-23 20:00:00 - * pressure : 998 - * radius10 : - * speed : 18 - * strong : 热带风暴 - * movespeed : 20 - * radius12 : - * power : 8 - * lng : 143.30 - * movedirection : 西北西 - * lat : 13.80 - * radius7 : 250|220|200|180 - * jl : “蒲公英”将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分) - * ckposition : 距离日本东京南偏西方向约1060公里 - */ - - private String time; - private String pressure; - private String radius10; - private String speed; - private String strong; - private String movespeed; - private String radius12; - private String power; - private Double lng; - private String movedirection; - private Double lat; - private String radius7; - private String jl; - private String ckposition; - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getRadius12() { - return radius12; - } - - public void setRadius12(String radius12) { - this.radius12 = radius12; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getJl() { - return jl; - } - - public void setJl(String jl) { - this.jl = jl; - } - - public String getCkposition() { - return ckposition; - } - - public void setCkposition(String ckposition) { - this.ckposition = ckposition; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java new file mode 100644 index 0000000..91bad37 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java @@ -0,0 +1,201 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风列表数据模型 + * + * @author a203 + */ +public class TyphoonListModel { + + /** + * code : 200 + * data : [{"centerPressure":"990","engName":"Kompasu","lat":18.7,"lng":125,"moveDirection":"西北西","moveSpeed":"23","name":"圆规","power":9,"radius10":"","radius7":"200","speed":"23","time":"2021-10-11 05:00:00","typhoonId":"202118","typhoonType":"热带风暴"}] + * message : 请求成功 + * success : true + */ + + private int code; + private String message; + private boolean success; + private List data; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public static class DataBean { + /** + * centerPressure : 990 + * engName : Kompasu + * lat : 18.7 + * lng : 125 + * moveDirection : 西北西 + * moveSpeed : 23 + * name : 圆规 + * power : 9 + * radius10 : + * radius7 : 200 + * speed : 23 + * time : 2021-10-11 05:00:00 + * typhoonId : 202118 + * typhoonType : 热带风暴 + */ + + private String centerPressure; + private String engName; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private String name; + private int power; + private String radius10; + private String radius7; + private String speed; + private String time; + private String typhoonId; + private String typhoonType; + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java deleted file mode 100644 index 38a9257..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java +++ /dev/null @@ -1,237 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 61554fbe0de376d03494057c - * showapi_res_body : {"ret_code":0,"list":[{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}]} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * list : [{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}] - */ - - private int ret_code; - private List list; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * pressure : 945 - * tfid : 202116 - * radius10 : 150 - * speed : 48 - * lng : 136.40 - * radius7 : 350 - * time : 2021-09-30 08:00:00 - * movespeed : 23 - * strong : 强台风 - * name : 蒲公英 - * power : 15 - * movedirection : 北北东 - * lat : 26.60 - * enname : Mindulle - */ - - private String pressure; - private String tfid; - private String radius10; - private String speed; - private String lng; - private String radius7; - private String time; - private String movespeed; - private String strong; - private String name; - private String power; - private String movedirection; - private String lat; - private String enname; - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getLng() { - return lng; - } - - public void setLng(String lng) { - this.lng = lng; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public String getLat() { - return lat; - } - - public void setLat(String lat) { - this.lat = lat; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java new file mode 100644 index 0000000..c488237 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风移动点数据信息 服务类 + * + * @author a203 + */ +public interface ILandPointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java new file mode 100644 index 0000000..ab05570 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风登陆点数据信息 服务类 + * + * @author a203 + */ +public interface IRoutePointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java deleted file mode 100644 index d16a48b..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonLandService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java deleted file mode 100644 index 80e2765..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonPointService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java index c47a0f3..53bb971 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java @@ -19,13 +19,6 @@ void saveTyphoonList(); /** - * 更新台风详情 - */ - void updateTyphoonDetail(); - - /***上面接口从第三方存库,下面接口查库**********************/ - - /** * 查询台风列表 * * @return {@link List} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java new file mode 100644 index 0000000..fed33c1 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.LandPointMapper; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.service.ILandPointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class LandPointServiceImpl extends ServiceImpl implements ILandPointService { + + public LandPointServiceImpl() { + + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java index f8cb771..58fce60 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java @@ -2,9 +2,12 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; +import com.casic.missiles.modular.system.dto.AddressConfigDTO; import com.casic.missiles.modular.system.dto.OceanDetailDTO; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; +import com.casic.missiles.modular.system.service.IAddressConfigService; import com.casic.missiles.modular.system.service.IOceanService; +import com.casic.missiles.modular.system.utils.Constant; import com.casic.missiles.modular.system.utils.HttpRequestHelper; import org.springframework.stereotype.Service; @@ -17,23 +20,32 @@ @Service public class OceanServiceImpl implements IOceanService { - private static final String SUCCESS_CODE = "0"; + private final IAddressConfigService configService; - public OceanServiceImpl() { - + public OceanServiceImpl(IAddressConfigService configService) { + this.configService = configService; } @Override public OceanDetailDTO oceanDetail(double lng, double lat, String date, String days, String hour) { - String oceanData = HttpRequestHelper.obtainOceanData(lng, lat, date, days, hour); + AddressConfigDTO addressConfig = configService.selectLastConfig(); + String envIp = addressConfig.getEnvIp(); + if (envIp.contains(Constant.HTTP_HEADER)) { + envIp = envIp.replace(Constant.HTTP_HEADER, ""); + } + String url = Constant.HTTP_HEADER + envIp + "/environment/ocean?" + + "lng=" + lng + "&lat=" + lat + + "&date=" + date + "&days=" + days + "&hour=" + hour; + + String oceanData = HttpRequestHelper.doGet(url); /** * 解析洋流数据返回给前端 * */ OceanDetailDTO oceanDetailDTO = null; - if (SUCCESS_CODE.equals(HttpRequestHelper.getOceanCode(oceanData))) { - OceanDetailRemoteData remoteData = JSON.parseObject(oceanData, new TypeReference() { + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(oceanData)) { + OceanDetailModel remoteData = JSON.parseObject(oceanData, new TypeReference() { }); - oceanDetailDTO = new OceanDetailDTO(remoteData); + oceanDetailDTO = new OceanDetailDTO(remoteData.getData()); } return oceanDetailDTO; } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java new file mode 100644 index 0000000..24b06cd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.RoutePointMapper; +import com.casic.missiles.modular.system.model.RoutePoint; +import com.casic.missiles.modular.system.service.IRoutePointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class RoutePointServiceImpl extends ServiceImpl implements IRoutePointService { + + public RoutePointServiceImpl() { + + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java deleted file mode 100644 index d1bf2c7..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.casic.missiles.modular.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.casic.missiles.modular.system.dao.TyphoonLandMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.service.ITyphoonLandService; -import org.springframework.stereotype.Service; - -/** - * 台风数据信息 服务实现类 - * - * @author a203 - */ - -@Service -public class TyphoonLandServiceImpl extends ServiceImpl implements ITyphoonLandService { - - public TyphoonLandServiceImpl() { - - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java deleted file mode 100644 index 36815fa..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.casic.missiles.modular.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.casic.missiles.modular.system.dao.TyphoonPointMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; -import com.casic.missiles.modular.system.service.ITyphoonPointService; -import org.springframework.stereotype.Service; - -/** - * 台风数据信息 服务实现类 - * - * @author a203 - */ - -@Service -public class TyphoonPointServiceImpl extends ServiceImpl implements ITyphoonPointService { - - public TyphoonPointServiceImpl() { - - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java index 861e2c1..1cbfb01 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java @@ -5,18 +5,16 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.casic.missiles.modular.system.dao.TyphoonMapper; +import com.casic.missiles.modular.system.dto.AddressConfigDTO; import com.casic.missiles.modular.system.dto.TyphoonDTO; import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; -import com.casic.missiles.modular.system.dto.remote.TyphoonDetailRemoteData; -import com.casic.missiles.modular.system.dto.remote.TyphoonRemoteData; +import com.casic.missiles.modular.system.dto.remote.TyphoonDetailModel; +import com.casic.missiles.modular.system.dto.remote.TyphoonListModel; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.Typhoon; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; -import com.casic.missiles.modular.system.service.ITyphoonDetailService; -import com.casic.missiles.modular.system.service.ITyphoonLandService; -import com.casic.missiles.modular.system.service.ITyphoonPointService; -import com.casic.missiles.modular.system.service.ITyphoonService; +import com.casic.missiles.modular.system.service.*; import com.casic.missiles.modular.system.utils.Constant; import com.casic.missiles.modular.system.utils.HttpRequestHelper; import org.springframework.stereotype.Service; @@ -33,17 +31,29 @@ @Service public class TyphoonServiceImpl extends ServiceImpl implements ITyphoonService { - private static final String SUCCESS_CODE = "0"; + private final IAddressConfigService configService; + private final ITyphoonDetailService detailService; + private final ILandPointService landPointService; + private final IRoutePointService routePointService; - private final ITyphoonDetailService typhoonDetailService; - private final ITyphoonLandService typhoonLandService; - private final ITyphoonPointService typhoonPointService; + public TyphoonServiceImpl(IAddressConfigService configService, + ITyphoonDetailService detailService, + ILandPointService landPointService, + IRoutePointService routePointService) { + this.configService = configService; + this.detailService = detailService; + this.landPointService = landPointService; + this.routePointService = routePointService; + } - public TyphoonServiceImpl(ITyphoonDetailService typhoonDetailService, - ITyphoonLandService typhoonLandService, ITyphoonPointService typhoonPointService) { - this.typhoonDetailService = typhoonDetailService; - this.typhoonLandService = typhoonLandService; - this.typhoonPointService = typhoonPointService; + private String obtainEnvAddress() { + //获取服务器配置的IP信息 + AddressConfigDTO addressConfig = configService.selectLastConfig(); + String envIp = addressConfig.getEnvIp(); + if (envIp.contains(Constant.HTTP_HEADER)) { + envIp = envIp.replace(Constant.HTTP_HEADER, ""); + } + return envIp; } /** @@ -51,107 +61,117 @@ */ @Override public void saveTyphoonList() { + String url = Constant.HTTP_HEADER + obtainEnvAddress() + "/environment/saveTyphoon?"; /** * 获取台风接口数据 * */ - String res = HttpRequestHelper.doGet(Constant.TYPHOON_LIST + System.currentTimeMillis()); - if (SUCCESS_CODE.equals(HttpRequestHelper.getTyphoonCode(res))) { - TyphoonRemoteData remoteData = JSON.parseObject(res, new TypeReference() { + String res = HttpRequestHelper.doGet(url); + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(res)) { + TyphoonListModel listModel = JSON.parseObject(res, new TypeReference() { }); - //先清空之前的台风表,再保存最新的台风 - remove(null); - List beans = remoteData.getShowapi_res_body().getList(); - for (TyphoonRemoteData.ShowapiResBodyBean.ListBean data : beans) { - //将获取到台风数据存到数据库 + for (TyphoonListModel.DataBean data : listModel.getData()) { Typhoon entity = new Typhoon(); - entity.setTyphoonId(data.getTfid()); + entity.setTyphoonId(data.getTyphoonId()); entity.setName(data.getName()); - entity.setEngName(data.getEnname()); - entity.setLng(Double.valueOf(data.getLng())); - entity.setLat(Double.valueOf(data.getLat())); - entity.setTyphoonType(data.getStrong()); - entity.setCenterPressure(data.getPressure()); + entity.setEngName(data.getEngName()); + entity.setLng(data.getLng()); + entity.setLat(data.getLat()); + entity.setTyphoonType(data.getTyphoonType()); + entity.setCenterPressure(data.getCenterPressure()); entity.setSpeed(data.getSpeed()); - entity.setPower(Integer.valueOf(data.getPower())); - entity.setMoveSpeed(data.getMovespeed()); - entity.setMoveDirection(data.getMovedirection()); + entity.setPower(data.getPower()); + entity.setMoveSpeed(data.getMoveSpeed()); + entity.setMoveDirection(data.getMoveDirection()); entity.setRadius7(data.getRadius7()); entity.setRadius10(data.getRadius10()); entity.setTime(data.getTime()); - save(entity); + entity.setIsActive("1"); + this.baseMapper.insert(entity); } } + updateTyphoonDetail(); } /** * 更新台风详情 */ - @Override - public void updateTyphoonDetail() { - for (Typhoon typhoon : list()) { + private void updateTyphoonDetail() { + //筛选出还未消散的台风并更新详情 + List typhoons = this.baseMapper.selectCurrentTyphoon(); + for (Typhoon typhoon : typhoons) { /** * 获取台风接口数据 * */ - String res = HttpRequestHelper.doGet( - Constant.TYPHOON_DETAIL.replace("ID", typhoon.getTyphoonId()) - + System.currentTimeMillis()); - if (SUCCESS_CODE.equals(HttpRequestHelper.getTyphoonCode(res))) { - TyphoonDetailRemoteData remoteData = JSON.parseObject(res, new TypeReference() { + String url = Constant.HTTP_HEADER + obtainEnvAddress() + "/environment/updateTyphoon?typhoonId=" + typhoon.getTyphoonId(); + String res = HttpRequestHelper.doGet(url); + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(res)) { + TyphoonDetailModel detailModel = JSON.parseObject(res, new TypeReference() { }); - TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean objBean = remoteData.getShowapi_res_body().getObj(); - //保存台风基本情况存到数据库 + TyphoonDetailModel.DataBean dataBean = detailModel.getData(); + String typhoonId = dataBean.getTyphoonId(); + /** + * 保存台风基本情况存到数据库 + * */ TyphoonDetail detail = new TyphoonDetail(); - detail.setTyphoonId(objBean.getTfid()); - detail.setName(objBean.getName()); - detail.setEngName(objBean.getEnname()); - detail.setWarnLevel(objBean.getWarnlevel()); - detail.setCenterLng(Double.parseDouble(objBean.getCenterlng())); - detail.setCenterLat(Double.parseDouble(objBean.getCenterlat())); - detail.setStartTime(objBean.getStarttime()); - detail.setEndTime(objBean.getEndtime()); - detail.setIsActive(objBean.getIsactive()); - typhoonDetailService.saveOrUpdate(detail, new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); + detail.setTyphoonId(typhoonId); + detail.setName(dataBean.getName()); + detail.setEngName(dataBean.getEngName()); + detail.setWarnLevel(dataBean.getWarnLevel()); + detail.setCenterLng(dataBean.getCenterLng()); + detail.setCenterLat(dataBean.getCenterLat()); + detail.setStartTime(dataBean.getStartTime()); + detail.setEndTime(dataBean.getEndTime()); + detail.setIsActive(dataBean.getIsActive()); + QueryWrapper queryWrapper = new QueryWrapper().eq("TYPHOON_ID", typhoonId); + detailService.saveOrUpdate(detail, queryWrapper); - //保存台风登陆情况存到数据库 - List land = objBean.getLand(); - typhoonLandService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); - for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.LandBan landBan : land) { - TyphoonLand typhoonLand = new TyphoonLand(); + /** + * 更新台风列表台风状态 + * */ + typhoon.setIsActive(dataBean.getIsActive()); + saveOrUpdate(typhoon, new QueryWrapper().eq("TYPHOON_ID", typhoonId)); - typhoonLand.setTyphoonId(objBean.getTfid()); - typhoonLand.setLandAddress(landBan.getLandaddress()); - typhoonLand.setLandTime(landBan.getLandtime()); - typhoonLand.setType(landBan.getStrong()); - typhoonLand.setLng(landBan.getLng()); - typhoonLand.setLat(landBan.getLat()); - typhoonLand.setInfo(landBan.getInfo()); + /** + * 保存台风登陆情况存到数据库 + * */ + List landBans = dataBean.getLand(); + for (TyphoonDetailModel.DataBean.LandBean bean : landBans) { + LandPoint landPoint = new LandPoint(); - typhoonLandService.save(typhoonLand); + landPoint.setTyphoonId(typhoonId); + landPoint.setLandAddress(bean.getLandAddress()); + landPoint.setLandTime(bean.getLandTime()); + landPoint.setType(bean.getType()); + landPoint.setLng(bean.getLng()); + landPoint.setLat(bean.getLat()); + landPoint.setInfo(bean.getInfo()); + landPointService.save(landPoint); } - //保存台风移动路径存到数据库 - List points = objBean.getPoints(); - typhoonPointService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); - for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.PointsBean point : points) { - TyphoonPoint typhoonPoint = new TyphoonPoint(); + /** + * 保存台风移动路径存到数据库 + * */ + List routePoints = dataBean.getPoints(); + routePointService.remove(new QueryWrapper().eq("TYPHOON_ID", typhoonId)); + for (TyphoonDetailModel.DataBean.PointsBean point : routePoints) { + RoutePoint routePoint = new RoutePoint(); - typhoonPoint.setTyphoonId(objBean.getTfid()); - typhoonPoint.setTime(point.getTime()); - typhoonPoint.setCenterPressure(point.getPressure()); - typhoonPoint.setSpeed(point.getSpeed()); - typhoonPoint.setTyphoonType(point.getStrong()); - typhoonPoint.setMoveSpeed(point.getMovespeed()); - typhoonPoint.setPower(Integer.parseInt(point.getPower())); - typhoonPoint.setMoveDirection(point.getMovedirection()); - typhoonPoint.setLng(point.getLng()); - typhoonPoint.setLat(point.getLat()); - typhoonPoint.setRadius12(point.getRadius12()); - typhoonPoint.setRadius10(point.getRadius10()); - typhoonPoint.setRadius7(point.getRadius7()); - typhoonPoint.setRoutePrediction(point.getJl()); - typhoonPoint.setCenterPosition(point.getCkposition()); - - typhoonPointService.save(typhoonPoint); + routePoint.setTyphoonId(typhoonId); + routePoint.setTime(point.getTime()); + routePoint.setCenterPressure(point.getCenterPressure()); + routePoint.setSpeed(point.getSpeed()); + routePoint.setTyphoonType(point.getTyphoonType()); + routePoint.setMoveSpeed(point.getMoveSpeed()); + routePoint.setPower(point.getPower()); + routePoint.setMoveDirection(point.getMoveDirection()); + routePoint.setLng(point.getLng()); + routePoint.setLat(point.getLat()); + routePoint.setRadius12(point.getRadius12()); + routePoint.setRadius10(point.getRadius10()); + routePoint.setRadius7(point.getRadius7()); + routePoint.setRoutePrediction(point.getRoutePrediction()); + routePoint.setCenterPosition(point.getCenterPosition()); + routePointService.save(routePoint); } } } @@ -160,7 +180,9 @@ @Override public List currentTyphoonList() { List typhoonList = new ArrayList<>(); - for (Typhoon typhoon : list()) { + //筛选出还未消散的台风并更新详情 + List typhoons = this.baseMapper.selectCurrentTyphoon(); + for (Typhoon typhoon : typhoons) { typhoonList.add(new TyphoonDTO(typhoon)); } return typhoonList; @@ -168,15 +190,18 @@ @Override public TyphoonDetailDTO typhoonDetail(String typhoonId) { - TyphoonDetail detail = typhoonDetailService.getOne( + TyphoonDetail typhoonDetail = detailService.getOne( new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - List landList = typhoonLandService.list( - new QueryWrapper().eq("TYPHOON_ID", typhoonId) + if (typhoonDetail == null) { + return null; + } + List landPoints = landPointService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - List pointList = typhoonPointService.list( - new QueryWrapper().eq("TYPHOON_ID", typhoonId) + List routePoints = routePointService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - return new TyphoonDetailDTO(detail, landList, pointList); + return new TyphoonDetailDTO(typhoonDetail, landPoints, routePoints); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java deleted file mode 100644 index 552a6e9..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.casic.missiles.modular.system.utils; - -/** - * @author a203 - */ -public class Constant { - /** - * 热带气旋/台风相关常量 - */ - private static final String BASE_URL = "https://route.showapi.com"; - private static final String API_APPID = "780330"; - private static final String API_SIGN_KEY = "f30ac28b65cc447da936448c57bc5d99"; - - public static final String TYPHOON_LIST = BASE_URL - + "/342-1?" - + "showapi_appid=" + API_APPID + "&" - + "showapi_sign=" + API_SIGN_KEY + "&" - + "showapi_timestamp="; - - public static final String TYPHOON_DETAIL = BASE_URL - + "/342-2?" - + "showapi_appid=" + API_APPID + "&" - + "showapi_sign=" + API_SIGN_KEY + "&" - + "tfid=ID" + "&" - + "showapi_timestamp="; - - /** - * 洋流相关常量 - */ - private static final String OCEAN_BASE_URL = "http://api.meteo.open.ninecosmos.cn"; - public static final String OCEAN_HEADER_NAME = "Authorization"; - public static final String OCEAN_APPID = "WXZH888888"; - public static final String OCEAN_APP_KEY = "xb#bD&xtho@b80scbDb"; - - public static final String OCEAN_TOKEN = OCEAN_BASE_URL + "/us/users/open/token"; - public static final String OCEAN_DETAIL = OCEAN_BASE_URL + "/mr/netcdf/meteo/ytx"; -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java deleted file mode 100644 index 1e0cd94..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java +++ /dev/null @@ -1,115 +0,0 @@ -package com.casic.missiles.modular.system.utils; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONException; -import com.alibaba.fastjson.JSONObject; -import lombok.NonNull; -import okhttp3.*; - -import java.io.IOException; -import java.util.Objects; -import java.util.concurrent.TimeUnit; - -/** - * 网络请求工具 - * - * @author a203 - */ -public class HttpRequestHelper { - - public static RequestBody createRequestBody(String value) { - return RequestBody.create(MediaType.parse("application/json; charset=utf-8"), value); - } - - public static String doPost(Request request) { - return streamResponse(request); - } - - public static String doGet(String url) { - return streamResponse(new Request.Builder() - .url(url) - .build()); - } - - private static String streamResponse(@NonNull Request request) { - OkHttpClient httpClient = new OkHttpClient.Builder() - .connectTimeout(10, TimeUnit.SECONDS) - .writeTimeout(10, TimeUnit.SECONDS) - .readTimeout(20, TimeUnit.SECONDS) - .build(); - Call call = httpClient.newCall(request); - try { - Response response = call.execute(); - return response.body() != null ? Objects.requireNonNull(response.body()).string() : ""; - } catch (IOException e) { - e.printStackTrace(); - } - return ""; - } - - public static String obtainOceanData(double lng, double lat, String date, String days, String hour) { - /** - * 获取洋流数据Token - * */ - JSONObject object = new JSONObject(); - try { - object.put("appId", Constant.OCEAN_APPID); - object.put("appKey", Constant.OCEAN_APP_KEY); - } catch (JSONException e) { - e.printStackTrace(); - } - Request tokenRequest = new Request.Builder() - .url(Constant.OCEAN_TOKEN) - .post(HttpRequestHelper.createRequestBody(object.toJSONString())) - .build(); - String tokenJson = HttpRequestHelper.doPost(tokenRequest); - if ("".equals(tokenJson)) { - return null; - } - /** - * 解析token - * */ - JSONObject tokenObject = JSON.parseObject(tokenJson); - JSONObject dataObject = tokenObject.getJSONObject("data"); - String token = dataObject.getString("token"); - /** - * 封装请求参数 - * */ - JSONObject jsonObject = new JSONObject(); - try { - jsonObject.put("lon", lng); - jsonObject.put("lat", lat); - jsonObject.put("date", date); - jsonObject.put("hour", days); - jsonObject.put("days", hour); - } catch (JSONException e) { - e.printStackTrace(); - } - /** - * 获取洋流数据 - * */ - Request request = new Request.Builder() - .addHeader(Constant.OCEAN_HEADER_NAME, token) - .url(Constant.OCEAN_DETAIL) - .post(HttpRequestHelper.createRequestBody(jsonObject.toJSONString())) - .build(); - return HttpRequestHelper.doPost(request); - } - - public static String getTyphoonCode(String value) { - if ("".equals(value)) { - return value; - } - JSONObject jsonObject = JSON.parseObject(value); - return jsonObject.getString("showapi_res_code"); - } - - public static String getOceanCode(String value) { - if ("".equals(value)) { - return value; - } - JSONObject jsonObject = JSON.parseObject(value); - Integer code = jsonObject.getInteger("code"); - return String.valueOf(code); - } -} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/LandPoint.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/LandPoint.java new file mode 100644 index 0000000..f6d61ba --- /dev/null +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/LandPoint.java @@ -0,0 +1,67 @@ +package com.casic.missiles.modular.system.model; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import lombok.Data; + +/** + * 台风登陆点数据库模型 + * + * @author a203 + */ +@Data +@TableName("tf_land_point") +public class LandPoint extends Model { + private static final long serialVersionUID = 1L; + + /** + * 台风数据库主键 + */ + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private Long id; + + /** + * 台风ID + */ + @TableField("TYPHOON_ID") + private String typhoonId; + + /** + * 台风登陆点 + */ + @TableField("LAND_ADDRESS") + private String landAddress; + + /** + * 台风登陆时间 + */ + @TableField("LAND_TIME") + private String landTime; + + /** + * 台风类型-热带风暴/强台风... + */ + @TableField("TYPE") + private String type; + + /** + * 经度 + */ + @TableField("LNG") + private Double lng; + + /** + * 纬度 + */ + @TableField("LAT") + private Double lat; + + /** + * 台风登陆细节 + */ + @TableField("INFO") + private String info; +} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/RoutePoint.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/RoutePoint.java new file mode 100644 index 0000000..81981db --- /dev/null +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/RoutePoint.java @@ -0,0 +1,115 @@ +package com.casic.missiles.modular.system.model; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import lombok.Data; + +/** + * 台风移动点数据库模型 + * + * @author a203 + */ +@Data +@TableName("tf_route_point") +public class RoutePoint extends Model { + private static final long serialVersionUID = 1L; + + /** + * 台风数据库主键 + */ + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private Long id; + + /** + * 台风ID + */ + @TableField("TYPHOON_ID") + private String typhoonId; + + /** + * 数据更新时间 + */ + @TableField("TIME") + private String time; + + /** + * 台风中心气压,单位【百帕】 + */ + @TableField("CENTER_PRESSURE") + private String centerPressure; + + /** + * 风速,单位【米/每秒】 + */ + @TableField("SPEED") + private String speed; + + /** + * 台风风力等级描述 + */ + @TableField("TYPHOON_TYPE") + private String typhoonType; + + /** + * 台风整体移动速度,单位【公里/小时】 + */ + @TableField("MOVE_SPEED") + private String moveSpeed; + + /** + * 风力,单位【级】 + */ + @TableField("POWER") + private Integer power; + + /** + * 台风未来移动方向 + */ + @TableField("MOVE_DIRECTION") + private String moveDirection; + + /** + * 经度 + */ + @TableField("LNG") + private Double lng; + + /** + * 纬度 + */ + @TableField("LAT") + private Double lat; + + /** + * 12级风力影响半径 + */ + @TableField("RADIUS_12") + private String radius12; + + /** + * 10级风力影响半径 + */ + @TableField("RADIUS_10") + private String radius10; + + /** + * 7级风力影响半径 + */ + @TableField("RADIUS_7") + private String radius7; + + /** + * 台风路线预测 + */ + @TableField("ROUTE_PREDICTION") + private String routePrediction; + + /** + * 中心位置 + */ + @TableField("CENTER_POSITION") + private String centerPosition; +} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/Typhoon.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/Typhoon.java index 658cb40..7146637 100644 --- a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/Typhoon.java +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/Typhoon.java @@ -13,17 +13,15 @@ * @author a203 */ @Data -@TableName("typhoon_list") +@TableName("tf_list") public class Typhoon extends Model { private static final long serialVersionUID = 1L; /** * 台风数据库主键 - *

- * type = IdType.AUTO 是数据库自增 */ - @TableId(value = "ID", type = IdType.AUTO) - private Integer id; + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private Long id; /** * 台风ID @@ -95,4 +93,9 @@ */ @TableField("TIME") private String time; -} + /** + * 台风是否已消散,1-未消散,0-已消散 + */ + @TableField("IS_ACTIVE") + private String isActive; +} \ No newline at end of file diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..8396364 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,31 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel.DataBean data) { + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java index a34da1b..0c5225d 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -1,8 +1,8 @@ package com.casic.missiles.modular.system.dto; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; import lombok.Data; import java.util.ArrayList; @@ -142,7 +142,7 @@ private String centerPosition; } - public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + public TyphoonDetailDTO(TyphoonDetail detail, List landPoints, List routePoints) { this.typhoonId = detail.getTyphoonId(); this.name = detail.getName(); this.engName = detail.getEngName(); @@ -152,8 +152,9 @@ this.startTime = detail.getStartTime(); this.endTime = detail.getEndTime(); this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); - for (TyphoonLand landBean : landBeans) { + for (LandPoint landBean : landPoints) { LandBan bean = new LandBan(); bean.landAddress = landBean.getLandAddress(); bean.landTime = landBean.getLandTime(); @@ -164,8 +165,9 @@ lands.add(bean); } this.land = lands; + List points = new ArrayList<>(); - for (TyphoonPoint point : pointBeans) { + for (RoutePoint point : routePoints) { PointBean pointBean = new PointBean(); pointBean.time = point.getTime(); pointBean.centerPressure = point.getCenterPressure(); diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java new file mode 100644 index 0000000..b0b2e7a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java @@ -0,0 +1,265 @@ +package com.casic.missiles.modular.system.dto.remote; + +/** + * 洋流数据模型 + * + * @author a203 + */ +public class OceanDetailModel { + + /** + * code : 200 + * data : {"altitude":0,"forecast":{"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34},"oceanDir":135.22,"pressure":100925.19,"speed":7.97,"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"temperature":28.6,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34,"windDir":71.84,"windSpeed":7.97} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * altitude : 0 + * forecast : {"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34} + * oceanDir : 135.22 + * pressure : 100925.19 + * speed : 7.97 + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * temperature : 28.6 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + * windDir : 71.84 + * windSpeed : 7.97 + */ + + private double altitude; + private ForecastBean forecast; + private double oceanDir; + private double pressure; + private double speed; + private double swellDir; + private double swellHeight; + private double swellPrd; + private double temperature; + private double waveDir; + private double waveHeight; + private double wavePrd; + private double windDir; + private double windSpeed; + + public double getAltitude() { + return altitude; + } + + public void setAltitude(double altitude) { + this.altitude = altitude; + } + + public ForecastBean getForecast() { + return forecast; + } + + public void setForecast(ForecastBean forecast) { + this.forecast = forecast; + } + + public double getOceanDir() { + return oceanDir; + } + + public void setOceanDir(double oceanDir) { + this.oceanDir = oceanDir; + } + + public double getPressure() { + return pressure; + } + + public void setPressure(double pressure) { + this.pressure = pressure; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getTemperature() { + return temperature; + } + + public void setTemperature(double temperature) { + this.temperature = temperature; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + + public double getWindDir() { + return windDir; + } + + public void setWindDir(double windDir) { + this.windDir = windDir; + } + + public double getWindSpeed() { + return windSpeed; + } + + public void setWindSpeed(double windSpeed) { + this.windSpeed = windSpeed; + } + + public static class ForecastBean { + /** + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + */ + + private double swellDir; + private double swellHeight; + private double swellPrd; + private double waveDir; + private double waveHeight; + private double wavePrd; + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java deleted file mode 100644 index 5ad3a22..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java +++ /dev/null @@ -1,439 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方洋流数据模型 - * - * @author a203 - */ -public class OceanDetailRemoteData { - - /** - * code : 0 - * data : {"lon":114.338597,"lat":18.273134,"date":"2021-10-21","hour":10,"list":[{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}]} - * message : success - * etime : 1634786517992 - */ - - private int code; - private DataBean data; - private String message; - private long etime; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public DataBean getData() { - return data; - } - - public void setData(DataBean data) { - this.data = data; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public long getEtime() { - return etime; - } - - public void setEtime(long etime) { - this.etime = etime; - } - - public static class DataBean { - /** - * lon : 114.338597 - * lat : 18.273134 - * date : 2021-10-21 - * hour : 10 - * list : [{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}] - */ - - private double lon; - private double lat; - private String date; - private int hour; - private List list; - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public int getHour() { - return hour; - } - - public void setHour(int hour) { - this.hour = hour; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * date : 2021-10-21 - * ytx : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - * meteo : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - */ - - private String date; - private YtxBean ytx; - private MeteoBean meteo; - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public YtxBean getYtx() { - return ytx; - } - - public void setYtx(YtxBean ytx) { - this.ytx = ytx; - } - - public MeteoBean getMeteo() { - return meteo; - } - - public void setMeteo(MeteoBean meteo) { - this.meteo = meteo; - } - - public static class YtxBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - - public static class MeteoBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java new file mode 100644 index 0000000..3a2e068 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java @@ -0,0 +1,374 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风数据模型 + * + * @author a203 + */ +public class TyphoonDetailModel { + + /** + * code : 200 + * data : {"centerLat":20.65,"centerLng":128.1,"endTime":"2021-10-11 8:00:00","engName":"Kompasu","isActive":"1","land":[],"name":"圆规","points":[{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}],"startTime":"2021-10-8 2:00:00","typhoonId":"202118","warnLevel":"white"} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * centerLat : 20.65 + * centerLng : 128.1 + * endTime : 2021-10-11 8:00:00 + * engName : Kompasu + * isActive : 1 + * land : [] + * name : 圆规 + * points : [{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}] + * startTime : 2021-10-8 2:00:00 + * typhoonId : 202118 + * warnLevel : white + */ + + private double centerLat; + private double centerLng; + private String endTime; + private String engName; + private String isActive; + private String name; + private String startTime; + private String typhoonId; + private String warnLevel; + private List land; + private List points; + + public double getCenterLat() { + return centerLat; + } + + public void setCenterLat(double centerLat) { + this.centerLat = centerLat; + } + + public double getCenterLng() { + return centerLng; + } + + public void setCenterLng(double centerLng) { + this.centerLng = centerLng; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public String getIsActive() { + return isActive; + } + + public void setIsActive(String isActive) { + this.isActive = isActive; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getWarnLevel() { + return warnLevel; + } + + public void setWarnLevel(String warnLevel) { + this.warnLevel = warnLevel; + } + + public List getLand() { + return land; + } + + public void setLand(List land) { + this.land = land; + } + + public static class LandBean { + private String landAddress; + private String type; + private Double lng; + private Double lat; + private String info; + private String landTime; + + public String getLandAddress() { + return landAddress; + } + + public void setLandAddress(String landAddress) { + this.landAddress = landAddress; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Double getLng() { + return lng; + } + + public void setLng(Double lng) { + this.lng = lng; + } + + public Double getLat() { + return lat; + } + + public void setLat(Double lat) { + this.lat = lat; + } + + public String getInfo() { + return info; + } + + public void setInfo(String info) { + this.info = info; + } + + public String getLandTime() { + return landTime; + } + + public void setLandTime(String landTime) { + this.landTime = landTime; + } + } + + public List getPoints() { + return points; + } + + public void setPoints(List points) { + this.points = points; + } + + public static class PointsBean { + /** + * centerPosition : 距离菲律宾马尼拉东北方向约600公里 + * centerPressure : 990 + * lat : 18.7 + * lng : 124.7 + * moveDirection : 西北西 + * moveSpeed : 25 + * power : 9 + * radius10 : + * radius12 : + * radius7 : 160|140|200|180 + * routePrediction : “圆规”将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分) + * speed : 23 + * time : 2021-10-11 8:00:00 + * typhoonType : 热带风暴 + */ + + private String centerPosition; + private String centerPressure; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private int power; + private String radius10; + private String radius12; + private String radius7; + private String routePrediction; + private String speed; + private String time; + private String typhoonType; + + public String getCenterPosition() { + return centerPosition; + } + + public void setCenterPosition(String centerPosition) { + this.centerPosition = centerPosition; + } + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius12() { + return radius12; + } + + public void setRadius12(String radius12) { + this.radius12 = radius12; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getRoutePrediction() { + return routePrediction; + } + + public void setRoutePrediction(String routePrediction) { + this.routePrediction = routePrediction; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java deleted file mode 100644 index 5b70924..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java +++ /dev/null @@ -1,419 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonDetailRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 6155596a0de376ce34c7b594 - * showapi_res_body : {"ret_code":0,"obj":{"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"}} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * obj : {"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"} - */ - - private int ret_code; - private ObjBean obj; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public ObjBean getObj() { - return obj; - } - - public void setObj(ObjBean obj) { - this.obj = obj; - } - - public static class ObjBean { - /** - * endtime : 2021-9-30 8:00:00 - * centerlng : 139.300000 - * starttime : 2021-9-23 20:00:00 - * tfid : 202116 - * isactive : 1 - * centerlat : 25.200000 - * name : 蒲公英 - * land : [{"landaddress":"朱家尖镇","strong":"强台风","lng":"122.39","lat":"29.83","info":"\u201c灿鸿\u201d11日16时40分前后登陆浙江舟山市朱家尖镇","landtime":"2015/7/11 16:40:00"}] - * warnlevel : white - * points : [{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}] - * enname : Mindulle - */ - - private String endtime; - private String centerlng; - private String starttime; - private String tfid; - private String isactive; - private String centerlat; - private String name; - private String warnlevel; - private String enname; - private List land; - private List points; - - public String getEndtime() { - return endtime; - } - - public void setEndtime(String endtime) { - this.endtime = endtime; - } - - public String getCenterlng() { - return centerlng; - } - - public void setCenterlng(String centerlng) { - this.centerlng = centerlng; - } - - public String getStarttime() { - return starttime; - } - - public void setStarttime(String starttime) { - this.starttime = starttime; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getIsactive() { - return isactive; - } - - public void setIsactive(String isactive) { - this.isactive = isactive; - } - - public String getCenterlat() { - return centerlat; - } - - public void setCenterlat(String centerlat) { - this.centerlat = centerlat; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getWarnlevel() { - return warnlevel; - } - - public void setWarnlevel(String warnlevel) { - this.warnlevel = warnlevel; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - - public List getLand() { - return land; - } - - public void setLand(List land) { - this.land = land; - } - - public static class LandBan { - /** - * landaddress : 朱家尖镇 - * strong : 强台风 - * lng : 122.39 - * lat : 29.83 - * info : “灿鸿”11日16时40分前后登陆浙江舟山市朱家尖镇 - * landtime : 2015/7/11 16:40:00 - */ - - private String landaddress; - private String strong; - private Double lng; - private Double lat; - private String info; - private String landtime; - - public String getLandaddress() { - return landaddress; - } - - public void setLandaddress(String landaddress) { - this.landaddress = landaddress; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getInfo() { - return info; - } - - public void setInfo(String info) { - this.info = info; - } - - public String getLandtime() { - return landtime; - } - - public void setLandtime(String landtime) { - this.landtime = landtime; - } - } - - public List getPoints() { - return points; - } - - public void setPoints(List points) { - this.points = points; - } - - public static class PointsBean { - /** - * time : 2021-9-23 20:00:00 - * pressure : 998 - * radius10 : - * speed : 18 - * strong : 热带风暴 - * movespeed : 20 - * radius12 : - * power : 8 - * lng : 143.30 - * movedirection : 西北西 - * lat : 13.80 - * radius7 : 250|220|200|180 - * jl : “蒲公英”将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分) - * ckposition : 距离日本东京南偏西方向约1060公里 - */ - - private String time; - private String pressure; - private String radius10; - private String speed; - private String strong; - private String movespeed; - private String radius12; - private String power; - private Double lng; - private String movedirection; - private Double lat; - private String radius7; - private String jl; - private String ckposition; - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getRadius12() { - return radius12; - } - - public void setRadius12(String radius12) { - this.radius12 = radius12; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getJl() { - return jl; - } - - public void setJl(String jl) { - this.jl = jl; - } - - public String getCkposition() { - return ckposition; - } - - public void setCkposition(String ckposition) { - this.ckposition = ckposition; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java new file mode 100644 index 0000000..91bad37 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java @@ -0,0 +1,201 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风列表数据模型 + * + * @author a203 + */ +public class TyphoonListModel { + + /** + * code : 200 + * data : [{"centerPressure":"990","engName":"Kompasu","lat":18.7,"lng":125,"moveDirection":"西北西","moveSpeed":"23","name":"圆规","power":9,"radius10":"","radius7":"200","speed":"23","time":"2021-10-11 05:00:00","typhoonId":"202118","typhoonType":"热带风暴"}] + * message : 请求成功 + * success : true + */ + + private int code; + private String message; + private boolean success; + private List data; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public static class DataBean { + /** + * centerPressure : 990 + * engName : Kompasu + * lat : 18.7 + * lng : 125 + * moveDirection : 西北西 + * moveSpeed : 23 + * name : 圆规 + * power : 9 + * radius10 : + * radius7 : 200 + * speed : 23 + * time : 2021-10-11 05:00:00 + * typhoonId : 202118 + * typhoonType : 热带风暴 + */ + + private String centerPressure; + private String engName; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private String name; + private int power; + private String radius10; + private String radius7; + private String speed; + private String time; + private String typhoonId; + private String typhoonType; + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java deleted file mode 100644 index 38a9257..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java +++ /dev/null @@ -1,237 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 61554fbe0de376d03494057c - * showapi_res_body : {"ret_code":0,"list":[{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}]} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * list : [{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}] - */ - - private int ret_code; - private List list; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * pressure : 945 - * tfid : 202116 - * radius10 : 150 - * speed : 48 - * lng : 136.40 - * radius7 : 350 - * time : 2021-09-30 08:00:00 - * movespeed : 23 - * strong : 强台风 - * name : 蒲公英 - * power : 15 - * movedirection : 北北东 - * lat : 26.60 - * enname : Mindulle - */ - - private String pressure; - private String tfid; - private String radius10; - private String speed; - private String lng; - private String radius7; - private String time; - private String movespeed; - private String strong; - private String name; - private String power; - private String movedirection; - private String lat; - private String enname; - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getLng() { - return lng; - } - - public void setLng(String lng) { - this.lng = lng; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public String getLat() { - return lat; - } - - public void setLat(String lat) { - this.lat = lat; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java new file mode 100644 index 0000000..c488237 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风移动点数据信息 服务类 + * + * @author a203 + */ +public interface ILandPointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java new file mode 100644 index 0000000..ab05570 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风登陆点数据信息 服务类 + * + * @author a203 + */ +public interface IRoutePointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java deleted file mode 100644 index d16a48b..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonLandService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java deleted file mode 100644 index 80e2765..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonPointService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java index c47a0f3..53bb971 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java @@ -19,13 +19,6 @@ void saveTyphoonList(); /** - * 更新台风详情 - */ - void updateTyphoonDetail(); - - /***上面接口从第三方存库,下面接口查库**********************/ - - /** * 查询台风列表 * * @return {@link List} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java new file mode 100644 index 0000000..fed33c1 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.LandPointMapper; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.service.ILandPointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class LandPointServiceImpl extends ServiceImpl implements ILandPointService { + + public LandPointServiceImpl() { + + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java index f8cb771..58fce60 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java @@ -2,9 +2,12 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; +import com.casic.missiles.modular.system.dto.AddressConfigDTO; import com.casic.missiles.modular.system.dto.OceanDetailDTO; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; +import com.casic.missiles.modular.system.service.IAddressConfigService; import com.casic.missiles.modular.system.service.IOceanService; +import com.casic.missiles.modular.system.utils.Constant; import com.casic.missiles.modular.system.utils.HttpRequestHelper; import org.springframework.stereotype.Service; @@ -17,23 +20,32 @@ @Service public class OceanServiceImpl implements IOceanService { - private static final String SUCCESS_CODE = "0"; + private final IAddressConfigService configService; - public OceanServiceImpl() { - + public OceanServiceImpl(IAddressConfigService configService) { + this.configService = configService; } @Override public OceanDetailDTO oceanDetail(double lng, double lat, String date, String days, String hour) { - String oceanData = HttpRequestHelper.obtainOceanData(lng, lat, date, days, hour); + AddressConfigDTO addressConfig = configService.selectLastConfig(); + String envIp = addressConfig.getEnvIp(); + if (envIp.contains(Constant.HTTP_HEADER)) { + envIp = envIp.replace(Constant.HTTP_HEADER, ""); + } + String url = Constant.HTTP_HEADER + envIp + "/environment/ocean?" + + "lng=" + lng + "&lat=" + lat + + "&date=" + date + "&days=" + days + "&hour=" + hour; + + String oceanData = HttpRequestHelper.doGet(url); /** * 解析洋流数据返回给前端 * */ OceanDetailDTO oceanDetailDTO = null; - if (SUCCESS_CODE.equals(HttpRequestHelper.getOceanCode(oceanData))) { - OceanDetailRemoteData remoteData = JSON.parseObject(oceanData, new TypeReference() { + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(oceanData)) { + OceanDetailModel remoteData = JSON.parseObject(oceanData, new TypeReference() { }); - oceanDetailDTO = new OceanDetailDTO(remoteData); + oceanDetailDTO = new OceanDetailDTO(remoteData.getData()); } return oceanDetailDTO; } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java new file mode 100644 index 0000000..24b06cd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.RoutePointMapper; +import com.casic.missiles.modular.system.model.RoutePoint; +import com.casic.missiles.modular.system.service.IRoutePointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class RoutePointServiceImpl extends ServiceImpl implements IRoutePointService { + + public RoutePointServiceImpl() { + + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java deleted file mode 100644 index d1bf2c7..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.casic.missiles.modular.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.casic.missiles.modular.system.dao.TyphoonLandMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.service.ITyphoonLandService; -import org.springframework.stereotype.Service; - -/** - * 台风数据信息 服务实现类 - * - * @author a203 - */ - -@Service -public class TyphoonLandServiceImpl extends ServiceImpl implements ITyphoonLandService { - - public TyphoonLandServiceImpl() { - - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java deleted file mode 100644 index 36815fa..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.casic.missiles.modular.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.casic.missiles.modular.system.dao.TyphoonPointMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; -import com.casic.missiles.modular.system.service.ITyphoonPointService; -import org.springframework.stereotype.Service; - -/** - * 台风数据信息 服务实现类 - * - * @author a203 - */ - -@Service -public class TyphoonPointServiceImpl extends ServiceImpl implements ITyphoonPointService { - - public TyphoonPointServiceImpl() { - - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java index 861e2c1..1cbfb01 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java @@ -5,18 +5,16 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.casic.missiles.modular.system.dao.TyphoonMapper; +import com.casic.missiles.modular.system.dto.AddressConfigDTO; import com.casic.missiles.modular.system.dto.TyphoonDTO; import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; -import com.casic.missiles.modular.system.dto.remote.TyphoonDetailRemoteData; -import com.casic.missiles.modular.system.dto.remote.TyphoonRemoteData; +import com.casic.missiles.modular.system.dto.remote.TyphoonDetailModel; +import com.casic.missiles.modular.system.dto.remote.TyphoonListModel; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.Typhoon; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; -import com.casic.missiles.modular.system.service.ITyphoonDetailService; -import com.casic.missiles.modular.system.service.ITyphoonLandService; -import com.casic.missiles.modular.system.service.ITyphoonPointService; -import com.casic.missiles.modular.system.service.ITyphoonService; +import com.casic.missiles.modular.system.service.*; import com.casic.missiles.modular.system.utils.Constant; import com.casic.missiles.modular.system.utils.HttpRequestHelper; import org.springframework.stereotype.Service; @@ -33,17 +31,29 @@ @Service public class TyphoonServiceImpl extends ServiceImpl implements ITyphoonService { - private static final String SUCCESS_CODE = "0"; + private final IAddressConfigService configService; + private final ITyphoonDetailService detailService; + private final ILandPointService landPointService; + private final IRoutePointService routePointService; - private final ITyphoonDetailService typhoonDetailService; - private final ITyphoonLandService typhoonLandService; - private final ITyphoonPointService typhoonPointService; + public TyphoonServiceImpl(IAddressConfigService configService, + ITyphoonDetailService detailService, + ILandPointService landPointService, + IRoutePointService routePointService) { + this.configService = configService; + this.detailService = detailService; + this.landPointService = landPointService; + this.routePointService = routePointService; + } - public TyphoonServiceImpl(ITyphoonDetailService typhoonDetailService, - ITyphoonLandService typhoonLandService, ITyphoonPointService typhoonPointService) { - this.typhoonDetailService = typhoonDetailService; - this.typhoonLandService = typhoonLandService; - this.typhoonPointService = typhoonPointService; + private String obtainEnvAddress() { + //获取服务器配置的IP信息 + AddressConfigDTO addressConfig = configService.selectLastConfig(); + String envIp = addressConfig.getEnvIp(); + if (envIp.contains(Constant.HTTP_HEADER)) { + envIp = envIp.replace(Constant.HTTP_HEADER, ""); + } + return envIp; } /** @@ -51,107 +61,117 @@ */ @Override public void saveTyphoonList() { + String url = Constant.HTTP_HEADER + obtainEnvAddress() + "/environment/saveTyphoon?"; /** * 获取台风接口数据 * */ - String res = HttpRequestHelper.doGet(Constant.TYPHOON_LIST + System.currentTimeMillis()); - if (SUCCESS_CODE.equals(HttpRequestHelper.getTyphoonCode(res))) { - TyphoonRemoteData remoteData = JSON.parseObject(res, new TypeReference() { + String res = HttpRequestHelper.doGet(url); + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(res)) { + TyphoonListModel listModel = JSON.parseObject(res, new TypeReference() { }); - //先清空之前的台风表,再保存最新的台风 - remove(null); - List beans = remoteData.getShowapi_res_body().getList(); - for (TyphoonRemoteData.ShowapiResBodyBean.ListBean data : beans) { - //将获取到台风数据存到数据库 + for (TyphoonListModel.DataBean data : listModel.getData()) { Typhoon entity = new Typhoon(); - entity.setTyphoonId(data.getTfid()); + entity.setTyphoonId(data.getTyphoonId()); entity.setName(data.getName()); - entity.setEngName(data.getEnname()); - entity.setLng(Double.valueOf(data.getLng())); - entity.setLat(Double.valueOf(data.getLat())); - entity.setTyphoonType(data.getStrong()); - entity.setCenterPressure(data.getPressure()); + entity.setEngName(data.getEngName()); + entity.setLng(data.getLng()); + entity.setLat(data.getLat()); + entity.setTyphoonType(data.getTyphoonType()); + entity.setCenterPressure(data.getCenterPressure()); entity.setSpeed(data.getSpeed()); - entity.setPower(Integer.valueOf(data.getPower())); - entity.setMoveSpeed(data.getMovespeed()); - entity.setMoveDirection(data.getMovedirection()); + entity.setPower(data.getPower()); + entity.setMoveSpeed(data.getMoveSpeed()); + entity.setMoveDirection(data.getMoveDirection()); entity.setRadius7(data.getRadius7()); entity.setRadius10(data.getRadius10()); entity.setTime(data.getTime()); - save(entity); + entity.setIsActive("1"); + this.baseMapper.insert(entity); } } + updateTyphoonDetail(); } /** * 更新台风详情 */ - @Override - public void updateTyphoonDetail() { - for (Typhoon typhoon : list()) { + private void updateTyphoonDetail() { + //筛选出还未消散的台风并更新详情 + List typhoons = this.baseMapper.selectCurrentTyphoon(); + for (Typhoon typhoon : typhoons) { /** * 获取台风接口数据 * */ - String res = HttpRequestHelper.doGet( - Constant.TYPHOON_DETAIL.replace("ID", typhoon.getTyphoonId()) - + System.currentTimeMillis()); - if (SUCCESS_CODE.equals(HttpRequestHelper.getTyphoonCode(res))) { - TyphoonDetailRemoteData remoteData = JSON.parseObject(res, new TypeReference() { + String url = Constant.HTTP_HEADER + obtainEnvAddress() + "/environment/updateTyphoon?typhoonId=" + typhoon.getTyphoonId(); + String res = HttpRequestHelper.doGet(url); + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(res)) { + TyphoonDetailModel detailModel = JSON.parseObject(res, new TypeReference() { }); - TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean objBean = remoteData.getShowapi_res_body().getObj(); - //保存台风基本情况存到数据库 + TyphoonDetailModel.DataBean dataBean = detailModel.getData(); + String typhoonId = dataBean.getTyphoonId(); + /** + * 保存台风基本情况存到数据库 + * */ TyphoonDetail detail = new TyphoonDetail(); - detail.setTyphoonId(objBean.getTfid()); - detail.setName(objBean.getName()); - detail.setEngName(objBean.getEnname()); - detail.setWarnLevel(objBean.getWarnlevel()); - detail.setCenterLng(Double.parseDouble(objBean.getCenterlng())); - detail.setCenterLat(Double.parseDouble(objBean.getCenterlat())); - detail.setStartTime(objBean.getStarttime()); - detail.setEndTime(objBean.getEndtime()); - detail.setIsActive(objBean.getIsactive()); - typhoonDetailService.saveOrUpdate(detail, new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); + detail.setTyphoonId(typhoonId); + detail.setName(dataBean.getName()); + detail.setEngName(dataBean.getEngName()); + detail.setWarnLevel(dataBean.getWarnLevel()); + detail.setCenterLng(dataBean.getCenterLng()); + detail.setCenterLat(dataBean.getCenterLat()); + detail.setStartTime(dataBean.getStartTime()); + detail.setEndTime(dataBean.getEndTime()); + detail.setIsActive(dataBean.getIsActive()); + QueryWrapper queryWrapper = new QueryWrapper().eq("TYPHOON_ID", typhoonId); + detailService.saveOrUpdate(detail, queryWrapper); - //保存台风登陆情况存到数据库 - List land = objBean.getLand(); - typhoonLandService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); - for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.LandBan landBan : land) { - TyphoonLand typhoonLand = new TyphoonLand(); + /** + * 更新台风列表台风状态 + * */ + typhoon.setIsActive(dataBean.getIsActive()); + saveOrUpdate(typhoon, new QueryWrapper().eq("TYPHOON_ID", typhoonId)); - typhoonLand.setTyphoonId(objBean.getTfid()); - typhoonLand.setLandAddress(landBan.getLandaddress()); - typhoonLand.setLandTime(landBan.getLandtime()); - typhoonLand.setType(landBan.getStrong()); - typhoonLand.setLng(landBan.getLng()); - typhoonLand.setLat(landBan.getLat()); - typhoonLand.setInfo(landBan.getInfo()); + /** + * 保存台风登陆情况存到数据库 + * */ + List landBans = dataBean.getLand(); + for (TyphoonDetailModel.DataBean.LandBean bean : landBans) { + LandPoint landPoint = new LandPoint(); - typhoonLandService.save(typhoonLand); + landPoint.setTyphoonId(typhoonId); + landPoint.setLandAddress(bean.getLandAddress()); + landPoint.setLandTime(bean.getLandTime()); + landPoint.setType(bean.getType()); + landPoint.setLng(bean.getLng()); + landPoint.setLat(bean.getLat()); + landPoint.setInfo(bean.getInfo()); + landPointService.save(landPoint); } - //保存台风移动路径存到数据库 - List points = objBean.getPoints(); - typhoonPointService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); - for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.PointsBean point : points) { - TyphoonPoint typhoonPoint = new TyphoonPoint(); + /** + * 保存台风移动路径存到数据库 + * */ + List routePoints = dataBean.getPoints(); + routePointService.remove(new QueryWrapper().eq("TYPHOON_ID", typhoonId)); + for (TyphoonDetailModel.DataBean.PointsBean point : routePoints) { + RoutePoint routePoint = new RoutePoint(); - typhoonPoint.setTyphoonId(objBean.getTfid()); - typhoonPoint.setTime(point.getTime()); - typhoonPoint.setCenterPressure(point.getPressure()); - typhoonPoint.setSpeed(point.getSpeed()); - typhoonPoint.setTyphoonType(point.getStrong()); - typhoonPoint.setMoveSpeed(point.getMovespeed()); - typhoonPoint.setPower(Integer.parseInt(point.getPower())); - typhoonPoint.setMoveDirection(point.getMovedirection()); - typhoonPoint.setLng(point.getLng()); - typhoonPoint.setLat(point.getLat()); - typhoonPoint.setRadius12(point.getRadius12()); - typhoonPoint.setRadius10(point.getRadius10()); - typhoonPoint.setRadius7(point.getRadius7()); - typhoonPoint.setRoutePrediction(point.getJl()); - typhoonPoint.setCenterPosition(point.getCkposition()); - - typhoonPointService.save(typhoonPoint); + routePoint.setTyphoonId(typhoonId); + routePoint.setTime(point.getTime()); + routePoint.setCenterPressure(point.getCenterPressure()); + routePoint.setSpeed(point.getSpeed()); + routePoint.setTyphoonType(point.getTyphoonType()); + routePoint.setMoveSpeed(point.getMoveSpeed()); + routePoint.setPower(point.getPower()); + routePoint.setMoveDirection(point.getMoveDirection()); + routePoint.setLng(point.getLng()); + routePoint.setLat(point.getLat()); + routePoint.setRadius12(point.getRadius12()); + routePoint.setRadius10(point.getRadius10()); + routePoint.setRadius7(point.getRadius7()); + routePoint.setRoutePrediction(point.getRoutePrediction()); + routePoint.setCenterPosition(point.getCenterPosition()); + routePointService.save(routePoint); } } } @@ -160,7 +180,9 @@ @Override public List currentTyphoonList() { List typhoonList = new ArrayList<>(); - for (Typhoon typhoon : list()) { + //筛选出还未消散的台风并更新详情 + List typhoons = this.baseMapper.selectCurrentTyphoon(); + for (Typhoon typhoon : typhoons) { typhoonList.add(new TyphoonDTO(typhoon)); } return typhoonList; @@ -168,15 +190,18 @@ @Override public TyphoonDetailDTO typhoonDetail(String typhoonId) { - TyphoonDetail detail = typhoonDetailService.getOne( + TyphoonDetail typhoonDetail = detailService.getOne( new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - List landList = typhoonLandService.list( - new QueryWrapper().eq("TYPHOON_ID", typhoonId) + if (typhoonDetail == null) { + return null; + } + List landPoints = landPointService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - List pointList = typhoonPointService.list( - new QueryWrapper().eq("TYPHOON_ID", typhoonId) + List routePoints = routePointService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - return new TyphoonDetailDTO(detail, landList, pointList); + return new TyphoonDetailDTO(typhoonDetail, landPoints, routePoints); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java deleted file mode 100644 index 552a6e9..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.casic.missiles.modular.system.utils; - -/** - * @author a203 - */ -public class Constant { - /** - * 热带气旋/台风相关常量 - */ - private static final String BASE_URL = "https://route.showapi.com"; - private static final String API_APPID = "780330"; - private static final String API_SIGN_KEY = "f30ac28b65cc447da936448c57bc5d99"; - - public static final String TYPHOON_LIST = BASE_URL - + "/342-1?" - + "showapi_appid=" + API_APPID + "&" - + "showapi_sign=" + API_SIGN_KEY + "&" - + "showapi_timestamp="; - - public static final String TYPHOON_DETAIL = BASE_URL - + "/342-2?" - + "showapi_appid=" + API_APPID + "&" - + "showapi_sign=" + API_SIGN_KEY + "&" - + "tfid=ID" + "&" - + "showapi_timestamp="; - - /** - * 洋流相关常量 - */ - private static final String OCEAN_BASE_URL = "http://api.meteo.open.ninecosmos.cn"; - public static final String OCEAN_HEADER_NAME = "Authorization"; - public static final String OCEAN_APPID = "WXZH888888"; - public static final String OCEAN_APP_KEY = "xb#bD&xtho@b80scbDb"; - - public static final String OCEAN_TOKEN = OCEAN_BASE_URL + "/us/users/open/token"; - public static final String OCEAN_DETAIL = OCEAN_BASE_URL + "/mr/netcdf/meteo/ytx"; -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java deleted file mode 100644 index 1e0cd94..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java +++ /dev/null @@ -1,115 +0,0 @@ -package com.casic.missiles.modular.system.utils; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONException; -import com.alibaba.fastjson.JSONObject; -import lombok.NonNull; -import okhttp3.*; - -import java.io.IOException; -import java.util.Objects; -import java.util.concurrent.TimeUnit; - -/** - * 网络请求工具 - * - * @author a203 - */ -public class HttpRequestHelper { - - public static RequestBody createRequestBody(String value) { - return RequestBody.create(MediaType.parse("application/json; charset=utf-8"), value); - } - - public static String doPost(Request request) { - return streamResponse(request); - } - - public static String doGet(String url) { - return streamResponse(new Request.Builder() - .url(url) - .build()); - } - - private static String streamResponse(@NonNull Request request) { - OkHttpClient httpClient = new OkHttpClient.Builder() - .connectTimeout(10, TimeUnit.SECONDS) - .writeTimeout(10, TimeUnit.SECONDS) - .readTimeout(20, TimeUnit.SECONDS) - .build(); - Call call = httpClient.newCall(request); - try { - Response response = call.execute(); - return response.body() != null ? Objects.requireNonNull(response.body()).string() : ""; - } catch (IOException e) { - e.printStackTrace(); - } - return ""; - } - - public static String obtainOceanData(double lng, double lat, String date, String days, String hour) { - /** - * 获取洋流数据Token - * */ - JSONObject object = new JSONObject(); - try { - object.put("appId", Constant.OCEAN_APPID); - object.put("appKey", Constant.OCEAN_APP_KEY); - } catch (JSONException e) { - e.printStackTrace(); - } - Request tokenRequest = new Request.Builder() - .url(Constant.OCEAN_TOKEN) - .post(HttpRequestHelper.createRequestBody(object.toJSONString())) - .build(); - String tokenJson = HttpRequestHelper.doPost(tokenRequest); - if ("".equals(tokenJson)) { - return null; - } - /** - * 解析token - * */ - JSONObject tokenObject = JSON.parseObject(tokenJson); - JSONObject dataObject = tokenObject.getJSONObject("data"); - String token = dataObject.getString("token"); - /** - * 封装请求参数 - * */ - JSONObject jsonObject = new JSONObject(); - try { - jsonObject.put("lon", lng); - jsonObject.put("lat", lat); - jsonObject.put("date", date); - jsonObject.put("hour", days); - jsonObject.put("days", hour); - } catch (JSONException e) { - e.printStackTrace(); - } - /** - * 获取洋流数据 - * */ - Request request = new Request.Builder() - .addHeader(Constant.OCEAN_HEADER_NAME, token) - .url(Constant.OCEAN_DETAIL) - .post(HttpRequestHelper.createRequestBody(jsonObject.toJSONString())) - .build(); - return HttpRequestHelper.doPost(request); - } - - public static String getTyphoonCode(String value) { - if ("".equals(value)) { - return value; - } - JSONObject jsonObject = JSON.parseObject(value); - return jsonObject.getString("showapi_res_code"); - } - - public static String getOceanCode(String value) { - if ("".equals(value)) { - return value; - } - JSONObject jsonObject = JSON.parseObject(value); - Integer code = jsonObject.getInteger("code"); - return String.valueOf(code); - } -} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/LandPoint.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/LandPoint.java new file mode 100644 index 0000000..f6d61ba --- /dev/null +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/LandPoint.java @@ -0,0 +1,67 @@ +package com.casic.missiles.modular.system.model; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import lombok.Data; + +/** + * 台风登陆点数据库模型 + * + * @author a203 + */ +@Data +@TableName("tf_land_point") +public class LandPoint extends Model { + private static final long serialVersionUID = 1L; + + /** + * 台风数据库主键 + */ + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private Long id; + + /** + * 台风ID + */ + @TableField("TYPHOON_ID") + private String typhoonId; + + /** + * 台风登陆点 + */ + @TableField("LAND_ADDRESS") + private String landAddress; + + /** + * 台风登陆时间 + */ + @TableField("LAND_TIME") + private String landTime; + + /** + * 台风类型-热带风暴/强台风... + */ + @TableField("TYPE") + private String type; + + /** + * 经度 + */ + @TableField("LNG") + private Double lng; + + /** + * 纬度 + */ + @TableField("LAT") + private Double lat; + + /** + * 台风登陆细节 + */ + @TableField("INFO") + private String info; +} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/RoutePoint.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/RoutePoint.java new file mode 100644 index 0000000..81981db --- /dev/null +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/RoutePoint.java @@ -0,0 +1,115 @@ +package com.casic.missiles.modular.system.model; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import lombok.Data; + +/** + * 台风移动点数据库模型 + * + * @author a203 + */ +@Data +@TableName("tf_route_point") +public class RoutePoint extends Model { + private static final long serialVersionUID = 1L; + + /** + * 台风数据库主键 + */ + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private Long id; + + /** + * 台风ID + */ + @TableField("TYPHOON_ID") + private String typhoonId; + + /** + * 数据更新时间 + */ + @TableField("TIME") + private String time; + + /** + * 台风中心气压,单位【百帕】 + */ + @TableField("CENTER_PRESSURE") + private String centerPressure; + + /** + * 风速,单位【米/每秒】 + */ + @TableField("SPEED") + private String speed; + + /** + * 台风风力等级描述 + */ + @TableField("TYPHOON_TYPE") + private String typhoonType; + + /** + * 台风整体移动速度,单位【公里/小时】 + */ + @TableField("MOVE_SPEED") + private String moveSpeed; + + /** + * 风力,单位【级】 + */ + @TableField("POWER") + private Integer power; + + /** + * 台风未来移动方向 + */ + @TableField("MOVE_DIRECTION") + private String moveDirection; + + /** + * 经度 + */ + @TableField("LNG") + private Double lng; + + /** + * 纬度 + */ + @TableField("LAT") + private Double lat; + + /** + * 12级风力影响半径 + */ + @TableField("RADIUS_12") + private String radius12; + + /** + * 10级风力影响半径 + */ + @TableField("RADIUS_10") + private String radius10; + + /** + * 7级风力影响半径 + */ + @TableField("RADIUS_7") + private String radius7; + + /** + * 台风路线预测 + */ + @TableField("ROUTE_PREDICTION") + private String routePrediction; + + /** + * 中心位置 + */ + @TableField("CENTER_POSITION") + private String centerPosition; +} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/Typhoon.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/Typhoon.java index 658cb40..7146637 100644 --- a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/Typhoon.java +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/Typhoon.java @@ -13,17 +13,15 @@ * @author a203 */ @Data -@TableName("typhoon_list") +@TableName("tf_list") public class Typhoon extends Model { private static final long serialVersionUID = 1L; /** * 台风数据库主键 - *

- * type = IdType.AUTO 是数据库自增 */ - @TableId(value = "ID", type = IdType.AUTO) - private Integer id; + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private Long id; /** * 台风ID @@ -95,4 +93,9 @@ */ @TableField("TIME") private String time; -} + /** + * 台风是否已消散,1-未消散,0-已消散 + */ + @TableField("IS_ACTIVE") + private String isActive; +} \ No newline at end of file diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonDetail.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonDetail.java index ea3c29d..8b93cd0 100644 --- a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonDetail.java +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonDetail.java @@ -13,17 +13,15 @@ * @author a203 */ @Data -@TableName("typhoon_detail") +@TableName("tf_detail") public class TyphoonDetail extends Model { private static final long serialVersionUID = 1L; /** * 台风数据库主键 - *

- * type = IdType.AUTO 是数据库自增 */ - @TableId(value = "ID", type = IdType.AUTO) - private Integer id; + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private Long id; /** * 台风ID diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..8396364 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,31 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel.DataBean data) { + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java index a34da1b..0c5225d 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -1,8 +1,8 @@ package com.casic.missiles.modular.system.dto; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; import lombok.Data; import java.util.ArrayList; @@ -142,7 +142,7 @@ private String centerPosition; } - public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + public TyphoonDetailDTO(TyphoonDetail detail, List landPoints, List routePoints) { this.typhoonId = detail.getTyphoonId(); this.name = detail.getName(); this.engName = detail.getEngName(); @@ -152,8 +152,9 @@ this.startTime = detail.getStartTime(); this.endTime = detail.getEndTime(); this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); - for (TyphoonLand landBean : landBeans) { + for (LandPoint landBean : landPoints) { LandBan bean = new LandBan(); bean.landAddress = landBean.getLandAddress(); bean.landTime = landBean.getLandTime(); @@ -164,8 +165,9 @@ lands.add(bean); } this.land = lands; + List points = new ArrayList<>(); - for (TyphoonPoint point : pointBeans) { + for (RoutePoint point : routePoints) { PointBean pointBean = new PointBean(); pointBean.time = point.getTime(); pointBean.centerPressure = point.getCenterPressure(); diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java new file mode 100644 index 0000000..b0b2e7a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java @@ -0,0 +1,265 @@ +package com.casic.missiles.modular.system.dto.remote; + +/** + * 洋流数据模型 + * + * @author a203 + */ +public class OceanDetailModel { + + /** + * code : 200 + * data : {"altitude":0,"forecast":{"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34},"oceanDir":135.22,"pressure":100925.19,"speed":7.97,"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"temperature":28.6,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34,"windDir":71.84,"windSpeed":7.97} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * altitude : 0 + * forecast : {"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34} + * oceanDir : 135.22 + * pressure : 100925.19 + * speed : 7.97 + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * temperature : 28.6 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + * windDir : 71.84 + * windSpeed : 7.97 + */ + + private double altitude; + private ForecastBean forecast; + private double oceanDir; + private double pressure; + private double speed; + private double swellDir; + private double swellHeight; + private double swellPrd; + private double temperature; + private double waveDir; + private double waveHeight; + private double wavePrd; + private double windDir; + private double windSpeed; + + public double getAltitude() { + return altitude; + } + + public void setAltitude(double altitude) { + this.altitude = altitude; + } + + public ForecastBean getForecast() { + return forecast; + } + + public void setForecast(ForecastBean forecast) { + this.forecast = forecast; + } + + public double getOceanDir() { + return oceanDir; + } + + public void setOceanDir(double oceanDir) { + this.oceanDir = oceanDir; + } + + public double getPressure() { + return pressure; + } + + public void setPressure(double pressure) { + this.pressure = pressure; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getTemperature() { + return temperature; + } + + public void setTemperature(double temperature) { + this.temperature = temperature; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + + public double getWindDir() { + return windDir; + } + + public void setWindDir(double windDir) { + this.windDir = windDir; + } + + public double getWindSpeed() { + return windSpeed; + } + + public void setWindSpeed(double windSpeed) { + this.windSpeed = windSpeed; + } + + public static class ForecastBean { + /** + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + */ + + private double swellDir; + private double swellHeight; + private double swellPrd; + private double waveDir; + private double waveHeight; + private double wavePrd; + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java deleted file mode 100644 index 5ad3a22..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java +++ /dev/null @@ -1,439 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方洋流数据模型 - * - * @author a203 - */ -public class OceanDetailRemoteData { - - /** - * code : 0 - * data : {"lon":114.338597,"lat":18.273134,"date":"2021-10-21","hour":10,"list":[{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}]} - * message : success - * etime : 1634786517992 - */ - - private int code; - private DataBean data; - private String message; - private long etime; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public DataBean getData() { - return data; - } - - public void setData(DataBean data) { - this.data = data; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public long getEtime() { - return etime; - } - - public void setEtime(long etime) { - this.etime = etime; - } - - public static class DataBean { - /** - * lon : 114.338597 - * lat : 18.273134 - * date : 2021-10-21 - * hour : 10 - * list : [{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}] - */ - - private double lon; - private double lat; - private String date; - private int hour; - private List list; - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public int getHour() { - return hour; - } - - public void setHour(int hour) { - this.hour = hour; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * date : 2021-10-21 - * ytx : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - * meteo : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - */ - - private String date; - private YtxBean ytx; - private MeteoBean meteo; - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public YtxBean getYtx() { - return ytx; - } - - public void setYtx(YtxBean ytx) { - this.ytx = ytx; - } - - public MeteoBean getMeteo() { - return meteo; - } - - public void setMeteo(MeteoBean meteo) { - this.meteo = meteo; - } - - public static class YtxBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - - public static class MeteoBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java new file mode 100644 index 0000000..3a2e068 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java @@ -0,0 +1,374 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风数据模型 + * + * @author a203 + */ +public class TyphoonDetailModel { + + /** + * code : 200 + * data : {"centerLat":20.65,"centerLng":128.1,"endTime":"2021-10-11 8:00:00","engName":"Kompasu","isActive":"1","land":[],"name":"圆规","points":[{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}],"startTime":"2021-10-8 2:00:00","typhoonId":"202118","warnLevel":"white"} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * centerLat : 20.65 + * centerLng : 128.1 + * endTime : 2021-10-11 8:00:00 + * engName : Kompasu + * isActive : 1 + * land : [] + * name : 圆规 + * points : [{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}] + * startTime : 2021-10-8 2:00:00 + * typhoonId : 202118 + * warnLevel : white + */ + + private double centerLat; + private double centerLng; + private String endTime; + private String engName; + private String isActive; + private String name; + private String startTime; + private String typhoonId; + private String warnLevel; + private List land; + private List points; + + public double getCenterLat() { + return centerLat; + } + + public void setCenterLat(double centerLat) { + this.centerLat = centerLat; + } + + public double getCenterLng() { + return centerLng; + } + + public void setCenterLng(double centerLng) { + this.centerLng = centerLng; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public String getIsActive() { + return isActive; + } + + public void setIsActive(String isActive) { + this.isActive = isActive; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getWarnLevel() { + return warnLevel; + } + + public void setWarnLevel(String warnLevel) { + this.warnLevel = warnLevel; + } + + public List getLand() { + return land; + } + + public void setLand(List land) { + this.land = land; + } + + public static class LandBean { + private String landAddress; + private String type; + private Double lng; + private Double lat; + private String info; + private String landTime; + + public String getLandAddress() { + return landAddress; + } + + public void setLandAddress(String landAddress) { + this.landAddress = landAddress; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Double getLng() { + return lng; + } + + public void setLng(Double lng) { + this.lng = lng; + } + + public Double getLat() { + return lat; + } + + public void setLat(Double lat) { + this.lat = lat; + } + + public String getInfo() { + return info; + } + + public void setInfo(String info) { + this.info = info; + } + + public String getLandTime() { + return landTime; + } + + public void setLandTime(String landTime) { + this.landTime = landTime; + } + } + + public List getPoints() { + return points; + } + + public void setPoints(List points) { + this.points = points; + } + + public static class PointsBean { + /** + * centerPosition : 距离菲律宾马尼拉东北方向约600公里 + * centerPressure : 990 + * lat : 18.7 + * lng : 124.7 + * moveDirection : 西北西 + * moveSpeed : 25 + * power : 9 + * radius10 : + * radius12 : + * radius7 : 160|140|200|180 + * routePrediction : “圆规”将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分) + * speed : 23 + * time : 2021-10-11 8:00:00 + * typhoonType : 热带风暴 + */ + + private String centerPosition; + private String centerPressure; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private int power; + private String radius10; + private String radius12; + private String radius7; + private String routePrediction; + private String speed; + private String time; + private String typhoonType; + + public String getCenterPosition() { + return centerPosition; + } + + public void setCenterPosition(String centerPosition) { + this.centerPosition = centerPosition; + } + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius12() { + return radius12; + } + + public void setRadius12(String radius12) { + this.radius12 = radius12; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getRoutePrediction() { + return routePrediction; + } + + public void setRoutePrediction(String routePrediction) { + this.routePrediction = routePrediction; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java deleted file mode 100644 index 5b70924..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java +++ /dev/null @@ -1,419 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonDetailRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 6155596a0de376ce34c7b594 - * showapi_res_body : {"ret_code":0,"obj":{"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"}} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * obj : {"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"} - */ - - private int ret_code; - private ObjBean obj; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public ObjBean getObj() { - return obj; - } - - public void setObj(ObjBean obj) { - this.obj = obj; - } - - public static class ObjBean { - /** - * endtime : 2021-9-30 8:00:00 - * centerlng : 139.300000 - * starttime : 2021-9-23 20:00:00 - * tfid : 202116 - * isactive : 1 - * centerlat : 25.200000 - * name : 蒲公英 - * land : [{"landaddress":"朱家尖镇","strong":"强台风","lng":"122.39","lat":"29.83","info":"\u201c灿鸿\u201d11日16时40分前后登陆浙江舟山市朱家尖镇","landtime":"2015/7/11 16:40:00"}] - * warnlevel : white - * points : [{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}] - * enname : Mindulle - */ - - private String endtime; - private String centerlng; - private String starttime; - private String tfid; - private String isactive; - private String centerlat; - private String name; - private String warnlevel; - private String enname; - private List land; - private List points; - - public String getEndtime() { - return endtime; - } - - public void setEndtime(String endtime) { - this.endtime = endtime; - } - - public String getCenterlng() { - return centerlng; - } - - public void setCenterlng(String centerlng) { - this.centerlng = centerlng; - } - - public String getStarttime() { - return starttime; - } - - public void setStarttime(String starttime) { - this.starttime = starttime; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getIsactive() { - return isactive; - } - - public void setIsactive(String isactive) { - this.isactive = isactive; - } - - public String getCenterlat() { - return centerlat; - } - - public void setCenterlat(String centerlat) { - this.centerlat = centerlat; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getWarnlevel() { - return warnlevel; - } - - public void setWarnlevel(String warnlevel) { - this.warnlevel = warnlevel; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - - public List getLand() { - return land; - } - - public void setLand(List land) { - this.land = land; - } - - public static class LandBan { - /** - * landaddress : 朱家尖镇 - * strong : 强台风 - * lng : 122.39 - * lat : 29.83 - * info : “灿鸿”11日16时40分前后登陆浙江舟山市朱家尖镇 - * landtime : 2015/7/11 16:40:00 - */ - - private String landaddress; - private String strong; - private Double lng; - private Double lat; - private String info; - private String landtime; - - public String getLandaddress() { - return landaddress; - } - - public void setLandaddress(String landaddress) { - this.landaddress = landaddress; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getInfo() { - return info; - } - - public void setInfo(String info) { - this.info = info; - } - - public String getLandtime() { - return landtime; - } - - public void setLandtime(String landtime) { - this.landtime = landtime; - } - } - - public List getPoints() { - return points; - } - - public void setPoints(List points) { - this.points = points; - } - - public static class PointsBean { - /** - * time : 2021-9-23 20:00:00 - * pressure : 998 - * radius10 : - * speed : 18 - * strong : 热带风暴 - * movespeed : 20 - * radius12 : - * power : 8 - * lng : 143.30 - * movedirection : 西北西 - * lat : 13.80 - * radius7 : 250|220|200|180 - * jl : “蒲公英”将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分) - * ckposition : 距离日本东京南偏西方向约1060公里 - */ - - private String time; - private String pressure; - private String radius10; - private String speed; - private String strong; - private String movespeed; - private String radius12; - private String power; - private Double lng; - private String movedirection; - private Double lat; - private String radius7; - private String jl; - private String ckposition; - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getRadius12() { - return radius12; - } - - public void setRadius12(String radius12) { - this.radius12 = radius12; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getJl() { - return jl; - } - - public void setJl(String jl) { - this.jl = jl; - } - - public String getCkposition() { - return ckposition; - } - - public void setCkposition(String ckposition) { - this.ckposition = ckposition; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java new file mode 100644 index 0000000..91bad37 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java @@ -0,0 +1,201 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风列表数据模型 + * + * @author a203 + */ +public class TyphoonListModel { + + /** + * code : 200 + * data : [{"centerPressure":"990","engName":"Kompasu","lat":18.7,"lng":125,"moveDirection":"西北西","moveSpeed":"23","name":"圆规","power":9,"radius10":"","radius7":"200","speed":"23","time":"2021-10-11 05:00:00","typhoonId":"202118","typhoonType":"热带风暴"}] + * message : 请求成功 + * success : true + */ + + private int code; + private String message; + private boolean success; + private List data; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public static class DataBean { + /** + * centerPressure : 990 + * engName : Kompasu + * lat : 18.7 + * lng : 125 + * moveDirection : 西北西 + * moveSpeed : 23 + * name : 圆规 + * power : 9 + * radius10 : + * radius7 : 200 + * speed : 23 + * time : 2021-10-11 05:00:00 + * typhoonId : 202118 + * typhoonType : 热带风暴 + */ + + private String centerPressure; + private String engName; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private String name; + private int power; + private String radius10; + private String radius7; + private String speed; + private String time; + private String typhoonId; + private String typhoonType; + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java deleted file mode 100644 index 38a9257..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java +++ /dev/null @@ -1,237 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 61554fbe0de376d03494057c - * showapi_res_body : {"ret_code":0,"list":[{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}]} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * list : [{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}] - */ - - private int ret_code; - private List list; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * pressure : 945 - * tfid : 202116 - * radius10 : 150 - * speed : 48 - * lng : 136.40 - * radius7 : 350 - * time : 2021-09-30 08:00:00 - * movespeed : 23 - * strong : 强台风 - * name : 蒲公英 - * power : 15 - * movedirection : 北北东 - * lat : 26.60 - * enname : Mindulle - */ - - private String pressure; - private String tfid; - private String radius10; - private String speed; - private String lng; - private String radius7; - private String time; - private String movespeed; - private String strong; - private String name; - private String power; - private String movedirection; - private String lat; - private String enname; - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getLng() { - return lng; - } - - public void setLng(String lng) { - this.lng = lng; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public String getLat() { - return lat; - } - - public void setLat(String lat) { - this.lat = lat; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java new file mode 100644 index 0000000..c488237 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风移动点数据信息 服务类 + * + * @author a203 + */ +public interface ILandPointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java new file mode 100644 index 0000000..ab05570 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风登陆点数据信息 服务类 + * + * @author a203 + */ +public interface IRoutePointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java deleted file mode 100644 index d16a48b..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonLandService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java deleted file mode 100644 index 80e2765..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonPointService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java index c47a0f3..53bb971 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java @@ -19,13 +19,6 @@ void saveTyphoonList(); /** - * 更新台风详情 - */ - void updateTyphoonDetail(); - - /***上面接口从第三方存库,下面接口查库**********************/ - - /** * 查询台风列表 * * @return {@link List} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java new file mode 100644 index 0000000..fed33c1 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.LandPointMapper; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.service.ILandPointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class LandPointServiceImpl extends ServiceImpl implements ILandPointService { + + public LandPointServiceImpl() { + + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java index f8cb771..58fce60 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java @@ -2,9 +2,12 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; +import com.casic.missiles.modular.system.dto.AddressConfigDTO; import com.casic.missiles.modular.system.dto.OceanDetailDTO; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; +import com.casic.missiles.modular.system.service.IAddressConfigService; import com.casic.missiles.modular.system.service.IOceanService; +import com.casic.missiles.modular.system.utils.Constant; import com.casic.missiles.modular.system.utils.HttpRequestHelper; import org.springframework.stereotype.Service; @@ -17,23 +20,32 @@ @Service public class OceanServiceImpl implements IOceanService { - private static final String SUCCESS_CODE = "0"; + private final IAddressConfigService configService; - public OceanServiceImpl() { - + public OceanServiceImpl(IAddressConfigService configService) { + this.configService = configService; } @Override public OceanDetailDTO oceanDetail(double lng, double lat, String date, String days, String hour) { - String oceanData = HttpRequestHelper.obtainOceanData(lng, lat, date, days, hour); + AddressConfigDTO addressConfig = configService.selectLastConfig(); + String envIp = addressConfig.getEnvIp(); + if (envIp.contains(Constant.HTTP_HEADER)) { + envIp = envIp.replace(Constant.HTTP_HEADER, ""); + } + String url = Constant.HTTP_HEADER + envIp + "/environment/ocean?" + + "lng=" + lng + "&lat=" + lat + + "&date=" + date + "&days=" + days + "&hour=" + hour; + + String oceanData = HttpRequestHelper.doGet(url); /** * 解析洋流数据返回给前端 * */ OceanDetailDTO oceanDetailDTO = null; - if (SUCCESS_CODE.equals(HttpRequestHelper.getOceanCode(oceanData))) { - OceanDetailRemoteData remoteData = JSON.parseObject(oceanData, new TypeReference() { + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(oceanData)) { + OceanDetailModel remoteData = JSON.parseObject(oceanData, new TypeReference() { }); - oceanDetailDTO = new OceanDetailDTO(remoteData); + oceanDetailDTO = new OceanDetailDTO(remoteData.getData()); } return oceanDetailDTO; } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java new file mode 100644 index 0000000..24b06cd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.RoutePointMapper; +import com.casic.missiles.modular.system.model.RoutePoint; +import com.casic.missiles.modular.system.service.IRoutePointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class RoutePointServiceImpl extends ServiceImpl implements IRoutePointService { + + public RoutePointServiceImpl() { + + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java deleted file mode 100644 index d1bf2c7..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.casic.missiles.modular.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.casic.missiles.modular.system.dao.TyphoonLandMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.service.ITyphoonLandService; -import org.springframework.stereotype.Service; - -/** - * 台风数据信息 服务实现类 - * - * @author a203 - */ - -@Service -public class TyphoonLandServiceImpl extends ServiceImpl implements ITyphoonLandService { - - public TyphoonLandServiceImpl() { - - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java deleted file mode 100644 index 36815fa..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.casic.missiles.modular.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.casic.missiles.modular.system.dao.TyphoonPointMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; -import com.casic.missiles.modular.system.service.ITyphoonPointService; -import org.springframework.stereotype.Service; - -/** - * 台风数据信息 服务实现类 - * - * @author a203 - */ - -@Service -public class TyphoonPointServiceImpl extends ServiceImpl implements ITyphoonPointService { - - public TyphoonPointServiceImpl() { - - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java index 861e2c1..1cbfb01 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java @@ -5,18 +5,16 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.casic.missiles.modular.system.dao.TyphoonMapper; +import com.casic.missiles.modular.system.dto.AddressConfigDTO; import com.casic.missiles.modular.system.dto.TyphoonDTO; import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; -import com.casic.missiles.modular.system.dto.remote.TyphoonDetailRemoteData; -import com.casic.missiles.modular.system.dto.remote.TyphoonRemoteData; +import com.casic.missiles.modular.system.dto.remote.TyphoonDetailModel; +import com.casic.missiles.modular.system.dto.remote.TyphoonListModel; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.Typhoon; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; -import com.casic.missiles.modular.system.service.ITyphoonDetailService; -import com.casic.missiles.modular.system.service.ITyphoonLandService; -import com.casic.missiles.modular.system.service.ITyphoonPointService; -import com.casic.missiles.modular.system.service.ITyphoonService; +import com.casic.missiles.modular.system.service.*; import com.casic.missiles.modular.system.utils.Constant; import com.casic.missiles.modular.system.utils.HttpRequestHelper; import org.springframework.stereotype.Service; @@ -33,17 +31,29 @@ @Service public class TyphoonServiceImpl extends ServiceImpl implements ITyphoonService { - private static final String SUCCESS_CODE = "0"; + private final IAddressConfigService configService; + private final ITyphoonDetailService detailService; + private final ILandPointService landPointService; + private final IRoutePointService routePointService; - private final ITyphoonDetailService typhoonDetailService; - private final ITyphoonLandService typhoonLandService; - private final ITyphoonPointService typhoonPointService; + public TyphoonServiceImpl(IAddressConfigService configService, + ITyphoonDetailService detailService, + ILandPointService landPointService, + IRoutePointService routePointService) { + this.configService = configService; + this.detailService = detailService; + this.landPointService = landPointService; + this.routePointService = routePointService; + } - public TyphoonServiceImpl(ITyphoonDetailService typhoonDetailService, - ITyphoonLandService typhoonLandService, ITyphoonPointService typhoonPointService) { - this.typhoonDetailService = typhoonDetailService; - this.typhoonLandService = typhoonLandService; - this.typhoonPointService = typhoonPointService; + private String obtainEnvAddress() { + //获取服务器配置的IP信息 + AddressConfigDTO addressConfig = configService.selectLastConfig(); + String envIp = addressConfig.getEnvIp(); + if (envIp.contains(Constant.HTTP_HEADER)) { + envIp = envIp.replace(Constant.HTTP_HEADER, ""); + } + return envIp; } /** @@ -51,107 +61,117 @@ */ @Override public void saveTyphoonList() { + String url = Constant.HTTP_HEADER + obtainEnvAddress() + "/environment/saveTyphoon?"; /** * 获取台风接口数据 * */ - String res = HttpRequestHelper.doGet(Constant.TYPHOON_LIST + System.currentTimeMillis()); - if (SUCCESS_CODE.equals(HttpRequestHelper.getTyphoonCode(res))) { - TyphoonRemoteData remoteData = JSON.parseObject(res, new TypeReference() { + String res = HttpRequestHelper.doGet(url); + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(res)) { + TyphoonListModel listModel = JSON.parseObject(res, new TypeReference() { }); - //先清空之前的台风表,再保存最新的台风 - remove(null); - List beans = remoteData.getShowapi_res_body().getList(); - for (TyphoonRemoteData.ShowapiResBodyBean.ListBean data : beans) { - //将获取到台风数据存到数据库 + for (TyphoonListModel.DataBean data : listModel.getData()) { Typhoon entity = new Typhoon(); - entity.setTyphoonId(data.getTfid()); + entity.setTyphoonId(data.getTyphoonId()); entity.setName(data.getName()); - entity.setEngName(data.getEnname()); - entity.setLng(Double.valueOf(data.getLng())); - entity.setLat(Double.valueOf(data.getLat())); - entity.setTyphoonType(data.getStrong()); - entity.setCenterPressure(data.getPressure()); + entity.setEngName(data.getEngName()); + entity.setLng(data.getLng()); + entity.setLat(data.getLat()); + entity.setTyphoonType(data.getTyphoonType()); + entity.setCenterPressure(data.getCenterPressure()); entity.setSpeed(data.getSpeed()); - entity.setPower(Integer.valueOf(data.getPower())); - entity.setMoveSpeed(data.getMovespeed()); - entity.setMoveDirection(data.getMovedirection()); + entity.setPower(data.getPower()); + entity.setMoveSpeed(data.getMoveSpeed()); + entity.setMoveDirection(data.getMoveDirection()); entity.setRadius7(data.getRadius7()); entity.setRadius10(data.getRadius10()); entity.setTime(data.getTime()); - save(entity); + entity.setIsActive("1"); + this.baseMapper.insert(entity); } } + updateTyphoonDetail(); } /** * 更新台风详情 */ - @Override - public void updateTyphoonDetail() { - for (Typhoon typhoon : list()) { + private void updateTyphoonDetail() { + //筛选出还未消散的台风并更新详情 + List typhoons = this.baseMapper.selectCurrentTyphoon(); + for (Typhoon typhoon : typhoons) { /** * 获取台风接口数据 * */ - String res = HttpRequestHelper.doGet( - Constant.TYPHOON_DETAIL.replace("ID", typhoon.getTyphoonId()) - + System.currentTimeMillis()); - if (SUCCESS_CODE.equals(HttpRequestHelper.getTyphoonCode(res))) { - TyphoonDetailRemoteData remoteData = JSON.parseObject(res, new TypeReference() { + String url = Constant.HTTP_HEADER + obtainEnvAddress() + "/environment/updateTyphoon?typhoonId=" + typhoon.getTyphoonId(); + String res = HttpRequestHelper.doGet(url); + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(res)) { + TyphoonDetailModel detailModel = JSON.parseObject(res, new TypeReference() { }); - TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean objBean = remoteData.getShowapi_res_body().getObj(); - //保存台风基本情况存到数据库 + TyphoonDetailModel.DataBean dataBean = detailModel.getData(); + String typhoonId = dataBean.getTyphoonId(); + /** + * 保存台风基本情况存到数据库 + * */ TyphoonDetail detail = new TyphoonDetail(); - detail.setTyphoonId(objBean.getTfid()); - detail.setName(objBean.getName()); - detail.setEngName(objBean.getEnname()); - detail.setWarnLevel(objBean.getWarnlevel()); - detail.setCenterLng(Double.parseDouble(objBean.getCenterlng())); - detail.setCenterLat(Double.parseDouble(objBean.getCenterlat())); - detail.setStartTime(objBean.getStarttime()); - detail.setEndTime(objBean.getEndtime()); - detail.setIsActive(objBean.getIsactive()); - typhoonDetailService.saveOrUpdate(detail, new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); + detail.setTyphoonId(typhoonId); + detail.setName(dataBean.getName()); + detail.setEngName(dataBean.getEngName()); + detail.setWarnLevel(dataBean.getWarnLevel()); + detail.setCenterLng(dataBean.getCenterLng()); + detail.setCenterLat(dataBean.getCenterLat()); + detail.setStartTime(dataBean.getStartTime()); + detail.setEndTime(dataBean.getEndTime()); + detail.setIsActive(dataBean.getIsActive()); + QueryWrapper queryWrapper = new QueryWrapper().eq("TYPHOON_ID", typhoonId); + detailService.saveOrUpdate(detail, queryWrapper); - //保存台风登陆情况存到数据库 - List land = objBean.getLand(); - typhoonLandService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); - for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.LandBan landBan : land) { - TyphoonLand typhoonLand = new TyphoonLand(); + /** + * 更新台风列表台风状态 + * */ + typhoon.setIsActive(dataBean.getIsActive()); + saveOrUpdate(typhoon, new QueryWrapper().eq("TYPHOON_ID", typhoonId)); - typhoonLand.setTyphoonId(objBean.getTfid()); - typhoonLand.setLandAddress(landBan.getLandaddress()); - typhoonLand.setLandTime(landBan.getLandtime()); - typhoonLand.setType(landBan.getStrong()); - typhoonLand.setLng(landBan.getLng()); - typhoonLand.setLat(landBan.getLat()); - typhoonLand.setInfo(landBan.getInfo()); + /** + * 保存台风登陆情况存到数据库 + * */ + List landBans = dataBean.getLand(); + for (TyphoonDetailModel.DataBean.LandBean bean : landBans) { + LandPoint landPoint = new LandPoint(); - typhoonLandService.save(typhoonLand); + landPoint.setTyphoonId(typhoonId); + landPoint.setLandAddress(bean.getLandAddress()); + landPoint.setLandTime(bean.getLandTime()); + landPoint.setType(bean.getType()); + landPoint.setLng(bean.getLng()); + landPoint.setLat(bean.getLat()); + landPoint.setInfo(bean.getInfo()); + landPointService.save(landPoint); } - //保存台风移动路径存到数据库 - List points = objBean.getPoints(); - typhoonPointService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); - for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.PointsBean point : points) { - TyphoonPoint typhoonPoint = new TyphoonPoint(); + /** + * 保存台风移动路径存到数据库 + * */ + List routePoints = dataBean.getPoints(); + routePointService.remove(new QueryWrapper().eq("TYPHOON_ID", typhoonId)); + for (TyphoonDetailModel.DataBean.PointsBean point : routePoints) { + RoutePoint routePoint = new RoutePoint(); - typhoonPoint.setTyphoonId(objBean.getTfid()); - typhoonPoint.setTime(point.getTime()); - typhoonPoint.setCenterPressure(point.getPressure()); - typhoonPoint.setSpeed(point.getSpeed()); - typhoonPoint.setTyphoonType(point.getStrong()); - typhoonPoint.setMoveSpeed(point.getMovespeed()); - typhoonPoint.setPower(Integer.parseInt(point.getPower())); - typhoonPoint.setMoveDirection(point.getMovedirection()); - typhoonPoint.setLng(point.getLng()); - typhoonPoint.setLat(point.getLat()); - typhoonPoint.setRadius12(point.getRadius12()); - typhoonPoint.setRadius10(point.getRadius10()); - typhoonPoint.setRadius7(point.getRadius7()); - typhoonPoint.setRoutePrediction(point.getJl()); - typhoonPoint.setCenterPosition(point.getCkposition()); - - typhoonPointService.save(typhoonPoint); + routePoint.setTyphoonId(typhoonId); + routePoint.setTime(point.getTime()); + routePoint.setCenterPressure(point.getCenterPressure()); + routePoint.setSpeed(point.getSpeed()); + routePoint.setTyphoonType(point.getTyphoonType()); + routePoint.setMoveSpeed(point.getMoveSpeed()); + routePoint.setPower(point.getPower()); + routePoint.setMoveDirection(point.getMoveDirection()); + routePoint.setLng(point.getLng()); + routePoint.setLat(point.getLat()); + routePoint.setRadius12(point.getRadius12()); + routePoint.setRadius10(point.getRadius10()); + routePoint.setRadius7(point.getRadius7()); + routePoint.setRoutePrediction(point.getRoutePrediction()); + routePoint.setCenterPosition(point.getCenterPosition()); + routePointService.save(routePoint); } } } @@ -160,7 +180,9 @@ @Override public List currentTyphoonList() { List typhoonList = new ArrayList<>(); - for (Typhoon typhoon : list()) { + //筛选出还未消散的台风并更新详情 + List typhoons = this.baseMapper.selectCurrentTyphoon(); + for (Typhoon typhoon : typhoons) { typhoonList.add(new TyphoonDTO(typhoon)); } return typhoonList; @@ -168,15 +190,18 @@ @Override public TyphoonDetailDTO typhoonDetail(String typhoonId) { - TyphoonDetail detail = typhoonDetailService.getOne( + TyphoonDetail typhoonDetail = detailService.getOne( new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - List landList = typhoonLandService.list( - new QueryWrapper().eq("TYPHOON_ID", typhoonId) + if (typhoonDetail == null) { + return null; + } + List landPoints = landPointService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - List pointList = typhoonPointService.list( - new QueryWrapper().eq("TYPHOON_ID", typhoonId) + List routePoints = routePointService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - return new TyphoonDetailDTO(detail, landList, pointList); + return new TyphoonDetailDTO(typhoonDetail, landPoints, routePoints); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java deleted file mode 100644 index 552a6e9..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.casic.missiles.modular.system.utils; - -/** - * @author a203 - */ -public class Constant { - /** - * 热带气旋/台风相关常量 - */ - private static final String BASE_URL = "https://route.showapi.com"; - private static final String API_APPID = "780330"; - private static final String API_SIGN_KEY = "f30ac28b65cc447da936448c57bc5d99"; - - public static final String TYPHOON_LIST = BASE_URL - + "/342-1?" - + "showapi_appid=" + API_APPID + "&" - + "showapi_sign=" + API_SIGN_KEY + "&" - + "showapi_timestamp="; - - public static final String TYPHOON_DETAIL = BASE_URL - + "/342-2?" - + "showapi_appid=" + API_APPID + "&" - + "showapi_sign=" + API_SIGN_KEY + "&" - + "tfid=ID" + "&" - + "showapi_timestamp="; - - /** - * 洋流相关常量 - */ - private static final String OCEAN_BASE_URL = "http://api.meteo.open.ninecosmos.cn"; - public static final String OCEAN_HEADER_NAME = "Authorization"; - public static final String OCEAN_APPID = "WXZH888888"; - public static final String OCEAN_APP_KEY = "xb#bD&xtho@b80scbDb"; - - public static final String OCEAN_TOKEN = OCEAN_BASE_URL + "/us/users/open/token"; - public static final String OCEAN_DETAIL = OCEAN_BASE_URL + "/mr/netcdf/meteo/ytx"; -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java deleted file mode 100644 index 1e0cd94..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java +++ /dev/null @@ -1,115 +0,0 @@ -package com.casic.missiles.modular.system.utils; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONException; -import com.alibaba.fastjson.JSONObject; -import lombok.NonNull; -import okhttp3.*; - -import java.io.IOException; -import java.util.Objects; -import java.util.concurrent.TimeUnit; - -/** - * 网络请求工具 - * - * @author a203 - */ -public class HttpRequestHelper { - - public static RequestBody createRequestBody(String value) { - return RequestBody.create(MediaType.parse("application/json; charset=utf-8"), value); - } - - public static String doPost(Request request) { - return streamResponse(request); - } - - public static String doGet(String url) { - return streamResponse(new Request.Builder() - .url(url) - .build()); - } - - private static String streamResponse(@NonNull Request request) { - OkHttpClient httpClient = new OkHttpClient.Builder() - .connectTimeout(10, TimeUnit.SECONDS) - .writeTimeout(10, TimeUnit.SECONDS) - .readTimeout(20, TimeUnit.SECONDS) - .build(); - Call call = httpClient.newCall(request); - try { - Response response = call.execute(); - return response.body() != null ? Objects.requireNonNull(response.body()).string() : ""; - } catch (IOException e) { - e.printStackTrace(); - } - return ""; - } - - public static String obtainOceanData(double lng, double lat, String date, String days, String hour) { - /** - * 获取洋流数据Token - * */ - JSONObject object = new JSONObject(); - try { - object.put("appId", Constant.OCEAN_APPID); - object.put("appKey", Constant.OCEAN_APP_KEY); - } catch (JSONException e) { - e.printStackTrace(); - } - Request tokenRequest = new Request.Builder() - .url(Constant.OCEAN_TOKEN) - .post(HttpRequestHelper.createRequestBody(object.toJSONString())) - .build(); - String tokenJson = HttpRequestHelper.doPost(tokenRequest); - if ("".equals(tokenJson)) { - return null; - } - /** - * 解析token - * */ - JSONObject tokenObject = JSON.parseObject(tokenJson); - JSONObject dataObject = tokenObject.getJSONObject("data"); - String token = dataObject.getString("token"); - /** - * 封装请求参数 - * */ - JSONObject jsonObject = new JSONObject(); - try { - jsonObject.put("lon", lng); - jsonObject.put("lat", lat); - jsonObject.put("date", date); - jsonObject.put("hour", days); - jsonObject.put("days", hour); - } catch (JSONException e) { - e.printStackTrace(); - } - /** - * 获取洋流数据 - * */ - Request request = new Request.Builder() - .addHeader(Constant.OCEAN_HEADER_NAME, token) - .url(Constant.OCEAN_DETAIL) - .post(HttpRequestHelper.createRequestBody(jsonObject.toJSONString())) - .build(); - return HttpRequestHelper.doPost(request); - } - - public static String getTyphoonCode(String value) { - if ("".equals(value)) { - return value; - } - JSONObject jsonObject = JSON.parseObject(value); - return jsonObject.getString("showapi_res_code"); - } - - public static String getOceanCode(String value) { - if ("".equals(value)) { - return value; - } - JSONObject jsonObject = JSON.parseObject(value); - Integer code = jsonObject.getInteger("code"); - return String.valueOf(code); - } -} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/LandPoint.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/LandPoint.java new file mode 100644 index 0000000..f6d61ba --- /dev/null +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/LandPoint.java @@ -0,0 +1,67 @@ +package com.casic.missiles.modular.system.model; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import lombok.Data; + +/** + * 台风登陆点数据库模型 + * + * @author a203 + */ +@Data +@TableName("tf_land_point") +public class LandPoint extends Model { + private static final long serialVersionUID = 1L; + + /** + * 台风数据库主键 + */ + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private Long id; + + /** + * 台风ID + */ + @TableField("TYPHOON_ID") + private String typhoonId; + + /** + * 台风登陆点 + */ + @TableField("LAND_ADDRESS") + private String landAddress; + + /** + * 台风登陆时间 + */ + @TableField("LAND_TIME") + private String landTime; + + /** + * 台风类型-热带风暴/强台风... + */ + @TableField("TYPE") + private String type; + + /** + * 经度 + */ + @TableField("LNG") + private Double lng; + + /** + * 纬度 + */ + @TableField("LAT") + private Double lat; + + /** + * 台风登陆细节 + */ + @TableField("INFO") + private String info; +} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/RoutePoint.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/RoutePoint.java new file mode 100644 index 0000000..81981db --- /dev/null +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/RoutePoint.java @@ -0,0 +1,115 @@ +package com.casic.missiles.modular.system.model; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import lombok.Data; + +/** + * 台风移动点数据库模型 + * + * @author a203 + */ +@Data +@TableName("tf_route_point") +public class RoutePoint extends Model { + private static final long serialVersionUID = 1L; + + /** + * 台风数据库主键 + */ + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private Long id; + + /** + * 台风ID + */ + @TableField("TYPHOON_ID") + private String typhoonId; + + /** + * 数据更新时间 + */ + @TableField("TIME") + private String time; + + /** + * 台风中心气压,单位【百帕】 + */ + @TableField("CENTER_PRESSURE") + private String centerPressure; + + /** + * 风速,单位【米/每秒】 + */ + @TableField("SPEED") + private String speed; + + /** + * 台风风力等级描述 + */ + @TableField("TYPHOON_TYPE") + private String typhoonType; + + /** + * 台风整体移动速度,单位【公里/小时】 + */ + @TableField("MOVE_SPEED") + private String moveSpeed; + + /** + * 风力,单位【级】 + */ + @TableField("POWER") + private Integer power; + + /** + * 台风未来移动方向 + */ + @TableField("MOVE_DIRECTION") + private String moveDirection; + + /** + * 经度 + */ + @TableField("LNG") + private Double lng; + + /** + * 纬度 + */ + @TableField("LAT") + private Double lat; + + /** + * 12级风力影响半径 + */ + @TableField("RADIUS_12") + private String radius12; + + /** + * 10级风力影响半径 + */ + @TableField("RADIUS_10") + private String radius10; + + /** + * 7级风力影响半径 + */ + @TableField("RADIUS_7") + private String radius7; + + /** + * 台风路线预测 + */ + @TableField("ROUTE_PREDICTION") + private String routePrediction; + + /** + * 中心位置 + */ + @TableField("CENTER_POSITION") + private String centerPosition; +} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/Typhoon.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/Typhoon.java index 658cb40..7146637 100644 --- a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/Typhoon.java +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/Typhoon.java @@ -13,17 +13,15 @@ * @author a203 */ @Data -@TableName("typhoon_list") +@TableName("tf_list") public class Typhoon extends Model { private static final long serialVersionUID = 1L; /** * 台风数据库主键 - *

- * type = IdType.AUTO 是数据库自增 */ - @TableId(value = "ID", type = IdType.AUTO) - private Integer id; + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private Long id; /** * 台风ID @@ -95,4 +93,9 @@ */ @TableField("TIME") private String time; -} + /** + * 台风是否已消散,1-未消散,0-已消散 + */ + @TableField("IS_ACTIVE") + private String isActive; +} \ No newline at end of file diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonDetail.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonDetail.java index ea3c29d..8b93cd0 100644 --- a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonDetail.java +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonDetail.java @@ -13,17 +13,15 @@ * @author a203 */ @Data -@TableName("typhoon_detail") +@TableName("tf_detail") public class TyphoonDetail extends Model { private static final long serialVersionUID = 1L; /** * 台风数据库主键 - *

- * type = IdType.AUTO 是数据库自增 */ - @TableId(value = "ID", type = IdType.AUTO) - private Integer id; + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private Long id; /** * 台风ID diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonLand.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonLand.java deleted file mode 100644 index ddc3d02..0000000 --- a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonLand.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.casic.missiles.modular.system.model; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.extension.activerecord.Model; -import lombok.Data; - -/** - * 台风登陆点数据库模型 - * - * @author a203 - */ -@Data -@TableName("typhoon_land") -public class TyphoonLand extends Model { - private static final long serialVersionUID = 1L; - - /** - * 台风数据库主键 - *

- * type = IdType.AUTO 是数据库自增 - */ - @TableId(value = "ID", type = IdType.AUTO) - private Integer id; - - /** - * 台风ID - */ - @TableField("TYPHOON_ID") - private String typhoonId; - - /** - * 台风登陆点 - */ - @TableField("LAND_ADDRESS") - private String landAddress; - - /** - * 台风登陆时间 - */ - @TableField("LAND_TIME") - private String landTime; - - /** - * 台风类型-热带风暴/强台风... - */ - @TableField("TYPE") - private String type; - - /** - * 经度 - */ - @TableField("LNG") - private Double lng; - - /** - * 纬度 - */ - @TableField("LAT") - private Double lat; - - /** - * 台风登陆细节 - */ - @TableField("INFO") - private String info; -} diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..8396364 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,31 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel.DataBean data) { + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java index a34da1b..0c5225d 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -1,8 +1,8 @@ package com.casic.missiles.modular.system.dto; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; import lombok.Data; import java.util.ArrayList; @@ -142,7 +142,7 @@ private String centerPosition; } - public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + public TyphoonDetailDTO(TyphoonDetail detail, List landPoints, List routePoints) { this.typhoonId = detail.getTyphoonId(); this.name = detail.getName(); this.engName = detail.getEngName(); @@ -152,8 +152,9 @@ this.startTime = detail.getStartTime(); this.endTime = detail.getEndTime(); this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); - for (TyphoonLand landBean : landBeans) { + for (LandPoint landBean : landPoints) { LandBan bean = new LandBan(); bean.landAddress = landBean.getLandAddress(); bean.landTime = landBean.getLandTime(); @@ -164,8 +165,9 @@ lands.add(bean); } this.land = lands; + List points = new ArrayList<>(); - for (TyphoonPoint point : pointBeans) { + for (RoutePoint point : routePoints) { PointBean pointBean = new PointBean(); pointBean.time = point.getTime(); pointBean.centerPressure = point.getCenterPressure(); diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java new file mode 100644 index 0000000..b0b2e7a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java @@ -0,0 +1,265 @@ +package com.casic.missiles.modular.system.dto.remote; + +/** + * 洋流数据模型 + * + * @author a203 + */ +public class OceanDetailModel { + + /** + * code : 200 + * data : {"altitude":0,"forecast":{"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34},"oceanDir":135.22,"pressure":100925.19,"speed":7.97,"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"temperature":28.6,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34,"windDir":71.84,"windSpeed":7.97} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * altitude : 0 + * forecast : {"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34} + * oceanDir : 135.22 + * pressure : 100925.19 + * speed : 7.97 + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * temperature : 28.6 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + * windDir : 71.84 + * windSpeed : 7.97 + */ + + private double altitude; + private ForecastBean forecast; + private double oceanDir; + private double pressure; + private double speed; + private double swellDir; + private double swellHeight; + private double swellPrd; + private double temperature; + private double waveDir; + private double waveHeight; + private double wavePrd; + private double windDir; + private double windSpeed; + + public double getAltitude() { + return altitude; + } + + public void setAltitude(double altitude) { + this.altitude = altitude; + } + + public ForecastBean getForecast() { + return forecast; + } + + public void setForecast(ForecastBean forecast) { + this.forecast = forecast; + } + + public double getOceanDir() { + return oceanDir; + } + + public void setOceanDir(double oceanDir) { + this.oceanDir = oceanDir; + } + + public double getPressure() { + return pressure; + } + + public void setPressure(double pressure) { + this.pressure = pressure; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getTemperature() { + return temperature; + } + + public void setTemperature(double temperature) { + this.temperature = temperature; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + + public double getWindDir() { + return windDir; + } + + public void setWindDir(double windDir) { + this.windDir = windDir; + } + + public double getWindSpeed() { + return windSpeed; + } + + public void setWindSpeed(double windSpeed) { + this.windSpeed = windSpeed; + } + + public static class ForecastBean { + /** + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + */ + + private double swellDir; + private double swellHeight; + private double swellPrd; + private double waveDir; + private double waveHeight; + private double wavePrd; + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java deleted file mode 100644 index 5ad3a22..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java +++ /dev/null @@ -1,439 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方洋流数据模型 - * - * @author a203 - */ -public class OceanDetailRemoteData { - - /** - * code : 0 - * data : {"lon":114.338597,"lat":18.273134,"date":"2021-10-21","hour":10,"list":[{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}]} - * message : success - * etime : 1634786517992 - */ - - private int code; - private DataBean data; - private String message; - private long etime; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public DataBean getData() { - return data; - } - - public void setData(DataBean data) { - this.data = data; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public long getEtime() { - return etime; - } - - public void setEtime(long etime) { - this.etime = etime; - } - - public static class DataBean { - /** - * lon : 114.338597 - * lat : 18.273134 - * date : 2021-10-21 - * hour : 10 - * list : [{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}] - */ - - private double lon; - private double lat; - private String date; - private int hour; - private List list; - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public int getHour() { - return hour; - } - - public void setHour(int hour) { - this.hour = hour; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * date : 2021-10-21 - * ytx : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - * meteo : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - */ - - private String date; - private YtxBean ytx; - private MeteoBean meteo; - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public YtxBean getYtx() { - return ytx; - } - - public void setYtx(YtxBean ytx) { - this.ytx = ytx; - } - - public MeteoBean getMeteo() { - return meteo; - } - - public void setMeteo(MeteoBean meteo) { - this.meteo = meteo; - } - - public static class YtxBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - - public static class MeteoBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java new file mode 100644 index 0000000..3a2e068 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java @@ -0,0 +1,374 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风数据模型 + * + * @author a203 + */ +public class TyphoonDetailModel { + + /** + * code : 200 + * data : {"centerLat":20.65,"centerLng":128.1,"endTime":"2021-10-11 8:00:00","engName":"Kompasu","isActive":"1","land":[],"name":"圆规","points":[{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}],"startTime":"2021-10-8 2:00:00","typhoonId":"202118","warnLevel":"white"} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * centerLat : 20.65 + * centerLng : 128.1 + * endTime : 2021-10-11 8:00:00 + * engName : Kompasu + * isActive : 1 + * land : [] + * name : 圆规 + * points : [{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}] + * startTime : 2021-10-8 2:00:00 + * typhoonId : 202118 + * warnLevel : white + */ + + private double centerLat; + private double centerLng; + private String endTime; + private String engName; + private String isActive; + private String name; + private String startTime; + private String typhoonId; + private String warnLevel; + private List land; + private List points; + + public double getCenterLat() { + return centerLat; + } + + public void setCenterLat(double centerLat) { + this.centerLat = centerLat; + } + + public double getCenterLng() { + return centerLng; + } + + public void setCenterLng(double centerLng) { + this.centerLng = centerLng; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public String getIsActive() { + return isActive; + } + + public void setIsActive(String isActive) { + this.isActive = isActive; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getWarnLevel() { + return warnLevel; + } + + public void setWarnLevel(String warnLevel) { + this.warnLevel = warnLevel; + } + + public List getLand() { + return land; + } + + public void setLand(List land) { + this.land = land; + } + + public static class LandBean { + private String landAddress; + private String type; + private Double lng; + private Double lat; + private String info; + private String landTime; + + public String getLandAddress() { + return landAddress; + } + + public void setLandAddress(String landAddress) { + this.landAddress = landAddress; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Double getLng() { + return lng; + } + + public void setLng(Double lng) { + this.lng = lng; + } + + public Double getLat() { + return lat; + } + + public void setLat(Double lat) { + this.lat = lat; + } + + public String getInfo() { + return info; + } + + public void setInfo(String info) { + this.info = info; + } + + public String getLandTime() { + return landTime; + } + + public void setLandTime(String landTime) { + this.landTime = landTime; + } + } + + public List getPoints() { + return points; + } + + public void setPoints(List points) { + this.points = points; + } + + public static class PointsBean { + /** + * centerPosition : 距离菲律宾马尼拉东北方向约600公里 + * centerPressure : 990 + * lat : 18.7 + * lng : 124.7 + * moveDirection : 西北西 + * moveSpeed : 25 + * power : 9 + * radius10 : + * radius12 : + * radius7 : 160|140|200|180 + * routePrediction : “圆规”将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分) + * speed : 23 + * time : 2021-10-11 8:00:00 + * typhoonType : 热带风暴 + */ + + private String centerPosition; + private String centerPressure; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private int power; + private String radius10; + private String radius12; + private String radius7; + private String routePrediction; + private String speed; + private String time; + private String typhoonType; + + public String getCenterPosition() { + return centerPosition; + } + + public void setCenterPosition(String centerPosition) { + this.centerPosition = centerPosition; + } + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius12() { + return radius12; + } + + public void setRadius12(String radius12) { + this.radius12 = radius12; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getRoutePrediction() { + return routePrediction; + } + + public void setRoutePrediction(String routePrediction) { + this.routePrediction = routePrediction; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java deleted file mode 100644 index 5b70924..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java +++ /dev/null @@ -1,419 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonDetailRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 6155596a0de376ce34c7b594 - * showapi_res_body : {"ret_code":0,"obj":{"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"}} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * obj : {"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"} - */ - - private int ret_code; - private ObjBean obj; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public ObjBean getObj() { - return obj; - } - - public void setObj(ObjBean obj) { - this.obj = obj; - } - - public static class ObjBean { - /** - * endtime : 2021-9-30 8:00:00 - * centerlng : 139.300000 - * starttime : 2021-9-23 20:00:00 - * tfid : 202116 - * isactive : 1 - * centerlat : 25.200000 - * name : 蒲公英 - * land : [{"landaddress":"朱家尖镇","strong":"强台风","lng":"122.39","lat":"29.83","info":"\u201c灿鸿\u201d11日16时40分前后登陆浙江舟山市朱家尖镇","landtime":"2015/7/11 16:40:00"}] - * warnlevel : white - * points : [{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}] - * enname : Mindulle - */ - - private String endtime; - private String centerlng; - private String starttime; - private String tfid; - private String isactive; - private String centerlat; - private String name; - private String warnlevel; - private String enname; - private List land; - private List points; - - public String getEndtime() { - return endtime; - } - - public void setEndtime(String endtime) { - this.endtime = endtime; - } - - public String getCenterlng() { - return centerlng; - } - - public void setCenterlng(String centerlng) { - this.centerlng = centerlng; - } - - public String getStarttime() { - return starttime; - } - - public void setStarttime(String starttime) { - this.starttime = starttime; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getIsactive() { - return isactive; - } - - public void setIsactive(String isactive) { - this.isactive = isactive; - } - - public String getCenterlat() { - return centerlat; - } - - public void setCenterlat(String centerlat) { - this.centerlat = centerlat; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getWarnlevel() { - return warnlevel; - } - - public void setWarnlevel(String warnlevel) { - this.warnlevel = warnlevel; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - - public List getLand() { - return land; - } - - public void setLand(List land) { - this.land = land; - } - - public static class LandBan { - /** - * landaddress : 朱家尖镇 - * strong : 强台风 - * lng : 122.39 - * lat : 29.83 - * info : “灿鸿”11日16时40分前后登陆浙江舟山市朱家尖镇 - * landtime : 2015/7/11 16:40:00 - */ - - private String landaddress; - private String strong; - private Double lng; - private Double lat; - private String info; - private String landtime; - - public String getLandaddress() { - return landaddress; - } - - public void setLandaddress(String landaddress) { - this.landaddress = landaddress; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getInfo() { - return info; - } - - public void setInfo(String info) { - this.info = info; - } - - public String getLandtime() { - return landtime; - } - - public void setLandtime(String landtime) { - this.landtime = landtime; - } - } - - public List getPoints() { - return points; - } - - public void setPoints(List points) { - this.points = points; - } - - public static class PointsBean { - /** - * time : 2021-9-23 20:00:00 - * pressure : 998 - * radius10 : - * speed : 18 - * strong : 热带风暴 - * movespeed : 20 - * radius12 : - * power : 8 - * lng : 143.30 - * movedirection : 西北西 - * lat : 13.80 - * radius7 : 250|220|200|180 - * jl : “蒲公英”将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分) - * ckposition : 距离日本东京南偏西方向约1060公里 - */ - - private String time; - private String pressure; - private String radius10; - private String speed; - private String strong; - private String movespeed; - private String radius12; - private String power; - private Double lng; - private String movedirection; - private Double lat; - private String radius7; - private String jl; - private String ckposition; - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getRadius12() { - return radius12; - } - - public void setRadius12(String radius12) { - this.radius12 = radius12; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getJl() { - return jl; - } - - public void setJl(String jl) { - this.jl = jl; - } - - public String getCkposition() { - return ckposition; - } - - public void setCkposition(String ckposition) { - this.ckposition = ckposition; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java new file mode 100644 index 0000000..91bad37 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java @@ -0,0 +1,201 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风列表数据模型 + * + * @author a203 + */ +public class TyphoonListModel { + + /** + * code : 200 + * data : [{"centerPressure":"990","engName":"Kompasu","lat":18.7,"lng":125,"moveDirection":"西北西","moveSpeed":"23","name":"圆规","power":9,"radius10":"","radius7":"200","speed":"23","time":"2021-10-11 05:00:00","typhoonId":"202118","typhoonType":"热带风暴"}] + * message : 请求成功 + * success : true + */ + + private int code; + private String message; + private boolean success; + private List data; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public static class DataBean { + /** + * centerPressure : 990 + * engName : Kompasu + * lat : 18.7 + * lng : 125 + * moveDirection : 西北西 + * moveSpeed : 23 + * name : 圆规 + * power : 9 + * radius10 : + * radius7 : 200 + * speed : 23 + * time : 2021-10-11 05:00:00 + * typhoonId : 202118 + * typhoonType : 热带风暴 + */ + + private String centerPressure; + private String engName; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private String name; + private int power; + private String radius10; + private String radius7; + private String speed; + private String time; + private String typhoonId; + private String typhoonType; + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java deleted file mode 100644 index 38a9257..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java +++ /dev/null @@ -1,237 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 61554fbe0de376d03494057c - * showapi_res_body : {"ret_code":0,"list":[{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}]} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * list : [{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}] - */ - - private int ret_code; - private List list; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * pressure : 945 - * tfid : 202116 - * radius10 : 150 - * speed : 48 - * lng : 136.40 - * radius7 : 350 - * time : 2021-09-30 08:00:00 - * movespeed : 23 - * strong : 强台风 - * name : 蒲公英 - * power : 15 - * movedirection : 北北东 - * lat : 26.60 - * enname : Mindulle - */ - - private String pressure; - private String tfid; - private String radius10; - private String speed; - private String lng; - private String radius7; - private String time; - private String movespeed; - private String strong; - private String name; - private String power; - private String movedirection; - private String lat; - private String enname; - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getLng() { - return lng; - } - - public void setLng(String lng) { - this.lng = lng; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public String getLat() { - return lat; - } - - public void setLat(String lat) { - this.lat = lat; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java new file mode 100644 index 0000000..c488237 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风移动点数据信息 服务类 + * + * @author a203 + */ +public interface ILandPointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java new file mode 100644 index 0000000..ab05570 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风登陆点数据信息 服务类 + * + * @author a203 + */ +public interface IRoutePointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java deleted file mode 100644 index d16a48b..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonLandService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java deleted file mode 100644 index 80e2765..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonPointService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java index c47a0f3..53bb971 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java @@ -19,13 +19,6 @@ void saveTyphoonList(); /** - * 更新台风详情 - */ - void updateTyphoonDetail(); - - /***上面接口从第三方存库,下面接口查库**********************/ - - /** * 查询台风列表 * * @return {@link List} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java new file mode 100644 index 0000000..fed33c1 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.LandPointMapper; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.service.ILandPointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class LandPointServiceImpl extends ServiceImpl implements ILandPointService { + + public LandPointServiceImpl() { + + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java index f8cb771..58fce60 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java @@ -2,9 +2,12 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; +import com.casic.missiles.modular.system.dto.AddressConfigDTO; import com.casic.missiles.modular.system.dto.OceanDetailDTO; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; +import com.casic.missiles.modular.system.service.IAddressConfigService; import com.casic.missiles.modular.system.service.IOceanService; +import com.casic.missiles.modular.system.utils.Constant; import com.casic.missiles.modular.system.utils.HttpRequestHelper; import org.springframework.stereotype.Service; @@ -17,23 +20,32 @@ @Service public class OceanServiceImpl implements IOceanService { - private static final String SUCCESS_CODE = "0"; + private final IAddressConfigService configService; - public OceanServiceImpl() { - + public OceanServiceImpl(IAddressConfigService configService) { + this.configService = configService; } @Override public OceanDetailDTO oceanDetail(double lng, double lat, String date, String days, String hour) { - String oceanData = HttpRequestHelper.obtainOceanData(lng, lat, date, days, hour); + AddressConfigDTO addressConfig = configService.selectLastConfig(); + String envIp = addressConfig.getEnvIp(); + if (envIp.contains(Constant.HTTP_HEADER)) { + envIp = envIp.replace(Constant.HTTP_HEADER, ""); + } + String url = Constant.HTTP_HEADER + envIp + "/environment/ocean?" + + "lng=" + lng + "&lat=" + lat + + "&date=" + date + "&days=" + days + "&hour=" + hour; + + String oceanData = HttpRequestHelper.doGet(url); /** * 解析洋流数据返回给前端 * */ OceanDetailDTO oceanDetailDTO = null; - if (SUCCESS_CODE.equals(HttpRequestHelper.getOceanCode(oceanData))) { - OceanDetailRemoteData remoteData = JSON.parseObject(oceanData, new TypeReference() { + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(oceanData)) { + OceanDetailModel remoteData = JSON.parseObject(oceanData, new TypeReference() { }); - oceanDetailDTO = new OceanDetailDTO(remoteData); + oceanDetailDTO = new OceanDetailDTO(remoteData.getData()); } return oceanDetailDTO; } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java new file mode 100644 index 0000000..24b06cd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.RoutePointMapper; +import com.casic.missiles.modular.system.model.RoutePoint; +import com.casic.missiles.modular.system.service.IRoutePointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class RoutePointServiceImpl extends ServiceImpl implements IRoutePointService { + + public RoutePointServiceImpl() { + + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java deleted file mode 100644 index d1bf2c7..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.casic.missiles.modular.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.casic.missiles.modular.system.dao.TyphoonLandMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.service.ITyphoonLandService; -import org.springframework.stereotype.Service; - -/** - * 台风数据信息 服务实现类 - * - * @author a203 - */ - -@Service -public class TyphoonLandServiceImpl extends ServiceImpl implements ITyphoonLandService { - - public TyphoonLandServiceImpl() { - - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java deleted file mode 100644 index 36815fa..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.casic.missiles.modular.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.casic.missiles.modular.system.dao.TyphoonPointMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; -import com.casic.missiles.modular.system.service.ITyphoonPointService; -import org.springframework.stereotype.Service; - -/** - * 台风数据信息 服务实现类 - * - * @author a203 - */ - -@Service -public class TyphoonPointServiceImpl extends ServiceImpl implements ITyphoonPointService { - - public TyphoonPointServiceImpl() { - - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java index 861e2c1..1cbfb01 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java @@ -5,18 +5,16 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.casic.missiles.modular.system.dao.TyphoonMapper; +import com.casic.missiles.modular.system.dto.AddressConfigDTO; import com.casic.missiles.modular.system.dto.TyphoonDTO; import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; -import com.casic.missiles.modular.system.dto.remote.TyphoonDetailRemoteData; -import com.casic.missiles.modular.system.dto.remote.TyphoonRemoteData; +import com.casic.missiles.modular.system.dto.remote.TyphoonDetailModel; +import com.casic.missiles.modular.system.dto.remote.TyphoonListModel; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.Typhoon; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; -import com.casic.missiles.modular.system.service.ITyphoonDetailService; -import com.casic.missiles.modular.system.service.ITyphoonLandService; -import com.casic.missiles.modular.system.service.ITyphoonPointService; -import com.casic.missiles.modular.system.service.ITyphoonService; +import com.casic.missiles.modular.system.service.*; import com.casic.missiles.modular.system.utils.Constant; import com.casic.missiles.modular.system.utils.HttpRequestHelper; import org.springframework.stereotype.Service; @@ -33,17 +31,29 @@ @Service public class TyphoonServiceImpl extends ServiceImpl implements ITyphoonService { - private static final String SUCCESS_CODE = "0"; + private final IAddressConfigService configService; + private final ITyphoonDetailService detailService; + private final ILandPointService landPointService; + private final IRoutePointService routePointService; - private final ITyphoonDetailService typhoonDetailService; - private final ITyphoonLandService typhoonLandService; - private final ITyphoonPointService typhoonPointService; + public TyphoonServiceImpl(IAddressConfigService configService, + ITyphoonDetailService detailService, + ILandPointService landPointService, + IRoutePointService routePointService) { + this.configService = configService; + this.detailService = detailService; + this.landPointService = landPointService; + this.routePointService = routePointService; + } - public TyphoonServiceImpl(ITyphoonDetailService typhoonDetailService, - ITyphoonLandService typhoonLandService, ITyphoonPointService typhoonPointService) { - this.typhoonDetailService = typhoonDetailService; - this.typhoonLandService = typhoonLandService; - this.typhoonPointService = typhoonPointService; + private String obtainEnvAddress() { + //获取服务器配置的IP信息 + AddressConfigDTO addressConfig = configService.selectLastConfig(); + String envIp = addressConfig.getEnvIp(); + if (envIp.contains(Constant.HTTP_HEADER)) { + envIp = envIp.replace(Constant.HTTP_HEADER, ""); + } + return envIp; } /** @@ -51,107 +61,117 @@ */ @Override public void saveTyphoonList() { + String url = Constant.HTTP_HEADER + obtainEnvAddress() + "/environment/saveTyphoon?"; /** * 获取台风接口数据 * */ - String res = HttpRequestHelper.doGet(Constant.TYPHOON_LIST + System.currentTimeMillis()); - if (SUCCESS_CODE.equals(HttpRequestHelper.getTyphoonCode(res))) { - TyphoonRemoteData remoteData = JSON.parseObject(res, new TypeReference() { + String res = HttpRequestHelper.doGet(url); + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(res)) { + TyphoonListModel listModel = JSON.parseObject(res, new TypeReference() { }); - //先清空之前的台风表,再保存最新的台风 - remove(null); - List beans = remoteData.getShowapi_res_body().getList(); - for (TyphoonRemoteData.ShowapiResBodyBean.ListBean data : beans) { - //将获取到台风数据存到数据库 + for (TyphoonListModel.DataBean data : listModel.getData()) { Typhoon entity = new Typhoon(); - entity.setTyphoonId(data.getTfid()); + entity.setTyphoonId(data.getTyphoonId()); entity.setName(data.getName()); - entity.setEngName(data.getEnname()); - entity.setLng(Double.valueOf(data.getLng())); - entity.setLat(Double.valueOf(data.getLat())); - entity.setTyphoonType(data.getStrong()); - entity.setCenterPressure(data.getPressure()); + entity.setEngName(data.getEngName()); + entity.setLng(data.getLng()); + entity.setLat(data.getLat()); + entity.setTyphoonType(data.getTyphoonType()); + entity.setCenterPressure(data.getCenterPressure()); entity.setSpeed(data.getSpeed()); - entity.setPower(Integer.valueOf(data.getPower())); - entity.setMoveSpeed(data.getMovespeed()); - entity.setMoveDirection(data.getMovedirection()); + entity.setPower(data.getPower()); + entity.setMoveSpeed(data.getMoveSpeed()); + entity.setMoveDirection(data.getMoveDirection()); entity.setRadius7(data.getRadius7()); entity.setRadius10(data.getRadius10()); entity.setTime(data.getTime()); - save(entity); + entity.setIsActive("1"); + this.baseMapper.insert(entity); } } + updateTyphoonDetail(); } /** * 更新台风详情 */ - @Override - public void updateTyphoonDetail() { - for (Typhoon typhoon : list()) { + private void updateTyphoonDetail() { + //筛选出还未消散的台风并更新详情 + List typhoons = this.baseMapper.selectCurrentTyphoon(); + for (Typhoon typhoon : typhoons) { /** * 获取台风接口数据 * */ - String res = HttpRequestHelper.doGet( - Constant.TYPHOON_DETAIL.replace("ID", typhoon.getTyphoonId()) - + System.currentTimeMillis()); - if (SUCCESS_CODE.equals(HttpRequestHelper.getTyphoonCode(res))) { - TyphoonDetailRemoteData remoteData = JSON.parseObject(res, new TypeReference() { + String url = Constant.HTTP_HEADER + obtainEnvAddress() + "/environment/updateTyphoon?typhoonId=" + typhoon.getTyphoonId(); + String res = HttpRequestHelper.doGet(url); + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(res)) { + TyphoonDetailModel detailModel = JSON.parseObject(res, new TypeReference() { }); - TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean objBean = remoteData.getShowapi_res_body().getObj(); - //保存台风基本情况存到数据库 + TyphoonDetailModel.DataBean dataBean = detailModel.getData(); + String typhoonId = dataBean.getTyphoonId(); + /** + * 保存台风基本情况存到数据库 + * */ TyphoonDetail detail = new TyphoonDetail(); - detail.setTyphoonId(objBean.getTfid()); - detail.setName(objBean.getName()); - detail.setEngName(objBean.getEnname()); - detail.setWarnLevel(objBean.getWarnlevel()); - detail.setCenterLng(Double.parseDouble(objBean.getCenterlng())); - detail.setCenterLat(Double.parseDouble(objBean.getCenterlat())); - detail.setStartTime(objBean.getStarttime()); - detail.setEndTime(objBean.getEndtime()); - detail.setIsActive(objBean.getIsactive()); - typhoonDetailService.saveOrUpdate(detail, new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); + detail.setTyphoonId(typhoonId); + detail.setName(dataBean.getName()); + detail.setEngName(dataBean.getEngName()); + detail.setWarnLevel(dataBean.getWarnLevel()); + detail.setCenterLng(dataBean.getCenterLng()); + detail.setCenterLat(dataBean.getCenterLat()); + detail.setStartTime(dataBean.getStartTime()); + detail.setEndTime(dataBean.getEndTime()); + detail.setIsActive(dataBean.getIsActive()); + QueryWrapper queryWrapper = new QueryWrapper().eq("TYPHOON_ID", typhoonId); + detailService.saveOrUpdate(detail, queryWrapper); - //保存台风登陆情况存到数据库 - List land = objBean.getLand(); - typhoonLandService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); - for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.LandBan landBan : land) { - TyphoonLand typhoonLand = new TyphoonLand(); + /** + * 更新台风列表台风状态 + * */ + typhoon.setIsActive(dataBean.getIsActive()); + saveOrUpdate(typhoon, new QueryWrapper().eq("TYPHOON_ID", typhoonId)); - typhoonLand.setTyphoonId(objBean.getTfid()); - typhoonLand.setLandAddress(landBan.getLandaddress()); - typhoonLand.setLandTime(landBan.getLandtime()); - typhoonLand.setType(landBan.getStrong()); - typhoonLand.setLng(landBan.getLng()); - typhoonLand.setLat(landBan.getLat()); - typhoonLand.setInfo(landBan.getInfo()); + /** + * 保存台风登陆情况存到数据库 + * */ + List landBans = dataBean.getLand(); + for (TyphoonDetailModel.DataBean.LandBean bean : landBans) { + LandPoint landPoint = new LandPoint(); - typhoonLandService.save(typhoonLand); + landPoint.setTyphoonId(typhoonId); + landPoint.setLandAddress(bean.getLandAddress()); + landPoint.setLandTime(bean.getLandTime()); + landPoint.setType(bean.getType()); + landPoint.setLng(bean.getLng()); + landPoint.setLat(bean.getLat()); + landPoint.setInfo(bean.getInfo()); + landPointService.save(landPoint); } - //保存台风移动路径存到数据库 - List points = objBean.getPoints(); - typhoonPointService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); - for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.PointsBean point : points) { - TyphoonPoint typhoonPoint = new TyphoonPoint(); + /** + * 保存台风移动路径存到数据库 + * */ + List routePoints = dataBean.getPoints(); + routePointService.remove(new QueryWrapper().eq("TYPHOON_ID", typhoonId)); + for (TyphoonDetailModel.DataBean.PointsBean point : routePoints) { + RoutePoint routePoint = new RoutePoint(); - typhoonPoint.setTyphoonId(objBean.getTfid()); - typhoonPoint.setTime(point.getTime()); - typhoonPoint.setCenterPressure(point.getPressure()); - typhoonPoint.setSpeed(point.getSpeed()); - typhoonPoint.setTyphoonType(point.getStrong()); - typhoonPoint.setMoveSpeed(point.getMovespeed()); - typhoonPoint.setPower(Integer.parseInt(point.getPower())); - typhoonPoint.setMoveDirection(point.getMovedirection()); - typhoonPoint.setLng(point.getLng()); - typhoonPoint.setLat(point.getLat()); - typhoonPoint.setRadius12(point.getRadius12()); - typhoonPoint.setRadius10(point.getRadius10()); - typhoonPoint.setRadius7(point.getRadius7()); - typhoonPoint.setRoutePrediction(point.getJl()); - typhoonPoint.setCenterPosition(point.getCkposition()); - - typhoonPointService.save(typhoonPoint); + routePoint.setTyphoonId(typhoonId); + routePoint.setTime(point.getTime()); + routePoint.setCenterPressure(point.getCenterPressure()); + routePoint.setSpeed(point.getSpeed()); + routePoint.setTyphoonType(point.getTyphoonType()); + routePoint.setMoveSpeed(point.getMoveSpeed()); + routePoint.setPower(point.getPower()); + routePoint.setMoveDirection(point.getMoveDirection()); + routePoint.setLng(point.getLng()); + routePoint.setLat(point.getLat()); + routePoint.setRadius12(point.getRadius12()); + routePoint.setRadius10(point.getRadius10()); + routePoint.setRadius7(point.getRadius7()); + routePoint.setRoutePrediction(point.getRoutePrediction()); + routePoint.setCenterPosition(point.getCenterPosition()); + routePointService.save(routePoint); } } } @@ -160,7 +180,9 @@ @Override public List currentTyphoonList() { List typhoonList = new ArrayList<>(); - for (Typhoon typhoon : list()) { + //筛选出还未消散的台风并更新详情 + List typhoons = this.baseMapper.selectCurrentTyphoon(); + for (Typhoon typhoon : typhoons) { typhoonList.add(new TyphoonDTO(typhoon)); } return typhoonList; @@ -168,15 +190,18 @@ @Override public TyphoonDetailDTO typhoonDetail(String typhoonId) { - TyphoonDetail detail = typhoonDetailService.getOne( + TyphoonDetail typhoonDetail = detailService.getOne( new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - List landList = typhoonLandService.list( - new QueryWrapper().eq("TYPHOON_ID", typhoonId) + if (typhoonDetail == null) { + return null; + } + List landPoints = landPointService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - List pointList = typhoonPointService.list( - new QueryWrapper().eq("TYPHOON_ID", typhoonId) + List routePoints = routePointService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - return new TyphoonDetailDTO(detail, landList, pointList); + return new TyphoonDetailDTO(typhoonDetail, landPoints, routePoints); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java deleted file mode 100644 index 552a6e9..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.casic.missiles.modular.system.utils; - -/** - * @author a203 - */ -public class Constant { - /** - * 热带气旋/台风相关常量 - */ - private static final String BASE_URL = "https://route.showapi.com"; - private static final String API_APPID = "780330"; - private static final String API_SIGN_KEY = "f30ac28b65cc447da936448c57bc5d99"; - - public static final String TYPHOON_LIST = BASE_URL - + "/342-1?" - + "showapi_appid=" + API_APPID + "&" - + "showapi_sign=" + API_SIGN_KEY + "&" - + "showapi_timestamp="; - - public static final String TYPHOON_DETAIL = BASE_URL - + "/342-2?" - + "showapi_appid=" + API_APPID + "&" - + "showapi_sign=" + API_SIGN_KEY + "&" - + "tfid=ID" + "&" - + "showapi_timestamp="; - - /** - * 洋流相关常量 - */ - private static final String OCEAN_BASE_URL = "http://api.meteo.open.ninecosmos.cn"; - public static final String OCEAN_HEADER_NAME = "Authorization"; - public static final String OCEAN_APPID = "WXZH888888"; - public static final String OCEAN_APP_KEY = "xb#bD&xtho@b80scbDb"; - - public static final String OCEAN_TOKEN = OCEAN_BASE_URL + "/us/users/open/token"; - public static final String OCEAN_DETAIL = OCEAN_BASE_URL + "/mr/netcdf/meteo/ytx"; -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java deleted file mode 100644 index 1e0cd94..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java +++ /dev/null @@ -1,115 +0,0 @@ -package com.casic.missiles.modular.system.utils; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONException; -import com.alibaba.fastjson.JSONObject; -import lombok.NonNull; -import okhttp3.*; - -import java.io.IOException; -import java.util.Objects; -import java.util.concurrent.TimeUnit; - -/** - * 网络请求工具 - * - * @author a203 - */ -public class HttpRequestHelper { - - public static RequestBody createRequestBody(String value) { - return RequestBody.create(MediaType.parse("application/json; charset=utf-8"), value); - } - - public static String doPost(Request request) { - return streamResponse(request); - } - - public static String doGet(String url) { - return streamResponse(new Request.Builder() - .url(url) - .build()); - } - - private static String streamResponse(@NonNull Request request) { - OkHttpClient httpClient = new OkHttpClient.Builder() - .connectTimeout(10, TimeUnit.SECONDS) - .writeTimeout(10, TimeUnit.SECONDS) - .readTimeout(20, TimeUnit.SECONDS) - .build(); - Call call = httpClient.newCall(request); - try { - Response response = call.execute(); - return response.body() != null ? Objects.requireNonNull(response.body()).string() : ""; - } catch (IOException e) { - e.printStackTrace(); - } - return ""; - } - - public static String obtainOceanData(double lng, double lat, String date, String days, String hour) { - /** - * 获取洋流数据Token - * */ - JSONObject object = new JSONObject(); - try { - object.put("appId", Constant.OCEAN_APPID); - object.put("appKey", Constant.OCEAN_APP_KEY); - } catch (JSONException e) { - e.printStackTrace(); - } - Request tokenRequest = new Request.Builder() - .url(Constant.OCEAN_TOKEN) - .post(HttpRequestHelper.createRequestBody(object.toJSONString())) - .build(); - String tokenJson = HttpRequestHelper.doPost(tokenRequest); - if ("".equals(tokenJson)) { - return null; - } - /** - * 解析token - * */ - JSONObject tokenObject = JSON.parseObject(tokenJson); - JSONObject dataObject = tokenObject.getJSONObject("data"); - String token = dataObject.getString("token"); - /** - * 封装请求参数 - * */ - JSONObject jsonObject = new JSONObject(); - try { - jsonObject.put("lon", lng); - jsonObject.put("lat", lat); - jsonObject.put("date", date); - jsonObject.put("hour", days); - jsonObject.put("days", hour); - } catch (JSONException e) { - e.printStackTrace(); - } - /** - * 获取洋流数据 - * */ - Request request = new Request.Builder() - .addHeader(Constant.OCEAN_HEADER_NAME, token) - .url(Constant.OCEAN_DETAIL) - .post(HttpRequestHelper.createRequestBody(jsonObject.toJSONString())) - .build(); - return HttpRequestHelper.doPost(request); - } - - public static String getTyphoonCode(String value) { - if ("".equals(value)) { - return value; - } - JSONObject jsonObject = JSON.parseObject(value); - return jsonObject.getString("showapi_res_code"); - } - - public static String getOceanCode(String value) { - if ("".equals(value)) { - return value; - } - JSONObject jsonObject = JSON.parseObject(value); - Integer code = jsonObject.getInteger("code"); - return String.valueOf(code); - } -} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/LandPoint.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/LandPoint.java new file mode 100644 index 0000000..f6d61ba --- /dev/null +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/LandPoint.java @@ -0,0 +1,67 @@ +package com.casic.missiles.modular.system.model; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import lombok.Data; + +/** + * 台风登陆点数据库模型 + * + * @author a203 + */ +@Data +@TableName("tf_land_point") +public class LandPoint extends Model { + private static final long serialVersionUID = 1L; + + /** + * 台风数据库主键 + */ + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private Long id; + + /** + * 台风ID + */ + @TableField("TYPHOON_ID") + private String typhoonId; + + /** + * 台风登陆点 + */ + @TableField("LAND_ADDRESS") + private String landAddress; + + /** + * 台风登陆时间 + */ + @TableField("LAND_TIME") + private String landTime; + + /** + * 台风类型-热带风暴/强台风... + */ + @TableField("TYPE") + private String type; + + /** + * 经度 + */ + @TableField("LNG") + private Double lng; + + /** + * 纬度 + */ + @TableField("LAT") + private Double lat; + + /** + * 台风登陆细节 + */ + @TableField("INFO") + private String info; +} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/RoutePoint.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/RoutePoint.java new file mode 100644 index 0000000..81981db --- /dev/null +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/RoutePoint.java @@ -0,0 +1,115 @@ +package com.casic.missiles.modular.system.model; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import lombok.Data; + +/** + * 台风移动点数据库模型 + * + * @author a203 + */ +@Data +@TableName("tf_route_point") +public class RoutePoint extends Model { + private static final long serialVersionUID = 1L; + + /** + * 台风数据库主键 + */ + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private Long id; + + /** + * 台风ID + */ + @TableField("TYPHOON_ID") + private String typhoonId; + + /** + * 数据更新时间 + */ + @TableField("TIME") + private String time; + + /** + * 台风中心气压,单位【百帕】 + */ + @TableField("CENTER_PRESSURE") + private String centerPressure; + + /** + * 风速,单位【米/每秒】 + */ + @TableField("SPEED") + private String speed; + + /** + * 台风风力等级描述 + */ + @TableField("TYPHOON_TYPE") + private String typhoonType; + + /** + * 台风整体移动速度,单位【公里/小时】 + */ + @TableField("MOVE_SPEED") + private String moveSpeed; + + /** + * 风力,单位【级】 + */ + @TableField("POWER") + private Integer power; + + /** + * 台风未来移动方向 + */ + @TableField("MOVE_DIRECTION") + private String moveDirection; + + /** + * 经度 + */ + @TableField("LNG") + private Double lng; + + /** + * 纬度 + */ + @TableField("LAT") + private Double lat; + + /** + * 12级风力影响半径 + */ + @TableField("RADIUS_12") + private String radius12; + + /** + * 10级风力影响半径 + */ + @TableField("RADIUS_10") + private String radius10; + + /** + * 7级风力影响半径 + */ + @TableField("RADIUS_7") + private String radius7; + + /** + * 台风路线预测 + */ + @TableField("ROUTE_PREDICTION") + private String routePrediction; + + /** + * 中心位置 + */ + @TableField("CENTER_POSITION") + private String centerPosition; +} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/Typhoon.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/Typhoon.java index 658cb40..7146637 100644 --- a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/Typhoon.java +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/Typhoon.java @@ -13,17 +13,15 @@ * @author a203 */ @Data -@TableName("typhoon_list") +@TableName("tf_list") public class Typhoon extends Model { private static final long serialVersionUID = 1L; /** * 台风数据库主键 - *

- * type = IdType.AUTO 是数据库自增 */ - @TableId(value = "ID", type = IdType.AUTO) - private Integer id; + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private Long id; /** * 台风ID @@ -95,4 +93,9 @@ */ @TableField("TIME") private String time; -} + /** + * 台风是否已消散,1-未消散,0-已消散 + */ + @TableField("IS_ACTIVE") + private String isActive; +} \ No newline at end of file diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonDetail.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonDetail.java index ea3c29d..8b93cd0 100644 --- a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonDetail.java +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonDetail.java @@ -13,17 +13,15 @@ * @author a203 */ @Data -@TableName("typhoon_detail") +@TableName("tf_detail") public class TyphoonDetail extends Model { private static final long serialVersionUID = 1L; /** * 台风数据库主键 - *

- * type = IdType.AUTO 是数据库自增 */ - @TableId(value = "ID", type = IdType.AUTO) - private Integer id; + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private Long id; /** * 台风ID diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonLand.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonLand.java deleted file mode 100644 index ddc3d02..0000000 --- a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonLand.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.casic.missiles.modular.system.model; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.extension.activerecord.Model; -import lombok.Data; - -/** - * 台风登陆点数据库模型 - * - * @author a203 - */ -@Data -@TableName("typhoon_land") -public class TyphoonLand extends Model { - private static final long serialVersionUID = 1L; - - /** - * 台风数据库主键 - *

- * type = IdType.AUTO 是数据库自增 - */ - @TableId(value = "ID", type = IdType.AUTO) - private Integer id; - - /** - * 台风ID - */ - @TableField("TYPHOON_ID") - private String typhoonId; - - /** - * 台风登陆点 - */ - @TableField("LAND_ADDRESS") - private String landAddress; - - /** - * 台风登陆时间 - */ - @TableField("LAND_TIME") - private String landTime; - - /** - * 台风类型-热带风暴/强台风... - */ - @TableField("TYPE") - private String type; - - /** - * 经度 - */ - @TableField("LNG") - private Double lng; - - /** - * 纬度 - */ - @TableField("LAT") - private Double lat; - - /** - * 台风登陆细节 - */ - @TableField("INFO") - private String info; -} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonPoint.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonPoint.java deleted file mode 100644 index 70a9703..0000000 --- a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonPoint.java +++ /dev/null @@ -1,117 +0,0 @@ -package com.casic.missiles.modular.system.model; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.extension.activerecord.Model; -import lombok.Data; - -/** - * 台风移动点数据库模型 - * - * @author a203 - */ -@Data -@TableName("typhoon_point") -public class TyphoonPoint extends Model { - private static final long serialVersionUID = 1L; - - /** - * 台风数据库主键 - *

- * type = IdType.AUTO 是数据库自增 - */ - @TableId(value = "ID", type = IdType.AUTO) - private Integer id; - - /** - * 台风ID - */ - @TableField("TYPHOON_ID") - private String typhoonId; - - /** - * 数据更新时间 - */ - @TableField("TIME") - private String time; - - /** - * 台风中心气压,单位【百帕】 - */ - @TableField("CENTER_PRESSURE") - private String centerPressure; - - /** - * 风速,单位【米/每秒】 - */ - @TableField("SPEED") - private String speed; - - /** - * 台风风力等级描述 - */ - @TableField("TYPHOON_TYPE") - private String typhoonType; - - /** - * 台风整体移动速度,单位【公里/小时】 - */ - @TableField("MOVE_SPEED") - private String moveSpeed; - - /** - * 风力,单位【级】 - */ - @TableField("POWER") - private Integer power; - - /** - * 台风未来移动方向 - */ - @TableField("MOVE_DIRECTION") - private String moveDirection; - - /** - * 经度 - */ - @TableField("LNG") - private Double lng; - - /** - * 纬度 - */ - @TableField("LAT") - private Double lat; - - /** - * 12级风力影响半径 - */ - @TableField("RADIUS_12") - private String radius12; - - /** - * 10级风力影响半径 - */ - @TableField("RADIUS_10") - private String radius10; - - /** - * 7级风力影响半径 - */ - @TableField("RADIUS_7") - private String radius7; - - /** - * 台风路线预测 - */ - @TableField("ROUTE_PREDICTION") - private String routePrediction; - - /** - * 中心位置 - */ - @TableField("CENTER_POSITION") - private String centerPosition; -} diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..8396364 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,31 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel.DataBean data) { + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java index a34da1b..0c5225d 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -1,8 +1,8 @@ package com.casic.missiles.modular.system.dto; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; import lombok.Data; import java.util.ArrayList; @@ -142,7 +142,7 @@ private String centerPosition; } - public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + public TyphoonDetailDTO(TyphoonDetail detail, List landPoints, List routePoints) { this.typhoonId = detail.getTyphoonId(); this.name = detail.getName(); this.engName = detail.getEngName(); @@ -152,8 +152,9 @@ this.startTime = detail.getStartTime(); this.endTime = detail.getEndTime(); this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); - for (TyphoonLand landBean : landBeans) { + for (LandPoint landBean : landPoints) { LandBan bean = new LandBan(); bean.landAddress = landBean.getLandAddress(); bean.landTime = landBean.getLandTime(); @@ -164,8 +165,9 @@ lands.add(bean); } this.land = lands; + List points = new ArrayList<>(); - for (TyphoonPoint point : pointBeans) { + for (RoutePoint point : routePoints) { PointBean pointBean = new PointBean(); pointBean.time = point.getTime(); pointBean.centerPressure = point.getCenterPressure(); diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java new file mode 100644 index 0000000..b0b2e7a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java @@ -0,0 +1,265 @@ +package com.casic.missiles.modular.system.dto.remote; + +/** + * 洋流数据模型 + * + * @author a203 + */ +public class OceanDetailModel { + + /** + * code : 200 + * data : {"altitude":0,"forecast":{"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34},"oceanDir":135.22,"pressure":100925.19,"speed":7.97,"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"temperature":28.6,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34,"windDir":71.84,"windSpeed":7.97} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * altitude : 0 + * forecast : {"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34} + * oceanDir : 135.22 + * pressure : 100925.19 + * speed : 7.97 + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * temperature : 28.6 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + * windDir : 71.84 + * windSpeed : 7.97 + */ + + private double altitude; + private ForecastBean forecast; + private double oceanDir; + private double pressure; + private double speed; + private double swellDir; + private double swellHeight; + private double swellPrd; + private double temperature; + private double waveDir; + private double waveHeight; + private double wavePrd; + private double windDir; + private double windSpeed; + + public double getAltitude() { + return altitude; + } + + public void setAltitude(double altitude) { + this.altitude = altitude; + } + + public ForecastBean getForecast() { + return forecast; + } + + public void setForecast(ForecastBean forecast) { + this.forecast = forecast; + } + + public double getOceanDir() { + return oceanDir; + } + + public void setOceanDir(double oceanDir) { + this.oceanDir = oceanDir; + } + + public double getPressure() { + return pressure; + } + + public void setPressure(double pressure) { + this.pressure = pressure; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getTemperature() { + return temperature; + } + + public void setTemperature(double temperature) { + this.temperature = temperature; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + + public double getWindDir() { + return windDir; + } + + public void setWindDir(double windDir) { + this.windDir = windDir; + } + + public double getWindSpeed() { + return windSpeed; + } + + public void setWindSpeed(double windSpeed) { + this.windSpeed = windSpeed; + } + + public static class ForecastBean { + /** + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + */ + + private double swellDir; + private double swellHeight; + private double swellPrd; + private double waveDir; + private double waveHeight; + private double wavePrd; + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java deleted file mode 100644 index 5ad3a22..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java +++ /dev/null @@ -1,439 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方洋流数据模型 - * - * @author a203 - */ -public class OceanDetailRemoteData { - - /** - * code : 0 - * data : {"lon":114.338597,"lat":18.273134,"date":"2021-10-21","hour":10,"list":[{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}]} - * message : success - * etime : 1634786517992 - */ - - private int code; - private DataBean data; - private String message; - private long etime; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public DataBean getData() { - return data; - } - - public void setData(DataBean data) { - this.data = data; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public long getEtime() { - return etime; - } - - public void setEtime(long etime) { - this.etime = etime; - } - - public static class DataBean { - /** - * lon : 114.338597 - * lat : 18.273134 - * date : 2021-10-21 - * hour : 10 - * list : [{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}] - */ - - private double lon; - private double lat; - private String date; - private int hour; - private List list; - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public int getHour() { - return hour; - } - - public void setHour(int hour) { - this.hour = hour; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * date : 2021-10-21 - * ytx : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - * meteo : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - */ - - private String date; - private YtxBean ytx; - private MeteoBean meteo; - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public YtxBean getYtx() { - return ytx; - } - - public void setYtx(YtxBean ytx) { - this.ytx = ytx; - } - - public MeteoBean getMeteo() { - return meteo; - } - - public void setMeteo(MeteoBean meteo) { - this.meteo = meteo; - } - - public static class YtxBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - - public static class MeteoBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java new file mode 100644 index 0000000..3a2e068 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java @@ -0,0 +1,374 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风数据模型 + * + * @author a203 + */ +public class TyphoonDetailModel { + + /** + * code : 200 + * data : {"centerLat":20.65,"centerLng":128.1,"endTime":"2021-10-11 8:00:00","engName":"Kompasu","isActive":"1","land":[],"name":"圆规","points":[{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}],"startTime":"2021-10-8 2:00:00","typhoonId":"202118","warnLevel":"white"} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * centerLat : 20.65 + * centerLng : 128.1 + * endTime : 2021-10-11 8:00:00 + * engName : Kompasu + * isActive : 1 + * land : [] + * name : 圆规 + * points : [{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}] + * startTime : 2021-10-8 2:00:00 + * typhoonId : 202118 + * warnLevel : white + */ + + private double centerLat; + private double centerLng; + private String endTime; + private String engName; + private String isActive; + private String name; + private String startTime; + private String typhoonId; + private String warnLevel; + private List land; + private List points; + + public double getCenterLat() { + return centerLat; + } + + public void setCenterLat(double centerLat) { + this.centerLat = centerLat; + } + + public double getCenterLng() { + return centerLng; + } + + public void setCenterLng(double centerLng) { + this.centerLng = centerLng; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public String getIsActive() { + return isActive; + } + + public void setIsActive(String isActive) { + this.isActive = isActive; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getWarnLevel() { + return warnLevel; + } + + public void setWarnLevel(String warnLevel) { + this.warnLevel = warnLevel; + } + + public List getLand() { + return land; + } + + public void setLand(List land) { + this.land = land; + } + + public static class LandBean { + private String landAddress; + private String type; + private Double lng; + private Double lat; + private String info; + private String landTime; + + public String getLandAddress() { + return landAddress; + } + + public void setLandAddress(String landAddress) { + this.landAddress = landAddress; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Double getLng() { + return lng; + } + + public void setLng(Double lng) { + this.lng = lng; + } + + public Double getLat() { + return lat; + } + + public void setLat(Double lat) { + this.lat = lat; + } + + public String getInfo() { + return info; + } + + public void setInfo(String info) { + this.info = info; + } + + public String getLandTime() { + return landTime; + } + + public void setLandTime(String landTime) { + this.landTime = landTime; + } + } + + public List getPoints() { + return points; + } + + public void setPoints(List points) { + this.points = points; + } + + public static class PointsBean { + /** + * centerPosition : 距离菲律宾马尼拉东北方向约600公里 + * centerPressure : 990 + * lat : 18.7 + * lng : 124.7 + * moveDirection : 西北西 + * moveSpeed : 25 + * power : 9 + * radius10 : + * radius12 : + * radius7 : 160|140|200|180 + * routePrediction : “圆规”将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分) + * speed : 23 + * time : 2021-10-11 8:00:00 + * typhoonType : 热带风暴 + */ + + private String centerPosition; + private String centerPressure; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private int power; + private String radius10; + private String radius12; + private String radius7; + private String routePrediction; + private String speed; + private String time; + private String typhoonType; + + public String getCenterPosition() { + return centerPosition; + } + + public void setCenterPosition(String centerPosition) { + this.centerPosition = centerPosition; + } + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius12() { + return radius12; + } + + public void setRadius12(String radius12) { + this.radius12 = radius12; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getRoutePrediction() { + return routePrediction; + } + + public void setRoutePrediction(String routePrediction) { + this.routePrediction = routePrediction; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java deleted file mode 100644 index 5b70924..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java +++ /dev/null @@ -1,419 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonDetailRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 6155596a0de376ce34c7b594 - * showapi_res_body : {"ret_code":0,"obj":{"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"}} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * obj : {"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"} - */ - - private int ret_code; - private ObjBean obj; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public ObjBean getObj() { - return obj; - } - - public void setObj(ObjBean obj) { - this.obj = obj; - } - - public static class ObjBean { - /** - * endtime : 2021-9-30 8:00:00 - * centerlng : 139.300000 - * starttime : 2021-9-23 20:00:00 - * tfid : 202116 - * isactive : 1 - * centerlat : 25.200000 - * name : 蒲公英 - * land : [{"landaddress":"朱家尖镇","strong":"强台风","lng":"122.39","lat":"29.83","info":"\u201c灿鸿\u201d11日16时40分前后登陆浙江舟山市朱家尖镇","landtime":"2015/7/11 16:40:00"}] - * warnlevel : white - * points : [{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}] - * enname : Mindulle - */ - - private String endtime; - private String centerlng; - private String starttime; - private String tfid; - private String isactive; - private String centerlat; - private String name; - private String warnlevel; - private String enname; - private List land; - private List points; - - public String getEndtime() { - return endtime; - } - - public void setEndtime(String endtime) { - this.endtime = endtime; - } - - public String getCenterlng() { - return centerlng; - } - - public void setCenterlng(String centerlng) { - this.centerlng = centerlng; - } - - public String getStarttime() { - return starttime; - } - - public void setStarttime(String starttime) { - this.starttime = starttime; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getIsactive() { - return isactive; - } - - public void setIsactive(String isactive) { - this.isactive = isactive; - } - - public String getCenterlat() { - return centerlat; - } - - public void setCenterlat(String centerlat) { - this.centerlat = centerlat; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getWarnlevel() { - return warnlevel; - } - - public void setWarnlevel(String warnlevel) { - this.warnlevel = warnlevel; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - - public List getLand() { - return land; - } - - public void setLand(List land) { - this.land = land; - } - - public static class LandBan { - /** - * landaddress : 朱家尖镇 - * strong : 强台风 - * lng : 122.39 - * lat : 29.83 - * info : “灿鸿”11日16时40分前后登陆浙江舟山市朱家尖镇 - * landtime : 2015/7/11 16:40:00 - */ - - private String landaddress; - private String strong; - private Double lng; - private Double lat; - private String info; - private String landtime; - - public String getLandaddress() { - return landaddress; - } - - public void setLandaddress(String landaddress) { - this.landaddress = landaddress; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getInfo() { - return info; - } - - public void setInfo(String info) { - this.info = info; - } - - public String getLandtime() { - return landtime; - } - - public void setLandtime(String landtime) { - this.landtime = landtime; - } - } - - public List getPoints() { - return points; - } - - public void setPoints(List points) { - this.points = points; - } - - public static class PointsBean { - /** - * time : 2021-9-23 20:00:00 - * pressure : 998 - * radius10 : - * speed : 18 - * strong : 热带风暴 - * movespeed : 20 - * radius12 : - * power : 8 - * lng : 143.30 - * movedirection : 西北西 - * lat : 13.80 - * radius7 : 250|220|200|180 - * jl : “蒲公英”将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分) - * ckposition : 距离日本东京南偏西方向约1060公里 - */ - - private String time; - private String pressure; - private String radius10; - private String speed; - private String strong; - private String movespeed; - private String radius12; - private String power; - private Double lng; - private String movedirection; - private Double lat; - private String radius7; - private String jl; - private String ckposition; - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getRadius12() { - return radius12; - } - - public void setRadius12(String radius12) { - this.radius12 = radius12; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getJl() { - return jl; - } - - public void setJl(String jl) { - this.jl = jl; - } - - public String getCkposition() { - return ckposition; - } - - public void setCkposition(String ckposition) { - this.ckposition = ckposition; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java new file mode 100644 index 0000000..91bad37 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java @@ -0,0 +1,201 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风列表数据模型 + * + * @author a203 + */ +public class TyphoonListModel { + + /** + * code : 200 + * data : [{"centerPressure":"990","engName":"Kompasu","lat":18.7,"lng":125,"moveDirection":"西北西","moveSpeed":"23","name":"圆规","power":9,"radius10":"","radius7":"200","speed":"23","time":"2021-10-11 05:00:00","typhoonId":"202118","typhoonType":"热带风暴"}] + * message : 请求成功 + * success : true + */ + + private int code; + private String message; + private boolean success; + private List data; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public static class DataBean { + /** + * centerPressure : 990 + * engName : Kompasu + * lat : 18.7 + * lng : 125 + * moveDirection : 西北西 + * moveSpeed : 23 + * name : 圆规 + * power : 9 + * radius10 : + * radius7 : 200 + * speed : 23 + * time : 2021-10-11 05:00:00 + * typhoonId : 202118 + * typhoonType : 热带风暴 + */ + + private String centerPressure; + private String engName; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private String name; + private int power; + private String radius10; + private String radius7; + private String speed; + private String time; + private String typhoonId; + private String typhoonType; + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java deleted file mode 100644 index 38a9257..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java +++ /dev/null @@ -1,237 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 61554fbe0de376d03494057c - * showapi_res_body : {"ret_code":0,"list":[{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}]} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * list : [{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}] - */ - - private int ret_code; - private List list; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * pressure : 945 - * tfid : 202116 - * radius10 : 150 - * speed : 48 - * lng : 136.40 - * radius7 : 350 - * time : 2021-09-30 08:00:00 - * movespeed : 23 - * strong : 强台风 - * name : 蒲公英 - * power : 15 - * movedirection : 北北东 - * lat : 26.60 - * enname : Mindulle - */ - - private String pressure; - private String tfid; - private String radius10; - private String speed; - private String lng; - private String radius7; - private String time; - private String movespeed; - private String strong; - private String name; - private String power; - private String movedirection; - private String lat; - private String enname; - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getLng() { - return lng; - } - - public void setLng(String lng) { - this.lng = lng; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public String getLat() { - return lat; - } - - public void setLat(String lat) { - this.lat = lat; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java new file mode 100644 index 0000000..c488237 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风移动点数据信息 服务类 + * + * @author a203 + */ +public interface ILandPointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java new file mode 100644 index 0000000..ab05570 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风登陆点数据信息 服务类 + * + * @author a203 + */ +public interface IRoutePointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java deleted file mode 100644 index d16a48b..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonLandService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java deleted file mode 100644 index 80e2765..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonPointService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java index c47a0f3..53bb971 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java @@ -19,13 +19,6 @@ void saveTyphoonList(); /** - * 更新台风详情 - */ - void updateTyphoonDetail(); - - /***上面接口从第三方存库,下面接口查库**********************/ - - /** * 查询台风列表 * * @return {@link List} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java new file mode 100644 index 0000000..fed33c1 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.LandPointMapper; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.service.ILandPointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class LandPointServiceImpl extends ServiceImpl implements ILandPointService { + + public LandPointServiceImpl() { + + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java index f8cb771..58fce60 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java @@ -2,9 +2,12 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; +import com.casic.missiles.modular.system.dto.AddressConfigDTO; import com.casic.missiles.modular.system.dto.OceanDetailDTO; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; +import com.casic.missiles.modular.system.service.IAddressConfigService; import com.casic.missiles.modular.system.service.IOceanService; +import com.casic.missiles.modular.system.utils.Constant; import com.casic.missiles.modular.system.utils.HttpRequestHelper; import org.springframework.stereotype.Service; @@ -17,23 +20,32 @@ @Service public class OceanServiceImpl implements IOceanService { - private static final String SUCCESS_CODE = "0"; + private final IAddressConfigService configService; - public OceanServiceImpl() { - + public OceanServiceImpl(IAddressConfigService configService) { + this.configService = configService; } @Override public OceanDetailDTO oceanDetail(double lng, double lat, String date, String days, String hour) { - String oceanData = HttpRequestHelper.obtainOceanData(lng, lat, date, days, hour); + AddressConfigDTO addressConfig = configService.selectLastConfig(); + String envIp = addressConfig.getEnvIp(); + if (envIp.contains(Constant.HTTP_HEADER)) { + envIp = envIp.replace(Constant.HTTP_HEADER, ""); + } + String url = Constant.HTTP_HEADER + envIp + "/environment/ocean?" + + "lng=" + lng + "&lat=" + lat + + "&date=" + date + "&days=" + days + "&hour=" + hour; + + String oceanData = HttpRequestHelper.doGet(url); /** * 解析洋流数据返回给前端 * */ OceanDetailDTO oceanDetailDTO = null; - if (SUCCESS_CODE.equals(HttpRequestHelper.getOceanCode(oceanData))) { - OceanDetailRemoteData remoteData = JSON.parseObject(oceanData, new TypeReference() { + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(oceanData)) { + OceanDetailModel remoteData = JSON.parseObject(oceanData, new TypeReference() { }); - oceanDetailDTO = new OceanDetailDTO(remoteData); + oceanDetailDTO = new OceanDetailDTO(remoteData.getData()); } return oceanDetailDTO; } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java new file mode 100644 index 0000000..24b06cd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.RoutePointMapper; +import com.casic.missiles.modular.system.model.RoutePoint; +import com.casic.missiles.modular.system.service.IRoutePointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class RoutePointServiceImpl extends ServiceImpl implements IRoutePointService { + + public RoutePointServiceImpl() { + + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java deleted file mode 100644 index d1bf2c7..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.casic.missiles.modular.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.casic.missiles.modular.system.dao.TyphoonLandMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.service.ITyphoonLandService; -import org.springframework.stereotype.Service; - -/** - * 台风数据信息 服务实现类 - * - * @author a203 - */ - -@Service -public class TyphoonLandServiceImpl extends ServiceImpl implements ITyphoonLandService { - - public TyphoonLandServiceImpl() { - - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java deleted file mode 100644 index 36815fa..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.casic.missiles.modular.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.casic.missiles.modular.system.dao.TyphoonPointMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; -import com.casic.missiles.modular.system.service.ITyphoonPointService; -import org.springframework.stereotype.Service; - -/** - * 台风数据信息 服务实现类 - * - * @author a203 - */ - -@Service -public class TyphoonPointServiceImpl extends ServiceImpl implements ITyphoonPointService { - - public TyphoonPointServiceImpl() { - - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java index 861e2c1..1cbfb01 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java @@ -5,18 +5,16 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.casic.missiles.modular.system.dao.TyphoonMapper; +import com.casic.missiles.modular.system.dto.AddressConfigDTO; import com.casic.missiles.modular.system.dto.TyphoonDTO; import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; -import com.casic.missiles.modular.system.dto.remote.TyphoonDetailRemoteData; -import com.casic.missiles.modular.system.dto.remote.TyphoonRemoteData; +import com.casic.missiles.modular.system.dto.remote.TyphoonDetailModel; +import com.casic.missiles.modular.system.dto.remote.TyphoonListModel; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.Typhoon; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; -import com.casic.missiles.modular.system.service.ITyphoonDetailService; -import com.casic.missiles.modular.system.service.ITyphoonLandService; -import com.casic.missiles.modular.system.service.ITyphoonPointService; -import com.casic.missiles.modular.system.service.ITyphoonService; +import com.casic.missiles.modular.system.service.*; import com.casic.missiles.modular.system.utils.Constant; import com.casic.missiles.modular.system.utils.HttpRequestHelper; import org.springframework.stereotype.Service; @@ -33,17 +31,29 @@ @Service public class TyphoonServiceImpl extends ServiceImpl implements ITyphoonService { - private static final String SUCCESS_CODE = "0"; + private final IAddressConfigService configService; + private final ITyphoonDetailService detailService; + private final ILandPointService landPointService; + private final IRoutePointService routePointService; - private final ITyphoonDetailService typhoonDetailService; - private final ITyphoonLandService typhoonLandService; - private final ITyphoonPointService typhoonPointService; + public TyphoonServiceImpl(IAddressConfigService configService, + ITyphoonDetailService detailService, + ILandPointService landPointService, + IRoutePointService routePointService) { + this.configService = configService; + this.detailService = detailService; + this.landPointService = landPointService; + this.routePointService = routePointService; + } - public TyphoonServiceImpl(ITyphoonDetailService typhoonDetailService, - ITyphoonLandService typhoonLandService, ITyphoonPointService typhoonPointService) { - this.typhoonDetailService = typhoonDetailService; - this.typhoonLandService = typhoonLandService; - this.typhoonPointService = typhoonPointService; + private String obtainEnvAddress() { + //获取服务器配置的IP信息 + AddressConfigDTO addressConfig = configService.selectLastConfig(); + String envIp = addressConfig.getEnvIp(); + if (envIp.contains(Constant.HTTP_HEADER)) { + envIp = envIp.replace(Constant.HTTP_HEADER, ""); + } + return envIp; } /** @@ -51,107 +61,117 @@ */ @Override public void saveTyphoonList() { + String url = Constant.HTTP_HEADER + obtainEnvAddress() + "/environment/saveTyphoon?"; /** * 获取台风接口数据 * */ - String res = HttpRequestHelper.doGet(Constant.TYPHOON_LIST + System.currentTimeMillis()); - if (SUCCESS_CODE.equals(HttpRequestHelper.getTyphoonCode(res))) { - TyphoonRemoteData remoteData = JSON.parseObject(res, new TypeReference() { + String res = HttpRequestHelper.doGet(url); + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(res)) { + TyphoonListModel listModel = JSON.parseObject(res, new TypeReference() { }); - //先清空之前的台风表,再保存最新的台风 - remove(null); - List beans = remoteData.getShowapi_res_body().getList(); - for (TyphoonRemoteData.ShowapiResBodyBean.ListBean data : beans) { - //将获取到台风数据存到数据库 + for (TyphoonListModel.DataBean data : listModel.getData()) { Typhoon entity = new Typhoon(); - entity.setTyphoonId(data.getTfid()); + entity.setTyphoonId(data.getTyphoonId()); entity.setName(data.getName()); - entity.setEngName(data.getEnname()); - entity.setLng(Double.valueOf(data.getLng())); - entity.setLat(Double.valueOf(data.getLat())); - entity.setTyphoonType(data.getStrong()); - entity.setCenterPressure(data.getPressure()); + entity.setEngName(data.getEngName()); + entity.setLng(data.getLng()); + entity.setLat(data.getLat()); + entity.setTyphoonType(data.getTyphoonType()); + entity.setCenterPressure(data.getCenterPressure()); entity.setSpeed(data.getSpeed()); - entity.setPower(Integer.valueOf(data.getPower())); - entity.setMoveSpeed(data.getMovespeed()); - entity.setMoveDirection(data.getMovedirection()); + entity.setPower(data.getPower()); + entity.setMoveSpeed(data.getMoveSpeed()); + entity.setMoveDirection(data.getMoveDirection()); entity.setRadius7(data.getRadius7()); entity.setRadius10(data.getRadius10()); entity.setTime(data.getTime()); - save(entity); + entity.setIsActive("1"); + this.baseMapper.insert(entity); } } + updateTyphoonDetail(); } /** * 更新台风详情 */ - @Override - public void updateTyphoonDetail() { - for (Typhoon typhoon : list()) { + private void updateTyphoonDetail() { + //筛选出还未消散的台风并更新详情 + List typhoons = this.baseMapper.selectCurrentTyphoon(); + for (Typhoon typhoon : typhoons) { /** * 获取台风接口数据 * */ - String res = HttpRequestHelper.doGet( - Constant.TYPHOON_DETAIL.replace("ID", typhoon.getTyphoonId()) - + System.currentTimeMillis()); - if (SUCCESS_CODE.equals(HttpRequestHelper.getTyphoonCode(res))) { - TyphoonDetailRemoteData remoteData = JSON.parseObject(res, new TypeReference() { + String url = Constant.HTTP_HEADER + obtainEnvAddress() + "/environment/updateTyphoon?typhoonId=" + typhoon.getTyphoonId(); + String res = HttpRequestHelper.doGet(url); + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(res)) { + TyphoonDetailModel detailModel = JSON.parseObject(res, new TypeReference() { }); - TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean objBean = remoteData.getShowapi_res_body().getObj(); - //保存台风基本情况存到数据库 + TyphoonDetailModel.DataBean dataBean = detailModel.getData(); + String typhoonId = dataBean.getTyphoonId(); + /** + * 保存台风基本情况存到数据库 + * */ TyphoonDetail detail = new TyphoonDetail(); - detail.setTyphoonId(objBean.getTfid()); - detail.setName(objBean.getName()); - detail.setEngName(objBean.getEnname()); - detail.setWarnLevel(objBean.getWarnlevel()); - detail.setCenterLng(Double.parseDouble(objBean.getCenterlng())); - detail.setCenterLat(Double.parseDouble(objBean.getCenterlat())); - detail.setStartTime(objBean.getStarttime()); - detail.setEndTime(objBean.getEndtime()); - detail.setIsActive(objBean.getIsactive()); - typhoonDetailService.saveOrUpdate(detail, new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); + detail.setTyphoonId(typhoonId); + detail.setName(dataBean.getName()); + detail.setEngName(dataBean.getEngName()); + detail.setWarnLevel(dataBean.getWarnLevel()); + detail.setCenterLng(dataBean.getCenterLng()); + detail.setCenterLat(dataBean.getCenterLat()); + detail.setStartTime(dataBean.getStartTime()); + detail.setEndTime(dataBean.getEndTime()); + detail.setIsActive(dataBean.getIsActive()); + QueryWrapper queryWrapper = new QueryWrapper().eq("TYPHOON_ID", typhoonId); + detailService.saveOrUpdate(detail, queryWrapper); - //保存台风登陆情况存到数据库 - List land = objBean.getLand(); - typhoonLandService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); - for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.LandBan landBan : land) { - TyphoonLand typhoonLand = new TyphoonLand(); + /** + * 更新台风列表台风状态 + * */ + typhoon.setIsActive(dataBean.getIsActive()); + saveOrUpdate(typhoon, new QueryWrapper().eq("TYPHOON_ID", typhoonId)); - typhoonLand.setTyphoonId(objBean.getTfid()); - typhoonLand.setLandAddress(landBan.getLandaddress()); - typhoonLand.setLandTime(landBan.getLandtime()); - typhoonLand.setType(landBan.getStrong()); - typhoonLand.setLng(landBan.getLng()); - typhoonLand.setLat(landBan.getLat()); - typhoonLand.setInfo(landBan.getInfo()); + /** + * 保存台风登陆情况存到数据库 + * */ + List landBans = dataBean.getLand(); + for (TyphoonDetailModel.DataBean.LandBean bean : landBans) { + LandPoint landPoint = new LandPoint(); - typhoonLandService.save(typhoonLand); + landPoint.setTyphoonId(typhoonId); + landPoint.setLandAddress(bean.getLandAddress()); + landPoint.setLandTime(bean.getLandTime()); + landPoint.setType(bean.getType()); + landPoint.setLng(bean.getLng()); + landPoint.setLat(bean.getLat()); + landPoint.setInfo(bean.getInfo()); + landPointService.save(landPoint); } - //保存台风移动路径存到数据库 - List points = objBean.getPoints(); - typhoonPointService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); - for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.PointsBean point : points) { - TyphoonPoint typhoonPoint = new TyphoonPoint(); + /** + * 保存台风移动路径存到数据库 + * */ + List routePoints = dataBean.getPoints(); + routePointService.remove(new QueryWrapper().eq("TYPHOON_ID", typhoonId)); + for (TyphoonDetailModel.DataBean.PointsBean point : routePoints) { + RoutePoint routePoint = new RoutePoint(); - typhoonPoint.setTyphoonId(objBean.getTfid()); - typhoonPoint.setTime(point.getTime()); - typhoonPoint.setCenterPressure(point.getPressure()); - typhoonPoint.setSpeed(point.getSpeed()); - typhoonPoint.setTyphoonType(point.getStrong()); - typhoonPoint.setMoveSpeed(point.getMovespeed()); - typhoonPoint.setPower(Integer.parseInt(point.getPower())); - typhoonPoint.setMoveDirection(point.getMovedirection()); - typhoonPoint.setLng(point.getLng()); - typhoonPoint.setLat(point.getLat()); - typhoonPoint.setRadius12(point.getRadius12()); - typhoonPoint.setRadius10(point.getRadius10()); - typhoonPoint.setRadius7(point.getRadius7()); - typhoonPoint.setRoutePrediction(point.getJl()); - typhoonPoint.setCenterPosition(point.getCkposition()); - - typhoonPointService.save(typhoonPoint); + routePoint.setTyphoonId(typhoonId); + routePoint.setTime(point.getTime()); + routePoint.setCenterPressure(point.getCenterPressure()); + routePoint.setSpeed(point.getSpeed()); + routePoint.setTyphoonType(point.getTyphoonType()); + routePoint.setMoveSpeed(point.getMoveSpeed()); + routePoint.setPower(point.getPower()); + routePoint.setMoveDirection(point.getMoveDirection()); + routePoint.setLng(point.getLng()); + routePoint.setLat(point.getLat()); + routePoint.setRadius12(point.getRadius12()); + routePoint.setRadius10(point.getRadius10()); + routePoint.setRadius7(point.getRadius7()); + routePoint.setRoutePrediction(point.getRoutePrediction()); + routePoint.setCenterPosition(point.getCenterPosition()); + routePointService.save(routePoint); } } } @@ -160,7 +180,9 @@ @Override public List currentTyphoonList() { List typhoonList = new ArrayList<>(); - for (Typhoon typhoon : list()) { + //筛选出还未消散的台风并更新详情 + List typhoons = this.baseMapper.selectCurrentTyphoon(); + for (Typhoon typhoon : typhoons) { typhoonList.add(new TyphoonDTO(typhoon)); } return typhoonList; @@ -168,15 +190,18 @@ @Override public TyphoonDetailDTO typhoonDetail(String typhoonId) { - TyphoonDetail detail = typhoonDetailService.getOne( + TyphoonDetail typhoonDetail = detailService.getOne( new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - List landList = typhoonLandService.list( - new QueryWrapper().eq("TYPHOON_ID", typhoonId) + if (typhoonDetail == null) { + return null; + } + List landPoints = landPointService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - List pointList = typhoonPointService.list( - new QueryWrapper().eq("TYPHOON_ID", typhoonId) + List routePoints = routePointService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - return new TyphoonDetailDTO(detail, landList, pointList); + return new TyphoonDetailDTO(typhoonDetail, landPoints, routePoints); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java deleted file mode 100644 index 552a6e9..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.casic.missiles.modular.system.utils; - -/** - * @author a203 - */ -public class Constant { - /** - * 热带气旋/台风相关常量 - */ - private static final String BASE_URL = "https://route.showapi.com"; - private static final String API_APPID = "780330"; - private static final String API_SIGN_KEY = "f30ac28b65cc447da936448c57bc5d99"; - - public static final String TYPHOON_LIST = BASE_URL - + "/342-1?" - + "showapi_appid=" + API_APPID + "&" - + "showapi_sign=" + API_SIGN_KEY + "&" - + "showapi_timestamp="; - - public static final String TYPHOON_DETAIL = BASE_URL - + "/342-2?" - + "showapi_appid=" + API_APPID + "&" - + "showapi_sign=" + API_SIGN_KEY + "&" - + "tfid=ID" + "&" - + "showapi_timestamp="; - - /** - * 洋流相关常量 - */ - private static final String OCEAN_BASE_URL = "http://api.meteo.open.ninecosmos.cn"; - public static final String OCEAN_HEADER_NAME = "Authorization"; - public static final String OCEAN_APPID = "WXZH888888"; - public static final String OCEAN_APP_KEY = "xb#bD&xtho@b80scbDb"; - - public static final String OCEAN_TOKEN = OCEAN_BASE_URL + "/us/users/open/token"; - public static final String OCEAN_DETAIL = OCEAN_BASE_URL + "/mr/netcdf/meteo/ytx"; -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java deleted file mode 100644 index 1e0cd94..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java +++ /dev/null @@ -1,115 +0,0 @@ -package com.casic.missiles.modular.system.utils; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONException; -import com.alibaba.fastjson.JSONObject; -import lombok.NonNull; -import okhttp3.*; - -import java.io.IOException; -import java.util.Objects; -import java.util.concurrent.TimeUnit; - -/** - * 网络请求工具 - * - * @author a203 - */ -public class HttpRequestHelper { - - public static RequestBody createRequestBody(String value) { - return RequestBody.create(MediaType.parse("application/json; charset=utf-8"), value); - } - - public static String doPost(Request request) { - return streamResponse(request); - } - - public static String doGet(String url) { - return streamResponse(new Request.Builder() - .url(url) - .build()); - } - - private static String streamResponse(@NonNull Request request) { - OkHttpClient httpClient = new OkHttpClient.Builder() - .connectTimeout(10, TimeUnit.SECONDS) - .writeTimeout(10, TimeUnit.SECONDS) - .readTimeout(20, TimeUnit.SECONDS) - .build(); - Call call = httpClient.newCall(request); - try { - Response response = call.execute(); - return response.body() != null ? Objects.requireNonNull(response.body()).string() : ""; - } catch (IOException e) { - e.printStackTrace(); - } - return ""; - } - - public static String obtainOceanData(double lng, double lat, String date, String days, String hour) { - /** - * 获取洋流数据Token - * */ - JSONObject object = new JSONObject(); - try { - object.put("appId", Constant.OCEAN_APPID); - object.put("appKey", Constant.OCEAN_APP_KEY); - } catch (JSONException e) { - e.printStackTrace(); - } - Request tokenRequest = new Request.Builder() - .url(Constant.OCEAN_TOKEN) - .post(HttpRequestHelper.createRequestBody(object.toJSONString())) - .build(); - String tokenJson = HttpRequestHelper.doPost(tokenRequest); - if ("".equals(tokenJson)) { - return null; - } - /** - * 解析token - * */ - JSONObject tokenObject = JSON.parseObject(tokenJson); - JSONObject dataObject = tokenObject.getJSONObject("data"); - String token = dataObject.getString("token"); - /** - * 封装请求参数 - * */ - JSONObject jsonObject = new JSONObject(); - try { - jsonObject.put("lon", lng); - jsonObject.put("lat", lat); - jsonObject.put("date", date); - jsonObject.put("hour", days); - jsonObject.put("days", hour); - } catch (JSONException e) { - e.printStackTrace(); - } - /** - * 获取洋流数据 - * */ - Request request = new Request.Builder() - .addHeader(Constant.OCEAN_HEADER_NAME, token) - .url(Constant.OCEAN_DETAIL) - .post(HttpRequestHelper.createRequestBody(jsonObject.toJSONString())) - .build(); - return HttpRequestHelper.doPost(request); - } - - public static String getTyphoonCode(String value) { - if ("".equals(value)) { - return value; - } - JSONObject jsonObject = JSON.parseObject(value); - return jsonObject.getString("showapi_res_code"); - } - - public static String getOceanCode(String value) { - if ("".equals(value)) { - return value; - } - JSONObject jsonObject = JSON.parseObject(value); - Integer code = jsonObject.getInteger("code"); - return String.valueOf(code); - } -} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/LandPoint.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/LandPoint.java new file mode 100644 index 0000000..f6d61ba --- /dev/null +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/LandPoint.java @@ -0,0 +1,67 @@ +package com.casic.missiles.modular.system.model; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import lombok.Data; + +/** + * 台风登陆点数据库模型 + * + * @author a203 + */ +@Data +@TableName("tf_land_point") +public class LandPoint extends Model { + private static final long serialVersionUID = 1L; + + /** + * 台风数据库主键 + */ + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private Long id; + + /** + * 台风ID + */ + @TableField("TYPHOON_ID") + private String typhoonId; + + /** + * 台风登陆点 + */ + @TableField("LAND_ADDRESS") + private String landAddress; + + /** + * 台风登陆时间 + */ + @TableField("LAND_TIME") + private String landTime; + + /** + * 台风类型-热带风暴/强台风... + */ + @TableField("TYPE") + private String type; + + /** + * 经度 + */ + @TableField("LNG") + private Double lng; + + /** + * 纬度 + */ + @TableField("LAT") + private Double lat; + + /** + * 台风登陆细节 + */ + @TableField("INFO") + private String info; +} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/RoutePoint.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/RoutePoint.java new file mode 100644 index 0000000..81981db --- /dev/null +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/RoutePoint.java @@ -0,0 +1,115 @@ +package com.casic.missiles.modular.system.model; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import lombok.Data; + +/** + * 台风移动点数据库模型 + * + * @author a203 + */ +@Data +@TableName("tf_route_point") +public class RoutePoint extends Model { + private static final long serialVersionUID = 1L; + + /** + * 台风数据库主键 + */ + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private Long id; + + /** + * 台风ID + */ + @TableField("TYPHOON_ID") + private String typhoonId; + + /** + * 数据更新时间 + */ + @TableField("TIME") + private String time; + + /** + * 台风中心气压,单位【百帕】 + */ + @TableField("CENTER_PRESSURE") + private String centerPressure; + + /** + * 风速,单位【米/每秒】 + */ + @TableField("SPEED") + private String speed; + + /** + * 台风风力等级描述 + */ + @TableField("TYPHOON_TYPE") + private String typhoonType; + + /** + * 台风整体移动速度,单位【公里/小时】 + */ + @TableField("MOVE_SPEED") + private String moveSpeed; + + /** + * 风力,单位【级】 + */ + @TableField("POWER") + private Integer power; + + /** + * 台风未来移动方向 + */ + @TableField("MOVE_DIRECTION") + private String moveDirection; + + /** + * 经度 + */ + @TableField("LNG") + private Double lng; + + /** + * 纬度 + */ + @TableField("LAT") + private Double lat; + + /** + * 12级风力影响半径 + */ + @TableField("RADIUS_12") + private String radius12; + + /** + * 10级风力影响半径 + */ + @TableField("RADIUS_10") + private String radius10; + + /** + * 7级风力影响半径 + */ + @TableField("RADIUS_7") + private String radius7; + + /** + * 台风路线预测 + */ + @TableField("ROUTE_PREDICTION") + private String routePrediction; + + /** + * 中心位置 + */ + @TableField("CENTER_POSITION") + private String centerPosition; +} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/Typhoon.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/Typhoon.java index 658cb40..7146637 100644 --- a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/Typhoon.java +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/Typhoon.java @@ -13,17 +13,15 @@ * @author a203 */ @Data -@TableName("typhoon_list") +@TableName("tf_list") public class Typhoon extends Model { private static final long serialVersionUID = 1L; /** * 台风数据库主键 - *

- * type = IdType.AUTO 是数据库自增 */ - @TableId(value = "ID", type = IdType.AUTO) - private Integer id; + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private Long id; /** * 台风ID @@ -95,4 +93,9 @@ */ @TableField("TIME") private String time; -} + /** + * 台风是否已消散,1-未消散,0-已消散 + */ + @TableField("IS_ACTIVE") + private String isActive; +} \ No newline at end of file diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonDetail.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonDetail.java index ea3c29d..8b93cd0 100644 --- a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonDetail.java +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonDetail.java @@ -13,17 +13,15 @@ * @author a203 */ @Data -@TableName("typhoon_detail") +@TableName("tf_detail") public class TyphoonDetail extends Model { private static final long serialVersionUID = 1L; /** * 台风数据库主键 - *

- * type = IdType.AUTO 是数据库自增 */ - @TableId(value = "ID", type = IdType.AUTO) - private Integer id; + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private Long id; /** * 台风ID diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonLand.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonLand.java deleted file mode 100644 index ddc3d02..0000000 --- a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonLand.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.casic.missiles.modular.system.model; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.extension.activerecord.Model; -import lombok.Data; - -/** - * 台风登陆点数据库模型 - * - * @author a203 - */ -@Data -@TableName("typhoon_land") -public class TyphoonLand extends Model { - private static final long serialVersionUID = 1L; - - /** - * 台风数据库主键 - *

- * type = IdType.AUTO 是数据库自增 - */ - @TableId(value = "ID", type = IdType.AUTO) - private Integer id; - - /** - * 台风ID - */ - @TableField("TYPHOON_ID") - private String typhoonId; - - /** - * 台风登陆点 - */ - @TableField("LAND_ADDRESS") - private String landAddress; - - /** - * 台风登陆时间 - */ - @TableField("LAND_TIME") - private String landTime; - - /** - * 台风类型-热带风暴/强台风... - */ - @TableField("TYPE") - private String type; - - /** - * 经度 - */ - @TableField("LNG") - private Double lng; - - /** - * 纬度 - */ - @TableField("LAT") - private Double lat; - - /** - * 台风登陆细节 - */ - @TableField("INFO") - private String info; -} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonPoint.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonPoint.java deleted file mode 100644 index 70a9703..0000000 --- a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonPoint.java +++ /dev/null @@ -1,117 +0,0 @@ -package com.casic.missiles.modular.system.model; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.extension.activerecord.Model; -import lombok.Data; - -/** - * 台风移动点数据库模型 - * - * @author a203 - */ -@Data -@TableName("typhoon_point") -public class TyphoonPoint extends Model { - private static final long serialVersionUID = 1L; - - /** - * 台风数据库主键 - *

- * type = IdType.AUTO 是数据库自增 - */ - @TableId(value = "ID", type = IdType.AUTO) - private Integer id; - - /** - * 台风ID - */ - @TableField("TYPHOON_ID") - private String typhoonId; - - /** - * 数据更新时间 - */ - @TableField("TIME") - private String time; - - /** - * 台风中心气压,单位【百帕】 - */ - @TableField("CENTER_PRESSURE") - private String centerPressure; - - /** - * 风速,单位【米/每秒】 - */ - @TableField("SPEED") - private String speed; - - /** - * 台风风力等级描述 - */ - @TableField("TYPHOON_TYPE") - private String typhoonType; - - /** - * 台风整体移动速度,单位【公里/小时】 - */ - @TableField("MOVE_SPEED") - private String moveSpeed; - - /** - * 风力,单位【级】 - */ - @TableField("POWER") - private Integer power; - - /** - * 台风未来移动方向 - */ - @TableField("MOVE_DIRECTION") - private String moveDirection; - - /** - * 经度 - */ - @TableField("LNG") - private Double lng; - - /** - * 纬度 - */ - @TableField("LAT") - private Double lat; - - /** - * 12级风力影响半径 - */ - @TableField("RADIUS_12") - private String radius12; - - /** - * 10级风力影响半径 - */ - @TableField("RADIUS_10") - private String radius10; - - /** - * 7级风力影响半径 - */ - @TableField("RADIUS_7") - private String radius7; - - /** - * 台风路线预测 - */ - @TableField("ROUTE_PREDICTION") - private String routePrediction; - - /** - * 中心位置 - */ - @TableField("CENTER_POSITION") - private String centerPosition; -} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java index c999812..44c05dd 100644 --- a/casic-server-support/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java @@ -1,5 +1,7 @@ package com.casic.missiles.modular.system.utils; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; import lombok.NonNull; import okhttp3.*; @@ -14,6 +16,8 @@ */ public class HttpRequestHelper { + public static final int SUCCESS_CODE = 200; + public static RequestBody createRequestBody(String value) { return RequestBody.create(MediaType.parse("application/json; charset=utf-8"), value); } @@ -43,4 +47,9 @@ } return ""; } + + public static int getResponseCode(String value) { + JSONObject jsonObject = JSON.parseObject(value); + return jsonObject.getInteger("code"); + } } \ No newline at end of file diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..8396364 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,31 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel.DataBean data) { + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java index a34da1b..0c5225d 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -1,8 +1,8 @@ package com.casic.missiles.modular.system.dto; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; import lombok.Data; import java.util.ArrayList; @@ -142,7 +142,7 @@ private String centerPosition; } - public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + public TyphoonDetailDTO(TyphoonDetail detail, List landPoints, List routePoints) { this.typhoonId = detail.getTyphoonId(); this.name = detail.getName(); this.engName = detail.getEngName(); @@ -152,8 +152,9 @@ this.startTime = detail.getStartTime(); this.endTime = detail.getEndTime(); this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); - for (TyphoonLand landBean : landBeans) { + for (LandPoint landBean : landPoints) { LandBan bean = new LandBan(); bean.landAddress = landBean.getLandAddress(); bean.landTime = landBean.getLandTime(); @@ -164,8 +165,9 @@ lands.add(bean); } this.land = lands; + List points = new ArrayList<>(); - for (TyphoonPoint point : pointBeans) { + for (RoutePoint point : routePoints) { PointBean pointBean = new PointBean(); pointBean.time = point.getTime(); pointBean.centerPressure = point.getCenterPressure(); diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java new file mode 100644 index 0000000..b0b2e7a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java @@ -0,0 +1,265 @@ +package com.casic.missiles.modular.system.dto.remote; + +/** + * 洋流数据模型 + * + * @author a203 + */ +public class OceanDetailModel { + + /** + * code : 200 + * data : {"altitude":0,"forecast":{"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34},"oceanDir":135.22,"pressure":100925.19,"speed":7.97,"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"temperature":28.6,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34,"windDir":71.84,"windSpeed":7.97} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * altitude : 0 + * forecast : {"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34} + * oceanDir : 135.22 + * pressure : 100925.19 + * speed : 7.97 + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * temperature : 28.6 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + * windDir : 71.84 + * windSpeed : 7.97 + */ + + private double altitude; + private ForecastBean forecast; + private double oceanDir; + private double pressure; + private double speed; + private double swellDir; + private double swellHeight; + private double swellPrd; + private double temperature; + private double waveDir; + private double waveHeight; + private double wavePrd; + private double windDir; + private double windSpeed; + + public double getAltitude() { + return altitude; + } + + public void setAltitude(double altitude) { + this.altitude = altitude; + } + + public ForecastBean getForecast() { + return forecast; + } + + public void setForecast(ForecastBean forecast) { + this.forecast = forecast; + } + + public double getOceanDir() { + return oceanDir; + } + + public void setOceanDir(double oceanDir) { + this.oceanDir = oceanDir; + } + + public double getPressure() { + return pressure; + } + + public void setPressure(double pressure) { + this.pressure = pressure; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getTemperature() { + return temperature; + } + + public void setTemperature(double temperature) { + this.temperature = temperature; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + + public double getWindDir() { + return windDir; + } + + public void setWindDir(double windDir) { + this.windDir = windDir; + } + + public double getWindSpeed() { + return windSpeed; + } + + public void setWindSpeed(double windSpeed) { + this.windSpeed = windSpeed; + } + + public static class ForecastBean { + /** + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + */ + + private double swellDir; + private double swellHeight; + private double swellPrd; + private double waveDir; + private double waveHeight; + private double wavePrd; + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java deleted file mode 100644 index 5ad3a22..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java +++ /dev/null @@ -1,439 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方洋流数据模型 - * - * @author a203 - */ -public class OceanDetailRemoteData { - - /** - * code : 0 - * data : {"lon":114.338597,"lat":18.273134,"date":"2021-10-21","hour":10,"list":[{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}]} - * message : success - * etime : 1634786517992 - */ - - private int code; - private DataBean data; - private String message; - private long etime; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public DataBean getData() { - return data; - } - - public void setData(DataBean data) { - this.data = data; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public long getEtime() { - return etime; - } - - public void setEtime(long etime) { - this.etime = etime; - } - - public static class DataBean { - /** - * lon : 114.338597 - * lat : 18.273134 - * date : 2021-10-21 - * hour : 10 - * list : [{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}] - */ - - private double lon; - private double lat; - private String date; - private int hour; - private List list; - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public int getHour() { - return hour; - } - - public void setHour(int hour) { - this.hour = hour; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * date : 2021-10-21 - * ytx : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - * meteo : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - */ - - private String date; - private YtxBean ytx; - private MeteoBean meteo; - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public YtxBean getYtx() { - return ytx; - } - - public void setYtx(YtxBean ytx) { - this.ytx = ytx; - } - - public MeteoBean getMeteo() { - return meteo; - } - - public void setMeteo(MeteoBean meteo) { - this.meteo = meteo; - } - - public static class YtxBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - - public static class MeteoBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java new file mode 100644 index 0000000..3a2e068 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java @@ -0,0 +1,374 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风数据模型 + * + * @author a203 + */ +public class TyphoonDetailModel { + + /** + * code : 200 + * data : {"centerLat":20.65,"centerLng":128.1,"endTime":"2021-10-11 8:00:00","engName":"Kompasu","isActive":"1","land":[],"name":"圆规","points":[{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}],"startTime":"2021-10-8 2:00:00","typhoonId":"202118","warnLevel":"white"} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * centerLat : 20.65 + * centerLng : 128.1 + * endTime : 2021-10-11 8:00:00 + * engName : Kompasu + * isActive : 1 + * land : [] + * name : 圆规 + * points : [{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}] + * startTime : 2021-10-8 2:00:00 + * typhoonId : 202118 + * warnLevel : white + */ + + private double centerLat; + private double centerLng; + private String endTime; + private String engName; + private String isActive; + private String name; + private String startTime; + private String typhoonId; + private String warnLevel; + private List land; + private List points; + + public double getCenterLat() { + return centerLat; + } + + public void setCenterLat(double centerLat) { + this.centerLat = centerLat; + } + + public double getCenterLng() { + return centerLng; + } + + public void setCenterLng(double centerLng) { + this.centerLng = centerLng; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public String getIsActive() { + return isActive; + } + + public void setIsActive(String isActive) { + this.isActive = isActive; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getWarnLevel() { + return warnLevel; + } + + public void setWarnLevel(String warnLevel) { + this.warnLevel = warnLevel; + } + + public List getLand() { + return land; + } + + public void setLand(List land) { + this.land = land; + } + + public static class LandBean { + private String landAddress; + private String type; + private Double lng; + private Double lat; + private String info; + private String landTime; + + public String getLandAddress() { + return landAddress; + } + + public void setLandAddress(String landAddress) { + this.landAddress = landAddress; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Double getLng() { + return lng; + } + + public void setLng(Double lng) { + this.lng = lng; + } + + public Double getLat() { + return lat; + } + + public void setLat(Double lat) { + this.lat = lat; + } + + public String getInfo() { + return info; + } + + public void setInfo(String info) { + this.info = info; + } + + public String getLandTime() { + return landTime; + } + + public void setLandTime(String landTime) { + this.landTime = landTime; + } + } + + public List getPoints() { + return points; + } + + public void setPoints(List points) { + this.points = points; + } + + public static class PointsBean { + /** + * centerPosition : 距离菲律宾马尼拉东北方向约600公里 + * centerPressure : 990 + * lat : 18.7 + * lng : 124.7 + * moveDirection : 西北西 + * moveSpeed : 25 + * power : 9 + * radius10 : + * radius12 : + * radius7 : 160|140|200|180 + * routePrediction : “圆规”将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分) + * speed : 23 + * time : 2021-10-11 8:00:00 + * typhoonType : 热带风暴 + */ + + private String centerPosition; + private String centerPressure; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private int power; + private String radius10; + private String radius12; + private String radius7; + private String routePrediction; + private String speed; + private String time; + private String typhoonType; + + public String getCenterPosition() { + return centerPosition; + } + + public void setCenterPosition(String centerPosition) { + this.centerPosition = centerPosition; + } + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius12() { + return radius12; + } + + public void setRadius12(String radius12) { + this.radius12 = radius12; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getRoutePrediction() { + return routePrediction; + } + + public void setRoutePrediction(String routePrediction) { + this.routePrediction = routePrediction; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java deleted file mode 100644 index 5b70924..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java +++ /dev/null @@ -1,419 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonDetailRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 6155596a0de376ce34c7b594 - * showapi_res_body : {"ret_code":0,"obj":{"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"}} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * obj : {"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"} - */ - - private int ret_code; - private ObjBean obj; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public ObjBean getObj() { - return obj; - } - - public void setObj(ObjBean obj) { - this.obj = obj; - } - - public static class ObjBean { - /** - * endtime : 2021-9-30 8:00:00 - * centerlng : 139.300000 - * starttime : 2021-9-23 20:00:00 - * tfid : 202116 - * isactive : 1 - * centerlat : 25.200000 - * name : 蒲公英 - * land : [{"landaddress":"朱家尖镇","strong":"强台风","lng":"122.39","lat":"29.83","info":"\u201c灿鸿\u201d11日16时40分前后登陆浙江舟山市朱家尖镇","landtime":"2015/7/11 16:40:00"}] - * warnlevel : white - * points : [{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}] - * enname : Mindulle - */ - - private String endtime; - private String centerlng; - private String starttime; - private String tfid; - private String isactive; - private String centerlat; - private String name; - private String warnlevel; - private String enname; - private List land; - private List points; - - public String getEndtime() { - return endtime; - } - - public void setEndtime(String endtime) { - this.endtime = endtime; - } - - public String getCenterlng() { - return centerlng; - } - - public void setCenterlng(String centerlng) { - this.centerlng = centerlng; - } - - public String getStarttime() { - return starttime; - } - - public void setStarttime(String starttime) { - this.starttime = starttime; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getIsactive() { - return isactive; - } - - public void setIsactive(String isactive) { - this.isactive = isactive; - } - - public String getCenterlat() { - return centerlat; - } - - public void setCenterlat(String centerlat) { - this.centerlat = centerlat; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getWarnlevel() { - return warnlevel; - } - - public void setWarnlevel(String warnlevel) { - this.warnlevel = warnlevel; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - - public List getLand() { - return land; - } - - public void setLand(List land) { - this.land = land; - } - - public static class LandBan { - /** - * landaddress : 朱家尖镇 - * strong : 强台风 - * lng : 122.39 - * lat : 29.83 - * info : “灿鸿”11日16时40分前后登陆浙江舟山市朱家尖镇 - * landtime : 2015/7/11 16:40:00 - */ - - private String landaddress; - private String strong; - private Double lng; - private Double lat; - private String info; - private String landtime; - - public String getLandaddress() { - return landaddress; - } - - public void setLandaddress(String landaddress) { - this.landaddress = landaddress; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getInfo() { - return info; - } - - public void setInfo(String info) { - this.info = info; - } - - public String getLandtime() { - return landtime; - } - - public void setLandtime(String landtime) { - this.landtime = landtime; - } - } - - public List getPoints() { - return points; - } - - public void setPoints(List points) { - this.points = points; - } - - public static class PointsBean { - /** - * time : 2021-9-23 20:00:00 - * pressure : 998 - * radius10 : - * speed : 18 - * strong : 热带风暴 - * movespeed : 20 - * radius12 : - * power : 8 - * lng : 143.30 - * movedirection : 西北西 - * lat : 13.80 - * radius7 : 250|220|200|180 - * jl : “蒲公英”将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分) - * ckposition : 距离日本东京南偏西方向约1060公里 - */ - - private String time; - private String pressure; - private String radius10; - private String speed; - private String strong; - private String movespeed; - private String radius12; - private String power; - private Double lng; - private String movedirection; - private Double lat; - private String radius7; - private String jl; - private String ckposition; - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getRadius12() { - return radius12; - } - - public void setRadius12(String radius12) { - this.radius12 = radius12; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getJl() { - return jl; - } - - public void setJl(String jl) { - this.jl = jl; - } - - public String getCkposition() { - return ckposition; - } - - public void setCkposition(String ckposition) { - this.ckposition = ckposition; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java new file mode 100644 index 0000000..91bad37 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java @@ -0,0 +1,201 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风列表数据模型 + * + * @author a203 + */ +public class TyphoonListModel { + + /** + * code : 200 + * data : [{"centerPressure":"990","engName":"Kompasu","lat":18.7,"lng":125,"moveDirection":"西北西","moveSpeed":"23","name":"圆规","power":9,"radius10":"","radius7":"200","speed":"23","time":"2021-10-11 05:00:00","typhoonId":"202118","typhoonType":"热带风暴"}] + * message : 请求成功 + * success : true + */ + + private int code; + private String message; + private boolean success; + private List data; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public static class DataBean { + /** + * centerPressure : 990 + * engName : Kompasu + * lat : 18.7 + * lng : 125 + * moveDirection : 西北西 + * moveSpeed : 23 + * name : 圆规 + * power : 9 + * radius10 : + * radius7 : 200 + * speed : 23 + * time : 2021-10-11 05:00:00 + * typhoonId : 202118 + * typhoonType : 热带风暴 + */ + + private String centerPressure; + private String engName; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private String name; + private int power; + private String radius10; + private String radius7; + private String speed; + private String time; + private String typhoonId; + private String typhoonType; + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java deleted file mode 100644 index 38a9257..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java +++ /dev/null @@ -1,237 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 61554fbe0de376d03494057c - * showapi_res_body : {"ret_code":0,"list":[{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}]} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * list : [{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}] - */ - - private int ret_code; - private List list; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * pressure : 945 - * tfid : 202116 - * radius10 : 150 - * speed : 48 - * lng : 136.40 - * radius7 : 350 - * time : 2021-09-30 08:00:00 - * movespeed : 23 - * strong : 强台风 - * name : 蒲公英 - * power : 15 - * movedirection : 北北东 - * lat : 26.60 - * enname : Mindulle - */ - - private String pressure; - private String tfid; - private String radius10; - private String speed; - private String lng; - private String radius7; - private String time; - private String movespeed; - private String strong; - private String name; - private String power; - private String movedirection; - private String lat; - private String enname; - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getLng() { - return lng; - } - - public void setLng(String lng) { - this.lng = lng; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public String getLat() { - return lat; - } - - public void setLat(String lat) { - this.lat = lat; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java new file mode 100644 index 0000000..c488237 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风移动点数据信息 服务类 + * + * @author a203 + */ +public interface ILandPointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java new file mode 100644 index 0000000..ab05570 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风登陆点数据信息 服务类 + * + * @author a203 + */ +public interface IRoutePointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java deleted file mode 100644 index d16a48b..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonLandService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java deleted file mode 100644 index 80e2765..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonPointService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java index c47a0f3..53bb971 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java @@ -19,13 +19,6 @@ void saveTyphoonList(); /** - * 更新台风详情 - */ - void updateTyphoonDetail(); - - /***上面接口从第三方存库,下面接口查库**********************/ - - /** * 查询台风列表 * * @return {@link List} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java new file mode 100644 index 0000000..fed33c1 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.LandPointMapper; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.service.ILandPointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class LandPointServiceImpl extends ServiceImpl implements ILandPointService { + + public LandPointServiceImpl() { + + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java index f8cb771..58fce60 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java @@ -2,9 +2,12 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; +import com.casic.missiles.modular.system.dto.AddressConfigDTO; import com.casic.missiles.modular.system.dto.OceanDetailDTO; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; +import com.casic.missiles.modular.system.service.IAddressConfigService; import com.casic.missiles.modular.system.service.IOceanService; +import com.casic.missiles.modular.system.utils.Constant; import com.casic.missiles.modular.system.utils.HttpRequestHelper; import org.springframework.stereotype.Service; @@ -17,23 +20,32 @@ @Service public class OceanServiceImpl implements IOceanService { - private static final String SUCCESS_CODE = "0"; + private final IAddressConfigService configService; - public OceanServiceImpl() { - + public OceanServiceImpl(IAddressConfigService configService) { + this.configService = configService; } @Override public OceanDetailDTO oceanDetail(double lng, double lat, String date, String days, String hour) { - String oceanData = HttpRequestHelper.obtainOceanData(lng, lat, date, days, hour); + AddressConfigDTO addressConfig = configService.selectLastConfig(); + String envIp = addressConfig.getEnvIp(); + if (envIp.contains(Constant.HTTP_HEADER)) { + envIp = envIp.replace(Constant.HTTP_HEADER, ""); + } + String url = Constant.HTTP_HEADER + envIp + "/environment/ocean?" + + "lng=" + lng + "&lat=" + lat + + "&date=" + date + "&days=" + days + "&hour=" + hour; + + String oceanData = HttpRequestHelper.doGet(url); /** * 解析洋流数据返回给前端 * */ OceanDetailDTO oceanDetailDTO = null; - if (SUCCESS_CODE.equals(HttpRequestHelper.getOceanCode(oceanData))) { - OceanDetailRemoteData remoteData = JSON.parseObject(oceanData, new TypeReference() { + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(oceanData)) { + OceanDetailModel remoteData = JSON.parseObject(oceanData, new TypeReference() { }); - oceanDetailDTO = new OceanDetailDTO(remoteData); + oceanDetailDTO = new OceanDetailDTO(remoteData.getData()); } return oceanDetailDTO; } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java new file mode 100644 index 0000000..24b06cd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.RoutePointMapper; +import com.casic.missiles.modular.system.model.RoutePoint; +import com.casic.missiles.modular.system.service.IRoutePointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class RoutePointServiceImpl extends ServiceImpl implements IRoutePointService { + + public RoutePointServiceImpl() { + + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java deleted file mode 100644 index d1bf2c7..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.casic.missiles.modular.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.casic.missiles.modular.system.dao.TyphoonLandMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.service.ITyphoonLandService; -import org.springframework.stereotype.Service; - -/** - * 台风数据信息 服务实现类 - * - * @author a203 - */ - -@Service -public class TyphoonLandServiceImpl extends ServiceImpl implements ITyphoonLandService { - - public TyphoonLandServiceImpl() { - - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java deleted file mode 100644 index 36815fa..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.casic.missiles.modular.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.casic.missiles.modular.system.dao.TyphoonPointMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; -import com.casic.missiles.modular.system.service.ITyphoonPointService; -import org.springframework.stereotype.Service; - -/** - * 台风数据信息 服务实现类 - * - * @author a203 - */ - -@Service -public class TyphoonPointServiceImpl extends ServiceImpl implements ITyphoonPointService { - - public TyphoonPointServiceImpl() { - - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java index 861e2c1..1cbfb01 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java @@ -5,18 +5,16 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.casic.missiles.modular.system.dao.TyphoonMapper; +import com.casic.missiles.modular.system.dto.AddressConfigDTO; import com.casic.missiles.modular.system.dto.TyphoonDTO; import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; -import com.casic.missiles.modular.system.dto.remote.TyphoonDetailRemoteData; -import com.casic.missiles.modular.system.dto.remote.TyphoonRemoteData; +import com.casic.missiles.modular.system.dto.remote.TyphoonDetailModel; +import com.casic.missiles.modular.system.dto.remote.TyphoonListModel; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.Typhoon; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; -import com.casic.missiles.modular.system.service.ITyphoonDetailService; -import com.casic.missiles.modular.system.service.ITyphoonLandService; -import com.casic.missiles.modular.system.service.ITyphoonPointService; -import com.casic.missiles.modular.system.service.ITyphoonService; +import com.casic.missiles.modular.system.service.*; import com.casic.missiles.modular.system.utils.Constant; import com.casic.missiles.modular.system.utils.HttpRequestHelper; import org.springframework.stereotype.Service; @@ -33,17 +31,29 @@ @Service public class TyphoonServiceImpl extends ServiceImpl implements ITyphoonService { - private static final String SUCCESS_CODE = "0"; + private final IAddressConfigService configService; + private final ITyphoonDetailService detailService; + private final ILandPointService landPointService; + private final IRoutePointService routePointService; - private final ITyphoonDetailService typhoonDetailService; - private final ITyphoonLandService typhoonLandService; - private final ITyphoonPointService typhoonPointService; + public TyphoonServiceImpl(IAddressConfigService configService, + ITyphoonDetailService detailService, + ILandPointService landPointService, + IRoutePointService routePointService) { + this.configService = configService; + this.detailService = detailService; + this.landPointService = landPointService; + this.routePointService = routePointService; + } - public TyphoonServiceImpl(ITyphoonDetailService typhoonDetailService, - ITyphoonLandService typhoonLandService, ITyphoonPointService typhoonPointService) { - this.typhoonDetailService = typhoonDetailService; - this.typhoonLandService = typhoonLandService; - this.typhoonPointService = typhoonPointService; + private String obtainEnvAddress() { + //获取服务器配置的IP信息 + AddressConfigDTO addressConfig = configService.selectLastConfig(); + String envIp = addressConfig.getEnvIp(); + if (envIp.contains(Constant.HTTP_HEADER)) { + envIp = envIp.replace(Constant.HTTP_HEADER, ""); + } + return envIp; } /** @@ -51,107 +61,117 @@ */ @Override public void saveTyphoonList() { + String url = Constant.HTTP_HEADER + obtainEnvAddress() + "/environment/saveTyphoon?"; /** * 获取台风接口数据 * */ - String res = HttpRequestHelper.doGet(Constant.TYPHOON_LIST + System.currentTimeMillis()); - if (SUCCESS_CODE.equals(HttpRequestHelper.getTyphoonCode(res))) { - TyphoonRemoteData remoteData = JSON.parseObject(res, new TypeReference() { + String res = HttpRequestHelper.doGet(url); + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(res)) { + TyphoonListModel listModel = JSON.parseObject(res, new TypeReference() { }); - //先清空之前的台风表,再保存最新的台风 - remove(null); - List beans = remoteData.getShowapi_res_body().getList(); - for (TyphoonRemoteData.ShowapiResBodyBean.ListBean data : beans) { - //将获取到台风数据存到数据库 + for (TyphoonListModel.DataBean data : listModel.getData()) { Typhoon entity = new Typhoon(); - entity.setTyphoonId(data.getTfid()); + entity.setTyphoonId(data.getTyphoonId()); entity.setName(data.getName()); - entity.setEngName(data.getEnname()); - entity.setLng(Double.valueOf(data.getLng())); - entity.setLat(Double.valueOf(data.getLat())); - entity.setTyphoonType(data.getStrong()); - entity.setCenterPressure(data.getPressure()); + entity.setEngName(data.getEngName()); + entity.setLng(data.getLng()); + entity.setLat(data.getLat()); + entity.setTyphoonType(data.getTyphoonType()); + entity.setCenterPressure(data.getCenterPressure()); entity.setSpeed(data.getSpeed()); - entity.setPower(Integer.valueOf(data.getPower())); - entity.setMoveSpeed(data.getMovespeed()); - entity.setMoveDirection(data.getMovedirection()); + entity.setPower(data.getPower()); + entity.setMoveSpeed(data.getMoveSpeed()); + entity.setMoveDirection(data.getMoveDirection()); entity.setRadius7(data.getRadius7()); entity.setRadius10(data.getRadius10()); entity.setTime(data.getTime()); - save(entity); + entity.setIsActive("1"); + this.baseMapper.insert(entity); } } + updateTyphoonDetail(); } /** * 更新台风详情 */ - @Override - public void updateTyphoonDetail() { - for (Typhoon typhoon : list()) { + private void updateTyphoonDetail() { + //筛选出还未消散的台风并更新详情 + List typhoons = this.baseMapper.selectCurrentTyphoon(); + for (Typhoon typhoon : typhoons) { /** * 获取台风接口数据 * */ - String res = HttpRequestHelper.doGet( - Constant.TYPHOON_DETAIL.replace("ID", typhoon.getTyphoonId()) - + System.currentTimeMillis()); - if (SUCCESS_CODE.equals(HttpRequestHelper.getTyphoonCode(res))) { - TyphoonDetailRemoteData remoteData = JSON.parseObject(res, new TypeReference() { + String url = Constant.HTTP_HEADER + obtainEnvAddress() + "/environment/updateTyphoon?typhoonId=" + typhoon.getTyphoonId(); + String res = HttpRequestHelper.doGet(url); + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(res)) { + TyphoonDetailModel detailModel = JSON.parseObject(res, new TypeReference() { }); - TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean objBean = remoteData.getShowapi_res_body().getObj(); - //保存台风基本情况存到数据库 + TyphoonDetailModel.DataBean dataBean = detailModel.getData(); + String typhoonId = dataBean.getTyphoonId(); + /** + * 保存台风基本情况存到数据库 + * */ TyphoonDetail detail = new TyphoonDetail(); - detail.setTyphoonId(objBean.getTfid()); - detail.setName(objBean.getName()); - detail.setEngName(objBean.getEnname()); - detail.setWarnLevel(objBean.getWarnlevel()); - detail.setCenterLng(Double.parseDouble(objBean.getCenterlng())); - detail.setCenterLat(Double.parseDouble(objBean.getCenterlat())); - detail.setStartTime(objBean.getStarttime()); - detail.setEndTime(objBean.getEndtime()); - detail.setIsActive(objBean.getIsactive()); - typhoonDetailService.saveOrUpdate(detail, new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); + detail.setTyphoonId(typhoonId); + detail.setName(dataBean.getName()); + detail.setEngName(dataBean.getEngName()); + detail.setWarnLevel(dataBean.getWarnLevel()); + detail.setCenterLng(dataBean.getCenterLng()); + detail.setCenterLat(dataBean.getCenterLat()); + detail.setStartTime(dataBean.getStartTime()); + detail.setEndTime(dataBean.getEndTime()); + detail.setIsActive(dataBean.getIsActive()); + QueryWrapper queryWrapper = new QueryWrapper().eq("TYPHOON_ID", typhoonId); + detailService.saveOrUpdate(detail, queryWrapper); - //保存台风登陆情况存到数据库 - List land = objBean.getLand(); - typhoonLandService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); - for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.LandBan landBan : land) { - TyphoonLand typhoonLand = new TyphoonLand(); + /** + * 更新台风列表台风状态 + * */ + typhoon.setIsActive(dataBean.getIsActive()); + saveOrUpdate(typhoon, new QueryWrapper().eq("TYPHOON_ID", typhoonId)); - typhoonLand.setTyphoonId(objBean.getTfid()); - typhoonLand.setLandAddress(landBan.getLandaddress()); - typhoonLand.setLandTime(landBan.getLandtime()); - typhoonLand.setType(landBan.getStrong()); - typhoonLand.setLng(landBan.getLng()); - typhoonLand.setLat(landBan.getLat()); - typhoonLand.setInfo(landBan.getInfo()); + /** + * 保存台风登陆情况存到数据库 + * */ + List landBans = dataBean.getLand(); + for (TyphoonDetailModel.DataBean.LandBean bean : landBans) { + LandPoint landPoint = new LandPoint(); - typhoonLandService.save(typhoonLand); + landPoint.setTyphoonId(typhoonId); + landPoint.setLandAddress(bean.getLandAddress()); + landPoint.setLandTime(bean.getLandTime()); + landPoint.setType(bean.getType()); + landPoint.setLng(bean.getLng()); + landPoint.setLat(bean.getLat()); + landPoint.setInfo(bean.getInfo()); + landPointService.save(landPoint); } - //保存台风移动路径存到数据库 - List points = objBean.getPoints(); - typhoonPointService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); - for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.PointsBean point : points) { - TyphoonPoint typhoonPoint = new TyphoonPoint(); + /** + * 保存台风移动路径存到数据库 + * */ + List routePoints = dataBean.getPoints(); + routePointService.remove(new QueryWrapper().eq("TYPHOON_ID", typhoonId)); + for (TyphoonDetailModel.DataBean.PointsBean point : routePoints) { + RoutePoint routePoint = new RoutePoint(); - typhoonPoint.setTyphoonId(objBean.getTfid()); - typhoonPoint.setTime(point.getTime()); - typhoonPoint.setCenterPressure(point.getPressure()); - typhoonPoint.setSpeed(point.getSpeed()); - typhoonPoint.setTyphoonType(point.getStrong()); - typhoonPoint.setMoveSpeed(point.getMovespeed()); - typhoonPoint.setPower(Integer.parseInt(point.getPower())); - typhoonPoint.setMoveDirection(point.getMovedirection()); - typhoonPoint.setLng(point.getLng()); - typhoonPoint.setLat(point.getLat()); - typhoonPoint.setRadius12(point.getRadius12()); - typhoonPoint.setRadius10(point.getRadius10()); - typhoonPoint.setRadius7(point.getRadius7()); - typhoonPoint.setRoutePrediction(point.getJl()); - typhoonPoint.setCenterPosition(point.getCkposition()); - - typhoonPointService.save(typhoonPoint); + routePoint.setTyphoonId(typhoonId); + routePoint.setTime(point.getTime()); + routePoint.setCenterPressure(point.getCenterPressure()); + routePoint.setSpeed(point.getSpeed()); + routePoint.setTyphoonType(point.getTyphoonType()); + routePoint.setMoveSpeed(point.getMoveSpeed()); + routePoint.setPower(point.getPower()); + routePoint.setMoveDirection(point.getMoveDirection()); + routePoint.setLng(point.getLng()); + routePoint.setLat(point.getLat()); + routePoint.setRadius12(point.getRadius12()); + routePoint.setRadius10(point.getRadius10()); + routePoint.setRadius7(point.getRadius7()); + routePoint.setRoutePrediction(point.getRoutePrediction()); + routePoint.setCenterPosition(point.getCenterPosition()); + routePointService.save(routePoint); } } } @@ -160,7 +180,9 @@ @Override public List currentTyphoonList() { List typhoonList = new ArrayList<>(); - for (Typhoon typhoon : list()) { + //筛选出还未消散的台风并更新详情 + List typhoons = this.baseMapper.selectCurrentTyphoon(); + for (Typhoon typhoon : typhoons) { typhoonList.add(new TyphoonDTO(typhoon)); } return typhoonList; @@ -168,15 +190,18 @@ @Override public TyphoonDetailDTO typhoonDetail(String typhoonId) { - TyphoonDetail detail = typhoonDetailService.getOne( + TyphoonDetail typhoonDetail = detailService.getOne( new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - List landList = typhoonLandService.list( - new QueryWrapper().eq("TYPHOON_ID", typhoonId) + if (typhoonDetail == null) { + return null; + } + List landPoints = landPointService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - List pointList = typhoonPointService.list( - new QueryWrapper().eq("TYPHOON_ID", typhoonId) + List routePoints = routePointService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - return new TyphoonDetailDTO(detail, landList, pointList); + return new TyphoonDetailDTO(typhoonDetail, landPoints, routePoints); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java deleted file mode 100644 index 552a6e9..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.casic.missiles.modular.system.utils; - -/** - * @author a203 - */ -public class Constant { - /** - * 热带气旋/台风相关常量 - */ - private static final String BASE_URL = "https://route.showapi.com"; - private static final String API_APPID = "780330"; - private static final String API_SIGN_KEY = "f30ac28b65cc447da936448c57bc5d99"; - - public static final String TYPHOON_LIST = BASE_URL - + "/342-1?" - + "showapi_appid=" + API_APPID + "&" - + "showapi_sign=" + API_SIGN_KEY + "&" - + "showapi_timestamp="; - - public static final String TYPHOON_DETAIL = BASE_URL - + "/342-2?" - + "showapi_appid=" + API_APPID + "&" - + "showapi_sign=" + API_SIGN_KEY + "&" - + "tfid=ID" + "&" - + "showapi_timestamp="; - - /** - * 洋流相关常量 - */ - private static final String OCEAN_BASE_URL = "http://api.meteo.open.ninecosmos.cn"; - public static final String OCEAN_HEADER_NAME = "Authorization"; - public static final String OCEAN_APPID = "WXZH888888"; - public static final String OCEAN_APP_KEY = "xb#bD&xtho@b80scbDb"; - - public static final String OCEAN_TOKEN = OCEAN_BASE_URL + "/us/users/open/token"; - public static final String OCEAN_DETAIL = OCEAN_BASE_URL + "/mr/netcdf/meteo/ytx"; -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java deleted file mode 100644 index 1e0cd94..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java +++ /dev/null @@ -1,115 +0,0 @@ -package com.casic.missiles.modular.system.utils; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONException; -import com.alibaba.fastjson.JSONObject; -import lombok.NonNull; -import okhttp3.*; - -import java.io.IOException; -import java.util.Objects; -import java.util.concurrent.TimeUnit; - -/** - * 网络请求工具 - * - * @author a203 - */ -public class HttpRequestHelper { - - public static RequestBody createRequestBody(String value) { - return RequestBody.create(MediaType.parse("application/json; charset=utf-8"), value); - } - - public static String doPost(Request request) { - return streamResponse(request); - } - - public static String doGet(String url) { - return streamResponse(new Request.Builder() - .url(url) - .build()); - } - - private static String streamResponse(@NonNull Request request) { - OkHttpClient httpClient = new OkHttpClient.Builder() - .connectTimeout(10, TimeUnit.SECONDS) - .writeTimeout(10, TimeUnit.SECONDS) - .readTimeout(20, TimeUnit.SECONDS) - .build(); - Call call = httpClient.newCall(request); - try { - Response response = call.execute(); - return response.body() != null ? Objects.requireNonNull(response.body()).string() : ""; - } catch (IOException e) { - e.printStackTrace(); - } - return ""; - } - - public static String obtainOceanData(double lng, double lat, String date, String days, String hour) { - /** - * 获取洋流数据Token - * */ - JSONObject object = new JSONObject(); - try { - object.put("appId", Constant.OCEAN_APPID); - object.put("appKey", Constant.OCEAN_APP_KEY); - } catch (JSONException e) { - e.printStackTrace(); - } - Request tokenRequest = new Request.Builder() - .url(Constant.OCEAN_TOKEN) - .post(HttpRequestHelper.createRequestBody(object.toJSONString())) - .build(); - String tokenJson = HttpRequestHelper.doPost(tokenRequest); - if ("".equals(tokenJson)) { - return null; - } - /** - * 解析token - * */ - JSONObject tokenObject = JSON.parseObject(tokenJson); - JSONObject dataObject = tokenObject.getJSONObject("data"); - String token = dataObject.getString("token"); - /** - * 封装请求参数 - * */ - JSONObject jsonObject = new JSONObject(); - try { - jsonObject.put("lon", lng); - jsonObject.put("lat", lat); - jsonObject.put("date", date); - jsonObject.put("hour", days); - jsonObject.put("days", hour); - } catch (JSONException e) { - e.printStackTrace(); - } - /** - * 获取洋流数据 - * */ - Request request = new Request.Builder() - .addHeader(Constant.OCEAN_HEADER_NAME, token) - .url(Constant.OCEAN_DETAIL) - .post(HttpRequestHelper.createRequestBody(jsonObject.toJSONString())) - .build(); - return HttpRequestHelper.doPost(request); - } - - public static String getTyphoonCode(String value) { - if ("".equals(value)) { - return value; - } - JSONObject jsonObject = JSON.parseObject(value); - return jsonObject.getString("showapi_res_code"); - } - - public static String getOceanCode(String value) { - if ("".equals(value)) { - return value; - } - JSONObject jsonObject = JSON.parseObject(value); - Integer code = jsonObject.getInteger("code"); - return String.valueOf(code); - } -} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/LandPoint.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/LandPoint.java new file mode 100644 index 0000000..f6d61ba --- /dev/null +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/LandPoint.java @@ -0,0 +1,67 @@ +package com.casic.missiles.modular.system.model; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import lombok.Data; + +/** + * 台风登陆点数据库模型 + * + * @author a203 + */ +@Data +@TableName("tf_land_point") +public class LandPoint extends Model { + private static final long serialVersionUID = 1L; + + /** + * 台风数据库主键 + */ + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private Long id; + + /** + * 台风ID + */ + @TableField("TYPHOON_ID") + private String typhoonId; + + /** + * 台风登陆点 + */ + @TableField("LAND_ADDRESS") + private String landAddress; + + /** + * 台风登陆时间 + */ + @TableField("LAND_TIME") + private String landTime; + + /** + * 台风类型-热带风暴/强台风... + */ + @TableField("TYPE") + private String type; + + /** + * 经度 + */ + @TableField("LNG") + private Double lng; + + /** + * 纬度 + */ + @TableField("LAT") + private Double lat; + + /** + * 台风登陆细节 + */ + @TableField("INFO") + private String info; +} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/RoutePoint.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/RoutePoint.java new file mode 100644 index 0000000..81981db --- /dev/null +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/RoutePoint.java @@ -0,0 +1,115 @@ +package com.casic.missiles.modular.system.model; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import lombok.Data; + +/** + * 台风移动点数据库模型 + * + * @author a203 + */ +@Data +@TableName("tf_route_point") +public class RoutePoint extends Model { + private static final long serialVersionUID = 1L; + + /** + * 台风数据库主键 + */ + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private Long id; + + /** + * 台风ID + */ + @TableField("TYPHOON_ID") + private String typhoonId; + + /** + * 数据更新时间 + */ + @TableField("TIME") + private String time; + + /** + * 台风中心气压,单位【百帕】 + */ + @TableField("CENTER_PRESSURE") + private String centerPressure; + + /** + * 风速,单位【米/每秒】 + */ + @TableField("SPEED") + private String speed; + + /** + * 台风风力等级描述 + */ + @TableField("TYPHOON_TYPE") + private String typhoonType; + + /** + * 台风整体移动速度,单位【公里/小时】 + */ + @TableField("MOVE_SPEED") + private String moveSpeed; + + /** + * 风力,单位【级】 + */ + @TableField("POWER") + private Integer power; + + /** + * 台风未来移动方向 + */ + @TableField("MOVE_DIRECTION") + private String moveDirection; + + /** + * 经度 + */ + @TableField("LNG") + private Double lng; + + /** + * 纬度 + */ + @TableField("LAT") + private Double lat; + + /** + * 12级风力影响半径 + */ + @TableField("RADIUS_12") + private String radius12; + + /** + * 10级风力影响半径 + */ + @TableField("RADIUS_10") + private String radius10; + + /** + * 7级风力影响半径 + */ + @TableField("RADIUS_7") + private String radius7; + + /** + * 台风路线预测 + */ + @TableField("ROUTE_PREDICTION") + private String routePrediction; + + /** + * 中心位置 + */ + @TableField("CENTER_POSITION") + private String centerPosition; +} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/Typhoon.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/Typhoon.java index 658cb40..7146637 100644 --- a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/Typhoon.java +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/Typhoon.java @@ -13,17 +13,15 @@ * @author a203 */ @Data -@TableName("typhoon_list") +@TableName("tf_list") public class Typhoon extends Model { private static final long serialVersionUID = 1L; /** * 台风数据库主键 - *

- * type = IdType.AUTO 是数据库自增 */ - @TableId(value = "ID", type = IdType.AUTO) - private Integer id; + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private Long id; /** * 台风ID @@ -95,4 +93,9 @@ */ @TableField("TIME") private String time; -} + /** + * 台风是否已消散,1-未消散,0-已消散 + */ + @TableField("IS_ACTIVE") + private String isActive; +} \ No newline at end of file diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonDetail.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonDetail.java index ea3c29d..8b93cd0 100644 --- a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonDetail.java +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonDetail.java @@ -13,17 +13,15 @@ * @author a203 */ @Data -@TableName("typhoon_detail") +@TableName("tf_detail") public class TyphoonDetail extends Model { private static final long serialVersionUID = 1L; /** * 台风数据库主键 - *

- * type = IdType.AUTO 是数据库自增 */ - @TableId(value = "ID", type = IdType.AUTO) - private Integer id; + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private Long id; /** * 台风ID diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonLand.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonLand.java deleted file mode 100644 index ddc3d02..0000000 --- a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonLand.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.casic.missiles.modular.system.model; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.extension.activerecord.Model; -import lombok.Data; - -/** - * 台风登陆点数据库模型 - * - * @author a203 - */ -@Data -@TableName("typhoon_land") -public class TyphoonLand extends Model { - private static final long serialVersionUID = 1L; - - /** - * 台风数据库主键 - *

- * type = IdType.AUTO 是数据库自增 - */ - @TableId(value = "ID", type = IdType.AUTO) - private Integer id; - - /** - * 台风ID - */ - @TableField("TYPHOON_ID") - private String typhoonId; - - /** - * 台风登陆点 - */ - @TableField("LAND_ADDRESS") - private String landAddress; - - /** - * 台风登陆时间 - */ - @TableField("LAND_TIME") - private String landTime; - - /** - * 台风类型-热带风暴/强台风... - */ - @TableField("TYPE") - private String type; - - /** - * 经度 - */ - @TableField("LNG") - private Double lng; - - /** - * 纬度 - */ - @TableField("LAT") - private Double lat; - - /** - * 台风登陆细节 - */ - @TableField("INFO") - private String info; -} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonPoint.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonPoint.java deleted file mode 100644 index 70a9703..0000000 --- a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonPoint.java +++ /dev/null @@ -1,117 +0,0 @@ -package com.casic.missiles.modular.system.model; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.extension.activerecord.Model; -import lombok.Data; - -/** - * 台风移动点数据库模型 - * - * @author a203 - */ -@Data -@TableName("typhoon_point") -public class TyphoonPoint extends Model { - private static final long serialVersionUID = 1L; - - /** - * 台风数据库主键 - *

- * type = IdType.AUTO 是数据库自增 - */ - @TableId(value = "ID", type = IdType.AUTO) - private Integer id; - - /** - * 台风ID - */ - @TableField("TYPHOON_ID") - private String typhoonId; - - /** - * 数据更新时间 - */ - @TableField("TIME") - private String time; - - /** - * 台风中心气压,单位【百帕】 - */ - @TableField("CENTER_PRESSURE") - private String centerPressure; - - /** - * 风速,单位【米/每秒】 - */ - @TableField("SPEED") - private String speed; - - /** - * 台风风力等级描述 - */ - @TableField("TYPHOON_TYPE") - private String typhoonType; - - /** - * 台风整体移动速度,单位【公里/小时】 - */ - @TableField("MOVE_SPEED") - private String moveSpeed; - - /** - * 风力,单位【级】 - */ - @TableField("POWER") - private Integer power; - - /** - * 台风未来移动方向 - */ - @TableField("MOVE_DIRECTION") - private String moveDirection; - - /** - * 经度 - */ - @TableField("LNG") - private Double lng; - - /** - * 纬度 - */ - @TableField("LAT") - private Double lat; - - /** - * 12级风力影响半径 - */ - @TableField("RADIUS_12") - private String radius12; - - /** - * 10级风力影响半径 - */ - @TableField("RADIUS_10") - private String radius10; - - /** - * 7级风力影响半径 - */ - @TableField("RADIUS_7") - private String radius7; - - /** - * 台风路线预测 - */ - @TableField("ROUTE_PREDICTION") - private String routePrediction; - - /** - * 中心位置 - */ - @TableField("CENTER_POSITION") - private String centerPosition; -} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java index c999812..44c05dd 100644 --- a/casic-server-support/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java @@ -1,5 +1,7 @@ package com.casic.missiles.modular.system.utils; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; import lombok.NonNull; import okhttp3.*; @@ -14,6 +16,8 @@ */ public class HttpRequestHelper { + public static final int SUCCESS_CODE = 200; + public static RequestBody createRequestBody(String value) { return RequestBody.create(MediaType.parse("application/json; charset=utf-8"), value); } @@ -43,4 +47,9 @@ } return ""; } + + public static int getResponseCode(String value) { + JSONObject jsonObject = JSON.parseObject(value); + return jsonObject.getInteger("code"); + } } \ No newline at end of file diff --git a/casic-shelter/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-shelter/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..4f5cd4d 100644 --- a/casic-shelter/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-shelter/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,32 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel remoteData) { + OceanDetailModel.DataBean data = remoteData.getData(); + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-alarm/pom.xml b/casic-alarm/pom.xml index 7730c5f..5f30a71 100644 --- a/casic-alarm/pom.xml +++ b/casic-alarm/pom.xml @@ -56,6 +56,11 @@ fastjson ${fastjson.version} + + org.springframework.boot + spring-boot-starter-websocket + 2.4.5 + diff --git a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java index 041adcd..316d2cb 100644 --- a/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -7,7 +7,7 @@ /** * @author lwh * 台风数据定时任务,每小时执行一次 - * @ClassName TyphoonQuartzJob + * @Scheduled(cron = "0/10 * * * * ? ") * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling */ @Component @@ -21,6 +21,5 @@ @Scheduled(cron = "0 0 */1 * * ?") public void execute() { typhoonService.saveTyphoonList(); - typhoonService.updateTyphoonDetail(); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java new file mode 100644 index 0000000..11d7f9d --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/LandPointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface LandPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java new file mode 100644 index 0000000..3f63938 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/RoutePointMapper.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface RoutePointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java deleted file mode 100644 index c60bfab..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonLandMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java index 70ea807..98f1142 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.java @@ -3,6 +3,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.casic.missiles.modular.system.model.Typhoon; +import java.util.List; + /** * 台风数据信息 Mapper 接口 * @@ -10,4 +12,10 @@ */ public interface TyphoonMapper extends BaseMapper { -} + /** + * 查询当前未消散的台风 + * + * @return {@link List} + */ + List selectCurrentTyphoon(); +} \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java deleted file mode 100644 index 9745785..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 Mapper 接口 - * - * @author a203 - */ -public interface TyphoonPointMapper extends BaseMapper { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml new file mode 100644 index 0000000..7c31c77 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/mapping/TyphoonMapper.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..8396364 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,31 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel.DataBean data) { + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java index a34da1b..0c5225d 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -1,8 +1,8 @@ package com.casic.missiles.modular.system.dto; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; import lombok.Data; import java.util.ArrayList; @@ -142,7 +142,7 @@ private String centerPosition; } - public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + public TyphoonDetailDTO(TyphoonDetail detail, List landPoints, List routePoints) { this.typhoonId = detail.getTyphoonId(); this.name = detail.getName(); this.engName = detail.getEngName(); @@ -152,8 +152,9 @@ this.startTime = detail.getStartTime(); this.endTime = detail.getEndTime(); this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); - for (TyphoonLand landBean : landBeans) { + for (LandPoint landBean : landPoints) { LandBan bean = new LandBan(); bean.landAddress = landBean.getLandAddress(); bean.landTime = landBean.getLandTime(); @@ -164,8 +165,9 @@ lands.add(bean); } this.land = lands; + List points = new ArrayList<>(); - for (TyphoonPoint point : pointBeans) { + for (RoutePoint point : routePoints) { PointBean pointBean = new PointBean(); pointBean.time = point.getTime(); pointBean.centerPressure = point.getCenterPressure(); diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java new file mode 100644 index 0000000..b0b2e7a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailModel.java @@ -0,0 +1,265 @@ +package com.casic.missiles.modular.system.dto.remote; + +/** + * 洋流数据模型 + * + * @author a203 + */ +public class OceanDetailModel { + + /** + * code : 200 + * data : {"altitude":0,"forecast":{"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34},"oceanDir":135.22,"pressure":100925.19,"speed":7.97,"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"temperature":28.6,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34,"windDir":71.84,"windSpeed":7.97} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * altitude : 0 + * forecast : {"swellDir":13.9,"swellHeight":1.81,"swellPrd":9.34,"waveDir":13.96,"waveHeight":2.03,"wavePrd":9.34} + * oceanDir : 135.22 + * pressure : 100925.19 + * speed : 7.97 + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * temperature : 28.6 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + * windDir : 71.84 + * windSpeed : 7.97 + */ + + private double altitude; + private ForecastBean forecast; + private double oceanDir; + private double pressure; + private double speed; + private double swellDir; + private double swellHeight; + private double swellPrd; + private double temperature; + private double waveDir; + private double waveHeight; + private double wavePrd; + private double windDir; + private double windSpeed; + + public double getAltitude() { + return altitude; + } + + public void setAltitude(double altitude) { + this.altitude = altitude; + } + + public ForecastBean getForecast() { + return forecast; + } + + public void setForecast(ForecastBean forecast) { + this.forecast = forecast; + } + + public double getOceanDir() { + return oceanDir; + } + + public void setOceanDir(double oceanDir) { + this.oceanDir = oceanDir; + } + + public double getPressure() { + return pressure; + } + + public void setPressure(double pressure) { + this.pressure = pressure; + } + + public double getSpeed() { + return speed; + } + + public void setSpeed(double speed) { + this.speed = speed; + } + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getTemperature() { + return temperature; + } + + public void setTemperature(double temperature) { + this.temperature = temperature; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + + public double getWindDir() { + return windDir; + } + + public void setWindDir(double windDir) { + this.windDir = windDir; + } + + public double getWindSpeed() { + return windSpeed; + } + + public void setWindSpeed(double windSpeed) { + this.windSpeed = windSpeed; + } + + public static class ForecastBean { + /** + * swellDir : 13.9 + * swellHeight : 1.81 + * swellPrd : 9.34 + * waveDir : 13.96 + * waveHeight : 2.03 + * wavePrd : 9.34 + */ + + private double swellDir; + private double swellHeight; + private double swellPrd; + private double waveDir; + private double waveHeight; + private double wavePrd; + + public double getSwellDir() { + return swellDir; + } + + public void setSwellDir(double swellDir) { + this.swellDir = swellDir; + } + + public double getSwellHeight() { + return swellHeight; + } + + public void setSwellHeight(double swellHeight) { + this.swellHeight = swellHeight; + } + + public double getSwellPrd() { + return swellPrd; + } + + public void setSwellPrd(double swellPrd) { + this.swellPrd = swellPrd; + } + + public double getWaveDir() { + return waveDir; + } + + public void setWaveDir(double waveDir) { + this.waveDir = waveDir; + } + + public double getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(double waveHeight) { + this.waveHeight = waveHeight; + } + + public double getWavePrd() { + return wavePrd; + } + + public void setWavePrd(double wavePrd) { + this.wavePrd = wavePrd; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java deleted file mode 100644 index 5ad3a22..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/OceanDetailRemoteData.java +++ /dev/null @@ -1,439 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方洋流数据模型 - * - * @author a203 - */ -public class OceanDetailRemoteData { - - /** - * code : 0 - * data : {"lon":114.338597,"lat":18.273134,"date":"2021-10-21","hour":10,"list":[{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}]} - * message : success - * etime : 1634786517992 - */ - - private int code; - private DataBean data; - private String message; - private long etime; - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public DataBean getData() { - return data; - } - - public void setData(DataBean data) { - this.data = data; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public long getEtime() { - return etime; - } - - public void setEtime(long etime) { - this.etime = etime; - } - - public static class DataBean { - /** - * lon : 114.338597 - * lat : 18.273134 - * date : 2021-10-21 - * hour : 10 - * list : [{"date":"2021-10-21","ytx":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516},"meteo":{"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516}}] - */ - - private double lon; - private double lat; - private String date; - private int hour; - private List list; - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public int getHour() { - return hour; - } - - public void setHour(int hour) { - this.hour = hour; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * date : 2021-10-21 - * ytx : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - * meteo : {"currentMag":0.8194745182991028,"currentDir":311.85589599609375,"swellDir":54.90005874633789,"swellHgt":1.0300003290176392,"swellPrd":6.740001201629639,"waveDir":51.860050201416016,"waveHgt":1.0500003099441528,"wavePrd":6.740001201629639,"windMag":4.520016193389893,"windDir":84.48993682861328,"surfPres":101099.5625,"surface_Tem":301.4056800842285,"surfaceTem":28.255680084228516,"surfTem":28.255680084228516} - */ - - private String date; - private YtxBean ytx; - private MeteoBean meteo; - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public YtxBean getYtx() { - return ytx; - } - - public void setYtx(YtxBean ytx) { - this.ytx = ytx; - } - - public MeteoBean getMeteo() { - return meteo; - } - - public void setMeteo(MeteoBean meteo) { - this.meteo = meteo; - } - - public static class YtxBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - - public static class MeteoBean { - /** - * currentMag : 0.8194745182991028 - * currentDir : 311.85589599609375 - * swellDir : 54.90005874633789 - * swellHgt : 1.0300003290176392 - * swellPrd : 6.740001201629639 - * waveDir : 51.860050201416016 - * waveHgt : 1.0500003099441528 - * wavePrd : 6.740001201629639 - * windMag : 4.520016193389893 - * windDir : 84.48993682861328 - * surfPres : 101099.5625 - * surface_Tem : 301.4056800842285 - * surfaceTem : 28.255680084228516 - * surfTem : 28.255680084228516 - */ - - private double currentMag; - private double currentDir; - private double swellDir; - private double swellHgt; - private double swellPrd; - private double waveDir; - private double waveHgt; - private double wavePrd; - private double windMag; - private double windDir; - private double surfPres; - private double surface_Tem; - private double surfaceTem; - private double surfTem; - - public double getCurrentMag() { - return currentMag; - } - - public void setCurrentMag(double currentMag) { - this.currentMag = currentMag; - } - - public double getCurrentDir() { - return currentDir; - } - - public void setCurrentDir(double currentDir) { - this.currentDir = currentDir; - } - - public double getSwellDir() { - return swellDir; - } - - public void setSwellDir(double swellDir) { - this.swellDir = swellDir; - } - - public double getSwellHgt() { - return swellHgt; - } - - public void setSwellHgt(double swellHgt) { - this.swellHgt = swellHgt; - } - - public double getSwellPrd() { - return swellPrd; - } - - public void setSwellPrd(double swellPrd) { - this.swellPrd = swellPrd; - } - - public double getWaveDir() { - return waveDir; - } - - public void setWaveDir(double waveDir) { - this.waveDir = waveDir; - } - - public double getWaveHgt() { - return waveHgt; - } - - public void setWaveHgt(double waveHgt) { - this.waveHgt = waveHgt; - } - - public double getWavePrd() { - return wavePrd; - } - - public void setWavePrd(double wavePrd) { - this.wavePrd = wavePrd; - } - - public double getWindMag() { - return windMag; - } - - public void setWindMag(double windMag) { - this.windMag = windMag; - } - - public double getWindDir() { - return windDir; - } - - public void setWindDir(double windDir) { - this.windDir = windDir; - } - - public double getSurfPres() { - return surfPres; - } - - public void setSurfPres(double surfPres) { - this.surfPres = surfPres; - } - - public double getSurface_Tem() { - return surface_Tem; - } - - public void setSurface_Tem(double surface_Tem) { - this.surface_Tem = surface_Tem; - } - - public double getSurfaceTem() { - return surfaceTem; - } - - public void setSurfaceTem(double surfaceTem) { - this.surfaceTem = surfaceTem; - } - - public double getSurfTem() { - return surfTem; - } - - public void setSurfTem(double surfTem) { - this.surfTem = surfTem; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java new file mode 100644 index 0000000..3a2e068 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailModel.java @@ -0,0 +1,374 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风数据模型 + * + * @author a203 + */ +public class TyphoonDetailModel { + + /** + * code : 200 + * data : {"centerLat":20.65,"centerLng":128.1,"endTime":"2021-10-11 8:00:00","engName":"Kompasu","isActive":"1","land":[],"name":"圆规","points":[{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}],"startTime":"2021-10-8 2:00:00","typhoonId":"202118","warnLevel":"white"} + * message : 请求成功 + * success : true + */ + + private int code; + private DataBean data; + private String message; + private boolean success; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public DataBean getData() { + return data; + } + + public void setData(DataBean data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static class DataBean { + /** + * centerLat : 20.65 + * centerLng : 128.1 + * endTime : 2021-10-11 8:00:00 + * engName : Kompasu + * isActive : 1 + * land : [] + * name : 圆规 + * points : [{"centerPosition":" 距离菲律宾马尼拉东北方向约600公里","centerPressure":"990","lat":18.7,"lng":124.7,"moveDirection":"西北西","moveSpeed":"25","power":9,"radius10":"","radius12":"","radius7":"160|140|200|180","routePrediction":" \u201c圆规\u201d将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分)","speed":"23","time":"2021-10-11 8:00:00","typhoonType":"热带风暴"}] + * startTime : 2021-10-8 2:00:00 + * typhoonId : 202118 + * warnLevel : white + */ + + private double centerLat; + private double centerLng; + private String endTime; + private String engName; + private String isActive; + private String name; + private String startTime; + private String typhoonId; + private String warnLevel; + private List land; + private List points; + + public double getCenterLat() { + return centerLat; + } + + public void setCenterLat(double centerLat) { + this.centerLat = centerLat; + } + + public double getCenterLng() { + return centerLng; + } + + public void setCenterLng(double centerLng) { + this.centerLng = centerLng; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public String getIsActive() { + return isActive; + } + + public void setIsActive(String isActive) { + this.isActive = isActive; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getWarnLevel() { + return warnLevel; + } + + public void setWarnLevel(String warnLevel) { + this.warnLevel = warnLevel; + } + + public List getLand() { + return land; + } + + public void setLand(List land) { + this.land = land; + } + + public static class LandBean { + private String landAddress; + private String type; + private Double lng; + private Double lat; + private String info; + private String landTime; + + public String getLandAddress() { + return landAddress; + } + + public void setLandAddress(String landAddress) { + this.landAddress = landAddress; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Double getLng() { + return lng; + } + + public void setLng(Double lng) { + this.lng = lng; + } + + public Double getLat() { + return lat; + } + + public void setLat(Double lat) { + this.lat = lat; + } + + public String getInfo() { + return info; + } + + public void setInfo(String info) { + this.info = info; + } + + public String getLandTime() { + return landTime; + } + + public void setLandTime(String landTime) { + this.landTime = landTime; + } + } + + public List getPoints() { + return points; + } + + public void setPoints(List points) { + this.points = points; + } + + public static class PointsBean { + /** + * centerPosition : 距离菲律宾马尼拉东北方向约600公里 + * centerPressure : 990 + * lat : 18.7 + * lng : 124.7 + * moveDirection : 西北西 + * moveSpeed : 25 + * power : 9 + * radius10 : + * radius12 : + * radius7 : 160|140|200|180 + * routePrediction : “圆规”将以每小时25公里左右的速度向西偏北方向移动,强度缓慢增强。 (下次更新时间为11日11时30分) + * speed : 23 + * time : 2021-10-11 8:00:00 + * typhoonType : 热带风暴 + */ + + private String centerPosition; + private String centerPressure; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private int power; + private String radius10; + private String radius12; + private String radius7; + private String routePrediction; + private String speed; + private String time; + private String typhoonType; + + public String getCenterPosition() { + return centerPosition; + } + + public void setCenterPosition(String centerPosition) { + this.centerPosition = centerPosition; + } + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius12() { + return radius12; + } + + public void setRadius12(String radius12) { + this.radius12 = radius12; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getRoutePrediction() { + return routePrediction; + } + + public void setRoutePrediction(String routePrediction) { + this.routePrediction = routePrediction; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java deleted file mode 100644 index 5b70924..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java +++ /dev/null @@ -1,419 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonDetailRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 6155596a0de376ce34c7b594 - * showapi_res_body : {"ret_code":0,"obj":{"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"}} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * obj : {"endtime":"2021-9-30 8:00:00","centerlng":"139.300000","starttime":"2021-9-23 20:00:00","tfid":"202116","isactive":"1","centerlat":"25.200000","name":"蒲公英","land":[],"warnlevel":"white","points":[{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}],"enname":"Mindulle"} - */ - - private int ret_code; - private ObjBean obj; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public ObjBean getObj() { - return obj; - } - - public void setObj(ObjBean obj) { - this.obj = obj; - } - - public static class ObjBean { - /** - * endtime : 2021-9-30 8:00:00 - * centerlng : 139.300000 - * starttime : 2021-9-23 20:00:00 - * tfid : 202116 - * isactive : 1 - * centerlat : 25.200000 - * name : 蒲公英 - * land : [{"landaddress":"朱家尖镇","strong":"强台风","lng":"122.39","lat":"29.83","info":"\u201c灿鸿\u201d11日16时40分前后登陆浙江舟山市朱家尖镇","landtime":"2015/7/11 16:40:00"}] - * warnlevel : white - * points : [{"time":"2021-9-23 20:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"20","radius12":"","power":"8","lng":"143.30","movedirection":"西北西","lat":"13.80","radius7":"250|220|200|180"},{"time":"2021-9-24 2:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"24","radius12":"","power":"8","lng":"142.10","movedirection":"西北西","lat":"14.10","radius7":"250|220|200|180"},{"time":"2021-9-24 5:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"18","radius12":"","power":"8","lng":"141.50","movedirection":"北西","lat":"14.50","radius7":"250|220|200|180"},{"time":"2021-9-24 8:00:00","pressure":"998","radius10":"","speed":"18","strong":"热带风暴","movespeed":"15","radius12":"","power":"8","lng":"141.10","movedirection":"西北西","lat":"14.60","radius7":"250|220|200|180"},{"time":"2021-9-24 14:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"20","radius12":"","power":"9","lng":"140.40","movedirection":"北西","lat":"15.10","radius7":"300|250|220|200"},{"time":"2021-9-24 17:00:00","pressure":"990","radius10":"","speed":"23","strong":"热带风暴","movespeed":"15","radius12":"","power":"9","lng":"140.00","movedirection":"北西","lat":"15.40","radius7":"300|250|220|200"},{"time":"2021-9-24 20:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"16","radius12":"","power":"10","lng":"139.60","movedirection":"北西","lat":"15.70","radius7":"320|320|260|260"},{"time":"2021-9-25 2:00:00","pressure":"982","radius10":"100|100|120|120","speed":"28","strong":"强热带风暴","movespeed":"15","radius12":"","power":"10","lng":"138.90","movedirection":"北西","lat":"16.50","radius7":"320|320|260|260"},{"time":"2021-9-25 5:00:00","pressure":"980","radius10":"100|100|120|120","speed":"30","strong":"强热带风暴","movespeed":"12","radius12":"","power":"11","lng":"138.20","movedirection":"北北西","lat":"17.00","radius7":"320|320|260|260"},{"time":"2021-9-25 8:00:00","pressure":"975","radius10":"100|100|120|120","speed":"33","strong":"台风","movespeed":"11","radius12":"","power":"12","lng":"138.10","movedirection":"北北西","lat":"17.10","radius7":"320|320|260|260"},{"time":"2021-9-25 14:00:00","pressure":"955","radius10":"180|160|180|200","speed":"42","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.60","radius7":"320|300|320|350"},{"time":"2021-9-25 17:00:00","pressure":"950","radius10":"180|160|180|200","speed":"45","strong":"强台风","movespeed":"10","radius12":"100|80|100|120","power":"14","lng":"137.70","movedirection":"北北西","lat":"17.80","radius7":"320|300|320|350"},{"time":"2021-9-25 20:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.60","movedirection":"北北西","lat":"18.10","radius7":"320|300|320|350"},{"time":"2021-9-26 2:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.50","radius7":"320|300|320|350"},{"time":"2021-9-26 5:00:00","pressure":"940","radius10":"180|180|180|200","speed":"50","strong":"强台风","movespeed":"10","radius12":"100|100|100|120","power":"15","lng":"137.00","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 8:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.80","movedirection":"北北西","lat":"18.70","radius7":"320|300|320|350"},{"time":"2021-9-26 14:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"5","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北","lat":"18.80","radius7":"320|300|320|350"},{"time":"2021-9-26 17:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"3","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"18.90","radius7":"320|300|320|350"},{"time":"2021-9-26 20:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"4","radius12":"100|100|100|120","power":"17","lng":"136.70","movedirection":"北北西","lat":"19.00","radius7":"320|300|320|350"},{"time":"2021-9-27 2:00:00","pressure":"920","radius10":"180|180|180|200","speed":"60","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"17","lng":"136.80","movedirection":"北西","lat":"19.30","radius7":"320|300|320|350"},{"time":"2021-9-27 5:00:00","pressure":"930","radius10":"180|180|180|200","speed":"55","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 8:00:00","pressure":"935","radius10":"180|180|180|200","speed":"52","strong":"超强台风","movespeed":"6","radius12":"100|100|100|120","power":"16","lng":"136.70","movedirection":"北北西","lat":"19.60","radius7":"320|300|320|350"},{"time":"2021-9-27 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"7","radius12":"80|70|70|70","power":"16","lng":"136.60","movedirection":"北西","lat":"19.90","radius7":"320|300|320|350"},{"time":"2021-9-27 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.50","movedirection":"北西","lat":"20.00","radius7":"350|300|320|350"},{"time":"2021-9-27 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"8","radius12":"80|70|70|70","power":"16","lng":"136.40","movedirection":"北西","lat":"20.20","radius7":"350|300|320|350"},{"time":"2021-9-28 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"11","radius12":"80|70|70|70","power":"16","lng":"136.30","movedirection":"北西","lat":"20.40","radius7":"350|300|320|350"},{"time":"2021-9-28 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"12","radius12":"80|70|70|70","power":"16","lng":"136.20","movedirection":"北北西","lat":"20.60","radius7":"350|300|320|350"},{"time":"2021-9-28 8:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"136.20","movedirection":"北北西","lat":"20.90","radius7":"350|300|320|350"},{"time":"2021-9-28 14:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"12","radius12":"80|70|70|70","power":"15","lng":"135.80","movedirection":"北北西","lat":"21.50","radius7":"350|300|320|350"},{"time":"2021-9-28 17:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.70","movedirection":"北北西","lat":"21.70","radius7":"350|300|320|350"},{"time":"2021-9-28 20:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"13","radius12":"80|70|70|70","power":"15","lng":"135.40","movedirection":"北北西","lat":"22.00","radius7":"350|300|320|350"},{"time":"2021-9-29 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"14","radius12":"80|70|70|70","power":"16","lng":"135.60","movedirection":"北","lat":"22.70","radius7":"350|300|320|350"},{"time":"2021-9-29 5:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北","lat":"22.80","radius7":"350|300|320|350"},{"time":"2021-9-29 8:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"15","radius12":"80|70|70|70","power":"16","lng":"135.30","movedirection":"北","lat":"23.40","radius7":"350|300|320|350"},{"time":"2021-9-29 14:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"17","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.20","radius7":"350|300|320|350"},{"time":"2021-9-29 17:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.40","movedirection":"北北东","lat":"24.50","radius7":"350|300|320|350"},{"time":"2021-9-29 20:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"20","radius12":"80|70|70|70","power":"16","lng":"135.50","movedirection":"北北东","lat":"24.80","radius7":"350|300|320|350"},{"time":"2021-9-30 2:00:00","pressure":"935","radius10":"150|120|120|120","speed":"52","strong":"超强台风","movespeed":"22","radius12":"80|70|70|70","power":"16","lng":"135.80","movedirection":"北北东","lat":"25.80","radius7":"350|300|320|350"},{"time":"2021-9-30 5:00:00","pressure":"940","radius10":"150|120|120|120","speed":"50","strong":"强台风","movespeed":"18","radius12":"80|70|70|70","power":"15","lng":"136.10","movedirection":"北北东","lat":"26.20","radius7":"350|300|320|350"},{"pressure":"945","radius10":"150|120|120|120","speed":"48","radius12":"80|70|70|70","lng":"136.40","jl":" \u201c蒲公英\u201d将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分)","radius7":"350|300|320|350","time":"2021-9-30 8:00:00","strong":"强台风","movespeed":"23","power":"15","movedirection":"北北东","ckposition":" 距离日本东京南偏西方向约1060公里","lat":"26.60"}] - * enname : Mindulle - */ - - private String endtime; - private String centerlng; - private String starttime; - private String tfid; - private String isactive; - private String centerlat; - private String name; - private String warnlevel; - private String enname; - private List land; - private List points; - - public String getEndtime() { - return endtime; - } - - public void setEndtime(String endtime) { - this.endtime = endtime; - } - - public String getCenterlng() { - return centerlng; - } - - public void setCenterlng(String centerlng) { - this.centerlng = centerlng; - } - - public String getStarttime() { - return starttime; - } - - public void setStarttime(String starttime) { - this.starttime = starttime; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getIsactive() { - return isactive; - } - - public void setIsactive(String isactive) { - this.isactive = isactive; - } - - public String getCenterlat() { - return centerlat; - } - - public void setCenterlat(String centerlat) { - this.centerlat = centerlat; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getWarnlevel() { - return warnlevel; - } - - public void setWarnlevel(String warnlevel) { - this.warnlevel = warnlevel; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - - public List getLand() { - return land; - } - - public void setLand(List land) { - this.land = land; - } - - public static class LandBan { - /** - * landaddress : 朱家尖镇 - * strong : 强台风 - * lng : 122.39 - * lat : 29.83 - * info : “灿鸿”11日16时40分前后登陆浙江舟山市朱家尖镇 - * landtime : 2015/7/11 16:40:00 - */ - - private String landaddress; - private String strong; - private Double lng; - private Double lat; - private String info; - private String landtime; - - public String getLandaddress() { - return landaddress; - } - - public void setLandaddress(String landaddress) { - this.landaddress = landaddress; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getInfo() { - return info; - } - - public void setInfo(String info) { - this.info = info; - } - - public String getLandtime() { - return landtime; - } - - public void setLandtime(String landtime) { - this.landtime = landtime; - } - } - - public List getPoints() { - return points; - } - - public void setPoints(List points) { - this.points = points; - } - - public static class PointsBean { - /** - * time : 2021-9-23 20:00:00 - * pressure : 998 - * radius10 : - * speed : 18 - * strong : 热带风暴 - * movespeed : 20 - * radius12 : - * power : 8 - * lng : 143.30 - * movedirection : 西北西 - * lat : 13.80 - * radius7 : 250|220|200|180 - * jl : “蒲公英”将以每小时23公里左右的速度向北偏东方向移动,强度变化不大。 (下次更新时间为30日14时30分) - * ckposition : 距离日本东京南偏西方向约1060公里 - */ - - private String time; - private String pressure; - private String radius10; - private String speed; - private String strong; - private String movespeed; - private String radius12; - private String power; - private Double lng; - private String movedirection; - private Double lat; - private String radius7; - private String jl; - private String ckposition; - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getRadius12() { - return radius12; - } - - public void setRadius12(String radius12) { - this.radius12 = radius12; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getJl() { - return jl; - } - - public void setJl(String jl) { - this.jl = jl; - } - - public String getCkposition() { - return ckposition; - } - - public void setCkposition(String ckposition) { - this.ckposition = ckposition; - } - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java new file mode 100644 index 0000000..91bad37 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonListModel.java @@ -0,0 +1,201 @@ +package com.casic.missiles.modular.system.dto.remote; + +import java.util.List; + +/** + * 台风列表数据模型 + * + * @author a203 + */ +public class TyphoonListModel { + + /** + * code : 200 + * data : [{"centerPressure":"990","engName":"Kompasu","lat":18.7,"lng":125,"moveDirection":"西北西","moveSpeed":"23","name":"圆规","power":9,"radius10":"","radius7":"200","speed":"23","time":"2021-10-11 05:00:00","typhoonId":"202118","typhoonType":"热带风暴"}] + * message : 请求成功 + * success : true + */ + + private int code; + private String message; + private boolean success; + private List data; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public boolean isSuccess() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public static class DataBean { + /** + * centerPressure : 990 + * engName : Kompasu + * lat : 18.7 + * lng : 125 + * moveDirection : 西北西 + * moveSpeed : 23 + * name : 圆规 + * power : 9 + * radius10 : + * radius7 : 200 + * speed : 23 + * time : 2021-10-11 05:00:00 + * typhoonId : 202118 + * typhoonType : 热带风暴 + */ + + private String centerPressure; + private String engName; + private double lat; + private double lng; + private String moveDirection; + private String moveSpeed; + private String name; + private int power; + private String radius10; + private String radius7; + private String speed; + private String time; + private String typhoonId; + private String typhoonType; + + public String getCenterPressure() { + return centerPressure; + } + + public void setCenterPressure(String centerPressure) { + this.centerPressure = centerPressure; + } + + public String getEngName() { + return engName; + } + + public void setEngName(String engName) { + this.engName = engName; + } + + public double getLat() { + return lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public double getLng() { + return lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public String getMoveDirection() { + return moveDirection; + } + + public void setMoveDirection(String moveDirection) { + this.moveDirection = moveDirection; + } + + public String getMoveSpeed() { + return moveSpeed; + } + + public void setMoveSpeed(String moveSpeed) { + this.moveSpeed = moveSpeed; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getPower() { + return power; + } + + public void setPower(int power) { + this.power = power; + } + + public String getRadius10() { + return radius10; + } + + public void setRadius10(String radius10) { + this.radius10 = radius10; + } + + public String getRadius7() { + return radius7; + } + + public void setRadius7(String radius7) { + this.radius7 = radius7; + } + + public String getSpeed() { + return speed; + } + + public void setSpeed(String speed) { + this.speed = speed; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getTyphoonId() { + return typhoonId; + } + + public void setTyphoonId(String typhoonId) { + this.typhoonId = typhoonId; + } + + public String getTyphoonType() { + return typhoonType; + } + + public void setTyphoonType(String typhoonType) { + this.typhoonType = typhoonType; + } + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java deleted file mode 100644 index 38a9257..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java +++ /dev/null @@ -1,237 +0,0 @@ -package com.casic.missiles.modular.system.dto.remote; - -import java.util.List; - -/** - * 第三方台风数据模型 - * - * @author a203 - */ -public class TyphoonRemoteData { - - /** - * showapi_res_error : - * showapi_fee_num : 1 - * showapi_res_code : 0 - * showapi_res_id : 61554fbe0de376d03494057c - * showapi_res_body : {"ret_code":0,"list":[{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}]} - */ - - private String showapi_res_error; - private int showapi_fee_num; - private int showapi_res_code; - private String showapi_res_id; - private ShowapiResBodyBean showapi_res_body; - - public String getShowapi_res_error() { - return showapi_res_error; - } - - public void setShowapi_res_error(String showapi_res_error) { - this.showapi_res_error = showapi_res_error; - } - - public int getShowapi_fee_num() { - return showapi_fee_num; - } - - public void setShowapi_fee_num(int showapi_fee_num) { - this.showapi_fee_num = showapi_fee_num; - } - - public int getShowapi_res_code() { - return showapi_res_code; - } - - public void setShowapi_res_code(int showapi_res_code) { - this.showapi_res_code = showapi_res_code; - } - - public String getShowapi_res_id() { - return showapi_res_id; - } - - public void setShowapi_res_id(String showapi_res_id) { - this.showapi_res_id = showapi_res_id; - } - - public ShowapiResBodyBean getShowapi_res_body() { - return showapi_res_body; - } - - public void setShowapi_res_body(ShowapiResBodyBean showapi_res_body) { - this.showapi_res_body = showapi_res_body; - } - - public static class ShowapiResBodyBean { - /** - * ret_code : 0 - * list : [{"pressure":"945","tfid":"202116","radius10":"150","speed":"48","lng":"136.40","radius7":"350","time":"2021-09-30 08:00:00","movespeed":"23","strong":"强台风","name":"蒲公英","power":"15","movedirection":"北北东","lat":"26.60","enname":"Mindulle"}] - */ - - private int ret_code; - private List list; - - public int getRet_code() { - return ret_code; - } - - public void setRet_code(int ret_code) { - this.ret_code = ret_code; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public static class ListBean { - /** - * pressure : 945 - * tfid : 202116 - * radius10 : 150 - * speed : 48 - * lng : 136.40 - * radius7 : 350 - * time : 2021-09-30 08:00:00 - * movespeed : 23 - * strong : 强台风 - * name : 蒲公英 - * power : 15 - * movedirection : 北北东 - * lat : 26.60 - * enname : Mindulle - */ - - private String pressure; - private String tfid; - private String radius10; - private String speed; - private String lng; - private String radius7; - private String time; - private String movespeed; - private String strong; - private String name; - private String power; - private String movedirection; - private String lat; - private String enname; - - public String getPressure() { - return pressure; - } - - public void setPressure(String pressure) { - this.pressure = pressure; - } - - public String getTfid() { - return tfid; - } - - public void setTfid(String tfid) { - this.tfid = tfid; - } - - public String getRadius10() { - return radius10; - } - - public void setRadius10(String radius10) { - this.radius10 = radius10; - } - - public String getSpeed() { - return speed; - } - - public void setSpeed(String speed) { - this.speed = speed; - } - - public String getLng() { - return lng; - } - - public void setLng(String lng) { - this.lng = lng; - } - - public String getRadius7() { - return radius7; - } - - public void setRadius7(String radius7) { - this.radius7 = radius7; - } - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getMovespeed() { - return movespeed; - } - - public void setMovespeed(String movespeed) { - this.movespeed = movespeed; - } - - public String getStrong() { - return strong; - } - - public void setStrong(String strong) { - this.strong = strong; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPower() { - return power; - } - - public void setPower(String power) { - this.power = power; - } - - public String getMovedirection() { - return movedirection; - } - - public void setMovedirection(String movedirection) { - this.movedirection = movedirection; - } - - public String getLat() { - return lat; - } - - public void setLat(String lat) { - this.lat = lat; - } - - public String getEnname() { - return enname; - } - - public void setEnname(String enname) { - this.enname = enname; - } - } - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java new file mode 100644 index 0000000..c488237 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ILandPointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.LandPoint; + +/** + * 台风移动点数据信息 服务类 + * + * @author a203 + */ +public interface ILandPointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java new file mode 100644 index 0000000..ab05570 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/IRoutePointService.java @@ -0,0 +1,13 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.model.RoutePoint; + +/** + * 台风登陆点数据信息 服务类 + * + * @author a203 + */ +public interface IRoutePointService extends IService { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java deleted file mode 100644 index d16a48b..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonLand; - -/** - * 台风登陆点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonLandService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java deleted file mode 100644 index 80e2765..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.casic.missiles.modular.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.casic.missiles.modular.system.model.TyphoonPoint; - -/** - * 台风移动点数据信息 服务类 - * - * @author a203 - */ -public interface ITyphoonPointService extends IService { - -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java index c47a0f3..53bb971 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java @@ -19,13 +19,6 @@ void saveTyphoonList(); /** - * 更新台风详情 - */ - void updateTyphoonDetail(); - - /***上面接口从第三方存库,下面接口查库**********************/ - - /** * 查询台风列表 * * @return {@link List} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java new file mode 100644 index 0000000..fed33c1 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/LandPointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.LandPointMapper; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.service.ILandPointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class LandPointServiceImpl extends ServiceImpl implements ILandPointService { + + public LandPointServiceImpl() { + + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java index f8cb771..58fce60 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/OceanServiceImpl.java @@ -2,9 +2,12 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; +import com.casic.missiles.modular.system.dto.AddressConfigDTO; import com.casic.missiles.modular.system.dto.OceanDetailDTO; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; +import com.casic.missiles.modular.system.service.IAddressConfigService; import com.casic.missiles.modular.system.service.IOceanService; +import com.casic.missiles.modular.system.utils.Constant; import com.casic.missiles.modular.system.utils.HttpRequestHelper; import org.springframework.stereotype.Service; @@ -17,23 +20,32 @@ @Service public class OceanServiceImpl implements IOceanService { - private static final String SUCCESS_CODE = "0"; + private final IAddressConfigService configService; - public OceanServiceImpl() { - + public OceanServiceImpl(IAddressConfigService configService) { + this.configService = configService; } @Override public OceanDetailDTO oceanDetail(double lng, double lat, String date, String days, String hour) { - String oceanData = HttpRequestHelper.obtainOceanData(lng, lat, date, days, hour); + AddressConfigDTO addressConfig = configService.selectLastConfig(); + String envIp = addressConfig.getEnvIp(); + if (envIp.contains(Constant.HTTP_HEADER)) { + envIp = envIp.replace(Constant.HTTP_HEADER, ""); + } + String url = Constant.HTTP_HEADER + envIp + "/environment/ocean?" + + "lng=" + lng + "&lat=" + lat + + "&date=" + date + "&days=" + days + "&hour=" + hour; + + String oceanData = HttpRequestHelper.doGet(url); /** * 解析洋流数据返回给前端 * */ OceanDetailDTO oceanDetailDTO = null; - if (SUCCESS_CODE.equals(HttpRequestHelper.getOceanCode(oceanData))) { - OceanDetailRemoteData remoteData = JSON.parseObject(oceanData, new TypeReference() { + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(oceanData)) { + OceanDetailModel remoteData = JSON.parseObject(oceanData, new TypeReference() { }); - oceanDetailDTO = new OceanDetailDTO(remoteData); + oceanDetailDTO = new OceanDetailDTO(remoteData.getData()); } return oceanDetailDTO; } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java new file mode 100644 index 0000000..24b06cd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/RoutePointServiceImpl.java @@ -0,0 +1,21 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.casic.missiles.modular.system.dao.RoutePointMapper; +import com.casic.missiles.modular.system.model.RoutePoint; +import com.casic.missiles.modular.system.service.IRoutePointService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class RoutePointServiceImpl extends ServiceImpl implements IRoutePointService { + + public RoutePointServiceImpl() { + + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java deleted file mode 100644 index d1bf2c7..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.casic.missiles.modular.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.casic.missiles.modular.system.dao.TyphoonLandMapper; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.service.ITyphoonLandService; -import org.springframework.stereotype.Service; - -/** - * 台风数据信息 服务实现类 - * - * @author a203 - */ - -@Service -public class TyphoonLandServiceImpl extends ServiceImpl implements ITyphoonLandService { - - public TyphoonLandServiceImpl() { - - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java deleted file mode 100644 index 36815fa..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.casic.missiles.modular.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.casic.missiles.modular.system.dao.TyphoonPointMapper; -import com.casic.missiles.modular.system.model.TyphoonPoint; -import com.casic.missiles.modular.system.service.ITyphoonPointService; -import org.springframework.stereotype.Service; - -/** - * 台风数据信息 服务实现类 - * - * @author a203 - */ - -@Service -public class TyphoonPointServiceImpl extends ServiceImpl implements ITyphoonPointService { - - public TyphoonPointServiceImpl() { - - } -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java index 861e2c1..1cbfb01 100644 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java @@ -5,18 +5,16 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.casic.missiles.modular.system.dao.TyphoonMapper; +import com.casic.missiles.modular.system.dto.AddressConfigDTO; import com.casic.missiles.modular.system.dto.TyphoonDTO; import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; -import com.casic.missiles.modular.system.dto.remote.TyphoonDetailRemoteData; -import com.casic.missiles.modular.system.dto.remote.TyphoonRemoteData; +import com.casic.missiles.modular.system.dto.remote.TyphoonDetailModel; +import com.casic.missiles.modular.system.dto.remote.TyphoonListModel; +import com.casic.missiles.modular.system.model.LandPoint; +import com.casic.missiles.modular.system.model.RoutePoint; import com.casic.missiles.modular.system.model.Typhoon; import com.casic.missiles.modular.system.model.TyphoonDetail; -import com.casic.missiles.modular.system.model.TyphoonLand; -import com.casic.missiles.modular.system.model.TyphoonPoint; -import com.casic.missiles.modular.system.service.ITyphoonDetailService; -import com.casic.missiles.modular.system.service.ITyphoonLandService; -import com.casic.missiles.modular.system.service.ITyphoonPointService; -import com.casic.missiles.modular.system.service.ITyphoonService; +import com.casic.missiles.modular.system.service.*; import com.casic.missiles.modular.system.utils.Constant; import com.casic.missiles.modular.system.utils.HttpRequestHelper; import org.springframework.stereotype.Service; @@ -33,17 +31,29 @@ @Service public class TyphoonServiceImpl extends ServiceImpl implements ITyphoonService { - private static final String SUCCESS_CODE = "0"; + private final IAddressConfigService configService; + private final ITyphoonDetailService detailService; + private final ILandPointService landPointService; + private final IRoutePointService routePointService; - private final ITyphoonDetailService typhoonDetailService; - private final ITyphoonLandService typhoonLandService; - private final ITyphoonPointService typhoonPointService; + public TyphoonServiceImpl(IAddressConfigService configService, + ITyphoonDetailService detailService, + ILandPointService landPointService, + IRoutePointService routePointService) { + this.configService = configService; + this.detailService = detailService; + this.landPointService = landPointService; + this.routePointService = routePointService; + } - public TyphoonServiceImpl(ITyphoonDetailService typhoonDetailService, - ITyphoonLandService typhoonLandService, ITyphoonPointService typhoonPointService) { - this.typhoonDetailService = typhoonDetailService; - this.typhoonLandService = typhoonLandService; - this.typhoonPointService = typhoonPointService; + private String obtainEnvAddress() { + //获取服务器配置的IP信息 + AddressConfigDTO addressConfig = configService.selectLastConfig(); + String envIp = addressConfig.getEnvIp(); + if (envIp.contains(Constant.HTTP_HEADER)) { + envIp = envIp.replace(Constant.HTTP_HEADER, ""); + } + return envIp; } /** @@ -51,107 +61,117 @@ */ @Override public void saveTyphoonList() { + String url = Constant.HTTP_HEADER + obtainEnvAddress() + "/environment/saveTyphoon?"; /** * 获取台风接口数据 * */ - String res = HttpRequestHelper.doGet(Constant.TYPHOON_LIST + System.currentTimeMillis()); - if (SUCCESS_CODE.equals(HttpRequestHelper.getTyphoonCode(res))) { - TyphoonRemoteData remoteData = JSON.parseObject(res, new TypeReference() { + String res = HttpRequestHelper.doGet(url); + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(res)) { + TyphoonListModel listModel = JSON.parseObject(res, new TypeReference() { }); - //先清空之前的台风表,再保存最新的台风 - remove(null); - List beans = remoteData.getShowapi_res_body().getList(); - for (TyphoonRemoteData.ShowapiResBodyBean.ListBean data : beans) { - //将获取到台风数据存到数据库 + for (TyphoonListModel.DataBean data : listModel.getData()) { Typhoon entity = new Typhoon(); - entity.setTyphoonId(data.getTfid()); + entity.setTyphoonId(data.getTyphoonId()); entity.setName(data.getName()); - entity.setEngName(data.getEnname()); - entity.setLng(Double.valueOf(data.getLng())); - entity.setLat(Double.valueOf(data.getLat())); - entity.setTyphoonType(data.getStrong()); - entity.setCenterPressure(data.getPressure()); + entity.setEngName(data.getEngName()); + entity.setLng(data.getLng()); + entity.setLat(data.getLat()); + entity.setTyphoonType(data.getTyphoonType()); + entity.setCenterPressure(data.getCenterPressure()); entity.setSpeed(data.getSpeed()); - entity.setPower(Integer.valueOf(data.getPower())); - entity.setMoveSpeed(data.getMovespeed()); - entity.setMoveDirection(data.getMovedirection()); + entity.setPower(data.getPower()); + entity.setMoveSpeed(data.getMoveSpeed()); + entity.setMoveDirection(data.getMoveDirection()); entity.setRadius7(data.getRadius7()); entity.setRadius10(data.getRadius10()); entity.setTime(data.getTime()); - save(entity); + entity.setIsActive("1"); + this.baseMapper.insert(entity); } } + updateTyphoonDetail(); } /** * 更新台风详情 */ - @Override - public void updateTyphoonDetail() { - for (Typhoon typhoon : list()) { + private void updateTyphoonDetail() { + //筛选出还未消散的台风并更新详情 + List typhoons = this.baseMapper.selectCurrentTyphoon(); + for (Typhoon typhoon : typhoons) { /** * 获取台风接口数据 * */ - String res = HttpRequestHelper.doGet( - Constant.TYPHOON_DETAIL.replace("ID", typhoon.getTyphoonId()) - + System.currentTimeMillis()); - if (SUCCESS_CODE.equals(HttpRequestHelper.getTyphoonCode(res))) { - TyphoonDetailRemoteData remoteData = JSON.parseObject(res, new TypeReference() { + String url = Constant.HTTP_HEADER + obtainEnvAddress() + "/environment/updateTyphoon?typhoonId=" + typhoon.getTyphoonId(); + String res = HttpRequestHelper.doGet(url); + if (HttpRequestHelper.SUCCESS_CODE == HttpRequestHelper.getResponseCode(res)) { + TyphoonDetailModel detailModel = JSON.parseObject(res, new TypeReference() { }); - TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean objBean = remoteData.getShowapi_res_body().getObj(); - //保存台风基本情况存到数据库 + TyphoonDetailModel.DataBean dataBean = detailModel.getData(); + String typhoonId = dataBean.getTyphoonId(); + /** + * 保存台风基本情况存到数据库 + * */ TyphoonDetail detail = new TyphoonDetail(); - detail.setTyphoonId(objBean.getTfid()); - detail.setName(objBean.getName()); - detail.setEngName(objBean.getEnname()); - detail.setWarnLevel(objBean.getWarnlevel()); - detail.setCenterLng(Double.parseDouble(objBean.getCenterlng())); - detail.setCenterLat(Double.parseDouble(objBean.getCenterlat())); - detail.setStartTime(objBean.getStarttime()); - detail.setEndTime(objBean.getEndtime()); - detail.setIsActive(objBean.getIsactive()); - typhoonDetailService.saveOrUpdate(detail, new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); + detail.setTyphoonId(typhoonId); + detail.setName(dataBean.getName()); + detail.setEngName(dataBean.getEngName()); + detail.setWarnLevel(dataBean.getWarnLevel()); + detail.setCenterLng(dataBean.getCenterLng()); + detail.setCenterLat(dataBean.getCenterLat()); + detail.setStartTime(dataBean.getStartTime()); + detail.setEndTime(dataBean.getEndTime()); + detail.setIsActive(dataBean.getIsActive()); + QueryWrapper queryWrapper = new QueryWrapper().eq("TYPHOON_ID", typhoonId); + detailService.saveOrUpdate(detail, queryWrapper); - //保存台风登陆情况存到数据库 - List land = objBean.getLand(); - typhoonLandService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); - for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.LandBan landBan : land) { - TyphoonLand typhoonLand = new TyphoonLand(); + /** + * 更新台风列表台风状态 + * */ + typhoon.setIsActive(dataBean.getIsActive()); + saveOrUpdate(typhoon, new QueryWrapper().eq("TYPHOON_ID", typhoonId)); - typhoonLand.setTyphoonId(objBean.getTfid()); - typhoonLand.setLandAddress(landBan.getLandaddress()); - typhoonLand.setLandTime(landBan.getLandtime()); - typhoonLand.setType(landBan.getStrong()); - typhoonLand.setLng(landBan.getLng()); - typhoonLand.setLat(landBan.getLat()); - typhoonLand.setInfo(landBan.getInfo()); + /** + * 保存台风登陆情况存到数据库 + * */ + List landBans = dataBean.getLand(); + for (TyphoonDetailModel.DataBean.LandBean bean : landBans) { + LandPoint landPoint = new LandPoint(); - typhoonLandService.save(typhoonLand); + landPoint.setTyphoonId(typhoonId); + landPoint.setLandAddress(bean.getLandAddress()); + landPoint.setLandTime(bean.getLandTime()); + landPoint.setType(bean.getType()); + landPoint.setLng(bean.getLng()); + landPoint.setLat(bean.getLat()); + landPoint.setInfo(bean.getInfo()); + landPointService.save(landPoint); } - //保存台风移动路径存到数据库 - List points = objBean.getPoints(); - typhoonPointService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); - for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.PointsBean point : points) { - TyphoonPoint typhoonPoint = new TyphoonPoint(); + /** + * 保存台风移动路径存到数据库 + * */ + List routePoints = dataBean.getPoints(); + routePointService.remove(new QueryWrapper().eq("TYPHOON_ID", typhoonId)); + for (TyphoonDetailModel.DataBean.PointsBean point : routePoints) { + RoutePoint routePoint = new RoutePoint(); - typhoonPoint.setTyphoonId(objBean.getTfid()); - typhoonPoint.setTime(point.getTime()); - typhoonPoint.setCenterPressure(point.getPressure()); - typhoonPoint.setSpeed(point.getSpeed()); - typhoonPoint.setTyphoonType(point.getStrong()); - typhoonPoint.setMoveSpeed(point.getMovespeed()); - typhoonPoint.setPower(Integer.parseInt(point.getPower())); - typhoonPoint.setMoveDirection(point.getMovedirection()); - typhoonPoint.setLng(point.getLng()); - typhoonPoint.setLat(point.getLat()); - typhoonPoint.setRadius12(point.getRadius12()); - typhoonPoint.setRadius10(point.getRadius10()); - typhoonPoint.setRadius7(point.getRadius7()); - typhoonPoint.setRoutePrediction(point.getJl()); - typhoonPoint.setCenterPosition(point.getCkposition()); - - typhoonPointService.save(typhoonPoint); + routePoint.setTyphoonId(typhoonId); + routePoint.setTime(point.getTime()); + routePoint.setCenterPressure(point.getCenterPressure()); + routePoint.setSpeed(point.getSpeed()); + routePoint.setTyphoonType(point.getTyphoonType()); + routePoint.setMoveSpeed(point.getMoveSpeed()); + routePoint.setPower(point.getPower()); + routePoint.setMoveDirection(point.getMoveDirection()); + routePoint.setLng(point.getLng()); + routePoint.setLat(point.getLat()); + routePoint.setRadius12(point.getRadius12()); + routePoint.setRadius10(point.getRadius10()); + routePoint.setRadius7(point.getRadius7()); + routePoint.setRoutePrediction(point.getRoutePrediction()); + routePoint.setCenterPosition(point.getCenterPosition()); + routePointService.save(routePoint); } } } @@ -160,7 +180,9 @@ @Override public List currentTyphoonList() { List typhoonList = new ArrayList<>(); - for (Typhoon typhoon : list()) { + //筛选出还未消散的台风并更新详情 + List typhoons = this.baseMapper.selectCurrentTyphoon(); + for (Typhoon typhoon : typhoons) { typhoonList.add(new TyphoonDTO(typhoon)); } return typhoonList; @@ -168,15 +190,18 @@ @Override public TyphoonDetailDTO typhoonDetail(String typhoonId) { - TyphoonDetail detail = typhoonDetailService.getOne( + TyphoonDetail typhoonDetail = detailService.getOne( new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - List landList = typhoonLandService.list( - new QueryWrapper().eq("TYPHOON_ID", typhoonId) + if (typhoonDetail == null) { + return null; + } + List landPoints = landPointService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - List pointList = typhoonPointService.list( - new QueryWrapper().eq("TYPHOON_ID", typhoonId) + List routePoints = routePointService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) ); - return new TyphoonDetailDTO(detail, landList, pointList); + return new TyphoonDetailDTO(typhoonDetail, landPoints, routePoints); } } diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java deleted file mode 100644 index 552a6e9..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.casic.missiles.modular.system.utils; - -/** - * @author a203 - */ -public class Constant { - /** - * 热带气旋/台风相关常量 - */ - private static final String BASE_URL = "https://route.showapi.com"; - private static final String API_APPID = "780330"; - private static final String API_SIGN_KEY = "f30ac28b65cc447da936448c57bc5d99"; - - public static final String TYPHOON_LIST = BASE_URL - + "/342-1?" - + "showapi_appid=" + API_APPID + "&" - + "showapi_sign=" + API_SIGN_KEY + "&" - + "showapi_timestamp="; - - public static final String TYPHOON_DETAIL = BASE_URL - + "/342-2?" - + "showapi_appid=" + API_APPID + "&" - + "showapi_sign=" + API_SIGN_KEY + "&" - + "tfid=ID" + "&" - + "showapi_timestamp="; - - /** - * 洋流相关常量 - */ - private static final String OCEAN_BASE_URL = "http://api.meteo.open.ninecosmos.cn"; - public static final String OCEAN_HEADER_NAME = "Authorization"; - public static final String OCEAN_APPID = "WXZH888888"; - public static final String OCEAN_APP_KEY = "xb#bD&xtho@b80scbDb"; - - public static final String OCEAN_TOKEN = OCEAN_BASE_URL + "/us/users/open/token"; - public static final String OCEAN_DETAIL = OCEAN_BASE_URL + "/mr/netcdf/meteo/ytx"; -} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java deleted file mode 100644 index 1e0cd94..0000000 --- a/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java +++ /dev/null @@ -1,115 +0,0 @@ -package com.casic.missiles.modular.system.utils; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONException; -import com.alibaba.fastjson.JSONObject; -import lombok.NonNull; -import okhttp3.*; - -import java.io.IOException; -import java.util.Objects; -import java.util.concurrent.TimeUnit; - -/** - * 网络请求工具 - * - * @author a203 - */ -public class HttpRequestHelper { - - public static RequestBody createRequestBody(String value) { - return RequestBody.create(MediaType.parse("application/json; charset=utf-8"), value); - } - - public static String doPost(Request request) { - return streamResponse(request); - } - - public static String doGet(String url) { - return streamResponse(new Request.Builder() - .url(url) - .build()); - } - - private static String streamResponse(@NonNull Request request) { - OkHttpClient httpClient = new OkHttpClient.Builder() - .connectTimeout(10, TimeUnit.SECONDS) - .writeTimeout(10, TimeUnit.SECONDS) - .readTimeout(20, TimeUnit.SECONDS) - .build(); - Call call = httpClient.newCall(request); - try { - Response response = call.execute(); - return response.body() != null ? Objects.requireNonNull(response.body()).string() : ""; - } catch (IOException e) { - e.printStackTrace(); - } - return ""; - } - - public static String obtainOceanData(double lng, double lat, String date, String days, String hour) { - /** - * 获取洋流数据Token - * */ - JSONObject object = new JSONObject(); - try { - object.put("appId", Constant.OCEAN_APPID); - object.put("appKey", Constant.OCEAN_APP_KEY); - } catch (JSONException e) { - e.printStackTrace(); - } - Request tokenRequest = new Request.Builder() - .url(Constant.OCEAN_TOKEN) - .post(HttpRequestHelper.createRequestBody(object.toJSONString())) - .build(); - String tokenJson = HttpRequestHelper.doPost(tokenRequest); - if ("".equals(tokenJson)) { - return null; - } - /** - * 解析token - * */ - JSONObject tokenObject = JSON.parseObject(tokenJson); - JSONObject dataObject = tokenObject.getJSONObject("data"); - String token = dataObject.getString("token"); - /** - * 封装请求参数 - * */ - JSONObject jsonObject = new JSONObject(); - try { - jsonObject.put("lon", lng); - jsonObject.put("lat", lat); - jsonObject.put("date", date); - jsonObject.put("hour", days); - jsonObject.put("days", hour); - } catch (JSONException e) { - e.printStackTrace(); - } - /** - * 获取洋流数据 - * */ - Request request = new Request.Builder() - .addHeader(Constant.OCEAN_HEADER_NAME, token) - .url(Constant.OCEAN_DETAIL) - .post(HttpRequestHelper.createRequestBody(jsonObject.toJSONString())) - .build(); - return HttpRequestHelper.doPost(request); - } - - public static String getTyphoonCode(String value) { - if ("".equals(value)) { - return value; - } - JSONObject jsonObject = JSON.parseObject(value); - return jsonObject.getString("showapi_res_code"); - } - - public static String getOceanCode(String value) { - if ("".equals(value)) { - return value; - } - JSONObject jsonObject = JSON.parseObject(value); - Integer code = jsonObject.getInteger("code"); - return String.valueOf(code); - } -} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/LandPoint.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/LandPoint.java new file mode 100644 index 0000000..f6d61ba --- /dev/null +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/LandPoint.java @@ -0,0 +1,67 @@ +package com.casic.missiles.modular.system.model; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import lombok.Data; + +/** + * 台风登陆点数据库模型 + * + * @author a203 + */ +@Data +@TableName("tf_land_point") +public class LandPoint extends Model { + private static final long serialVersionUID = 1L; + + /** + * 台风数据库主键 + */ + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private Long id; + + /** + * 台风ID + */ + @TableField("TYPHOON_ID") + private String typhoonId; + + /** + * 台风登陆点 + */ + @TableField("LAND_ADDRESS") + private String landAddress; + + /** + * 台风登陆时间 + */ + @TableField("LAND_TIME") + private String landTime; + + /** + * 台风类型-热带风暴/强台风... + */ + @TableField("TYPE") + private String type; + + /** + * 经度 + */ + @TableField("LNG") + private Double lng; + + /** + * 纬度 + */ + @TableField("LAT") + private Double lat; + + /** + * 台风登陆细节 + */ + @TableField("INFO") + private String info; +} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/RoutePoint.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/RoutePoint.java new file mode 100644 index 0000000..81981db --- /dev/null +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/RoutePoint.java @@ -0,0 +1,115 @@ +package com.casic.missiles.modular.system.model; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import lombok.Data; + +/** + * 台风移动点数据库模型 + * + * @author a203 + */ +@Data +@TableName("tf_route_point") +public class RoutePoint extends Model { + private static final long serialVersionUID = 1L; + + /** + * 台风数据库主键 + */ + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private Long id; + + /** + * 台风ID + */ + @TableField("TYPHOON_ID") + private String typhoonId; + + /** + * 数据更新时间 + */ + @TableField("TIME") + private String time; + + /** + * 台风中心气压,单位【百帕】 + */ + @TableField("CENTER_PRESSURE") + private String centerPressure; + + /** + * 风速,单位【米/每秒】 + */ + @TableField("SPEED") + private String speed; + + /** + * 台风风力等级描述 + */ + @TableField("TYPHOON_TYPE") + private String typhoonType; + + /** + * 台风整体移动速度,单位【公里/小时】 + */ + @TableField("MOVE_SPEED") + private String moveSpeed; + + /** + * 风力,单位【级】 + */ + @TableField("POWER") + private Integer power; + + /** + * 台风未来移动方向 + */ + @TableField("MOVE_DIRECTION") + private String moveDirection; + + /** + * 经度 + */ + @TableField("LNG") + private Double lng; + + /** + * 纬度 + */ + @TableField("LAT") + private Double lat; + + /** + * 12级风力影响半径 + */ + @TableField("RADIUS_12") + private String radius12; + + /** + * 10级风力影响半径 + */ + @TableField("RADIUS_10") + private String radius10; + + /** + * 7级风力影响半径 + */ + @TableField("RADIUS_7") + private String radius7; + + /** + * 台风路线预测 + */ + @TableField("ROUTE_PREDICTION") + private String routePrediction; + + /** + * 中心位置 + */ + @TableField("CENTER_POSITION") + private String centerPosition; +} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/Typhoon.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/Typhoon.java index 658cb40..7146637 100644 --- a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/Typhoon.java +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/Typhoon.java @@ -13,17 +13,15 @@ * @author a203 */ @Data -@TableName("typhoon_list") +@TableName("tf_list") public class Typhoon extends Model { private static final long serialVersionUID = 1L; /** * 台风数据库主键 - *

- * type = IdType.AUTO 是数据库自增 */ - @TableId(value = "ID", type = IdType.AUTO) - private Integer id; + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private Long id; /** * 台风ID @@ -95,4 +93,9 @@ */ @TableField("TIME") private String time; -} + /** + * 台风是否已消散,1-未消散,0-已消散 + */ + @TableField("IS_ACTIVE") + private String isActive; +} \ No newline at end of file diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonDetail.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonDetail.java index ea3c29d..8b93cd0 100644 --- a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonDetail.java +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonDetail.java @@ -13,17 +13,15 @@ * @author a203 */ @Data -@TableName("typhoon_detail") +@TableName("tf_detail") public class TyphoonDetail extends Model { private static final long serialVersionUID = 1L; /** * 台风数据库主键 - *

- * type = IdType.AUTO 是数据库自增 */ - @TableId(value = "ID", type = IdType.AUTO) - private Integer id; + @TableId(value = "ID", type = IdType.ASSIGN_ID) + private Long id; /** * 台风ID diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonLand.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonLand.java deleted file mode 100644 index ddc3d02..0000000 --- a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonLand.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.casic.missiles.modular.system.model; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.extension.activerecord.Model; -import lombok.Data; - -/** - * 台风登陆点数据库模型 - * - * @author a203 - */ -@Data -@TableName("typhoon_land") -public class TyphoonLand extends Model { - private static final long serialVersionUID = 1L; - - /** - * 台风数据库主键 - *

- * type = IdType.AUTO 是数据库自增 - */ - @TableId(value = "ID", type = IdType.AUTO) - private Integer id; - - /** - * 台风ID - */ - @TableField("TYPHOON_ID") - private String typhoonId; - - /** - * 台风登陆点 - */ - @TableField("LAND_ADDRESS") - private String landAddress; - - /** - * 台风登陆时间 - */ - @TableField("LAND_TIME") - private String landTime; - - /** - * 台风类型-热带风暴/强台风... - */ - @TableField("TYPE") - private String type; - - /** - * 经度 - */ - @TableField("LNG") - private Double lng; - - /** - * 纬度 - */ - @TableField("LAT") - private Double lat; - - /** - * 台风登陆细节 - */ - @TableField("INFO") - private String info; -} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonPoint.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonPoint.java deleted file mode 100644 index 70a9703..0000000 --- a/casic-server-support/src/main/java/com/casic/missiles/modular/system/model/TyphoonPoint.java +++ /dev/null @@ -1,117 +0,0 @@ -package com.casic.missiles.modular.system.model; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.extension.activerecord.Model; -import lombok.Data; - -/** - * 台风移动点数据库模型 - * - * @author a203 - */ -@Data -@TableName("typhoon_point") -public class TyphoonPoint extends Model { - private static final long serialVersionUID = 1L; - - /** - * 台风数据库主键 - *

- * type = IdType.AUTO 是数据库自增 - */ - @TableId(value = "ID", type = IdType.AUTO) - private Integer id; - - /** - * 台风ID - */ - @TableField("TYPHOON_ID") - private String typhoonId; - - /** - * 数据更新时间 - */ - @TableField("TIME") - private String time; - - /** - * 台风中心气压,单位【百帕】 - */ - @TableField("CENTER_PRESSURE") - private String centerPressure; - - /** - * 风速,单位【米/每秒】 - */ - @TableField("SPEED") - private String speed; - - /** - * 台风风力等级描述 - */ - @TableField("TYPHOON_TYPE") - private String typhoonType; - - /** - * 台风整体移动速度,单位【公里/小时】 - */ - @TableField("MOVE_SPEED") - private String moveSpeed; - - /** - * 风力,单位【级】 - */ - @TableField("POWER") - private Integer power; - - /** - * 台风未来移动方向 - */ - @TableField("MOVE_DIRECTION") - private String moveDirection; - - /** - * 经度 - */ - @TableField("LNG") - private Double lng; - - /** - * 纬度 - */ - @TableField("LAT") - private Double lat; - - /** - * 12级风力影响半径 - */ - @TableField("RADIUS_12") - private String radius12; - - /** - * 10级风力影响半径 - */ - @TableField("RADIUS_10") - private String radius10; - - /** - * 7级风力影响半径 - */ - @TableField("RADIUS_7") - private String radius7; - - /** - * 台风路线预测 - */ - @TableField("ROUTE_PREDICTION") - private String routePrediction; - - /** - * 中心位置 - */ - @TableField("CENTER_POSITION") - private String centerPosition; -} diff --git a/casic-server-support/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java b/casic-server-support/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java index c999812..44c05dd 100644 --- a/casic-server-support/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java +++ b/casic-server-support/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java @@ -1,5 +1,7 @@ package com.casic.missiles.modular.system.utils; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; import lombok.NonNull; import okhttp3.*; @@ -14,6 +16,8 @@ */ public class HttpRequestHelper { + public static final int SUCCESS_CODE = 200; + public static RequestBody createRequestBody(String value) { return RequestBody.create(MediaType.parse("application/json; charset=utf-8"), value); } @@ -43,4 +47,9 @@ } return ""; } + + public static int getResponseCode(String value) { + JSONObject jsonObject = JSON.parseObject(value); + return jsonObject.getInteger("code"); + } } \ No newline at end of file diff --git a/casic-shelter/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java b/casic-shelter/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java index af39408..4f5cd4d 100644 --- a/casic-shelter/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java +++ b/casic-shelter/src/main/java/com/casic/missiles/modular/system/dto/OceanDetailDTO.java @@ -1,10 +1,8 @@ package com.casic.missiles.modular.system.dto; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import lombok.Data; -import java.text.DecimalFormat; - /** * @author a203 */ @@ -114,39 +112,32 @@ private Double wavePrd; } - public OceanDetailDTO(OceanDetailRemoteData remoteData) { - OceanDetailRemoteData.DataBean.ListBean listBean = remoteData.getData().getList().get(0); - OceanDetailRemoteData.DataBean.ListBean.YtxBean ytxBean = listBean.getYtx(); - OceanDetailRemoteData.DataBean.ListBean.MeteoBean meteoBean = listBean.getMeteo(); - if (ytxBean != null) { - this.temperature = formatData(ytxBean.getSurfaceTem()); - this.altitude = formatData(0.00); - this.pressure = formatData(ytxBean.getSurfPres()); - this.swellHeight = formatData(ytxBean.getSwellHgt()); - this.swellDir = formatData(ytxBean.getSwellDir()); - this.swellPrd = formatData(ytxBean.getSwellPrd()); - this.waveHeight = formatData(ytxBean.getWaveHgt()); - this.waveDir = formatData(ytxBean.getWaveDir()); - this.wavePrd = formatData(ytxBean.getWavePrd()); - this.speed = formatData(ytxBean.getWindMag()); - this.oceanDir = formatData(ytxBean.getCurrentDir()); - this.windSpeed = formatData(ytxBean.getWindMag()); - this.windDir = formatData(ytxBean.getWindDir()); - } + public OceanDetailDTO(OceanDetailModel remoteData) { + OceanDetailModel.DataBean data = remoteData.getData(); + this.temperature = data.getTemperature(); + this.altitude = data.getAltitude(); + this.pressure = data.getPressure(); + this.swellHeight = data.getSwellHeight(); + this.swellDir = data.getSwellDir(); + this.swellPrd = data.getSwellPrd(); + this.waveHeight = data.getWaveHeight(); + this.waveDir = data.getWaveDir(); + this.wavePrd = data.getWavePrd(); + this.speed = data.getSpeed(); + this.oceanDir = data.getOceanDir(); + this.windSpeed = data.getWindSpeed(); + this.windDir = data.getWindDir(); + + OceanDetailModel.DataBean.ForecastBean forecast = data.getForecast(); PreviewBean bean = new PreviewBean(); - if (meteoBean != null) { - bean.swellHeight = formatData(meteoBean.getSwellHgt()); - bean.swellDir = formatData(meteoBean.getSwellDir()); - bean.swellPrd = formatData(meteoBean.getSwellPrd()); - bean.waveHeight = formatData(meteoBean.getWaveHgt()); - bean.waveDir = formatData(meteoBean.getWaveDir()); - bean.wavePrd = formatData(meteoBean.getWavePrd()); + if (forecast != null) { + bean.swellHeight = forecast.getSwellHeight(); + bean.swellDir = forecast.getSwellDir(); + bean.swellPrd = forecast.getSwellPrd(); + bean.waveHeight = forecast.getWaveHeight(); + bean.waveDir = forecast.getWaveDir(); + bean.wavePrd = forecast.getWavePrd(); } this.forecast = bean; } - - private Double formatData(Double data) { - DecimalFormat df = new DecimalFormat("#.00"); - return Double.parseDouble(df.format(data)); - } } diff --git a/casic-shelter/src/main/java/com/casic/missiles/modular/system/utils/EncodeData.java b/casic-shelter/src/main/java/com/casic/missiles/modular/system/utils/EncodeData.java index 4974336..537739b 100644 --- a/casic-shelter/src/main/java/com/casic/missiles/modular/system/utils/EncodeData.java +++ b/casic-shelter/src/main/java/com/casic/missiles/modular/system/utils/EncodeData.java @@ -3,7 +3,7 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; import com.casic.missiles.modular.system.dto.*; -import com.casic.missiles.modular.system.dto.remote.OceanDetailRemoteData; +import com.casic.missiles.modular.system.dto.remote.OceanDetailModel; import org.locationtech.spatial4j.distance.DistanceUtils; import java.text.DecimalFormat; @@ -64,7 +64,7 @@ String oceanData = HttpRequestHelper.obtainOceanData(targetLng, targetLat, date, days, hour); OceanDetailDTO oceanDetailDTO = null; if ("0".equals(HttpRequestHelper.getOceanCode(oceanData))) { - OceanDetailRemoteData remoteData = JSON.parseObject(oceanData, new TypeReference() { + OceanDetailModel remoteData = JSON.parseObject(oceanData, new TypeReference() { }); oceanDetailDTO = new OceanDetailDTO(remoteData); }