|
@@ -6,9 +6,11 @@ import cn.hutool.core.date.DateUtil;
|
|
import cn.hutool.http.HttpRequest;
|
|
import cn.hutool.http.HttpRequest;
|
|
import cn.hutool.json.JSONObject;
|
|
import cn.hutool.json.JSONObject;
|
|
import cn.hutool.json.JSONUtil;
|
|
import cn.hutool.json.JSONUtil;
|
|
|
|
+//import com.jiayue.insu.inclientqn.ElectricFieldTypeEnum;
|
|
import com.jiayue.insu.inclientqn.constant.ConnectConstant;
|
|
import com.jiayue.insu.inclientqn.constant.ConnectConstant;
|
|
import com.jiayue.insu.inclientqn.constant.DataTypeConstant;
|
|
import com.jiayue.insu.inclientqn.constant.DataTypeConstant;
|
|
import com.jiayue.insu.inclientqn.constant.StatusConstant;
|
|
import com.jiayue.insu.inclientqn.constant.StatusConstant;
|
|
|
|
+import com.jiayue.insu.inclientqn.entity.CorrforeSt;
|
|
import com.jiayue.insu.inclientqn.entity.TokenInfo;
|
|
import com.jiayue.insu.inclientqn.entity.TokenInfo;
|
|
import com.jiayue.insu.inclientqn.model.RequestVo;
|
|
import com.jiayue.insu.inclientqn.model.RequestVo;
|
|
import com.jiayue.insu.inclientqn.model.ResponseVo;
|
|
import com.jiayue.insu.inclientqn.model.ResponseVo;
|
|
@@ -21,6 +23,9 @@ import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
|
|
+import java.sql.Timestamp;
|
|
|
|
+import java.time.LocalDateTime;
|
|
|
|
+import java.time.format.DateTimeFormatter;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
@@ -55,16 +60,13 @@ public class ForecastPowerTermCorrectService {
|
|
long startTimeT = DateUtil.beginOfDay(new Date()).getTime();
|
|
long startTimeT = DateUtil.beginOfDay(new Date()).getTime();
|
|
long endTimeT = DateUtil.offsetDay(new Date(startTimeT), 1).getTime() - 1;
|
|
long endTimeT = DateUtil.offsetDay(new Date(startTimeT), 1).getTime() - 1;
|
|
//请求当日预测数据
|
|
//请求当日预测数据
|
|
- String todayforeStatus = corrforeData(tokenVo, DataTypeConstant.TODAYFORE_TYPE, startTimeT, endTimeT, 97);
|
|
|
|
|
|
+ String todayforeStatus = corrforeData(tokenVo, DataTypeConstant.CORRFORE_TYPE, startTimeT, endTimeT, 97);
|
|
status[0] = todayforeStatus;
|
|
status[0] = todayforeStatus;
|
|
-
|
|
|
|
-
|
|
|
|
- long startTimeC = DateUtil.beginOfDay(DateUtil.tomorrow()).getTime();
|
|
|
|
- long endTimeC = DateUtil.offsetDay(new Date(startTimeC), 9).getTime();
|
|
|
|
- //请求未来9天预测数据
|
|
|
|
- String corrforeStatus = corrforeData(tokenVo, DataTypeConstant.CORRFORE_TYPE, startTimeC, endTimeC, 865);
|
|
|
|
- status[1] = corrforeStatus;
|
|
|
|
-
|
|
|
|
|
|
+// long startTimeC = DateUtil.beginOfDay(DateUtil.tomorrow()).getTime();
|
|
|
|
+// long endTimeC = DateUtil.offsetDay(new Date(startTimeC), 9).getTime();
|
|
|
|
+// //请求未来9天预测数据
|
|
|
|
+// String corrforeStatus = corrforeData(tokenVo, DataTypeConstant.CORRFORE_TYPE, startTimeC, endTimeC, 865);
|
|
|
|
+// status[1] = corrforeStatus;
|
|
} else {
|
|
} else {
|
|
log.error(stationCode + " ========== 一体化:下载短期修正数据失败 无token ==========");
|
|
log.error(stationCode + " ========== 一体化:下载短期修正数据失败 无token ==========");
|
|
}
|
|
}
|
|
@@ -76,7 +78,7 @@ public class ForecastPowerTermCorrectService {
|
|
String response = "";
|
|
String response = "";
|
|
String status = "";
|
|
String status = "";
|
|
boolean result = false;
|
|
boolean result = false;
|
|
-// List<AioForecastPowerShortTerm> list = new ArrayList<>();
|
|
|
|
|
|
+ List<CorrforeSt> list = new ArrayList<>();
|
|
try {
|
|
try {
|
|
|
|
|
|
DateTime dateTime = DateUtil.parse(DateUtil.today());
|
|
DateTime dateTime = DateUtil.parse(DateUtil.today());
|
|
@@ -93,112 +95,103 @@ public class ForecastPowerTermCorrectService {
|
|
if (!tokenInfoList.isEmpty()) {
|
|
if (!tokenInfoList.isEmpty()) {
|
|
TokenInfo tokenInfo = tokenInfoList.get(0);
|
|
TokenInfo tokenInfo = tokenInfoList.get(0);
|
|
downloadurl = tokenInfo.getDownloadurl();
|
|
downloadurl = tokenInfo.getDownloadurl();
|
|
- }
|
|
|
|
- HttpRequest httpRequest = HttpRequest.post(downloadurl)
|
|
|
|
- .header("Content-Type", "application/json")
|
|
|
|
- .header("Authorization", tokenVo.getTokenInfo());
|
|
|
|
- httpRequest.setGlobalTimeout(20000);
|
|
|
|
- response = httpRequest
|
|
|
|
- .body(body)
|
|
|
|
- .execute().body();
|
|
|
|
|
|
+ HttpRequest httpRequest = HttpRequest.post(downloadurl)
|
|
|
|
+ .header("Content-Type", "application/json")
|
|
|
|
+ .header("Authorization", tokenVo.getTokenInfo());
|
|
|
|
+ httpRequest.setGlobalTimeout(20000);
|
|
|
|
+ response = httpRequest
|
|
|
|
+ .body(body)
|
|
|
|
+ .execute().body();
|
|
|
|
|
|
- if (StringUtils.isNotEmpty(response)) {
|
|
|
|
- boolean isJson = JSONUtil.isJsonObj(response);
|
|
|
|
- if (isJson) {
|
|
|
|
- ResponseVo responseVo = JSONUtil.toBean(response, ResponseVo.class);
|
|
|
|
- status = responseVo.getRetCode();
|
|
|
|
- if (status.equals(StatusConstant.REQUEST_SUCCESS)) {
|
|
|
|
|
|
+ if (StringUtils.isNotEmpty(response)) {
|
|
|
|
+ boolean isJson = JSONUtil.isJsonObj(response);
|
|
|
|
+ if (isJson) {
|
|
|
|
+ ResponseVo responseVo = JSONUtil.toBean(response, ResponseVo.class);
|
|
|
|
+ status = responseVo.getRetCode();
|
|
|
|
+ if (status.equals(StatusConstant.REQUEST_SUCCESS)) {
|
|
|
|
|
|
-// List<AioForecastPowerShortTerm> aList = new ArrayList<>();
|
|
|
|
-// aList = aioForecastPowerShortTermService.findBySignCodeAndStationCodeAndForecastTimeBetween(el.getSignCode(), el.getStationCode(), startTime, endTime);
|
|
|
|
-// log.info(el.getStationCode() + " 请求短期修正数据返回内容:{}", response);
|
|
|
|
-//
|
|
|
|
-// String dataContent = responseVo.getData();
|
|
|
|
-// if (!dataContent.contains("NULL") && !dataContent.contains("null")) {
|
|
|
|
-//
|
|
|
|
-// try {
|
|
|
|
-//
|
|
|
|
-// if (StatusConstant.ET_PHOTOVOLTAIC.equals(el.getType())) {
|
|
|
|
-// list = correctPhotovoltaicData(responseVo.getData());
|
|
|
|
-//
|
|
|
|
-// } else {
|
|
|
|
-// list = correctWindData(responseVo.getData());
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// /**************检测解析数据完整性*******************/
|
|
|
|
-// if (list.size() < count) {
|
|
|
|
-// status = StatusConstant.Correct_STATUS_DATA_LACK;
|
|
|
|
-// log.warn(el.getStationCode() + " 请求短期修正数据缺数: " + list.size());
|
|
|
|
-// } else {
|
|
|
|
-// result = true;
|
|
|
|
-// long amendTime = new Date().getTime();
|
|
|
|
-// for (AioForecastPowerShortTerm a : aList) {
|
|
|
|
-// List<AioForecastPowerShortTerm> collect = list.stream().filter(n -> n.getForecastTime().longValue() == a.getForecastTime().longValue()).collect(Collectors.toList());
|
|
|
|
-// if (CollectionUtil.isNotEmpty(collect)) {
|
|
|
|
-// AioForecastPowerShortTerm correct = collect.get(0);
|
|
|
|
-// a.setAmendTime(amendTime);
|
|
|
|
-// a.setFpValueAmend(correct.getFpValueAmend());
|
|
|
|
-// a.setSwrAmend(correct.getSwrAmend());
|
|
|
|
-// a.setDirectRadiationAmend(correct.getDirectRadiationAmend());
|
|
|
|
-// a.setDiffuseRadiationAmend(correct.getDiffuseRadiationAmend());
|
|
|
|
-// a.setWindspeedAmend(correct.getWindspeedAmend());
|
|
|
|
-// a.setWindDirAmend(correct.getWindDirAmend());
|
|
|
|
-// a.setTemperatureAmend(correct.getTemperatureAmend());
|
|
|
|
-// a.setHumidityAmend(correct.getHumidityAmend());
|
|
|
|
-// a.setPressureAmend(correct.getPressureAmend());
|
|
|
|
-//
|
|
|
|
-// } else {
|
|
|
|
-// result = false;
|
|
|
|
-// status = StatusConstant.Correct_STATUS_DATA_LACK;
|
|
|
|
-// log.warn(el.getStationCode() + " 请求短期修正数据缺数");
|
|
|
|
-// break;
|
|
|
|
|
|
+ List<CorrforeSt> aList = new ArrayList<>();
|
|
|
|
+ log.info("请求短期修正数据返回内容:{}", response);
|
|
|
|
+
|
|
|
|
+ String dataContent = responseVo.getData();
|
|
|
|
+ if (!dataContent.contains("NULL") && !dataContent.contains("null")) {
|
|
|
|
+ try {
|
|
|
|
+// if (ElectricFieldTypeEnum.E1.toString().equals(tokenInfo.getStationType())) {
|
|
|
|
+// list = correctPhotovoltaicData(responseVo.getData());
|
|
|
|
+// } else {
|
|
|
|
+//// list = correctWindData(responseVo.getData());
|
|
|
|
+// }
|
|
|
|
+
|
|
|
|
+ /**************检测解析数据完整性*******************/
|
|
|
|
+// if (list.size() < count) {
|
|
|
|
+// status = StatusConstant.Correct_STATUS_DATA_LACK;
|
|
|
|
+// log.warn(el.getStationCode() + " 请求短期修正数据缺数: " + list.size());
|
|
|
|
+// } else {
|
|
|
|
+// result = true;
|
|
|
|
+// long amendTime = new Date().getTime();
|
|
|
|
+// for (CorrforeSt a : aList) {
|
|
|
|
+// List<CorrforeSt> collect = list.stream().filter(n -> n.getForecastTime().longValue() == a.getForecastTime().longValue()).collect(Collectors.toList());
|
|
|
|
+// if (CollectionUtil.isNotEmpty(collect)) {
|
|
|
|
+// AioForecastPowerShortTerm correct = collect.get(0);
|
|
|
|
+// a.setAmendTime(amendTime);
|
|
|
|
+// a.setFpValueAmend(correct.getFpValueAmend());
|
|
|
|
+// a.setSwrAmend(correct.getSwrAmend());
|
|
|
|
+// a.setDirectRadiationAmend(correct.getDirectRadiationAmend());
|
|
|
|
+// a.setDiffuseRadiationAmend(correct.getDiffuseRadiationAmend());
|
|
|
|
+// a.setWindspeedAmend(correct.getWindspeedAmend());
|
|
|
|
+// a.setWindDirAmend(correct.getWindDirAmend());
|
|
|
|
+// a.setTemperatureAmend(correct.getTemperatureAmend());
|
|
|
|
+// a.setHumidityAmend(correct.getHumidityAmend());
|
|
|
|
+// a.setPressureAmend(correct.getPressureAmend());
|
|
|
|
+//
|
|
|
|
+// } else {
|
|
|
|
+// result = false;
|
|
|
|
+// status = StatusConstant.Correct_STATUS_DATA_LACK;
|
|
|
|
+// log.warn("请求短期修正数据缺数");
|
|
|
|
+// break;
|
|
|
|
+// }
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
-//
|
|
|
|
-// }
|
|
|
|
-// /**************检测解析数据完整性*******************/
|
|
|
|
-//
|
|
|
|
-// } catch (Exception e) {
|
|
|
|
-// status = StatusConstant.Correct_STATUS_DATA_FAIL;
|
|
|
|
-// log.info("========== 一体化: {} 解析期修正数据失败 {} ==========", el.getStationCode(), type);
|
|
|
|
-// }
|
|
|
|
-// } else {
|
|
|
|
-// status = StatusConstant.Correct_STATUS_DATA_FAIL;
|
|
|
|
-// log.info("========== 一体化: {} 解析期修正数据为完成 含NULL {} ==========", el.getStationCode(), type);
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-//
|
|
|
|
-// if (result) {
|
|
|
|
-// log.info("========== 一体化: {} 下载短期修正数据成功 {} ==========", el.getStationCode(), type);
|
|
|
|
-// aioForecastPowerShortTermService.saveAll(aList);
|
|
|
|
-// }
|
|
|
|
|
|
+ /**************检测解析数据完整性*******************/
|
|
|
|
|
|
- } else {
|
|
|
|
- log.error("========== 一体化: {} 下载短期修正数据失败 接收retCode响应码非成功标识T200 {} ==========", stationCode, type);
|
|
|
|
- log.error("========== 一体化: {} {} 下载短期修正数据失败 接收retCode响应码非成功标识T200 标识为{} ==========", stationCode, type, status);
|
|
|
|
- log.error("========== 一体化: {} {} 下载短期修正数据失败 接收retCode响应码非成功标识T200 失败原因为{} ==========", stationCode, type, responseVo.getRetMsg());
|
|
|
|
- if (status.equals(StatusConstant.TOKEN_EXPIRE)) {
|
|
|
|
- log.error("========== 一体化: {} 下载短期修正数据失败 token过期 已重新请求token ==========", stationCode);
|
|
|
|
- }
|
|
|
|
- if (status.equals(StatusConstant.TOKEN_INVALID)) {
|
|
|
|
- log.error("========== 一体化: {} 上下载短期修正数据失败 token失效 已重新请求token ==========", stationCode);
|
|
|
|
- }
|
|
|
|
- if (status.equals(StatusConstant.AUTOGRAPH_FAIL)) {
|
|
|
|
- log.error("========== 一体化: {} 下载短期修正数据失败 签名失败 已重新请求token ==========", stationCode);
|
|
|
|
- }
|
|
|
|
- if (responseVo.getRetCode().equals(StatusConstant.LOGIN_NOT)) {
|
|
|
|
- log.error("========== 一体化: {} 下载短期修正数据失败 用户未登录 已重新请求token ==========", stationCode);
|
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ status = StatusConstant.Correct_STATUS_DATA_FAIL;
|
|
|
|
+// log.info("========== 一体化: {} 解析期修正数据失败 {} ==========", el.getStationCode(), type);
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ status = StatusConstant.Correct_STATUS_DATA_FAIL;
|
|
|
|
+// log.info("========== 一体化: {} 解析期修正数据为完成 含NULL {} ==========", el.getStationCode(), type);
|
|
|
|
+ }
|
|
|
|
+ if (result) {
|
|
|
|
+// log.info("========== 一体化: {} 下载短期修正数据成功 {} ==========", el.getStationCode(), type);
|
|
|
|
+// aioForecastPowerShortTermService.saveAll(aList);
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ log.error("========== 一体化: {} 下载短期修正数据失败 接收retCode响应码非成功标识T200 {} ==========", stationCode, type);
|
|
|
|
+ log.error("========== 一体化: {} {} 下载短期修正数据失败 接收retCode响应码非成功标识T200 标识为{} ==========", stationCode, type, status);
|
|
|
|
+ log.error("========== 一体化: {} {} 下载短期修正数据失败 接收retCode响应码非成功标识T200 失败原因为{} ==========", stationCode, type, responseVo.getRetMsg());
|
|
|
|
+ if (status.equals(StatusConstant.TOKEN_EXPIRE)) {
|
|
|
|
+ log.error("========== 一体化: {} 下载短期修正数据失败 token过期 已重新请求token ==========", stationCode);
|
|
|
|
+ }
|
|
|
|
+ if (status.equals(StatusConstant.TOKEN_INVALID)) {
|
|
|
|
+ log.error("========== 一体化: {} 上下载短期修正数据失败 token失效 已重新请求token ==========", stationCode);
|
|
|
|
+ }
|
|
|
|
+ if (status.equals(StatusConstant.AUTOGRAPH_FAIL)) {
|
|
|
|
+ log.error("========== 一体化: {} 下载短期修正数据失败 签名失败 已重新请求token ==========", stationCode);
|
|
|
|
+ }
|
|
|
|
+ if (responseVo.getRetCode().equals(StatusConstant.LOGIN_NOT)) {
|
|
|
|
+ log.error("========== 一体化: {} 下载短期修正数据失败 用户未登录 已重新请求token ==========", stationCode);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+ } else {
|
|
|
|
+ status = StatusConstant.RESPONSE_ERROR1;
|
|
|
|
+ log.error("========== 一体化:下载短期修正数据失败 接收响应字符串非json格式 " + response + " ==========");
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- status = StatusConstant.RESPONSE_ERROR1;
|
|
|
|
- log.error("========== 一体化:下载短期修正数据失败 接收响应字符串非json格式 " + response + " ==========");
|
|
|
|
|
|
+ status = StatusConstant.RESPONSE_ERROR2;
|
|
|
|
+ log.error("========== 一体化:下载短期修正数据失败 返回响应内容为空 ==========");
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
- status = StatusConstant.RESPONSE_ERROR2;
|
|
|
|
- log.error("========== 一体化:下载短期修正数据失败 返回响应内容为空 ==========");
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
status = StatusConstant.RESPONSE_ERROR3;
|
|
status = StatusConstant.RESPONSE_ERROR3;
|
|
log.error("========== 一体化:下载短期修正数据失败 连接断开或请求超时 ==========");
|
|
log.error("========== 一体化:下载短期修正数据失败 连接断开或请求超时 ==========");
|
|
@@ -209,60 +202,38 @@ public class ForecastPowerTermCorrectService {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-// /**
|
|
|
|
-// * 光伏数据解析
|
|
|
|
-// *
|
|
|
|
-// * @param data 待解析数据
|
|
|
|
-// * @return
|
|
|
|
-// * @throws Exception
|
|
|
|
-// */
|
|
|
|
-// public List<AioForecastPowerShortTerm> correctPhotovoltaicData(String data) throws Exception {
|
|
|
|
-//
|
|
|
|
-// String[] content = data.split("\n");
|
|
|
|
-//
|
|
|
|
-//
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 光伏数据解析
|
|
|
|
+ *
|
|
|
|
+ * @param data 待解析数据
|
|
|
|
+ * @return
|
|
|
|
+ * @throws Exception
|
|
|
|
+ */
|
|
|
|
+ public List<CorrforeSt> correctPhotovoltaicData(String data) throws Exception {
|
|
|
|
+ String[] content = data.split("\n");
|
|
// String dateStr = content[0].split("'")[1];
|
|
// String dateStr = content[0].split("'")[1];
|
|
-//
|
|
|
|
-// List<AioForecastPowerShortTerm> list = new ArrayList<>();
|
|
|
|
-//
|
|
|
|
-// Date genDate = new Date();
|
|
|
|
-//
|
|
|
|
-// for (int i = 3; i < content.length - 1; i++) {
|
|
|
|
-//
|
|
|
|
-// AioForecastPowerShortTerm inForecastPowerShortTerm = new AioForecastPowerShortTerm();
|
|
|
|
-// String column = content[i];
|
|
|
|
-//
|
|
|
|
-// String[] datas = column.split(ConnectConstant.SPACE1_CONSTANT);
|
|
|
|
-//
|
|
|
|
-// inForecastPowerShortTerm.setForecastTime(DateUtil.parse(datas[2], "yyyyMMddHHmmss").getTime());
|
|
|
|
-//
|
|
|
|
-// inForecastPowerShortTerm.setFpValueAmend(new BigDecimal(datas[3]).setScale(2, BigDecimal.ROUND_DOWN));
|
|
|
|
-//
|
|
|
|
-// inForecastPowerShortTerm.setSwrAmend(new BigDecimal(datas[4]).setScale(2, BigDecimal.ROUND_DOWN));
|
|
|
|
-//
|
|
|
|
-// inForecastPowerShortTerm.setDirectRadiationAmend(new BigDecimal(datas[5]).setScale(2, BigDecimal.ROUND_DOWN));
|
|
|
|
-//
|
|
|
|
-// inForecastPowerShortTerm.setDiffuseRadiationAmend(new BigDecimal(datas[6]).setScale(2, BigDecimal.ROUND_DOWN));
|
|
|
|
-//
|
|
|
|
-// inForecastPowerShortTerm.setTemperatureAmend(new BigDecimal(datas[7]).setScale(2, BigDecimal.ROUND_DOWN));
|
|
|
|
-//
|
|
|
|
-// inForecastPowerShortTerm.setHumidityAmend(new BigDecimal(datas[8]).setScale(2, BigDecimal.ROUND_DOWN));
|
|
|
|
-//
|
|
|
|
-// inForecastPowerShortTerm.setPressureAmend(new BigDecimal(datas[9]).setScale(2, BigDecimal.ROUND_DOWN));
|
|
|
|
-//
|
|
|
|
-// inForecastPowerShortTerm.setWindspeedAmend(new BigDecimal(datas[10]).setScale(2, BigDecimal.ROUND_DOWN));
|
|
|
|
-//
|
|
|
|
-// inForecastPowerShortTerm.setWindDirAmend(new BigDecimal(datas[11]).setScale(2, BigDecimal.ROUND_DOWN));
|
|
|
|
-//
|
|
|
|
-// inForecastPowerShortTerm.setAmendTime(new Date().getTime());
|
|
|
|
-//
|
|
|
|
-// list.add(inForecastPowerShortTerm);
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// return list;
|
|
|
|
-//
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
|
|
+ List<CorrforeSt> list = new ArrayList<>();
|
|
|
|
+ Date genDate = new Date();
|
|
|
|
+ for (int i = 3; i < content.length - 1; i++) {
|
|
|
|
+ CorrforeSt inForecastPowerShortTerm = new CorrforeSt();
|
|
|
|
+ String column = content[i];
|
|
|
|
+ String[] datas = column.split(ConnectConstant.SPACE1_CONSTANT);
|
|
|
|
+ inForecastPowerShortTerm.setForecastTime(DateUtil.parse(datas[2], "yyyy-MM-dd HH:mm:ss").toTimestamp());
|
|
|
|
+ inForecastPowerShortTerm.setFpValue(new BigDecimal(datas[3]).setScale(2, BigDecimal.ROUND_DOWN));
|
|
|
|
+ inForecastPowerShortTerm.setGlobalR(new BigDecimal(datas[4]).setScale(2, BigDecimal.ROUND_DOWN));
|
|
|
|
+ inForecastPowerShortTerm.setDirectR(new BigDecimal(datas[5]).setScale(2, BigDecimal.ROUND_DOWN));
|
|
|
|
+ inForecastPowerShortTerm.setDiffuseR(new BigDecimal(datas[6]).setScale(2, BigDecimal.ROUND_DOWN));
|
|
|
|
+ inForecastPowerShortTerm.setT(new BigDecimal(datas[7]).setScale(2, BigDecimal.ROUND_DOWN));
|
|
|
|
+ inForecastPowerShortTerm.setRh(new BigDecimal(datas[8]).setScale(2, BigDecimal.ROUND_DOWN));
|
|
|
|
+ inForecastPowerShortTerm.setP(new BigDecimal(datas[9]).setScale(2, BigDecimal.ROUND_DOWN));
|
|
|
|
+ inForecastPowerShortTerm.setWs(new BigDecimal(datas[10]).setScale(2, BigDecimal.ROUND_DOWN));
|
|
|
|
+ inForecastPowerShortTerm.setWd(new BigDecimal(datas[11]).setScale(2, BigDecimal.ROUND_DOWN));
|
|
|
|
+ inForecastPowerShortTerm.setCreateTime(new Timestamp(genDate.getTime()));
|
|
|
|
+ list.add(inForecastPowerShortTerm);
|
|
|
|
+ }
|
|
|
|
+ return list;
|
|
|
|
+ }
|
|
|
|
+
|
|
// /**
|
|
// /**
|
|
// * 风电数据解析
|
|
// * 风电数据解析
|
|
// *
|
|
// *
|