|
@@ -159,54 +159,57 @@ public class RealtimeService {
|
|
|
}
|
|
|
wtResultList.add(ssbfPointDate);
|
|
|
double v = DoubleUtils.keepPrecision(ssbf, 2);
|
|
|
- if (theoreticalPowerMap.containsKey(wt.getModelId())) {
|
|
|
- // double v = DoubleUtils.keepPrecision(ssbf, 2);
|
|
|
- if (theoreticalPowerMap.get(wt.getModelId()).containsKey(v)) {
|
|
|
- ProBasicModelPowerRd basicModelPowerRd = theoreticalPowerMap.get(wt.getModelId()).get(v);
|
|
|
- wtResultList.add(PointUtil.createPointData(currentDate, basicModelPowerRd.getTheoryPower(), llglPoint.getNemCode(), llglPoint.getName()));
|
|
|
- wtResultList.add(PointUtil.createPointData(currentDate, basicModelPowerRd.getEnsurePower(), bzglPoint.getNemCode(), bzglPoint.getName()));
|
|
|
- } else {
|
|
|
- wtResultList.add(PointUtil.createPointData(currentDate, 0, llglPoint.getNemCode(), llglPoint.getName()));
|
|
|
- wtResultList.add(PointUtil.createPointData(currentDate, 0, bzglPoint.getNemCode(), bzglPoint.getName()));
|
|
|
+ if (null != theoreticalPowerMap){
|
|
|
+ if (theoreticalPowerMap.containsKey(wt.getModelId())) {
|
|
|
+ // double v = DoubleUtils.keepPrecision(ssbf, 2);
|
|
|
+ if (theoreticalPowerMap.get(wt.getModelId()).containsKey(v)) {
|
|
|
+ ProBasicModelPowerRd basicModelPowerRd = theoreticalPowerMap.get(wt.getModelId()).get(v);
|
|
|
+ wtResultList.add(PointUtil.createPointData(currentDate, basicModelPowerRd.getTheoryPower(), llglPoint.getNemCode(), llglPoint.getName()));
|
|
|
+ wtResultList.add(PointUtil.createPointData(currentDate, basicModelPowerRd.getEnsurePower(), bzglPoint.getNemCode(), bzglPoint.getName()));
|
|
|
+ } else {
|
|
|
+ wtResultList.add(PointUtil.createPointData(currentDate, 0, llglPoint.getNemCode(), llglPoint.getName()));
|
|
|
+ wtResultList.add(PointUtil.createPointData(currentDate, 0, bzglPoint.getNemCode(), bzglPoint.getName()));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- if (curveFittingPowerMap.containsKey(wt.getId())) {
|
|
|
- if (curveFittingPowerMap.get(wt.getId()).containsKey(v)) {
|
|
|
- ProEconWtCurveFittingMonth wtPowerCurveFitting = curveFittingPowerMap.get(wt.getId()).get(v);
|
|
|
- Double actualPower = wtPowerCurveFitting.getActualPower();
|
|
|
- double[] underissuanceArray = {0, 1, 2, 3, 8, 9, 11};
|
|
|
- double qfzt = 0;
|
|
|
- double lsqfzt = 0;
|
|
|
- double ssgl15 = 0;
|
|
|
- double zsgl15 = 0;
|
|
|
- // if (ssglOptional.isPresent()) {
|
|
|
- // ssgl15 = ssglOptional.get().getPointValueInDouble();
|
|
|
- zsgl15 = wtPowerCurveFitting.getActualPower();
|
|
|
- // }
|
|
|
- if (Arrays.asList(underissuanceArray).contains(mxzt)) {
|
|
|
- qfzt = Underdelivery.underdeliveryStatusReal(ssgl, actualPower);
|
|
|
- lsqfzt = Underdelivery.underdeliveryStatusReal(ssgl15, zsgl15);
|
|
|
+ if (null != curveFittingPowerMap){
|
|
|
+ if (curveFittingPowerMap.containsKey(wt.getId())) {
|
|
|
+ if (curveFittingPowerMap.get(wt.getId()).containsKey(v)) {
|
|
|
+ ProEconWtCurveFittingMonth wtPowerCurveFitting = curveFittingPowerMap.get(wt.getId()).get(v);
|
|
|
+ Double actualPower = wtPowerCurveFitting.getActualPower();
|
|
|
+ double[] underissuanceArray = {0, 1, 2, 3, 8, 9, 11};
|
|
|
+ double qfzt = 0;
|
|
|
+ double lsqfzt = 0;
|
|
|
+ double ssgl15 = 0;
|
|
|
+ double zsgl15 = 0;
|
|
|
+ // if (ssglOptional.isPresent()) {
|
|
|
+ // ssgl15 = ssglOptional.get().getPointValueInDouble();
|
|
|
+ zsgl15 = wtPowerCurveFitting.getActualPower();
|
|
|
+ // }
|
|
|
+ if (Arrays.asList(underissuanceArray).contains(mxzt)) {
|
|
|
+ qfzt = Underdelivery.underdeliveryStatusReal(ssgl, actualPower);
|
|
|
+ lsqfzt = Underdelivery.underdeliveryStatusReal(ssgl15, zsgl15);
|
|
|
+ }
|
|
|
+ wtResultList.add(PointUtil.createPointData(currentDate, qfzt, ssqfztPoint.getNemCode(), ssqfztPoint.getName()));
|
|
|
+ wtResultList.add(PointUtil.createPointData(currentDate, lsqfzt, lsqfztPoint.getNemCode(), lsqfztPoint.getName()));
|
|
|
+
|
|
|
+ wtResultList.add(PointUtil.createPointData(currentDate, wtPowerCurveFitting.getActualPower(), zsglPoint.getNemCode(), zsglPoint.getName()));
|
|
|
+ wtResultList.add(PointUtil.createPointData(currentDate, wtPowerCurveFitting.getOptimalPower(), zyglPoint.getNemCode(), zyglPoint.getName()));
|
|
|
+ // if (mxzt == 4 || mxzt == 5 || mxzt == 6 || mxzt == 7) {
|
|
|
+ // wtResultList.add(PointUtil.createPointData(currentDate, 0, kyglPoint.getNemCode(), kyglPoint.getName()));
|
|
|
+ // } else {
|
|
|
+ // wtResultList.add(PointUtil.createPointData(currentDate, wtPowerCurveFitting.getActualPower(), kyglPoint.getNemCode(), kyglPoint.getName()));
|
|
|
+ // }
|
|
|
+ } else {
|
|
|
+ wtResultList.add(PointUtil.createPointData(currentDate, 0, ssqfztPoint.getNemCode(), ssqfztPoint.getName()));
|
|
|
+ wtResultList.add(PointUtil.createPointData(currentDate, 0, lsqfztPoint.getNemCode(), lsqfztPoint.getName()));
|
|
|
+
|
|
|
+ wtResultList.add(PointUtil.createPointData(currentDate, 0, zsglPoint.getNemCode(), zsglPoint.getName()));
|
|
|
+ wtResultList.add(PointUtil.createPointData(currentDate, 0, zyglPoint.getNemCode(), zyglPoint.getName()));
|
|
|
+ // wtResultList.add(PointUtil.createPointData(currentDate, 0, kyglPoint.getNemCode(), kyglPoint.getName()));
|
|
|
}
|
|
|
- wtResultList.add(PointUtil.createPointData(currentDate, qfzt, ssqfztPoint.getNemCode(), ssqfztPoint.getName()));
|
|
|
- wtResultList.add(PointUtil.createPointData(currentDate, lsqfzt, lsqfztPoint.getNemCode(), lsqfztPoint.getName()));
|
|
|
-
|
|
|
- wtResultList.add(PointUtil.createPointData(currentDate, wtPowerCurveFitting.getActualPower(), zsglPoint.getNemCode(), zsglPoint.getName()));
|
|
|
- wtResultList.add(PointUtil.createPointData(currentDate, wtPowerCurveFitting.getOptimalPower(), zyglPoint.getNemCode(), zyglPoint.getName()));
|
|
|
- // if (mxzt == 4 || mxzt == 5 || mxzt == 6 || mxzt == 7) {
|
|
|
- // wtResultList.add(PointUtil.createPointData(currentDate, 0, kyglPoint.getNemCode(), kyglPoint.getName()));
|
|
|
- // } else {
|
|
|
- // wtResultList.add(PointUtil.createPointData(currentDate, wtPowerCurveFitting.getActualPower(), kyglPoint.getNemCode(), kyglPoint.getName()));
|
|
|
- // }
|
|
|
- } else {
|
|
|
- wtResultList.add(PointUtil.createPointData(currentDate, 0, ssqfztPoint.getNemCode(), ssqfztPoint.getName()));
|
|
|
- wtResultList.add(PointUtil.createPointData(currentDate, 0, lsqfztPoint.getNemCode(), lsqfztPoint.getName()));
|
|
|
-
|
|
|
- wtResultList.add(PointUtil.createPointData(currentDate, 0, zsglPoint.getNemCode(), zsglPoint.getName()));
|
|
|
- wtResultList.add(PointUtil.createPointData(currentDate, 0, zyglPoint.getNemCode(), zyglPoint.getName()));
|
|
|
- // wtResultList.add(PointUtil.createPointData(currentDate, 0, kyglPoint.getNemCode(), kyglPoint.getName()));
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
// });
|
|
|
}
|
|
|
edosUtil.sendMultiPoint(wtResultList);
|