Commit 933c0efa authored by ZWT's avatar ZWT

得到的

parent 82a81908
...@@ -46,15 +46,15 @@ public class WindPredictionHistoryCloudServiceImpl implements IWindPredictionHis ...@@ -46,15 +46,15 @@ public class WindPredictionHistoryCloudServiceImpl implements IWindPredictionHis
//取日期范围内已预测数据 //取日期范围内已预测数据
WindPredictionFutureMapper mapper = context.getBean(WindPredictionFutureMapper.class); WindPredictionFutureMapper mapper = context.getBean(WindPredictionFutureMapper.class);
List<WindPredictionFutureEnt> list = mapper.selectList(new QueryWrapper<WindPredictionFutureEnt>() List<WindPredictionFutureEnt> list = mapper.selectList(new QueryWrapper<WindPredictionFutureEnt>()
.select("station_id", .select("STATION_ID",
"data_time", "DATA_TIME",
"wind_direction", "WIND_DIRECTION",
"wind_speed", "WIND_SPEED",
"air_temperature", "AIR_TEMPERATURE",
"humidity", "HUMIDITY",
"pressure", "PRESSURE",
"actual_wind_speed", "ACTUAL_WIND_SPEED",
"actual_power AS predicted_power") "ACTUAL_POWER AS PREDICTED_POWER")
.lambda() .lambda()
.between(WindPredictionFutureEnt::getDataTime, startTime, endTime) .between(WindPredictionFutureEnt::getDataTime, startTime, endTime)
); );
...@@ -62,9 +62,9 @@ public class WindPredictionHistoryCloudServiceImpl implements IWindPredictionHis ...@@ -62,9 +62,9 @@ public class WindPredictionHistoryCloudServiceImpl implements IWindPredictionHis
//查实际发电数据 //查实际发电数据
ThirdWindPowerGenerationMapper generationMapper = context.getBean(ThirdWindPowerGenerationMapper.class); ThirdWindPowerGenerationMapper generationMapper = context.getBean(ThirdWindPowerGenerationMapper.class);
List<ThirdWindPowerGenerationEnt> generationList = generationMapper.selectList(new QueryWrapper<ThirdWindPowerGenerationEnt>() List<ThirdWindPowerGenerationEnt> generationList = generationMapper.selectList(new QueryWrapper<ThirdWindPowerGenerationEnt>()
.select("station_id", "collect_time", "MAX( actual_power ) AS actual_power", .select("STATION_ID", "COLLECT_TIME", "MAX( ACTUAL_POWER ) AS ACTUAL_POWER",
"MAX( actual_generation ) AS actual_generation", "MAX( actual_wind_speed ) AS actual_wind_speed", "MAX( ACTUAL_GENERATION ) AS ACTUAL_GENERATION", "MAX( ACTUAL_WIND_SPEED ) AS ACTUAL_WIND_SPEED",
"MAX( actual_wind_direction ) AS actual_wind_direction") "MAX( ACTUAL_WIND_DIRECTION ) AS ACTUAL_WIND_DIRECTION")
.lambda() .lambda()
.between(ThirdWindPowerGenerationEnt::getCollectTime, startTime, endTime) .between(ThirdWindPowerGenerationEnt::getCollectTime, startTime, endTime)
.eq(ThirdWindPowerGenerationEnt::getSystemSource, ServiceUtil.getOilFieldCode(context)) .eq(ThirdWindPowerGenerationEnt::getSystemSource, ServiceUtil.getOilFieldCode(context))
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
AND #{endTime} AND #{endTime}
</delete> </delete>
<insert id="batchInsert" parameterType="list"> <insert id="batchInsert" parameterType="list" databaseId="MySQL">
INSERT INTO WIND_PREDICTION_HISTORY (ID, STATION_ID, DATA_TIME, WIND_DIRECTION, WIND_SPEED, AIR_TEMPERATURE, INSERT INTO WIND_PREDICTION_HISTORY (ID, STATION_ID, DATA_TIME, WIND_DIRECTION, WIND_SPEED, AIR_TEMPERATURE,
HUMIDITY, PRESSURE, ACTUAL_WIND_DIRECTION, ACTUAL_WIND_SPEED, ACTUAL_POWER, PREDICTED_POWER, WND_100M, HUMIDITY, PRESSURE, ACTUAL_WIND_DIRECTION, ACTUAL_WIND_SPEED, ACTUAL_POWER, PREDICTED_POWER, WND_100M,
WNS_100M, WNS_GRD_100M) VALUES WNS_100M, WNS_GRD_100M) VALUES
...@@ -85,4 +85,30 @@ ...@@ -85,4 +85,30 @@
) )
</foreach> </foreach>
</insert> </insert>
<insert id="batchInsert" parameterType="list" databaseId="Oracle">
INSERT ALL
<foreach collection="list" item="item">
INTO WIND_PREDICTION_HISTORY (ID, STATION_ID, DATA_TIME, WIND_DIRECTION, WIND_SPEED, AIR_TEMPERATURE,
HUMIDITY, PRESSURE, ACTUAL_WIND_DIRECTION, ACTUAL_WIND_SPEED, ACTUAL_POWER, PREDICTED_POWER, WND_100M,
WNS_100M, WNS_GRD_100M) VALUES (
#{item.id},
#{item.stationId},
#{item.dataTime},
#{item.windDirection},
#{item.windSpeed},
#{item.airTemperature},
#{item.humidity},
#{item.pressure},
#{item.actualWindDirection},
#{item.actualWindSpeed},
#{item.actualPower},
#{item.predictedPower},
#{item.wnd100m},
#{item.wns100m},
#{item.wnsGrd100m}
)
</foreach>
SELECT * FROM DUAL
</insert>
</mapper> </mapper>
\ No newline at end of file
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