2022-11-08 16:40:54 +08:00
|
|
|
<?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.MonitorMapper">
|
|
|
|
|
|
|
|
<resultMap id="Monitor_Country_Corresponding"
|
|
|
|
type="com.ruoyi.system.domain_yada.entity.MonitorCountryCorrespondingEntity">
|
|
|
|
<id column="id" property="id"/>
|
|
|
|
<result column="region" property="region"/>
|
|
|
|
<result column="region_en" property="regionEn"/>
|
|
|
|
<result column="country" property="country"/>
|
|
|
|
<result column="country_en" property="countryEn"/>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
<resultMap id="Monitor_EQI_Grading"
|
|
|
|
type="com.ruoyi.system.domain_yada.entity.MonitorEQIGradingEntity">
|
|
|
|
<id column="id" property="id"/>
|
|
|
|
<result column="year" property="year"/>
|
|
|
|
<result column="type" property="type"/>
|
|
|
|
<result column="region" property="region"/>
|
|
|
|
<result column="region_en" property="regionEn"/>
|
|
|
|
<result column="excellent" property="excellent"/>
|
|
|
|
<result column="good" property="good"/>
|
|
|
|
<result column="middle" property="middle"/>
|
|
|
|
<result column="low" property="low"/>
|
|
|
|
<result column="poor" property="poor"/>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
<resultMap id="Monitor_EQI_Asia"
|
|
|
|
type="com.ruoyi.system.domain_yada.entity.MonitorEQIAsiaEntity">
|
|
|
|
<id column="id" property="id"/>
|
|
|
|
<result column="year" property="year"/>
|
|
|
|
<result column="region" property="region"/>
|
|
|
|
<result column="region_en" property="regionEn"/>
|
|
|
|
<result column="all" property="all"/>
|
|
|
|
<result column="forest" property="forest"/>
|
|
|
|
<result column="shrub" property="shrub"/>
|
|
|
|
<result column="grass" property="grass"/>
|
|
|
|
<result column="farmland" property="farmland"/>
|
|
|
|
<result column="mountain" property="mountain"/>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
<resultMap id="Monitor_EQI_Country"
|
|
|
|
type="com.ruoyi.system.domain_yada.entity.MonitorEQICountryEntity">
|
|
|
|
<id column="id" property="id"/>
|
|
|
|
<result column="year" property="year"/>
|
|
|
|
<result column="country" property="country"/>
|
|
|
|
<result column="country_en" property="countryEn"/>
|
|
|
|
<result column="all_eqi" property="allEQI"/>
|
|
|
|
<result column="forest_eqi" property="forestEQI"/>
|
|
|
|
<result column="shrub_eqi" property="shrubEQI"/>
|
|
|
|
<result column="grass_eqi" property="grassEQI"/>
|
|
|
|
<result column="farmland_eqi" property="farmlandEQI"/>
|
|
|
|
<result column="mountain_eqi" property="mountainEQI"/>
|
|
|
|
<result column="all_pixel" property="allPixel"/>
|
|
|
|
<result column="forest_pixel" property="forestPixel"/>
|
|
|
|
<result column="shrub_pixel" property="shrubPixel"/>
|
|
|
|
<result column="grass_pixel" property="grassPixel"/>
|
|
|
|
<result column="farmland_pixel" property="farmlandPixel"/>
|
|
|
|
<result column="mountain_pixel" property="mountainPixel"/>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
<resultMap id="Monitor_KEQI"
|
|
|
|
type="com.ruoyi.system.domain_yada.entity.MonitorKEQIEntity">
|
|
|
|
<id column="id" property="id"/>
|
|
|
|
<result column="type" property="type"/>
|
|
|
|
<result column="region" property="region"/>
|
|
|
|
<result column="region_en" property="regionEn"/>
|
|
|
|
<result column="significant_decline" property="significantDecline"/>
|
|
|
|
<result column="slight_decline" property="slightDecline"/>
|
|
|
|
<result column="unchanged" property="unchanged"/>
|
|
|
|
<result column="slight_rise" property="slightRise"/>
|
|
|
|
<result column="significant_rise" property="significantRise"/>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
<resultMap id="Monitor_KEQI_Asia_Rate"
|
|
|
|
type="com.ruoyi.system.domain_yada.entity.MonitorKEQIAsiaRateEntity">
|
|
|
|
<id column="id" property="id"/>
|
|
|
|
<result column="region" property="region"/>
|
|
|
|
<result column="region_en" property="regionEn"/>
|
|
|
|
<result column="vegetation" property="vegetation"/>
|
|
|
|
<result column="forest" property="forest"/>
|
|
|
|
<result column="shrub" property="shrub"/>
|
|
|
|
<result column="grass" property="grass"/>
|
|
|
|
<result column="farmland" property="farmland"/>
|
|
|
|
<result column="mountain" property="mountain"/>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
<resultMap id="Monitor_KEQI_Country_Rate"
|
|
|
|
type="com.ruoyi.system.domain_yada.entity.MonitorKEQICountryRateEntity">
|
|
|
|
<id column="id" property="id"/>
|
|
|
|
<result column="country" property="country"/>
|
|
|
|
<result column="country_en" property="countryEn"/>
|
|
|
|
<result column="all" property="all"/>
|
|
|
|
<result column="forest" property="forest"/>
|
|
|
|
<result column="shrub" property="shrub"/>
|
|
|
|
<result column="grass" property="grass"/>
|
|
|
|
<result column="farmland" property="farmland"/>
|
|
|
|
<result column="mountain" property="mountain"/>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="countryCorresponding" resultMap="Monitor_Country_Corresponding">
|
|
|
|
select id, region, region_en, country, country_en
|
|
|
|
from monitor_country_corresponding
|
|
|
|
where region = #{region}
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="eqiGrading" resultMap="Monitor_EQI_Grading">
|
|
|
|
select id, year, type, region, region_en, excellent, good, middle, low, poor
|
|
|
|
from monitor_eqi_grading
|
|
|
|
where year = #{year}
|
2022-11-09 15:25:03 +08:00
|
|
|
and type = #{type}
|
2022-11-08 16:40:54 +08:00
|
|
|
and region = #{region}
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="eqiAsia" resultMap="Monitor_EQI_Asia">
|
|
|
|
select mea.id,
|
|
|
|
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.year = #{year}
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="eqiCountry" resultMap="Monitor_EQI_Country">
|
|
|
|
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
|
|
|
|
from monitor_eqi_country mec
|
|
|
|
where mec.year = #{year}
|
|
|
|
and mec.country = #{country}
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="keqi" resultMap="Monitor_KEQI">
|
|
|
|
select id,
|
|
|
|
type,
|
|
|
|
region,
|
|
|
|
region_en,
|
|
|
|
significant_decline,
|
|
|
|
slight_decline,
|
|
|
|
unchanged,
|
|
|
|
slight_rise,
|
|
|
|
significant_rise
|
|
|
|
from monitor_keqi
|
2022-11-09 15:25:03 +08:00
|
|
|
where type = #{type}
|
|
|
|
and region = #{region}
|
2022-11-08 16:40:54 +08:00
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="keqiAsiaRate" resultMap="Monitor_KEQI_Asia_Rate">
|
|
|
|
select id,
|
|
|
|
region,
|
|
|
|
region_en,
|
2022-11-09 15:25:03 +08:00
|
|
|
cast((cast(vegetation as decimal) * 100) as decimal(10, 2)) as vegetation,
|
|
|
|
cast((cast(forest as decimal) * 100) as decimal(10, 2)) as forest,
|
|
|
|
cast((cast(shrub as decimal) * 100) as decimal(10, 2)) as shrub,
|
|
|
|
cast((cast(grass as decimal) * 100) as decimal(10, 2)) as grass,
|
|
|
|
cast((cast(farmland as decimal) * 100) as decimal(10, 2)) as farmland,
|
|
|
|
cast((cast(mountain as decimal) * 100) as decimal(10, 2)) as mountain
|
2022-11-08 16:40:54 +08:00
|
|
|
from monitor_keqi_asia_rate
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="keqiCountryRate" resultMap="Monitor_KEQI_Country_Rate">
|
|
|
|
select mkcr.id,
|
|
|
|
mkcr.country,
|
|
|
|
mkcr.country_en,
|
2022-11-09 15:25:03 +08:00
|
|
|
cast((cast(mkcr.all as decimal) * 100) as decimal(10, 2)) as all,
|
2022-11-08 16:40:54 +08:00
|
|
|
cast((cast(mkcr.forest as decimal)*100) as decimal(10,2)) as forest,
|
|
|
|
cast((cast(mkcr.shrub as decimal)*100) as decimal(10,2)) as shrub,
|
|
|
|
cast((cast(mkcr.grass as decimal)*100) as decimal(10,2)) as grass,
|
|
|
|
cast((cast(mkcr.farmland as decimal)*100) as decimal(10,2)) as farmland,
|
|
|
|
cast((cast(mkcr.mountain as decimal)*100) as decimal(10,2)) as mountain
|
|
|
|
from monitor_keqi_country_rate mkcr
|
|
|
|
where mkcr.country = #{country}
|
|
|
|
</select>
|
2022-11-09 15:25:03 +08:00
|
|
|
|
|
|
|
<select id="eqiAsiaLine" resultMap="Monitor_EQI_Asia">
|
|
|
|
select mea.id,
|
|
|
|
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}
|
|
|
|
<if test="start != null and start != ''">
|
|
|
|
and mea.year >= #{start}
|
|
|
|
</if>
|
|
|
|
<if test="end != null and end != ''">
|
|
|
|
and #{end} >= mea.year
|
|
|
|
</if>
|
|
|
|
</select>
|
2022-11-08 16:40:54 +08:00
|
|
|
</mapper>
|