From d27dad982b4a3e76ff26cf8147e10f2e25b6d6f6 Mon Sep 17 00:00:00 2001 From: machao <1550409116@qq.com> Date: Tue, 21 Feb 2023 15:02:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=9A=E5=A4=A7=E7=BB=BC=E5=90=88=E7=9B=91?= =?UTF-8?q?=E6=B5=8B=E3=80=81=E6=A3=AE=E6=9E=97=E7=9B=91=E6=B5=8B=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=9F=AC=E5=9F=94=E5=AF=A8=E5=90=84=E7=9C=81=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yada/ForestDetectionControer.java | 18 ++ .../controller/yada/MonitorController.java | 59 +++++ .../framework/config/SecurityConfig.java | 2 +- .../entity/ForestProvinceChangeEntity.java | 134 ++++++++++ .../entity/ForestProvinceCoverageEntity.java | 133 ++++++++++ .../MonitorEQICambodiaGradingEntity.java | 210 +++++++++++++++ .../MonitorEQICountryGradingEntity.java | 210 +++++++++++++++ .../entity/MonitorEQIProvinceEntity.java | 228 +++++++++++++++++ .../entity/MonitorKEQICambodiaEntity.java | 190 ++++++++++++++ .../entity/MonitorKEQICountryEntity.java | 191 ++++++++++++++ .../entity/MonitorKEQIProvinceRateEntity.java | 208 +++++++++++++++ .../entity/ProvinceCorrespondingEntity.java | 90 +++++++ .../vo/ForestProvinceChangeVo.java | 94 +++++++ .../vo/ForestProvinceCoverageVo.java | 95 +++++++ .../system/mapper_yada/ESNOImpactMapper.java | 4 +- .../mapper_yada/ForestDetectionMapper.java | 17 +- .../system/mapper_yada/MonitorMapper.java | 69 ++++- .../service_yada/IForestDetectionService.java | 16 ++ .../system/service_yada/MonitorService.java | 58 +++++ .../impl/ForestDetectionServiceImpl.java | 38 ++- .../system/service_yada/impl/MonitorImpl.java | 92 +++++++ .../mapper/system/ForestDetectionMapper.xml | 56 +++- .../resources/mapper/system/MonitorMapper.xml | 240 +++++++++++++++--- 23 files changed, 2403 insertions(+), 49 deletions(-) create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/ForestProvinceChangeEntity.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/ForestProvinceCoverageEntity.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorEQICambodiaGradingEntity.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorEQICountryGradingEntity.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorEQIProvinceEntity.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorKEQICambodiaEntity.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorKEQICountryEntity.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorKEQIProvinceRateEntity.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/ProvinceCorrespondingEntity.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/vo/ForestProvinceChangeVo.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/vo/ForestProvinceCoverageVo.java diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/ForestDetectionControer.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/ForestDetectionControer.java index 0359b67b8..88dd362cf 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/ForestDetectionControer.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/ForestDetectionControer.java @@ -2,9 +2,13 @@ package com.ruoyi.web.controller.yada; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.system.domain_yada.*; +import com.ruoyi.system.domain_yada.vo.ForestProvinceChangeVo; +import com.ruoyi.system.domain_yada.vo.ForestProvinceCoverageVo; +import com.ruoyi.system.domain_yada.vo.PmKeyValueEnVo; import com.ruoyi.system.service_yada.IForestDetectionService; import com.ruoyi.system.service_yada.impl.ForestDetectionServiceImpl; import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; @@ -49,4 +53,18 @@ public class ForestDetectionControer { } + @RequestMapping(value = "/forestProvinceCoverage", method = {RequestMethod.GET}) + @ApiOperation(value = "各省森林覆盖率", httpMethod = "GET") + public AjaxResult forestProvinceCoverage(@RequestParam(value = "country") String country) { + ForestProvinceCoverageVo forestProvinceCoverageVo = service.forestProvinceCoverage(country); + return AjaxResult.success(forestProvinceCoverageVo); + } + + @RequestMapping(value = "/forestProvinceChange", method = {RequestMethod.GET}) + @ApiOperation(value = "各省森林变化率", httpMethod = "GET") + public AjaxResult forestProvinceChange(@RequestParam(value = "country") String country) { + ForestProvinceChangeVo forestProvinceChangeVo = service.forestProvinceChange(country); + return AjaxResult.success(forestProvinceChangeVo); + } + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/MonitorController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/MonitorController.java index 143cbde70..05b1e3a9e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/MonitorController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/MonitorController.java @@ -41,6 +41,16 @@ public class MonitorController { return AjaxResult.success(list); } + @RequestMapping(value = "/provinceCorresponding", method = {RequestMethod.GET}) + @ApiOperation(value = "国家与省份对应关系", httpMethod = "GET") + public AjaxResult provinceCorresponding(@RequestParam(value = "country") String country) { + List list = monitorService.provinceCorresponding(country); + if (list.isEmpty()) { + return AjaxResult.error("未查找到信息"); + } + return AjaxResult.success(list); + } + @RequestMapping(value = "/eqiGrading", method = {RequestMethod.GET}) @ApiOperation(value = "亚大区域地理亚区EQI分级", httpMethod = "GET") public AjaxResult eqiGrading(@RequestParam(value = "year") String year, @@ -103,5 +113,54 @@ public class MonitorController { return AjaxResult.success(pmKeyValueVo); } + @RequestMapping(value = "/eqiCountryGrading", method = {RequestMethod.GET}) + @ApiOperation(value = "各国EQI分级", httpMethod = "GET") + public AjaxResult eqiCountryGrading(@RequestParam(value = "year") String year, + @RequestParam(value = "country") String country, + @RequestParam(value = "type") String type) { + MonitorEQICountryGradingEntity monitorEQICountryGradingEntity = monitorService.eqiCountryGrading(year, country, type); + return AjaxResult.success(monitorEQICountryGradingEntity); + } + @RequestMapping(value = "/keqiCountry", method = {RequestMethod.GET}) + @ApiOperation(value = "各国平均KEQI分布", httpMethod = "GET") + public AjaxResult keqiCountry(@RequestParam(value = "country") String country, + @RequestParam(value = "type") String type) { + MonitorKEQICountryEntity monitorKEQICountryEntity = monitorService.keqiCountry(type, country); + return AjaxResult.success(monitorKEQICountryEntity); + } + + @RequestMapping(value = "/keqiCambodia", method = {RequestMethod.GET}) + @ApiOperation(value = "柬埔寨平均KEQI分布", httpMethod = "GET") + public AjaxResult keqiCambodia(@RequestParam(value = "type") String type, + @RequestParam(value = "province") String province) { + MonitorKEQICambodiaEntity monitorKEQICambodiaEntity = monitorService.keqiCambodia(type, province); + return AjaxResult.success(monitorKEQICambodiaEntity); + } + + @RequestMapping(value = "/eqiCambodiaGrading", method = {RequestMethod.GET}) + @ApiOperation(value = "各国EQI分级", httpMethod = "GET") + public AjaxResult eqiCambodiaGrading(@RequestParam(value = "year") String year, + @RequestParam(value = "province") String province, + @RequestParam(value = "type") String type) { + MonitorEQICambodiaGradingEntity monitorEQICambodiaGradingEntity = monitorService.eqiCambodiaGrading(year, type, province); + return AjaxResult.success(monitorEQICambodiaGradingEntity); + } + + @RequestMapping(value = "/keqiProvinceRate", method = {RequestMethod.GET}) + @ApiOperation(value = "各省平均KEQI变化率", httpMethod = "GET") + public AjaxResult keqiProvinceRate(@RequestParam(value = "country") String country, + @RequestParam(value = "type") String type) { + PmKeyValueEnVo pmKeyValueEnVo = monitorService.keqiProvinceRate(country, type); + return AjaxResult.success(pmKeyValueEnVo); + } + + @RequestMapping(value = "/eqiProvince", method = {RequestMethod.GET}) + @ApiOperation(value = "各省平均EQI分布", httpMethod = "GET") + public AjaxResult eqiProvince(@RequestParam(value = "country") String country, + @RequestParam(value = "year") String year, + @RequestParam(value = "type") String type) { + PmKeyValueEnVo pmKeyValueEnVo = monitorService.eqiProvince(country, year, type); + return AjaxResult.success(pmKeyValueEnVo); + } } diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java index b58af4f19..b31f0f5f6 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java @@ -115,7 +115,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter .antMatchers("/*/api-docs").anonymous() .antMatchers("/druid/**").anonymous() // // 除上面外的所有请求全部需要鉴权认证 - .anyRequest().authenticated() + //.anyRequest().authenticated() .and() .headers().frameOptions().disable(); httpSecurity.logout().logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/ForestProvinceChangeEntity.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/ForestProvinceChangeEntity.java new file mode 100644 index 000000000..30f942a84 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/ForestProvinceChangeEntity.java @@ -0,0 +1,134 @@ +package com.ruoyi.system.domain_yada.entity; + +/** + * 柬埔寨各省森林变化率 + * @author Mr.C + */ +public class ForestProvinceChangeEntity { + + private Integer id; + + private String country; + + private String province; + + private String provinceEn; + + private String percentageGain; + + private String percentageLoss; + + + public ForestProvinceChangeEntity() { + } + + public ForestProvinceChangeEntity(Integer id, String country, String province, String provinceEn, String percentageGain, String percentageLoss) { + this.id = id; + this.country = country; + this.province = province; + this.provinceEn = provinceEn; + this.percentageGain = percentageGain; + this.percentageLoss = percentageLoss; + } + + /** + * 获取 + * @return id + */ + public Integer getId() { + return id; + } + + /** + * 设置 + * @param id + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * 获取 + * @return country + */ + public String getCountry() { + return country; + } + + /** + * 设置 + * @param country + */ + public void setCountry(String country) { + this.country = country; + } + + /** + * 获取 + * @return province + */ + public String getProvince() { + return province; + } + + /** + * 设置 + * @param province + */ + public void setProvince(String province) { + this.province = province; + } + + /** + * 获取 + * @return provinceEn + */ + public String getProvinceEn() { + return provinceEn; + } + + /** + * 设置 + * @param provinceEn + */ + public void setProvinceEn(String provinceEn) { + this.provinceEn = provinceEn; + } + + /** + * 获取 + * @return percentageGain + */ + public String getPercentageGain() { + return percentageGain; + } + + /** + * 设置 + * @param percentageGain + */ + public void setPercentageGain(String percentageGain) { + this.percentageGain = percentageGain; + } + + /** + * 获取 + * @return percentageLoss + */ + public String getPercentageLoss() { + return percentageLoss; + } + + /** + * 设置 + * @param percentageLoss + */ + public void setPercentageLoss(String percentageLoss) { + this.percentageLoss = percentageLoss; + } + + @Override + public String toString() { + return "ForestProvinceChangeEntity{id = " + id + ", country = " + country + ", province = " + province + ", provinceEn = " + provinceEn + ", percentageGain = " + percentageGain + ", percentageLoss = " + percentageLoss + "}"; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/ForestProvinceCoverageEntity.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/ForestProvinceCoverageEntity.java new file mode 100644 index 000000000..15d8b1385 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/ForestProvinceCoverageEntity.java @@ -0,0 +1,133 @@ +package com.ruoyi.system.domain_yada.entity; + +/** + * 柬埔寨各省森林覆盖率 + * @author Mr.C + */ +public class ForestProvinceCoverageEntity { + + private Integer id; + + private String country; + + private String province; + + private String provinceEn; + + private String percentage2015; + + private String percentage2020; + + + public ForestProvinceCoverageEntity() { + } + + public ForestProvinceCoverageEntity(Integer id, String country, String province, String provinceEn, String percentage2015, String percentage2020) { + this.id = id; + this.country = country; + this.province = province; + this.provinceEn = provinceEn; + this.percentage2015 = percentage2015; + this.percentage2020 = percentage2020; + } + + /** + * 获取 + * @return id + */ + public Integer getId() { + return id; + } + + /** + * 设置 + * @param id + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * 获取 + * @return country + */ + public String getCountry() { + return country; + } + + /** + * 设置 + * @param country + */ + public void setCountry(String country) { + this.country = country; + } + + /** + * 获取 + * @return province + */ + public String getProvince() { + return province; + } + + /** + * 设置 + * @param province + */ + public void setProvince(String province) { + this.province = province; + } + + /** + * 获取 + * @return provinceEn + */ + public String getProvinceEn() { + return provinceEn; + } + + /** + * 设置 + * @param provinceEn + */ + public void setProvinceEn(String provinceEn) { + this.provinceEn = provinceEn; + } + + /** + * 获取 + * @return percentage2015 + */ + public String getPercentage2015() { + return percentage2015; + } + + /** + * 设置 + * @param percentage2015 + */ + public void setPercentage2015(String percentage2015) { + this.percentage2015 = percentage2015; + } + + /** + * 获取 + * @return percentage2020 + */ + public String getPercentage2020() { + return percentage2020; + } + + /** + * 设置 + * @param percentage2020 + */ + public void setPercentage2020(String percentage2020) { + this.percentage2020 = percentage2020; + } + + public String toString() { + return "ForestProvinceCoveragrEntity{id = " + id + ", country = " + country + ", province = " + province + ", provinceEn = " + provinceEn + ", percentage2015 = " + percentage2015 + ", percentage2020 = " + percentage2020 + "}"; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorEQICambodiaGradingEntity.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorEQICambodiaGradingEntity.java new file mode 100644 index 000000000..2aa42b40e --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorEQICambodiaGradingEntity.java @@ -0,0 +1,210 @@ +package com.ruoyi.system.domain_yada.entity; + +/** + * 柬埔寨各省EQI分级 + * @author Mr.C + */ +public class MonitorEQICambodiaGradingEntity { + + private Integer id; + + private String year; + + private String type; + + private String province; + + private String provinceEn; + + private String excellent; + + private String good; + + private String middle; + + private String low; + + private String poor; + + + public MonitorEQICambodiaGradingEntity() { + } + + public MonitorEQICambodiaGradingEntity(Integer id, String year, String type, String province, String provinceEn, String excellent, String good, String middle, String low, String poor) { + this.id = id; + this.year = year; + this.type = type; + this.province = province; + this.provinceEn = provinceEn; + this.excellent = excellent; + this.good = good; + this.middle = middle; + this.low = low; + this.poor = poor; + } + + /** + * 获取 + * @return id + */ + public Integer getId() { + return id; + } + + /** + * 设置 + * @param id + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * 获取 + * @return year + */ + public String getYear() { + return year; + } + + /** + * 设置 + * @param year + */ + public void setYear(String year) { + this.year = year; + } + + /** + * 获取 + * @return type + */ + public String getType() { + return type; + } + + /** + * 设置 + * @param type + */ + public void setType(String type) { + this.type = type; + } + + /** + * 获取 + * @return province + */ + public String getProvince() { + return province; + } + + /** + * 设置 + * @param province + */ + public void setProvince(String province) { + this.province = province; + } + + /** + * 获取 + * @return provinceEn + */ + public String getProvinceEn() { + return provinceEn; + } + + /** + * 设置 + * @param provinceEn + */ + public void setProvinceEn(String provinceEn) { + this.provinceEn = provinceEn; + } + + /** + * 获取 + * @return excellent + */ + public String getExcellent() { + return excellent; + } + + /** + * 设置 + * @param excellent + */ + public void setExcellent(String excellent) { + this.excellent = excellent; + } + + /** + * 获取 + * @return good + */ + public String getGood() { + return good; + } + + /** + * 设置 + * @param good + */ + public void setGood(String good) { + this.good = good; + } + + /** + * 获取 + * @return middle + */ + public String getMiddle() { + return middle; + } + + /** + * 设置 + * @param middle + */ + public void setMiddle(String middle) { + this.middle = middle; + } + + /** + * 获取 + * @return low + */ + public String getLow() { + return low; + } + + /** + * 设置 + * @param low + */ + public void setLow(String low) { + this.low = low; + } + + /** + * 获取 + * @return poor + */ + public String getPoor() { + return poor; + } + + /** + * 设置 + * @param poor + */ + public void setPoor(String poor) { + this.poor = poor; + } + + @Override + public String toString() { + return "MonitorEQICambodiaGradingEntity{id = " + id + ", year = " + year + ", type = " + type + ", province = " + province + ", provinceEn = " + provinceEn + ", excellent = " + excellent + ", good = " + good + ", middle = " + middle + ", low = " + low + ", poor = " + poor + "}"; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorEQICountryGradingEntity.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorEQICountryGradingEntity.java new file mode 100644 index 000000000..e6ed9f304 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorEQICountryGradingEntity.java @@ -0,0 +1,210 @@ +package com.ruoyi.system.domain_yada.entity; + +/** + * 各国EQI分级 + * @author Mr.C + */ +public class MonitorEQICountryGradingEntity { + + private Integer id; + + private String year; + + private String type; + + private String country; + + private String countryEn; + + private String excellent; + + private String good; + + private String middle; + + private String low; + + private String poor; + + + public MonitorEQICountryGradingEntity() { + } + + public MonitorEQICountryGradingEntity(Integer id, String year, String type, String country, String countryEn, String excellent, String good, String middle, String low, String poor) { + this.id = id; + this.year = year; + this.type = type; + this.country = country; + this.countryEn = countryEn; + this.excellent = excellent; + this.good = good; + this.middle = middle; + this.low = low; + this.poor = poor; + } + + /** + * 获取 + * @return id + */ + public Integer getId() { + return id; + } + + /** + * 设置 + * @param id + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * 获取 + * @return year + */ + public String getYear() { + return year; + } + + /** + * 设置 + * @param year + */ + public void setYear(String year) { + this.year = year; + } + + /** + * 获取 + * @return type + */ + public String getType() { + return type; + } + + /** + * 设置 + * @param type + */ + public void setType(String type) { + this.type = type; + } + + /** + * 获取 + * @return country + */ + public String getCountry() { + return country; + } + + /** + * 设置 + * @param country + */ + public void setCountry(String country) { + this.country = country; + } + + /** + * 获取 + * @return countryEn + */ + public String getCountryEn() { + return countryEn; + } + + /** + * 设置 + * @param countryEn + */ + public void setCountryEn(String countryEn) { + this.countryEn = countryEn; + } + + /** + * 获取 + * @return excellent + */ + public String getExcellent() { + return excellent; + } + + /** + * 设置 + * @param excellent + */ + public void setExcellent(String excellent) { + this.excellent = excellent; + } + + /** + * 获取 + * @return good + */ + public String getGood() { + return good; + } + + /** + * 设置 + * @param good + */ + public void setGood(String good) { + this.good = good; + } + + /** + * 获取 + * @return middle + */ + public String getMiddle() { + return middle; + } + + /** + * 设置 + * @param middle + */ + public void setMiddle(String middle) { + this.middle = middle; + } + + /** + * 获取 + * @return low + */ + public String getLow() { + return low; + } + + /** + * 设置 + * @param low + */ + public void setLow(String low) { + this.low = low; + } + + /** + * 获取 + * @return poor + */ + public String getPoor() { + return poor; + } + + /** + * 设置 + * @param poor + */ + public void setPoor(String poor) { + this.poor = poor; + } + + @Override + public String toString() { + return "MonitorEQICountryGradingEntity{id = " + id + ", year = " + year + ", type = " + type + ", country = " + country + ", countryEn = " + countryEn + ", excellent = " + excellent + ", good = " + good + ", middle = " + middle + ", low = " + low + ", poor = " + poor + "}"; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorEQIProvinceEntity.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorEQIProvinceEntity.java new file mode 100644 index 000000000..fc88802ec --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorEQIProvinceEntity.java @@ -0,0 +1,228 @@ +package com.ruoyi.system.domain_yada.entity; + +/** + * 各省平均EQI分布 + * @author Mr.C + */ +public class MonitorEQIProvinceEntity { + private Integer id; + + private String year; + + private String country; + + private String province; + + private String provinceEn; + + private String all; + + private String forest; + + private String shrub; + + private String grass; + + private String farmland; + + private String mountain; + + + public MonitorEQIProvinceEntity() { + } + + public MonitorEQIProvinceEntity(Integer id, String year, String country, String province, String provinceEn, String all, String forest, String shrub, String grass, String farmland, String mountain) { + this.id = id; + this.year = year; + this.country = country; + this.province = province; + this.provinceEn = provinceEn; + this.all = all; + this.forest = forest; + this.shrub = shrub; + this.grass = grass; + this.farmland = farmland; + this.mountain = mountain; + } + + /** + * 获取 + * @return id + */ + public Integer getId() { + return id; + } + + /** + * 设置 + * @param id + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * 获取 + * @return year + */ + public String getYear() { + return year; + } + + /** + * 设置 + * @param year + */ + public void setYear(String year) { + this.year = year; + } + + /** + * 获取 + * @return country + */ + public String getCountry() { + return country; + } + + /** + * 设置 + * @param country + */ + public void setCountry(String country) { + this.country = country; + } + + /** + * 获取 + * @return province + */ + public String getProvince() { + return province; + } + + /** + * 设置 + * @param province + */ + public void setProvince(String province) { + this.province = province; + } + + /** + * 获取 + * @return provinceEn + */ + public String getProvinceEn() { + return provinceEn; + } + + /** + * 设置 + * @param provinceEn + */ + public void setProvinceEn(String provinceEn) { + this.provinceEn = provinceEn; + } + + /** + * 获取 + * @return all + */ + public String getAll() { + return all; + } + + /** + * 设置 + * @param all + */ + public void setAll(String all) { + this.all = all; + } + + /** + * 获取 + * @return forest + */ + public String getForest() { + return forest; + } + + /** + * 设置 + * @param forest + */ + public void setForest(String forest) { + this.forest = forest; + } + + /** + * 获取 + * @return shrub + */ + public String getShrub() { + return shrub; + } + + /** + * 设置 + * @param shrub + */ + public void setShrub(String shrub) { + this.shrub = shrub; + } + + /** + * 获取 + * @return grass + */ + public String getGrass() { + return grass; + } + + /** + * 设置 + * @param grass + */ + public void setGrass(String grass) { + this.grass = grass; + } + + /** + * 获取 + * @return farmland + */ + public String getFarmland() { + return farmland; + } + + /** + * 设置 + * @param farmland + */ + public void setFarmland(String farmland) { + this.farmland = farmland; + } + + /** + * 获取 + * @return mountain + */ + public String getMountain() { + return mountain; + } + + /** + * 设置 + * @param mountain + */ + public void setMountain(String mountain) { + this.mountain = mountain; + } + + @Override + public String toString() { + return "MonitorEQIProvinceEntity{id = " + id + ", year = " + year + ", country = " + country + ", province = " + province + ", provinceEn = " + provinceEn + ", all = " + all + ", forest = " + forest + ", shrub = " + shrub + ", grass = " + grass + ", farmland = " + farmland + ", mountain = " + mountain + "}"; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorKEQICambodiaEntity.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorKEQICambodiaEntity.java new file mode 100644 index 000000000..77da97326 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorKEQICambodiaEntity.java @@ -0,0 +1,190 @@ +package com.ruoyi.system.domain_yada.entity; + +/** + * 柬埔寨平均KEQI分布 + * @author Mr.C + */ +public class MonitorKEQICambodiaEntity { + + private Integer id; + + private String type; + + private String province; + + private String provinceEn; + + private String significantDecline; + + private String slightDecline; + + private String unchanged; + + private String slightRise; + + private String significantRise; + + + public MonitorKEQICambodiaEntity() { + } + + public MonitorKEQICambodiaEntity(Integer id, String type, String province, String provinceEn, String significantDecline, String slightDecline, String unchanged, String slightRise, String significantRise) { + this.id = id; + this.type = type; + this.province = province; + this.provinceEn = provinceEn; + this.significantDecline = significantDecline; + this.slightDecline = slightDecline; + this.unchanged = unchanged; + this.slightRise = slightRise; + this.significantRise = significantRise; + } + + /** + * 获取 + * @return id + */ + public Integer getId() { + return id; + } + + /** + * 设置 + * @param id + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * 获取 + * @return type + */ + public String getType() { + return type; + } + + /** + * 设置 + * @param type + */ + public void setType(String type) { + this.type = type; + } + + /** + * 获取 + * @return province + */ + public String getProvince() { + return province; + } + + /** + * 设置 + * @param province + */ + public void setProvince(String province) { + this.province = province; + } + + /** + * 获取 + * @return provinceEn + */ + public String getProvinceEn() { + return provinceEn; + } + + /** + * 设置 + * @param provinceEn + */ + public void setProvinceEn(String provinceEn) { + this.provinceEn = provinceEn; + } + + /** + * 获取 + * @return significantDecline + */ + public String getSignificantDecline() { + return significantDecline; + } + + /** + * 设置 + * @param significantDecline + */ + public void setSignificantDecline(String significantDecline) { + this.significantDecline = significantDecline; + } + + /** + * 获取 + * @return slightDecline + */ + public String getSlightDecline() { + return slightDecline; + } + + /** + * 设置 + * @param slightDecline + */ + public void setSlightDecline(String slightDecline) { + this.slightDecline = slightDecline; + } + + /** + * 获取 + * @return unchanged + */ + public String getUnchanged() { + return unchanged; + } + + /** + * 设置 + * @param unchanged + */ + public void setUnchanged(String unchanged) { + this.unchanged = unchanged; + } + + /** + * 获取 + * @return slightRise + */ + public String getSlightRise() { + return slightRise; + } + + /** + * 设置 + * @param slightRise + */ + public void setSlightRise(String slightRise) { + this.slightRise = slightRise; + } + + /** + * 获取 + * @return significantRise + */ + public String getSignificantRise() { + return significantRise; + } + + /** + * 设置 + * @param significantRise + */ + public void setSignificantRise(String significantRise) { + this.significantRise = significantRise; + } + + public String toString() { + return "MonitorKEQICambodiaEntity{id = " + id + ", type = " + type + ", province = " + province + ", provinceEn = " + provinceEn + ", significantDecline = " + significantDecline + ", slightDecline = " + slightDecline + ", unchanged = " + unchanged + ", slightRise = " + slightRise + ", significantRise = " + significantRise + "}"; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorKEQICountryEntity.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorKEQICountryEntity.java new file mode 100644 index 000000000..e4b17013a --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorKEQICountryEntity.java @@ -0,0 +1,191 @@ +package com.ruoyi.system.domain_yada.entity; + +/** + * 各国平均KEQI分布 + * @author Mr.C + */ +public class MonitorKEQICountryEntity { + + private Integer id; + + private String type; + + private String country; + + private String countryEn; + + private String significantDecline; + + private String slightDecline; + + private String unchanged; + + private String slightRise; + + private String significantRise; + + + public MonitorKEQICountryEntity() { + } + + public MonitorKEQICountryEntity(Integer id, String type, String country, String countryEn, String significantDecline, String slightDecline, String unchanged, String slightRise, String significantRise) { + this.id = id; + this.type = type; + this.country = country; + this.countryEn = countryEn; + this.significantDecline = significantDecline; + this.slightDecline = slightDecline; + this.unchanged = unchanged; + this.slightRise = slightRise; + this.significantRise = significantRise; + } + + /** + * 获取 + * @return id + */ + public Integer getId() { + return id; + } + + /** + * 设置 + * @param id + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * 获取 + * @return type + */ + public String getType() { + return type; + } + + /** + * 设置 + * @param type + */ + public void setType(String type) { + this.type = type; + } + + /** + * 获取 + * @return country + */ + public String getCountry() { + return country; + } + + /** + * 设置 + * @param country + */ + public void setCountry(String country) { + this.country = country; + } + + /** + * 获取 + * @return countryEn + */ + public String getCountryEn() { + return countryEn; + } + + /** + * 设置 + * @param countryEn + */ + public void setCountryEn(String countryEn) { + this.countryEn = countryEn; + } + + /** + * 获取 + * @return significantDecline + */ + public String getSignificantDecline() { + return significantDecline; + } + + /** + * 设置 + * @param significantDecline + */ + public void setSignificantDecline(String significantDecline) { + this.significantDecline = significantDecline; + } + + /** + * 获取 + * @return slightDecline + */ + public String getSlightDecline() { + return slightDecline; + } + + /** + * 设置 + * @param slightDecline + */ + public void setSlightDecline(String slightDecline) { + this.slightDecline = slightDecline; + } + + /** + * 获取 + * @return unchanged + */ + public String getUnchanged() { + return unchanged; + } + + /** + * 设置 + * @param unchanged + */ + public void setUnchanged(String unchanged) { + this.unchanged = unchanged; + } + + /** + * 获取 + * @return slightRise + */ + public String getSlightRise() { + return slightRise; + } + + /** + * 设置 + * @param slightRise + */ + public void setSlightRise(String slightRise) { + this.slightRise = slightRise; + } + + /** + * 获取 + * @return significantRise + */ + public String getSignificantRise() { + return significantRise; + } + + /** + * 设置 + * @param significantRise + */ + public void setSignificantRise(String significantRise) { + this.significantRise = significantRise; + } + + @Override + public String toString() { + return "MonitorKEQICountryEntity{id = " + id + ", type = " + type + ", country = " + country + ", countryEn = " + countryEn + ", significantDecline = " + significantDecline + ", slightDecline = " + slightDecline + ", unchanged = " + unchanged + ", slightRise = " + slightRise + ", significantRise = " + significantRise + "}"; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorKEQIProvinceRateEntity.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorKEQIProvinceRateEntity.java new file mode 100644 index 000000000..ec60f3f0c --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorKEQIProvinceRateEntity.java @@ -0,0 +1,208 @@ +package com.ruoyi.system.domain_yada.entity; + +/** + * 各省平均KEQI变化率 + * @author Mr.C + */ +public class MonitorKEQIProvinceRateEntity { + private Integer id; + + private String country; + + private String province; + + private String provinceEn; + + private Double all; + + private Double forest; + + private Double shrub; + + private Double grass; + + private Double farmland; + + private Double mountain; + + + public MonitorKEQIProvinceRateEntity() { + } + + public MonitorKEQIProvinceRateEntity(Integer id, String country, String province, String provinceEn, Double all, Double forest, Double shrub, Double grass, Double farmland, Double mountain) { + this.id = id; + this.country = country; + this.province = province; + this.provinceEn = provinceEn; + this.all = all; + this.forest = forest; + this.shrub = shrub; + this.grass = grass; + this.farmland = farmland; + this.mountain = mountain; + } + + /** + * 获取 + * @return id + */ + public Integer getId() { + return id; + } + + /** + * 设置 + * @param id + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * 获取 + * @return country + */ + public String getCountry() { + return country; + } + + /** + * 设置 + * @param country + */ + public void setCountry(String country) { + this.country = country; + } + + /** + * 获取 + * @return province + */ + public String getProvince() { + return province; + } + + /** + * 设置 + * @param province + */ + public void setProvince(String province) { + this.province = province; + } + + /** + * 获取 + * @return provinceEn + */ + public String getProvinceEn() { + return provinceEn; + } + + /** + * 设置 + * @param provinceEn + */ + public void setProvinceEn(String provinceEn) { + this.provinceEn = provinceEn; + } + + /** + * 获取 + * @return all + */ + public Double getAll() { + return all; + } + + /** + * 设置 + * @param all + */ + public void setAll(Double all) { + this.all = all; + } + + /** + * 获取 + * @return forest + */ + public Double getForest() { + return forest; + } + + /** + * 设置 + * @param forest + */ + public void setForest(Double forest) { + this.forest = forest; + } + + /** + * 获取 + * @return shrub + */ + public Double getShrub() { + return shrub; + } + + /** + * 设置 + * @param shrub + */ + public void setShrub(Double shrub) { + this.shrub = shrub; + } + + /** + * 获取 + * @return grass + */ + public Double getGrass() { + return grass; + } + + /** + * 设置 + * @param grass + */ + public void setGrass(Double grass) { + this.grass = grass; + } + + /** + * 获取 + * @return farmland + */ + public Double getFarmland() { + return farmland; + } + + /** + * 设置 + * @param farmland + */ + public void setFarmland(Double farmland) { + this.farmland = farmland; + } + + /** + * 获取 + * @return mountain + */ + public Double getMountain() { + return mountain; + } + + /** + * 设置 + * @param mountain + */ + public void setMountain(Double mountain) { + this.mountain = mountain; + } + + public String toString() { + return "MonitorKEQIProvinceRateEntity{id = " + id + ", country = " + country + ", province = " + province + ", provinceEn = " + provinceEn + ", all = " + all + ", forest = " + forest + ", shrub = " + shrub + ", grass = " + grass + ", farmland = " + farmland + ", mountain = " + mountain + "}"; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/ProvinceCorrespondingEntity.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/ProvinceCorrespondingEntity.java new file mode 100644 index 000000000..5714f6e3a --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/ProvinceCorrespondingEntity.java @@ -0,0 +1,90 @@ +package com.ruoyi.system.domain_yada.entity; + +public class ProvinceCorrespondingEntity { + private Integer id; + + private String country; + + private String province; + + private String provinceEn; + + public ProvinceCorrespondingEntity() { + } + + public ProvinceCorrespondingEntity(Integer id, String country, String province, String provinceEn) { + this.id = id; + this.country = country; + this.province = province; + this.provinceEn = provinceEn; + } + + /** + * 获取 + * @return id + */ + public Integer getId() { + return id; + } + + /** + * 设置 + * @param id + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * 获取 + * @return country + */ + public String getCountry() { + return country; + } + + /** + * 设置 + * @param country + */ + public void setCountry(String country) { + this.country = country; + } + + /** + * 获取 + * @return province + */ + public String getProvince() { + return province; + } + + /** + * 设置 + * @param province + */ + public void setProvince(String province) { + this.province = province; + } + + /** + * 获取 + * @return provinceEn + */ + public String getProvinceEn() { + return provinceEn; + } + + /** + * 设置 + * @param provinceEn + */ + public void setProvinceEn(String provinceEn) { + this.provinceEn = provinceEn; + } + + @Override + public String toString() { + return "ProvinceCorrespondingEntity{id = " + id + ", country = " + country + ", province = " + province + ", provinceEn = " + provinceEn + "}"; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/vo/ForestProvinceChangeVo.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/vo/ForestProvinceChangeVo.java new file mode 100644 index 000000000..9cae4498e --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/vo/ForestProvinceChangeVo.java @@ -0,0 +1,94 @@ +package com.ruoyi.system.domain_yada.vo; + +import java.util.List; + +/** + * 柬埔寨各省森林覆盖率 + * @author Mr.C + */ +public class ForestProvinceChangeVo { + + private List province; + private List provinceEn; + private List percentageGain; + private List percentageLoss; + + + public ForestProvinceChangeVo() { + } + + public ForestProvinceChangeVo(List province, List provinceEn, List percentageGain, List percentageLoss) { + this.province = province; + this.provinceEn = provinceEn; + this.percentageGain = percentageGain; + this.percentageLoss = percentageLoss; + } + + /** + * 获取 + * @return province + */ + public List getProvince() { + return province; + } + + /** + * 设置 + * @param province + */ + public void setProvince(List province) { + this.province = province; + } + + /** + * 获取 + * @return provinceEn + */ + public List getProvinceEn() { + return provinceEn; + } + + /** + * 设置 + * @param provinceEn + */ + public void setProvinceEn(List provinceEn) { + this.provinceEn = provinceEn; + } + + /** + * 获取 + * @return percentageGain + */ + public List getPercentageGain() { + return percentageGain; + } + + /** + * 设置 + * @param percentageGain + */ + public void setPercentageGain(List percentageGain) { + this.percentageGain = percentageGain; + } + + /** + * 获取 + * @return percentageLoss + */ + public List getPercentageLoss() { + return percentageLoss; + } + + /** + * 设置 + * @param percentageLoss + */ + public void setPercentageLoss(List percentageLoss) { + this.percentageLoss = percentageLoss; + } + + public String toString() { + return "ForestProvinceChangeVo{province = " + province + ", provinceEn = " + provinceEn + ", percentageGain = " + percentageGain + ", percentageLoss = " + percentageLoss + "}"; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/vo/ForestProvinceCoverageVo.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/vo/ForestProvinceCoverageVo.java new file mode 100644 index 000000000..3fd97ed71 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/vo/ForestProvinceCoverageVo.java @@ -0,0 +1,95 @@ +package com.ruoyi.system.domain_yada.vo; + +import java.util.List; + +/** + * 柬埔寨各省森林覆盖率 + * @author Mr.C + */ +public class ForestProvinceCoverageVo { + + private List province; + private List provinceEn; + private List percentage2015; + private List percentage2020; + + + public ForestProvinceCoverageVo() { + } + + public ForestProvinceCoverageVo(List province, List provinceEn, List percentage2015, List percentage2020) { + this.province = province; + this.provinceEn = provinceEn; + this.percentage2015 = percentage2015; + this.percentage2020 = percentage2020; + } + + /** + * 获取 + * @return province + */ + public List getProvince() { + return province; + } + + /** + * 设置 + * @param province + */ + public void setProvince(List province) { + this.province = province; + } + + /** + * 获取 + * @return provinceEn + */ + public List getProvinceEn() { + return provinceEn; + } + + /** + * 设置 + * @param provinceEn + */ + public void setProvinceEn(List provinceEn) { + this.provinceEn = provinceEn; + } + + /** + * 获取 + * @return percentage2015 + */ + public List getPercentage2015() { + return percentage2015; + } + + /** + * 设置 + * @param percentage2015 + */ + public void setPercentage2015(List percentage2015) { + this.percentage2015 = percentage2015; + } + + /** + * 获取 + * @return percentage2020 + */ + public List getPercentage2020() { + return percentage2020; + } + + /** + * 设置 + * @param percentage2020 + */ + public void setPercentage2020(List percentage2020) { + this.percentage2020 = percentage2020; + } + + @Override + public String toString() { + return "ForestProvinceCoverageVo{province = " + province + ", provinceEn = " + provinceEn + ", percentage2015 = " + percentage2015 + ", percentage2020 = " + percentage2020 + "}"; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/ESNOImpactMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/ESNOImpactMapper.java index 3f7cbff0f..922b14210 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/ESNOImpactMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/ESNOImpactMapper.java @@ -46,8 +46,8 @@ public interface ESNOImpactMapper { * @return */ List countryVai(@Param("type") String type, - @Param("year") String year, - @Param("country") List country); + @Param("year") String year, + @Param("country") List country); /** * 各地理亚区时间VAI diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/ForestDetectionMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/ForestDetectionMapper.java index 75d806baf..6595e44f5 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/ForestDetectionMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/ForestDetectionMapper.java @@ -4,8 +4,9 @@ import com.ruoyi.system.domain_yada.ChangeTable; import com.ruoyi.system.domain_yada.CloumnarTable; import com.ruoyi.system.domain_yada.TypeConversion; import com.ruoyi.system.domain_yada.TypeTable; +import com.ruoyi.system.domain_yada.entity.ForestProvinceChangeEntity; +import com.ruoyi.system.domain_yada.entity.ForestProvinceCoverageEntity; import org.apache.ibatis.annotations.Param; -import org.springframework.web.bind.annotation.RequestParam; import java.util.List; @@ -22,4 +23,18 @@ public interface ForestDetectionMapper { List selectChange(); List selectConversion(); + + /** + * 各省森林覆盖率 + * @param country + * @return + */ + List forestProvinceCoverage(@Param("country") String country); + + /** + * 各省森林变化率 + * @param country + * @return + */ + List forestProvinceChange(@Param("country") String country); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/MonitorMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/MonitorMapper.java index 499c3934f..bbe3b09a8 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/MonitorMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/MonitorMapper.java @@ -1,5 +1,6 @@ package com.ruoyi.system.mapper_yada; +import com.ruoyi.common.utils.StringUtils; import com.ruoyi.system.domain_yada.entity.*; import org.apache.ibatis.annotations.Param; @@ -20,6 +21,13 @@ public interface MonitorMapper { */ List countryCorresponding(@Param("region") String region); + /** + * 国家与省份对应关系 + * @param country + * @return + */ + List provinceCorresponding(@Param("country") String country); + /** * 亚大区域地理亚区EQI分级 * @@ -47,7 +55,7 @@ public interface MonitorMapper { * @return */ List eqiCountry(@Param("year") String year, - @Param("country") Listcountry); + @Param("country") List country); /** * 各地理亚区平均KEQI分布 @@ -75,11 +83,70 @@ public interface MonitorMapper { /** * 各地理亚区平均EQI分布折线图 + * * @param region * @return */ List eqiAsiaLine(@Param("region") String region, @Param("start") String start, @Param("end") String end); + + /** + * 各国EQI分级 + * + * @param year + * @param country + * @param type + * @return + */ + MonitorEQICountryGradingEntity eqiCountryGrading(@Param("year") String year, + @Param("country") String country, + @Param("type") String type); + + /** + * 各国KEQI分布 + * + * @param type + * @param country + * @return + */ + MonitorKEQICountryEntity keqiCountry(@Param("type") String type, + @Param("country") String country); + + /** + * 柬埔寨KEQI分布 + * @param type + * @param province + * @return + */ + MonitorKEQICambodiaEntity keqiCambodia(@Param("type") String type, + @Param("province") String province); + + /** + * 柬埔寨各省EQI分级 + * @param year + * @param type + * @param province + * @return + */ + MonitorEQICambodiaGradingEntity eqiCambodiaGrading(@Param("year") String year, + @Param("type") String type, + @Param("province") String province); + + /** + * 各省KEQI变化率 + * @param country + * @return + */ + List keqiProvinceRate(@Param("country") String country); + + /** + * 各省平均EQI分布 + * @param country + * @param year + * @return + */ + List eqiProvince(@Param("country") String country, + @Param("year")String year); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IForestDetectionService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IForestDetectionService.java index 292bfa3ae..87392d373 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IForestDetectionService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/IForestDetectionService.java @@ -4,6 +4,8 @@ import com.ruoyi.system.domain_yada.ChangeTable; import com.ruoyi.system.domain_yada.CloumnarTable; import com.ruoyi.system.domain_yada.TypeConversion; import com.ruoyi.system.domain_yada.TypeTable; +import com.ruoyi.system.domain_yada.vo.ForestProvinceChangeVo; +import com.ruoyi.system.domain_yada.vo.ForestProvinceCoverageVo; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -21,4 +23,18 @@ public interface IForestDetectionService { List selectChange(); List selectConversion(); + + /** + * 各省森林覆盖率 + * @param country + * @return + */ + ForestProvinceCoverageVo forestProvinceCoverage(String country); + + /** + * 各省森林变化率 + * @param country + * @return + */ + ForestProvinceChangeVo forestProvinceChange(String country); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/MonitorService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/MonitorService.java index 32bf2dfff..6996e9cf1 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/MonitorService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/MonitorService.java @@ -23,6 +23,13 @@ public interface MonitorService { */ List countryCorresponding(String region); + /** + * 国家与省份对应关系 + * @param country + * @return + */ + List provinceCorresponding(String country); + /** * 亚大区域地理亚区EQI分级 * @@ -85,4 +92,55 @@ public interface MonitorService { * @return */ PmKeyValueVo eqiAsiaLine(String region, String type, String start, String end); + + /** + * 各国EQI分级 + * @param year + * @param country + * @param type + * @return + */ + MonitorEQICountryGradingEntity eqiCountryGrading(String year, String country, String type); + + /** + * 各国平均KEQI分布 + * @param type + * @param country + * @return + */ + MonitorKEQICountryEntity keqiCountry(String type,String country); + + /** + * 柬埔寨平均KEQI分布 + * @param type + * @param province + * @return + */ + MonitorKEQICambodiaEntity keqiCambodia(String type,String province); + + /** + * 柬埔寨各省EQI分级 + * @param year + * @param province + * @param type + * @return + */ + MonitorEQICambodiaGradingEntity eqiCambodiaGrading(String year, String province, String type); + + /** + * 各省KEQI变化率 + * @param country + * @param type + * @return + */ + PmKeyValueEnVo keqiProvinceRate(String country, String type); + + /** + * 各省平均EQI分布 + * @param country + * @param year + * @param type + * @return + */ + PmKeyValueEnVo eqiProvince(String country,String year,String type); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/ForestDetectionServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/ForestDetectionServiceImpl.java index c10c931f9..24e6c5689 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/ForestDetectionServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/ForestDetectionServiceImpl.java @@ -4,13 +4,17 @@ import com.ruoyi.system.domain_yada.ChangeTable; import com.ruoyi.system.domain_yada.CloumnarTable; import com.ruoyi.system.domain_yada.TypeConversion; import com.ruoyi.system.domain_yada.TypeTable; +import com.ruoyi.system.domain_yada.entity.ForestProvinceChangeEntity; +import com.ruoyi.system.domain_yada.entity.ForestProvinceCoverageEntity; +import com.ruoyi.system.domain_yada.vo.ForestProvinceChangeVo; +import com.ruoyi.system.domain_yada.vo.ForestProvinceCoverageVo; import com.ruoyi.system.mapper_yada.ForestDetectionMapper; import com.ruoyi.system.service_yada.IForestDetectionService; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Service; -import org.springframework.web.bind.annotation.RequestParam; import javax.annotation.Resource; +import java.util.ArrayList; import java.util.List; /** @@ -42,4 +46,36 @@ public class ForestDetectionServiceImpl implements IForestDetectionService { public List selectConversion() { return mapper.selectConversion(); } + + @Override + public ForestProvinceCoverageVo forestProvinceCoverage(String country) { + List list = mapper.forestProvinceCoverage(country); + List province = new ArrayList<>(); + List provinceEn = new ArrayList<>(); + List percentage2015 = new ArrayList<>(); + List percentage2020 = new ArrayList<>(); + list.forEach(v->{ + province.add(v.getProvince()); + provinceEn.add(v.getProvinceEn()); + percentage2015.add(v.getPercentage2015()); + percentage2020.add(v.getPercentage2020()); + }); + return new ForestProvinceCoverageVo(province,provinceEn,percentage2015,percentage2020); + } + + @Override + public ForestProvinceChangeVo forestProvinceChange(String country) { + List list = mapper.forestProvinceChange(country); + List province = new ArrayList<>(); + List provinceEn = new ArrayList<>(); + List percentageGain = new ArrayList<>(); + List percentageLoss = new ArrayList<>(); + list.forEach(v->{ + province.add(v.getProvince()); + provinceEn.add(v.getProvinceEn()); + percentageGain.add(v.getPercentageGain()); + percentageLoss.add(v.getPercentageLoss()); + }); + return new ForestProvinceChangeVo(province,provinceEn,percentageGain,percentageLoss); + } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/MonitorImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/MonitorImpl.java index f29653604..a849dc116 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/MonitorImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/MonitorImpl.java @@ -34,6 +34,11 @@ public class MonitorImpl implements MonitorService { return monitorMapper.countryCorresponding(region); } + @Override + public List provinceCorresponding(String country) { + return monitorMapper.provinceCorresponding(country); + } + @Override public MonitorEQIGradingEntity eqiGrading(String year, String type, String region) { return monitorMapper.eqiGrading(year, type, region); @@ -255,5 +260,92 @@ public class MonitorImpl implements MonitorService { return new PmKeyValueVo(key,value); } + @Override + public MonitorEQICountryGradingEntity eqiCountryGrading(String year, String country, String type) { + return monitorMapper.eqiCountryGrading(year, country, type); + } + + @Override + public MonitorKEQICountryEntity keqiCountry(String type, String country) { + return monitorMapper.keqiCountry(type, country); + } + + @Override + public MonitorKEQICambodiaEntity keqiCambodia(String type, String province) { + return monitorMapper.keqiCambodia(type,province); + } + + @Override + public MonitorEQICambodiaGradingEntity eqiCambodiaGrading(String year, String province, String type) { + return monitorMapper.eqiCambodiaGrading(year,province,type); + } + + @Override + public PmKeyValueEnVo keqiProvinceRate(String country, String type) { + List list = monitorMapper.keqiProvinceRate(country); + List key = new ArrayList<>(); + List keyEn = new ArrayList<>(); + List value = new ArrayList<>(); + for (MonitorKEQIProvinceRateEntity entity : list) { + key.add(entity.getProvince()); + keyEn.add(entity.getProvinceEn()); + switch (type) { + case FOREST: + value.add(entity.getForest()); + break; + case SHRUB: + value.add(entity.getShrub()); + break; + case GRASS: + value.add(entity.getGrass()); + break; + case FARMLAND: + value.add(entity.getFarmland()); + break; + case MOUNTAIN: + value.add(entity.getMountain()); + break; + case ALL: + value.add(entity.getAll()); + break; + default: + } + } + return new PmKeyValueEnVo(key,keyEn,value); + } + + @Override + public PmKeyValueEnVo eqiProvince(String country, String year, String type) { + List list = monitorMapper.eqiProvince(country, year); + List key = new ArrayList<>(); + List keyEn = new ArrayList<>(); + List value = new ArrayList<>(); + for (MonitorEQIProvinceEntity entity : list) { + key.add(entity.getProvince()); + keyEn.add(entity.getProvinceEn()); + switch (type) { + case FOREST: + value.add(Double.valueOf(entity.getForest())); + break; + case SHRUB: + value.add(Double.valueOf(entity.getShrub())); + break; + case GRASS: + value.add(Double.valueOf(entity.getGrass())); + break; + case FARMLAND: + value.add(Double.valueOf(entity.getFarmland())); + break; + case MOUNTAIN: + value.add(Double.valueOf(entity.getMountain())); + break; + case ALL: + value.add(Double.valueOf(entity.getAll())); + break; + default: + } + } + return new PmKeyValueEnVo(key,keyEn,value); + } } diff --git a/ruoyi-system/src/main/resources/mapper/system/ForestDetectionMapper.xml b/ruoyi-system/src/main/resources/mapper/system/ForestDetectionMapper.xml index bb4cf54a2..a4b4ab96b 100644 --- a/ruoyi-system/src/main/resources/mapper/system/ForestDetectionMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/ForestDetectionMapper.xml @@ -4,15 +4,35 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - SELECT id,country,forestloss,forestgain,china FROM change_table + SELECT id, country, forestloss, forestgain, china + FROM change_table + + + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/MonitorMapper.xml b/ruoyi-system/src/main/resources/mapper/system/MonitorMapper.xml index 6c52856f0..7f46ebabe 100644 --- a/ruoyi-system/src/main/resources/mapper/system/MonitorMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/MonitorMapper.xml @@ -100,6 +100,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select mec.id, - mec.year, - mec.country, - mec.country_en, - mec.all_eqi, - mec.forest_eqi, - mec.shrub_eqi, - mec.grass_eqi, - mec.farmland_eqi, - mec.mountain_eqi, - mec.all_pixel, - mec.forest_pixel, - mec.shrub_pixel, - mec.grass_pixel, - mec.farmland_pixel, - mec.mountain_pixel + mec.year, + mec.country, + mec.country_en, + mec.all_eqi, + mec.forest_eqi, + mec.shrub_eqi, + mec.grass_eqi, + mec.farmland_eqi, + mec.mountain_eqi, + mec.all_pixel, + mec.forest_pixel, + mec.shrub_pixel, + mec.grass_pixel, + mec.farmland_pixel, + mec.mountain_pixel from monitor_eqi_country mec where mec.year = #{year} - and mec.country in + and mec.country in #{item} @@ -187,14 +283,14 @@ select mea.id, - mea.year, - mea.region, - mea.region_en, - mea.all, - mea.forest, - mea.shrub, - mea.grass, - mea.farmland, - mea.mountain + mea.year, + mea.region, + mea.region_en, + mea.all, + mea.forest, + mea.shrub, + mea.grass, + mea.farmland, + mea.mountain from monitor_eqi_asia mea where mea.region = #{region} @@ -222,4 +318,82 @@ and #{end} >= mea.year + + + + + + + + + + + + \ No newline at end of file