|
|
@ -348,7 +348,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe |
|
|
|
if (dto.getSum() != NumConstant.ZERO) { |
|
|
|
BigDecimal sum = new BigDecimal(dto.getSum()); |
|
|
|
BigDecimal count = new BigDecimal(dto.getCount()); |
|
|
|
entity.setSatisfactionRatio(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.setSatisfactionRatio(ratio); |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
@ -356,10 +360,14 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe |
|
|
|
List<OrgStatisticsResultDTO> gridList = factOriginProjectLogDailyService.getGridSelfDaily(customerId, dateId); |
|
|
|
if (CollectionUtils.isNotEmpty(gridList)) { |
|
|
|
list.forEach(entity -> gridList.stream().filter(gridAbility -> entity.getOrgId().equals(gridAbility.getOrgId())).forEach(grid -> { |
|
|
|
if (grid.getSum() != NumConstant.ZERO) { |
|
|
|
BigDecimal resolveCount = new BigDecimal(grid.getSum()); |
|
|
|
BigDecimal selfCount = new BigDecimal(grid.getCount()); |
|
|
|
if (grid.getSum() != NumConstant.ZERO) { |
|
|
|
entity.setGovernRatio(selfCount.multiply(hundred).divide(resolveCount, NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
|
BigDecimal ratio = selfCount.multiply(hundred).divide(resolveCount, NumConstant.SIX, RoundingMode.HALF_UP); |
|
|
|
if (ratio.compareTo(hundred) > 0) { |
|
|
|
ratio = hundred; |
|
|
|
} |
|
|
|
entity.setGovernRatio(ratio); |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
@ -371,7 +379,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); |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
@ -383,7 +395,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe |
|
|
|
if (dto.getSum() != NumConstant.ZERO) { |
|
|
|
BigDecimal sum = new BigDecimal(dto.getSum()); |
|
|
|
BigDecimal count = new BigDecimal(dto.getCount()); |
|
|
|
entity.setResolvedRatio(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.setResolvedRatio(ratio); |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
@ -422,7 +438,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe |
|
|
|
if (dto.getSum() != NumConstant.ZERO) { |
|
|
|
BigDecimal sum = new BigDecimal(dto.getSum()); |
|
|
|
BigDecimal count = new BigDecimal(dto.getCount()); |
|
|
|
entity.setSatisfactionRatio(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.setSatisfactionRatio(ratio); |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
@ -434,7 +454,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); |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
@ -445,7 +469,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe |
|
|
|
if (dto.getSum() != NumConstant.ZERO) { |
|
|
|
BigDecimal sum = new BigDecimal(dto.getSum()); |
|
|
|
BigDecimal count = new BigDecimal(dto.getCount()); |
|
|
|
entity.setGovernRatio(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.setGovernRatio(ratio); |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
@ -457,7 +485,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe |
|
|
|
if (dto.getSum() != NumConstant.ZERO) { |
|
|
|
BigDecimal sum = new BigDecimal(dto.getSum()); |
|
|
|
BigDecimal count = new BigDecimal(dto.getCount()); |
|
|
|
entity.setResolvedRatio(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.setResolvedRatio(ratio); |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
@ -495,7 +527,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe |
|
|
|
if (dto.getSum() != NumConstant.ZERO) { |
|
|
|
BigDecimal sum = new BigDecimal(dto.getSum()); |
|
|
|
BigDecimal count = new BigDecimal(dto.getCount()); |
|
|
|
entity.setSatisfactionRatio(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.setSatisfactionRatio(ratio); |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
@ -507,7 +543,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); |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
@ -518,7 +558,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe |
|
|
|
if (dto.getSum() != NumConstant.ZERO) { |
|
|
|
BigDecimal sum = new BigDecimal(dto.getSum()); |
|
|
|
BigDecimal count = new BigDecimal(dto.getCount()); |
|
|
|
entity.setGovernRatio(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.setGovernRatio(ratio); |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
@ -530,7 +574,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe |
|
|
|
if (dto.getSum() != NumConstant.ZERO) { |
|
|
|
BigDecimal sum = new BigDecimal(dto.getSum()); |
|
|
|
BigDecimal count = new BigDecimal(dto.getCount()); |
|
|
|
entity.setResolvedRatio(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.setResolvedRatio(ratio); |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
@ -568,7 +616,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe |
|
|
|
if (dto.getSum() != NumConstant.ZERO) { |
|
|
|
BigDecimal sum = new BigDecimal(dto.getSum()); |
|
|
|
BigDecimal count = new BigDecimal(dto.getCount()); |
|
|
|
entity.setSatisfactionRatio(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.setSatisfactionRatio(ratio); |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
@ -580,7 +632,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); |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
@ -591,7 +647,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe |
|
|
|
if (dto.getSum() != NumConstant.ZERO) { |
|
|
|
BigDecimal sum = new BigDecimal(dto.getSum()); |
|
|
|
BigDecimal count = new BigDecimal(dto.getCount()); |
|
|
|
entity.setGovernRatio(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.setGovernRatio(ratio); |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
@ -603,7 +663,11 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe |
|
|
|
if (dto.getSum() != NumConstant.ZERO) { |
|
|
|
BigDecimal sum = new BigDecimal(dto.getSum()); |
|
|
|
BigDecimal count = new BigDecimal(dto.getCount()); |
|
|
|
entity.setResolvedRatio(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.setResolvedRatio(ratio); |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
|