|
@@ -72,10 +72,10 @@ public class GrowthRateServiceImpl implements IGrowthRateService {
|
|
|
oldSum += oldDataMonths.get(0).getPowerConsume();
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- double rate = (sum - oldSum) / oldSum;
|
|
|
-
|
|
|
- if (rate != 0 ) {
|
|
|
+ if (oldSum != 0 ) {
|
|
|
+
|
|
|
+ double rate = (sum - oldSum) / oldSum;
|
|
|
+
|
|
|
GrowthRateDto growthRateDto = new GrowthRateDto();
|
|
|
growthRateDto.setRate(rate);
|
|
|
growthRateDto.setEnterpriseName(enterpriseDto.getEnterpriseName());
|
|
@@ -105,10 +105,10 @@ public class GrowthRateServiceImpl implements IGrowthRateService {
|
|
|
sum = dataSeasons.get(0).getPaidTax();
|
|
|
oldSum = oldDataSeasons.get(0).getPaidTax();
|
|
|
}
|
|
|
-
|
|
|
- double rate = (double) (sum - oldSum) / oldSum;
|
|
|
-
|
|
|
- if (rate != 0) {
|
|
|
+ if (oldSum != 0) {
|
|
|
+
|
|
|
+ double rate = (double) (sum - oldSum) / oldSum;
|
|
|
+
|
|
|
GrowthRateDto growthRateDto = new GrowthRateDto();
|
|
|
growthRateDto.setRate(rate);
|
|
|
growthRateDto.setEnterpriseName(dto.getEnterpriseName());
|
|
@@ -136,9 +136,9 @@ public class GrowthRateServiceImpl implements IGrowthRateService {
|
|
|
sum = dataYears.get(0).getFunding();
|
|
|
oldSum = oldDataYears.get(0).getFunding();
|
|
|
}
|
|
|
-
|
|
|
- double rate = (double) (sum - oldSum) / oldSum;
|
|
|
- if (rate != 0 ) {
|
|
|
+ if (oldSum != 0 ) {
|
|
|
+
|
|
|
+ double rate = (double) (sum - oldSum) / oldSum;
|
|
|
|
|
|
GrowthRateDto growthRateDto = new GrowthRateDto();
|
|
|
growthRateDto.setRate(rate);
|