|
|
@@ -1445,6 +1445,8 @@ public class SpecificService {
|
|
|
|
|
|
|
|
|
public List<SpecificTarget> fnlylList(String companys, String type, String year) {
|
|
|
+ LocalDate now = LocalDate.now();
|
|
|
+ LocalDate of = LocalDate.of(Integer.parseInt(year), now.getMonth(), now.getDayOfMonth());
|
|
|
//获取年份所有当月的数据
|
|
|
QueryWrapper<TurbineInfoDay> currentqw = new QueryWrapper<>();
|
|
|
currentqw.select("station_id,max(record_date) as record_date,avg(fnlyl) as fnlyl");
|
|
|
@@ -1454,6 +1456,9 @@ public class SpecificService {
|
|
|
} else {
|
|
|
currentqw.like("foreign_key_id", "_GDC_");
|
|
|
}
|
|
|
+ if (Integer.parseInt(year) == now.getYear()) {
|
|
|
+ currentqw.lt("record_date", of);
|
|
|
+ }
|
|
|
currentqw.groupBy("to_char(record_date,'yyyy-MM'),station_id");
|
|
|
List<TurbineInfoDay> currentList = iTurbineInfoDayService.list(currentqw);
|
|
|
int subYear = Integer.parseInt(year) - 1;
|