|
@@ -48,11 +48,11 @@ public class DayPowerGenerationServiceImpl extends ServiceImpl<DayPowerGeneratio
|
|
|
private final AccuracyPassRateService accuracyPassRateService;
|
|
|
|
|
|
private final ForecastPowerShortTermRegulationService forecastPowerShortTermRegulationService;
|
|
|
- private String dateFormat = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
|
|
|
+// private String dateFormat = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
|
|
|
|
|
|
- private SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ private final SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
|
- private Long oneDay = 86400000L;
|
|
|
+ private final Long oneDay = 86400000L;
|
|
|
|
|
|
@Override
|
|
|
public DayPowerGeneration findByStationCodeAndGenDate(String stationCode, Date genDate) {
|
|
@@ -116,7 +116,7 @@ public class DayPowerGenerationServiceImpl extends ServiceImpl<DayPowerGeneratio
|
|
|
dayPowerGenerationList = findByGenDate(simpleDateFormat.format(new Date(genDate)), stationCode, "云端下发");
|
|
|
} else {
|
|
|
startTime = DateTimeUtil.getDayStartTime(System.currentTimeMillis() + oneDay);
|
|
|
- dayPowerGenerationList = findByGenDate(dateFormat, stationCode, "云端下发");
|
|
|
+ dayPowerGenerationList = findByGenDate(new SimpleDateFormat("yyyy-MM-dd").format(new Date()), stationCode, "云端下发");
|
|
|
}
|
|
|
|
|
|
Date endTime = DateTimeUtil.getDayLastTime(startTime.getTime() + 10 * oneDay - 1);
|
|
@@ -159,7 +159,7 @@ public class DayPowerGenerationServiceImpl extends ServiceImpl<DayPowerGeneratio
|
|
|
} else {
|
|
|
genDate = DateTimeUtil.getDayStartTime(new Date().getTime());
|
|
|
startTime = DateTimeUtil.getDayStartTime(System.currentTimeMillis() + oneDay);
|
|
|
- dayPowerGenerationList = findByGenDate(dateFormat, stationCode, "站端上传");
|
|
|
+ dayPowerGenerationList = findByGenDate(new SimpleDateFormat("yyyy-MM-dd").format(new Date()), stationCode, "站端上传");
|
|
|
}
|
|
|
|
|
|
Date endTime = DateTimeUtil.getDayLastTime(startTime.getTime() + 10 * oneDay - 1);
|