|
@@ -88,13 +88,9 @@ public class TurbineInfoDayServiceImpl extends ServiceImpl<TurbineInfoDayMapper,
|
|
|
int dayOfMonth = endDate.getDayOfMonth();
|
|
int dayOfMonth = endDate.getDayOfMonth();
|
|
|
QueryWrapper<TurbineInfoDay> qw = new QueryWrapper<>();
|
|
QueryWrapper<TurbineInfoDay> qw = new QueryWrapper<>();
|
|
|
qw.eq("station_id", windpowerstationId)
|
|
qw.eq("station_id", windpowerstationId)
|
|
|
- .ge("record_date", startDate);
|
|
|
|
|
- if (dayOfMonth == 1) {
|
|
|
|
|
- qw.le("record_date", endDate);
|
|
|
|
|
- }else {
|
|
|
|
|
- qw.lt("record_date", endDate);
|
|
|
|
|
- }
|
|
|
|
|
- qw.groupBy("turbine_id", "to_char(record_date, 'yyyy-MM')")
|
|
|
|
|
|
|
+ .ge("record_date", startDate)
|
|
|
|
|
+ .le("record_date", endDate)
|
|
|
|
|
+ .groupBy("turbine_id", "to_char(record_date, 'yyyy-MM')")
|
|
|
.orderByAsc("turbine_id")
|
|
.orderByAsc("turbine_id")
|
|
|
.select(
|
|
.select(
|
|
|
"turbine_id",
|
|
"turbine_id",
|