|
@@ -51,6 +51,7 @@ public class ElectricityMeteringService {
|
|
|
Date yearFirstZero = DateUtils.getYearFirstZero();
|
|
|
Date currentDate = DateUtils.getCurrentDate();
|
|
|
Date tomorrow = DateUtils.addDays(samedayZero,1);
|
|
|
+ Date date = DateUtils.addSeconds(currentDate, -1);
|
|
|
|
|
|
List<PointData> lineResultList = new ArrayList<>();
|
|
|
lnls.stream().forEach(line->{
|
|
@@ -58,30 +59,30 @@ public class ElectricityMeteringService {
|
|
|
//线路发电量
|
|
|
log.info(line.getName()+"电计量电量计算开始!");
|
|
|
Optional<ProBasicMeterPoint> fdlOptional = meterpoints.stream().filter(me -> me.getLineId().equals(line.getId()) && me.getUniformCode().equals("ZXYG") && me.getMeterType().equals("进线") && me.getMeterSort().equals("主")).findFirst();
|
|
|
- getLineFdl(samedayZero, monthFirstZero, yearFirstZero, currentDate, lineResultList, proBasicWppointMap, fdlOptional);
|
|
|
+ getLineFdl(samedayZero, monthFirstZero, yearFirstZero, date,currentDate, lineResultList, proBasicWppointMap, fdlOptional);
|
|
|
log.info(line.getName()+"电计量电量计算完毕!");
|
|
|
|
|
|
//线路上网电量
|
|
|
log.info(line.getName()+"电计量上网电量计算开始!");
|
|
|
List<PointData> fdlList = new ArrayList<>();
|
|
|
Optional<ProBasicMeterPoint> swdlOptional = meterpoints.stream().filter(me -> me.getUniformCode().equals("ZXYG") && me.getMeterType().equals("出线") && me.getMeterSort().equals("主") && me.getLineId().contains(line.getId())).findFirst();
|
|
|
- getLineOtherFdl(linepointmap, samedayZero, monthFirstZero, yearFirstZero, currentDate, lineResultList, line, proBasicWppointMap, fdlOptional, fdlList, swdlOptional);
|
|
|
+ getLineOtherFdl(linepointmap, samedayZero, monthFirstZero, yearFirstZero, date,currentDate, lineResultList, line, proBasicWppointMap, fdlOptional, fdlList, swdlOptional);
|
|
|
log.info(line.getName()+"电计量上网电量计算完毕!");
|
|
|
//线路购网电量
|
|
|
log.info(line.getName()+"电计量购网电量计算开始!");
|
|
|
Optional<ProBasicMeterPoint> gwdlOptional = meterpoints.stream().filter(me -> me.getUniformCode().equals("FXYG") && me.getMeterType().equals("出线") && me.getMeterSort().equals("主") && me.getLineId().contains(line.getId())).findFirst();
|
|
|
- getLineOtherFdl(linepointmap, samedayZero, monthFirstZero, yearFirstZero, currentDate, lineResultList, line, proBasicWppointMap, fdlOptional, fdlList, gwdlOptional);
|
|
|
+ getLineOtherFdl(linepointmap, samedayZero, monthFirstZero, yearFirstZero, date,currentDate, lineResultList, line, proBasicWppointMap, fdlOptional, fdlList, gwdlOptional);
|
|
|
log.info(line.getName()+"电计量购网电量计算完毕!");
|
|
|
|
|
|
//线路厂用电量
|
|
|
log.info(line.getName()+"电计量厂用电量计算开始!");
|
|
|
Optional<ProBasicMeterPoint> zybOptional = meterpoints.stream().filter(me-> me.getUniformCode().equals("ZXYG") && me.getMeterType().equals("站用变") && me.getMeterSort().equals("主") && me.getLineId().contains(line.getId())).findFirst();
|
|
|
- getLineOtherFdl(linepointmap, samedayZero, monthFirstZero, yearFirstZero, currentDate, lineResultList, line, proBasicWppointMap, fdlOptional, fdlList, zybOptional);
|
|
|
+ getLineOtherFdl(linepointmap, samedayZero, monthFirstZero, yearFirstZero,date, currentDate, lineResultList, line, proBasicWppointMap, fdlOptional, fdlList, zybOptional);
|
|
|
log.info(line.getName()+"电计量厂用电量计算完毕!");
|
|
|
|
|
|
//农网购网电量
|
|
|
log.info(line.getName()+"农网购网电量计算开始!");
|
|
|
- setZero(lineResultList,currentDate,proBasicWppointMap,ContantXk.RNWGWDL,ContantXk.YNWGWDL,ContantXk.NNWGWDL);
|
|
|
+ setZero(lineResultList,date,currentDate,proBasicWppointMap,ContantXk.RNWGWDL,ContantXk.YNWGWDL,ContantXk.NNWGWDL);
|
|
|
log.info(line.getName()+"农网购网电量计算完毕!");
|
|
|
});
|
|
|
//线路存储
|
|
@@ -143,39 +144,39 @@ public class ElectricityMeteringService {
|
|
|
}
|
|
|
});
|
|
|
ProBasicPowerstationPoint rfdlpoint = proBasicWppointMap.get(ContantXk.RFDLSYZ);
|
|
|
- proResultList.add(PointUtil.createPointData(currentDate,rfdl.get(),rfdlpoint.getNemCode(),rfdlpoint.getName()));
|
|
|
+ proResultList.add(PointUtil.createPointData(date,rfdl.get(),rfdlpoint.getNemCode(),rfdlpoint.getName()));
|
|
|
ProBasicPowerstationPoint yfdlpoint = proBasicWppointMap.get(ContantXk.YFDLSYZ);
|
|
|
- proResultList.add(PointUtil.createPointData(currentDate,yfdl.get(),yfdlpoint.getNemCode(),yfdlpoint.getName()));
|
|
|
+ proResultList.add(PointUtil.createPointData(date,yfdl.get(),yfdlpoint.getNemCode(),yfdlpoint.getName()));
|
|
|
ProBasicPowerstationPoint nfdlpoint = proBasicWppointMap.get(ContantXk.YFDLSYZ);
|
|
|
- proResultList.add(PointUtil.createPointData(currentDate,nfdl.get(),yfdlpoint.getNemCode(),nfdlpoint.getName()));
|
|
|
+ proResultList.add(PointUtil.createPointData(date,nfdl.get(),yfdlpoint.getNemCode(),nfdlpoint.getName()));
|
|
|
|
|
|
ProBasicPowerstationPoint rswdlpoint = proBasicWppointMap.get(ContantXk.RSWDL);
|
|
|
- proResultList.add(PointUtil.createPointData(currentDate,rswdl.get(),rswdlpoint.getNemCode(),rswdlpoint.getName()));
|
|
|
+ proResultList.add(PointUtil.createPointData(date,rswdl.get(),rswdlpoint.getNemCode(),rswdlpoint.getName()));
|
|
|
ProBasicPowerstationPoint yswdlpoint = proBasicWppointMap.get(ContantXk.YSWDL);
|
|
|
- proResultList.add(PointUtil.createPointData(currentDate,yswdl.get(),yswdlpoint.getNemCode(),yswdlpoint.getName()));
|
|
|
+ proResultList.add(PointUtil.createPointData(date,yswdl.get(),yswdlpoint.getNemCode(),yswdlpoint.getName()));
|
|
|
ProBasicPowerstationPoint nswdlpoint = proBasicWppointMap.get(ContantXk.NSWDL);
|
|
|
- proResultList.add(PointUtil.createPointData(currentDate,nswdl.get(),nswdlpoint.getNemCode(),nswdlpoint.getName()));
|
|
|
+ proResultList.add(PointUtil.createPointData(date,nswdl.get(),nswdlpoint.getNemCode(),nswdlpoint.getName()));
|
|
|
|
|
|
ProBasicPowerstationPoint rgwgwdlpoint = proBasicWppointMap.get(ContantXk.RGWGWDL);
|
|
|
- proResultList.add(PointUtil.createPointData(currentDate,rgwgwdl.get(),rgwgwdlpoint.getNemCode(),rgwgwdlpoint.getName()));
|
|
|
+ proResultList.add(PointUtil.createPointData(date,rgwgwdl.get(),rgwgwdlpoint.getNemCode(),rgwgwdlpoint.getName()));
|
|
|
ProBasicPowerstationPoint ygwgwdlpoint = proBasicWppointMap.get(ContantXk.YGWGWDL);
|
|
|
- proResultList.add(PointUtil.createPointData(currentDate,ygwgwdl.get(),ygwgwdlpoint.getNemCode(),ygwgwdlpoint.getName()));
|
|
|
+ proResultList.add(PointUtil.createPointData(date,ygwgwdl.get(),ygwgwdlpoint.getNemCode(),ygwgwdlpoint.getName()));
|
|
|
ProBasicPowerstationPoint ngwgwdlpoint = proBasicWppointMap.get(ContantXk.NGWGWDL);
|
|
|
- proResultList.add(PointUtil.createPointData(currentDate,ngwgwdl.get(),ngwgwdlpoint.getNemCode(),ngwgwdlpoint.getName()));
|
|
|
+ proResultList.add(PointUtil.createPointData(date,ngwgwdl.get(),ngwgwdlpoint.getNemCode(),ngwgwdlpoint.getName()));
|
|
|
|
|
|
ProBasicPowerstationPoint rnwgwdlpoint = proBasicWppointMap.get(ContantXk.RNWGWDL);
|
|
|
- proResultList.add(PointUtil.createPointData(currentDate,rnwgwdl.get(),rnwgwdlpoint.getNemCode(),rnwgwdlpoint.getName()));
|
|
|
+ proResultList.add(PointUtil.createPointData(date,rnwgwdl.get(),rnwgwdlpoint.getNemCode(),rnwgwdlpoint.getName()));
|
|
|
ProBasicPowerstationPoint ynwgwdlpoint = proBasicWppointMap.get(ContantXk.YNWGWDL);
|
|
|
- proResultList.add(PointUtil.createPointData(currentDate,ynwgwdl.get(),ynwgwdlpoint.getNemCode(),ynwgwdlpoint.getName()));
|
|
|
+ proResultList.add(PointUtil.createPointData(date,ynwgwdl.get(),ynwgwdlpoint.getNemCode(),ynwgwdlpoint.getName()));
|
|
|
ProBasicPowerstationPoint nnwgwdlpoint = proBasicWppointMap.get(ContantXk.NNWGWDL);
|
|
|
- proResultList.add(PointUtil.createPointData(currentDate,nnwgwdl.get(),nnwgwdlpoint.getNemCode(),nnwgwdlpoint.getName()));
|
|
|
+ proResultList.add(PointUtil.createPointData(date,nnwgwdl.get(),nnwgwdlpoint.getNemCode(),nnwgwdlpoint.getName()));
|
|
|
|
|
|
ProBasicPowerstationPoint rcydlpoint = proBasicWppointMap.get(ContantXk.RCYDL);
|
|
|
- proResultList.add(PointUtil.createPointData(currentDate,rcydl.get(),rcydlpoint.getNemCode(),rcydlpoint.getName()));
|
|
|
+ proResultList.add(PointUtil.createPointData(date,rcydl.get(),rcydlpoint.getNemCode(),rcydlpoint.getName()));
|
|
|
ProBasicPowerstationPoint ycydlpoint = proBasicWppointMap.get(ContantXk.YCYDL);
|
|
|
- proResultList.add(PointUtil.createPointData(currentDate,ycydl.get(),ycydlpoint.getNemCode(),ycydlpoint.getName()));
|
|
|
+ proResultList.add(PointUtil.createPointData(date,ycydl.get(),ycydlpoint.getNemCode(),ycydlpoint.getName()));
|
|
|
ProBasicPowerstationPoint ncydlpoint = proBasicWppointMap.get(ContantXk.NCYDL);
|
|
|
- proResultList.add(PointUtil.createPointData(currentDate,ncydl.get(),ncydlpoint.getNemCode(),ncydlpoint.getName()));
|
|
|
+ proResultList.add(PointUtil.createPointData(date,ncydl.get(),ncydlpoint.getNemCode(),ncydlpoint.getName()));
|
|
|
|
|
|
});
|
|
|
//期次存储
|
|
@@ -237,39 +238,39 @@ public class ElectricityMeteringService {
|
|
|
}
|
|
|
});
|
|
|
ProBasicPowerstationPoint rfdlpoint = wpBasicWppointMap.get(ContantXk.RFDLSYZ);
|
|
|
- wpResultList.add(PointUtil.createPointData(currentDate,rfdl.get(),rfdlpoint.getNemCode(),rfdlpoint.getName()));
|
|
|
+ wpResultList.add(PointUtil.createPointData(date,rfdl.get(),rfdlpoint.getNemCode(),rfdlpoint.getName()));
|
|
|
ProBasicPowerstationPoint yfdlpoint = wpBasicWppointMap.get(ContantXk.YFDLSYZ);
|
|
|
- wpResultList.add(PointUtil.createPointData(currentDate,yfdl.get(),yfdlpoint.getNemCode(),yfdlpoint.getName()));
|
|
|
+ wpResultList.add(PointUtil.createPointData(date,yfdl.get(),yfdlpoint.getNemCode(),yfdlpoint.getName()));
|
|
|
ProBasicPowerstationPoint nfdlpoint = wpBasicWppointMap.get(ContantXk.YFDLSYZ);
|
|
|
- wpResultList.add(PointUtil.createPointData(currentDate,nfdl.get(),yfdlpoint.getNemCode(),nfdlpoint.getName()));
|
|
|
+ wpResultList.add(PointUtil.createPointData(date,nfdl.get(),yfdlpoint.getNemCode(),nfdlpoint.getName()));
|
|
|
|
|
|
ProBasicPowerstationPoint rswdlpoint = wpBasicWppointMap.get(ContantXk.RSWDL);
|
|
|
- wpResultList.add(PointUtil.createPointData(currentDate,rswdl.get(),rswdlpoint.getNemCode(),rswdlpoint.getName()));
|
|
|
+ wpResultList.add(PointUtil.createPointData(date,rswdl.get(),rswdlpoint.getNemCode(),rswdlpoint.getName()));
|
|
|
ProBasicPowerstationPoint yswdlpoint = wpBasicWppointMap.get(ContantXk.YSWDL);
|
|
|
- wpResultList.add(PointUtil.createPointData(currentDate,yswdl.get(),yswdlpoint.getNemCode(),yswdlpoint.getName()));
|
|
|
+ wpResultList.add(PointUtil.createPointData(date,yswdl.get(),yswdlpoint.getNemCode(),yswdlpoint.getName()));
|
|
|
ProBasicPowerstationPoint nswdlpoint = wpBasicWppointMap.get(ContantXk.NSWDL);
|
|
|
- wpResultList.add(PointUtil.createPointData(currentDate,nswdl.get(),nswdlpoint.getNemCode(),nswdlpoint.getName()));
|
|
|
+ wpResultList.add(PointUtil.createPointData(date,nswdl.get(),nswdlpoint.getNemCode(),nswdlpoint.getName()));
|
|
|
|
|
|
ProBasicPowerstationPoint rgwgwdlpoint = wpBasicWppointMap.get(ContantXk.RGWGWDL);
|
|
|
- wpResultList.add(PointUtil.createPointData(currentDate,rgwgwdl.get(),rgwgwdlpoint.getNemCode(),rgwgwdlpoint.getName()));
|
|
|
+ wpResultList.add(PointUtil.createPointData(date,rgwgwdl.get(),rgwgwdlpoint.getNemCode(),rgwgwdlpoint.getName()));
|
|
|
ProBasicPowerstationPoint ygwgwdlpoint = wpBasicWppointMap.get(ContantXk.YGWGWDL);
|
|
|
- wpResultList.add(PointUtil.createPointData(currentDate,ygwgwdl.get(),ygwgwdlpoint.getNemCode(),ygwgwdlpoint.getName()));
|
|
|
+ wpResultList.add(PointUtil.createPointData(date,ygwgwdl.get(),ygwgwdlpoint.getNemCode(),ygwgwdlpoint.getName()));
|
|
|
ProBasicPowerstationPoint ngwgwdlpoint = wpBasicWppointMap.get(ContantXk.NGWGWDL);
|
|
|
- wpResultList.add(PointUtil.createPointData(currentDate,ngwgwdl.get(),ngwgwdlpoint.getNemCode(),ngwgwdlpoint.getName()));
|
|
|
+ wpResultList.add(PointUtil.createPointData(date,ngwgwdl.get(),ngwgwdlpoint.getNemCode(),ngwgwdlpoint.getName()));
|
|
|
|
|
|
ProBasicPowerstationPoint rnwgwdlpoint = wpBasicWppointMap.get(ContantXk.RNWGWDL);
|
|
|
- wpResultList.add(PointUtil.createPointData(currentDate,rnwgwdl.get(),rnwgwdlpoint.getNemCode(),rnwgwdlpoint.getName()));
|
|
|
+ wpResultList.add(PointUtil.createPointData(date,rnwgwdl.get(),rnwgwdlpoint.getNemCode(),rnwgwdlpoint.getName()));
|
|
|
ProBasicPowerstationPoint ynwgwdlpoint = wpBasicWppointMap.get(ContantXk.YNWGWDL);
|
|
|
- wpResultList.add(PointUtil.createPointData(currentDate,ynwgwdl.get(),ynwgwdlpoint.getNemCode(),ynwgwdlpoint.getName()));
|
|
|
+ wpResultList.add(PointUtil.createPointData(date,ynwgwdl.get(),ynwgwdlpoint.getNemCode(),ynwgwdlpoint.getName()));
|
|
|
ProBasicPowerstationPoint nnwgwdlpoint = wpBasicWppointMap.get(ContantXk.NNWGWDL);
|
|
|
- wpResultList.add(PointUtil.createPointData(currentDate,nnwgwdl.get(),nnwgwdlpoint.getNemCode(),nnwgwdlpoint.getName()));
|
|
|
+ wpResultList.add(PointUtil.createPointData(date,nnwgwdl.get(),nnwgwdlpoint.getNemCode(),nnwgwdlpoint.getName()));
|
|
|
|
|
|
ProBasicPowerstationPoint rcydlpoint = wpBasicWppointMap.get(ContantXk.RCYDL);
|
|
|
- wpResultList.add(PointUtil.createPointData(currentDate,rcydl.get(),rcydlpoint.getNemCode(),rcydlpoint.getName()));
|
|
|
+ wpResultList.add(PointUtil.createPointData(date,rcydl.get(),rcydlpoint.getNemCode(),rcydlpoint.getName()));
|
|
|
ProBasicPowerstationPoint ycydlpoint = wpBasicWppointMap.get(ContantXk.YCYDL);
|
|
|
- wpResultList.add(PointUtil.createPointData(currentDate,ycydl.get(),ycydlpoint.getNemCode(),ycydlpoint.getName()));
|
|
|
+ wpResultList.add(PointUtil.createPointData(date,ycydl.get(),ycydlpoint.getNemCode(),ycydlpoint.getName()));
|
|
|
ProBasicPowerstationPoint ncydlpoint = wpBasicWppointMap.get(ContantXk.NCYDL);
|
|
|
- wpResultList.add(PointUtil.createPointData(currentDate,ncydl.get(),ncydlpoint.getNemCode(),ncydlpoint.getName()));
|
|
|
+ wpResultList.add(PointUtil.createPointData(date,ncydl.get(),ncydlpoint.getNemCode(),ncydlpoint.getName()));
|
|
|
|
|
|
});
|
|
|
//场站存储
|
|
@@ -282,10 +283,10 @@ public class ElectricityMeteringService {
|
|
|
}
|
|
|
|
|
|
|
|
|
- private void setZero(List<PointData> resultList, Date currentDate, Map<String, ProBasicPowerstationPoint> linemap, String rcode, String ycode, String ncode) {
|
|
|
+ private void setZero(List<PointData> resultList,Date date, Date currentDate, Map<String, ProBasicPowerstationPoint> linemap, String rcode, String ycode, String ncode) {
|
|
|
//线路日发电量
|
|
|
PointData r = new PointData();
|
|
|
- r.setPointTime(currentDate.getTime());
|
|
|
+ r.setPointTime(date.getTime());
|
|
|
r.setPointValue("0");
|
|
|
r.setPointValueInDouble(0);
|
|
|
r.setEdnaId(linemap.get(rcode).getNemCode());
|
|
@@ -293,7 +294,7 @@ public class ElectricityMeteringService {
|
|
|
resultList.add(r);
|
|
|
//线路月发电量
|
|
|
PointData y = new PointData();
|
|
|
- y.setPointTime(currentDate.getTime());
|
|
|
+ y.setPointTime(date.getTime());
|
|
|
y.setPointValue("0");
|
|
|
y.setPointValueInDouble(0);
|
|
|
y.setEdnaId(linemap.get(ycode).getNemCode());
|
|
@@ -301,7 +302,7 @@ public class ElectricityMeteringService {
|
|
|
resultList.add(y);
|
|
|
//线路年发电量
|
|
|
PointData n = new PointData();
|
|
|
- n.setPointTime(currentDate.getTime());
|
|
|
+ n.setPointTime(date.getTime());
|
|
|
n.setPointValue("0");
|
|
|
n.setPointValueInDouble(0);
|
|
|
n.setEdnaId(linemap.get(ncode).getNemCode());
|
|
@@ -309,13 +310,13 @@ public class ElectricityMeteringService {
|
|
|
resultList.add(n);
|
|
|
}
|
|
|
|
|
|
- private void getLineOtherFdl(Map<String, Map<String, ProBasicPowerstationPoint>> linepointmap, Date samedayZero, Date monthFirstZero, Date yearFirstZero, Date currentDate, List<PointData> lineResultList, ProBasicLine line, Map<String, ProBasicPowerstationPoint> proBasicWppointMap, Optional<ProBasicMeterPoint> fdlOptional, List<PointData> fdlList, Optional<ProBasicMeterPoint> swdlOptional) {
|
|
|
+ private void getLineOtherFdl(Map<String, Map<String, ProBasicPowerstationPoint>> linepointmap, Date samedayZero, Date monthFirstZero, Date yearFirstZero, Date date,Date currentDate, List<PointData> lineResultList, ProBasicLine line, Map<String, ProBasicPowerstationPoint> proBasicWppointMap, Optional<ProBasicMeterPoint> fdlOptional, List<PointData> fdlList, Optional<ProBasicMeterPoint> swdlOptional) {
|
|
|
if (swdlOptional.isPresent()){
|
|
|
ProBasicMeterPoint swdlMeterpoint = swdlOptional.get();
|
|
|
if (StringUtils.isEmpty(fdlList)){
|
|
|
String[] lines = swdlMeterpoint.getLineId().split("\\|");
|
|
|
Arrays.stream(lines).forEach(l->{
|
|
|
- getLineFdl(samedayZero, monthFirstZero, yearFirstZero, currentDate, fdlList, proBasicWppointMap, fdlOptional);
|
|
|
+ getLineFdl(samedayZero, monthFirstZero, yearFirstZero, date,currentDate, fdlList, proBasicWppointMap, fdlOptional);
|
|
|
});
|
|
|
}
|
|
|
//获取电量百分比,算其他电量
|
|
@@ -339,17 +340,17 @@ public class ElectricityMeteringService {
|
|
|
//线路上网电量
|
|
|
double xlswdl = (real - sameday) * magnification / xs * percentageMap.get("percentage");
|
|
|
ProBasicPowerstationPoint rpoint = proBasicWppointMap.get(ContantXk.RSWDL);
|
|
|
- PointData rpointData = PointUtil.createPointData(currentDate, xlswdl, rpoint.getNemCode(), rpoint.getName());
|
|
|
+ PointData rpointData = PointUtil.createPointData(date, xlswdl, rpoint.getNemCode(), rpoint.getName());
|
|
|
lineResultList.add(rpointData);
|
|
|
//线路月上网发电量
|
|
|
double xlyswdl = (real - month) * magnification / xs * percentageMap.get("ypercentage");
|
|
|
ProBasicPowerstationPoint ypoint = proBasicWppointMap.get(ContantXk.YSWDL);
|
|
|
- PointData ypointData = PointUtil.createPointData(currentDate, xlyswdl, ypoint.getNemCode(), ypoint.getName());
|
|
|
+ PointData ypointData = PointUtil.createPointData(date, xlyswdl, ypoint.getNemCode(), ypoint.getName());
|
|
|
lineResultList.add(ypointData);
|
|
|
//线路年上网发电量
|
|
|
double xlnswfdl = (real - year) * magnification / xs * percentageMap.get("npercentage");
|
|
|
ProBasicPowerstationPoint npoint = proBasicWppointMap.get(ContantXk.NSWDL);
|
|
|
- PointData npointData = PointUtil.createPointData(currentDate, xlnswfdl, npoint.getNemCode(), npoint.getName());
|
|
|
+ PointData npointData = PointUtil.createPointData(date, xlnswfdl, npoint.getNemCode(), npoint.getName());
|
|
|
lineResultList.add(npointData);
|
|
|
|
|
|
} catch (Exception e) {
|
|
@@ -358,7 +359,7 @@ public class ElectricityMeteringService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void getLineFdl(Date samedayZero, Date monthFirstZero, Date yearFirstZero, Date currentDate, List<PointData> lineResultList, Map<String, ProBasicPowerstationPoint> proBasicWppointMap, Optional<ProBasicMeterPoint> fdlOptional) {
|
|
|
+ private void getLineFdl(Date samedayZero, Date monthFirstZero, Date yearFirstZero, Date date,Date currentDate, List<PointData> lineResultList, Map<String, ProBasicPowerstationPoint> proBasicWppointMap, Optional<ProBasicMeterPoint> fdlOptional) {
|
|
|
if (fdlOptional.isPresent()){
|
|
|
ProBasicMeterPoint proBasicMeterPoint = fdlOptional.get();
|
|
|
String pointid = proBasicMeterPoint.getId();
|
|
@@ -377,17 +378,17 @@ public class ElectricityMeteringService {
|
|
|
//线路日发电量
|
|
|
double xlrfdl = (real - sameday) * magnification / xs;
|
|
|
ProBasicPowerstationPoint rpoint = proBasicWppointMap.get(ContantXk.RFDLSYZ);
|
|
|
- PointData r = PointUtil.createPointData(currentDate, xlrfdl, rpoint.getNemCode(),rpoint.getName());
|
|
|
+ PointData r = PointUtil.createPointData(date, xlrfdl, rpoint.getNemCode(),rpoint.getName());
|
|
|
lineResultList.add(r);
|
|
|
//线路月发电量
|
|
|
double xlyfdl = (real - month) * magnification / xs;
|
|
|
ProBasicPowerstationPoint ypoint = proBasicWppointMap.get(ContantXk.YFDLSYZ);
|
|
|
- PointData y = PointUtil.createPointData(currentDate, xlyfdl,ypoint.getNemCode(),ypoint.getName());
|
|
|
+ PointData y = PointUtil.createPointData(date, xlyfdl,ypoint.getNemCode(),ypoint.getName());
|
|
|
lineResultList.add(y);
|
|
|
//线路年发电量
|
|
|
double xlnfdl = (real - year) * magnification / xs;
|
|
|
ProBasicPowerstationPoint npoint = proBasicWppointMap.get(ContantXk.NFDLSYZ);
|
|
|
- PointData n = PointUtil.createPointData(currentDate, xlnfdl,npoint.getNemCode(),npoint.getName());
|
|
|
+ PointData n = PointUtil.createPointData(date, xlnfdl,npoint.getNemCode(),npoint.getName());
|
|
|
lineResultList.add(n);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|