修改控制器及新增城市功能
This commit is contained in:
@ -0,0 +1,110 @@
|
||||
package com.ruoyi.system.domain_yada;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/6/24 9:51
|
||||
*/
|
||||
public class CityVo extends SysBaseEntity
|
||||
{
|
||||
private String id;
|
||||
|
||||
private String city;
|
||||
|
||||
private String area;
|
||||
|
||||
private String year;
|
||||
|
||||
private Double imperviousSurfaceArea;
|
||||
|
||||
private Double imperviousSurfaceCoverage;
|
||||
|
||||
public Double getImperviousSurfaceExpansionSpeed() {
|
||||
return imperviousSurfaceExpansionSpeed;
|
||||
}
|
||||
|
||||
public void setImperviousSurfaceExpansionSpeed(Double imperviousSurfaceExpansionSpeed) {
|
||||
this.imperviousSurfaceExpansionSpeed = imperviousSurfaceExpansionSpeed;
|
||||
}
|
||||
|
||||
private Double imperviousSurfaceExpansionSpeed;
|
||||
|
||||
private Double imperviousSurfaceExpansionStrength;
|
||||
|
||||
private Double imperviousSurfaceExpansionCntribution ;
|
||||
|
||||
private String countryIdentification;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
|
||||
public String getYear() {
|
||||
return year;
|
||||
}
|
||||
|
||||
public void setYear(String year) {
|
||||
this.year = year;
|
||||
}
|
||||
|
||||
|
||||
public String getArea() {
|
||||
return area;
|
||||
}
|
||||
|
||||
public void setArea(String area) {
|
||||
this.area = area;
|
||||
}
|
||||
|
||||
public Double getImperviousSurfaceArea() {
|
||||
return imperviousSurfaceArea;
|
||||
}
|
||||
|
||||
public void setImperviousSurfaceArea(Double imperviousSurfaceArea) {
|
||||
this.imperviousSurfaceArea = imperviousSurfaceArea;
|
||||
}
|
||||
|
||||
public Double getImperviousSurfaceCoverage() {
|
||||
return imperviousSurfaceCoverage;
|
||||
}
|
||||
|
||||
public void setImperviousSurfaceCoverage(Double imperviousSurfaceCoverage) {
|
||||
this.imperviousSurfaceCoverage = imperviousSurfaceCoverage;
|
||||
}
|
||||
|
||||
public Double getImperviousSurfaceExpansionStrength() {
|
||||
return imperviousSurfaceExpansionStrength;
|
||||
}
|
||||
|
||||
public void setImperviousSurfaceExpansionStrength(Double imperviousSurfaceExpansionStrength) {
|
||||
this.imperviousSurfaceExpansionStrength = imperviousSurfaceExpansionStrength;
|
||||
}
|
||||
|
||||
public Double getImperviousSurfaceExpansionCntribution() {
|
||||
return imperviousSurfaceExpansionCntribution;
|
||||
}
|
||||
|
||||
public void setImperviousSurfaceExpansionCntribution(Double imperviousSurfaceExpansionCntribution) {
|
||||
this.imperviousSurfaceExpansionCntribution = imperviousSurfaceExpansionCntribution;
|
||||
}
|
||||
|
||||
public String getCountryIdentification() {
|
||||
return countryIdentification;
|
||||
}
|
||||
|
||||
public void setCountryIdentification(String countryIdentification) {
|
||||
this.countryIdentification = countryIdentification;
|
||||
}
|
||||
}
|
@ -26,4 +26,6 @@ public interface AorestCoverageMapper {
|
||||
|
||||
List<Dictionary> selectDic(@Param("codingType") String codingType,@Param("codingType1") String codingType1,
|
||||
@Param("codingType2") String codingType2);
|
||||
|
||||
List<Dictionary> selectNow(@Param("codingType2") String codingType2);
|
||||
}
|
||||
|
@ -0,0 +1,16 @@
|
||||
package com.ruoyi.system.mapper_yada;
|
||||
|
||||
|
||||
import com.ruoyi.system.domain_yada.CityVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/6/24 10:06
|
||||
*/
|
||||
public interface CityMapper {
|
||||
|
||||
List<CityVo> selectCity(String city,String gj);
|
||||
|
||||
}
|
@ -28,4 +28,5 @@ public interface IAorestCoverageService {
|
||||
|
||||
List<Dictionary> selectDic(String codingType,String codingType1,
|
||||
String codingType2);
|
||||
List<Dictionary> selectNow(String codingType2);
|
||||
}
|
||||
|
@ -0,0 +1,14 @@
|
||||
package com.ruoyi.system.service_yada;
|
||||
|
||||
import com.ruoyi.system.domain_yada.CityVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/6/24 10:11
|
||||
*/
|
||||
public interface ICityService {
|
||||
|
||||
List<CityVo> selectCity(String city, String gj);
|
||||
}
|
@ -55,4 +55,9 @@ public class AorestCoverageServiceimpl implements IAorestCoverageService {
|
||||
String codingType2) {
|
||||
return coverageMapper.selectDic(codingType,codingType1,codingType2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Dictionary> selectNow(String codingType2) {
|
||||
return coverageMapper.selectNow(codingType2);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,23 @@
|
||||
package com.ruoyi.system.service_yada.impl;
|
||||
|
||||
import com.ruoyi.system.domain_yada.CityVo;
|
||||
import com.ruoyi.system.mapper_yada.AorestCoverageMapper;
|
||||
import com.ruoyi.system.mapper_yada.CityMapper;
|
||||
import com.ruoyi.system.service_yada.ICityService;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: JinSheng Song
|
||||
* @Date: 2022/6/24 10:12
|
||||
*/
|
||||
public class CityServiceimpl implements ICityService {
|
||||
|
||||
@Resource
|
||||
private CityMapper cityMapper;
|
||||
@Override
|
||||
public List<CityVo> selectCity(String city, String gj) {
|
||||
return cityMapper.selectCity(city,gj);
|
||||
}
|
||||
}
|
@ -143,4 +143,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</if>
|
||||
)
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectNow" resultMap="RM_Dictionary">
|
||||
select <include refid="columnsdic"/> from dictionary
|
||||
where coding_type =#{codingType2};
|
||||
</select>
|
||||
</mapper>
|
31
ruoyi-system/src/main/resources/mapper/system/CityMapper.xml
Normal file
31
ruoyi-system/src/main/resources/mapper/system/CityMapper.xml
Normal file
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper_yada.CityMapper">
|
||||
|
||||
<resultMap id="RM_City" type="com.ruoyi.system.domain_yada.CityVo">
|
||||
<result property="id" column="id"/>
|
||||
<result property="year" column="year"/>
|
||||
<result property="city" column="city"/>
|
||||
<result property="area" column="area"/>
|
||||
<result property="imperviousSurfaceArea" column="Impervious_surface_area"/>
|
||||
<result property="imperviousSurfaceCoverage" column="Impervious_surface_coverage"/>
|
||||
<result property="imperviousSurfaceExpansionSpeed" column="Impervious_surface_expansion_speed"/>
|
||||
<result property="imperviousSurfaceExpansionStrength" column="Impervious_surface_expansion_strength"/>
|
||||
<result property="imperviousSurfaceExpansionCntribution" column="Impervious_surface_expansion_Contribution "/>
|
||||
<result property="countryIdentification" column="country_identification"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="columns">
|
||||
<![CDATA[
|
||||
id,year,city,area,Impervious_surface_area,Impervious_surface_coverage,Impervious_surface_expansion_speed,Impervious_surface_expansion_strength,Impervious_surface_expansion_Contribution,country_identification
|
||||
]]>
|
||||
</sql>
|
||||
|
||||
<select id="selectCity" resultMap="RM_City">
|
||||
SELECT <include refid="columns"/> FROM urban_impervious_surface
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user