Browse Source

办结率分母非空判断

dev_shibei_match
wangchao 5 years ago
parent
commit
cef5c26a12
  1. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollCommunityServiceImpl.java

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

@ -134,18 +134,18 @@ public class IndexCollCommunityServiceImpl implements IndexCollCommunityService
BigDecimal element = new BigDecimal(entity.getClosedProjectCount());
//分母,即机关参与过的项目数(去重)
Integer denominator = agencyParticipatedCount.get(entity.getAgencyId());
if (agencyParticipatedCount.get(entity.getAgencyId()) != NumConstant.ZERO) {
if (null != denominator && denominator != NumConstant.ZERO) {
//办结率
entity.setClosedProjectRatio(
element.divide(new BigDecimal(denominator), NumConstant.SIX, RoundingMode.HALF_UP)
);
}else{
entity.setClosedProjectRatio(BigDecimal.ZERO);
}
//办结效率
entity.setHandleProjectRatio(efficiencyMap.get(entity.getAgencyId()));
});
factIndexGovrnAblityOrgMonthlyService.deleteByCustomer(customerId, dimId.getMonthId(), OrgTypeConstant.COMMUNITY);
factIndexGovrnAblityOrgMonthlyService.saveList(list);

Loading…
Cancel
Save