城市不透水面修改

This commit is contained in:
machao 2023-04-24 14:08:00 +08:00
parent f2bf70cf2a
commit b0e7b2096d
7 changed files with 308 additions and 8 deletions

View File

@ -5,6 +5,7 @@ import com.ruoyi.framework.web.domain.Server;
import com.ruoyi.system.domain_yada.CityFocusVO; import com.ruoyi.system.domain_yada.CityFocusVO;
import com.ruoyi.system.domain_yada.CityInformation; import com.ruoyi.system.domain_yada.CityInformation;
import com.ruoyi.system.domain_yada.OrientationVO; import com.ruoyi.system.domain_yada.OrientationVO;
import com.ruoyi.system.domain_yada.entity.UrbanProvinceSufaceEntity;
import com.ruoyi.system.service_yada.ICityExpandService; import com.ruoyi.system.service_yada.ICityExpandService;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
@ -74,4 +75,10 @@ public class CityExpandControllerr {
return AjaxResult.success(value); return AjaxResult.success(value);
} }
@RequestMapping(value = "/urbanProvince", method = {RequestMethod.GET})
public AjaxResult urbanProvince(String province, String country,String level) {
List<UrbanProvinceSufaceEntity> list = service.urbanProvicneSuface(province, country,level);
return AjaxResult.success(list);
}
} }

View File

@ -115,7 +115,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
.antMatchers("/*/api-docs").anonymous() .antMatchers("/*/api-docs").anonymous()
.antMatchers("/druid/**").anonymous() .antMatchers("/druid/**").anonymous()
// // 除上面外的所有请求全部需要鉴权认证 // // 除上面外的所有请求全部需要鉴权认证
//.anyRequest().authenticated() .anyRequest().authenticated()
.and() .and()
.headers().frameOptions().disable(); .headers().frameOptions().disable();
httpSecurity.logout().logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler); httpSecurity.logout().logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler);

View File

