|
|
@ -348,9 +348,13 @@ 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)); |
|
|
|
entity.setSatisfactionCount(dto.getCount()); |
|
|
|
entity.setClosedProjectCount(dto.getSum()); |
|
|
|
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP); |
|
|
|
if (ratio.compareTo(hundred) > 0) { |
|
|
|
ratio = hundred; |
|
|
|
} |
|
|
|
entity.setSatisfactionRatio(ratio); |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
@ -358,12 +362,16 @@ 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 -> { |
|
|
|
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)); |
|
|
|
entity.setGovernCount(grid.getCount()); |
|
|
|
entity.setClosedCount(grid.getSum()); |
|
|
|
BigDecimal resolveCount = new BigDecimal(grid.getSum()); |
|
|
|
BigDecimal selfCount = new BigDecimal(grid.getCount()); |
|
|
|
BigDecimal ratio = selfCount.multiply(hundred).divide(resolveCount, NumConstant.SIX, RoundingMode.HALF_UP); |
|
|
|
if (ratio.compareTo(hundred) > 0) { |
|
|
|
ratio = hundred; |
|
|
|
} |
|
|
|
entity.setGovernRatio(ratio); |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
@ -375,13 +383,13 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe |
|
|
|
if (dto.getSum() != NumConstant.ZERO) { |
|
|
|
BigDecimal sum = new BigDecimal(dto.getSum()); |
|
|
|
BigDecimal count = new BigDecimal(dto.getCount()); |
|
|
|
entity.setResponseCount(dto.getCount()); |
|
|
|
entity.setTransferCount(dto.getSum()); |
|
|
|
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()); |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
@ -393,9 +401,13 @@ 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)); |
|
|
|
entity.setResolvedCount(dto.getCount()); |
|
|
|
entity.setClosedCount(dto.getSum()); |
|
|
|
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP); |
|
|
|
if (ratio.compareTo(hundred) > 0) { |
|
|
|
ratio = hundred; |
|
|
|
} |
|
|
|
entity.setResolvedRatio(ratio); |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
@ -434,9 +446,13 @@ 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)); |
|
|
|
entity.setSatisfactionCount(dto.getCount()); |
|
|
|
entity.setClosedProjectCount(dto.getSum()); |
|
|
|
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP); |
|
|
|
if (ratio.compareTo(hundred) > 0) { |
|
|
|
ratio = hundred; |
|
|
|
} |
|
|
|
entity.setSatisfactionRatio(ratio); |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
@ -465,9 +481,13 @@ 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)); |
|
|
|
entity.setGovernCount(dto.getCount()); |
|
|
|
entity.setClosedCount(dto.getSum()); |
|
|
|
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP); |
|
|
|
if (ratio.compareTo(hundred) > 0) { |
|
|
|
ratio = hundred; |
|
|
|
} |
|
|
|
entity.setGovernRatio(ratio); |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
@ -479,9 +499,13 @@ 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)); |
|
|
|
entity.setResolvedCount(dto.getCount()); |
|
|
|
entity.setClosedCount(dto.getSum()); |
|
|
|
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP); |
|
|
|
if (ratio.compareTo(hundred) > 0) { |
|
|
|
ratio = hundred; |
|
|
|
} |
|
|
|
entity.setResolvedRatio(ratio); |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
@ -519,9 +543,13 @@ 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)); |
|
|
|
entity.setSatisfactionCount(dto.getCount()); |
|
|
|
entity.setClosedProjectCount(dto.getSum()); |
|
|
|
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP); |
|
|
|
if (ratio.compareTo(hundred) > 0) { |
|
|
|
ratio = hundred; |
|
|
|
} |
|
|
|
entity.setSatisfactionRatio(ratio); |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
@ -550,9 +578,13 @@ 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)); |
|
|
|
entity.setGovernCount(dto.getCount()); |
|
|
|
entity.setClosedCount(dto.getSum()); |
|
|
|
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP); |
|
|
|
if (ratio.compareTo(hundred) > 0) { |
|
|
|
ratio = hundred; |
|
|
|
} |
|
|
|
entity.setGovernRatio(ratio); |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
@ -564,9 +596,13 @@ 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)); |
|
|
|
entity.setResolvedCount(dto.getCount()); |
|
|
|
entity.setClosedCount(dto.getSum()); |
|
|
|
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP); |
|
|
|
if (ratio.compareTo(hundred) > 0) { |
|
|
|
ratio = hundred; |
|
|
|
} |
|
|
|
entity.setResolvedRatio(ratio); |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
@ -604,9 +640,13 @@ 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)); |
|
|
|
entity.setSatisfactionCount(dto.getCount()); |
|
|
|
entity.setClosedProjectCount(dto.getSum()); |
|
|
|
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP); |
|
|
|
if (ratio.compareTo(hundred) > 0) { |
|
|
|
ratio = hundred; |
|
|
|
} |
|
|
|
entity.setSatisfactionRatio(ratio); |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
@ -635,9 +675,13 @@ 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)); |
|
|
|
entity.setGovernCount(dto.getCount()); |
|
|
|
entity.setClosedCount(dto.getSum()); |
|
|
|
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP); |
|
|
|
if (ratio.compareTo(hundred) > 0) { |
|
|
|
ratio = hundred; |
|
|
|
} |
|
|
|
entity.setGovernRatio(ratio); |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
@ -649,9 +693,13 @@ 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)); |
|
|
|
entity.setResolvedCount(dto.getCount()); |
|
|
|
entity.setClosedCount(dto.getSum()); |
|
|
|
BigDecimal ratio = count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP); |
|
|
|
if (ratio.compareTo(hundred) > 0) { |
|
|
|
ratio = hundred; |
|
|
|
} |
|
|
|
entity.setResolvedRatio(ratio); |
|
|
|
} |
|
|
|
})); |
|
|
|
} |
|
|
|