Commit 2610b3ca authored by ZWT's avatar ZWT

feat(吉林演示): 松原

1.天气数据接收定时任务,解决代码扫描问题,修改文件读取相关代码,解决资源未关流问题;
2.修改登录验证码生成工具类,解决代码扫描问题,修复随机数不安全问题;
3.删除除主程序启动类外其他启动类模块,解决代码扫描问题;
4.删除自定义httputlis类,解决代码扫描问题,替换部分代码远程调用方法;
5.重构光伏预测模块下载电站实际发电数据导入模板接口,解决代码扫描问题;
6.重构光伏预测模块导入电站实际发电数据接口,解决代码扫描问题;
7.删除公用excel导入导出工具类及poi相关pom依赖,解决代码扫描问题;
8.光伏功率预测模块,增加查询线路列表接口,解决页面接口报错问题;
9.增加测试用历史数据导入接口;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent 001a90d8
......@@ -95,6 +95,10 @@ public class PlantPredictedPowerDataEnt implements Serializable {
@TableField
private String plantName;
@XText("地区编码")
@TableField
private String areaCode;
@XText("天气类型")
@TableField
private String weatherType;
......
......@@ -433,6 +433,9 @@ public class BaseWeatherCloudServiceImpl implements IBaseWeatherCloudService {
int count = 0;
for (JSONObject jsonObject : jsonObjectList) {
this.dataFractionation(jsonObject, deleteList, batchList);
if (CollUtil.isEmpty(batchList)) {
continue;
}
if (count == 0) {
batchList.sort(Comparator.comparing(WeatherBureauDataView::getDataTime));
create = DateUtil.offsetMinute(batchList.get(0).getDataTime(), -5);
......@@ -582,6 +585,9 @@ public class BaseWeatherCloudServiceImpl implements IBaseWeatherCloudService {
int count = 0;
for (JSONObject jsonObject : jsonObjectList) {
this.windDataFractionation(jsonObject, turbineMap, deleteList, batchList);
if (CollUtil.isEmpty(batchList)) {
continue;
}
if (count == 0) {
batchList.sort(Comparator.comparing(WindPredictionFutureView::getDataTime));
create = DateUtil.offsetMinute(batchList.get(0).getDataTime(), -5);
......@@ -881,7 +887,7 @@ public class BaseWeatherCloudServiceImpl implements IBaseWeatherCloudService {
dateTime = DateUtil.offsetDay(dateTime, 1);
flag++;
}
PlantPredictedPowerDataEnt dao = this.getPlantPredictedPowerEnt(plantId, stationName,
PlantPredictedPowerDataEnt dao = this.getPlantPredictedPowerEnt(plantId, stationName, cityCode,
this.int2Str(hour),
this.stringToBigDecimal(dailyData.getTemperatureArray(), i, "℃"),
this.stringToBigDecimal(dailyData.getWindSpeedArray(), i, "m/s"),
......@@ -929,7 +935,7 @@ public class BaseWeatherCloudServiceImpl implements IBaseWeatherCloudService {
PlantPredictedPowerDataEnt nextData = objList.get(i + 1);
BigDecimal valueOf = BigDecimal.valueOf(0.3 * y);
PlantPredictedPowerDataEnt dao = this.getPlantPredictedPowerEnt(plantId, stationName,
hourString,
cityCode, hourString,
this.compute(dataEnt.getTemperature(), nextData.getTemperature(), valueOf),
this.compute(dataEnt.getWindSpeed(), nextData.getWindSpeed(), valueOf),
dataEnt.getWindDirection(),
......@@ -997,6 +1003,7 @@ public class BaseWeatherCloudServiceImpl implements IBaseWeatherCloudService {
*
* @param plantId 电站ID
* @param stationName 电站名称
* @param cityCode 地区编码
* @param hourTime 小时
* @param temperature 温度
* @param windSpeed 风速
......@@ -1010,10 +1017,11 @@ public class BaseWeatherCloudServiceImpl implements IBaseWeatherCloudService {
* @param precipitation 降水量
* @return {@link PlantPredictedPowerDataEnt}
*/
private PlantPredictedPowerDataEnt getPlantPredictedPowerEnt(String plantId, String stationName, String hourTime, BigDecimal temperature, BigDecimal windSpeed, BigDecimal windDirection,
private PlantPredictedPowerDataEnt getPlantPredictedPowerEnt(String plantId, String stationName, String cityCode, String hourTime, BigDecimal temperature, BigDecimal windSpeed, BigDecimal windDirection,
BigDecimal pressure, BigDecimal humidity, String yearTime, String monthTime, String dayTime, String weatherType, BigDecimal precipitation) {
PlantPredictedPowerDataEnt dao = new PlantPredictedPowerDataEnt();
dao.setPlantName(stationName);
dao.setAreaCode(cityCode);
dao.setCreateTime(DateUtil.date());
dao.setPlantId(plantId);
dao.setHourTime(hourTime);
......
......@@ -21,7 +21,9 @@
create_time,
plant_name,
weather_type,
precipitation) VALUES
precipitation,
area_code
) VALUES
<foreach collection="list" separator="," item="item">
(#{item.plantId},
#{item.dataDate},
......@@ -41,7 +43,8 @@
#{item.createTime},
#{item.plantName},
#{item.weatherType},
#{item.precipitation}
#{item.precipitation},
#{item.areaCode}
)
</foreach>
</insert>
......
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