Commit 56299ab8 authored by chenzhao's avatar chenzhao

修改代码

parent f10478ec
......@@ -27,9 +27,11 @@
generate,
fullhour
from
house_pv_data.td_hygf_inverter_year_generate
house_pv_data.td_hygf_inverter_total_generate
<where>
year_time = #{time}
<if test="time != null and time !=''">
and year_time = #{time}
</if>
<if test="snCode != null and snCode !=''">
and sn_code = #{snCode}
</if>
......
......@@ -221,8 +221,10 @@ public class JpInverterController extends BaseController {
return ResponseHelper.buildResponse(jpInverterServiceImpl.selectDayTrend(treeParams1, time, snCode, thirdStationId));
}else if (treeParams.get("date").equals("month")){
return ResponseHelper.buildResponse(jpInverterServiceImpl.selectMonthTrend(time, snCode, thirdStationId));
}else {
}else if (treeParams.get("date").equals("year")) {
return ResponseHelper.buildResponse(jpInverterServiceImpl.selectYearTrend(time, snCode, thirdStationId));
}else {
return ResponseHelper.buildResponse(jpInverterServiceImpl.selectTotalTrend(time, snCode, thirdStationId));
}
}
......
......@@ -338,7 +338,7 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
}else {
List<TdHYGFInverterTotalGenerate> maps = tdHYGFInverterYearGenerateMapper.selectTotalSum(null, snCode, thirdStationId);
double fullhour = maps.stream().mapToDouble(TdHYGFInverterTotalGenerate::getFullhour).sum();
double income = maps.stream().mapToDouble(TdHYGFInverterTotalGenerate::getIncome).sum();
double income = maps.stream().filter(e->null != e.getIncome() ).mapToDouble(TdHYGFInverterTotalGenerate::getIncome).sum();
double generate = maps.stream().mapToDouble(TdHYGFInverterTotalGenerate::getGenerate).sum();
Map<String,Object> map = new HashMap<>();
map.put("fullhour",fullhour);
......
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