Commit 0bc9c411 authored by chenzhao's avatar chenzhao

计划发电量问题修复 bug修复

parent d6f08601
......@@ -254,8 +254,8 @@
#{item}
</foreach>
</if>
<if test="completionStatus != null">
AND question.COMPLETION_STATUS = #{completionStatus}
<if test="completionStatus != null and completionStatus == 0">
AND question.COMPLETION_STATUS in (0,2)
</if>
<if test="startTime != null and startTime != ''">
AND question.CREATE_DATE &gt;= concat(#{startTime}, ' 00:00:00')
......
......@@ -95,7 +95,7 @@ public class AppletMonitorServiceImpl {
data.put("value",stationMark.get("value"));
double yearPower = planPower.stream().mapToDouble(StationPlan::getValue).sum();
Double monthPower = planPower.stream().filter(e -> e.getMonthly().equals(DateUtils.getMonth(new Date()))).findFirst().get().getValue();
Double monthPower = planPower.stream().filter(e -> e.getMonthly().equals(String.valueOf(DateUtils.getMonth(new Date())))).findFirst().get().getValue();
double dayPower = monthPower / DateUtils.getDaysOfMonth(new Date());
data.put("yearPower",yearPower);
data.put("monthPower",monthPower);
......@@ -162,7 +162,7 @@ public class AppletMonitorServiceImpl {
//计划发电量
List<StationPlan> planPower = stationPlanMapper.getPlanGenByStationIdAndYear(String.valueOf(stationBasic.getSequenceNbr()), String.valueOf(DateUtils.getYear(new Date())));
double yearPower = planPower.stream().mapToDouble(StationPlan::getValue).sum();
Double monthPower = planPower.stream().filter(e -> e.getMonthly().equals(DateUtils.getMonth(new Date()))).findFirst().get().getValue();
Double monthPower = planPower.stream().filter(e -> e.getMonthly().equals(String.valueOf(DateUtils.getMonth(new Date())))).findFirst().get().getValue();
double dayPower = monthPower / DateUtils.getDaysOfMonth(new Date());
data.put("yearPower",yearPower);
data.put("monthPower",monthPower);
......@@ -252,7 +252,7 @@ public class AppletMonitorServiceImpl {
String join = String.join(",", collect1);
List<StationPlan> plansPower = stationPlanMapper.getPlansGenByStationIdAndYear(join, String.valueOf(DateUtils.getYear(new Date())));
double yearPower = plansPower.stream().mapToDouble(StationPlan::getValue).sum();
Double monthPower = plansPower.stream().filter(e -> e.getMonthly().equals(DateUtils.getMonth(new Date()))).mapToDouble(StationPlan::getValue).sum();
Double monthPower = plansPower.stream().filter(e -> e.getMonthly().equals(String.valueOf(DateUtils.getMonth(new Date())))).mapToDouble(StationPlan::getValue).sum();
double dayPower = monthPower / DateUtils.getDaysOfMonth(new Date());
result.put("yearPower",yearPower);
result.put("monthPower",monthPower);
......
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