Commit f9db772a authored by wujiang's avatar wujiang

修改问题

parent a69b9de5
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<select id="getMonthPowerint" resultType="com.yeejoin.amos.boot.module.hygf.api.entity.MonthPower"> <select id="getMonthPowerint" resultType="com.yeejoin.amos.boot.module.hygf.api.entity.MonthPower">
SELECT SELECT
avg(power) power, 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 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> </select>
...@@ -14,15 +14,15 @@ ...@@ -14,15 +14,15 @@
<select id="getSumMonthPower" resultType="com.yeejoin.amos.boot.module.hygf.api.entity.YearPower"> <select id="getSumMonthPower" resultType="com.yeejoin.amos.boot.module.hygf.api.entity.YearPower">
SELECT SELECT
sum(power) power, sum(power) power,
tation_id thirdStationId third_station_id thirdStationId
FROM house_pv_data.td_hygf_station_power_month where year_month=#{date} GROUP BY tation_id FROM house_pv_data.td_hygf_station_power_month where year_month=#{date} GROUP BY third_station_id
</select> </select>
<select id="getSumYearPower" resultType="com.yeejoin.amos.boot.module.hygf.api.entity.AllPower"> <select id="getSumYearPower" resultType="com.yeejoin.amos.boot.module.hygf.api.entity.AllPower">
SELECT SELECT
sum(power) power, sum(power) power,
tation_id thirdStationId third_station_id thirdStationId
FROM house_pv_data.td_hygf_station_power_year where year=#{date} GROUP BY tation_id FROM house_pv_data.td_hygf_station_power_year where year=#{date} GROUP BY third_station_id
</select> </select>
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
SELECT SELECT
sum(power)num, sum(power)num,
`day` date `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=")"> <foreach collection="dto" item="item" index="index" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
SELECT SELECT
sum(power)num, sum(power)num,
`month` date `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=")"> <foreach collection="dto" item="item" index="index" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
SELECT SELECT
sum(power)num, sum(power)num,
`year` date `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=")"> <foreach collection="dto" item="item" index="index" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
...@@ -81,14 +81,14 @@ ...@@ -81,14 +81,14 @@
<where> <where>
<if test="dto!=null"> <if test="dto!=null">
tation_id in third_station_id in
<foreach collection="dto" item="item" index="index" open="(" separator="," close=")"> <foreach collection="dto" item="item" index="index" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="thirdStationId!=null and thirdStationId != ''"> <if test="thirdStationId!=null and thirdStationId != ''">
and tation_id = #{thirdStationId} and third_station_id = #{thirdStationId}
</if> </if>
</where> </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