diff --git a/casic-environment/pom.xml b/casic-environment/pom.xml new file mode 100644 index 0000000..5aa6394 --- /dev/null +++ b/casic-environment/pom.xml @@ -0,0 +1,72 @@ + + + 4.0.0 + + com.casic + casic-template + ../pom.xml + 2.0.0 + + + casic-environment + 2.0.0 + jar + casic-environment + + + + + com.casic + casic-core + ${core.version} + provided + + + com.casic + casic-admin-support + ${admin.version} + provided + + + org.springframework.boot + spring-boot-starter-web + ${boot.version} + provided + + + com.casic + casic-server-support + 1.0.0 + + + + com.alibaba + fastjson + ${fastjson.version} + + + com.squareup.okhttp3 + okhttp + 4.9.1 + + + + org.locationtech.spatial4j + spatial4j + 0.8 + + + + + + + src/main/java + + **/*.xml + + + + + \ No newline at end of file diff --git a/casic-environment/pom.xml b/casic-environment/pom.xml new file mode 100644 index 0000000..5aa6394 --- /dev/null +++ b/casic-environment/pom.xml @@ -0,0 +1,72 @@ + + + 4.0.0 + + com.casic + casic-template + ../pom.xml + 2.0.0 + + + casic-environment + 2.0.0 + jar + casic-environment + + + + + com.casic + casic-core + ${core.version} + provided + + + com.casic + casic-admin-support + ${admin.version} + provided + + + org.springframework.boot + spring-boot-starter-web + ${boot.version} + provided + + + com.casic + casic-server-support + 1.0.0 + + + + com.alibaba + fastjson + ${fastjson.version} + + + com.squareup.okhttp3 + okhttp + 4.9.1 + + + + org.locationtech.spatial4j + spatial4j + 0.8 + + + + + + + src/main/java + + **/*.xml + + + + + \ No newline at end of file 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 new file mode 100644 index 0000000..041adcd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -0,0 +1,26 @@ +package com.casic.missiles.job; + +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +/** + * @author lwh + * 台风数据定时任务,每小时执行一次 + * @ClassName TyphoonQuartzJob + * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling + */ +@Component +public class TyphoonQuartzJob { + private final ITyphoonService typhoonService; + + public TyphoonQuartzJob(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + @Scheduled(cron = "0 0 */1 * * ?") + public void execute() { + typhoonService.saveTyphoonList(); + typhoonService.updateTyphoonDetail(); + } +} diff --git a/casic-environment/pom.xml b/casic-environment/pom.xml new file mode 100644 index 0000000..5aa6394 --- /dev/null +++ b/casic-environment/pom.xml @@ -0,0 +1,72 @@ + + + 4.0.0 + + com.casic + casic-template + ../pom.xml + 2.0.0 + + + casic-environment + 2.0.0 + jar + casic-environment + + + + + com.casic + casic-core + ${core.version} + provided + + + com.casic + casic-admin-support + ${admin.version} + provided + + + org.springframework.boot + spring-boot-starter-web + ${boot.version} + provided + + + com.casic + casic-server-support + 1.0.0 + + + + com.alibaba + fastjson + ${fastjson.version} + + + com.squareup.okhttp3 + okhttp + 4.9.1 + + + + org.locationtech.spatial4j + spatial4j + 0.8 + + + + + + + src/main/java + + **/*.xml + + + + + \ No newline at end of file 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 new file mode 100644 index 0000000..041adcd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -0,0 +1,26 @@ +package com.casic.missiles.job; + +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +/** + * @author lwh + * 台风数据定时任务,每小时执行一次 + * @ClassName TyphoonQuartzJob + * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling + */ +@Component +public class TyphoonQuartzJob { + private final ITyphoonService typhoonService; + + public TyphoonQuartzJob(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + @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/controller/EnvironmentController.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java new file mode 100644 index 0000000..0f2a0ed --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java @@ -0,0 +1,48 @@ +package com.casic.missiles.modular.system.controller; + +import com.casic.missiles.model.response.ResponseData; +import com.casic.missiles.modular.system.dto.TyphoonDTO; +import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.List; + +/** + * 环境控制器 + * + * @author a203 + */ +@Controller +@RequestMapping("/environment") +public class EnvironmentController { + private final ITyphoonService typhoonService; + + public EnvironmentController(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + /** + * 台风列表 + */ + @GetMapping(value = "/typhoonList") + @ResponseBody + public Object list() { + List typhoonList = typhoonService.currentTyphoonList(); + return ResponseData.success(typhoonList); + } + + /** + * 台风详情 + */ + @GetMapping(value = "/typhoonDetail/{typhoonId}") + @ResponseBody + public Object detail(@PathVariable("typhoonId") String typhoonId) { + TyphoonDetailDTO detailDTO = typhoonService.typhoonDetail(typhoonId); + return ResponseData.success(detailDTO); + } +} diff --git a/casic-environment/pom.xml b/casic-environment/pom.xml new file mode 100644 index 0000000..5aa6394 --- /dev/null +++ b/casic-environment/pom.xml @@ -0,0 +1,72 @@ + + + 4.0.0 + + com.casic + casic-template + ../pom.xml + 2.0.0 + + + casic-environment + 2.0.0 + jar + casic-environment + + + + + com.casic + casic-core + ${core.version} + provided + + + com.casic + casic-admin-support + ${admin.version} + provided + + + org.springframework.boot + spring-boot-starter-web + ${boot.version} + provided + + + com.casic + casic-server-support + 1.0.0 + + + + com.alibaba + fastjson + ${fastjson.version} + + + com.squareup.okhttp3 + okhttp + 4.9.1 + + + + org.locationtech.spatial4j + spatial4j + 0.8 + + + + + + + src/main/java + + **/*.xml + + + + + \ No newline at end of file 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 new file mode 100644 index 0000000..041adcd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -0,0 +1,26 @@ +package com.casic.missiles.job; + +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +/** + * @author lwh + * 台风数据定时任务,每小时执行一次 + * @ClassName TyphoonQuartzJob + * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling + */ +@Component +public class TyphoonQuartzJob { + private final ITyphoonService typhoonService; + + public TyphoonQuartzJob(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + @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/controller/EnvironmentController.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java new file mode 100644 index 0000000..0f2a0ed --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java @@ -0,0 +1,48 @@ +package com.casic.missiles.modular.system.controller; + +import com.casic.missiles.model.response.ResponseData; +import com.casic.missiles.modular.system.dto.TyphoonDTO; +import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.List; + +/** + * 环境控制器 + * + * @author a203 + */ +@Controller +@RequestMapping("/environment") +public class EnvironmentController { + private final ITyphoonService typhoonService; + + public EnvironmentController(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + /** + * 台风列表 + */ + @GetMapping(value = "/typhoonList") + @ResponseBody + public Object list() { + List typhoonList = typhoonService.currentTyphoonList(); + return ResponseData.success(typhoonList); + } + + /** + * 台风详情 + */ + @GetMapping(value = "/typhoonDetail/{typhoonId}") + @ResponseBody + public Object detail(@PathVariable("typhoonId") String typhoonId) { + TyphoonDetailDTO detailDTO = typhoonService.typhoonDetail(typhoonId); + return ResponseData.success(detailDTO); + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java new file mode 100644 index 0000000..9788030 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.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.TyphoonDetail; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonDetailMapper extends BaseMapper { + +} diff --git a/casic-environment/pom.xml b/casic-environment/pom.xml new file mode 100644 index 0000000..5aa6394 --- /dev/null +++ b/casic-environment/pom.xml @@ -0,0 +1,72 @@ + + + 4.0.0 + + com.casic + casic-template + ../pom.xml + 2.0.0 + + + casic-environment + 2.0.0 + jar + casic-environment + + + + + com.casic + casic-core + ${core.version} + provided + + + com.casic + casic-admin-support + ${admin.version} + provided + + + org.springframework.boot + spring-boot-starter-web + ${boot.version} + provided + + + com.casic + casic-server-support + 1.0.0 + + + + com.alibaba + fastjson + ${fastjson.version} + + + com.squareup.okhttp3 + okhttp + 4.9.1 + + + + org.locationtech.spatial4j + spatial4j + 0.8 + + + + + + + src/main/java + + **/*.xml + + + + + \ No newline at end of file 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 new file mode 100644 index 0000000..041adcd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -0,0 +1,26 @@ +package com.casic.missiles.job; + +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +/** + * @author lwh + * 台风数据定时任务,每小时执行一次 + * @ClassName TyphoonQuartzJob + * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling + */ +@Component +public class TyphoonQuartzJob { + private final ITyphoonService typhoonService; + + public TyphoonQuartzJob(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + @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/controller/EnvironmentController.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java new file mode 100644 index 0000000..0f2a0ed --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java @@ -0,0 +1,48 @@ +package com.casic.missiles.modular.system.controller; + +import com.casic.missiles.model.response.ResponseData; +import com.casic.missiles.modular.system.dto.TyphoonDTO; +import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.List; + +/** + * 环境控制器 + * + * @author a203 + */ +@Controller +@RequestMapping("/environment") +public class EnvironmentController { + private final ITyphoonService typhoonService; + + public EnvironmentController(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + /** + * 台风列表 + */ + @GetMapping(value = "/typhoonList") + @ResponseBody + public Object list() { + List typhoonList = typhoonService.currentTyphoonList(); + return ResponseData.success(typhoonList); + } + + /** + * 台风详情 + */ + @GetMapping(value = "/typhoonDetail/{typhoonId}") + @ResponseBody + public Object detail(@PathVariable("typhoonId") String typhoonId) { + TyphoonDetailDTO detailDTO = typhoonService.typhoonDetail(typhoonId); + return ResponseData.success(detailDTO); + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java new file mode 100644 index 0000000..9788030 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.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.TyphoonDetail; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonDetailMapper 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 new file mode 100644 index 0000000..c60bfab --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.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.TyphoonLand; + +/** + * 台风登陆数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonLandMapper extends BaseMapper { + +} diff --git a/casic-environment/pom.xml b/casic-environment/pom.xml new file mode 100644 index 0000000..5aa6394 --- /dev/null +++ b/casic-environment/pom.xml @@ -0,0 +1,72 @@ + + + 4.0.0 + + com.casic + casic-template + ../pom.xml + 2.0.0 + + + casic-environment + 2.0.0 + jar + casic-environment + + + + + com.casic + casic-core + ${core.version} + provided + + + com.casic + casic-admin-support + ${admin.version} + provided + + + org.springframework.boot + spring-boot-starter-web + ${boot.version} + provided + + + com.casic + casic-server-support + 1.0.0 + + + + com.alibaba + fastjson + ${fastjson.version} + + + com.squareup.okhttp3 + okhttp + 4.9.1 + + + + org.locationtech.spatial4j + spatial4j + 0.8 + + + + + + + src/main/java + + **/*.xml + + + + + \ No newline at end of file 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 new file mode 100644 index 0000000..041adcd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -0,0 +1,26 @@ +package com.casic.missiles.job; + +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +/** + * @author lwh + * 台风数据定时任务,每小时执行一次 + * @ClassName TyphoonQuartzJob + * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling + */ +@Component +public class TyphoonQuartzJob { + private final ITyphoonService typhoonService; + + public TyphoonQuartzJob(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + @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/controller/EnvironmentController.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java new file mode 100644 index 0000000..0f2a0ed --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java @@ -0,0 +1,48 @@ +package com.casic.missiles.modular.system.controller; + +import com.casic.missiles.model.response.ResponseData; +import com.casic.missiles.modular.system.dto.TyphoonDTO; +import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.List; + +/** + * 环境控制器 + * + * @author a203 + */ +@Controller +@RequestMapping("/environment") +public class EnvironmentController { + private final ITyphoonService typhoonService; + + public EnvironmentController(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + /** + * 台风列表 + */ + @GetMapping(value = "/typhoonList") + @ResponseBody + public Object list() { + List typhoonList = typhoonService.currentTyphoonList(); + return ResponseData.success(typhoonList); + } + + /** + * 台风详情 + */ + @GetMapping(value = "/typhoonDetail/{typhoonId}") + @ResponseBody + public Object detail(@PathVariable("typhoonId") String typhoonId) { + TyphoonDetailDTO detailDTO = typhoonService.typhoonDetail(typhoonId); + return ResponseData.success(detailDTO); + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java new file mode 100644 index 0000000..9788030 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.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.TyphoonDetail; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonDetailMapper 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 new file mode 100644 index 0000000..c60bfab --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.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.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 new file mode 100644 index 0000000..70ea807 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.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.Typhoon; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonMapper extends BaseMapper { + +} diff --git a/casic-environment/pom.xml b/casic-environment/pom.xml new file mode 100644 index 0000000..5aa6394 --- /dev/null +++ b/casic-environment/pom.xml @@ -0,0 +1,72 @@ + + + 4.0.0 + + com.casic + casic-template + ../pom.xml + 2.0.0 + + + casic-environment + 2.0.0 + jar + casic-environment + + + + + com.casic + casic-core + ${core.version} + provided + + + com.casic + casic-admin-support + ${admin.version} + provided + + + org.springframework.boot + spring-boot-starter-web + ${boot.version} + provided + + + com.casic + casic-server-support + 1.0.0 + + + + com.alibaba + fastjson + ${fastjson.version} + + + com.squareup.okhttp3 + okhttp + 4.9.1 + + + + org.locationtech.spatial4j + spatial4j + 0.8 + + + + + + + src/main/java + + **/*.xml + + + + + \ No newline at end of file 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 new file mode 100644 index 0000000..041adcd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -0,0 +1,26 @@ +package com.casic.missiles.job; + +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +/** + * @author lwh + * 台风数据定时任务,每小时执行一次 + * @ClassName TyphoonQuartzJob + * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling + */ +@Component +public class TyphoonQuartzJob { + private final ITyphoonService typhoonService; + + public TyphoonQuartzJob(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + @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/controller/EnvironmentController.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java new file mode 100644 index 0000000..0f2a0ed --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java @@ -0,0 +1,48 @@ +package com.casic.missiles.modular.system.controller; + +import com.casic.missiles.model.response.ResponseData; +import com.casic.missiles.modular.system.dto.TyphoonDTO; +import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.List; + +/** + * 环境控制器 + * + * @author a203 + */ +@Controller +@RequestMapping("/environment") +public class EnvironmentController { + private final ITyphoonService typhoonService; + + public EnvironmentController(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + /** + * 台风列表 + */ + @GetMapping(value = "/typhoonList") + @ResponseBody + public Object list() { + List typhoonList = typhoonService.currentTyphoonList(); + return ResponseData.success(typhoonList); + } + + /** + * 台风详情 + */ + @GetMapping(value = "/typhoonDetail/{typhoonId}") + @ResponseBody + public Object detail(@PathVariable("typhoonId") String typhoonId) { + TyphoonDetailDTO detailDTO = typhoonService.typhoonDetail(typhoonId); + return ResponseData.success(detailDTO); + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java new file mode 100644 index 0000000..9788030 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.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.TyphoonDetail; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonDetailMapper 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 new file mode 100644 index 0000000..c60bfab --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.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.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 new file mode 100644 index 0000000..70ea807 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.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.Typhoon; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonMapper extends BaseMapper { + +} 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 new file mode 100644 index 0000000..9745785 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.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.TyphoonPoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonPointMapper extends BaseMapper { + +} diff --git a/casic-environment/pom.xml b/casic-environment/pom.xml new file mode 100644 index 0000000..5aa6394 --- /dev/null +++ b/casic-environment/pom.xml @@ -0,0 +1,72 @@ + + + 4.0.0 + + com.casic + casic-template + ../pom.xml + 2.0.0 + + + casic-environment + 2.0.0 + jar + casic-environment + + + + + com.casic + casic-core + ${core.version} + provided + + + com.casic + casic-admin-support + ${admin.version} + provided + + + org.springframework.boot + spring-boot-starter-web + ${boot.version} + provided + + + com.casic + casic-server-support + 1.0.0 + + + + com.alibaba + fastjson + ${fastjson.version} + + + com.squareup.okhttp3 + okhttp + 4.9.1 + + + + org.locationtech.spatial4j + spatial4j + 0.8 + + + + + + + src/main/java + + **/*.xml + + + + + \ No newline at end of file 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 new file mode 100644 index 0000000..041adcd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -0,0 +1,26 @@ +package com.casic.missiles.job; + +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +/** + * @author lwh + * 台风数据定时任务,每小时执行一次 + * @ClassName TyphoonQuartzJob + * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling + */ +@Component +public class TyphoonQuartzJob { + private final ITyphoonService typhoonService; + + public TyphoonQuartzJob(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + @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/controller/EnvironmentController.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java new file mode 100644 index 0000000..0f2a0ed --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java @@ -0,0 +1,48 @@ +package com.casic.missiles.modular.system.controller; + +import com.casic.missiles.model.response.ResponseData; +import com.casic.missiles.modular.system.dto.TyphoonDTO; +import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.List; + +/** + * 环境控制器 + * + * @author a203 + */ +@Controller +@RequestMapping("/environment") +public class EnvironmentController { + private final ITyphoonService typhoonService; + + public EnvironmentController(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + /** + * 台风列表 + */ + @GetMapping(value = "/typhoonList") + @ResponseBody + public Object list() { + List typhoonList = typhoonService.currentTyphoonList(); + return ResponseData.success(typhoonList); + } + + /** + * 台风详情 + */ + @GetMapping(value = "/typhoonDetail/{typhoonId}") + @ResponseBody + public Object detail(@PathVariable("typhoonId") String typhoonId) { + TyphoonDetailDTO detailDTO = typhoonService.typhoonDetail(typhoonId); + return ResponseData.success(detailDTO); + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java new file mode 100644 index 0000000..9788030 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.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.TyphoonDetail; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonDetailMapper 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 new file mode 100644 index 0000000..c60bfab --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.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.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 new file mode 100644 index 0000000..70ea807 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.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.Typhoon; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonMapper extends BaseMapper { + +} 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 new file mode 100644 index 0000000..9745785 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.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.TyphoonPoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java new file mode 100644 index 0000000..cdef9a4 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java @@ -0,0 +1,84 @@ +package com.casic.missiles.modular.system.dto; + +import com.casic.missiles.modular.system.model.Typhoon; +import lombok.Data; + +/** + * @author a203 + */ +@Data +public class TyphoonDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 数据更新时间 + */ + private String time; + + public TyphoonDTO(Typhoon data) { + this.typhoonId = data.getTyphoonId(); + this.name = data.getName(); + this.engName = data.getEngName(); + this.lng = data.getLng(); + this.lat = data.getLat(); + this.typhoonType = data.getTyphoonType(); + this.centerPressure = data.getCenterPressure(); + this.speed = data.getSpeed(); + this.power = data.getPower(); + this.moveSpeed = data.getMoveSpeed(); + this.moveDirection = data.getMoveDirection(); + this.radius10 = data.getRadius10(); + this.radius7 = data.getRadius7(); + this.time = data.getTime(); + } +} diff --git a/casic-environment/pom.xml b/casic-environment/pom.xml new file mode 100644 index 0000000..5aa6394 --- /dev/null +++ b/casic-environment/pom.xml @@ -0,0 +1,72 @@ + + + 4.0.0 + + com.casic + casic-template + ../pom.xml + 2.0.0 + + + casic-environment + 2.0.0 + jar + casic-environment + + + + + com.casic + casic-core + ${core.version} + provided + + + com.casic + casic-admin-support + ${admin.version} + provided + + + org.springframework.boot + spring-boot-starter-web + ${boot.version} + provided + + + com.casic + casic-server-support + 1.0.0 + + + + com.alibaba + fastjson + ${fastjson.version} + + + com.squareup.okhttp3 + okhttp + 4.9.1 + + + + org.locationtech.spatial4j + spatial4j + 0.8 + + + + + + + src/main/java + + **/*.xml + + + + + \ No newline at end of file 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 new file mode 100644 index 0000000..041adcd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -0,0 +1,26 @@ +package com.casic.missiles.job; + +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +/** + * @author lwh + * 台风数据定时任务,每小时执行一次 + * @ClassName TyphoonQuartzJob + * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling + */ +@Component +public class TyphoonQuartzJob { + private final ITyphoonService typhoonService; + + public TyphoonQuartzJob(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + @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/controller/EnvironmentController.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java new file mode 100644 index 0000000..0f2a0ed --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java @@ -0,0 +1,48 @@ +package com.casic.missiles.modular.system.controller; + +import com.casic.missiles.model.response.ResponseData; +import com.casic.missiles.modular.system.dto.TyphoonDTO; +import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.List; + +/** + * 环境控制器 + * + * @author a203 + */ +@Controller +@RequestMapping("/environment") +public class EnvironmentController { + private final ITyphoonService typhoonService; + + public EnvironmentController(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + /** + * 台风列表 + */ + @GetMapping(value = "/typhoonList") + @ResponseBody + public Object list() { + List typhoonList = typhoonService.currentTyphoonList(); + return ResponseData.success(typhoonList); + } + + /** + * 台风详情 + */ + @GetMapping(value = "/typhoonDetail/{typhoonId}") + @ResponseBody + public Object detail(@PathVariable("typhoonId") String typhoonId) { + TyphoonDetailDTO detailDTO = typhoonService.typhoonDetail(typhoonId); + return ResponseData.success(detailDTO); + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java new file mode 100644 index 0000000..9788030 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.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.TyphoonDetail; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonDetailMapper 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 new file mode 100644 index 0000000..c60bfab --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.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.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 new file mode 100644 index 0000000..70ea807 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.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.Typhoon; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonMapper extends BaseMapper { + +} 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 new file mode 100644 index 0000000..9745785 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.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.TyphoonPoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java new file mode 100644 index 0000000..cdef9a4 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java @@ -0,0 +1,84 @@ +package com.casic.missiles.modular.system.dto; + +import com.casic.missiles.modular.system.model.Typhoon; +import lombok.Data; + +/** + * @author a203 + */ +@Data +public class TyphoonDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 数据更新时间 + */ + private String time; + + public TyphoonDTO(Typhoon data) { + this.typhoonId = data.getTyphoonId(); + this.name = data.getName(); + this.engName = data.getEngName(); + this.lng = data.getLng(); + this.lat = data.getLat(); + this.typhoonType = data.getTyphoonType(); + this.centerPressure = data.getCenterPressure(); + this.speed = data.getSpeed(); + this.power = data.getPower(); + this.moveSpeed = data.getMoveSpeed(); + this.moveDirection = data.getMoveDirection(); + this.radius10 = data.getRadius10(); + this.radius7 = data.getRadius7(); + this.time = data.getTime(); + } +} 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 new file mode 100644 index 0000000..a34da1b --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -0,0 +1,188 @@ +package com.casic.missiles.modular.system.dto; + +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; +import java.util.List; + +/** + * 台风详情 + * + * @author a203 + */ +@Data +public class TyphoonDetailDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 台风告警级别 + */ + private String warnLevel; + /** + * 台风中心经度 + */ + private Double centerLng; + /** + * 台风中心纬度 + */ + private Double centerLat; + /** + * 台风开始时间 + */ + private String startTime; + /** + * 台风结束时间 + */ + private String endTime; + /** + * 台风状态 + */ + private String isActive; + /** + * 台风登陆点 + */ + private List land; + /** + * 台风路径 + */ + private List points; + + @Data + public static class LandBan { + /** + * 台风登陆点 + */ + private String landAddress; + /** + * 台风类型-热带风暴/强台风... + */ + private String type; + private Double lng; + private Double lat; + /** + * 台风登陆细节 + */ + private String info; + /** + * 台风登陆时间 + */ + private String landTime; + } + + @Data + public static class PointBean { + /** + * 数据更新时间 + */ + private String time; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 12级风力影响半径 + */ + private String radius12; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 台风路线预测 + */ + private String routePrediction; + /** + * 中心位置 + */ + private String centerPosition; + } + + public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + this.typhoonId = detail.getTyphoonId(); + this.name = detail.getName(); + this.engName = detail.getEngName(); + this.warnLevel = detail.getWarnLevel(); + this.centerLng = detail.getCenterLng(); + this.centerLat = detail.getCenterLat(); + this.startTime = detail.getStartTime(); + this.endTime = detail.getEndTime(); + this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); + for (TyphoonLand landBean : landBeans) { + LandBan bean = new LandBan(); + bean.landAddress = landBean.getLandAddress(); + bean.landTime = landBean.getLandTime(); + bean.type = landBean.getType(); + bean.lng = landBean.getLng(); + bean.lat = landBean.getLat(); + bean.info = landBean.getInfo(); + lands.add(bean); + } + this.land = lands; + List points = new ArrayList<>(); + for (TyphoonPoint point : pointBeans) { + PointBean pointBean = new PointBean(); + pointBean.time = point.getTime(); + pointBean.centerPressure = point.getCenterPressure(); + pointBean.speed = point.getSpeed(); + pointBean.typhoonType = point.getTyphoonType(); + pointBean.moveSpeed = point.getMoveSpeed(); + pointBean.power = point.getPower(); + pointBean.moveDirection = point.getMoveDirection(); + pointBean.lng = point.getLng(); + pointBean.lat = point.getLat(); + pointBean.radius12 = point.getRadius12(); + pointBean.radius10 = point.getRadius10(); + pointBean.radius7 = point.getRadius7(); + pointBean.routePrediction = point.getRoutePrediction(); + pointBean.centerPosition = point.getCenterPosition(); + points.add(pointBean); + } + this.points = points; + } +} diff --git a/casic-environment/pom.xml b/casic-environment/pom.xml new file mode 100644 index 0000000..5aa6394 --- /dev/null +++ b/casic-environment/pom.xml @@ -0,0 +1,72 @@ + + + 4.0.0 + + com.casic + casic-template + ../pom.xml + 2.0.0 + + + casic-environment + 2.0.0 + jar + casic-environment + + + + + com.casic + casic-core + ${core.version} + provided + + + com.casic + casic-admin-support + ${admin.version} + provided + + + org.springframework.boot + spring-boot-starter-web + ${boot.version} + provided + + + com.casic + casic-server-support + 1.0.0 + + + + com.alibaba + fastjson + ${fastjson.version} + + + com.squareup.okhttp3 + okhttp + 4.9.1 + + + + org.locationtech.spatial4j + spatial4j + 0.8 + + + + + + + src/main/java + + **/*.xml + + + + + \ No newline at end of file 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 new file mode 100644 index 0000000..041adcd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -0,0 +1,26 @@ +package com.casic.missiles.job; + +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +/** + * @author lwh + * 台风数据定时任务,每小时执行一次 + * @ClassName TyphoonQuartzJob + * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling + */ +@Component +public class TyphoonQuartzJob { + private final ITyphoonService typhoonService; + + public TyphoonQuartzJob(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + @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/controller/EnvironmentController.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java new file mode 100644 index 0000000..0f2a0ed --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java @@ -0,0 +1,48 @@ +package com.casic.missiles.modular.system.controller; + +import com.casic.missiles.model.response.ResponseData; +import com.casic.missiles.modular.system.dto.TyphoonDTO; +import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.List; + +/** + * 环境控制器 + * + * @author a203 + */ +@Controller +@RequestMapping("/environment") +public class EnvironmentController { + private final ITyphoonService typhoonService; + + public EnvironmentController(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + /** + * 台风列表 + */ + @GetMapping(value = "/typhoonList") + @ResponseBody + public Object list() { + List typhoonList = typhoonService.currentTyphoonList(); + return ResponseData.success(typhoonList); + } + + /** + * 台风详情 + */ + @GetMapping(value = "/typhoonDetail/{typhoonId}") + @ResponseBody + public Object detail(@PathVariable("typhoonId") String typhoonId) { + TyphoonDetailDTO detailDTO = typhoonService.typhoonDetail(typhoonId); + return ResponseData.success(detailDTO); + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java new file mode 100644 index 0000000..9788030 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.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.TyphoonDetail; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonDetailMapper 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 new file mode 100644 index 0000000..c60bfab --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.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.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 new file mode 100644 index 0000000..70ea807 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.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.Typhoon; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonMapper extends BaseMapper { + +} 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 new file mode 100644 index 0000000..9745785 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.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.TyphoonPoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java new file mode 100644 index 0000000..cdef9a4 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java @@ -0,0 +1,84 @@ +package com.casic.missiles.modular.system.dto; + +import com.casic.missiles.modular.system.model.Typhoon; +import lombok.Data; + +/** + * @author a203 + */ +@Data +public class TyphoonDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 数据更新时间 + */ + private String time; + + public TyphoonDTO(Typhoon data) { + this.typhoonId = data.getTyphoonId(); + this.name = data.getName(); + this.engName = data.getEngName(); + this.lng = data.getLng(); + this.lat = data.getLat(); + this.typhoonType = data.getTyphoonType(); + this.centerPressure = data.getCenterPressure(); + this.speed = data.getSpeed(); + this.power = data.getPower(); + this.moveSpeed = data.getMoveSpeed(); + this.moveDirection = data.getMoveDirection(); + this.radius10 = data.getRadius10(); + this.radius7 = data.getRadius7(); + this.time = data.getTime(); + } +} 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 new file mode 100644 index 0000000..a34da1b --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -0,0 +1,188 @@ +package com.casic.missiles.modular.system.dto; + +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; +import java.util.List; + +/** + * 台风详情 + * + * @author a203 + */ +@Data +public class TyphoonDetailDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 台风告警级别 + */ + private String warnLevel; + /** + * 台风中心经度 + */ + private Double centerLng; + /** + * 台风中心纬度 + */ + private Double centerLat; + /** + * 台风开始时间 + */ + private String startTime; + /** + * 台风结束时间 + */ + private String endTime; + /** + * 台风状态 + */ + private String isActive; + /** + * 台风登陆点 + */ + private List land; + /** + * 台风路径 + */ + private List points; + + @Data + public static class LandBan { + /** + * 台风登陆点 + */ + private String landAddress; + /** + * 台风类型-热带风暴/强台风... + */ + private String type; + private Double lng; + private Double lat; + /** + * 台风登陆细节 + */ + private String info; + /** + * 台风登陆时间 + */ + private String landTime; + } + + @Data + public static class PointBean { + /** + * 数据更新时间 + */ + private String time; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 12级风力影响半径 + */ + private String radius12; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 台风路线预测 + */ + private String routePrediction; + /** + * 中心位置 + */ + private String centerPosition; + } + + public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + this.typhoonId = detail.getTyphoonId(); + this.name = detail.getName(); + this.engName = detail.getEngName(); + this.warnLevel = detail.getWarnLevel(); + this.centerLng = detail.getCenterLng(); + this.centerLat = detail.getCenterLat(); + this.startTime = detail.getStartTime(); + this.endTime = detail.getEndTime(); + this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); + for (TyphoonLand landBean : landBeans) { + LandBan bean = new LandBan(); + bean.landAddress = landBean.getLandAddress(); + bean.landTime = landBean.getLandTime(); + bean.type = landBean.getType(); + bean.lng = landBean.getLng(); + bean.lat = landBean.getLat(); + bean.info = landBean.getInfo(); + lands.add(bean); + } + this.land = lands; + List points = new ArrayList<>(); + for (TyphoonPoint point : pointBeans) { + PointBean pointBean = new PointBean(); + pointBean.time = point.getTime(); + pointBean.centerPressure = point.getCenterPressure(); + pointBean.speed = point.getSpeed(); + pointBean.typhoonType = point.getTyphoonType(); + pointBean.moveSpeed = point.getMoveSpeed(); + pointBean.power = point.getPower(); + pointBean.moveDirection = point.getMoveDirection(); + pointBean.lng = point.getLng(); + pointBean.lat = point.getLat(); + pointBean.radius12 = point.getRadius12(); + pointBean.radius10 = point.getRadius10(); + pointBean.radius7 = point.getRadius7(); + pointBean.routePrediction = point.getRoutePrediction(); + pointBean.centerPosition = point.getCenterPosition(); + points.add(pointBean); + } + this.points = points; + } +} 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 new file mode 100644 index 0000000..5b70924 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java @@ -0,0 +1,419 @@ +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/pom.xml b/casic-environment/pom.xml new file mode 100644 index 0000000..5aa6394 --- /dev/null +++ b/casic-environment/pom.xml @@ -0,0 +1,72 @@ + + + 4.0.0 + + com.casic + casic-template + ../pom.xml + 2.0.0 + + + casic-environment + 2.0.0 + jar + casic-environment + + + + + com.casic + casic-core + ${core.version} + provided + + + com.casic + casic-admin-support + ${admin.version} + provided + + + org.springframework.boot + spring-boot-starter-web + ${boot.version} + provided + + + com.casic + casic-server-support + 1.0.0 + + + + com.alibaba + fastjson + ${fastjson.version} + + + com.squareup.okhttp3 + okhttp + 4.9.1 + + + + org.locationtech.spatial4j + spatial4j + 0.8 + + + + + + + src/main/java + + **/*.xml + + + + + \ No newline at end of file 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 new file mode 100644 index 0000000..041adcd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -0,0 +1,26 @@ +package com.casic.missiles.job; + +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +/** + * @author lwh + * 台风数据定时任务,每小时执行一次 + * @ClassName TyphoonQuartzJob + * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling + */ +@Component +public class TyphoonQuartzJob { + private final ITyphoonService typhoonService; + + public TyphoonQuartzJob(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + @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/controller/EnvironmentController.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java new file mode 100644 index 0000000..0f2a0ed --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java @@ -0,0 +1,48 @@ +package com.casic.missiles.modular.system.controller; + +import com.casic.missiles.model.response.ResponseData; +import com.casic.missiles.modular.system.dto.TyphoonDTO; +import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.List; + +/** + * 环境控制器 + * + * @author a203 + */ +@Controller +@RequestMapping("/environment") +public class EnvironmentController { + private final ITyphoonService typhoonService; + + public EnvironmentController(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + /** + * 台风列表 + */ + @GetMapping(value = "/typhoonList") + @ResponseBody + public Object list() { + List typhoonList = typhoonService.currentTyphoonList(); + return ResponseData.success(typhoonList); + } + + /** + * 台风详情 + */ + @GetMapping(value = "/typhoonDetail/{typhoonId}") + @ResponseBody + public Object detail(@PathVariable("typhoonId") String typhoonId) { + TyphoonDetailDTO detailDTO = typhoonService.typhoonDetail(typhoonId); + return ResponseData.success(detailDTO); + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java new file mode 100644 index 0000000..9788030 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.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.TyphoonDetail; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonDetailMapper 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 new file mode 100644 index 0000000..c60bfab --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.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.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 new file mode 100644 index 0000000..70ea807 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.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.Typhoon; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonMapper extends BaseMapper { + +} 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 new file mode 100644 index 0000000..9745785 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.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.TyphoonPoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java new file mode 100644 index 0000000..cdef9a4 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java @@ -0,0 +1,84 @@ +package com.casic.missiles.modular.system.dto; + +import com.casic.missiles.modular.system.model.Typhoon; +import lombok.Data; + +/** + * @author a203 + */ +@Data +public class TyphoonDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 数据更新时间 + */ + private String time; + + public TyphoonDTO(Typhoon data) { + this.typhoonId = data.getTyphoonId(); + this.name = data.getName(); + this.engName = data.getEngName(); + this.lng = data.getLng(); + this.lat = data.getLat(); + this.typhoonType = data.getTyphoonType(); + this.centerPressure = data.getCenterPressure(); + this.speed = data.getSpeed(); + this.power = data.getPower(); + this.moveSpeed = data.getMoveSpeed(); + this.moveDirection = data.getMoveDirection(); + this.radius10 = data.getRadius10(); + this.radius7 = data.getRadius7(); + this.time = data.getTime(); + } +} 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 new file mode 100644 index 0000000..a34da1b --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -0,0 +1,188 @@ +package com.casic.missiles.modular.system.dto; + +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; +import java.util.List; + +/** + * 台风详情 + * + * @author a203 + */ +@Data +public class TyphoonDetailDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 台风告警级别 + */ + private String warnLevel; + /** + * 台风中心经度 + */ + private Double centerLng; + /** + * 台风中心纬度 + */ + private Double centerLat; + /** + * 台风开始时间 + */ + private String startTime; + /** + * 台风结束时间 + */ + private String endTime; + /** + * 台风状态 + */ + private String isActive; + /** + * 台风登陆点 + */ + private List land; + /** + * 台风路径 + */ + private List points; + + @Data + public static class LandBan { + /** + * 台风登陆点 + */ + private String landAddress; + /** + * 台风类型-热带风暴/强台风... + */ + private String type; + private Double lng; + private Double lat; + /** + * 台风登陆细节 + */ + private String info; + /** + * 台风登陆时间 + */ + private String landTime; + } + + @Data + public static class PointBean { + /** + * 数据更新时间 + */ + private String time; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 12级风力影响半径 + */ + private String radius12; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 台风路线预测 + */ + private String routePrediction; + /** + * 中心位置 + */ + private String centerPosition; + } + + public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + this.typhoonId = detail.getTyphoonId(); + this.name = detail.getName(); + this.engName = detail.getEngName(); + this.warnLevel = detail.getWarnLevel(); + this.centerLng = detail.getCenterLng(); + this.centerLat = detail.getCenterLat(); + this.startTime = detail.getStartTime(); + this.endTime = detail.getEndTime(); + this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); + for (TyphoonLand landBean : landBeans) { + LandBan bean = new LandBan(); + bean.landAddress = landBean.getLandAddress(); + bean.landTime = landBean.getLandTime(); + bean.type = landBean.getType(); + bean.lng = landBean.getLng(); + bean.lat = landBean.getLat(); + bean.info = landBean.getInfo(); + lands.add(bean); + } + this.land = lands; + List points = new ArrayList<>(); + for (TyphoonPoint point : pointBeans) { + PointBean pointBean = new PointBean(); + pointBean.time = point.getTime(); + pointBean.centerPressure = point.getCenterPressure(); + pointBean.speed = point.getSpeed(); + pointBean.typhoonType = point.getTyphoonType(); + pointBean.moveSpeed = point.getMoveSpeed(); + pointBean.power = point.getPower(); + pointBean.moveDirection = point.getMoveDirection(); + pointBean.lng = point.getLng(); + pointBean.lat = point.getLat(); + pointBean.radius12 = point.getRadius12(); + pointBean.radius10 = point.getRadius10(); + pointBean.radius7 = point.getRadius7(); + pointBean.routePrediction = point.getRoutePrediction(); + pointBean.centerPosition = point.getCenterPosition(); + points.add(pointBean); + } + this.points = points; + } +} 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 new file mode 100644 index 0000000..5b70924 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java @@ -0,0 +1,419 @@ +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/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java new file mode 100644 index 0000000..38a9257 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java @@ -0,0 +1,237 @@ +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/pom.xml b/casic-environment/pom.xml new file mode 100644 index 0000000..5aa6394 --- /dev/null +++ b/casic-environment/pom.xml @@ -0,0 +1,72 @@ + + + 4.0.0 + + com.casic + casic-template + ../pom.xml + 2.0.0 + + + casic-environment + 2.0.0 + jar + casic-environment + + + + + com.casic + casic-core + ${core.version} + provided + + + com.casic + casic-admin-support + ${admin.version} + provided + + + org.springframework.boot + spring-boot-starter-web + ${boot.version} + provided + + + com.casic + casic-server-support + 1.0.0 + + + + com.alibaba + fastjson + ${fastjson.version} + + + com.squareup.okhttp3 + okhttp + 4.9.1 + + + + org.locationtech.spatial4j + spatial4j + 0.8 + + + + + + + src/main/java + + **/*.xml + + + + + \ No newline at end of file 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 new file mode 100644 index 0000000..041adcd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -0,0 +1,26 @@ +package com.casic.missiles.job; + +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +/** + * @author lwh + * 台风数据定时任务,每小时执行一次 + * @ClassName TyphoonQuartzJob + * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling + */ +@Component +public class TyphoonQuartzJob { + private final ITyphoonService typhoonService; + + public TyphoonQuartzJob(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + @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/controller/EnvironmentController.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java new file mode 100644 index 0000000..0f2a0ed --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java @@ -0,0 +1,48 @@ +package com.casic.missiles.modular.system.controller; + +import com.casic.missiles.model.response.ResponseData; +import com.casic.missiles.modular.system.dto.TyphoonDTO; +import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.List; + +/** + * 环境控制器 + * + * @author a203 + */ +@Controller +@RequestMapping("/environment") +public class EnvironmentController { + private final ITyphoonService typhoonService; + + public EnvironmentController(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + /** + * 台风列表 + */ + @GetMapping(value = "/typhoonList") + @ResponseBody + public Object list() { + List typhoonList = typhoonService.currentTyphoonList(); + return ResponseData.success(typhoonList); + } + + /** + * 台风详情 + */ + @GetMapping(value = "/typhoonDetail/{typhoonId}") + @ResponseBody + public Object detail(@PathVariable("typhoonId") String typhoonId) { + TyphoonDetailDTO detailDTO = typhoonService.typhoonDetail(typhoonId); + return ResponseData.success(detailDTO); + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java new file mode 100644 index 0000000..9788030 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.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.TyphoonDetail; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonDetailMapper 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 new file mode 100644 index 0000000..c60bfab --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.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.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 new file mode 100644 index 0000000..70ea807 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.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.Typhoon; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonMapper extends BaseMapper { + +} 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 new file mode 100644 index 0000000..9745785 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.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.TyphoonPoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java new file mode 100644 index 0000000..cdef9a4 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java @@ -0,0 +1,84 @@ +package com.casic.missiles.modular.system.dto; + +import com.casic.missiles.modular.system.model.Typhoon; +import lombok.Data; + +/** + * @author a203 + */ +@Data +public class TyphoonDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 数据更新时间 + */ + private String time; + + public TyphoonDTO(Typhoon data) { + this.typhoonId = data.getTyphoonId(); + this.name = data.getName(); + this.engName = data.getEngName(); + this.lng = data.getLng(); + this.lat = data.getLat(); + this.typhoonType = data.getTyphoonType(); + this.centerPressure = data.getCenterPressure(); + this.speed = data.getSpeed(); + this.power = data.getPower(); + this.moveSpeed = data.getMoveSpeed(); + this.moveDirection = data.getMoveDirection(); + this.radius10 = data.getRadius10(); + this.radius7 = data.getRadius7(); + this.time = data.getTime(); + } +} 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 new file mode 100644 index 0000000..a34da1b --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -0,0 +1,188 @@ +package com.casic.missiles.modular.system.dto; + +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; +import java.util.List; + +/** + * 台风详情 + * + * @author a203 + */ +@Data +public class TyphoonDetailDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 台风告警级别 + */ + private String warnLevel; + /** + * 台风中心经度 + */ + private Double centerLng; + /** + * 台风中心纬度 + */ + private Double centerLat; + /** + * 台风开始时间 + */ + private String startTime; + /** + * 台风结束时间 + */ + private String endTime; + /** + * 台风状态 + */ + private String isActive; + /** + * 台风登陆点 + */ + private List land; + /** + * 台风路径 + */ + private List points; + + @Data + public static class LandBan { + /** + * 台风登陆点 + */ + private String landAddress; + /** + * 台风类型-热带风暴/强台风... + */ + private String type; + private Double lng; + private Double lat; + /** + * 台风登陆细节 + */ + private String info; + /** + * 台风登陆时间 + */ + private String landTime; + } + + @Data + public static class PointBean { + /** + * 数据更新时间 + */ + private String time; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 12级风力影响半径 + */ + private String radius12; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 台风路线预测 + */ + private String routePrediction; + /** + * 中心位置 + */ + private String centerPosition; + } + + public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + this.typhoonId = detail.getTyphoonId(); + this.name = detail.getName(); + this.engName = detail.getEngName(); + this.warnLevel = detail.getWarnLevel(); + this.centerLng = detail.getCenterLng(); + this.centerLat = detail.getCenterLat(); + this.startTime = detail.getStartTime(); + this.endTime = detail.getEndTime(); + this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); + for (TyphoonLand landBean : landBeans) { + LandBan bean = new LandBan(); + bean.landAddress = landBean.getLandAddress(); + bean.landTime = landBean.getLandTime(); + bean.type = landBean.getType(); + bean.lng = landBean.getLng(); + bean.lat = landBean.getLat(); + bean.info = landBean.getInfo(); + lands.add(bean); + } + this.land = lands; + List points = new ArrayList<>(); + for (TyphoonPoint point : pointBeans) { + PointBean pointBean = new PointBean(); + pointBean.time = point.getTime(); + pointBean.centerPressure = point.getCenterPressure(); + pointBean.speed = point.getSpeed(); + pointBean.typhoonType = point.getTyphoonType(); + pointBean.moveSpeed = point.getMoveSpeed(); + pointBean.power = point.getPower(); + pointBean.moveDirection = point.getMoveDirection(); + pointBean.lng = point.getLng(); + pointBean.lat = point.getLat(); + pointBean.radius12 = point.getRadius12(); + pointBean.radius10 = point.getRadius10(); + pointBean.radius7 = point.getRadius7(); + pointBean.routePrediction = point.getRoutePrediction(); + pointBean.centerPosition = point.getCenterPosition(); + points.add(pointBean); + } + this.points = points; + } +} 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 new file mode 100644 index 0000000..5b70924 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java @@ -0,0 +1,419 @@ +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/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java new file mode 100644 index 0000000..38a9257 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java @@ -0,0 +1,237 @@ +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/ITyphoonDetailService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonDetailService.java new file mode 100644 index 0000000..15c757a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonDetailService.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.TyphoonDetail; + +/** + * 台风详情数据信息 服务类 + * + * @author a203 + */ +public interface ITyphoonDetailService extends IService { + +} diff --git a/casic-environment/pom.xml b/casic-environment/pom.xml new file mode 100644 index 0000000..5aa6394 --- /dev/null +++ b/casic-environment/pom.xml @@ -0,0 +1,72 @@ + + + 4.0.0 + + com.casic + casic-template + ../pom.xml + 2.0.0 + + + casic-environment + 2.0.0 + jar + casic-environment + + + + + com.casic + casic-core + ${core.version} + provided + + + com.casic + casic-admin-support + ${admin.version} + provided + + + org.springframework.boot + spring-boot-starter-web + ${boot.version} + provided + + + com.casic + casic-server-support + 1.0.0 + + + + com.alibaba + fastjson + ${fastjson.version} + + + com.squareup.okhttp3 + okhttp + 4.9.1 + + + + org.locationtech.spatial4j + spatial4j + 0.8 + + + + + + + src/main/java + + **/*.xml + + + + + \ No newline at end of file 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 new file mode 100644 index 0000000..041adcd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -0,0 +1,26 @@ +package com.casic.missiles.job; + +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +/** + * @author lwh + * 台风数据定时任务,每小时执行一次 + * @ClassName TyphoonQuartzJob + * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling + */ +@Component +public class TyphoonQuartzJob { + private final ITyphoonService typhoonService; + + public TyphoonQuartzJob(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + @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/controller/EnvironmentController.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java new file mode 100644 index 0000000..0f2a0ed --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java @@ -0,0 +1,48 @@ +package com.casic.missiles.modular.system.controller; + +import com.casic.missiles.model.response.ResponseData; +import com.casic.missiles.modular.system.dto.TyphoonDTO; +import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.List; + +/** + * 环境控制器 + * + * @author a203 + */ +@Controller +@RequestMapping("/environment") +public class EnvironmentController { + private final ITyphoonService typhoonService; + + public EnvironmentController(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + /** + * 台风列表 + */ + @GetMapping(value = "/typhoonList") + @ResponseBody + public Object list() { + List typhoonList = typhoonService.currentTyphoonList(); + return ResponseData.success(typhoonList); + } + + /** + * 台风详情 + */ + @GetMapping(value = "/typhoonDetail/{typhoonId}") + @ResponseBody + public Object detail(@PathVariable("typhoonId") String typhoonId) { + TyphoonDetailDTO detailDTO = typhoonService.typhoonDetail(typhoonId); + return ResponseData.success(detailDTO); + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java new file mode 100644 index 0000000..9788030 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.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.TyphoonDetail; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonDetailMapper 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 new file mode 100644 index 0000000..c60bfab --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.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.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 new file mode 100644 index 0000000..70ea807 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.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.Typhoon; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonMapper extends BaseMapper { + +} 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 new file mode 100644 index 0000000..9745785 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.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.TyphoonPoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java new file mode 100644 index 0000000..cdef9a4 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java @@ -0,0 +1,84 @@ +package com.casic.missiles.modular.system.dto; + +import com.casic.missiles.modular.system.model.Typhoon; +import lombok.Data; + +/** + * @author a203 + */ +@Data +public class TyphoonDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 数据更新时间 + */ + private String time; + + public TyphoonDTO(Typhoon data) { + this.typhoonId = data.getTyphoonId(); + this.name = data.getName(); + this.engName = data.getEngName(); + this.lng = data.getLng(); + this.lat = data.getLat(); + this.typhoonType = data.getTyphoonType(); + this.centerPressure = data.getCenterPressure(); + this.speed = data.getSpeed(); + this.power = data.getPower(); + this.moveSpeed = data.getMoveSpeed(); + this.moveDirection = data.getMoveDirection(); + this.radius10 = data.getRadius10(); + this.radius7 = data.getRadius7(); + this.time = data.getTime(); + } +} 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 new file mode 100644 index 0000000..a34da1b --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -0,0 +1,188 @@ +package com.casic.missiles.modular.system.dto; + +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; +import java.util.List; + +/** + * 台风详情 + * + * @author a203 + */ +@Data +public class TyphoonDetailDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 台风告警级别 + */ + private String warnLevel; + /** + * 台风中心经度 + */ + private Double centerLng; + /** + * 台风中心纬度 + */ + private Double centerLat; + /** + * 台风开始时间 + */ + private String startTime; + /** + * 台风结束时间 + */ + private String endTime; + /** + * 台风状态 + */ + private String isActive; + /** + * 台风登陆点 + */ + private List land; + /** + * 台风路径 + */ + private List points; + + @Data + public static class LandBan { + /** + * 台风登陆点 + */ + private String landAddress; + /** + * 台风类型-热带风暴/强台风... + */ + private String type; + private Double lng; + private Double lat; + /** + * 台风登陆细节 + */ + private String info; + /** + * 台风登陆时间 + */ + private String landTime; + } + + @Data + public static class PointBean { + /** + * 数据更新时间 + */ + private String time; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 12级风力影响半径 + */ + private String radius12; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 台风路线预测 + */ + private String routePrediction; + /** + * 中心位置 + */ + private String centerPosition; + } + + public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + this.typhoonId = detail.getTyphoonId(); + this.name = detail.getName(); + this.engName = detail.getEngName(); + this.warnLevel = detail.getWarnLevel(); + this.centerLng = detail.getCenterLng(); + this.centerLat = detail.getCenterLat(); + this.startTime = detail.getStartTime(); + this.endTime = detail.getEndTime(); + this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); + for (TyphoonLand landBean : landBeans) { + LandBan bean = new LandBan(); + bean.landAddress = landBean.getLandAddress(); + bean.landTime = landBean.getLandTime(); + bean.type = landBean.getType(); + bean.lng = landBean.getLng(); + bean.lat = landBean.getLat(); + bean.info = landBean.getInfo(); + lands.add(bean); + } + this.land = lands; + List points = new ArrayList<>(); + for (TyphoonPoint point : pointBeans) { + PointBean pointBean = new PointBean(); + pointBean.time = point.getTime(); + pointBean.centerPressure = point.getCenterPressure(); + pointBean.speed = point.getSpeed(); + pointBean.typhoonType = point.getTyphoonType(); + pointBean.moveSpeed = point.getMoveSpeed(); + pointBean.power = point.getPower(); + pointBean.moveDirection = point.getMoveDirection(); + pointBean.lng = point.getLng(); + pointBean.lat = point.getLat(); + pointBean.radius12 = point.getRadius12(); + pointBean.radius10 = point.getRadius10(); + pointBean.radius7 = point.getRadius7(); + pointBean.routePrediction = point.getRoutePrediction(); + pointBean.centerPosition = point.getCenterPosition(); + points.add(pointBean); + } + this.points = points; + } +} 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 new file mode 100644 index 0000000..5b70924 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java @@ -0,0 +1,419 @@ +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/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java new file mode 100644 index 0000000..38a9257 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java @@ -0,0 +1,237 @@ +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/ITyphoonDetailService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonDetailService.java new file mode 100644 index 0000000..15c757a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonDetailService.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.TyphoonDetail; + +/** + * 台风详情数据信息 服务类 + * + * @author a203 + */ +public interface ITyphoonDetailService 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 new file mode 100644 index 0000000..d16a48b --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.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.TyphoonLand; + +/** + * 台风登陆点数据信息 服务类 + * + * @author a203 + */ +public interface ITyphoonLandService extends IService { + +} diff --git a/casic-environment/pom.xml b/casic-environment/pom.xml new file mode 100644 index 0000000..5aa6394 --- /dev/null +++ b/casic-environment/pom.xml @@ -0,0 +1,72 @@ + + + 4.0.0 + + com.casic + casic-template + ../pom.xml + 2.0.0 + + + casic-environment + 2.0.0 + jar + casic-environment + + + + + com.casic + casic-core + ${core.version} + provided + + + com.casic + casic-admin-support + ${admin.version} + provided + + + org.springframework.boot + spring-boot-starter-web + ${boot.version} + provided + + + com.casic + casic-server-support + 1.0.0 + + + + com.alibaba + fastjson + ${fastjson.version} + + + com.squareup.okhttp3 + okhttp + 4.9.1 + + + + org.locationtech.spatial4j + spatial4j + 0.8 + + + + + + + src/main/java + + **/*.xml + + + + + \ No newline at end of file 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 new file mode 100644 index 0000000..041adcd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -0,0 +1,26 @@ +package com.casic.missiles.job; + +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +/** + * @author lwh + * 台风数据定时任务,每小时执行一次 + * @ClassName TyphoonQuartzJob + * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling + */ +@Component +public class TyphoonQuartzJob { + private final ITyphoonService typhoonService; + + public TyphoonQuartzJob(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + @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/controller/EnvironmentController.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java new file mode 100644 index 0000000..0f2a0ed --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java @@ -0,0 +1,48 @@ +package com.casic.missiles.modular.system.controller; + +import com.casic.missiles.model.response.ResponseData; +import com.casic.missiles.modular.system.dto.TyphoonDTO; +import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.List; + +/** + * 环境控制器 + * + * @author a203 + */ +@Controller +@RequestMapping("/environment") +public class EnvironmentController { + private final ITyphoonService typhoonService; + + public EnvironmentController(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + /** + * 台风列表 + */ + @GetMapping(value = "/typhoonList") + @ResponseBody + public Object list() { + List typhoonList = typhoonService.currentTyphoonList(); + return ResponseData.success(typhoonList); + } + + /** + * 台风详情 + */ + @GetMapping(value = "/typhoonDetail/{typhoonId}") + @ResponseBody + public Object detail(@PathVariable("typhoonId") String typhoonId) { + TyphoonDetailDTO detailDTO = typhoonService.typhoonDetail(typhoonId); + return ResponseData.success(detailDTO); + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java new file mode 100644 index 0000000..9788030 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.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.TyphoonDetail; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonDetailMapper 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 new file mode 100644 index 0000000..c60bfab --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.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.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 new file mode 100644 index 0000000..70ea807 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.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.Typhoon; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonMapper extends BaseMapper { + +} 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 new file mode 100644 index 0000000..9745785 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.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.TyphoonPoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java new file mode 100644 index 0000000..cdef9a4 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java @@ -0,0 +1,84 @@ +package com.casic.missiles.modular.system.dto; + +import com.casic.missiles.modular.system.model.Typhoon; +import lombok.Data; + +/** + * @author a203 + */ +@Data +public class TyphoonDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 数据更新时间 + */ + private String time; + + public TyphoonDTO(Typhoon data) { + this.typhoonId = data.getTyphoonId(); + this.name = data.getName(); + this.engName = data.getEngName(); + this.lng = data.getLng(); + this.lat = data.getLat(); + this.typhoonType = data.getTyphoonType(); + this.centerPressure = data.getCenterPressure(); + this.speed = data.getSpeed(); + this.power = data.getPower(); + this.moveSpeed = data.getMoveSpeed(); + this.moveDirection = data.getMoveDirection(); + this.radius10 = data.getRadius10(); + this.radius7 = data.getRadius7(); + this.time = data.getTime(); + } +} 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 new file mode 100644 index 0000000..a34da1b --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -0,0 +1,188 @@ +package com.casic.missiles.modular.system.dto; + +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; +import java.util.List; + +/** + * 台风详情 + * + * @author a203 + */ +@Data +public class TyphoonDetailDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 台风告警级别 + */ + private String warnLevel; + /** + * 台风中心经度 + */ + private Double centerLng; + /** + * 台风中心纬度 + */ + private Double centerLat; + /** + * 台风开始时间 + */ + private String startTime; + /** + * 台风结束时间 + */ + private String endTime; + /** + * 台风状态 + */ + private String isActive; + /** + * 台风登陆点 + */ + private List land; + /** + * 台风路径 + */ + private List points; + + @Data + public static class LandBan { + /** + * 台风登陆点 + */ + private String landAddress; + /** + * 台风类型-热带风暴/强台风... + */ + private String type; + private Double lng; + private Double lat; + /** + * 台风登陆细节 + */ + private String info; + /** + * 台风登陆时间 + */ + private String landTime; + } + + @Data + public static class PointBean { + /** + * 数据更新时间 + */ + private String time; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 12级风力影响半径 + */ + private String radius12; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 台风路线预测 + */ + private String routePrediction; + /** + * 中心位置 + */ + private String centerPosition; + } + + public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + this.typhoonId = detail.getTyphoonId(); + this.name = detail.getName(); + this.engName = detail.getEngName(); + this.warnLevel = detail.getWarnLevel(); + this.centerLng = detail.getCenterLng(); + this.centerLat = detail.getCenterLat(); + this.startTime = detail.getStartTime(); + this.endTime = detail.getEndTime(); + this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); + for (TyphoonLand landBean : landBeans) { + LandBan bean = new LandBan(); + bean.landAddress = landBean.getLandAddress(); + bean.landTime = landBean.getLandTime(); + bean.type = landBean.getType(); + bean.lng = landBean.getLng(); + bean.lat = landBean.getLat(); + bean.info = landBean.getInfo(); + lands.add(bean); + } + this.land = lands; + List points = new ArrayList<>(); + for (TyphoonPoint point : pointBeans) { + PointBean pointBean = new PointBean(); + pointBean.time = point.getTime(); + pointBean.centerPressure = point.getCenterPressure(); + pointBean.speed = point.getSpeed(); + pointBean.typhoonType = point.getTyphoonType(); + pointBean.moveSpeed = point.getMoveSpeed(); + pointBean.power = point.getPower(); + pointBean.moveDirection = point.getMoveDirection(); + pointBean.lng = point.getLng(); + pointBean.lat = point.getLat(); + pointBean.radius12 = point.getRadius12(); + pointBean.radius10 = point.getRadius10(); + pointBean.radius7 = point.getRadius7(); + pointBean.routePrediction = point.getRoutePrediction(); + pointBean.centerPosition = point.getCenterPosition(); + points.add(pointBean); + } + this.points = points; + } +} 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 new file mode 100644 index 0000000..5b70924 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java @@ -0,0 +1,419 @@ +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/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java new file mode 100644 index 0000000..38a9257 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java @@ -0,0 +1,237 @@ +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/ITyphoonDetailService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonDetailService.java new file mode 100644 index 0000000..15c757a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonDetailService.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.TyphoonDetail; + +/** + * 台风详情数据信息 服务类 + * + * @author a203 + */ +public interface ITyphoonDetailService 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 new file mode 100644 index 0000000..d16a48b --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.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.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 new file mode 100644 index 0000000..80e2765 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.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.TyphoonPoint; + +/** + * 台风移动点数据信息 服务类 + * + * @author a203 + */ +public interface ITyphoonPointService extends IService { + +} diff --git a/casic-environment/pom.xml b/casic-environment/pom.xml new file mode 100644 index 0000000..5aa6394 --- /dev/null +++ b/casic-environment/pom.xml @@ -0,0 +1,72 @@ + + + 4.0.0 + + com.casic + casic-template + ../pom.xml + 2.0.0 + + + casic-environment + 2.0.0 + jar + casic-environment + + + + + com.casic + casic-core + ${core.version} + provided + + + com.casic + casic-admin-support + ${admin.version} + provided + + + org.springframework.boot + spring-boot-starter-web + ${boot.version} + provided + + + com.casic + casic-server-support + 1.0.0 + + + + com.alibaba + fastjson + ${fastjson.version} + + + com.squareup.okhttp3 + okhttp + 4.9.1 + + + + org.locationtech.spatial4j + spatial4j + 0.8 + + + + + + + src/main/java + + **/*.xml + + + + + \ No newline at end of file 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 new file mode 100644 index 0000000..041adcd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -0,0 +1,26 @@ +package com.casic.missiles.job; + +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +/** + * @author lwh + * 台风数据定时任务,每小时执行一次 + * @ClassName TyphoonQuartzJob + * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling + */ +@Component +public class TyphoonQuartzJob { + private final ITyphoonService typhoonService; + + public TyphoonQuartzJob(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + @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/controller/EnvironmentController.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java new file mode 100644 index 0000000..0f2a0ed --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java @@ -0,0 +1,48 @@ +package com.casic.missiles.modular.system.controller; + +import com.casic.missiles.model.response.ResponseData; +import com.casic.missiles.modular.system.dto.TyphoonDTO; +import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.List; + +/** + * 环境控制器 + * + * @author a203 + */ +@Controller +@RequestMapping("/environment") +public class EnvironmentController { + private final ITyphoonService typhoonService; + + public EnvironmentController(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + /** + * 台风列表 + */ + @GetMapping(value = "/typhoonList") + @ResponseBody + public Object list() { + List typhoonList = typhoonService.currentTyphoonList(); + return ResponseData.success(typhoonList); + } + + /** + * 台风详情 + */ + @GetMapping(value = "/typhoonDetail/{typhoonId}") + @ResponseBody + public Object detail(@PathVariable("typhoonId") String typhoonId) { + TyphoonDetailDTO detailDTO = typhoonService.typhoonDetail(typhoonId); + return ResponseData.success(detailDTO); + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java new file mode 100644 index 0000000..9788030 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.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.TyphoonDetail; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonDetailMapper 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 new file mode 100644 index 0000000..c60bfab --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.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.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 new file mode 100644 index 0000000..70ea807 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.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.Typhoon; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonMapper extends BaseMapper { + +} 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 new file mode 100644 index 0000000..9745785 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.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.TyphoonPoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java new file mode 100644 index 0000000..cdef9a4 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java @@ -0,0 +1,84 @@ +package com.casic.missiles.modular.system.dto; + +import com.casic.missiles.modular.system.model.Typhoon; +import lombok.Data; + +/** + * @author a203 + */ +@Data +public class TyphoonDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 数据更新时间 + */ + private String time; + + public TyphoonDTO(Typhoon data) { + this.typhoonId = data.getTyphoonId(); + this.name = data.getName(); + this.engName = data.getEngName(); + this.lng = data.getLng(); + this.lat = data.getLat(); + this.typhoonType = data.getTyphoonType(); + this.centerPressure = data.getCenterPressure(); + this.speed = data.getSpeed(); + this.power = data.getPower(); + this.moveSpeed = data.getMoveSpeed(); + this.moveDirection = data.getMoveDirection(); + this.radius10 = data.getRadius10(); + this.radius7 = data.getRadius7(); + this.time = data.getTime(); + } +} 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 new file mode 100644 index 0000000..a34da1b --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -0,0 +1,188 @@ +package com.casic.missiles.modular.system.dto; + +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; +import java.util.List; + +/** + * 台风详情 + * + * @author a203 + */ +@Data +public class TyphoonDetailDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 台风告警级别 + */ + private String warnLevel; + /** + * 台风中心经度 + */ + private Double centerLng; + /** + * 台风中心纬度 + */ + private Double centerLat; + /** + * 台风开始时间 + */ + private String startTime; + /** + * 台风结束时间 + */ + private String endTime; + /** + * 台风状态 + */ + private String isActive; + /** + * 台风登陆点 + */ + private List land; + /** + * 台风路径 + */ + private List points; + + @Data + public static class LandBan { + /** + * 台风登陆点 + */ + private String landAddress; + /** + * 台风类型-热带风暴/强台风... + */ + private String type; + private Double lng; + private Double lat; + /** + * 台风登陆细节 + */ + private String info; + /** + * 台风登陆时间 + */ + private String landTime; + } + + @Data + public static class PointBean { + /** + * 数据更新时间 + */ + private String time; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 12级风力影响半径 + */ + private String radius12; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 台风路线预测 + */ + private String routePrediction; + /** + * 中心位置 + */ + private String centerPosition; + } + + public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + this.typhoonId = detail.getTyphoonId(); + this.name = detail.getName(); + this.engName = detail.getEngName(); + this.warnLevel = detail.getWarnLevel(); + this.centerLng = detail.getCenterLng(); + this.centerLat = detail.getCenterLat(); + this.startTime = detail.getStartTime(); + this.endTime = detail.getEndTime(); + this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); + for (TyphoonLand landBean : landBeans) { + LandBan bean = new LandBan(); + bean.landAddress = landBean.getLandAddress(); + bean.landTime = landBean.getLandTime(); + bean.type = landBean.getType(); + bean.lng = landBean.getLng(); + bean.lat = landBean.getLat(); + bean.info = landBean.getInfo(); + lands.add(bean); + } + this.land = lands; + List points = new ArrayList<>(); + for (TyphoonPoint point : pointBeans) { + PointBean pointBean = new PointBean(); + pointBean.time = point.getTime(); + pointBean.centerPressure = point.getCenterPressure(); + pointBean.speed = point.getSpeed(); + pointBean.typhoonType = point.getTyphoonType(); + pointBean.moveSpeed = point.getMoveSpeed(); + pointBean.power = point.getPower(); + pointBean.moveDirection = point.getMoveDirection(); + pointBean.lng = point.getLng(); + pointBean.lat = point.getLat(); + pointBean.radius12 = point.getRadius12(); + pointBean.radius10 = point.getRadius10(); + pointBean.radius7 = point.getRadius7(); + pointBean.routePrediction = point.getRoutePrediction(); + pointBean.centerPosition = point.getCenterPosition(); + points.add(pointBean); + } + this.points = points; + } +} 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 new file mode 100644 index 0000000..5b70924 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java @@ -0,0 +1,419 @@ +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/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java new file mode 100644 index 0000000..38a9257 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java @@ -0,0 +1,237 @@ +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/ITyphoonDetailService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonDetailService.java new file mode 100644 index 0000000..15c757a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonDetailService.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.TyphoonDetail; + +/** + * 台风详情数据信息 服务类 + * + * @author a203 + */ +public interface ITyphoonDetailService 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 new file mode 100644 index 0000000..d16a48b --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.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.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 new file mode 100644 index 0000000..80e2765 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.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.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 new file mode 100644 index 0000000..c47a0f3 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java @@ -0,0 +1,42 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.dto.TyphoonDTO; +import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; +import com.casic.missiles.modular.system.model.Typhoon; + +import java.util.List; + +/** + * 台风列表数据信息 服务类 + * + * @author a203 + */ +public interface ITyphoonService extends IService { + /** + * 保存台风列表 + */ + void saveTyphoonList(); + + /** + * 更新台风详情 + */ + void updateTyphoonDetail(); + + /***上面接口从第三方存库,下面接口查库**********************/ + + /** + * 查询台风列表 + * + * @return {@link List} + */ + List currentTyphoonList(); + + /** + * 查询台风详情 + * + * @param typhoonId 台风ID + * @return {@link TyphoonDetailDTO} + */ + TyphoonDetailDTO typhoonDetail(String typhoonId); +} diff --git a/casic-environment/pom.xml b/casic-environment/pom.xml new file mode 100644 index 0000000..5aa6394 --- /dev/null +++ b/casic-environment/pom.xml @@ -0,0 +1,72 @@ + + + 4.0.0 + + com.casic + casic-template + ../pom.xml + 2.0.0 + + + casic-environment + 2.0.0 + jar + casic-environment + + + + + com.casic + casic-core + ${core.version} + provided + + + com.casic + casic-admin-support + ${admin.version} + provided + + + org.springframework.boot + spring-boot-starter-web + ${boot.version} + provided + + + com.casic + casic-server-support + 1.0.0 + + + + com.alibaba + fastjson + ${fastjson.version} + + + com.squareup.okhttp3 + okhttp + 4.9.1 + + + + org.locationtech.spatial4j + spatial4j + 0.8 + + + + + + + src/main/java + + **/*.xml + + + + + \ No newline at end of file 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 new file mode 100644 index 0000000..041adcd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -0,0 +1,26 @@ +package com.casic.missiles.job; + +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +/** + * @author lwh + * 台风数据定时任务,每小时执行一次 + * @ClassName TyphoonQuartzJob + * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling + */ +@Component +public class TyphoonQuartzJob { + private final ITyphoonService typhoonService; + + public TyphoonQuartzJob(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + @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/controller/EnvironmentController.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java new file mode 100644 index 0000000..0f2a0ed --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java @@ -0,0 +1,48 @@ +package com.casic.missiles.modular.system.controller; + +import com.casic.missiles.model.response.ResponseData; +import com.casic.missiles.modular.system.dto.TyphoonDTO; +import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.List; + +/** + * 环境控制器 + * + * @author a203 + */ +@Controller +@RequestMapping("/environment") +public class EnvironmentController { + private final ITyphoonService typhoonService; + + public EnvironmentController(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + /** + * 台风列表 + */ + @GetMapping(value = "/typhoonList") + @ResponseBody + public Object list() { + List typhoonList = typhoonService.currentTyphoonList(); + return ResponseData.success(typhoonList); + } + + /** + * 台风详情 + */ + @GetMapping(value = "/typhoonDetail/{typhoonId}") + @ResponseBody + public Object detail(@PathVariable("typhoonId") String typhoonId) { + TyphoonDetailDTO detailDTO = typhoonService.typhoonDetail(typhoonId); + return ResponseData.success(detailDTO); + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java new file mode 100644 index 0000000..9788030 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.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.TyphoonDetail; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonDetailMapper 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 new file mode 100644 index 0000000..c60bfab --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.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.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 new file mode 100644 index 0000000..70ea807 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.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.Typhoon; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonMapper extends BaseMapper { + +} 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 new file mode 100644 index 0000000..9745785 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.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.TyphoonPoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java new file mode 100644 index 0000000..cdef9a4 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java @@ -0,0 +1,84 @@ +package com.casic.missiles.modular.system.dto; + +import com.casic.missiles.modular.system.model.Typhoon; +import lombok.Data; + +/** + * @author a203 + */ +@Data +public class TyphoonDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 数据更新时间 + */ + private String time; + + public TyphoonDTO(Typhoon data) { + this.typhoonId = data.getTyphoonId(); + this.name = data.getName(); + this.engName = data.getEngName(); + this.lng = data.getLng(); + this.lat = data.getLat(); + this.typhoonType = data.getTyphoonType(); + this.centerPressure = data.getCenterPressure(); + this.speed = data.getSpeed(); + this.power = data.getPower(); + this.moveSpeed = data.getMoveSpeed(); + this.moveDirection = data.getMoveDirection(); + this.radius10 = data.getRadius10(); + this.radius7 = data.getRadius7(); + this.time = data.getTime(); + } +} 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 new file mode 100644 index 0000000..a34da1b --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -0,0 +1,188 @@ +package com.casic.missiles.modular.system.dto; + +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; +import java.util.List; + +/** + * 台风详情 + * + * @author a203 + */ +@Data +public class TyphoonDetailDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 台风告警级别 + */ + private String warnLevel; + /** + * 台风中心经度 + */ + private Double centerLng; + /** + * 台风中心纬度 + */ + private Double centerLat; + /** + * 台风开始时间 + */ + private String startTime; + /** + * 台风结束时间 + */ + private String endTime; + /** + * 台风状态 + */ + private String isActive; + /** + * 台风登陆点 + */ + private List land; + /** + * 台风路径 + */ + private List points; + + @Data + public static class LandBan { + /** + * 台风登陆点 + */ + private String landAddress; + /** + * 台风类型-热带风暴/强台风... + */ + private String type; + private Double lng; + private Double lat; + /** + * 台风登陆细节 + */ + private String info; + /** + * 台风登陆时间 + */ + private String landTime; + } + + @Data + public static class PointBean { + /** + * 数据更新时间 + */ + private String time; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 12级风力影响半径 + */ + private String radius12; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 台风路线预测 + */ + private String routePrediction; + /** + * 中心位置 + */ + private String centerPosition; + } + + public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + this.typhoonId = detail.getTyphoonId(); + this.name = detail.getName(); + this.engName = detail.getEngName(); + this.warnLevel = detail.getWarnLevel(); + this.centerLng = detail.getCenterLng(); + this.centerLat = detail.getCenterLat(); + this.startTime = detail.getStartTime(); + this.endTime = detail.getEndTime(); + this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); + for (TyphoonLand landBean : landBeans) { + LandBan bean = new LandBan(); + bean.landAddress = landBean.getLandAddress(); + bean.landTime = landBean.getLandTime(); + bean.type = landBean.getType(); + bean.lng = landBean.getLng(); + bean.lat = landBean.getLat(); + bean.info = landBean.getInfo(); + lands.add(bean); + } + this.land = lands; + List points = new ArrayList<>(); + for (TyphoonPoint point : pointBeans) { + PointBean pointBean = new PointBean(); + pointBean.time = point.getTime(); + pointBean.centerPressure = point.getCenterPressure(); + pointBean.speed = point.getSpeed(); + pointBean.typhoonType = point.getTyphoonType(); + pointBean.moveSpeed = point.getMoveSpeed(); + pointBean.power = point.getPower(); + pointBean.moveDirection = point.getMoveDirection(); + pointBean.lng = point.getLng(); + pointBean.lat = point.getLat(); + pointBean.radius12 = point.getRadius12(); + pointBean.radius10 = point.getRadius10(); + pointBean.radius7 = point.getRadius7(); + pointBean.routePrediction = point.getRoutePrediction(); + pointBean.centerPosition = point.getCenterPosition(); + points.add(pointBean); + } + this.points = points; + } +} 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 new file mode 100644 index 0000000..5b70924 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java @@ -0,0 +1,419 @@ +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/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java new file mode 100644 index 0000000..38a9257 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java @@ -0,0 +1,237 @@ +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/ITyphoonDetailService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonDetailService.java new file mode 100644 index 0000000..15c757a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonDetailService.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.TyphoonDetail; + +/** + * 台风详情数据信息 服务类 + * + * @author a203 + */ +public interface ITyphoonDetailService 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 new file mode 100644 index 0000000..d16a48b --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.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.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 new file mode 100644 index 0000000..80e2765 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.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.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 new file mode 100644 index 0000000..c47a0f3 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java @@ -0,0 +1,42 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.dto.TyphoonDTO; +import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; +import com.casic.missiles.modular.system.model.Typhoon; + +import java.util.List; + +/** + * 台风列表数据信息 服务类 + * + * @author a203 + */ +public interface ITyphoonService extends IService { + /** + * 保存台风列表 + */ + void saveTyphoonList(); + + /** + * 更新台风详情 + */ + void updateTyphoonDetail(); + + /***上面接口从第三方存库,下面接口查库**********************/ + + /** + * 查询台风列表 + * + * @return {@link List} + */ + List currentTyphoonList(); + + /** + * 查询台风详情 + * + * @param typhoonId 台风ID + * @return {@link TyphoonDetailDTO} + */ + TyphoonDetailDTO typhoonDetail(String typhoonId); +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonDetailServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonDetailServiceImpl.java new file mode 100644 index 0000000..1a054f9 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonDetailServiceImpl.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.TyphoonDetailMapper; +import com.casic.missiles.modular.system.model.TyphoonDetail; +import com.casic.missiles.modular.system.service.ITyphoonDetailService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class TyphoonDetailServiceImpl extends ServiceImpl implements ITyphoonDetailService { + + public TyphoonDetailServiceImpl() { + + } +} diff --git a/casic-environment/pom.xml b/casic-environment/pom.xml new file mode 100644 index 0000000..5aa6394 --- /dev/null +++ b/casic-environment/pom.xml @@ -0,0 +1,72 @@ + + + 4.0.0 + + com.casic + casic-template + ../pom.xml + 2.0.0 + + + casic-environment + 2.0.0 + jar + casic-environment + + + + + com.casic + casic-core + ${core.version} + provided + + + com.casic + casic-admin-support + ${admin.version} + provided + + + org.springframework.boot + spring-boot-starter-web + ${boot.version} + provided + + + com.casic + casic-server-support + 1.0.0 + + + + com.alibaba + fastjson + ${fastjson.version} + + + com.squareup.okhttp3 + okhttp + 4.9.1 + + + + org.locationtech.spatial4j + spatial4j + 0.8 + + + + + + + src/main/java + + **/*.xml + + + + + \ No newline at end of file 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 new file mode 100644 index 0000000..041adcd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -0,0 +1,26 @@ +package com.casic.missiles.job; + +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +/** + * @author lwh + * 台风数据定时任务,每小时执行一次 + * @ClassName TyphoonQuartzJob + * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling + */ +@Component +public class TyphoonQuartzJob { + private final ITyphoonService typhoonService; + + public TyphoonQuartzJob(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + @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/controller/EnvironmentController.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java new file mode 100644 index 0000000..0f2a0ed --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java @@ -0,0 +1,48 @@ +package com.casic.missiles.modular.system.controller; + +import com.casic.missiles.model.response.ResponseData; +import com.casic.missiles.modular.system.dto.TyphoonDTO; +import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.List; + +/** + * 环境控制器 + * + * @author a203 + */ +@Controller +@RequestMapping("/environment") +public class EnvironmentController { + private final ITyphoonService typhoonService; + + public EnvironmentController(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + /** + * 台风列表 + */ + @GetMapping(value = "/typhoonList") + @ResponseBody + public Object list() { + List typhoonList = typhoonService.currentTyphoonList(); + return ResponseData.success(typhoonList); + } + + /** + * 台风详情 + */ + @GetMapping(value = "/typhoonDetail/{typhoonId}") + @ResponseBody + public Object detail(@PathVariable("typhoonId") String typhoonId) { + TyphoonDetailDTO detailDTO = typhoonService.typhoonDetail(typhoonId); + return ResponseData.success(detailDTO); + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java new file mode 100644 index 0000000..9788030 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.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.TyphoonDetail; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonDetailMapper 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 new file mode 100644 index 0000000..c60bfab --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.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.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 new file mode 100644 index 0000000..70ea807 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.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.Typhoon; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonMapper extends BaseMapper { + +} 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 new file mode 100644 index 0000000..9745785 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.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.TyphoonPoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java new file mode 100644 index 0000000..cdef9a4 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java @@ -0,0 +1,84 @@ +package com.casic.missiles.modular.system.dto; + +import com.casic.missiles.modular.system.model.Typhoon; +import lombok.Data; + +/** + * @author a203 + */ +@Data +public class TyphoonDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 数据更新时间 + */ + private String time; + + public TyphoonDTO(Typhoon data) { + this.typhoonId = data.getTyphoonId(); + this.name = data.getName(); + this.engName = data.getEngName(); + this.lng = data.getLng(); + this.lat = data.getLat(); + this.typhoonType = data.getTyphoonType(); + this.centerPressure = data.getCenterPressure(); + this.speed = data.getSpeed(); + this.power = data.getPower(); + this.moveSpeed = data.getMoveSpeed(); + this.moveDirection = data.getMoveDirection(); + this.radius10 = data.getRadius10(); + this.radius7 = data.getRadius7(); + this.time = data.getTime(); + } +} 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 new file mode 100644 index 0000000..a34da1b --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -0,0 +1,188 @@ +package com.casic.missiles.modular.system.dto; + +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; +import java.util.List; + +/** + * 台风详情 + * + * @author a203 + */ +@Data +public class TyphoonDetailDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 台风告警级别 + */ + private String warnLevel; + /** + * 台风中心经度 + */ + private Double centerLng; + /** + * 台风中心纬度 + */ + private Double centerLat; + /** + * 台风开始时间 + */ + private String startTime; + /** + * 台风结束时间 + */ + private String endTime; + /** + * 台风状态 + */ + private String isActive; + /** + * 台风登陆点 + */ + private List land; + /** + * 台风路径 + */ + private List points; + + @Data + public static class LandBan { + /** + * 台风登陆点 + */ + private String landAddress; + /** + * 台风类型-热带风暴/强台风... + */ + private String type; + private Double lng; + private Double lat; + /** + * 台风登陆细节 + */ + private String info; + /** + * 台风登陆时间 + */ + private String landTime; + } + + @Data + public static class PointBean { + /** + * 数据更新时间 + */ + private String time; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 12级风力影响半径 + */ + private String radius12; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 台风路线预测 + */ + private String routePrediction; + /** + * 中心位置 + */ + private String centerPosition; + } + + public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + this.typhoonId = detail.getTyphoonId(); + this.name = detail.getName(); + this.engName = detail.getEngName(); + this.warnLevel = detail.getWarnLevel(); + this.centerLng = detail.getCenterLng(); + this.centerLat = detail.getCenterLat(); + this.startTime = detail.getStartTime(); + this.endTime = detail.getEndTime(); + this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); + for (TyphoonLand landBean : landBeans) { + LandBan bean = new LandBan(); + bean.landAddress = landBean.getLandAddress(); + bean.landTime = landBean.getLandTime(); + bean.type = landBean.getType(); + bean.lng = landBean.getLng(); + bean.lat = landBean.getLat(); + bean.info = landBean.getInfo(); + lands.add(bean); + } + this.land = lands; + List points = new ArrayList<>(); + for (TyphoonPoint point : pointBeans) { + PointBean pointBean = new PointBean(); + pointBean.time = point.getTime(); + pointBean.centerPressure = point.getCenterPressure(); + pointBean.speed = point.getSpeed(); + pointBean.typhoonType = point.getTyphoonType(); + pointBean.moveSpeed = point.getMoveSpeed(); + pointBean.power = point.getPower(); + pointBean.moveDirection = point.getMoveDirection(); + pointBean.lng = point.getLng(); + pointBean.lat = point.getLat(); + pointBean.radius12 = point.getRadius12(); + pointBean.radius10 = point.getRadius10(); + pointBean.radius7 = point.getRadius7(); + pointBean.routePrediction = point.getRoutePrediction(); + pointBean.centerPosition = point.getCenterPosition(); + points.add(pointBean); + } + this.points = points; + } +} 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 new file mode 100644 index 0000000..5b70924 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java @@ -0,0 +1,419 @@ +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/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java new file mode 100644 index 0000000..38a9257 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java @@ -0,0 +1,237 @@ +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/ITyphoonDetailService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonDetailService.java new file mode 100644 index 0000000..15c757a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonDetailService.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.TyphoonDetail; + +/** + * 台风详情数据信息 服务类 + * + * @author a203 + */ +public interface ITyphoonDetailService 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 new file mode 100644 index 0000000..d16a48b --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.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.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 new file mode 100644 index 0000000..80e2765 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.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.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 new file mode 100644 index 0000000..c47a0f3 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java @@ -0,0 +1,42 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.dto.TyphoonDTO; +import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; +import com.casic.missiles.modular.system.model.Typhoon; + +import java.util.List; + +/** + * 台风列表数据信息 服务类 + * + * @author a203 + */ +public interface ITyphoonService extends IService { + /** + * 保存台风列表 + */ + void saveTyphoonList(); + + /** + * 更新台风详情 + */ + void updateTyphoonDetail(); + + /***上面接口从第三方存库,下面接口查库**********************/ + + /** + * 查询台风列表 + * + * @return {@link List} + */ + List currentTyphoonList(); + + /** + * 查询台风详情 + * + * @param typhoonId 台风ID + * @return {@link TyphoonDetailDTO} + */ + TyphoonDetailDTO typhoonDetail(String typhoonId); +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonDetailServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonDetailServiceImpl.java new file mode 100644 index 0000000..1a054f9 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonDetailServiceImpl.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.TyphoonDetailMapper; +import com.casic.missiles.modular.system.model.TyphoonDetail; +import com.casic.missiles.modular.system.service.ITyphoonDetailService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class TyphoonDetailServiceImpl extends ServiceImpl implements ITyphoonDetailService { + + public TyphoonDetailServiceImpl() { + + } +} 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 new file mode 100644 index 0000000..d1bf2c7 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.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.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/pom.xml b/casic-environment/pom.xml new file mode 100644 index 0000000..5aa6394 --- /dev/null +++ b/casic-environment/pom.xml @@ -0,0 +1,72 @@ + + + 4.0.0 + + com.casic + casic-template + ../pom.xml + 2.0.0 + + + casic-environment + 2.0.0 + jar + casic-environment + + + + + com.casic + casic-core + ${core.version} + provided + + + com.casic + casic-admin-support + ${admin.version} + provided + + + org.springframework.boot + spring-boot-starter-web + ${boot.version} + provided + + + com.casic + casic-server-support + 1.0.0 + + + + com.alibaba + fastjson + ${fastjson.version} + + + com.squareup.okhttp3 + okhttp + 4.9.1 + + + + org.locationtech.spatial4j + spatial4j + 0.8 + + + + + + + src/main/java + + **/*.xml + + + + + \ No newline at end of file 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 new file mode 100644 index 0000000..041adcd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -0,0 +1,26 @@ +package com.casic.missiles.job; + +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +/** + * @author lwh + * 台风数据定时任务,每小时执行一次 + * @ClassName TyphoonQuartzJob + * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling + */ +@Component +public class TyphoonQuartzJob { + private final ITyphoonService typhoonService; + + public TyphoonQuartzJob(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + @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/controller/EnvironmentController.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java new file mode 100644 index 0000000..0f2a0ed --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java @@ -0,0 +1,48 @@ +package com.casic.missiles.modular.system.controller; + +import com.casic.missiles.model.response.ResponseData; +import com.casic.missiles.modular.system.dto.TyphoonDTO; +import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.List; + +/** + * 环境控制器 + * + * @author a203 + */ +@Controller +@RequestMapping("/environment") +public class EnvironmentController { + private final ITyphoonService typhoonService; + + public EnvironmentController(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + /** + * 台风列表 + */ + @GetMapping(value = "/typhoonList") + @ResponseBody + public Object list() { + List typhoonList = typhoonService.currentTyphoonList(); + return ResponseData.success(typhoonList); + } + + /** + * 台风详情 + */ + @GetMapping(value = "/typhoonDetail/{typhoonId}") + @ResponseBody + public Object detail(@PathVariable("typhoonId") String typhoonId) { + TyphoonDetailDTO detailDTO = typhoonService.typhoonDetail(typhoonId); + return ResponseData.success(detailDTO); + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java new file mode 100644 index 0000000..9788030 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.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.TyphoonDetail; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonDetailMapper 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 new file mode 100644 index 0000000..c60bfab --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.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.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 new file mode 100644 index 0000000..70ea807 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.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.Typhoon; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonMapper extends BaseMapper { + +} 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 new file mode 100644 index 0000000..9745785 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.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.TyphoonPoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java new file mode 100644 index 0000000..cdef9a4 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java @@ -0,0 +1,84 @@ +package com.casic.missiles.modular.system.dto; + +import com.casic.missiles.modular.system.model.Typhoon; +import lombok.Data; + +/** + * @author a203 + */ +@Data +public class TyphoonDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 数据更新时间 + */ + private String time; + + public TyphoonDTO(Typhoon data) { + this.typhoonId = data.getTyphoonId(); + this.name = data.getName(); + this.engName = data.getEngName(); + this.lng = data.getLng(); + this.lat = data.getLat(); + this.typhoonType = data.getTyphoonType(); + this.centerPressure = data.getCenterPressure(); + this.speed = data.getSpeed(); + this.power = data.getPower(); + this.moveSpeed = data.getMoveSpeed(); + this.moveDirection = data.getMoveDirection(); + this.radius10 = data.getRadius10(); + this.radius7 = data.getRadius7(); + this.time = data.getTime(); + } +} 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 new file mode 100644 index 0000000..a34da1b --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -0,0 +1,188 @@ +package com.casic.missiles.modular.system.dto; + +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; +import java.util.List; + +/** + * 台风详情 + * + * @author a203 + */ +@Data +public class TyphoonDetailDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 台风告警级别 + */ + private String warnLevel; + /** + * 台风中心经度 + */ + private Double centerLng; + /** + * 台风中心纬度 + */ + private Double centerLat; + /** + * 台风开始时间 + */ + private String startTime; + /** + * 台风结束时间 + */ + private String endTime; + /** + * 台风状态 + */ + private String isActive; + /** + * 台风登陆点 + */ + private List land; + /** + * 台风路径 + */ + private List points; + + @Data + public static class LandBan { + /** + * 台风登陆点 + */ + private String landAddress; + /** + * 台风类型-热带风暴/强台风... + */ + private String type; + private Double lng; + private Double lat; + /** + * 台风登陆细节 + */ + private String info; + /** + * 台风登陆时间 + */ + private String landTime; + } + + @Data + public static class PointBean { + /** + * 数据更新时间 + */ + private String time; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 12级风力影响半径 + */ + private String radius12; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 台风路线预测 + */ + private String routePrediction; + /** + * 中心位置 + */ + private String centerPosition; + } + + public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + this.typhoonId = detail.getTyphoonId(); + this.name = detail.getName(); + this.engName = detail.getEngName(); + this.warnLevel = detail.getWarnLevel(); + this.centerLng = detail.getCenterLng(); + this.centerLat = detail.getCenterLat(); + this.startTime = detail.getStartTime(); + this.endTime = detail.getEndTime(); + this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); + for (TyphoonLand landBean : landBeans) { + LandBan bean = new LandBan(); + bean.landAddress = landBean.getLandAddress(); + bean.landTime = landBean.getLandTime(); + bean.type = landBean.getType(); + bean.lng = landBean.getLng(); + bean.lat = landBean.getLat(); + bean.info = landBean.getInfo(); + lands.add(bean); + } + this.land = lands; + List points = new ArrayList<>(); + for (TyphoonPoint point : pointBeans) { + PointBean pointBean = new PointBean(); + pointBean.time = point.getTime(); + pointBean.centerPressure = point.getCenterPressure(); + pointBean.speed = point.getSpeed(); + pointBean.typhoonType = point.getTyphoonType(); + pointBean.moveSpeed = point.getMoveSpeed(); + pointBean.power = point.getPower(); + pointBean.moveDirection = point.getMoveDirection(); + pointBean.lng = point.getLng(); + pointBean.lat = point.getLat(); + pointBean.radius12 = point.getRadius12(); + pointBean.radius10 = point.getRadius10(); + pointBean.radius7 = point.getRadius7(); + pointBean.routePrediction = point.getRoutePrediction(); + pointBean.centerPosition = point.getCenterPosition(); + points.add(pointBean); + } + this.points = points; + } +} 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 new file mode 100644 index 0000000..5b70924 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java @@ -0,0 +1,419 @@ +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/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java new file mode 100644 index 0000000..38a9257 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java @@ -0,0 +1,237 @@ +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/ITyphoonDetailService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonDetailService.java new file mode 100644 index 0000000..15c757a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonDetailService.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.TyphoonDetail; + +/** + * 台风详情数据信息 服务类 + * + * @author a203 + */ +public interface ITyphoonDetailService 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 new file mode 100644 index 0000000..d16a48b --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.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.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 new file mode 100644 index 0000000..80e2765 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.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.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 new file mode 100644 index 0000000..c47a0f3 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java @@ -0,0 +1,42 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.dto.TyphoonDTO; +import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; +import com.casic.missiles.modular.system.model.Typhoon; + +import java.util.List; + +/** + * 台风列表数据信息 服务类 + * + * @author a203 + */ +public interface ITyphoonService extends IService { + /** + * 保存台风列表 + */ + void saveTyphoonList(); + + /** + * 更新台风详情 + */ + void updateTyphoonDetail(); + + /***上面接口从第三方存库,下面接口查库**********************/ + + /** + * 查询台风列表 + * + * @return {@link List} + */ + List currentTyphoonList(); + + /** + * 查询台风详情 + * + * @param typhoonId 台风ID + * @return {@link TyphoonDetailDTO} + */ + TyphoonDetailDTO typhoonDetail(String typhoonId); +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonDetailServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonDetailServiceImpl.java new file mode 100644 index 0000000..1a054f9 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonDetailServiceImpl.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.TyphoonDetailMapper; +import com.casic.missiles.modular.system.model.TyphoonDetail; +import com.casic.missiles.modular.system.service.ITyphoonDetailService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class TyphoonDetailServiceImpl extends ServiceImpl implements ITyphoonDetailService { + + public TyphoonDetailServiceImpl() { + + } +} 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 new file mode 100644 index 0000000..d1bf2c7 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.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.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 new file mode 100644 index 0000000..36815fa --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.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.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/pom.xml b/casic-environment/pom.xml new file mode 100644 index 0000000..5aa6394 --- /dev/null +++ b/casic-environment/pom.xml @@ -0,0 +1,72 @@ + + + 4.0.0 + + com.casic + casic-template + ../pom.xml + 2.0.0 + + + casic-environment + 2.0.0 + jar + casic-environment + + + + + com.casic + casic-core + ${core.version} + provided + + + com.casic + casic-admin-support + ${admin.version} + provided + + + org.springframework.boot + spring-boot-starter-web + ${boot.version} + provided + + + com.casic + casic-server-support + 1.0.0 + + + + com.alibaba + fastjson + ${fastjson.version} + + + com.squareup.okhttp3 + okhttp + 4.9.1 + + + + org.locationtech.spatial4j + spatial4j + 0.8 + + + + + + + src/main/java + + **/*.xml + + + + + \ No newline at end of file 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 new file mode 100644 index 0000000..041adcd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -0,0 +1,26 @@ +package com.casic.missiles.job; + +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +/** + * @author lwh + * 台风数据定时任务,每小时执行一次 + * @ClassName TyphoonQuartzJob + * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling + */ +@Component +public class TyphoonQuartzJob { + private final ITyphoonService typhoonService; + + public TyphoonQuartzJob(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + @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/controller/EnvironmentController.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java new file mode 100644 index 0000000..0f2a0ed --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java @@ -0,0 +1,48 @@ +package com.casic.missiles.modular.system.controller; + +import com.casic.missiles.model.response.ResponseData; +import com.casic.missiles.modular.system.dto.TyphoonDTO; +import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.List; + +/** + * 环境控制器 + * + * @author a203 + */ +@Controller +@RequestMapping("/environment") +public class EnvironmentController { + private final ITyphoonService typhoonService; + + public EnvironmentController(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + /** + * 台风列表 + */ + @GetMapping(value = "/typhoonList") + @ResponseBody + public Object list() { + List typhoonList = typhoonService.currentTyphoonList(); + return ResponseData.success(typhoonList); + } + + /** + * 台风详情 + */ + @GetMapping(value = "/typhoonDetail/{typhoonId}") + @ResponseBody + public Object detail(@PathVariable("typhoonId") String typhoonId) { + TyphoonDetailDTO detailDTO = typhoonService.typhoonDetail(typhoonId); + return ResponseData.success(detailDTO); + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java new file mode 100644 index 0000000..9788030 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.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.TyphoonDetail; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonDetailMapper 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 new file mode 100644 index 0000000..c60bfab --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.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.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 new file mode 100644 index 0000000..70ea807 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.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.Typhoon; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonMapper extends BaseMapper { + +} 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 new file mode 100644 index 0000000..9745785 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.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.TyphoonPoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java new file mode 100644 index 0000000..cdef9a4 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java @@ -0,0 +1,84 @@ +package com.casic.missiles.modular.system.dto; + +import com.casic.missiles.modular.system.model.Typhoon; +import lombok.Data; + +/** + * @author a203 + */ +@Data +public class TyphoonDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 数据更新时间 + */ + private String time; + + public TyphoonDTO(Typhoon data) { + this.typhoonId = data.getTyphoonId(); + this.name = data.getName(); + this.engName = data.getEngName(); + this.lng = data.getLng(); + this.lat = data.getLat(); + this.typhoonType = data.getTyphoonType(); + this.centerPressure = data.getCenterPressure(); + this.speed = data.getSpeed(); + this.power = data.getPower(); + this.moveSpeed = data.getMoveSpeed(); + this.moveDirection = data.getMoveDirection(); + this.radius10 = data.getRadius10(); + this.radius7 = data.getRadius7(); + this.time = data.getTime(); + } +} 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 new file mode 100644 index 0000000..a34da1b --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -0,0 +1,188 @@ +package com.casic.missiles.modular.system.dto; + +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; +import java.util.List; + +/** + * 台风详情 + * + * @author a203 + */ +@Data +public class TyphoonDetailDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 台风告警级别 + */ + private String warnLevel; + /** + * 台风中心经度 + */ + private Double centerLng; + /** + * 台风中心纬度 + */ + private Double centerLat; + /** + * 台风开始时间 + */ + private String startTime; + /** + * 台风结束时间 + */ + private String endTime; + /** + * 台风状态 + */ + private String isActive; + /** + * 台风登陆点 + */ + private List land; + /** + * 台风路径 + */ + private List points; + + @Data + public static class LandBan { + /** + * 台风登陆点 + */ + private String landAddress; + /** + * 台风类型-热带风暴/强台风... + */ + private String type; + private Double lng; + private Double lat; + /** + * 台风登陆细节 + */ + private String info; + /** + * 台风登陆时间 + */ + private String landTime; + } + + @Data + public static class PointBean { + /** + * 数据更新时间 + */ + private String time; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 12级风力影响半径 + */ + private String radius12; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 台风路线预测 + */ + private String routePrediction; + /** + * 中心位置 + */ + private String centerPosition; + } + + public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + this.typhoonId = detail.getTyphoonId(); + this.name = detail.getName(); + this.engName = detail.getEngName(); + this.warnLevel = detail.getWarnLevel(); + this.centerLng = detail.getCenterLng(); + this.centerLat = detail.getCenterLat(); + this.startTime = detail.getStartTime(); + this.endTime = detail.getEndTime(); + this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); + for (TyphoonLand landBean : landBeans) { + LandBan bean = new LandBan(); + bean.landAddress = landBean.getLandAddress(); + bean.landTime = landBean.getLandTime(); + bean.type = landBean.getType(); + bean.lng = landBean.getLng(); + bean.lat = landBean.getLat(); + bean.info = landBean.getInfo(); + lands.add(bean); + } + this.land = lands; + List points = new ArrayList<>(); + for (TyphoonPoint point : pointBeans) { + PointBean pointBean = new PointBean(); + pointBean.time = point.getTime(); + pointBean.centerPressure = point.getCenterPressure(); + pointBean.speed = point.getSpeed(); + pointBean.typhoonType = point.getTyphoonType(); + pointBean.moveSpeed = point.getMoveSpeed(); + pointBean.power = point.getPower(); + pointBean.moveDirection = point.getMoveDirection(); + pointBean.lng = point.getLng(); + pointBean.lat = point.getLat(); + pointBean.radius12 = point.getRadius12(); + pointBean.radius10 = point.getRadius10(); + pointBean.radius7 = point.getRadius7(); + pointBean.routePrediction = point.getRoutePrediction(); + pointBean.centerPosition = point.getCenterPosition(); + points.add(pointBean); + } + this.points = points; + } +} 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 new file mode 100644 index 0000000..5b70924 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java @@ -0,0 +1,419 @@ +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/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java new file mode 100644 index 0000000..38a9257 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java @@ -0,0 +1,237 @@ +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/ITyphoonDetailService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonDetailService.java new file mode 100644 index 0000000..15c757a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonDetailService.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.TyphoonDetail; + +/** + * 台风详情数据信息 服务类 + * + * @author a203 + */ +public interface ITyphoonDetailService 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 new file mode 100644 index 0000000..d16a48b --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.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.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 new file mode 100644 index 0000000..80e2765 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.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.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 new file mode 100644 index 0000000..c47a0f3 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java @@ -0,0 +1,42 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.dto.TyphoonDTO; +import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; +import com.casic.missiles.modular.system.model.Typhoon; + +import java.util.List; + +/** + * 台风列表数据信息 服务类 + * + * @author a203 + */ +public interface ITyphoonService extends IService { + /** + * 保存台风列表 + */ + void saveTyphoonList(); + + /** + * 更新台风详情 + */ + void updateTyphoonDetail(); + + /***上面接口从第三方存库,下面接口查库**********************/ + + /** + * 查询台风列表 + * + * @return {@link List} + */ + List currentTyphoonList(); + + /** + * 查询台风详情 + * + * @param typhoonId 台风ID + * @return {@link TyphoonDetailDTO} + */ + TyphoonDetailDTO typhoonDetail(String typhoonId); +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonDetailServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonDetailServiceImpl.java new file mode 100644 index 0000000..1a054f9 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonDetailServiceImpl.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.TyphoonDetailMapper; +import com.casic.missiles.modular.system.model.TyphoonDetail; +import com.casic.missiles.modular.system.service.ITyphoonDetailService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class TyphoonDetailServiceImpl extends ServiceImpl implements ITyphoonDetailService { + + public TyphoonDetailServiceImpl() { + + } +} 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 new file mode 100644 index 0000000..d1bf2c7 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.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.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 new file mode 100644 index 0000000..36815fa --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.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.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 new file mode 100644 index 0000000..861e2c1 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java @@ -0,0 +1,182 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.TypeReference; +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.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.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.utils.Constant; +import com.casic.missiles.modular.system.utils.HttpRequestHelper; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class TyphoonServiceImpl extends ServiceImpl implements ITyphoonService { + + private static final String SUCCESS_CODE = "0"; + + private final ITyphoonDetailService typhoonDetailService; + private final ITyphoonLandService typhoonLandService; + private final ITyphoonPointService typhoonPointService; + + public TyphoonServiceImpl(ITyphoonDetailService typhoonDetailService, + ITyphoonLandService typhoonLandService, ITyphoonPointService typhoonPointService) { + this.typhoonDetailService = typhoonDetailService; + this.typhoonLandService = typhoonLandService; + this.typhoonPointService = typhoonPointService; + } + + /** + * 保存台风列表 + */ + @Override + public void saveTyphoonList() { + /** + * 获取台风接口数据 + * */ + String res = HttpRequestHelper.doGet(Constant.TYPHOON_LIST + System.currentTimeMillis()); + if (SUCCESS_CODE.equals(HttpRequestHelper.getTyphoonCode(res))) { + TyphoonRemoteData remoteData = JSON.parseObject(res, new TypeReference() { + }); + //先清空之前的台风表,再保存最新的台风 + remove(null); + List beans = remoteData.getShowapi_res_body().getList(); + for (TyphoonRemoteData.ShowapiResBodyBean.ListBean data : beans) { + //将获取到台风数据存到数据库 + Typhoon entity = new Typhoon(); + entity.setTyphoonId(data.getTfid()); + 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.setSpeed(data.getSpeed()); + entity.setPower(Integer.valueOf(data.getPower())); + entity.setMoveSpeed(data.getMovespeed()); + entity.setMoveDirection(data.getMovedirection()); + entity.setRadius7(data.getRadius7()); + entity.setRadius10(data.getRadius10()); + entity.setTime(data.getTime()); + save(entity); + } + } + } + + /** + * 更新台风详情 + */ + @Override + public void updateTyphoonDetail() { + for (Typhoon typhoon : list()) { + /** + * 获取台风接口数据 + * */ + 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() { + }); + TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean objBean = remoteData.getShowapi_res_body().getObj(); + //保存台风基本情况存到数据库 + 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())); + + //保存台风登陆情况存到数据库 + List land = objBean.getLand(); + typhoonLandService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); + for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.LandBan landBan : land) { + TyphoonLand typhoonLand = new TyphoonLand(); + + 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()); + + typhoonLandService.save(typhoonLand); + } + + //保存台风移动路径存到数据库 + List points = objBean.getPoints(); + typhoonPointService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); + for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.PointsBean point : points) { + TyphoonPoint typhoonPoint = new TyphoonPoint(); + + 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); + } + } + } + } + + @Override + public List currentTyphoonList() { + List typhoonList = new ArrayList<>(); + for (Typhoon typhoon : list()) { + typhoonList.add(new TyphoonDTO(typhoon)); + } + return typhoonList; + } + + @Override + public TyphoonDetailDTO typhoonDetail(String typhoonId) { + TyphoonDetail detail = typhoonDetailService.getOne( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) + ); + List landList = typhoonLandService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) + ); + List pointList = typhoonPointService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) + ); + return new TyphoonDetailDTO(detail, landList, pointList); + } +} diff --git a/casic-environment/pom.xml b/casic-environment/pom.xml new file mode 100644 index 0000000..5aa6394 --- /dev/null +++ b/casic-environment/pom.xml @@ -0,0 +1,72 @@ + + + 4.0.0 + + com.casic + casic-template + ../pom.xml + 2.0.0 + + + casic-environment + 2.0.0 + jar + casic-environment + + + + + com.casic + casic-core + ${core.version} + provided + + + com.casic + casic-admin-support + ${admin.version} + provided + + + org.springframework.boot + spring-boot-starter-web + ${boot.version} + provided + + + com.casic + casic-server-support + 1.0.0 + + + + com.alibaba + fastjson + ${fastjson.version} + + + com.squareup.okhttp3 + okhttp + 4.9.1 + + + + org.locationtech.spatial4j + spatial4j + 0.8 + + + + + + + src/main/java + + **/*.xml + + + + + \ No newline at end of file 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 new file mode 100644 index 0000000..041adcd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -0,0 +1,26 @@ +package com.casic.missiles.job; + +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +/** + * @author lwh + * 台风数据定时任务,每小时执行一次 + * @ClassName TyphoonQuartzJob + * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling + */ +@Component +public class TyphoonQuartzJob { + private final ITyphoonService typhoonService; + + public TyphoonQuartzJob(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + @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/controller/EnvironmentController.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java new file mode 100644 index 0000000..0f2a0ed --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java @@ -0,0 +1,48 @@ +package com.casic.missiles.modular.system.controller; + +import com.casic.missiles.model.response.ResponseData; +import com.casic.missiles.modular.system.dto.TyphoonDTO; +import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.List; + +/** + * 环境控制器 + * + * @author a203 + */ +@Controller +@RequestMapping("/environment") +public class EnvironmentController { + private final ITyphoonService typhoonService; + + public EnvironmentController(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + /** + * 台风列表 + */ + @GetMapping(value = "/typhoonList") + @ResponseBody + public Object list() { + List typhoonList = typhoonService.currentTyphoonList(); + return ResponseData.success(typhoonList); + } + + /** + * 台风详情 + */ + @GetMapping(value = "/typhoonDetail/{typhoonId}") + @ResponseBody + public Object detail(@PathVariable("typhoonId") String typhoonId) { + TyphoonDetailDTO detailDTO = typhoonService.typhoonDetail(typhoonId); + return ResponseData.success(detailDTO); + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java new file mode 100644 index 0000000..9788030 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.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.TyphoonDetail; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonDetailMapper 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 new file mode 100644 index 0000000..c60bfab --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.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.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 new file mode 100644 index 0000000..70ea807 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.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.Typhoon; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonMapper extends BaseMapper { + +} 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 new file mode 100644 index 0000000..9745785 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.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.TyphoonPoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java new file mode 100644 index 0000000..cdef9a4 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java @@ -0,0 +1,84 @@ +package com.casic.missiles.modular.system.dto; + +import com.casic.missiles.modular.system.model.Typhoon; +import lombok.Data; + +/** + * @author a203 + */ +@Data +public class TyphoonDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 数据更新时间 + */ + private String time; + + public TyphoonDTO(Typhoon data) { + this.typhoonId = data.getTyphoonId(); + this.name = data.getName(); + this.engName = data.getEngName(); + this.lng = data.getLng(); + this.lat = data.getLat(); + this.typhoonType = data.getTyphoonType(); + this.centerPressure = data.getCenterPressure(); + this.speed = data.getSpeed(); + this.power = data.getPower(); + this.moveSpeed = data.getMoveSpeed(); + this.moveDirection = data.getMoveDirection(); + this.radius10 = data.getRadius10(); + this.radius7 = data.getRadius7(); + this.time = data.getTime(); + } +} 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 new file mode 100644 index 0000000..a34da1b --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -0,0 +1,188 @@ +package com.casic.missiles.modular.system.dto; + +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; +import java.util.List; + +/** + * 台风详情 + * + * @author a203 + */ +@Data +public class TyphoonDetailDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 台风告警级别 + */ + private String warnLevel; + /** + * 台风中心经度 + */ + private Double centerLng; + /** + * 台风中心纬度 + */ + private Double centerLat; + /** + * 台风开始时间 + */ + private String startTime; + /** + * 台风结束时间 + */ + private String endTime; + /** + * 台风状态 + */ + private String isActive; + /** + * 台风登陆点 + */ + private List land; + /** + * 台风路径 + */ + private List points; + + @Data + public static class LandBan { + /** + * 台风登陆点 + */ + private String landAddress; + /** + * 台风类型-热带风暴/强台风... + */ + private String type; + private Double lng; + private Double lat; + /** + * 台风登陆细节 + */ + private String info; + /** + * 台风登陆时间 + */ + private String landTime; + } + + @Data + public static class PointBean { + /** + * 数据更新时间 + */ + private String time; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 12级风力影响半径 + */ + private String radius12; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 台风路线预测 + */ + private String routePrediction; + /** + * 中心位置 + */ + private String centerPosition; + } + + public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + this.typhoonId = detail.getTyphoonId(); + this.name = detail.getName(); + this.engName = detail.getEngName(); + this.warnLevel = detail.getWarnLevel(); + this.centerLng = detail.getCenterLng(); + this.centerLat = detail.getCenterLat(); + this.startTime = detail.getStartTime(); + this.endTime = detail.getEndTime(); + this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); + for (TyphoonLand landBean : landBeans) { + LandBan bean = new LandBan(); + bean.landAddress = landBean.getLandAddress(); + bean.landTime = landBean.getLandTime(); + bean.type = landBean.getType(); + bean.lng = landBean.getLng(); + bean.lat = landBean.getLat(); + bean.info = landBean.getInfo(); + lands.add(bean); + } + this.land = lands; + List points = new ArrayList<>(); + for (TyphoonPoint point : pointBeans) { + PointBean pointBean = new PointBean(); + pointBean.time = point.getTime(); + pointBean.centerPressure = point.getCenterPressure(); + pointBean.speed = point.getSpeed(); + pointBean.typhoonType = point.getTyphoonType(); + pointBean.moveSpeed = point.getMoveSpeed(); + pointBean.power = point.getPower(); + pointBean.moveDirection = point.getMoveDirection(); + pointBean.lng = point.getLng(); + pointBean.lat = point.getLat(); + pointBean.radius12 = point.getRadius12(); + pointBean.radius10 = point.getRadius10(); + pointBean.radius7 = point.getRadius7(); + pointBean.routePrediction = point.getRoutePrediction(); + pointBean.centerPosition = point.getCenterPosition(); + points.add(pointBean); + } + this.points = points; + } +} 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 new file mode 100644 index 0000000..5b70924 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java @@ -0,0 +1,419 @@ +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/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java new file mode 100644 index 0000000..38a9257 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java @@ -0,0 +1,237 @@ +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/ITyphoonDetailService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonDetailService.java new file mode 100644 index 0000000..15c757a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonDetailService.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.TyphoonDetail; + +/** + * 台风详情数据信息 服务类 + * + * @author a203 + */ +public interface ITyphoonDetailService 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 new file mode 100644 index 0000000..d16a48b --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.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.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 new file mode 100644 index 0000000..80e2765 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.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.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 new file mode 100644 index 0000000..c47a0f3 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java @@ -0,0 +1,42 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.dto.TyphoonDTO; +import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; +import com.casic.missiles.modular.system.model.Typhoon; + +import java.util.List; + +/** + * 台风列表数据信息 服务类 + * + * @author a203 + */ +public interface ITyphoonService extends IService { + /** + * 保存台风列表 + */ + void saveTyphoonList(); + + /** + * 更新台风详情 + */ + void updateTyphoonDetail(); + + /***上面接口从第三方存库,下面接口查库**********************/ + + /** + * 查询台风列表 + * + * @return {@link List} + */ + List currentTyphoonList(); + + /** + * 查询台风详情 + * + * @param typhoonId 台风ID + * @return {@link TyphoonDetailDTO} + */ + TyphoonDetailDTO typhoonDetail(String typhoonId); +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonDetailServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonDetailServiceImpl.java new file mode 100644 index 0000000..1a054f9 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonDetailServiceImpl.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.TyphoonDetailMapper; +import com.casic.missiles.modular.system.model.TyphoonDetail; +import com.casic.missiles.modular.system.service.ITyphoonDetailService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class TyphoonDetailServiceImpl extends ServiceImpl implements ITyphoonDetailService { + + public TyphoonDetailServiceImpl() { + + } +} 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 new file mode 100644 index 0000000..d1bf2c7 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.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.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 new file mode 100644 index 0000000..36815fa --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.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.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 new file mode 100644 index 0000000..861e2c1 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java @@ -0,0 +1,182 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.TypeReference; +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.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.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.utils.Constant; +import com.casic.missiles.modular.system.utils.HttpRequestHelper; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class TyphoonServiceImpl extends ServiceImpl implements ITyphoonService { + + private static final String SUCCESS_CODE = "0"; + + private final ITyphoonDetailService typhoonDetailService; + private final ITyphoonLandService typhoonLandService; + private final ITyphoonPointService typhoonPointService; + + public TyphoonServiceImpl(ITyphoonDetailService typhoonDetailService, + ITyphoonLandService typhoonLandService, ITyphoonPointService typhoonPointService) { + this.typhoonDetailService = typhoonDetailService; + this.typhoonLandService = typhoonLandService; + this.typhoonPointService = typhoonPointService; + } + + /** + * 保存台风列表 + */ + @Override + public void saveTyphoonList() { + /** + * 获取台风接口数据 + * */ + String res = HttpRequestHelper.doGet(Constant.TYPHOON_LIST + System.currentTimeMillis()); + if (SUCCESS_CODE.equals(HttpRequestHelper.getTyphoonCode(res))) { + TyphoonRemoteData remoteData = JSON.parseObject(res, new TypeReference() { + }); + //先清空之前的台风表,再保存最新的台风 + remove(null); + List beans = remoteData.getShowapi_res_body().getList(); + for (TyphoonRemoteData.ShowapiResBodyBean.ListBean data : beans) { + //将获取到台风数据存到数据库 + Typhoon entity = new Typhoon(); + entity.setTyphoonId(data.getTfid()); + 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.setSpeed(data.getSpeed()); + entity.setPower(Integer.valueOf(data.getPower())); + entity.setMoveSpeed(data.getMovespeed()); + entity.setMoveDirection(data.getMovedirection()); + entity.setRadius7(data.getRadius7()); + entity.setRadius10(data.getRadius10()); + entity.setTime(data.getTime()); + save(entity); + } + } + } + + /** + * 更新台风详情 + */ + @Override + public void updateTyphoonDetail() { + for (Typhoon typhoon : list()) { + /** + * 获取台风接口数据 + * */ + 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() { + }); + TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean objBean = remoteData.getShowapi_res_body().getObj(); + //保存台风基本情况存到数据库 + 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())); + + //保存台风登陆情况存到数据库 + List land = objBean.getLand(); + typhoonLandService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); + for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.LandBan landBan : land) { + TyphoonLand typhoonLand = new TyphoonLand(); + + 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()); + + typhoonLandService.save(typhoonLand); + } + + //保存台风移动路径存到数据库 + List points = objBean.getPoints(); + typhoonPointService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); + for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.PointsBean point : points) { + TyphoonPoint typhoonPoint = new TyphoonPoint(); + + 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); + } + } + } + } + + @Override + public List currentTyphoonList() { + List typhoonList = new ArrayList<>(); + for (Typhoon typhoon : list()) { + typhoonList.add(new TyphoonDTO(typhoon)); + } + return typhoonList; + } + + @Override + public TyphoonDetailDTO typhoonDetail(String typhoonId) { + TyphoonDetail detail = typhoonDetailService.getOne( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) + ); + List landList = typhoonLandService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) + ); + List pointList = typhoonPointService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) + ); + return new TyphoonDetailDTO(detail, landList, pointList); + } +} 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 new file mode 100644 index 0000000..310c8b4 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java @@ -0,0 +1,26 @@ +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="; +} diff --git a/casic-environment/pom.xml b/casic-environment/pom.xml new file mode 100644 index 0000000..5aa6394 --- /dev/null +++ b/casic-environment/pom.xml @@ -0,0 +1,72 @@ + + + 4.0.0 + + com.casic + casic-template + ../pom.xml + 2.0.0 + + + casic-environment + 2.0.0 + jar + casic-environment + + + + + com.casic + casic-core + ${core.version} + provided + + + com.casic + casic-admin-support + ${admin.version} + provided + + + org.springframework.boot + spring-boot-starter-web + ${boot.version} + provided + + + com.casic + casic-server-support + 1.0.0 + + + + com.alibaba + fastjson + ${fastjson.version} + + + com.squareup.okhttp3 + okhttp + 4.9.1 + + + + org.locationtech.spatial4j + spatial4j + 0.8 + + + + + + + src/main/java + + **/*.xml + + + + + \ No newline at end of file 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 new file mode 100644 index 0000000..041adcd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -0,0 +1,26 @@ +package com.casic.missiles.job; + +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +/** + * @author lwh + * 台风数据定时任务,每小时执行一次 + * @ClassName TyphoonQuartzJob + * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling + */ +@Component +public class TyphoonQuartzJob { + private final ITyphoonService typhoonService; + + public TyphoonQuartzJob(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + @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/controller/EnvironmentController.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java new file mode 100644 index 0000000..0f2a0ed --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java @@ -0,0 +1,48 @@ +package com.casic.missiles.modular.system.controller; + +import com.casic.missiles.model.response.ResponseData; +import com.casic.missiles.modular.system.dto.TyphoonDTO; +import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.List; + +/** + * 环境控制器 + * + * @author a203 + */ +@Controller +@RequestMapping("/environment") +public class EnvironmentController { + private final ITyphoonService typhoonService; + + public EnvironmentController(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + /** + * 台风列表 + */ + @GetMapping(value = "/typhoonList") + @ResponseBody + public Object list() { + List typhoonList = typhoonService.currentTyphoonList(); + return ResponseData.success(typhoonList); + } + + /** + * 台风详情 + */ + @GetMapping(value = "/typhoonDetail/{typhoonId}") + @ResponseBody + public Object detail(@PathVariable("typhoonId") String typhoonId) { + TyphoonDetailDTO detailDTO = typhoonService.typhoonDetail(typhoonId); + return ResponseData.success(detailDTO); + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java new file mode 100644 index 0000000..9788030 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.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.TyphoonDetail; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonDetailMapper 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 new file mode 100644 index 0000000..c60bfab --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.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.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 new file mode 100644 index 0000000..70ea807 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.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.Typhoon; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonMapper extends BaseMapper { + +} 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 new file mode 100644 index 0000000..9745785 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.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.TyphoonPoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java new file mode 100644 index 0000000..cdef9a4 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java @@ -0,0 +1,84 @@ +package com.casic.missiles.modular.system.dto; + +import com.casic.missiles.modular.system.model.Typhoon; +import lombok.Data; + +/** + * @author a203 + */ +@Data +public class TyphoonDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 数据更新时间 + */ + private String time; + + public TyphoonDTO(Typhoon data) { + this.typhoonId = data.getTyphoonId(); + this.name = data.getName(); + this.engName = data.getEngName(); + this.lng = data.getLng(); + this.lat = data.getLat(); + this.typhoonType = data.getTyphoonType(); + this.centerPressure = data.getCenterPressure(); + this.speed = data.getSpeed(); + this.power = data.getPower(); + this.moveSpeed = data.getMoveSpeed(); + this.moveDirection = data.getMoveDirection(); + this.radius10 = data.getRadius10(); + this.radius7 = data.getRadius7(); + this.time = data.getTime(); + } +} 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 new file mode 100644 index 0000000..a34da1b --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -0,0 +1,188 @@ +package com.casic.missiles.modular.system.dto; + +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; +import java.util.List; + +/** + * 台风详情 + * + * @author a203 + */ +@Data +public class TyphoonDetailDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 台风告警级别 + */ + private String warnLevel; + /** + * 台风中心经度 + */ + private Double centerLng; + /** + * 台风中心纬度 + */ + private Double centerLat; + /** + * 台风开始时间 + */ + private String startTime; + /** + * 台风结束时间 + */ + private String endTime; + /** + * 台风状态 + */ + private String isActive; + /** + * 台风登陆点 + */ + private List land; + /** + * 台风路径 + */ + private List points; + + @Data + public static class LandBan { + /** + * 台风登陆点 + */ + private String landAddress; + /** + * 台风类型-热带风暴/强台风... + */ + private String type; + private Double lng; + private Double lat; + /** + * 台风登陆细节 + */ + private String info; + /** + * 台风登陆时间 + */ + private String landTime; + } + + @Data + public static class PointBean { + /** + * 数据更新时间 + */ + private String time; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 12级风力影响半径 + */ + private String radius12; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 台风路线预测 + */ + private String routePrediction; + /** + * 中心位置 + */ + private String centerPosition; + } + + public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + this.typhoonId = detail.getTyphoonId(); + this.name = detail.getName(); + this.engName = detail.getEngName(); + this.warnLevel = detail.getWarnLevel(); + this.centerLng = detail.getCenterLng(); + this.centerLat = detail.getCenterLat(); + this.startTime = detail.getStartTime(); + this.endTime = detail.getEndTime(); + this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); + for (TyphoonLand landBean : landBeans) { + LandBan bean = new LandBan(); + bean.landAddress = landBean.getLandAddress(); + bean.landTime = landBean.getLandTime(); + bean.type = landBean.getType(); + bean.lng = landBean.getLng(); + bean.lat = landBean.getLat(); + bean.info = landBean.getInfo(); + lands.add(bean); + } + this.land = lands; + List points = new ArrayList<>(); + for (TyphoonPoint point : pointBeans) { + PointBean pointBean = new PointBean(); + pointBean.time = point.getTime(); + pointBean.centerPressure = point.getCenterPressure(); + pointBean.speed = point.getSpeed(); + pointBean.typhoonType = point.getTyphoonType(); + pointBean.moveSpeed = point.getMoveSpeed(); + pointBean.power = point.getPower(); + pointBean.moveDirection = point.getMoveDirection(); + pointBean.lng = point.getLng(); + pointBean.lat = point.getLat(); + pointBean.radius12 = point.getRadius12(); + pointBean.radius10 = point.getRadius10(); + pointBean.radius7 = point.getRadius7(); + pointBean.routePrediction = point.getRoutePrediction(); + pointBean.centerPosition = point.getCenterPosition(); + points.add(pointBean); + } + this.points = points; + } +} 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 new file mode 100644 index 0000000..5b70924 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java @@ -0,0 +1,419 @@ +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/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java new file mode 100644 index 0000000..38a9257 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java @@ -0,0 +1,237 @@ +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/ITyphoonDetailService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonDetailService.java new file mode 100644 index 0000000..15c757a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonDetailService.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.TyphoonDetail; + +/** + * 台风详情数据信息 服务类 + * + * @author a203 + */ +public interface ITyphoonDetailService 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 new file mode 100644 index 0000000..d16a48b --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.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.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 new file mode 100644 index 0000000..80e2765 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.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.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 new file mode 100644 index 0000000..c47a0f3 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java @@ -0,0 +1,42 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.dto.TyphoonDTO; +import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; +import com.casic.missiles.modular.system.model.Typhoon; + +import java.util.List; + +/** + * 台风列表数据信息 服务类 + * + * @author a203 + */ +public interface ITyphoonService extends IService { + /** + * 保存台风列表 + */ + void saveTyphoonList(); + + /** + * 更新台风详情 + */ + void updateTyphoonDetail(); + + /***上面接口从第三方存库,下面接口查库**********************/ + + /** + * 查询台风列表 + * + * @return {@link List} + */ + List currentTyphoonList(); + + /** + * 查询台风详情 + * + * @param typhoonId 台风ID + * @return {@link TyphoonDetailDTO} + */ + TyphoonDetailDTO typhoonDetail(String typhoonId); +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonDetailServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonDetailServiceImpl.java new file mode 100644 index 0000000..1a054f9 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonDetailServiceImpl.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.TyphoonDetailMapper; +import com.casic.missiles.modular.system.model.TyphoonDetail; +import com.casic.missiles.modular.system.service.ITyphoonDetailService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class TyphoonDetailServiceImpl extends ServiceImpl implements ITyphoonDetailService { + + public TyphoonDetailServiceImpl() { + + } +} 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 new file mode 100644 index 0000000..d1bf2c7 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.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.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 new file mode 100644 index 0000000..36815fa --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.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.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 new file mode 100644 index 0000000..861e2c1 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java @@ -0,0 +1,182 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.TypeReference; +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.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.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.utils.Constant; +import com.casic.missiles.modular.system.utils.HttpRequestHelper; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class TyphoonServiceImpl extends ServiceImpl implements ITyphoonService { + + private static final String SUCCESS_CODE = "0"; + + private final ITyphoonDetailService typhoonDetailService; + private final ITyphoonLandService typhoonLandService; + private final ITyphoonPointService typhoonPointService; + + public TyphoonServiceImpl(ITyphoonDetailService typhoonDetailService, + ITyphoonLandService typhoonLandService, ITyphoonPointService typhoonPointService) { + this.typhoonDetailService = typhoonDetailService; + this.typhoonLandService = typhoonLandService; + this.typhoonPointService = typhoonPointService; + } + + /** + * 保存台风列表 + */ + @Override + public void saveTyphoonList() { + /** + * 获取台风接口数据 + * */ + String res = HttpRequestHelper.doGet(Constant.TYPHOON_LIST + System.currentTimeMillis()); + if (SUCCESS_CODE.equals(HttpRequestHelper.getTyphoonCode(res))) { + TyphoonRemoteData remoteData = JSON.parseObject(res, new TypeReference() { + }); + //先清空之前的台风表,再保存最新的台风 + remove(null); + List beans = remoteData.getShowapi_res_body().getList(); + for (TyphoonRemoteData.ShowapiResBodyBean.ListBean data : beans) { + //将获取到台风数据存到数据库 + Typhoon entity = new Typhoon(); + entity.setTyphoonId(data.getTfid()); + 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.setSpeed(data.getSpeed()); + entity.setPower(Integer.valueOf(data.getPower())); + entity.setMoveSpeed(data.getMovespeed()); + entity.setMoveDirection(data.getMovedirection()); + entity.setRadius7(data.getRadius7()); + entity.setRadius10(data.getRadius10()); + entity.setTime(data.getTime()); + save(entity); + } + } + } + + /** + * 更新台风详情 + */ + @Override + public void updateTyphoonDetail() { + for (Typhoon typhoon : list()) { + /** + * 获取台风接口数据 + * */ + 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() { + }); + TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean objBean = remoteData.getShowapi_res_body().getObj(); + //保存台风基本情况存到数据库 + 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())); + + //保存台风登陆情况存到数据库 + List land = objBean.getLand(); + typhoonLandService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); + for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.LandBan landBan : land) { + TyphoonLand typhoonLand = new TyphoonLand(); + + 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()); + + typhoonLandService.save(typhoonLand); + } + + //保存台风移动路径存到数据库 + List points = objBean.getPoints(); + typhoonPointService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); + for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.PointsBean point : points) { + TyphoonPoint typhoonPoint = new TyphoonPoint(); + + 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); + } + } + } + } + + @Override + public List currentTyphoonList() { + List typhoonList = new ArrayList<>(); + for (Typhoon typhoon : list()) { + typhoonList.add(new TyphoonDTO(typhoon)); + } + return typhoonList; + } + + @Override + public TyphoonDetailDTO typhoonDetail(String typhoonId) { + TyphoonDetail detail = typhoonDetailService.getOne( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) + ); + List landList = typhoonLandService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) + ); + List pointList = typhoonPointService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) + ); + return new TyphoonDetailDTO(detail, landList, pointList); + } +} 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 new file mode 100644 index 0000000..310c8b4 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java @@ -0,0 +1,26 @@ +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="; +} 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 new file mode 100644 index 0000000..33413b7 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java @@ -0,0 +1,114 @@ +package com.casic.missiles.modular.system.utils; + +import com.alibaba.fastjson.JSON; +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", ShipConstant.OCEAN_APPID); +// object.put("appKey", ShipConstant.OCEAN_APP_KEY); +// } catch (JSONException e) { +// e.printStackTrace(); +// } +// Request tokenRequest = new Request.Builder() +// .url(ShipConstant.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(ShipConstant.OCEAN_HEADER_NAME, token) +// .url(ShipConstant.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-environment/pom.xml b/casic-environment/pom.xml new file mode 100644 index 0000000..5aa6394 --- /dev/null +++ b/casic-environment/pom.xml @@ -0,0 +1,72 @@ + + + 4.0.0 + + com.casic + casic-template + ../pom.xml + 2.0.0 + + + casic-environment + 2.0.0 + jar + casic-environment + + + + + com.casic + casic-core + ${core.version} + provided + + + com.casic + casic-admin-support + ${admin.version} + provided + + + org.springframework.boot + spring-boot-starter-web + ${boot.version} + provided + + + com.casic + casic-server-support + 1.0.0 + + + + com.alibaba + fastjson + ${fastjson.version} + + + com.squareup.okhttp3 + okhttp + 4.9.1 + + + + org.locationtech.spatial4j + spatial4j + 0.8 + + + + + + + src/main/java + + **/*.xml + + + + + \ No newline at end of file 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 new file mode 100644 index 0000000..041adcd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -0,0 +1,26 @@ +package com.casic.missiles.job; + +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +/** + * @author lwh + * 台风数据定时任务,每小时执行一次 + * @ClassName TyphoonQuartzJob + * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling + */ +@Component +public class TyphoonQuartzJob { + private final ITyphoonService typhoonService; + + public TyphoonQuartzJob(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + @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/controller/EnvironmentController.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java new file mode 100644 index 0000000..0f2a0ed --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java @@ -0,0 +1,48 @@ +package com.casic.missiles.modular.system.controller; + +import com.casic.missiles.model.response.ResponseData; +import com.casic.missiles.modular.system.dto.TyphoonDTO; +import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.List; + +/** + * 环境控制器 + * + * @author a203 + */ +@Controller +@RequestMapping("/environment") +public class EnvironmentController { + private final ITyphoonService typhoonService; + + public EnvironmentController(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + /** + * 台风列表 + */ + @GetMapping(value = "/typhoonList") + @ResponseBody + public Object list() { + List typhoonList = typhoonService.currentTyphoonList(); + return ResponseData.success(typhoonList); + } + + /** + * 台风详情 + */ + @GetMapping(value = "/typhoonDetail/{typhoonId}") + @ResponseBody + public Object detail(@PathVariable("typhoonId") String typhoonId) { + TyphoonDetailDTO detailDTO = typhoonService.typhoonDetail(typhoonId); + return ResponseData.success(detailDTO); + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java new file mode 100644 index 0000000..9788030 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.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.TyphoonDetail; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonDetailMapper 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 new file mode 100644 index 0000000..c60bfab --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.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.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 new file mode 100644 index 0000000..70ea807 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.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.Typhoon; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonMapper extends BaseMapper { + +} 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 new file mode 100644 index 0000000..9745785 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.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.TyphoonPoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java new file mode 100644 index 0000000..cdef9a4 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java @@ -0,0 +1,84 @@ +package com.casic.missiles.modular.system.dto; + +import com.casic.missiles.modular.system.model.Typhoon; +import lombok.Data; + +/** + * @author a203 + */ +@Data +public class TyphoonDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 数据更新时间 + */ + private String time; + + public TyphoonDTO(Typhoon data) { + this.typhoonId = data.getTyphoonId(); + this.name = data.getName(); + this.engName = data.getEngName(); + this.lng = data.getLng(); + this.lat = data.getLat(); + this.typhoonType = data.getTyphoonType(); + this.centerPressure = data.getCenterPressure(); + this.speed = data.getSpeed(); + this.power = data.getPower(); + this.moveSpeed = data.getMoveSpeed(); + this.moveDirection = data.getMoveDirection(); + this.radius10 = data.getRadius10(); + this.radius7 = data.getRadius7(); + this.time = data.getTime(); + } +} 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 new file mode 100644 index 0000000..a34da1b --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -0,0 +1,188 @@ +package com.casic.missiles.modular.system.dto; + +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; +import java.util.List; + +/** + * 台风详情 + * + * @author a203 + */ +@Data +public class TyphoonDetailDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 台风告警级别 + */ + private String warnLevel; + /** + * 台风中心经度 + */ + private Double centerLng; + /** + * 台风中心纬度 + */ + private Double centerLat; + /** + * 台风开始时间 + */ + private String startTime; + /** + * 台风结束时间 + */ + private String endTime; + /** + * 台风状态 + */ + private String isActive; + /** + * 台风登陆点 + */ + private List land; + /** + * 台风路径 + */ + private List points; + + @Data + public static class LandBan { + /** + * 台风登陆点 + */ + private String landAddress; + /** + * 台风类型-热带风暴/强台风... + */ + private String type; + private Double lng; + private Double lat; + /** + * 台风登陆细节 + */ + private String info; + /** + * 台风登陆时间 + */ + private String landTime; + } + + @Data + public static class PointBean { + /** + * 数据更新时间 + */ + private String time; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 12级风力影响半径 + */ + private String radius12; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 台风路线预测 + */ + private String routePrediction; + /** + * 中心位置 + */ + private String centerPosition; + } + + public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + this.typhoonId = detail.getTyphoonId(); + this.name = detail.getName(); + this.engName = detail.getEngName(); + this.warnLevel = detail.getWarnLevel(); + this.centerLng = detail.getCenterLng(); + this.centerLat = detail.getCenterLat(); + this.startTime = detail.getStartTime(); + this.endTime = detail.getEndTime(); + this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); + for (TyphoonLand landBean : landBeans) { + LandBan bean = new LandBan(); + bean.landAddress = landBean.getLandAddress(); + bean.landTime = landBean.getLandTime(); + bean.type = landBean.getType(); + bean.lng = landBean.getLng(); + bean.lat = landBean.getLat(); + bean.info = landBean.getInfo(); + lands.add(bean); + } + this.land = lands; + List points = new ArrayList<>(); + for (TyphoonPoint point : pointBeans) { + PointBean pointBean = new PointBean(); + pointBean.time = point.getTime(); + pointBean.centerPressure = point.getCenterPressure(); + pointBean.speed = point.getSpeed(); + pointBean.typhoonType = point.getTyphoonType(); + pointBean.moveSpeed = point.getMoveSpeed(); + pointBean.power = point.getPower(); + pointBean.moveDirection = point.getMoveDirection(); + pointBean.lng = point.getLng(); + pointBean.lat = point.getLat(); + pointBean.radius12 = point.getRadius12(); + pointBean.radius10 = point.getRadius10(); + pointBean.radius7 = point.getRadius7(); + pointBean.routePrediction = point.getRoutePrediction(); + pointBean.centerPosition = point.getCenterPosition(); + points.add(pointBean); + } + this.points = points; + } +} 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 new file mode 100644 index 0000000..5b70924 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java @@ -0,0 +1,419 @@ +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/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java new file mode 100644 index 0000000..38a9257 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java @@ -0,0 +1,237 @@ +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/ITyphoonDetailService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonDetailService.java new file mode 100644 index 0000000..15c757a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonDetailService.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.TyphoonDetail; + +/** + * 台风详情数据信息 服务类 + * + * @author a203 + */ +public interface ITyphoonDetailService 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 new file mode 100644 index 0000000..d16a48b --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.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.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 new file mode 100644 index 0000000..80e2765 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.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.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 new file mode 100644 index 0000000..c47a0f3 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java @@ -0,0 +1,42 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.dto.TyphoonDTO; +import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; +import com.casic.missiles.modular.system.model.Typhoon; + +import java.util.List; + +/** + * 台风列表数据信息 服务类 + * + * @author a203 + */ +public interface ITyphoonService extends IService { + /** + * 保存台风列表 + */ + void saveTyphoonList(); + + /** + * 更新台风详情 + */ + void updateTyphoonDetail(); + + /***上面接口从第三方存库,下面接口查库**********************/ + + /** + * 查询台风列表 + * + * @return {@link List} + */ + List currentTyphoonList(); + + /** + * 查询台风详情 + * + * @param typhoonId 台风ID + * @return {@link TyphoonDetailDTO} + */ + TyphoonDetailDTO typhoonDetail(String typhoonId); +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonDetailServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonDetailServiceImpl.java new file mode 100644 index 0000000..1a054f9 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonDetailServiceImpl.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.TyphoonDetailMapper; +import com.casic.missiles.modular.system.model.TyphoonDetail; +import com.casic.missiles.modular.system.service.ITyphoonDetailService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class TyphoonDetailServiceImpl extends ServiceImpl implements ITyphoonDetailService { + + public TyphoonDetailServiceImpl() { + + } +} 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 new file mode 100644 index 0000000..d1bf2c7 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.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.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 new file mode 100644 index 0000000..36815fa --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.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.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 new file mode 100644 index 0000000..861e2c1 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java @@ -0,0 +1,182 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.TypeReference; +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.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.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.utils.Constant; +import com.casic.missiles.modular.system.utils.HttpRequestHelper; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class TyphoonServiceImpl extends ServiceImpl implements ITyphoonService { + + private static final String SUCCESS_CODE = "0"; + + private final ITyphoonDetailService typhoonDetailService; + private final ITyphoonLandService typhoonLandService; + private final ITyphoonPointService typhoonPointService; + + public TyphoonServiceImpl(ITyphoonDetailService typhoonDetailService, + ITyphoonLandService typhoonLandService, ITyphoonPointService typhoonPointService) { + this.typhoonDetailService = typhoonDetailService; + this.typhoonLandService = typhoonLandService; + this.typhoonPointService = typhoonPointService; + } + + /** + * 保存台风列表 + */ + @Override + public void saveTyphoonList() { + /** + * 获取台风接口数据 + * */ + String res = HttpRequestHelper.doGet(Constant.TYPHOON_LIST + System.currentTimeMillis()); + if (SUCCESS_CODE.equals(HttpRequestHelper.getTyphoonCode(res))) { + TyphoonRemoteData remoteData = JSON.parseObject(res, new TypeReference() { + }); + //先清空之前的台风表,再保存最新的台风 + remove(null); + List beans = remoteData.getShowapi_res_body().getList(); + for (TyphoonRemoteData.ShowapiResBodyBean.ListBean data : beans) { + //将获取到台风数据存到数据库 + Typhoon entity = new Typhoon(); + entity.setTyphoonId(data.getTfid()); + 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.setSpeed(data.getSpeed()); + entity.setPower(Integer.valueOf(data.getPower())); + entity.setMoveSpeed(data.getMovespeed()); + entity.setMoveDirection(data.getMovedirection()); + entity.setRadius7(data.getRadius7()); + entity.setRadius10(data.getRadius10()); + entity.setTime(data.getTime()); + save(entity); + } + } + } + + /** + * 更新台风详情 + */ + @Override + public void updateTyphoonDetail() { + for (Typhoon typhoon : list()) { + /** + * 获取台风接口数据 + * */ + 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() { + }); + TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean objBean = remoteData.getShowapi_res_body().getObj(); + //保存台风基本情况存到数据库 + 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())); + + //保存台风登陆情况存到数据库 + List land = objBean.getLand(); + typhoonLandService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); + for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.LandBan landBan : land) { + TyphoonLand typhoonLand = new TyphoonLand(); + + 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()); + + typhoonLandService.save(typhoonLand); + } + + //保存台风移动路径存到数据库 + List points = objBean.getPoints(); + typhoonPointService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); + for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.PointsBean point : points) { + TyphoonPoint typhoonPoint = new TyphoonPoint(); + + 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); + } + } + } + } + + @Override + public List currentTyphoonList() { + List typhoonList = new ArrayList<>(); + for (Typhoon typhoon : list()) { + typhoonList.add(new TyphoonDTO(typhoon)); + } + return typhoonList; + } + + @Override + public TyphoonDetailDTO typhoonDetail(String typhoonId) { + TyphoonDetail detail = typhoonDetailService.getOne( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) + ); + List landList = typhoonLandService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) + ); + List pointList = typhoonPointService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) + ); + return new TyphoonDetailDTO(detail, landList, pointList); + } +} 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 new file mode 100644 index 0000000..310c8b4 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java @@ -0,0 +1,26 @@ +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="; +} 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 new file mode 100644 index 0000000..33413b7 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java @@ -0,0 +1,114 @@ +package com.casic.missiles.modular.system.utils; + +import com.alibaba.fastjson.JSON; +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", ShipConstant.OCEAN_APPID); +// object.put("appKey", ShipConstant.OCEAN_APP_KEY); +// } catch (JSONException e) { +// e.printStackTrace(); +// } +// Request tokenRequest = new Request.Builder() +// .url(ShipConstant.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(ShipConstant.OCEAN_HEADER_NAME, token) +// .url(ShipConstant.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-web/pom.xml b/casic-web/pom.xml index 2c7d169..e6c7172 100644 --- a/casic-web/pom.xml +++ b/casic-web/pom.xml @@ -112,6 +112,11 @@ com.casic + casic-environment + ${pro.version} + + + com.casic casic-job-quartz 2.0.0.alpha diff --git a/casic-environment/pom.xml b/casic-environment/pom.xml new file mode 100644 index 0000000..5aa6394 --- /dev/null +++ b/casic-environment/pom.xml @@ -0,0 +1,72 @@ + + + 4.0.0 + + com.casic + casic-template + ../pom.xml + 2.0.0 + + + casic-environment + 2.0.0 + jar + casic-environment + + + + + com.casic + casic-core + ${core.version} + provided + + + com.casic + casic-admin-support + ${admin.version} + provided + + + org.springframework.boot + spring-boot-starter-web + ${boot.version} + provided + + + com.casic + casic-server-support + 1.0.0 + + + + com.alibaba + fastjson + ${fastjson.version} + + + com.squareup.okhttp3 + okhttp + 4.9.1 + + + + org.locationtech.spatial4j + spatial4j + 0.8 + + + + + + + src/main/java + + **/*.xml + + + + + \ No newline at end of file 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 new file mode 100644 index 0000000..041adcd --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/job/TyphoonQuartzJob.java @@ -0,0 +1,26 @@ +package com.casic.missiles.job; + +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +/** + * @author lwh + * 台风数据定时任务,每小时执行一次 + * @ClassName TyphoonQuartzJob + * @Description 依赖casic-job-quartz,并在CasicApplication上增加注解 @EnableScheduling + */ +@Component +public class TyphoonQuartzJob { + private final ITyphoonService typhoonService; + + public TyphoonQuartzJob(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + @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/controller/EnvironmentController.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java new file mode 100644 index 0000000..0f2a0ed --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/controller/EnvironmentController.java @@ -0,0 +1,48 @@ +package com.casic.missiles.modular.system.controller; + +import com.casic.missiles.model.response.ResponseData; +import com.casic.missiles.modular.system.dto.TyphoonDTO; +import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; +import com.casic.missiles.modular.system.service.ITyphoonService; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.List; + +/** + * 环境控制器 + * + * @author a203 + */ +@Controller +@RequestMapping("/environment") +public class EnvironmentController { + private final ITyphoonService typhoonService; + + public EnvironmentController(ITyphoonService typhoonService) { + this.typhoonService = typhoonService; + } + + /** + * 台风列表 + */ + @GetMapping(value = "/typhoonList") + @ResponseBody + public Object list() { + List typhoonList = typhoonService.currentTyphoonList(); + return ResponseData.success(typhoonList); + } + + /** + * 台风详情 + */ + @GetMapping(value = "/typhoonDetail/{typhoonId}") + @ResponseBody + public Object detail(@PathVariable("typhoonId") String typhoonId) { + TyphoonDetailDTO detailDTO = typhoonService.typhoonDetail(typhoonId); + return ResponseData.success(detailDTO); + } +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.java new file mode 100644 index 0000000..9788030 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonDetailMapper.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.TyphoonDetail; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonDetailMapper 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 new file mode 100644 index 0000000..c60bfab --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonLandMapper.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.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 new file mode 100644 index 0000000..70ea807 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonMapper.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.Typhoon; + +/** + * 台风数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonMapper extends BaseMapper { + +} 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 new file mode 100644 index 0000000..9745785 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dao/TyphoonPointMapper.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.TyphoonPoint; + +/** + * 台风移动点数据信息 Mapper 接口 + * + * @author a203 + */ +public interface TyphoonPointMapper extends BaseMapper { + +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java new file mode 100644 index 0000000..cdef9a4 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDTO.java @@ -0,0 +1,84 @@ +package com.casic.missiles.modular.system.dto; + +import com.casic.missiles.modular.system.model.Typhoon; +import lombok.Data; + +/** + * @author a203 + */ +@Data +public class TyphoonDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 数据更新时间 + */ + private String time; + + public TyphoonDTO(Typhoon data) { + this.typhoonId = data.getTyphoonId(); + this.name = data.getName(); + this.engName = data.getEngName(); + this.lng = data.getLng(); + this.lat = data.getLat(); + this.typhoonType = data.getTyphoonType(); + this.centerPressure = data.getCenterPressure(); + this.speed = data.getSpeed(); + this.power = data.getPower(); + this.moveSpeed = data.getMoveSpeed(); + this.moveDirection = data.getMoveDirection(); + this.radius10 = data.getRadius10(); + this.radius7 = data.getRadius7(); + this.time = data.getTime(); + } +} 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 new file mode 100644 index 0000000..a34da1b --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/TyphoonDetailDTO.java @@ -0,0 +1,188 @@ +package com.casic.missiles.modular.system.dto; + +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; +import java.util.List; + +/** + * 台风详情 + * + * @author a203 + */ +@Data +public class TyphoonDetailDTO { + /** + * 台风ID + */ + private String typhoonId; + /** + * 台风中文代号 + */ + private String name; + /** + * 台风英文代号 + */ + private String engName; + /** + * 台风告警级别 + */ + private String warnLevel; + /** + * 台风中心经度 + */ + private Double centerLng; + /** + * 台风中心纬度 + */ + private Double centerLat; + /** + * 台风开始时间 + */ + private String startTime; + /** + * 台风结束时间 + */ + private String endTime; + /** + * 台风状态 + */ + private String isActive; + /** + * 台风登陆点 + */ + private List land; + /** + * 台风路径 + */ + private List points; + + @Data + public static class LandBan { + /** + * 台风登陆点 + */ + private String landAddress; + /** + * 台风类型-热带风暴/强台风... + */ + private String type; + private Double lng; + private Double lat; + /** + * 台风登陆细节 + */ + private String info; + /** + * 台风登陆时间 + */ + private String landTime; + } + + @Data + public static class PointBean { + /** + * 数据更新时间 + */ + private String time; + /** + * 台风中心气压,单位【百帕】 + */ + private String centerPressure; + /** + * 风速,单位【米/每秒】 + */ + private String speed; + /** + * 台风风力等级描述 + */ + private String typhoonType; + /** + * 台风整体移动速度,单位【公里/小时】 + */ + private String moveSpeed; + /** + * 风力,单位【级】 + */ + private Integer power; + /** + * 台风未来移动方向 + */ + private String moveDirection; + /** + * 经度 + */ + private Double lng; + /** + * 纬度 + */ + private Double lat; + /** + * 12级风力影响半径 + */ + private String radius12; + /** + * 10级风力影响半径 + */ + private String radius10; + /** + * 7级风力影响半径 + */ + private String radius7; + /** + * 台风路线预测 + */ + private String routePrediction; + /** + * 中心位置 + */ + private String centerPosition; + } + + public TyphoonDetailDTO(TyphoonDetail detail, List landBeans, List pointBeans) { + this.typhoonId = detail.getTyphoonId(); + this.name = detail.getName(); + this.engName = detail.getEngName(); + this.warnLevel = detail.getWarnLevel(); + this.centerLng = detail.getCenterLng(); + this.centerLat = detail.getCenterLat(); + this.startTime = detail.getStartTime(); + this.endTime = detail.getEndTime(); + this.isActive = detail.getIsActive(); + List lands = new ArrayList<>(); + for (TyphoonLand landBean : landBeans) { + LandBan bean = new LandBan(); + bean.landAddress = landBean.getLandAddress(); + bean.landTime = landBean.getLandTime(); + bean.type = landBean.getType(); + bean.lng = landBean.getLng(); + bean.lat = landBean.getLat(); + bean.info = landBean.getInfo(); + lands.add(bean); + } + this.land = lands; + List points = new ArrayList<>(); + for (TyphoonPoint point : pointBeans) { + PointBean pointBean = new PointBean(); + pointBean.time = point.getTime(); + pointBean.centerPressure = point.getCenterPressure(); + pointBean.speed = point.getSpeed(); + pointBean.typhoonType = point.getTyphoonType(); + pointBean.moveSpeed = point.getMoveSpeed(); + pointBean.power = point.getPower(); + pointBean.moveDirection = point.getMoveDirection(); + pointBean.lng = point.getLng(); + pointBean.lat = point.getLat(); + pointBean.radius12 = point.getRadius12(); + pointBean.radius10 = point.getRadius10(); + pointBean.radius7 = point.getRadius7(); + pointBean.routePrediction = point.getRoutePrediction(); + pointBean.centerPosition = point.getCenterPosition(); + points.add(pointBean); + } + this.points = points; + } +} 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 new file mode 100644 index 0000000..5b70924 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonDetailRemoteData.java @@ -0,0 +1,419 @@ +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/TyphoonRemoteData.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java new file mode 100644 index 0000000..38a9257 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/dto/remote/TyphoonRemoteData.java @@ -0,0 +1,237 @@ +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/ITyphoonDetailService.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonDetailService.java new file mode 100644 index 0000000..15c757a --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonDetailService.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.TyphoonDetail; + +/** + * 台风详情数据信息 服务类 + * + * @author a203 + */ +public interface ITyphoonDetailService 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 new file mode 100644 index 0000000..d16a48b --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonLandService.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.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 new file mode 100644 index 0000000..80e2765 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonPointService.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.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 new file mode 100644 index 0000000..c47a0f3 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/ITyphoonService.java @@ -0,0 +1,42 @@ +package com.casic.missiles.modular.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.casic.missiles.modular.system.dto.TyphoonDTO; +import com.casic.missiles.modular.system.dto.TyphoonDetailDTO; +import com.casic.missiles.modular.system.model.Typhoon; + +import java.util.List; + +/** + * 台风列表数据信息 服务类 + * + * @author a203 + */ +public interface ITyphoonService extends IService { + /** + * 保存台风列表 + */ + void saveTyphoonList(); + + /** + * 更新台风详情 + */ + void updateTyphoonDetail(); + + /***上面接口从第三方存库,下面接口查库**********************/ + + /** + * 查询台风列表 + * + * @return {@link List} + */ + List currentTyphoonList(); + + /** + * 查询台风详情 + * + * @param typhoonId 台风ID + * @return {@link TyphoonDetailDTO} + */ + TyphoonDetailDTO typhoonDetail(String typhoonId); +} diff --git a/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonDetailServiceImpl.java b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonDetailServiceImpl.java new file mode 100644 index 0000000..1a054f9 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonDetailServiceImpl.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.TyphoonDetailMapper; +import com.casic.missiles.modular.system.model.TyphoonDetail; +import com.casic.missiles.modular.system.service.ITyphoonDetailService; +import org.springframework.stereotype.Service; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class TyphoonDetailServiceImpl extends ServiceImpl implements ITyphoonDetailService { + + public TyphoonDetailServiceImpl() { + + } +} 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 new file mode 100644 index 0000000..d1bf2c7 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonLandServiceImpl.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.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 new file mode 100644 index 0000000..36815fa --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonPointServiceImpl.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.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 new file mode 100644 index 0000000..861e2c1 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/service/impl/TyphoonServiceImpl.java @@ -0,0 +1,182 @@ +package com.casic.missiles.modular.system.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.TypeReference; +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.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.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.utils.Constant; +import com.casic.missiles.modular.system.utils.HttpRequestHelper; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +/** + * 台风数据信息 服务实现类 + * + * @author a203 + */ + +@Service +public class TyphoonServiceImpl extends ServiceImpl implements ITyphoonService { + + private static final String SUCCESS_CODE = "0"; + + private final ITyphoonDetailService typhoonDetailService; + private final ITyphoonLandService typhoonLandService; + private final ITyphoonPointService typhoonPointService; + + public TyphoonServiceImpl(ITyphoonDetailService typhoonDetailService, + ITyphoonLandService typhoonLandService, ITyphoonPointService typhoonPointService) { + this.typhoonDetailService = typhoonDetailService; + this.typhoonLandService = typhoonLandService; + this.typhoonPointService = typhoonPointService; + } + + /** + * 保存台风列表 + */ + @Override + public void saveTyphoonList() { + /** + * 获取台风接口数据 + * */ + String res = HttpRequestHelper.doGet(Constant.TYPHOON_LIST + System.currentTimeMillis()); + if (SUCCESS_CODE.equals(HttpRequestHelper.getTyphoonCode(res))) { + TyphoonRemoteData remoteData = JSON.parseObject(res, new TypeReference() { + }); + //先清空之前的台风表,再保存最新的台风 + remove(null); + List beans = remoteData.getShowapi_res_body().getList(); + for (TyphoonRemoteData.ShowapiResBodyBean.ListBean data : beans) { + //将获取到台风数据存到数据库 + Typhoon entity = new Typhoon(); + entity.setTyphoonId(data.getTfid()); + 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.setSpeed(data.getSpeed()); + entity.setPower(Integer.valueOf(data.getPower())); + entity.setMoveSpeed(data.getMovespeed()); + entity.setMoveDirection(data.getMovedirection()); + entity.setRadius7(data.getRadius7()); + entity.setRadius10(data.getRadius10()); + entity.setTime(data.getTime()); + save(entity); + } + } + } + + /** + * 更新台风详情 + */ + @Override + public void updateTyphoonDetail() { + for (Typhoon typhoon : list()) { + /** + * 获取台风接口数据 + * */ + 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() { + }); + TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean objBean = remoteData.getShowapi_res_body().getObj(); + //保存台风基本情况存到数据库 + 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())); + + //保存台风登陆情况存到数据库 + List land = objBean.getLand(); + typhoonLandService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); + for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.LandBan landBan : land) { + TyphoonLand typhoonLand = new TyphoonLand(); + + 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()); + + typhoonLandService.save(typhoonLand); + } + + //保存台风移动路径存到数据库 + List points = objBean.getPoints(); + typhoonPointService.remove(new QueryWrapper().eq("TYPHOON_ID", objBean.getTfid())); + for (TyphoonDetailRemoteData.ShowapiResBodyBean.ObjBean.PointsBean point : points) { + TyphoonPoint typhoonPoint = new TyphoonPoint(); + + 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); + } + } + } + } + + @Override + public List currentTyphoonList() { + List typhoonList = new ArrayList<>(); + for (Typhoon typhoon : list()) { + typhoonList.add(new TyphoonDTO(typhoon)); + } + return typhoonList; + } + + @Override + public TyphoonDetailDTO typhoonDetail(String typhoonId) { + TyphoonDetail detail = typhoonDetailService.getOne( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) + ); + List landList = typhoonLandService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) + ); + List pointList = typhoonPointService.list( + new QueryWrapper().eq("TYPHOON_ID", typhoonId) + ); + return new TyphoonDetailDTO(detail, landList, pointList); + } +} 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 new file mode 100644 index 0000000..310c8b4 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/Constant.java @@ -0,0 +1,26 @@ +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="; +} 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 new file mode 100644 index 0000000..33413b7 --- /dev/null +++ b/casic-environment/src/main/java/com/casic/missiles/modular/system/utils/HttpRequestHelper.java @@ -0,0 +1,114 @@ +package com.casic.missiles.modular.system.utils; + +import com.alibaba.fastjson.JSON; +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", ShipConstant.OCEAN_APPID); +// object.put("appKey", ShipConstant.OCEAN_APP_KEY); +// } catch (JSONException e) { +// e.printStackTrace(); +// } +// Request tokenRequest = new Request.Builder() +// .url(ShipConstant.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(ShipConstant.OCEAN_HEADER_NAME, token) +// .url(ShipConstant.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-web/pom.xml b/casic-web/pom.xml index 2c7d169..e6c7172 100644 --- a/casic-web/pom.xml +++ b/casic-web/pom.xml @@ -112,6 +112,11 @@ com.casic + casic-environment + ${pro.version} + + + com.casic casic-job-quartz 2.0.0.alpha diff --git a/pom.xml b/pom.xml index 747bd2a..ef63dcf 100644 --- a/pom.xml +++ b/pom.xml @@ -12,6 +12,7 @@ casic-ship casic-server-support casic-alarm + casic-environment com.casic