|
|
@ -128,15 +128,16 @@ public class IndexCollStreetServiceImpl implements IndexCollStreetService { |
|
|
|
//办结数
|
|
|
|
List<String> agencies = agencyList.stream().map(DimAgencyDTO :: getId).distinct().collect(Collectors.toList()); |
|
|
|
Map<String, Integer> agencyHandleCount = factOriginProjectLogDailyService.getProjectHandledAgency(agencies,customerId,dimId.getMonthId(),"month"); |
|
|
|
Map<String,Integer> agencyParticipatedCount = factOriginProjectLogDailyService.getCountOfDealingAgency(agencies,customerId,dimId.getMonthId(),"month"); |
|
|
|
|
|
|
|
Map<String,BigDecimal> efficiencyMap = factOriginProjectLogDailyService.getAgencyWorkPieceRatio(agencies,customerId,dimId.getMonthId(),"month"); |
|
|
|
list.forEach(entity ->{ |
|
|
|
entity.setClosedProjectCount(agencyHandleCount.get(entity.getAgencyId()) == null? NumConstant.ZERO : agencyHandleCount.get(entity.getAgencyId())); |
|
|
|
BigDecimal element = new BigDecimal(entity.getClosedProjectCount()); |
|
|
|
//分母,即机关参与过的项目数(去重)
|
|
|
|
Integer denominator = agencyParticipatedCount.get(entity.getAgencyId()); |
|
|
|
//分母,吹哨次数
|
|
|
|
Integer denominator = entity.getTransferedCount(); |
|
|
|
if (null != denominator && denominator != NumConstant.ZERO) { |
|
|
|
//办结率
|
|
|
|
//“评价周期内被吹哨且办结的项目数”/“评价周期内被吹哨的所有项目数”
|
|
|
|
entity.setClosedProjectRatio( |
|
|
|
element.divide(new BigDecimal(denominator), NumConstant.SIX, RoundingMode.HALF_UP) |
|
|
|
); |
|
|
|