|
@@ -532,15 +532,15 @@ public class WindPowerInfo4Service {
|
|
for (ProEconPowerstationInfoDay4 vo : dayls) {
|
|
for (ProEconPowerstationInfoDay4 vo : dayls) {
|
|
templs.add(vo);
|
|
templs.add(vo);
|
|
if (templs.size() == 100) {
|
|
if (templs.size() == 100) {
|
|
- proEconPowerstationInfoDay4Service.saveOrUpdateBatch(templs);
|
|
|
|
|
|
+ proEconPowerstationInfoDay4Service.saveBatch(templs);
|
|
templs = new ArrayList<>();
|
|
templs = new ArrayList<>();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
if (!templs.isEmpty()) {
|
|
if (!templs.isEmpty()) {
|
|
- proEconPowerstationInfoDay4Service.saveOrUpdateBatch(templs);
|
|
|
|
|
|
+ proEconPowerstationInfoDay4Service.saveBatch(templs);
|
|
}
|
|
}
|
|
-// proEconPowerstationInfoDay4Service.saveBatch(dayls);
|
|
|
|
|
|
+// proEconPowerstationInfoDay4Service.(dayls);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -663,15 +663,15 @@ public class WindPowerInfo4Service {
|
|
for (ProEconPowerstationInfoDay4 vo : dayls) {
|
|
for (ProEconPowerstationInfoDay4 vo : dayls) {
|
|
templs.add(vo);
|
|
templs.add(vo);
|
|
if (templs.size() == 100) {
|
|
if (templs.size() == 100) {
|
|
- proEconPowerstationInfoDay4Service.saveOrUpdateBatch(templs);
|
|
|
|
|
|
+ proEconPowerstationInfoDay4Service.saveBatch(templs);
|
|
templs = new ArrayList<>();
|
|
templs = new ArrayList<>();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
if (!templs.isEmpty()) {
|
|
if (!templs.isEmpty()) {
|
|
- proEconPowerstationInfoDay4Service.saveOrUpdateBatch(templs);
|
|
|
|
|
|
+ proEconPowerstationInfoDay4Service.saveBatch(templs);
|
|
}
|
|
}
|
|
-// proEconPowerstationInfoDay4Service.saveBatch(dayls);
|
|
|
|
|
|
+// proEconPowerstationInfoDay4Service.(dayls);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -690,9 +690,7 @@ public class WindPowerInfo4Service {
|
|
queryWrapper.eq("record_date", DateUtils.truncate(recordDate))
|
|
queryWrapper.eq("record_date", DateUtils.truncate(recordDate))
|
|
.eq("location", Location.ln.getValue());
|
|
.eq("location", Location.ln.getValue());
|
|
List<String> idls = proEconPowerstationInfoDay4Service.list(queryWrapper).stream()
|
|
List<String> idls = proEconPowerstationInfoDay4Service.list(queryWrapper).stream()
|
|
-// .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(recordDate)) == 0
|
|
|
|
-// && CacheContext.lnmap.containsKey(i.getLineId())
|
|
|
|
-// && i.getLocation().equals(Location.ln.getValue()))
|
|
|
|
|
|
+
|
|
.map(ProEconPowerstationInfoDay4::getId)
|
|
.map(ProEconPowerstationInfoDay4::getId)
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
@@ -703,8 +701,7 @@ public class WindPowerInfo4Service {
|
|
}
|
|
}
|
|
List<ProEconPowerstationInfoDay4> dayls = new ArrayList<>();
|
|
List<ProEconPowerstationInfoDay4> dayls = new ArrayList<>();
|
|
for (ProBasicLine ln : CacheContext.lnls) {
|
|
for (ProBasicLine ln : CacheContext.lnls) {
|
|
-// if (CacheContext.linepointmap.containsKey(ln.getId())) {
|
|
|
|
-// Map<String, ProBasicPowerstationPoint> pointmap = CacheContext.wppointmap.get(ln.getId());
|
|
|
|
|
|
+
|
|
|
|
|
|
ProEconPowerstationInfoDay4 pewp = new ProEconPowerstationInfoDay4();
|
|
ProEconPowerstationInfoDay4 pewp = new ProEconPowerstationInfoDay4();
|
|
if (CacheContext.pjmap.containsKey(ln.getProjectId())) {
|
|
if (CacheContext.pjmap.containsKey(ln.getProjectId())) {
|
|
@@ -737,12 +734,7 @@ public class WindPowerInfo4Service {
|
|
.eq("location", Location.ln.getValue())
|
|
.eq("location", Location.ln.getValue())
|
|
.eq("line_id", ln.getId());
|
|
.eq("line_id", ln.getId());
|
|
pepid2ls = proEconPowerstationInfoDay2Service.list(queryWrapper2);
|
|
pepid2ls = proEconPowerstationInfoDay2Service.list(queryWrapper2);
|
|
-// .stream()
|
|
|
|
-// .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(cl.getTime())) == 0
|
|
|
|
-// && i.getLocation().equals(Location.ln.getValue())
|
|
|
|
-// && i.getLineId().equals(ln.getId())
|
|
|
|
-//
|
|
|
|
-// ).collect(Collectors.toList());
|
|
|
|
|
|
+
|
|
|
|
|
|
if (!pepid2ls.isEmpty()) {
|
|
if (!pepid2ls.isEmpty()) {
|
|
pepid2 = pepid2ls.get(0);
|
|
pepid2 = pepid2ls.get(0);
|
|
@@ -755,12 +747,7 @@ public class WindPowerInfo4Service {
|
|
.eq("location", Location.ln.getValue())
|
|
.eq("location", Location.ln.getValue())
|
|
.eq("line_id", ln.getId());
|
|
.eq("line_id", ln.getId());
|
|
pepid3ls = proEconPowerstationInfoDay3Service.list(queryWrapper3);
|
|
pepid3ls = proEconPowerstationInfoDay3Service.list(queryWrapper3);
|
|
-// .stream()
|
|
|
|
-// .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(cl.getTime())) == 0
|
|
|
|
-// && i.getLocation().equals(Location.ln.getValue())
|
|
|
|
-// && i.getLineId().equals(ln.getId())
|
|
|
|
-//
|
|
|
|
-// ).collect(Collectors.toList());
|
|
|
|
|
|
+
|
|
|
|
|
|
if (!pepid3ls.isEmpty()) {
|
|
if (!pepid3ls.isEmpty()) {
|
|
pepid3 = pepid3ls.get(0);
|
|
pepid3 = pepid3ls.get(0);
|
|
@@ -773,13 +760,7 @@ public class WindPowerInfo4Service {
|
|
.eq("location", Location.ln.getValue())
|
|
.eq("location", Location.ln.getValue())
|
|
.eq("line_id", ln.getId());
|
|
.eq("line_id", ln.getId());
|
|
pepidls = proEconPowerstationInfoDay4Service.list(queryWrapper4);
|
|
pepidls = proEconPowerstationInfoDay4Service.list(queryWrapper4);
|
|
-// .stream()
|
|
|
|
-// .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(cl.getTime())) == 0
|
|
|
|
-// && i.getLocation().equals(Location.ln.getValue())
|
|
|
|
-// && i.getLineId().equals(ln.getId())
|
|
|
|
-//
|
|
|
|
-// )
|
|
|
|
-// .collect(Collectors.toList());
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -797,15 +778,15 @@ public class WindPowerInfo4Service {
|
|
for (ProEconPowerstationInfoDay4 vo : dayls) {
|
|
for (ProEconPowerstationInfoDay4 vo : dayls) {
|
|
templs.add(vo);
|
|
templs.add(vo);
|
|
if (templs.size() == 100) {
|
|
if (templs.size() == 100) {
|
|
- proEconPowerstationInfoDay4Service.saveOrUpdateBatch(templs);
|
|
|
|
|
|
+ proEconPowerstationInfoDay4Service.saveBatch(templs);
|
|
templs = new ArrayList<>();
|
|
templs = new ArrayList<>();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
if (!templs.isEmpty()) {
|
|
if (!templs.isEmpty()) {
|
|
- proEconPowerstationInfoDay4Service.saveOrUpdateBatch(templs);
|
|
|
|
|
|
+ proEconPowerstationInfoDay4Service.saveBatch(templs);
|
|
}
|
|
}
|
|
-// proEconPowerstationInfoDay4Service.saveBatch(dayls);
|
|
|
|
|
|
+// proEconPowerstationInfoDay4Service.(dayls);
|
|
}
|
|
}
|
|
|
|
|
|
private void calDetiall(ProEconPowerstationInfoDay4 pewp, Date end, Date begin, List<ProBasicEquipment> wtls,
|
|
private void calDetiall(ProEconPowerstationInfoDay4 pewp, Date end, Date begin, List<ProBasicEquipment> wtls,
|