Commit ab9e0fd9 authored by ZWT's avatar ZWT

得到的

parent 0e271fcb
......@@ -47,14 +47,14 @@ public class PlantPredictedPowerLongTermDataCloudServiceImpl implements PlantPre
for (GetBasePhotovoltaicPlantCloudOutput output : list) {
//获取最近七天的实际数据
QueryWrapper<PlantPowerDataEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.select("IFNULL(avg(power ) , 0 ) power")
queryWrapper.select("IFNULL(AVG(POWER ) , 0 ) POWER")
.lambda()
.eq(PlantPowerDataEnt::getPlantId, output.getId())
.ge(PlantPowerDataEnt::getDataDate, DateUtil.offsetDay(currentDate, -7));
PlantPowerDataEnt currentEnt = powerDataMapper.selectOne(queryWrapper);
//获取同期七天的实际数据
queryWrapper.clear();
queryWrapper.select("IFNULL(avg(power ) , 0 ) power")
queryWrapper.select("IFNULL(AVG(POWER ) , 0 ) POWER")
.lambda()
.eq(PlantPowerDataEnt::getPlantId, output.getId())
.ge(PlantPowerDataEnt::getDataDate, DateUtil.offset(currentDate, DateField.YEAR, -1));
......@@ -66,7 +66,7 @@ public class PlantPredictedPowerLongTermDataCloudServiceImpl implements PlantPre
}
//获取同期30天数据
queryWrapper.clear();
queryWrapper.select("plant_id, data_date, temperature, humidity, wind_speed, wind_direction, pressure, plane_irradiance, horizontal_irradiance, power");
queryWrapper.select("PLANT_ID, DATA_DATE, TEMPERATURE, HUMIDITY, WIND_SPEED, WIND_DIRECTION, PRESSURE, PLANE_IRRADIANCE, HORIZONTAL_IRRADIANCE, POWER");
queryWrapper.lambda()
.eq(PlantPowerDataEnt::getPlantId, output.getId())
.ge(PlantPowerDataEnt::getDataDate, DateUtil.offset(currentDate, DateField.YEAR, -1))
......
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