Browse Source

办结效率为空时放入默认值0

dev_shibei_match
wangchao 5 years ago
parent
commit
9e3a4228ca
  1. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollCommunityServiceImpl.java
  2. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollStreetServiceImpl.java

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollCommunityServiceImpl.java

@ -26,6 +26,7 @@ import java.math.RoundingMode;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
@ -143,7 +144,8 @@ public class IndexCollCommunityServiceImpl implements IndexCollCommunityService
entity.setClosedProjectRatio(BigDecimal.ZERO); entity.setClosedProjectRatio(BigDecimal.ZERO);
} }
//办结效率 //办结效率
entity.setHandleProjectRatio(efficiencyMap.get(entity.getAgencyId())); entity.setHandleProjectRatio(Optional.ofNullable(efficiencyMap.get(entity.getAgencyId())).orElse(BigDecimal.ZERO));
}); });
factIndexGovrnAblityOrgMonthlyService.deleteByCustomer(customerId, dimId.getMonthId(), OrgTypeConstant.COMMUNITY); factIndexGovrnAblityOrgMonthlyService.deleteByCustomer(customerId, dimId.getMonthId(), OrgTypeConstant.COMMUNITY);

7
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollStreetServiceImpl.java

@ -26,6 +26,7 @@ import java.math.RoundingMode;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
@ -125,14 +126,16 @@ public class IndexCollStreetServiceImpl implements IndexCollStreetService {
BigDecimal element = new BigDecimal(entity.getClosedProjectCount()); BigDecimal element = new BigDecimal(entity.getClosedProjectCount());
//分母,即机关参与过的项目数(去重) //分母,即机关参与过的项目数(去重)
Integer denominator = agencyParticipatedCount.get(entity.getAgencyId()); Integer denominator = agencyParticipatedCount.get(entity.getAgencyId());
if (agencyParticipatedCount.get(entity.getAgencyId()) != NumConstant.ZERO) { if (null != denominator && denominator != NumConstant.ZERO) {
//办结率 //办结率
entity.setClosedProjectRatio( entity.setClosedProjectRatio(
element.divide(new BigDecimal(denominator), NumConstant.SIX, RoundingMode.HALF_UP) element.divide(new BigDecimal(denominator), NumConstant.SIX, RoundingMode.HALF_UP)
); );
}else{
entity.setClosedProjectRatio(BigDecimal.ZERO);
} }
//办结效率 //办结效率
entity.setHandleProjectRatio(efficiencyMap.get(entity.getAgencyId())); entity.setHandleProjectRatio(Optional.ofNullable(efficiencyMap.get(entity.getAgencyId())).orElse(BigDecimal.ZERO));
}); });
factIndexGovrnAblityOrgMonthlyService.deleteByCustomer(customerId, dimId.getMonthId(), OrgTypeConstant.STREET); factIndexGovrnAblityOrgMonthlyService.deleteByCustomer(customerId, dimId.getMonthId(), OrgTypeConstant.STREET);

Loading…
Cancel
Save