Commit 933c0efa authored by ZWT's avatar ZWT

得到的

parent 82a81908
......@@ -46,15 +46,15 @@ public class WindPredictionHistoryCloudServiceImpl implements IWindPredictionHis
//取日期范围内已预测数据
WindPredictionFutureMapper mapper = context.getBean(WindPredictionFutureMapper.class);
List<WindPredictionFutureEnt> list = mapper.selectList(new QueryWrapper<WindPredictionFutureEnt>()
.select("station_id",
"data_time",
"wind_direction",
"wind_speed",
"air_temperature",
"humidity",
"pressure",
"actual_wind_speed",
"actual_power AS predicted_power")
.select("STATION_ID",
"DATA_TIME",
"WIND_DIRECTION",
"WIND_SPEED",
"AIR_TEMPERATURE",
"HUMIDITY",
"PRESSURE",
"ACTUAL_WIND_SPEED",
"ACTUAL_POWER AS PREDICTED_POWER")
.lambda()
.between(WindPredictionFutureEnt::getDataTime, startTime, endTime)
);
......@@ -62,9 +62,9 @@ public class WindPredictionHistoryCloudServiceImpl implements IWindPredictionHis
//查实际发电数据
ThirdWindPowerGenerationMapper generationMapper = context.getBean(ThirdWindPowerGenerationMapper.class);
List<ThirdWindPowerGenerationEnt> generationList = generationMapper.selectList(new QueryWrapper<ThirdWindPowerGenerationEnt>()
.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_wind_direction ) AS actual_wind_direction")
.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_WIND_DIRECTION ) AS ACTUAL_WIND_DIRECTION")
.lambda()
.between(ThirdWindPowerGenerationEnt::getCollectTime, startTime, endTime)
.eq(ThirdWindPowerGenerationEnt::getSystemSource, ServiceUtil.getOilFieldCode(context))
......
......@@ -61,7 +61,7 @@
AND #{endTime}
</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,
HUMIDITY, PRESSURE, ACTUAL_WIND_DIRECTION, ACTUAL_WIND_SPEED, ACTUAL_POWER, PREDICTED_POWER, WND_100M,
WNS_100M, WNS_GRD_100M) VALUES
......@@ -85,4 +85,30 @@
)
</foreach>
</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>
\ 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