|
@@ -1,6 +1,6 @@
|
|
|
package com.gyee.generation.service;
|
|
|
|
|
|
-import cn.hutool.core.date.DateTime;
|
|
|
+import cn.hutool.core.util.NumberUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.gyee.common.model.PointData;
|
|
|
import com.gyee.common.model.StringUtils;
|
|
@@ -15,12 +15,8 @@ import com.gyee.generation.service.auto.*;
|
|
|
import com.gyee.generation.util.DateUtils;
|
|
|
import com.gyee.generation.util.realtimesource.IEdosUtil;
|
|
|
import com.gyee.generation.util.statisticcs.Initial;
|
|
|
-import com.xxl.job.core.util.DateUtil;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
-import org.springframework.beans.factory.annotation.Value;
|
|
|
-import org.springframework.boot.ApplicationArguments;
|
|
|
-import org.springframework.boot.ApplicationRunner;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
@@ -29,7 +25,6 @@ import java.net.URI;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.time.*;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
-import java.time.temporal.ChronoUnit;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
@@ -1437,8 +1432,8 @@ public class WindPowerInfo1Service {
|
|
|
pb.setWpid("NX_FGS_HA_FDC_STA");
|
|
|
pb.setMeterId(real.getPointName());
|
|
|
pb.setMeterName(real.getPointName());
|
|
|
- pb.setStopCode(real.getPointValueInDouble());
|
|
|
- pb.setStopCodeModify(real.getPointValueInDouble());
|
|
|
+ pb.setStopCode(NumberUtil.round(real.getPointValueInDouble(),2).doubleValue());
|
|
|
+ pb.setStopCodeModify(NumberUtil.round(real.getPointValueInDouble(),2).doubleValue());
|
|
|
ls.add(pb);
|
|
|
}
|
|
|
} else {
|
|
@@ -1447,8 +1442,8 @@ public class WindPowerInfo1Service {
|
|
|
if (real.getPointName().equals(s.getMeterId())) {
|
|
|
ProEconAnalysisSubtableBottom pb = new ProEconAnalysisSubtableBottom();
|
|
|
pb.setId(s.getId());
|
|
|
- pb.setStopCode(real.getPointValueInDouble());
|
|
|
- pb.setStopCodeModify(real.getPointValueInDouble());
|
|
|
+ pb.setStopCode(NumberUtil.round(real.getPointValueInDouble(),2).doubleValue());
|
|
|
+ pb.setStopCodeModify(NumberUtil.round(real.getPointValueInDouble(),2).doubleValue());
|
|
|
pb.setRecordDate(date);
|
|
|
pb.setMeterName(real.getPointName());
|
|
|
pb.setMeterId(real.getPointName());
|
|
@@ -1503,7 +1498,7 @@ public class WindPowerInfo1Service {
|
|
|
List<String> str = list.stream().map(ProBaseBackfill::getCode).collect(Collectors.toList());
|
|
|
long time = date.getTime();
|
|
|
|
|
|
- for (long i = time; i < 1751248800000L; i += 86400000) {
|
|
|
+ for (long i = time; i < 1754625600000L; i += 86400000) {
|
|
|
List<ProEconAnalysisSubtableBottom> ls = new ArrayList<>();
|
|
|
for (String s : str) {
|
|
|
Map<String, PointData2> historySection = adapter.getHistorySection(goldenUri(), s, i);
|
|
@@ -1512,8 +1507,8 @@ public class WindPowerInfo1Service {
|
|
|
pb.setWpid("NX_FGS_HA_FDC_STA");
|
|
|
pb.setMeterId(s);
|
|
|
pb.setMeterName(s);
|
|
|
- pb.setStopCode(historySection.get(s).getDoubleValue());
|
|
|
- pb.setStopCodeModify(historySection.get(s).getDoubleValue());
|
|
|
+ pb.setStopCode(NumberUtil.round(historySection.get(s).getDoubleValue(),2).doubleValue());
|
|
|
+ pb.setStopCodeModify(NumberUtil.round(historySection.get(s).getDoubleValue(),2).doubleValue());
|
|
|
ls.add(pb);
|
|
|
}
|
|
|
try {
|
|
@@ -1605,7 +1600,7 @@ public class WindPowerInfo1Service {
|
|
|
|
|
|
// public void writeReportHistory(Date date) throws Exception {
|
|
|
//// String[] dateTime = {"2024-12-13 08:00:00","2024-12-13 12:00:00", "2024-12-13 16:00:00", "2024-12-13 20:00:00"};
|
|
|
-// String[] dateTime = {"2024-12-25 00:00:00", "2024-12-25 04:00:00", "2024-12-25 08:00:00", "2024-12-24 20:00:00"};
|
|
|
+// String[] dateTime = {"2025-08-04 12:00:00"};
|
|
|
// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
// DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
// String[] split = repInfo1.split(",");
|
|
@@ -1682,7 +1677,7 @@ public class WindPowerInfo1Service {
|
|
|
|
|
|
public void writeReportHistory2(Date date) throws Exception {
|
|
|
// String[] dateTime = {"2024-12-13 01:00:00", "2024-12-13 05:00:00", "2024-12-13 09:00:00","2024-12-13 13:00:00", "2024-12-13 17:00:00", "2024-12-13 21:00:00"};
|
|
|
- String[] dateTime = {"2025-03-13 01:00:00", "2025-03-13 05:00:00", "2025-03-13 09:00:00", "2025-03-13 13:00:00", "2025-03-13 17:00:00", "2025-03-13 21:00:00"};
|
|
|
+ String[] dateTime = {"2025-08-04 13:00:00"};
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
QueryWrapper<ProBaseBackfill> qwf = new QueryWrapper<>();
|
|
@@ -1697,7 +1692,7 @@ public class WindPowerInfo1Service {
|
|
|
for (String s : dateTime) {
|
|
|
Date date1 = simpleDateFormat.parse(s);
|
|
|
long timestamp = date1.getTime();
|
|
|
- for (long i = timestamp; i < 1742176332000L; i += 86400000) {
|
|
|
+ for (long i = timestamp; i < 1754290800000L; i += 86400000) {
|
|
|
List<StationInfoHour> shs = new ArrayList<>();
|
|
|
for (String l : ls) {
|
|
|
Map<String, PointData2> historySection = adapter.getHistorySection(goldenUri(), l, timestamp);
|