mx_datav_gs/mxdata_v-system/target/classes/mybatis/gansu/ResourcesMapper.xml

47 lines
2.1 KiB
XML
Raw Normal View History

2024-11-11 09:53:47 +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.alonginfo.project.gansu.mapper.ResourcesMapper">
<select id="getMapInfoData" resultType="com.alonginfo.project.gansu.domain.MapInfoVO">
SELECT resources_type resourcesType,
IFNULL(power_station, 0) powerStation,
IFNULL(install_capacity, 0) installCapacity,
IFNULL(station_one_num, 0) stationOneNum,
IFNULL(station_one_power, 0) stationOnePower,
IFNULL(station_two_num, 0) stationTwoNum,
IFNULL(station_two_power, 0) stationTwoPower,
IFNULL(station_three_num, 0) stationThreeNum,
IFNULL(station_three_power, 0) stationThreePower,
IFNULL(station_four_num, 0) stationFourNum,
IFNULL(station_four_power, 0) stationFourPower
FROM bs_resources_map
</select>
<select id="getMapTopCanvas" resultType="java.util.Map">
SELECT city_name cityName, IFNULL(city_ratio, 0) cityRatio
FROM
bs_resources_map_top
ORDER BY
CONVERT(city_ratio, decimal(16, 4)) DESC
</select>
<select id="getInstallAndPower" resultType="java.util.Map">
SELECT resources_name resourcesName, IFNULL(install_capacity, 0) installCapacity, IFNULL(power, 0) power
FROM bs_resources_install_power
</select>
<select id="getResourcesDevelop" resultType="java.util.Map">
SELECT resources_name resourcesName, IFNULL(develop, 0) develop, IFNULL(no_develop, 0) noDevelop
FROM bs_resources_develop
</select>
<select id="getPrefectureInstall" resultType="com.alonginfo.project.gansu.domain.PrefectureInstallDTO">
SELECT prefecture_name prefectureName,
IFNULL(fire, 0) fire,
IFNULL(water, 0) water,
IFNULL(wind, 0) wind,
IFNULL(light, 0) light,
IFNULL(storage, 0) storage
FROM bs_resources_install
</select>
</mapper>