Commit f9db772a authored by wujiang's avatar wujiang

修改问题

parent a69b9de5
......@@ -6,7 +6,7 @@
<select id="getMonthPowerint" resultType="com.yeejoin.amos.boot.module.hygf.api.entity.MonthPower">
SELECT
avg(power) power,
third_station_id thirdStationId
third_sthird_station_id thirdStationId
FROM house_pv_data.td_hygf_jp_station_power_history where created_time <![CDATA[>=]]> today()-1d-8h and created_time <![CDATA[<]]> today()-8h GROUP BY third_station_id
</select>
......@@ -14,15 +14,15 @@
<select id="getSumMonthPower" resultType="com.yeejoin.amos.boot.module.hygf.api.entity.YearPower">
SELECT
sum(power) power,
tation_id thirdStationId
FROM house_pv_data.td_hygf_station_power_month where year_month=#{date} GROUP BY tation_id
third_station_id thirdStationId
FROM house_pv_data.td_hygf_station_power_month where year_month=#{date} GROUP BY third_station_id
</select>
<select id="getSumYearPower" resultType="com.yeejoin.amos.boot.module.hygf.api.entity.AllPower">
SELECT
sum(power) power,
tation_id thirdStationId
FROM house_pv_data.td_hygf_station_power_year where year=#{date} GROUP BY tation_id
third_station_id thirdStationId
FROM house_pv_data.td_hygf_station_power_year where year=#{date} GROUP BY third_station_id
</select>
......@@ -44,7 +44,7 @@
SELECT
sum(power)num,
`day` date
FROM house_pv_data.td_hygf_station_power_month where tation_id in
FROM house_pv_data.td_hygf_station_power_month where third_station_id in
<foreach collection="dto" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
......@@ -55,7 +55,7 @@
SELECT
sum(power)num,
`month` date
FROM house_pv_data.td_hygf_station_power_year where tation_id in
FROM house_pv_data.td_hygf_station_power_year where third_station_id in
<foreach collection="dto" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
......@@ -66,7 +66,7 @@
SELECT
sum(power)num,
`year` date
FROM house_pv_data.td_hygf_station_power_all where tation_id in
FROM house_pv_data.td_hygf_station_power_all where third_station_id in
<foreach collection="dto" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
......@@ -81,14 +81,14 @@
<where>
<if test="dto!=null">
tation_id in
third_station_id in
<foreach collection="dto" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="thirdStationId!=null and thirdStationId != ''">
and tation_id = #{thirdStationId}
and third_station_id = #{thirdStationId}
</if>
</where>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment