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 new file mode 100644 index 000000000..a525bfb76 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/MonitorController.java @@ -0,0 +1,102 @@ +package com.ruoyi.web.controller.yada; + +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.system.domain_yada.entity.*; +import com.ruoyi.system.domain_yada.vo.PmYearConcentrationRatioVo; +import com.ruoyi.system.service_yada.MonitorService; +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; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 亚大综合检测 + * + * @author Mr.C + */ + +@RestController +@RequestMapping("/business-service/api/monitor") +@Api(tags = "亚大综合检测") +public class MonitorController { + + @Resource + private MonitorService monitorService; + + + @RequestMapping(value = "/corresponding", method = {RequestMethod.GET}) + @ApiOperation(value = "亚大区域地理亚区与国家对应关系", httpMethod = "GET") + public AjaxResult countryCorresponding(@RequestParam(value = "region") String region) { + List list = monitorService.countryCorresponding(region); + 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, + @RequestParam(value = "region") String region) { + List list = monitorService.eqiGrading(year, region); + if (list.isEmpty()) { + return AjaxResult.error("未查找到信息"); + } + return AjaxResult.success(list); + } + + @RequestMapping(value = "/eqiAsia", method = {RequestMethod.GET}) + @ApiOperation(value = "地理亚区平均EQI分布", httpMethod = "GET") + public AjaxResult eqiAsia(@RequestParam(value = "year") String year) { + List list = monitorService.eqiAsia(year); + if (list.isEmpty()) { + return AjaxResult.error("未查找到信息"); + } + return AjaxResult.success(list); + } + + @RequestMapping(value = "/eqiCountry", method = {RequestMethod.GET}) + @ApiOperation(value = "各国家平均EQI分布", httpMethod = "GET") + public AjaxResult eqiCountry(@RequestParam(value = "year") String year, + @RequestParam(value = "region") String region) { + List list = monitorService.eqiCountry(year, region); + if (list.isEmpty()) { + return AjaxResult.error("未查找到信息"); + } + return AjaxResult.success(list); + } + + @RequestMapping(value = "/keqi", method = {RequestMethod.GET}) + @ApiOperation(value = "各地理亚区平均KEQI分布", httpMethod = "GET") + public AjaxResult keqi(@RequestParam(value = "region") String region) { + List list = monitorService.keqi(region); + if (list.isEmpty()) { + return AjaxResult.error("未查找到信息"); + } + return AjaxResult.success(list); + } + + @RequestMapping(value = "/keqiAsiaRate", method = {RequestMethod.GET}) + @ApiOperation(value = "各地理亚区平均KEQI变化率", httpMethod = "GET") + public AjaxResult keqiAsiaRate() { + List list = monitorService.keqiAsiaRate(); + if (list.isEmpty()) { + return AjaxResult.error("未查找到信息"); + } + return AjaxResult.success(list); + } + @RequestMapping(value = "/keqiCountryRate", method = {RequestMethod.GET}) + @ApiOperation(value = "各国平均KEQI变化率", httpMethod = "GET") + public AjaxResult keqiCountryRate(@RequestParam(value = "region") String region) { + List list = monitorService.keqiCountryRate(region); + if (list.isEmpty()) { + return AjaxResult.error("未查找到信息"); + } + return AjaxResult.success(list); + } +} 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/MonitorCountryCorrespondingEntity.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorCountryCorrespondingEntity.java new file mode 100644 index 000000000..8ac254a21 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorCountryCorrespondingEntity.java @@ -0,0 +1,114 @@ +package com.ruoyi.system.domain_yada.entity; + +/** + * 亚大区域地理亚区与国家对应关系 + * @author Mr.C + */ +public class MonitorCountryCorrespondingEntity { + private Integer id; + + private String region; + + private String regionEn; + + private String country; + + private String countryEn; + + + public MonitorCountryCorrespondingEntity() { + } + + public MonitorCountryCorrespondingEntity(Integer id, String region, String regionEn, String country, String countryEn) { + this.id = id; + this.region = region; + this.regionEn = regionEn; + this.country = country; + this.countryEn = countryEn; + } + + /** + * 获取 + * @return id + */ + public Integer getId() { + return id; + } + + /** + * 设置 + * @param id + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * 获取 + * @return region + */ + public String getRegion() { + return region; + } + + /** + * 设置 + * @param region + */ + public void setRegion(String region) { + this.region = region; + } + + /** + * 获取 + * @return regionEn + */ + public String getRegionEn() { + return regionEn; + } + + /** + * 设置 + * @param regionEn + */ + public void setRegionEn(String regionEn) { + this.regionEn = regionEn; + } + + /** + * 获取 + * @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; + } + + @Override + public String toString() { + return "MonitorCountryCorrespondingEntity{id = " + id + ", region = " + region + ", regionEn = " + regionEn + ", country = " + country + ", countryEn = " + countryEn + "}"; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorEQIAsiaEntity.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorEQIAsiaEntity.java new file mode 100644 index 000000000..192b16171 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorEQIAsiaEntity.java @@ -0,0 +1,208 @@ +package com.ruoyi.system.domain_yada.entity; + +/** + * 各地理亚区平均EQI分布 + * @author Mr.C + */ +public class MonitorEQIAsiaEntity { + private Integer id; + + private String year; + + private String region; + + private String regionEn; + + private String all; + + private String forest; + + private String shrub; + + private String grass; + + private String farmland; + + private String mountain; + + public MonitorEQIAsiaEntity() { + } + + public MonitorEQIAsiaEntity(Integer id, String year, String region, String regionEn, String all, String forest, String shrub, String grass, String farmland, String mountain) { + this.id = id; + this.year = year; + this.region = region; + this.regionEn = regionEn; + 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 region + */ + public String getRegion() { + return region; + } + + /** + * 设置 + * @param region + */ + public void setRegion(String region) { + this.region = region; + } + + /** + * 获取 + * @return regionEn + */ + public String getRegionEn() { + return regionEn; + } + + /** + * 设置 + * @param regionEn + */ + public void setRegionEn(String regionEn) { + this.regionEn = regionEn; + } + + /** + * 获取 + * @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 "MonitorEQiAsiaEntity{id = " + id + ", year = " + year + ", region = " + region + ", regionEn = " + regionEn + ", 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/MonitorEQICountryEntity.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorEQICountryEntity.java new file mode 100644 index 000000000..182a353a7 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorEQICountryEntity.java @@ -0,0 +1,323 @@ +package com.ruoyi.system.domain_yada.entity; + +/** + * 各国家平均EQI分布 + * @author Mr.C + */ +public class MonitorEQICountryEntity { + private Integer id; + + private String year; + + private String country; + + private String countryEn; + + private String allEQI; + + private String forestEQI; + + private String shrubEQI; + + private String grassEQI; + + private String farmlandEQI; + + private String mountainEQI; + + private String allPixel; + + private String forestPixel; + + private String shrubPixel; + + private String grassPixel; + + private String farmlandPixel; + + private String mountainPixel; + + + public MonitorEQICountryEntity() { + } + + public MonitorEQICountryEntity(Integer id, String year, String country, String countryEn, String allEQI, String forestEQI, String shrubEQI, String grassEQI, String farmlandEQI, String mountainEQI, String allPixel, String forestPixel, String shrubPixel, String grassPixel, String farmlandPixel, String mountainPixel) { + this.id = id; + this.year = year; + this.country = country; + this.countryEn = countryEn; + this.allEQI = allEQI; + this.forestEQI = forestEQI; + this.shrubEQI = shrubEQI; + this.grassEQI = grassEQI; + this.farmlandEQI = farmlandEQI; + this.mountainEQI = mountainEQI; + this.allPixel = allPixel; + this.forestPixel = forestPixel; + this.shrubPixel = shrubPixel; + this.grassPixel = grassPixel; + this.farmlandPixel = farmlandPixel; + this.mountainPixel = mountainPixel; + } + + /** + * 获取 + * @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 countryEn + */ + public String getCountryEn() { + return countryEn; + } + + /** + * 设置 + * @param countryEn + */ + public void setCountryEn(String countryEn) { + this.countryEn = countryEn; + } + + /** + * 获取 + * @return allEQI + */ + public String getAllEQI() { + return allEQI; + } + + /** + * 设置 + * @param allEQI + */ + public void setAllEQI(String allEQI) { + this.allEQI = allEQI; + } + + /** + * 获取 + * @return forestEQI + */ + public String getForestEQI() { + return forestEQI; + } + + /** + * 设置 + * @param forestEQI + */ + public void setForestEQI(String forestEQI) { + this.forestEQI = forestEQI; + } + + /** + * 获取 + * @return shrubEQI + */ + public String getShrubEQI() { + return shrubEQI; + } + + /** + * 设置 + * @param shrubEQI + */ + public void setShrubEQI(String shrubEQI) { + this.shrubEQI = shrubEQI; + } + + /** + * 获取 + * @return grassEQI + */ + public String getGrassEQI() { + return grassEQI; + } + + /** + * 设置 + * @param grassEQI + */ + public void setGrassEQI(String grassEQI) { + this.grassEQI = grassEQI; + } + + /** + * 获取 + * @return farmlandEQI + */ + public String getFarmlandEQI() { + return farmlandEQI; + } + + /** + * 设置 + * @param farmlandEQI + */ + public void setFarmlandEQI(String farmlandEQI) { + this.farmlandEQI = farmlandEQI; + } + + /** + * 获取 + * @return mountainEQI + */ + public String getMountainEQI() { + return mountainEQI; + } + + /** + * 设置 + * @param mountainEQI + */ + public void setMountainEQI(String mountainEQI) { + this.mountainEQI = mountainEQI; + } + + /** + * 获取 + * @return allPixel + */ + public String getAllPixel() { + return allPixel; + } + + /** + * 设置 + * @param allPixel + */ + public void setAllPixel(String allPixel) { + this.allPixel = allPixel; + } + + /** + * 获取 + * @return forestPixel + */ + public String getForestPixel() { + return forestPixel; + } + + /** + * 设置 + * @param forestPixel + */ + public void setForestPixel(String forestPixel) { + this.forestPixel = forestPixel; + } + + /** + * 获取 + * @return shrubPixel + */ + public String getShrubPixel() { + return shrubPixel; + } + + /** + * 设置 + * @param shrubPixel + */ + public void setShrubPixel(String shrubPixel) { + this.shrubPixel = shrubPixel; + } + + /** + * 获取 + * @return grassPixel + */ + public String getGrassPixel() { + return grassPixel; + } + + /** + * 设置 + * @param grassPixel + */ + public void setGrassPixel(String grassPixel) { + this.grassPixel = grassPixel; + } + + /** + * 获取 + * @return farmlandPixel + */ + public String getFarmlandPixel() { + return farmlandPixel; + } + + /** + * 设置 + * @param farmlandPixel + */ + public void setFarmlandPixel(String farmlandPixel) { + this.farmlandPixel = farmlandPixel; + } + + /** + * 获取 + * @return mountainPixel + */ + public String getMountainPixel() { + return mountainPixel; + } + + /** + * 设置 + * @param mountainPixel + */ + public void setMountainPixel(String mountainPixel) { + this.mountainPixel = mountainPixel; + } + + @Override + public String toString() { + return "MonitorEQICountryEntity{id = " + id + ", year = " + year + ", country = " + country + ", countryEn = " + countryEn + ", allEQI = " + allEQI + ", forestEQI = " + forestEQI + ", shrubEQI = " + shrubEQI + ", grassEQI = " + grassEQI + ", farmlandEQI = " + farmlandEQI + ", mountainEQI = " + mountainEQI + ", allPixel = " + allPixel + ", forestPixel = " + forestPixel + ", shrubPixel = " + shrubPixel + ", grassPixel = " + grassPixel + ", farmlandPixel = " + farmlandPixel + ", mountainPixel = " + mountainPixel + "}"; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorEQIGradingEntity.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorEQIGradingEntity.java new file mode 100644 index 000000000..ae5a11690 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorEQIGradingEntity.java @@ -0,0 +1,210 @@ +package com.ruoyi.system.domain_yada.entity; + +/** + * 亚大区域地理亚区EQI分级 + * @author Mr.C + */ +public class MonitorEQIGradingEntity { + + private Integer id; + + private String year; + + private String type; + + private String region; + + private String regionEn; + + private String excellent; + + private String good; + + private String middle; + + private String low; + + private String poor; + + + public MonitorEQIGradingEntity() { + } + + public MonitorEQIGradingEntity(Integer id, String year, String type, String region, String regionEn, String excellent, String good, String middle, String low, String poor) { + this.id = id; + this.year = year; + this.type = type; + this.region = region; + this.regionEn = regionEn; + 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 region + */ + public String getRegion() { + return region; + } + + /** + * 设置 + * @param region + */ + public void setRegion(String region) { + this.region = region; + } + + /** + * 获取 + * @return regionEn + */ + public String getRegionEn() { + return regionEn; + } + + /** + * 设置 + * @param regionEn + */ + public void setRegionEn(String regionEn) { + this.regionEn = regionEn; + } + + /** + * 获取 + * @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 "MonitorEQIGradingEntity{id = " + id + ", year = " + year + ", type = " + type + ", region = " + region + ", regionEn = " + regionEn + ", excellent = " + excellent + ", good = " + good + ", middle = " + middle + ", low = " + low + ", poor = " + poor + "}"; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorKEQIAsiaRateEntity.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorKEQIAsiaRateEntity.java new file mode 100644 index 000000000..1625f9e3a --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorKEQIAsiaRateEntity.java @@ -0,0 +1,193 @@ +package com.ruoyi.system.domain_yada.entity; + + +import java.math.BigDecimal; + +/** + * 各地理亚区平均KEQI变化率 + * @author Mr.C + */ +public class MonitorKEQIAsiaRateEntity { + private Integer id; + + private String region; + + private String regionEn; + + private BigDecimal vegetation; + + private BigDecimal forest; + + private BigDecimal shrub; + + private BigDecimal grass; + + private BigDecimal farmland; + + private BigDecimal mountain; + + + public MonitorKEQIAsiaRateEntity() { + } + + public MonitorKEQIAsiaRateEntity(Integer id, String region, String regionEn, BigDecimal vegetation, BigDecimal forest, BigDecimal shrub, BigDecimal grass, BigDecimal farmland, BigDecimal mountain) { + this.id = id; + this.region = region; + this.regionEn = regionEn; + this.vegetation = vegetation; + 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 region + */ + public String getRegion() { + return region; + } + + /** + * 设置 + * @param region + */ + public void setRegion(String region) { + this.region = region; + } + + /** + * 获取 + * @return regionEn + */ + public String getRegionEn() { + return regionEn; + } + + /** + * 设置 + * @param regionEn + */ + public void setRegionEn(String regionEn) { + this.regionEn = regionEn; + } + + /** + * 获取 + * @return vegetation + */ + public BigDecimal getVegetation() { + return vegetation; + } + + /** + * 设置 + * @param vegetation + */ + public void setVegetation(BigDecimal vegetation) { + this.vegetation = vegetation; + } + + /** + * 获取 + * @return forest + */ + public BigDecimal getForest() { + return forest; + } + + /** + * 设置 + * @param forest + */ + public void setForest(BigDecimal forest) { + this.forest = forest; + } + + /** + * 获取 + * @return shrub + */ + public BigDecimal getShrub() { + return shrub; + } + + /** + * 设置 + * @param shrub + */ + public void setShrub(BigDecimal shrub) { + this.shrub = shrub; + } + + /** + * 获取 + * @return grass + */ + public BigDecimal getGrass() { + return grass; + } + + /** + * 设置 + * @param grass + */ + public void setGrass(BigDecimal grass) { + this.grass = grass; + } + + /** + * 获取 + * @return farmland + */ + public BigDecimal getFarmland() { + return farmland; + } + + /** + * 设置 + * @param farmland + */ + public void setFarmland(BigDecimal farmland) { + this.farmland = farmland; + } + + /** + * 获取 + * @return mountain + */ + public BigDecimal getMountain() { + return mountain; + } + + /** + * 设置 + * @param mountain + */ + public void setMountain(BigDecimal mountain) { + this.mountain = mountain; + } + + @Override + public String toString() { + return "MonitorKEQIAsiaRateEntity{id = " + id + ", region = " + region + ", regionEn = " + regionEn + ", vegetation = " + vegetation + ", forest = " + forest + ", shrub = " + shrub + ", grass = " + grass + ", farmland = " + farmland + ", mountain = " + mountain + "}"; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorKEQICountryRateEntity.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorKEQICountryRateEntity.java new file mode 100644 index 000000000..e8ff0ac5a --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorKEQICountryRateEntity.java @@ -0,0 +1,192 @@ +package com.ruoyi.system.domain_yada.entity; + +import java.math.BigDecimal; + +/** + * 各国平均KEQI变化率 + * @author Mr.C + */ +public class MonitorKEQICountryRateEntity { + private Integer id; + + private String country; + + private String countryEn; + + private BigDecimal all; + + private BigDecimal forest; + + private BigDecimal shrub; + + private BigDecimal grass; + + private BigDecimal farmland; + + private BigDecimal mountain; + + + public MonitorKEQICountryRateEntity() { + } + + public MonitorKEQICountryRateEntity(Integer id, String country, String countryEn, BigDecimal all, BigDecimal forest, BigDecimal shrub, BigDecimal grass, BigDecimal farmland, BigDecimal mountain) { + this.id = id; + this.country = country; + this.countryEn = countryEn; + 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 countryEn + */ + public String getCountryEn() { + return countryEn; + } + + /** + * 设置 + * @param countryEn + */ + public void setCountryEn(String countryEn) { + this.countryEn = countryEn; + } + + /** + * 获取 + * @return all + */ + public BigDecimal getAll() { + return all; + } + + /** + * 设置 + * @param all + */ + public void setAll(BigDecimal all) { + this.all = all; + } + + /** + * 获取 + * @return forest + */ + public BigDecimal getForest() { + return forest; + } + + /** + * 设置 + * @param forest + */ + public void setForest(BigDecimal forest) { + this.forest = forest; + } + + /** + * 获取 + * @return shrub + */ + public BigDecimal getShrub() { + return shrub; + } + + /** + * 设置 + * @param shrub + */ + public void setShrub(BigDecimal shrub) { + this.shrub = shrub; + } + + /** + * 获取 + * @return grass + */ + public BigDecimal getGrass() { + return grass; + } + + /** + * 设置 + * @param grass + */ + public void setGrass(BigDecimal grass) { + this.grass = grass; + } + + /** + * 获取 + * @return farmland + */ + public BigDecimal getFarmland() { + return farmland; + } + + /** + * 设置 + * @param farmland + */ + public void setFarmland(BigDecimal farmland) { + this.farmland = farmland; + } + + /** + * 获取 + * @return mountain + */ + public BigDecimal getMountain() { + return mountain; + } + + /** + * 设置 + * @param mountain + */ + public void setMountain(BigDecimal mountain) { + this.mountain = mountain; + } + + @Override + public String toString() { + return "MonitorKEQICountryRateEntity{id = " + id + ", country = " + country + ", countryEn = " + countryEn + ", 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/MonitorKEQIEntity.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorKEQIEntity.java new file mode 100644 index 000000000..3c79c3718 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain_yada/entity/MonitorKEQIEntity.java @@ -0,0 +1,190 @@ +package com.ruoyi.system.domain_yada.entity; + +/** + * 各地理亚区平均KEQI分布 + * @author Mr.C + */ +public class MonitorKEQIEntity { + + private Integer id; + + private String type; + + private String region; + + private String regionEn; + + private String significantDecline; + + private String slightDecline; + + private String unchanged; + + private String slightRise; + + private String significantRise; + + public MonitorKEQIEntity() { + } + + public MonitorKEQIEntity(Integer id, String type, String region, String regionEn, String significantDecline, String slightDecline, String unchanged, String slightRise, String significantRise) { + this.id = id; + this.type = type; + this.region = region; + this.regionEn = regionEn; + 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 region + */ + public String getRegion() { + return region; + } + + /** + * 设置 + * @param region + */ + public void setRegion(String region) { + this.region = region; + } + + /** + * 获取 + * @return regionEn + */ + public String getRegionEn() { + return regionEn; + } + + /** + * 设置 + * @param regionEn + */ + public void setRegionEn(String regionEn) { + this.regionEn = regionEn; + } + + /** + * 获取 + * @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 "MonitorKEQIEntity{id = " + id + ", type = " + type + ", region = " + region + ", regionEn = " + regionEn + ", significantDecline = " + significantDecline + ", slightDecline = " + slightDecline + ", unchanged = " + unchanged + ", slightRise = " + slightRise + ", significantRise = " + significantRise + "}"; + } +} 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 new file mode 100644 index 000000000..1a4738702 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/MonitorMapper.java @@ -0,0 +1,68 @@ +package com.ruoyi.system.mapper_yada; + +import com.ruoyi.system.domain_yada.entity.*; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 亚大综合监测 + * + * @author Mr.C + */ +public interface MonitorMapper { + + /** + * 亚大区域地理亚区与国家对应关系 + * + * @param region 区域 + * @return + */ + List countryCorresponding(@Param("region") String region); + + /** + * 亚大区域地理亚区EQI分级 + * @param year 年份 + * @param region 区域 + * @return + */ + List eqiGrading(@Param("year") String year, + @Param("region") String region); + + /** + * 各地理亚区平均EQI分布 + * @param year + * @return + */ + List eqiAsia(@Param("year") String year); + + /** + * 各国家平均EQI分布 + * @param year + * @param country + * @return + */ + MonitorEQICountryEntity eqiCountry(@Param("year") String year, + @Param("country") String country); + + /** + * 各地理亚区平均KEQI分布 + * @param region + * @return + */ + List keqi(@Param("region") String region); + + /** + * 各地理亚区平均KEQI变化率 + * @return + */ + List keqiAsiaRate(); + + /** + * 各国平均KEQI变化率 + * @param country 国家 + * @return + */ + MonitorKEQICountryRateEntity keqiCountryRate(@Param("country") 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 new file mode 100644 index 000000000..8be72ebd5 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/MonitorService.java @@ -0,0 +1,64 @@ +package com.ruoyi.system.service_yada; + +import com.ruoyi.system.domain_yada.entity.*; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 亚大综合监测 + * @author Mr.C + */ +public interface MonitorService { + + + /** + * 亚大区域地理亚区与国家对应关系 + * @param region 区域 + * @return + */ + List countryCorresponding(String region); + + /** + * 亚大区域地理亚区EQI分级 + * @param year 年份 + * @param region 区域 + * @return + */ + List eqiGrading(String year,String region); + + /** + * 各地理亚区平均EQI分布 + * @param year 年份 + * @return + */ + List eqiAsia(String year); + + /** + * 各国家平均EQI分布 + * @param year 年份 + * @param region 区域 + * @return + */ + List eqiCountry(String year ,String region); + + /** + * 各地理亚区平均KEQI分布 + * @param region 区域 + * @return + */ + List keqi(@Param("region") String region); + + /** + * 各地理亚区平均KEQI变化率 + * @return + */ + List keqiAsiaRate(); + + /** + * 各国平均KEQI变化率 + * @param region 区域 + * @return + */ + List keqiCountryRate(@Param("region") String region); +} 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 new file mode 100644 index 000000000..bd5fce664 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/MonitorImpl.java @@ -0,0 +1,70 @@ +package com.ruoyi.system.service_yada.impl; + +import com.ruoyi.system.domain_yada.entity.*; +import com.ruoyi.system.mapper_yada.MonitorMapper; +import com.ruoyi.system.service_yada.MonitorService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.yaml.snakeyaml.Yaml; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.List; + +/** + *亚大综合监测 + * @author Mr.C + */ +@Service +public class MonitorImpl implements MonitorService { + @Resource + private MonitorMapper monitorMapper; + + @Override + public List countryCorresponding(String region) { + return monitorMapper.countryCorresponding(region); + } + + @Override + public List eqiGrading(String year, String region) { + return monitorMapper.eqiGrading(year, region); + } + + @Override + public List eqiAsia(String year) { + return monitorMapper.eqiAsia(year); + } + + @Override + public List eqiCountry(String year, String region) { + List list = monitorMapper.countryCorresponding(region); + List lists = new ArrayList<>(); + for (MonitorCountryCorrespondingEntity monitorCountryCorrespondingEntity : list) { + String country = monitorCountryCorrespondingEntity.getCountry(); + lists.add(monitorMapper.eqiCountry(year, country)); + } + return lists; + } + + @Override + public List keqi(String region) { + return monitorMapper.keqi(region); + } + + @Override + public List keqiAsiaRate() { + return monitorMapper.keqiAsiaRate(); + } + + @Override + public List keqiCountryRate(String region) { + List list = monitorMapper.countryCorresponding(region); + List lists = new ArrayList<>(); + for (MonitorCountryCorrespondingEntity monitorCountryCorrespondingEntity : list) { + lists.add(monitorMapper.keqiCountryRate(monitorCountryCorrespondingEntity.getCountry())); + } + return lists; + } + +} + diff --git a/ruoyi-system/src/main/resources/mapper/system/MonitorMapper.xml b/ruoyi-system/src/main/resources/mapper/system/MonitorMapper.xml new file mode 100644 index 000000000..a4dfb77b4 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/MonitorMapper.xml @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file