Commit 3b5e2101 authored by hezhuozhi's avatar hezhuozhi

Merge remote-tracking branch 'origin/developer' into developer

parents 1b870a11 92720d26
...@@ -20,5 +20,5 @@ public interface TdHYGFInverterDayGenerateMapper extends BaseMapper<TdHYGFInvert ...@@ -20,5 +20,5 @@ public interface TdHYGFInverterDayGenerateMapper extends BaseMapper<TdHYGFInvert
List<Map<String,Object>> selectSnCodeList(String startTime, String endTime, List<String> sncodes); List<Map<String,Object>> selectSnCodeList(String startTime, String endTime, List<String> sncodes);
@UserEmpower(field ={"regional_companies_code"},dealerField ={"amos_company_code","regional_companies_code"} ,fieldConditions ={"eq","in"} ,relationship="and") @UserEmpower(field ={"regional_companies_code"},dealerField ={"amos_company_code","regional_companies_code"} ,fieldConditions ={"eq","in"} ,relationship="and")
List<TdHYGFInverterDayGenerate> selectListPage(List<String> snCodeList, List<String> maxCreatedTimeList); List<TdHYGFInverterDayGenerate> selectListPage(List<String> snCodeList, List<String> maxCreatedTimeList, String startTime, String endTime);
} }
...@@ -15,14 +15,14 @@ ...@@ -15,14 +15,14 @@
SELECT SELECT
sum(power) power, sum(power) power,
tation_id thirdStationId tation_id thirdStationId
FROM house_pv_data.td_hygf_month_power where year_month=#{date} GROUP BY tation_id FROM house_pv_data.td_hygf_station_power_month where year_month=#{date} GROUP BY tation_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 tation_id thirdStationId
FROM house_pv_data.td_hygf_year_power where year=#{date} GROUP BY tation_id FROM house_pv_data.td_hygf_station_power_year where year=#{date} GROUP BY tation_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_month_power where tation_id in FROM house_pv_data.td_hygf_station_power_month where tation_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_year_power where tation_id in FROM house_pv_data.td_hygf_station_power_year where tation_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_all_power where tation_id in FROM house_pv_data.td_hygf_station_power_all where tation_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>
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
SELECT SELECT
sum(power)num, sum(power)num,
`hour` date `hour` date
FROM house_pv_data.td_hygf_day_power FROM house_pv_data.td_hygf_station_power_day
<where> <where>
<if test="dto!=null"> <if test="dto!=null">
......
...@@ -74,6 +74,12 @@ ...@@ -74,6 +74,12 @@
#{maxCreatedTime} #{maxCreatedTime}
</foreach> </foreach>
</if> </if>
<if test="startTime != null">
and created_time >= #{startTime}
</if>
<if test="endTime != null">
and created_time &lt;= #{endTime}
</if>
</where> </where>
order by created_time desc order by created_time desc
</select> </select>
......
...@@ -179,7 +179,7 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter ...@@ -179,7 +179,7 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
}); });
PageHelper.startPage(current, size); PageHelper.startPage(current, size);
List<TdHYGFInverterDayGenerate> tdHYGFInverterDayGenerates = tdHYGFInverterDayGenerateMapper.selectListPage(snCodeList, maxCreatedTimeList); List<TdHYGFInverterDayGenerate> tdHYGFInverterDayGenerates = tdHYGFInverterDayGenerateMapper.selectListPage(snCodeList, null, startTime, endTime);
tdHYGFInverterDayGenerates.forEach(tdHYGFInverterDayGenerate -> { tdHYGFInverterDayGenerates.forEach(tdHYGFInverterDayGenerate -> {
Date date1 = new Date(tdHYGFInverterDayGenerate.getCreatedTime()); Date date1 = new Date(tdHYGFInverterDayGenerate.getCreatedTime());
......
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