|
@@ -19,7 +19,7 @@ import java.util.stream.Collectors;
|
|
|
@Service
|
|
|
public class WindPowerInfo5Service {
|
|
|
|
|
|
-// private static final Logger logger = LoggerFactory.getLogger(WindPowerInfo1Service.class);
|
|
|
+ // private static final Logger logger = LoggerFactory.getLogger(WindPowerInfo1Service.class);
|
|
|
@Resource
|
|
|
private IEdosUtil edosUtil;
|
|
|
|
|
@@ -27,69 +27,61 @@ public class WindPowerInfo5Service {
|
|
|
private IProEconPowerstationInfoDay5Service proEconPowerstationInfoDay5Service;
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* 计算区域日信息
|
|
|
*/
|
|
|
public void calRegionInfoDay(Date recordDate) {
|
|
|
|
|
|
List<ProEconPowerstationInfoDay5> wpinfodayls = proEconPowerstationInfoDay5Service.list().stream()
|
|
|
- .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(recordDate))==0
|
|
|
+ .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(recordDate)) == 0
|
|
|
// && CacheContext.wpmap.containsKey(i.getWindpowerstationId())
|
|
|
&& i.getLocation().equals(Location.cp.getValue()))
|
|
|
.collect(Collectors.toList());
|
|
|
- if(!wpinfodayls.isEmpty())
|
|
|
- {
|
|
|
-
|
|
|
- Map<String, Map<String, List<ProEconPowerstationInfoDay5>>>rgmap=new HashMap<>();
|
|
|
-
|
|
|
+ if (!wpinfodayls.isEmpty()) {
|
|
|
|
|
|
+ Map<String, Map<String, List<ProEconPowerstationInfoDay5>>> rgmap = new HashMap<>();
|
|
|
|
|
|
|
|
|
- for(ProEconPowerstationInfoDay5 wpinfo:wpinfodayls)
|
|
|
- {
|
|
|
+ for (ProEconPowerstationInfoDay5 wpinfo : wpinfodayls) {
|
|
|
|
|
|
- if(rgmap.containsKey(wpinfo.getRegionId()))
|
|
|
- {
|
|
|
- Map<String, List<ProEconPowerstationInfoDay5>> map=rgmap.get(wpinfo.getRegionId());
|
|
|
- List<ProEconPowerstationInfoDay5> qbls=map.get("qb");
|
|
|
- List<ProEconPowerstationInfoDay5> gfls=map.get("fd");
|
|
|
- List<ProEconPowerstationInfoDay5> fdls=map.get("gf");
|
|
|
+ if (rgmap.containsKey(wpinfo.getRegionId())) {
|
|
|
+ Map<String, List<ProEconPowerstationInfoDay5>> map = rgmap.get(wpinfo.getRegionId());
|
|
|
+ List<ProEconPowerstationInfoDay5> qbls = map.get("qb");
|
|
|
+ List<ProEconPowerstationInfoDay5> fdls = map.get("fd");
|
|
|
+ List<ProEconPowerstationInfoDay5> gfls = map.get("gf");
|
|
|
|
|
|
- if(wpinfo.getForeignKeyId().equals("-1"))
|
|
|
- {
|
|
|
+ if (wpinfo.getForeignKeyId().equals("-1")) {
|
|
|
fdls.add(wpinfo);
|
|
|
- }else if(wpinfo.getForeignKeyId().equals("-2")){
|
|
|
+ } else if (wpinfo.getForeignKeyId().equals("-2")) {
|
|
|
gfls.add(wpinfo);
|
|
|
+ } else if (wpinfo.getForeignKeyId().equals("0")) {
|
|
|
+ qbls.add(wpinfo);
|
|
|
}
|
|
|
- qbls.add(wpinfo);
|
|
|
- }else
|
|
|
- {
|
|
|
- Map<String, List<ProEconPowerstationInfoDay5>> map=new HashMap<>();
|
|
|
|
|
|
- List<ProEconPowerstationInfoDay5> qbls=new ArrayList<>();
|
|
|
- List<ProEconPowerstationInfoDay5> gfls=new ArrayList<>();
|
|
|
- List<ProEconPowerstationInfoDay5> fdls=new ArrayList<>();
|
|
|
+ } else {
|
|
|
+ Map<String, List<ProEconPowerstationInfoDay5>> map = new HashMap<>();
|
|
|
+
|
|
|
+ List<ProEconPowerstationInfoDay5> qbls = new ArrayList<>();
|
|
|
+ List<ProEconPowerstationInfoDay5> fdls = new ArrayList<>();
|
|
|
+ List<ProEconPowerstationInfoDay5> gfls = new ArrayList<>();
|
|
|
|
|
|
- if(wpinfo.getForeignKeyId().equals("-1"))
|
|
|
- {
|
|
|
+ if (wpinfo.getForeignKeyId().equals("-1")) {
|
|
|
fdls.add(wpinfo);
|
|
|
- }else if(wpinfo.getForeignKeyId().equals("-2")){
|
|
|
+ } else if (wpinfo.getForeignKeyId().equals("-2")) {
|
|
|
gfls.add(wpinfo);
|
|
|
}
|
|
|
qbls.add(wpinfo);
|
|
|
- map.put("qb",qbls);
|
|
|
- map.put("fd",fdls);
|
|
|
- map.put("gf",gfls);
|
|
|
- rgmap.put(wpinfo.getRegionId(),map);
|
|
|
+ map.put("qb", qbls);
|
|
|
+ map.put("fd", fdls);
|
|
|
+ map.put("gf", gfls);
|
|
|
+ rgmap.put(wpinfo.getRegionId(), map);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
//判断是否有重复记录,先删除重复记录
|
|
|
List<String> idls = proEconPowerstationInfoDay5Service.list().stream()
|
|
|
- .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(recordDate))==0
|
|
|
+ .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(recordDate)) == 0
|
|
|
// && CacheContext.wpmap.containsKey(i.getWindpowerstationId())
|
|
|
&& i.getLocation().equals(Location.rg.getValue())).map(ProEconPowerstationInfoDay5::getId)
|
|
|
.collect(Collectors.toList());
|
|
@@ -99,21 +91,20 @@ public class WindPowerInfo5Service {
|
|
|
proEconPowerstationInfoDay5Service.removeByIds(idls);
|
|
|
|
|
|
}
|
|
|
- for(Map.Entry<String, Map<String, List<ProEconPowerstationInfoDay5>>> entry:rgmap.entrySet()){
|
|
|
- Map<String, List<ProEconPowerstationInfoDay5>> map=entry.getValue();
|
|
|
- List<ProEconPowerstationInfoDay5> qbls=map.get("qb");
|
|
|
- List<ProEconPowerstationInfoDay5> gfls=map.get("fd");
|
|
|
- List<ProEconPowerstationInfoDay5> fdls=map.get("gf");
|
|
|
+ for (Map.Entry<String, Map<String, List<ProEconPowerstationInfoDay5>>> entry : rgmap.entrySet()) {
|
|
|
+ Map<String, List<ProEconPowerstationInfoDay5>> map = entry.getValue();
|
|
|
+ List<ProEconPowerstationInfoDay5> qbls = map.get("qb");
|
|
|
+ List<ProEconPowerstationInfoDay5> fdls = map.get("fd");
|
|
|
+ List<ProEconPowerstationInfoDay5> gfls = map.get("gf");
|
|
|
// if(CacheContext.cpwpmap.size()==qbls.size())
|
|
|
// {
|
|
|
|
|
|
- ProEconPowerstationInfoDay5 qb=new ProEconPowerstationInfoDay5();
|
|
|
- ProEconPowerstationInfoDay5 fd=new ProEconPowerstationInfoDay5();
|
|
|
- ProEconPowerstationInfoDay5 gf=new ProEconPowerstationInfoDay5();
|
|
|
+ ProEconPowerstationInfoDay5 qb = new ProEconPowerstationInfoDay5();
|
|
|
+ ProEconPowerstationInfoDay5 fd = new ProEconPowerstationInfoDay5();
|
|
|
+ ProEconPowerstationInfoDay5 gf = new ProEconPowerstationInfoDay5();
|
|
|
|
|
|
- if(CacheContext.rgmap.containsKey(entry.getKey()))
|
|
|
- {
|
|
|
- ProBasicRegion cp=CacheContext.rgmap.get(entry.getKey());
|
|
|
+ if (CacheContext.rgmap.containsKey(entry.getKey())) {
|
|
|
+ ProBasicRegion cp = CacheContext.rgmap.get(entry.getKey());
|
|
|
gf.setRegionId(cp.getId());
|
|
|
|
|
|
gf.setRecordDate(DateUtils.truncate(recordDate));
|
|
@@ -132,12 +123,15 @@ public class WindPowerInfo5Service {
|
|
|
qb.setForeignKeyId("0");
|
|
|
qb.setLocation(Location.rg.getValue());
|
|
|
|
|
|
+ Initial.initial(qb);
|
|
|
+ Initial.initial(fd);
|
|
|
+ Initial.initial(gf);
|
|
|
//计算区域级全部
|
|
|
- calCp(qb,qbls);
|
|
|
+ calCp(qb, qbls);
|
|
|
//计算公司级风电场站
|
|
|
- calCp(fd,fdls);
|
|
|
+ calCp(fd, fdls);
|
|
|
//计算公司级光电场站
|
|
|
- calCp(gf,gfls);
|
|
|
+ calCp(gf, gfls);
|
|
|
|
|
|
proEconPowerstationInfoDay5Service.save(qb);
|
|
|
proEconPowerstationInfoDay5Service.save(fd);
|
|
@@ -152,9 +146,6 @@ public class WindPowerInfo5Service {
|
|
|
// }
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -166,61 +157,53 @@ public class WindPowerInfo5Service {
|
|
|
public void calCompanyInfoDay(Date recordDate) {
|
|
|
|
|
|
List<ProEconPowerstationInfoDay5> wpinfodayls = proEconPowerstationInfoDay5Service.list().stream()
|
|
|
- .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(recordDate))==0
|
|
|
+ .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(recordDate)) == 0
|
|
|
// && CacheContext.wpmap.containsKey(i.getWindpowerstationId())
|
|
|
&& i.getLocation().equals(Location.wp.getValue()))
|
|
|
.collect(Collectors.toList());
|
|
|
- if(!wpinfodayls.isEmpty())
|
|
|
- {
|
|
|
-
|
|
|
- Map<String, Map<String, List<ProEconPowerstationInfoDay5>>>cpmap=new HashMap<>();
|
|
|
-
|
|
|
+ if (!wpinfodayls.isEmpty()) {
|
|
|
|
|
|
+ Map<String, Map<String, List<ProEconPowerstationInfoDay5>>> cpmap = new HashMap<>();
|
|
|
|
|
|
|
|
|
- for(ProEconPowerstationInfoDay5 wpinfo:wpinfodayls)
|
|
|
- {
|
|
|
+ for (ProEconPowerstationInfoDay5 wpinfo : wpinfodayls) {
|
|
|
|
|
|
- if(cpmap.containsKey(wpinfo.getCompanyId()))
|
|
|
- {
|
|
|
- Map<String, List<ProEconPowerstationInfoDay5>> map=cpmap.get(wpinfo.getCompanyId());
|
|
|
- List<ProEconPowerstationInfoDay5> qbls=map.get("qb");
|
|
|
- List<ProEconPowerstationInfoDay5> gfls=map.get("fd");
|
|
|
- List<ProEconPowerstationInfoDay5> fdls=map.get("gf");
|
|
|
+ if (cpmap.containsKey(wpinfo.getCompanyId())) {
|
|
|
+ Map<String, List<ProEconPowerstationInfoDay5>> map = cpmap.get(wpinfo.getCompanyId());
|
|
|
+ List<ProEconPowerstationInfoDay5> qbls = map.get("qb");
|
|
|
+ List<ProEconPowerstationInfoDay5> fdls = map.get("fd");
|
|
|
+ List<ProEconPowerstationInfoDay5> gfls = map.get("gf");
|
|
|
|
|
|
- if(wpinfo.getWindpowerstationId().contains("FDC"))
|
|
|
- {
|
|
|
+ if (wpinfo.getWindpowerstationId().contains("FDC")) {
|
|
|
fdls.add(wpinfo);
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
gfls.add(wpinfo);
|
|
|
}
|
|
|
qbls.add(wpinfo);
|
|
|
- }else
|
|
|
- {
|
|
|
- Map<String, List<ProEconPowerstationInfoDay5>> map=new HashMap<>();
|
|
|
+ } else {
|
|
|
+ Map<String, List<ProEconPowerstationInfoDay5>> map = new HashMap<>();
|
|
|
|
|
|
- List<ProEconPowerstationInfoDay5> qbls=new ArrayList<>();
|
|
|
- List<ProEconPowerstationInfoDay5> gfls=new ArrayList<>();
|
|
|
- List<ProEconPowerstationInfoDay5> fdls=new ArrayList<>();
|
|
|
+ List<ProEconPowerstationInfoDay5> qbls = new ArrayList<>();
|
|
|
+ List<ProEconPowerstationInfoDay5> gfls = new ArrayList<>();
|
|
|
+ List<ProEconPowerstationInfoDay5> fdls = new ArrayList<>();
|
|
|
|
|
|
- if(wpinfo.getWindpowerstationId().contains("FDC"))
|
|
|
- {
|
|
|
+ if (wpinfo.getWindpowerstationId().contains("FDC")) {
|
|
|
fdls.add(wpinfo);
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
gfls.add(wpinfo);
|
|
|
}
|
|
|
qbls.add(wpinfo);
|
|
|
- map.put("qb",qbls);
|
|
|
- map.put("fd",fdls);
|
|
|
- map.put("gf",gfls);
|
|
|
- cpmap.put(wpinfo.getCompanyId(),map);
|
|
|
+ map.put("qb", qbls);
|
|
|
+ map.put("fd", fdls);
|
|
|
+ map.put("gf", gfls);
|
|
|
+ cpmap.put(wpinfo.getCompanyId(), map);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
//判断是否有重复记录,先删除重复记录
|
|
|
List<String> idls = proEconPowerstationInfoDay5Service.list().stream()
|
|
|
- .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(recordDate))==0
|
|
|
+ .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(recordDate)) == 0
|
|
|
// && CacheContext.wpmap.containsKey(i.getWindpowerstationId())
|
|
|
&& i.getLocation().equals(Location.cp.getValue())).map(ProEconPowerstationInfoDay5::getId)
|
|
|
.collect(Collectors.toList());
|
|
@@ -230,21 +213,20 @@ public class WindPowerInfo5Service {
|
|
|
proEconPowerstationInfoDay5Service.removeByIds(idls);
|
|
|
|
|
|
}
|
|
|
- for(Map.Entry<String, Map<String, List<ProEconPowerstationInfoDay5>>> entry:cpmap.entrySet()){
|
|
|
- Map<String, List<ProEconPowerstationInfoDay5>> map=entry.getValue();
|
|
|
- List<ProEconPowerstationInfoDay5> qbls=map.get("qb");
|
|
|
- List<ProEconPowerstationInfoDay5> gfls=map.get("fd");
|
|
|
- List<ProEconPowerstationInfoDay5> fdls=map.get("gf");
|
|
|
+ for (Map.Entry<String, Map<String, List<ProEconPowerstationInfoDay5>>> entry : cpmap.entrySet()) {
|
|
|
+ Map<String, List<ProEconPowerstationInfoDay5>> map = entry.getValue();
|
|
|
+ List<ProEconPowerstationInfoDay5> qbls = map.get("qb");
|
|
|
+ List<ProEconPowerstationInfoDay5> fdls = map.get("fd");
|
|
|
+ List<ProEconPowerstationInfoDay5> gfls = map.get("gf");
|
|
|
// if(CacheContext.cpwpmap.size()==qbls.size())
|
|
|
// {
|
|
|
|
|
|
- ProEconPowerstationInfoDay5 qb=new ProEconPowerstationInfoDay5();
|
|
|
- ProEconPowerstationInfoDay5 fd=new ProEconPowerstationInfoDay5();
|
|
|
- ProEconPowerstationInfoDay5 gf=new ProEconPowerstationInfoDay5();
|
|
|
+ ProEconPowerstationInfoDay5 qb = new ProEconPowerstationInfoDay5();
|
|
|
+ ProEconPowerstationInfoDay5 fd = new ProEconPowerstationInfoDay5();
|
|
|
+ ProEconPowerstationInfoDay5 gf = new ProEconPowerstationInfoDay5();
|
|
|
|
|
|
- if(CacheContext.cpmap.containsKey(entry.getKey()))
|
|
|
- {
|
|
|
- ProBasicCompany cp=CacheContext.cpmap.get(entry.getKey());
|
|
|
+ if (CacheContext.cpmap.containsKey(entry.getKey())) {
|
|
|
+ ProBasicCompany cp = CacheContext.cpmap.get(entry.getKey());
|
|
|
gf.setRegionId(cp.getRegionId());
|
|
|
gf.setCompanyId(cp.getId());
|
|
|
gf.setRecordDate(DateUtils.truncate(recordDate));
|
|
@@ -252,7 +234,6 @@ public class WindPowerInfo5Service {
|
|
|
gf.setLocation(Location.cp.getValue());
|
|
|
|
|
|
|
|
|
-
|
|
|
fd.setRegionId(cp.getRegionId());
|
|
|
fd.setCompanyId(cp.getId());
|
|
|
fd.setRecordDate(DateUtils.truncate(recordDate));
|
|
@@ -265,12 +246,16 @@ public class WindPowerInfo5Service {
|
|
|
qb.setForeignKeyId("0");
|
|
|
qb.setLocation(Location.cp.getValue());
|
|
|
|
|
|
+ Initial.initial(qb);
|
|
|
+ Initial.initial(fd);
|
|
|
+ Initial.initial(gf);
|
|
|
+
|
|
|
//计算公司级全部场站
|
|
|
- calCp(qb,qbls);
|
|
|
+ calCp(qb, qbls);
|
|
|
//计算公司级风电场站
|
|
|
- calCp(fd,fdls);
|
|
|
+ calCp(fd, fdls);
|
|
|
//计算公司级光电场站
|
|
|
- calCp(gf,gfls);
|
|
|
+ calCp(gf, gfls);
|
|
|
|
|
|
proEconPowerstationInfoDay5Service.save(qb);
|
|
|
proEconPowerstationInfoDay5Service.save(fd);
|
|
@@ -285,71 +270,66 @@ public class WindPowerInfo5Service {
|
|
|
// }
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
- private void calCp(ProEconPowerstationInfoDay5 pewp,List<ProEconPowerstationInfoDay5> ls) {
|
|
|
+ private void calCp(ProEconPowerstationInfoDay5 pewp, List<ProEconPowerstationInfoDay5> ls) {
|
|
|
|
|
|
- if(!ls.isEmpty())
|
|
|
- {
|
|
|
+ if (!ls.isEmpty()) {
|
|
|
|
|
|
|
|
|
-
|
|
|
- for(ProEconPowerstationInfoDay5 pepid:ls)
|
|
|
- {
|
|
|
+ for (ProEconPowerstationInfoDay5 pepid : ls) {
|
|
|
//日发电量(升压站)
|
|
|
- pewp.setRfdldb(StringUtils.round(pewp.getRfdldb()+pepid.getRfdldb(),2));
|
|
|
+ pewp.setRfdldb(StringUtils.round(pewp.getRfdldb() + pepid.getRfdldb(), 2));
|
|
|
//日上网电量
|
|
|
- pewp.setRswdldb(StringUtils.round(pewp.getRswdldb()+pepid.getRswdldb(),2));
|
|
|
+ pewp.setRswdldb(StringUtils.round(pewp.getRswdldb() + pepid.getRswdldb(), 2));
|
|
|
//日工网购网电量
|
|
|
- pewp.setRgwgwdldb(StringUtils.round(pewp.getRgwgwdldb()+pepid.getRgwgwdldb(),2));
|
|
|
+ pewp.setRgwgwdldb(StringUtils.round(pewp.getRgwgwdldb() + pepid.getRgwgwdldb(), 2));
|
|
|
//日农网购网电量
|
|
|
- pewp.setRnwgwdldb(StringUtils.round(pewp.getRnwgwdldb()+pepid.getRnwgwdldb(),2));
|
|
|
+ pewp.setRnwgwdldb(StringUtils.round(pewp.getRnwgwdldb() + pepid.getRnwgwdldb(), 2));
|
|
|
//日综合场用电量(电表)
|
|
|
- pewp.setRzhcydldb(StringUtils.round(pewp.getRzhcydldb()+pepid.getRzhcydldb(),2));
|
|
|
+ pewp.setRzhcydldb(StringUtils.round(pewp.getRzhcydldb() + pepid.getRzhcydldb(), 2));
|
|
|
//日厂用电量
|
|
|
- pewp.setRfdcydldb(StringUtils.round(pewp.getRfdcydldb()+pepid.getRfdcydldb(),2));
|
|
|
+ pewp.setRfdcydldb(StringUtils.round(pewp.getRfdcydldb() + pepid.getRfdcydldb(), 2));
|
|
|
|
|
|
//月发电量(升压站)
|
|
|
- pewp.setYfdldb(StringUtils.round(pewp.getYfdldb()+pepid.getYfdldb(),2));
|
|
|
+ pewp.setYfdldb(StringUtils.round(pewp.getYfdldb() + pepid.getYfdldb(), 2));
|
|
|
//月上网电量
|
|
|
- pewp.setYswdldb(StringUtils.round(pewp.getYswdldb()+pepid.getYswdldb(),2));
|
|
|
+ pewp.setYswdldb(StringUtils.round(pewp.getYswdldb() + pepid.getYswdldb(), 2));
|
|
|
//月工网购网电量
|
|
|
- pewp.setYgwgwdldb(StringUtils.round(pewp.getYgwgwdldb()+pepid.getYgwgwdldb(),2));
|
|
|
+ pewp.setYgwgwdldb(StringUtils.round(pewp.getYgwgwdldb() + pepid.getYgwgwdldb(), 2));
|
|
|
//月农网购网电量
|
|
|
- pewp.setYnwgwdldb(StringUtils.round(pewp.getYnwgwdldb()+pepid.getYnwgwdldb(),2));
|
|
|
+ pewp.setYnwgwdldb(StringUtils.round(pewp.getYnwgwdldb() + pepid.getYnwgwdldb(), 2));
|
|
|
//月综合场用电量(电表)
|
|
|
- pewp.setYzhcydldb(StringUtils.round(pewp.getYzhcydldb()+pepid.getYzhcydldb(),2));
|
|
|
+ pewp.setYzhcydldb(StringUtils.round(pewp.getYzhcydldb() + pepid.getYzhcydldb(), 2));
|
|
|
//月厂用电量
|
|
|
- pewp.setYfdcydldb(StringUtils.round(pewp.getYfdcydldb()+pepid.getYfdcydldb(),2));
|
|
|
+ pewp.setYfdcydldb(StringUtils.round(pewp.getYfdcydldb() + pepid.getYfdcydldb(), 2));
|
|
|
|
|
|
//年发电量(升压站)
|
|
|
- pewp.setNfdldb(StringUtils.round(pewp.getNfdldb()+pepid.getNfdldb(),2));
|
|
|
+ pewp.setNfdldb(StringUtils.round(pewp.getNfdldb() + pepid.getNfdldb(), 2));
|
|
|
//年上网电量
|
|
|
- pewp.setNswdldb(StringUtils.round(pewp.getNswdldb()+pepid.getNswdldb(),2));
|
|
|
+ pewp.setNswdldb(StringUtils.round(pewp.getNswdldb() + pepid.getNswdldb(), 2));
|
|
|
//年工网购网电量
|
|
|
- pewp.setNgwgwdldb(StringUtils.round(pewp.getNgwgwdldb()+pepid.getNgwgwdldb(),2));
|
|
|
+ pewp.setNgwgwdldb(StringUtils.round(pewp.getNgwgwdldb() + pepid.getNgwgwdldb(), 2));
|
|
|
//年农网购网电量
|
|
|
- pewp.setNnwgwdldb(StringUtils.round(pewp.getNnwgwdldb()+pepid.getNnwgwdldb(),2));
|
|
|
+ pewp.setNnwgwdldb(StringUtils.round(pewp.getNnwgwdldb() + pepid.getNnwgwdldb(), 2));
|
|
|
//年综合场用电量(电表)
|
|
|
- pewp.setNzhcydldb(StringUtils.round(pewp.getNzhcydldb()+pepid.getNzhcydldb(),2));
|
|
|
+ pewp.setNzhcydldb(StringUtils.round(pewp.getNzhcydldb() + pepid.getNzhcydldb(), 2));
|
|
|
//年厂用电量
|
|
|
- pewp.setNfdcydldb(StringUtils.round(pewp.getNfdcydldb()+pepid.getNfdcydldb(),2));
|
|
|
+ pewp.setNfdcydldb(StringUtils.round(pewp.getNfdcydldb() + pepid.getNfdcydldb(), 2));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 计算场站日信息
|
|
|
*/
|
|
|
public void calWindpowerInfoDay(Date recordDate) throws Exception {
|
|
|
- Calendar c=Calendar.getInstance();
|
|
|
+ Calendar c = Calendar.getInstance();
|
|
|
c.setTime(recordDate);
|
|
|
|
|
|
// Date end=c.getTime();
|
|
@@ -362,7 +342,7 @@ public class WindPowerInfo5Service {
|
|
|
|
|
|
//判断是否有重复记录,先删除重复记录
|
|
|
List<String> idls = proEconPowerstationInfoDay5Service.list().stream()
|
|
|
- .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(recordDate))==0
|
|
|
+ .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(recordDate)) == 0
|
|
|
&& CacheContext.wpmap.containsKey(i.getWindpowerstationId())
|
|
|
&& i.getLocation().equals(Location.wp.getValue())).map(ProEconPowerstationInfoDay5::getId)
|
|
|
.collect(Collectors.toList());
|
|
@@ -372,13 +352,11 @@ public class WindPowerInfo5Service {
|
|
|
proEconPowerstationInfoDay5Service.removeByIds(idls);
|
|
|
|
|
|
}
|
|
|
- for(ProBasicPowerstation wp:CacheContext.wpls)
|
|
|
- {
|
|
|
- if(CacheContext.wppointmap.containsKey(wp.getId()))
|
|
|
- {
|
|
|
- Map<String, ProBasicPowerstationPoint> pointmap=CacheContext.wppointmap.get(wp.getId());
|
|
|
+ for (ProBasicPowerstation wp : CacheContext.wpls) {
|
|
|
+ if (CacheContext.wppointmap.containsKey(wp.getId())) {
|
|
|
+ Map<String, ProBasicPowerstationPoint> pointmap = CacheContext.wppointmap.get(wp.getId());
|
|
|
|
|
|
- ProEconPowerstationInfoDay5 pewp=new ProEconPowerstationInfoDay5();
|
|
|
+ ProEconPowerstationInfoDay5 pewp = new ProEconPowerstationInfoDay5();
|
|
|
Initial.initial(pewp);
|
|
|
pewp.setRegionId(wp.getRegionId());
|
|
|
pewp.setCompanyId(wp.getCompanyId());
|
|
@@ -400,7 +378,7 @@ public class WindPowerInfo5Service {
|
|
|
// && i.getLocation().equals(Location.wp.getValue()))
|
|
|
// .collect(Collectors.toList());
|
|
|
// }
|
|
|
- extracted(recordDate, pointmap, pewp);
|
|
|
+ extracted(recordDate, pointmap, pewp);
|
|
|
//*******************************************年信息统计*********************************************************/
|
|
|
// wpinfodayls.add(pewp);
|
|
|
proEconPowerstationInfoDay5Service.save(pewp);
|
|
@@ -416,7 +394,7 @@ public class WindPowerInfo5Service {
|
|
|
* 计算项目日信息
|
|
|
*/
|
|
|
public void calProjectInfoDay(Date recordDate) throws Exception {
|
|
|
- Calendar c=Calendar.getInstance();
|
|
|
+ Calendar c = Calendar.getInstance();
|
|
|
c.setTime(recordDate);
|
|
|
|
|
|
// Date end=c.getTime();
|
|
@@ -425,7 +403,7 @@ public class WindPowerInfo5Service {
|
|
|
|
|
|
//判断是否有重复记录,先删除重复记录
|
|
|
List<String> idls = proEconPowerstationInfoDay5Service.list().stream()
|
|
|
- .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(recordDate))==0
|
|
|
+ .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(recordDate)) == 0
|
|
|
&& CacheContext.pjmap.containsKey(i.getProjectId())
|
|
|
&& i.getLocation().equals(Location.pj.getValue())).map(ProEconPowerstationInfoDay5::getId)
|
|
|
.collect(Collectors.toList());
|
|
@@ -435,13 +413,16 @@ public class WindPowerInfo5Service {
|
|
|
proEconPowerstationInfoDay5Service.removeByIds(idls);
|
|
|
|
|
|
}
|
|
|
- for(ProBasicProject pj:CacheContext.pjls)
|
|
|
- {
|
|
|
- if(CacheContext.wppointmap.containsKey(pj.getId()))
|
|
|
- {
|
|
|
- Map<String, ProBasicPowerstationPoint> pointmap=CacheContext.wppointmap.get(pj.getId());
|
|
|
-
|
|
|
- ProEconPowerstationInfoDay5 pewp=new ProEconPowerstationInfoDay5();
|
|
|
+ for (ProBasicProject pj : CacheContext.pjls) {
|
|
|
+ if (CacheContext.propointmap.containsKey(pj.getId())) {
|
|
|
+ Map<String, ProBasicPowerstationPoint> pointmap = CacheContext.propointmap.get(pj.getId());
|
|
|
+
|
|
|
+ ProEconPowerstationInfoDay5 pewp = new ProEconPowerstationInfoDay5();
|
|
|
+ if (CacheContext.wpmap.containsKey(pj.getWindpowerstationId())) {
|
|
|
+ ProBasicPowerstation wp = CacheContext.wpmap.get(pj.getWindpowerstationId());
|
|
|
+ pewp.setRegionId(wp.getRegionId());
|
|
|
+ pewp.setCompanyId(wp.getCompanyId());
|
|
|
+ }
|
|
|
Initial.initial(pewp);
|
|
|
pewp.setForeignKeyId("0");
|
|
|
pewp.setWindpowerstationId(pj.getWindpowerstationId());
|
|
@@ -473,11 +454,12 @@ public class WindPowerInfo5Service {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 计算线路日信息
|
|
|
*/
|
|
|
public void calLineInfoDay(Date recordDate) throws Exception {
|
|
|
- Calendar c=Calendar.getInstance();
|
|
|
+ Calendar c = Calendar.getInstance();
|
|
|
c.setTime(recordDate);
|
|
|
|
|
|
// Date end=c.getTime();
|
|
@@ -486,9 +468,9 @@ public class WindPowerInfo5Service {
|
|
|
|
|
|
//判断是否有重复记录,先删除重复记录
|
|
|
List<String> idls = proEconPowerstationInfoDay5Service.list().stream()
|
|
|
- .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(recordDate))==0
|
|
|
+ .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(recordDate)) == 0
|
|
|
&& CacheContext.lnmap.containsKey(i.getLineId())
|
|
|
- && i.getLocation().equals(Location.ln.getValue()) ).map(ProEconPowerstationInfoDay5::getId)
|
|
|
+ && i.getLocation().equals(Location.ln.getValue())).map(ProEconPowerstationInfoDay5::getId)
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
if (idls.size() > 0) {
|
|
@@ -496,13 +478,21 @@ public class WindPowerInfo5Service {
|
|
|
proEconPowerstationInfoDay5Service.removeByIds(idls);
|
|
|
|
|
|
}
|
|
|
- for(ProBasicLine ln:CacheContext.lnls)
|
|
|
- {
|
|
|
- if(CacheContext.wppointmap.containsKey(ln.getId()))
|
|
|
- {
|
|
|
- Map<String, ProBasicPowerstationPoint> pointmap=CacheContext.wppointmap.get(ln.getId());
|
|
|
+ for (ProBasicLine ln : CacheContext.lnls) {
|
|
|
+ if (CacheContext.linepointmap.containsKey(ln.getId())) {
|
|
|
+ Map<String, ProBasicPowerstationPoint> pointmap = CacheContext.linepointmap.get(ln.getId());
|
|
|
+
|
|
|
+ ProEconPowerstationInfoDay5 pewp = new ProEconPowerstationInfoDay5();
|
|
|
+ if (CacheContext.pjmap.containsKey(ln.getProjectId())) {
|
|
|
+ ProBasicProject pj = CacheContext.pjmap.get(ln.getProjectId());
|
|
|
+ if (CacheContext.wpmap.containsKey(pj.getWindpowerstationId())) {
|
|
|
+ ProBasicPowerstation wp = CacheContext.wpmap.get(pj.getWindpowerstationId());
|
|
|
+ pewp.setRegionId(wp.getRegionId());
|
|
|
+ pewp.setCompanyId(wp.getCompanyId());
|
|
|
+ pewp.setWindpowerstationId(wp.getId());
|
|
|
+ }
|
|
|
|
|
|
- ProEconPowerstationInfoDay5 pewp=new ProEconPowerstationInfoDay5();
|
|
|
+ }
|
|
|
Initial.initial(pewp);
|
|
|
pewp.setForeignKeyId("0");
|
|
|
pewp.setLineId(ln.getId());
|
|
@@ -523,7 +513,7 @@ public class WindPowerInfo5Service {
|
|
|
// && i.getLocation().equals(Location.ln.getValue()))
|
|
|
// .collect(Collectors.toList());
|
|
|
// }
|
|
|
- extracted(recordDate, pointmap, pewp);
|
|
|
+ extracted(recordDate, pointmap, pewp);
|
|
|
|
|
|
proEconPowerstationInfoDay5Service.save(pewp);
|
|
|
|
|
@@ -534,154 +524,134 @@ public class WindPowerInfo5Service {
|
|
|
|
|
|
}
|
|
|
|
|
|
- private void extracted(Date recordDate, Map<String, ProBasicPowerstationPoint> pointmap, ProEconPowerstationInfoDay5 pewp) throws Exception {
|
|
|
+ private void extracted(Date recordDate, Map<String, ProBasicPowerstationPoint> pointmap, ProEconPowerstationInfoDay5 pewp) throws Exception {
|
|
|
//*******************************************日信息统计*********************************************************/
|
|
|
|
|
|
- double rfdlsyz=0.0;
|
|
|
- double rswdlsyz=0.0;
|
|
|
- double rgwgwdlsyz=0.0;
|
|
|
- double rnwgwdlsyz=0.0;
|
|
|
- if(pointmap.containsKey(ContantXk.RFDLSYZ))
|
|
|
- {
|
|
|
- ProBasicPowerstationPoint point=pointmap.get(ContantXk.RFDLSYZ);
|
|
|
- PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
|
|
|
- if(StringUtils.notEmp(pointValue))
|
|
|
- {
|
|
|
- //日发电量(升压站)
|
|
|
- rfdlsyz=StringUtils.round(pointValue.getPointValueInDouble(),2);
|
|
|
- pewp.setRfdldb(rfdlsyz);
|
|
|
+ double rfdlsyz = 0.0;
|
|
|
+ double rswdlsyz = 0.0;
|
|
|
+ double rgwgwdlsyz = 0.0;
|
|
|
+ double rnwgwdlsyz = 0.0;
|
|
|
+ if (pointmap.containsKey(ContantXk.RFDLSYZ)) {
|
|
|
+ ProBasicPowerstationPoint point = pointmap.get(ContantXk.RFDLSYZ);
|
|
|
+ PointData pointValue = edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime() / 1000);
|
|
|
+ if (StringUtils.notEmp(pointValue)) {
|
|
|
+ //日发电量(升压站)
|
|
|
+ rfdlsyz = StringUtils.round(pointValue.getPointValueInDouble(), 2);
|
|
|
+ pewp.setRfdldb(rfdlsyz);
|
|
|
|
|
|
- }
|
|
|
- }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- if(pointmap.containsKey(ContantXk.RSWDL))
|
|
|
- {
|
|
|
- ProBasicPowerstationPoint point=pointmap.get(ContantXk.RSWDL);
|
|
|
- PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
|
|
|
- if(StringUtils.notEmp(pointValue))
|
|
|
- {
|
|
|
- //日上网电量
|
|
|
- rswdlsyz=StringUtils.round(pointValue.getPointValueInDouble(),2);
|
|
|
- pewp.setRswdldb(rswdlsyz);
|
|
|
+ if (pointmap.containsKey(ContantXk.RSWDL)) {
|
|
|
+ ProBasicPowerstationPoint point = pointmap.get(ContantXk.RSWDL);
|
|
|
+ PointData pointValue = edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime() / 1000);
|
|
|
+ if (StringUtils.notEmp(pointValue)) {
|
|
|
+ //日上网电量
|
|
|
+ rswdlsyz = StringUtils.round(pointValue.getPointValueInDouble(), 2);
|
|
|
+ pewp.setRswdldb(rswdlsyz);
|
|
|
|
|
|
- }
|
|
|
- }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- if(pointmap.containsKey(ContantXk.RGWGWDL))
|
|
|
- {
|
|
|
- ProBasicPowerstationPoint point=pointmap.get(ContantXk.RGWGWDL);
|
|
|
- PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
|
|
|
- if(StringUtils.notEmp(pointValue))
|
|
|
- {
|
|
|
- //日工网购网电量
|
|
|
- rgwgwdlsyz=StringUtils.round(pointValue.getPointValueInDouble(),2);
|
|
|
- pewp.setRgwgwdldb(rgwgwdlsyz);
|
|
|
+ if (pointmap.containsKey(ContantXk.RGWGWDL)) {
|
|
|
+ ProBasicPowerstationPoint point = pointmap.get(ContantXk.RGWGWDL);
|
|
|
+ PointData pointValue = edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime() / 1000);
|
|
|
+ if (StringUtils.notEmp(pointValue)) {
|
|
|
+ //日工网购网电量
|
|
|
+ rgwgwdlsyz = StringUtils.round(pointValue.getPointValueInDouble(), 2);
|
|
|
+ pewp.setRgwgwdldb(rgwgwdlsyz);
|
|
|
|
|
|
- }
|
|
|
- }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- if(pointmap.containsKey(ContantXk.RNWGWDL))
|
|
|
- {
|
|
|
- ProBasicPowerstationPoint point=pointmap.get(ContantXk.RNWGWDL);
|
|
|
- PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
|
|
|
- if(StringUtils.notEmp(pointValue))
|
|
|
- {
|
|
|
- //日农网购网电量
|
|
|
- rnwgwdlsyz=StringUtils.round(pointValue.getPointValueInDouble(),2);
|
|
|
- pewp.setRnwgwdldb(rnwgwdlsyz);
|
|
|
+ if (pointmap.containsKey(ContantXk.RNWGWDL)) {
|
|
|
+ ProBasicPowerstationPoint point = pointmap.get(ContantXk.RNWGWDL);
|
|
|
+ PointData pointValue = edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime() / 1000);
|
|
|
+ if (StringUtils.notEmp(pointValue)) {
|
|
|
+ //日农网购网电量
|
|
|
+ rnwgwdlsyz = StringUtils.round(pointValue.getPointValueInDouble(), 2);
|
|
|
+ pewp.setRnwgwdldb(rnwgwdlsyz);
|
|
|
|
|
|
- }
|
|
|
- }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- //日综合场用电量(电表)
|
|
|
- pewp.setRzhcydldb(StringUtils.round(rfdlsyz-rswdlsyz+rgwgwdlsyz+rnwgwdlsyz,2));
|
|
|
+ //日综合场用电量(电表)
|
|
|
+ pewp.setRzhcydldb(StringUtils.round(rfdlsyz - rswdlsyz + rgwgwdlsyz + rnwgwdlsyz, 2));
|
|
|
|
|
|
|
|
|
- if(pointmap.containsKey(ContantXk.RCYDL))
|
|
|
- {
|
|
|
- ProBasicPowerstationPoint point=pointmap.get(ContantXk.RCYDL);
|
|
|
- PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
|
|
|
- if(StringUtils.notEmp(pointValue))
|
|
|
- {
|
|
|
- //日厂用电量
|
|
|
- pewp.setRfdcydldb(StringUtils.round(pointValue.getPointValueInDouble(),2));
|
|
|
+ if (pointmap.containsKey(ContantXk.RCYDL)) {
|
|
|
+ ProBasicPowerstationPoint point = pointmap.get(ContantXk.RCYDL);
|
|
|
+ PointData pointValue = edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime() / 1000);
|
|
|
+ if (StringUtils.notEmp(pointValue)) {
|
|
|
+ //日厂用电量
|
|
|
+ pewp.setRfdcydldb(StringUtils.round(pointValue.getPointValueInDouble(), 2));
|
|
|
|
|
|
- }
|
|
|
- }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
|
|
|
//*******************************************日信息统计*********************************************************/
|
|
|
|
|
|
//*******************************************月信息统计*********************************************************/
|
|
|
|
|
|
- double yfdlsyz=0.0;
|
|
|
- double yswdlsyz=0.0;
|
|
|
- double ygwgwdlsyz=0.0;
|
|
|
- double ynwgwdlsyz=0.0;
|
|
|
- if(pointmap.containsKey(ContantXk.YFDLSYZ))
|
|
|
- {
|
|
|
- ProBasicPowerstationPoint point=pointmap.get(ContantXk.YFDLSYZ);
|
|
|
- PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
|
|
|
- if(StringUtils.notEmp(pointValue))
|
|
|
- {
|
|
|
+ double yfdlsyz = 0.0;
|
|
|
+ double yswdlsyz = 0.0;
|
|
|
+ double ygwgwdlsyz = 0.0;
|
|
|
+ double ynwgwdlsyz = 0.0;
|
|
|
+ if (pointmap.containsKey(ContantXk.YFDLSYZ)) {
|
|
|
+ ProBasicPowerstationPoint point = pointmap.get(ContantXk.YFDLSYZ);
|
|
|
+ PointData pointValue = edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime() / 1000);
|
|
|
+ if (StringUtils.notEmp(pointValue)) {
|
|
|
//月发电量(升压站)
|
|
|
- yfdlsyz=StringUtils.round(pointValue.getPointValueInDouble(),2);
|
|
|
+ yfdlsyz = StringUtils.round(pointValue.getPointValueInDouble(), 2);
|
|
|
pewp.setYfdldb(yfdlsyz);
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(pointmap.containsKey(ContantXk.YSWDL))
|
|
|
- {
|
|
|
- ProBasicPowerstationPoint point=pointmap.get(ContantXk.YSWDL);
|
|
|
- PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
|
|
|
- if(StringUtils.notEmp(pointValue))
|
|
|
- {
|
|
|
+ if (pointmap.containsKey(ContantXk.YSWDL)) {
|
|
|
+ ProBasicPowerstationPoint point = pointmap.get(ContantXk.YSWDL);
|
|
|
+ PointData pointValue = edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime() / 1000);
|
|
|
+ if (StringUtils.notEmp(pointValue)) {
|
|
|
//月上网电量
|
|
|
- yswdlsyz=StringUtils.round(pointValue.getPointValueInDouble(),2);
|
|
|
+ yswdlsyz = StringUtils.round(pointValue.getPointValueInDouble(), 2);
|
|
|
pewp.setYswdldb(yswdlsyz);
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(pointmap.containsKey(ContantXk.YGWGWDL))
|
|
|
- {
|
|
|
- ProBasicPowerstationPoint point=pointmap.get(ContantXk.YGWGWDL);
|
|
|
- PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
|
|
|
- if(StringUtils.notEmp(pointValue))
|
|
|
- {
|
|
|
+ if (pointmap.containsKey(ContantXk.YGWGWDL)) {
|
|
|
+ ProBasicPowerstationPoint point = pointmap.get(ContantXk.YGWGWDL);
|
|
|
+ PointData pointValue = edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime() / 1000);
|
|
|
+ if (StringUtils.notEmp(pointValue)) {
|
|
|
//月工网购网电量
|
|
|
- ygwgwdlsyz=StringUtils.round(pointValue.getPointValueInDouble(),2);
|
|
|
+ ygwgwdlsyz = StringUtils.round(pointValue.getPointValueInDouble(), 2);
|
|
|
pewp.setYgwgwdldb(ygwgwdlsyz);
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(pointmap.containsKey(ContantXk.YNWGWDL))
|
|
|
- {
|
|
|
- ProBasicPowerstationPoint point=pointmap.get(ContantXk.YNWGWDL);
|
|
|
- PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
|
|
|
- if(StringUtils.notEmp(pointValue))
|
|
|
- {
|
|
|
+ if (pointmap.containsKey(ContantXk.YNWGWDL)) {
|
|
|
+ ProBasicPowerstationPoint point = pointmap.get(ContantXk.YNWGWDL);
|
|
|
+ PointData pointValue = edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime() / 1000);
|
|
|
+ if (StringUtils.notEmp(pointValue)) {
|
|
|
//月农网购网电量
|
|
|
- ynwgwdlsyz=StringUtils.round(pointValue.getPointValueInDouble(),2);
|
|
|
+ ynwgwdlsyz = StringUtils.round(pointValue.getPointValueInDouble(), 2);
|
|
|
pewp.setYnwgwdldb(ynwgwdlsyz);
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//月综合场用电量(电表)
|
|
|
- pewp.setYzhcydldb(StringUtils.round(yfdlsyz-yswdlsyz+ygwgwdlsyz+ynwgwdlsyz,2));
|
|
|
+ pewp.setYzhcydldb(StringUtils.round(yfdlsyz - yswdlsyz + ygwgwdlsyz + ynwgwdlsyz, 2));
|
|
|
|
|
|
|
|
|
- if(pointmap.containsKey(ContantXk.YCYDL))
|
|
|
- {
|
|
|
- ProBasicPowerstationPoint point=pointmap.get(ContantXk.YCYDL);
|
|
|
- PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
|
|
|
- if(StringUtils.notEmp(pointValue))
|
|
|
- {
|
|
|
+ if (pointmap.containsKey(ContantXk.YCYDL)) {
|
|
|
+ ProBasicPowerstationPoint point = pointmap.get(ContantXk.YCYDL);
|
|
|
+ PointData pointValue = edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime() / 1000);
|
|
|
+ if (StringUtils.notEmp(pointValue)) {
|
|
|
//月厂用电量
|
|
|
- pewp.setYfdcydldb(StringUtils.round(pointValue.getPointValueInDouble(),2));
|
|
|
+ pewp.setYfdcydldb(StringUtils.round(pointValue.getPointValueInDouble(), 2));
|
|
|
|
|
|
}
|
|
|
}
|
|
@@ -690,82 +660,70 @@ public class WindPowerInfo5Service {
|
|
|
//*******************************************月信息统计*********************************************************/
|
|
|
|
|
|
//*******************************************年信息统计*********************************************************/
|
|
|
- double nfdlsyz=0.0;
|
|
|
- double nswdlsyz=0.0;
|
|
|
- double ngwgwdlsyz=0.0;
|
|
|
- double nnwgwdlsyz=0.0;
|
|
|
- if(pointmap.containsKey(ContantXk.NFDLSYZ))
|
|
|
- {
|
|
|
- ProBasicPowerstationPoint point=pointmap.get(ContantXk.NFDLSYZ);
|
|
|
- PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
|
|
|
- if(StringUtils.notEmp(pointValue))
|
|
|
- {
|
|
|
+ double nfdlsyz = 0.0;
|
|
|
+ double nswdlsyz = 0.0;
|
|
|
+ double ngwgwdlsyz = 0.0;
|
|
|
+ double nnwgwdlsyz = 0.0;
|
|
|
+ if (pointmap.containsKey(ContantXk.NFDLSYZ)) {
|
|
|
+ ProBasicPowerstationPoint point = pointmap.get(ContantXk.NFDLSYZ);
|
|
|
+ PointData pointValue = edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime() / 1000);
|
|
|
+ if (StringUtils.notEmp(pointValue)) {
|
|
|
//年发电量(升压站)
|
|
|
- nfdlsyz=StringUtils.round(pointValue.getPointValueInDouble(),2);
|
|
|
+ nfdlsyz = StringUtils.round(pointValue.getPointValueInDouble(), 2);
|
|
|
pewp.setNfdldb(nfdlsyz);
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(pointmap.containsKey(ContantXk.NSWDL))
|
|
|
- {
|
|
|
- ProBasicPowerstationPoint point=pointmap.get(ContantXk.NSWDL);
|
|
|
- PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
|
|
|
- if(StringUtils.notEmp(pointValue))
|
|
|
- {
|
|
|
+ if (pointmap.containsKey(ContantXk.NSWDL)) {
|
|
|
+ ProBasicPowerstationPoint point = pointmap.get(ContantXk.NSWDL);
|
|
|
+ PointData pointValue = edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime() / 1000);
|
|
|
+ if (StringUtils.notEmp(pointValue)) {
|
|
|
//年上网电量
|
|
|
- nswdlsyz=StringUtils.round(pointValue.getPointValueInDouble(),2);
|
|
|
+ nswdlsyz = StringUtils.round(pointValue.getPointValueInDouble(), 2);
|
|
|
pewp.setNswdldb(nswdlsyz);
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(pointmap.containsKey(ContantXk.NGWGWDL))
|
|
|
- {
|
|
|
- ProBasicPowerstationPoint point=pointmap.get(ContantXk.NGWGWDL);
|
|
|
- PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
|
|
|
- if(StringUtils.notEmp(pointValue))
|
|
|
- {
|
|
|
+ if (pointmap.containsKey(ContantXk.NGWGWDL)) {
|
|
|
+ ProBasicPowerstationPoint point = pointmap.get(ContantXk.NGWGWDL);
|
|
|
+ PointData pointValue = edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime() / 1000);
|
|
|
+ if (StringUtils.notEmp(pointValue)) {
|
|
|
//年工网购网电量
|
|
|
- ngwgwdlsyz=StringUtils.round(pointValue.getPointValueInDouble(),2);
|
|
|
+ ngwgwdlsyz = StringUtils.round(pointValue.getPointValueInDouble(), 2);
|
|
|
pewp.setNgwgwdldb(ngwgwdlsyz);
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(pointmap.containsKey(ContantXk.NNWGWDL))
|
|
|
- {
|
|
|
- ProBasicPowerstationPoint point=pointmap.get(ContantXk.NNWGWDL);
|
|
|
- PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
|
|
|
- if(StringUtils.notEmp(pointValue))
|
|
|
- {
|
|
|
+ if (pointmap.containsKey(ContantXk.NNWGWDL)) {
|
|
|
+ ProBasicPowerstationPoint point = pointmap.get(ContantXk.NNWGWDL);
|
|
|
+ PointData pointValue = edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime() / 1000);
|
|
|
+ if (StringUtils.notEmp(pointValue)) {
|
|
|
//年农网购网电量
|
|
|
- nnwgwdlsyz=StringUtils.round(pointValue.getPointValueInDouble(),2);
|
|
|
+ nnwgwdlsyz = StringUtils.round(pointValue.getPointValueInDouble(), 2);
|
|
|
pewp.setNnwgwdldb(nnwgwdlsyz);
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//年综合场用电量(电表)
|
|
|
- pewp.setNzhcydldb(StringUtils.round(nfdlsyz-nswdlsyz+ngwgwdlsyz+nnwgwdlsyz,2));
|
|
|
+ pewp.setNzhcydldb(StringUtils.round(nfdlsyz - nswdlsyz + ngwgwdlsyz + nnwgwdlsyz, 2));
|
|
|
|
|
|
|
|
|
- if(pointmap.containsKey(ContantXk.NCYDL))
|
|
|
- {
|
|
|
- ProBasicPowerstationPoint point=pointmap.get(ContantXk.NCYDL);
|
|
|
- PointData pointValue=edosUtil.getHistMatrix(point.getNemCode(),recordDate.getTime()/1000);
|
|
|
- if(StringUtils.notEmp(pointValue))
|
|
|
- {
|
|
|
+ if (pointmap.containsKey(ContantXk.NCYDL)) {
|
|
|
+ ProBasicPowerstationPoint point = pointmap.get(ContantXk.NCYDL);
|
|
|
+ PointData pointValue = edosUtil.getHistMatrix(point.getNemCode(), recordDate.getTime() / 1000);
|
|
|
+ if (StringUtils.notEmp(pointValue)) {
|
|
|
//年厂用电量
|
|
|
- pewp.setNfdcydldb(StringUtils.round(pointValue.getPointValueInDouble(),2));
|
|
|
+ pewp.setNfdcydldb(StringUtils.round(pointValue.getPointValueInDouble(), 2));
|
|
|
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|