diff --git a/pqs-prepare/prepare-boot/src/main/java/com/njcn/prepare/harmonic/service/mysql/newalgorithm/impl/RStatSubstationServiceImpl.java b/pqs-prepare/prepare-boot/src/main/java/com/njcn/prepare/harmonic/service/mysql/newalgorithm/impl/RStatSubstationServiceImpl.java index 4982565f9..8abe06bc0 100644 --- a/pqs-prepare/prepare-boot/src/main/java/com/njcn/prepare/harmonic/service/mysql/newalgorithm/impl/RStatSubstationServiceImpl.java +++ b/pqs-prepare/prepare-boot/src/main/java/com/njcn/prepare/harmonic/service/mysql/newalgorithm/impl/RStatSubstationServiceImpl.java @@ -779,7 +779,7 @@ public class RStatSubstationServiceImpl implements RStatSubstationService { rStatSubstationQPO.setEventCount(eventDetailSumAndCountM.containsKey("eventCountSum") ? Integer.parseInt(eventDetailSumAndCountM.get("eventCountSum").toString()) : 0); - if (!Objects.equals(0, eventDetailSumAndCountD.get("eventMeasurementCountSum"))) { + if (!Objects.equals("0", eventDetailSumAndCountD.get("eventMeasurementCountSum").toString())) { String value = df.format(Float.parseFloat(eventDetailSumAndCountM.get("eventCountSum").toString()) / Float.parseFloat(eventDetailSumAndCountD.get("eventMeasurementCountSum").toString())); rStatSubstationQPO.setEventFreq(Float.parseFloat(value)); @@ -790,7 +790,7 @@ public class RStatSubstationServiceImpl implements RStatSubstationService { rStatSubstationQPO.setSagCount(eventDetailSumAndCountM.containsKey("sagCountSum") ? Integer.parseInt(eventDetailSumAndCountM.get("sagCountSum").toString()) : 0); - if (!Objects.equals(0, eventDetailSumAndCountD.get("sagMeasurementCountSum"))) { + if (!Objects.equals("0", eventDetailSumAndCountD.get("sagMeasurementCountSum").toString())) { String value = df.format(Float.parseFloat(eventDetailSumAndCountM.get("sagCountSum").toString()) / Float.parseFloat(eventDetailSumAndCountD.get("sagMeasurementCountSum").toString())); rStatSubstationQPO.setSagFreq(Float.parseFloat(value)); @@ -801,7 +801,7 @@ public class RStatSubstationServiceImpl implements RStatSubstationService { rStatSubstationQPO.setSwellCount(eventDetailSumAndCountM.containsKey("swellCountSum") ? Integer.parseInt(eventDetailSumAndCountM.get("swellCountSum").toString()) : 0); - if (!Objects.equals(0, eventDetailSumAndCountD.get("swellMeasurementCountSum"))) { + if (!Objects.equals("0", eventDetailSumAndCountD.get("swellMeasurementCountSum").toString())) { String value = df.format(Float.parseFloat(eventDetailSumAndCountM.get("swellCountSum").toString()) / Float.parseFloat(eventDetailSumAndCountD.get("swellMeasurementCountSum").toString())); rStatSubstationQPO.setSwellFreq(Float.parseFloat(value)); @@ -812,7 +812,7 @@ public class RStatSubstationServiceImpl implements RStatSubstationService { rStatSubstationQPO.setInterruptCount(eventDetailSumAndCountM.containsKey("interruptCountSum") ? Integer.parseInt(eventDetailSumAndCountM.get("interruptCountSum").toString()) : 0); - if (!Objects.equals(0, eventDetailSumAndCountD.get("interruptMeasurementCountSum"))) { + if (!Objects.equals("0", eventDetailSumAndCountD.get("interruptMeasurementCountSum").toString())) { String value = df.format(Float.parseFloat(eventDetailSumAndCountM.get("interruptCountSum").toString()) / Float.parseFloat(eventDetailSumAndCountD.get("interruptMeasurementCountSum").toString())); rStatSubstationQPO.setInterruptFreq(Float.parseFloat(value)); @@ -906,7 +906,7 @@ public class RStatSubstationServiceImpl implements RStatSubstationService { rStatSubstationQPO.setEventCount(eventDetailSumAndCountM.containsKey("eventCountSum") ? Integer.parseInt(eventDetailSumAndCountM.get("eventCountSum").toString()) : 0); - if (!Objects.equals(0, eventDetailSumAndCountD.get("eventMeasurementCountSum"))) { + if (!Objects.equals("0", eventDetailSumAndCountD.get("eventMeasurementCountSum").toString())) { String value = df.format(Float.parseFloat(eventDetailSumAndCountM.get("eventCountSum").toString()) / Float.parseFloat(eventDetailSumAndCountD.get("eventMeasurementCountSum").toString())); rStatSubstationQPO.setEventFreq(Float.parseFloat(value)); @@ -917,7 +917,7 @@ public class RStatSubstationServiceImpl implements RStatSubstationService { rStatSubstationQPO.setSagCount(eventDetailSumAndCountM.containsKey("sagCountSum") ? Integer.parseInt(eventDetailSumAndCountM.get("sagCountSum").toString()) : 0); - if (!Objects.equals(0, eventDetailSumAndCountD.get("sagMeasurementCountSum"))) { + if (!Objects.equals("0", eventDetailSumAndCountD.get("sagMeasurementCountSum").toString())) { String value = df.format(Float.parseFloat(eventDetailSumAndCountM.get("sagCountSum").toString()) / Float.parseFloat(eventDetailSumAndCountD.get("sagMeasurementCountSum").toString())); rStatSubstationQPO.setSagFreq(Float.parseFloat(value)); @@ -928,7 +928,7 @@ public class RStatSubstationServiceImpl implements RStatSubstationService { rStatSubstationQPO.setSwellCount(eventDetailSumAndCountM.containsKey("swellCountSum") ? Integer.parseInt(eventDetailSumAndCountM.get("swellCountSum").toString()) : 0); - if (!Objects.equals(0, eventDetailSumAndCountD.get("swellMeasurementCountSum"))) { + if (!Objects.equals("0", eventDetailSumAndCountD.get("swellMeasurementCountSum").toString())) { String value = df.format(Float.parseFloat(eventDetailSumAndCountM.get("swellCountSum").toString()) / Float.parseFloat(eventDetailSumAndCountD.get("swellMeasurementCountSum").toString())); rStatSubstationQPO.setSwellFreq(Float.parseFloat(value)); @@ -939,7 +939,7 @@ public class RStatSubstationServiceImpl implements RStatSubstationService { rStatSubstationQPO.setInterruptCount(eventDetailSumAndCountM.containsKey("interruptCountSum") ? Integer.parseInt(eventDetailSumAndCountM.get("interruptCountSum").toString()) : 0); - if (!Objects.equals(0, eventDetailSumAndCountD.get("interruptMeasurementCountSum"))) { + if (!Objects.equals("0", eventDetailSumAndCountD.get("interruptMeasurementCountSum").toString())) { String value = df.format(Float.parseFloat(eventDetailSumAndCountM.get("interruptCountSum").toString()) / Float.parseFloat(eventDetailSumAndCountD.get("interruptMeasurementCountSum").toString())); rStatSubstationQPO.setInterruptFreq(Float.parseFloat(value)); @@ -1071,7 +1071,7 @@ public class RStatSubstationServiceImpl implements RStatSubstationService { rStatSubstationYPO.setEventCount(eventDetailSumAndCountM.containsKey("eventCountSum") ? Integer.parseInt(eventDetailSumAndCountM.get("eventCountSum").toString()) : 0); - if (!Objects.equals(0, eventDetailSumAndCountD.get("eventMeasurementCountSum"))) { + if (!Objects.equals("0", eventDetailSumAndCountD.get("eventMeasurementCountSum").toString())) { String value = df.format(Float.parseFloat(eventDetailSumAndCountM.get("eventCountSum").toString()) / Float.parseFloat(eventDetailSumAndCountD.get("eventMeasurementCountSum").toString())); rStatSubstationYPO.setEventFreq(Float.parseFloat(value)); @@ -1082,7 +1082,7 @@ public class RStatSubstationServiceImpl implements RStatSubstationService { rStatSubstationYPO.setSagCount(eventDetailSumAndCountM.containsKey("sagCountSum") ? Integer.parseInt(eventDetailSumAndCountM.get("sagCountSum").toString()) : 0); - if (!Objects.equals(0, eventDetailSumAndCountD.get("sagMeasurementCountSum"))) { + if (!Objects.equals("0", eventDetailSumAndCountD.get("sagMeasurementCountSum").toString())) { String value = df.format(Float.parseFloat(eventDetailSumAndCountM.get("sagCountSum").toString()) / Float.parseFloat(eventDetailSumAndCountD.get("sagMeasurementCountSum").toString())); rStatSubstationYPO.setSagFreq(Float.parseFloat(value)); @@ -1093,7 +1093,7 @@ public class RStatSubstationServiceImpl implements RStatSubstationService { rStatSubstationYPO.setSwellCount(eventDetailSumAndCountM.containsKey("swellCountSum") ? Integer.parseInt(eventDetailSumAndCountM.get("swellCountSum").toString()) : 0); - if (!Objects.equals(0, eventDetailSumAndCountD.get("swellMeasurementCountSum"))) { + if (!Objects.equals("0", eventDetailSumAndCountD.get("swellMeasurementCountSum").toString())) { String value = df.format(Float.parseFloat(eventDetailSumAndCountM.get("swellCountSum").toString()) / Float.parseFloat(eventDetailSumAndCountD.get("swellMeasurementCountSum").toString())); rStatSubstationYPO.setSwellFreq(Float.parseFloat(value)); @@ -1104,7 +1104,7 @@ public class RStatSubstationServiceImpl implements RStatSubstationService { rStatSubstationYPO.setInterruptCount(eventDetailSumAndCountM.containsKey("interruptCountSum") ? Integer.parseInt(eventDetailSumAndCountM.get("interruptCountSum").toString()) : 0); - if (!Objects.equals(0, eventDetailSumAndCountD.get("interruptMeasurementCountSum"))) { + if (!Objects.equals("0", eventDetailSumAndCountD.get("interruptMeasurementCountSum").toString())) { String value = df.format(Float.parseFloat(eventDetailSumAndCountM.get("interruptCountSum").toString()) / Float.parseFloat(eventDetailSumAndCountD.get("interruptMeasurementCountSum").toString())); rStatSubstationYPO.setInterruptFreq(Float.parseFloat(value)); @@ -1198,7 +1198,7 @@ public class RStatSubstationServiceImpl implements RStatSubstationService { rStatSubstationYPO.setEventCount(eventDetailSumAndCountM.containsKey("eventCountSum") ? Integer.parseInt(eventDetailSumAndCountM.get("eventCountSum").toString()) : 0); - if (!Objects.equals(0, eventDetailSumAndCountD.get("eventMeasurementCountSum"))) { + if (!Objects.equals("0", eventDetailSumAndCountD.get("eventMeasurementCountSum").toString())) { String value = df.format(Float.parseFloat(eventDetailSumAndCountM.get("eventCountSum").toString()) / Float.parseFloat(eventDetailSumAndCountD.get("eventMeasurementCountSum").toString())); rStatSubstationYPO.setEventFreq(Float.parseFloat(value)); @@ -1209,7 +1209,7 @@ public class RStatSubstationServiceImpl implements RStatSubstationService { rStatSubstationYPO.setSagCount(eventDetailSumAndCountM.containsKey("sagCountSum") ? Integer.parseInt(eventDetailSumAndCountM.get("sagCountSum").toString()) : 0); - if (!Objects.equals(0, eventDetailSumAndCountD.get("sagMeasurementCountSum"))) { + if (!Objects.equals("0", eventDetailSumAndCountD.get("sagMeasurementCountSum").toString())) { String value = df.format(Float.parseFloat(eventDetailSumAndCountM.get("sagCountSum").toString()) / Float.parseFloat(eventDetailSumAndCountD.get("sagMeasurementCountSum").toString())); rStatSubstationYPO.setSagFreq(Float.parseFloat(value)); @@ -1220,7 +1220,7 @@ public class RStatSubstationServiceImpl implements RStatSubstationService { rStatSubstationYPO.setSwellCount(eventDetailSumAndCountM.containsKey("swellCountSum") ? Integer.parseInt(eventDetailSumAndCountM.get("swellCountSum").toString()) : 0); - if (!Objects.equals(0, eventDetailSumAndCountD.get("swellMeasurementCountSum"))) { + if (!Objects.equals("0", eventDetailSumAndCountD.get("swellMeasurementCountSum").toString())) { String value = df.format(Float.parseFloat(eventDetailSumAndCountM.get("swellCountSum").toString()) / Float.parseFloat(eventDetailSumAndCountD.get("swellMeasurementCountSum").toString())); rStatSubstationYPO.setSwellFreq(Float.parseFloat(value)); @@ -1231,7 +1231,7 @@ public class RStatSubstationServiceImpl implements RStatSubstationService { rStatSubstationYPO.setInterruptCount(eventDetailSumAndCountM.containsKey("interruptCountSum") ? Integer.parseInt(eventDetailSumAndCountM.get("interruptCountSum").toString()) : 0); - if (!Objects.equals(0, eventDetailSumAndCountD.get("interruptMeasurementCountSum"))) { + if (!Objects.equals("0", eventDetailSumAndCountD.get("interruptMeasurementCountSum").toString())) { String value = df.format(Float.parseFloat(eventDetailSumAndCountM.get("interruptCountSum").toString()) / Float.parseFloat(eventDetailSumAndCountD.get("interruptMeasurementCountSum").toString())); rStatSubstationYPO.setInterruptFreq(Float.parseFloat(value));