@ -0,0 +1,235 @@
package com.ruoyi.system.domain_yada.entity;
/**
* 城市不透水面省份
*
* @author Mr.C
*/
public class UrbanProvinceSufaceEntity {
private Integer id;
private String province;
private String provinceEn;
private String year;
private String area;
private String imperviousSurfaceArea;
private String imperviousSurfaceCoverage;
private String speed;
private String strength;
private String contribution;
private String country;
private String countryEn;
public UrbanProvinceSufaceEntity() {
}
public UrbanProvinceSufaceEntity(Integer id, String province, String provinceEn, String year, String area, String imperviousSurfaceArea, String imperviousSurfaceCoverage, String speed, String strength, String contribution, String country, String countryEn) {
this.id = id;
this.province = province;
this.provinceEn = provinceEn;
this.year = year;
this.area = area;
this.imperviousSurfaceArea = imperviousSurfaceArea;
this.imperviousSurfaceCoverage = imperviousSurfaceCoverage;
this.speed = speed;
this.strength = strength;
this.contribution = contribution;
this.country = country;
this.countryEn = countryEn;
}
/**
* 获取
* @return id
*/
public Integer getId() {
return id;
}
/**
* 设置
* @param id
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 获取
* @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 year
*/
public String getYear() {
return year;
}
/**
* 设置
* @param year
*/
public void setYear(String year) {
this.year = year;
}
/**
* 获取
* @return area
*/
public String getArea() {
return area;
}
/**
* 设置
* @param area
*/
public void setArea(String area) {
this.area = area;
}
/**
* 获取
* @return imperviousSurfaceArea
*/
public String getImperviousSurfaceArea() {
return imperviousSurfaceArea;
}
/**
* 设置
* @param imperviousSurfaceArea
*/
public void setImperviousSurfaceArea(String imperviousSurfaceArea) {
this.imperviousSurfaceArea = imperviousSurfaceArea;
}
/**
* 获取
* @return imperviousSurfaceCoverage
*/
public String getImperviousSurfaceCoverage() {
return imperviousSurfaceCoverage;
}
/**
* 设置
* @param imperviousSurfaceCoverage
*/
public void setImperviousSurfaceCoverage(String imperviousSurfaceCoverage) {
this.imperviousSurfaceCoverage = imperviousSurfaceCoverage;
}
/**
* 获取
* @return speed
*/
public String getSpeed() {
return speed;
}
/**
* 设置
* @param speed
*/
public void setSpeed(String speed) {
this.speed = speed;
}
/**
* 获取
* @return strength
*/
public String getStrength() {
return strength;
}
/**
* 设置
* @param strength
*/
public void setStrength(String strength) {
this.strength = strength;
}
/**
* 获取
* @return contribution
*/
public String getContribution() {
return contribution;
}
/**
* 设置
* @param contribution
*/
public void setContribution(String contribution) {
this.contribution = contribution;
}
/**
* 获取
* @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;
}
public String toString() {
return "UrbanProvinceSufaceEntity{id = " + id + ", province = " + province + ", provinceEn = " + provinceEn + ", year = " + year + ", area = " + area + ", imperviousSurfaceArea = " + imperviousSurfaceArea + ", imperviousSurfaceCoverage = " + imperviousSurfaceCoverage + ", speed = " + speed + ", strength = " + strength + ", contribution = " + contribution + ", country = " + country + ", countryEn = " + countryEn + "}";
}
}

View File

@ -3,6 +3,7 @@ package com.ruoyi.system.mapper_yada;
import com.ruoyi.system.domain_yada.CityFocusVO; import com.ruoyi.system.domain_yada.CityFocusVO;
import com.ruoyi.system.domain_yada.CityInformation; import com.ruoyi.system.domain_yada.CityInformation;
import com.ruoyi.system.domain_yada.OrientationVO; import com.ruoyi.system.domain_yada.OrientationVO;
import com.ruoyi.system.domain_yada.entity.UrbanProvinceSufaceEntity;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
@ -27,4 +28,8 @@ public interface CityExpandMapper {
@Param("basin") String basin); @Param("basin") String basin);
List<CityInformation> selectMain(@Param("year") String year); List<CityInformation> selectMain(@Param("year") String year);
List<UrbanProvinceSufaceEntity> urbanProvicneSuface(@Param("province") String city,
@Param("country") String country,
@Param("level") String level);
} }

View File

@ -3,6 +3,7 @@ package com.ruoyi.system.service_yada;
import com.ruoyi.system.domain_yada.CityFocusVO; import com.ruoyi.system.domain_yada.CityFocusVO;
import com.ruoyi.system.domain_yada.CityInformation; import com.ruoyi.system.domain_yada.CityInformation;
import com.ruoyi.system.domain_yada.OrientationVO; import com.ruoyi.system.domain_yada.OrientationVO;
import com.ruoyi.system.domain_yada.entity.UrbanProvinceSufaceEntity;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
@ -20,4 +21,6 @@ public interface ICityExpandService {
List<CityInformation> selectInfrom(String city, String country,String year,String basin); List<CityInformation> selectInfrom(String city, String country,String year,String basin);
List<CityInformation> selectMain(String year); List<CityInformation> selectMain(String year);
List<UrbanProvinceSufaceEntity> urbanProvicneSuface(String city,String country,String level);
} }

View File

@ -3,6 +3,7 @@ package com.ruoyi.system.service_yada.impl;
import com.ruoyi.system.domain_yada.CityFocusVO; import com.ruoyi.system.domain_yada.CityFocusVO;
import com.ruoyi.system.domain_yada.CityInformation; import com.ruoyi.system.domain_yada.CityInformation;
import com.ruoyi.system.domain_yada.OrientationVO; import com.ruoyi.system.domain_yada.OrientationVO;
import com.ruoyi.system.domain_yada.entity.UrbanProvinceSufaceEntity;
import com.ruoyi.system.mapper_yada.AustraliaMiddleEastMapper; import com.ruoyi.system.mapper_yada.AustraliaMiddleEastMapper;
import com.ruoyi.system.mapper_yada.CityExpandMapper; import com.ruoyi.system.mapper_yada.CityExpandMapper;
import com.ruoyi.system.service_yada.ICityExpandService; import com.ruoyi.system.service_yada.ICityExpandService;
@ -11,7 +12,9 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.time.Year; import java.time.Year;
import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.logging.Level;
/** /**
* @Author: JinSheng Song * @Author: JinSheng Song
@ -43,4 +46,11 @@ public class CityExpandServiceimpl implements ICityExpandService {
public List<CityInformation> selectMain(String year) { public List<CityInformation> selectMain(String year) {
return mapper.selectMain(year); return mapper.selectMain(year);
} }
@Override
public List<UrbanProvinceSufaceEntity> urbanProvicneSuface(String city, String country,String level) {
List<UrbanProvinceSufaceEntity> list = mapper.urbanProvicneSuface(city, country, level);
//list.sort(Comparator.comparing(UrbanProvinceSufaceEntity::getYear));
return list;
}
} }

View File

@ -18,12 +18,15 @@
<sql id="columns_ore"> <sql id="columns_ore">
<![CDATA[ <![CDATA[
id,position,city_en,city,area_value,superior,created_by,created_time,country id
,position,city_en,city,area_value,superior,created_by,created_time,country
]]> ]]>
</sql> </sql>
<select id="selectOrientation" resultMap="RM_Orientation"> <select id="selectOrientation" resultMap="RM_Orientation">
SELECT <include refid="columns_ore"/> FROM extension_orientation SELECT
<include refid="columns_ore"/>
FROM extension_orientation
where 1=1 where 1=1
<if test="city!= null and city !=''"> <if test="city!= null and city !=''">
AND city = #{city} AND city = #{city}
@ -51,12 +54,15 @@
<sql id="columns"> <sql id="columns">
<![CDATA[ <![CDATA[
id,year,city,x_axis,y_axis,x_axis_py,y_axis_py,city_en,country id
,year,city,x_axis,y_axis,x_axis_py,y_axis_py,city_en,country
]]> ]]>
</sql> </sql>
<select id="selectExpand" resultMap="RM_Expand"> <select id="selectExpand" resultMap="RM_Expand">
SELECT <include refid="columns"/> FROM urban_center_of_gravity SELECT
<include refid="columns"/>
FROM urban_center_of_gravity
where 1=1 where 1=1
<if test="city!= null and city !=''"> <if test="city!= null and city !=''">
AND city = #{city} AND city = #{city}
@ -86,12 +92,15 @@
<sql id="columns_Infrom"> <sql id="columns_Infrom">
<![CDATA[ <![CDATA[
id,year,city,city_en,area,impervious_surface_area,impervious_surface_coverage,speed,strength,contribution,superior,country id
,year,city,city_en,area,impervious_surface_area,impervious_surface_coverage,speed,strength,contribution,superior,country
]]> ]]>
</sql> </sql>
<select id="selectInfrom" resultMap="RM_Inform"> <select id="selectInfrom" resultMap="RM_Inform">
SELECT <include refid="columns_Infrom"/> FROM urban_impervious_surface SELECT
<include refid="columns_Infrom"/>
FROM urban_impervious_surface
where 1=1 where 1=1
<if test="city!= null and city !=''"> <if test="city!= null and city !=''">
AND city = #{city} AND city = #{city}
@ -108,7 +117,9 @@
</select> </select>
<select id="selectMain" resultMap="RM_Inform"> <select id="selectMain" resultMap="RM_Inform">
SELECT <include refid="columns_Infrom"/> FROM urban_impervious_surface SELECT
<include refid="columns_Infrom"/>
FROM urban_impervious_surface
where country='澜湄流域' where country='澜湄流域'
<if test="year!= null and year !=''"> <if test="year!= null and year !=''">
AND year = #{year} AND year = #{year}
@ -116,4 +127,33 @@
</select> </select>
<resultMap id="Urban_Province" type="com.ruoyi.system.domain_yada.entity.UrbanProvinceSufaceEntity">
<result property="id" column="id"/>
<result property="province" column="province"/>
<result property="provinceEn" column="province_en"/>
<result property="year" column="year"/>
<result property="area" column="area"/>
<result property="imperviousSurfaceArea" column="impervious_surface_area"/>
<result property="imperviousSurfaceCoverage" column="impervious_surface_coverage"/>
<result property="speed" column="speed"/>
<result property="strength" column="strength"/>
<result property="contribution" column="contribution"/>
<result property="country" column="country"/>
<result property="countryEn" column="country_en"/>
</resultMap>
<select id="urbanProvicneSuface" resultMap="Urban_Province">
select id,province,province_en,year,area,impervious_surface_area,impervious_surface_coverage,speed,
strength,contribution,country,country_en
from urban_province_surface
where 1=1
<if test="province!= null and province !=''">
AND province = #{province}
</if>
<if test="country!= null and country !=''">
AND country = #{country}
</if>
AND level = #{level}
</select>
</mapper> </mapper>