|
|
@ -71,7 +71,8 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService |
|
|
|
}else{ |
|
|
|
//2、党员参与议事占比
|
|
|
|
int issueTotal=calPartyPartiIssueTotal(customerId,gridId,null,null,null); |
|
|
|
entity.setIssueRatio(new BigDecimal(entity.getIssueTotal()/issueTotal).setScale(NumConstant.SIX,RoundingMode.HALF_UP)); |
|
|
|
BigDecimal issueRatio=new BigDecimal(entity.getIssueTotal()/issueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)); |
|
|
|
entity.setIssueRatio(issueRatio.setScale(NumConstant.SIX,RoundingMode.HALF_UP)); |
|
|
|
} |
|
|
|
|
|
|
|
//3、党员发布话题:
|
|
|
@ -82,7 +83,12 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService |
|
|
|
} else { |
|
|
|
//当前网格内所有话题总数
|
|
|
|
int gridTopicTotal = getGridOrCommunityTopicTotal(customerId, gridId, null); |
|
|
|
entity.setTopicRatio(gridTopicTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getTopicTotal() / gridTopicTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
|
if(gridTopicTotal == NumConstant.ZERO){ |
|
|
|
entity.setTopicRatio(BigDecimal.ZERO); |
|
|
|
}else{ |
|
|
|
BigDecimal topicRatio=new BigDecimal(entity.getTopicTotal() / gridTopicTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)); |
|
|
|
entity.setTopicRatio(topicRatio.setScale(NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//当前网格内所有议题总数
|
|
|
@ -93,13 +99,21 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService |
|
|
|
//6、党员发布议题占比 : 占网格内所有议题的比率
|
|
|
|
if (entity.getPublishIssueTotal() == NumConstant.ZERO) { |
|
|
|
entity.setPublishIssueRatio(BigDecimal.ZERO); |
|
|
|
}else{ |
|
|
|
BigDecimal publishIssueRatio=new BigDecimal(entity.getPublishIssueTotal() / gridIssueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)); |
|
|
|
entity.setPublishIssueRatio(publishIssueRatio.setScale(NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
|
} |
|
|
|
entity.setPublishIssueRatio(gridIssueTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getPublishIssueTotal() / gridIssueTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
|
|
|
|
|
//7、议题转项目数
|
|
|
|
entity.setShiftProjectTotal(getGridOrCommunityShiftProjectTotal(customerId, gridId, null)); |
|
|
|
//8、议题转项目占比 : 占网格内议题总数的比率
|
|
|
|
entity.setShiftProjectRatio(entity.getShiftProjectTotal() == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getShiftProjectTotal() / gridIssueTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
|
if(entity.getShiftProjectTotal() == NumConstant.ZERO){ |
|
|
|
entity.setShiftProjectRatio(BigDecimal.ZERO); |
|
|
|
}else{ |
|
|
|
BigDecimal shiftProjectRatio=new BigDecimal(entity.getShiftProjectTotal() / gridIssueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)); |
|
|
|
entity.setShiftProjectRatio(shiftProjectRatio.setScale(NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
|
} |
|
|
|
|
|
|
|
}else{ |
|
|
|
// log.info("当前网格内所有议题总数="+gridIssueTotal);
|
|
|
|
entity.setPublishIssueTotal(NumConstant.ZERO); |
|
|
@ -116,7 +130,12 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService |
|
|
|
} else { |
|
|
|
// 10、占总结项目
|
|
|
|
int closedProjectTotal = getGridOrCommunityClosedProjectTotal(customerId, gridId, null, null); |
|
|
|
entity.setResolvedProjectRatio(closedProjectTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getResolvedProjectTotal() / closedProjectTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
|
if(closedProjectTotal == NumConstant.ZERO){ |
|
|
|
entity.setResolvedProjectRatio(BigDecimal.ZERO); |
|
|
|
}else { |
|
|
|
BigDecimal resolvedProjectRatio=new BigDecimal(entity.getResolvedProjectTotal() / closedProjectTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)); |
|
|
|
entity.setResolvedProjectRatio(resolvedProjectRatio.setScale(NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
screenPioneerDataService.delAndSavePioneerData(customerId, OrgTypeConstant.GRID, IndexCalConstant.DELETE_SIZE, gridList); |
|
|
|