|
|
@ -375,7 +375,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe |
|
|
|
if (dto.getSum() != NumConstant.ZERO) { |
|
|
|
BigDecimal sum = new BigDecimal(dto.getSum()); |
|
|
|
BigDecimal count = new BigDecimal(dto.getCount()); |
|
|
|
entity.setResponseRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
|
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP); |
|
|
|
if (ratio.compareTo(hundred) > 0) { |
|
|
|
ratio = hundred; |
|
|
|
} |
|
|
|
entity.setResponseRatio(ratio); |
|
|
|
entity.setResponseCount(dto.getCount()); |
|
|
|
entity.setTransferCount(dto.getSum()); |
|
|
|
} |
|
|
@ -444,7 +448,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe |
|
|
|
if (dto.getSum() != NumConstant.ZERO) { |
|
|
|
BigDecimal sum = new BigDecimal(dto.getSum()); |
|
|
|
BigDecimal count = new BigDecimal(dto.getCount()); |
|
|
|
entity.setResponseRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
|
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP); |
|
|
|
if (ratio.compareTo(hundred) > 0) { |
|
|
|
ratio = hundred; |
|
|
|
} |
|
|
|
entity.setResponseRatio(ratio); |
|
|
|
entity.setResponseCount(dto.getCount()); |
|
|
|
entity.setTransferCount(dto.getSum()); |
|
|
|
} |
|
|
@ -525,7 +533,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe |
|
|
|
if (dto.getSum() != NumConstant.ZERO) { |
|
|
|
BigDecimal sum = new BigDecimal(dto.getSum()); |
|
|
|
BigDecimal count = new BigDecimal(dto.getCount()); |
|
|
|
entity.setResponseRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
|
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP); |
|
|
|
if (ratio.compareTo(hundred) > 0) { |
|
|
|
ratio = hundred; |
|
|
|
} |
|
|
|
entity.setResponseRatio(ratio); |
|
|
|
entity.setResponseCount(dto.getCount()); |
|
|
|
entity.setTransferCount(dto.getSum()); |
|
|
|
} |
|
|
@ -606,7 +618,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe |
|
|
|
if (dto.getSum() != NumConstant.ZERO) { |
|
|
|
BigDecimal sum = new BigDecimal(dto.getSum()); |
|
|
|
BigDecimal count = new BigDecimal(dto.getCount()); |
|
|
|
entity.setResponseRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
|
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP); |
|
|
|
if (ratio.compareTo(hundred) > 0) { |
|
|
|
ratio = hundred; |
|
|
|
} |
|
|
|
entity.setResponseRatio(ratio); |
|
|
|
entity.setResponseCount(dto.getCount()); |
|
|
|
entity.setTransferCount(dto.getSum()); |
|
|
|
} |
|
|
|