|
@ -67,12 +67,16 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService |
|
|
//1、党员参与议事
|
|
|
//1、党员参与议事
|
|
|
entity.setIssueTotal(calPartyPartiIssueTotal(customerId,gridId,null,null,NumConstant.ONE_STR)); |
|
|
entity.setIssueTotal(calPartyPartiIssueTotal(customerId,gridId,null,null,NumConstant.ONE_STR)); |
|
|
log.info("extractGridPioneerData 当前网格id=" + gridId + ";党员参与议事issueTotal="+entity.getIssueTotal()); |
|
|
log.info("extractGridPioneerData 当前网格id=" + gridId + ";党员参与议事issueTotal="+entity.getIssueTotal()); |
|
|
|
|
|
|
|
|
|
|
|
//01.12新增:平台参与议事总数
|
|
|
|
|
|
int issueTotal=calPartyPartiIssueTotal(customerId,gridId,null,null,null); |
|
|
|
|
|
entity.setPlatIssueTotal(issueTotal); |
|
|
|
|
|
log.info("extractGridPioneerData 当前网格id=" + gridId + ";参与议事总数issueTotal=" + issueTotal); |
|
|
|
|
|
|
|
|
|
|
|
//2、党员参与议事占比
|
|
|
if(entity.getIssueTotal()==0){ |
|
|
if(entity.getIssueTotal()==0){ |
|
|
entity.setIssueRatio(BigDecimal.ZERO); |
|
|
entity.setIssueRatio(BigDecimal.ZERO); |
|
|
}else{ |
|
|
}else{ |
|
|
//2、党员参与议事占比
|
|
|
|
|
|
int issueTotal=calPartyPartiIssueTotal(customerId,gridId,null,null,null); |
|
|
|
|
|
log.info("extractGridPioneerData 当前网格id=" + gridId + ";参与议事总数issueTotal=" + issueTotal); |
|
|
|
|
|
BigDecimal issueRatio = new BigDecimal((double) entity.getIssueTotal() / issueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)); |
|
|
BigDecimal issueRatio = new BigDecimal((double) entity.getIssueTotal() / issueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)); |
|
|
log.info("extractGridPioneerData 当前网格id=" + gridId + ";issueRatio=" + issueRatio); |
|
|
log.info("extractGridPioneerData 当前网格id=" + gridId + ";issueRatio=" + issueRatio); |
|
|
entity.setIssueRatio(issueRatio.setScale(NumConstant.SIX,RoundingMode.HALF_UP)); |
|
|
entity.setIssueRatio(issueRatio.setScale(NumConstant.SIX,RoundingMode.HALF_UP)); |
|
@ -81,13 +85,17 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService |
|
|
//3、党员发布话题:
|
|
|
//3、党员发布话题:
|
|
|
entity.setTopicTotal(getTopicTotal(customerId, gridId, null)); |
|
|
entity.setTopicTotal(getTopicTotal(customerId, gridId, null)); |
|
|
log.info("extractGridPioneerData 当前网格id=" + gridId + ";党员发布话题topicTotal"+entity.getTopicTotal()); |
|
|
log.info("extractGridPioneerData 当前网格id=" + gridId + ";党员发布话题topicTotal"+entity.getTopicTotal()); |
|
|
|
|
|
|
|
|
|
|
|
//当前网格内所有话题总数
|
|
|
|
|
|
int gridTopicTotal = getGridOrCommunityTopicTotal(customerId, gridId, null); |
|
|
|
|
|
log.info("extractGridPioneerData 当前网格id=" + gridId + ";当前网格内所有话题总数gridTopicTotal="+gridTopicTotal); |
|
|
|
|
|
//01.12新增:PLAT_TOPIC_TOTAL 当前组织维度,话题总数
|
|
|
|
|
|
entity.setPlatTopicTotal(gridTopicTotal); |
|
|
|
|
|
|
|
|
//4、党员发布话题占比: 网格内注册党员发布的话题总数占 网格内话题总数的 比率
|
|
|
//4、党员发布话题占比: 网格内注册党员发布的话题总数占 网格内话题总数的 比率
|
|
|
if (entity.getTopicTotal() == NumConstant.ZERO) { |
|
|
if (entity.getTopicTotal() == NumConstant.ZERO) { |
|
|
entity.setTopicRatio(BigDecimal.ZERO); |
|
|
entity.setTopicRatio(BigDecimal.ZERO); |
|
|
} else { |
|
|
} else { |
|
|
//当前网格内所有话题总数
|
|
|
|
|
|
int gridTopicTotal = getGridOrCommunityTopicTotal(customerId, gridId, null); |
|
|
|
|
|
log.info("extractGridPioneerData 当前网格id=" + gridId + ";当前网格内所有话题总数gridTopicTotal="+gridTopicTotal); |
|
|
|
|
|
if(gridTopicTotal == NumConstant.ZERO){ |
|
|
if(gridTopicTotal == NumConstant.ZERO){ |
|
|
entity.setTopicRatio(BigDecimal.ZERO); |
|
|
entity.setTopicRatio(BigDecimal.ZERO); |
|
|
}else{ |
|
|
}else{ |
|
@ -100,6 +108,9 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService |
|
|
//当前网格内所有议题总数
|
|
|
//当前网格内所有议题总数
|
|
|
int gridIssueTotal = getGridOrCommunityIssueTotal(customerId, gridId, null); |
|
|
int gridIssueTotal = getGridOrCommunityIssueTotal(customerId, gridId, null); |
|
|
log.info("extractGridPioneerData 当前网格id=" + gridId + ";当前网格内所有议题总数=" + gridIssueTotal); |
|
|
log.info("extractGridPioneerData 当前网格id=" + gridId + ";当前网格内所有议题总数=" + gridIssueTotal); |
|
|
|
|
|
//01.12新增:PLAT_PUBLISH_ISSUE_TOTAL 当前组织维度,发布议题总数
|
|
|
|
|
|
entity.setPlatPublishIssueTotal(gridIssueTotal); |
|
|
|
|
|
|
|
|
if (gridIssueTotal != NumConstant.ZERO) { |
|
|
if (gridIssueTotal != NumConstant.ZERO) { |
|
|
//5、党员发布议题
|
|
|
//5、党员发布议题
|
|
|
entity.setPublishIssueTotal(getParyPublishIssueTotal(customerId, gridId, null)); |
|
|
entity.setPublishIssueTotal(getParyPublishIssueTotal(customerId, gridId, null)); |
|
@ -135,12 +146,16 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService |
|
|
// 9、已解决项目
|
|
|
// 9、已解决项目
|
|
|
entity.setResolvedProjectTotal(getGridOrCommunityClosedProjectTotal(customerId, gridId, null, DimObjectStatusConstant.RESOLVED)); |
|
|
entity.setResolvedProjectTotal(getGridOrCommunityClosedProjectTotal(customerId, gridId, null, DimObjectStatusConstant.RESOLVED)); |
|
|
log.info("extractGridPioneerData 当前网格id="+gridId+";已解决项目resolvedProjectTotal="+entity.getResolvedProjectTotal()); |
|
|
log.info("extractGridPioneerData 当前网格id="+gridId+";已解决项目resolvedProjectTotal="+entity.getResolvedProjectTotal()); |
|
|
|
|
|
|
|
|
|
|
|
int closedProjectTotal = getGridOrCommunityClosedProjectTotal(customerId, gridId, null, null); |
|
|
|
|
|
log.info("extractGridPioneerData 当前网格id="+gridId+";总结项目closedProjectTotal="+closedProjectTotal); |
|
|
|
|
|
// 01.12新增:PLAT_CLOSED_PROJECT_TOTAL 当前组织维度,所有结案项目数
|
|
|
|
|
|
entity.setPlatClosedProjectTotal(closedProjectTotal); |
|
|
|
|
|
|
|
|
|
|
|
// 10、占总结项目
|
|
|
if (entity.getResolvedProjectTotal() == NumConstant.ZERO) { |
|
|
if (entity.getResolvedProjectTotal() == NumConstant.ZERO) { |
|
|
entity.setResolvedProjectRatio(BigDecimal.ZERO); |
|
|
entity.setResolvedProjectRatio(BigDecimal.ZERO); |
|
|
} else { |
|
|
} else { |
|
|
// 10、占总结项目
|
|
|
|
|
|
int closedProjectTotal = getGridOrCommunityClosedProjectTotal(customerId, gridId, null, null); |
|
|
|
|
|
log.info("extractGridPioneerData 当前网格id="+gridId+";总结项目closedProjectTotal="+closedProjectTotal); |
|
|
|
|
|
if(closedProjectTotal == NumConstant.ZERO){ |
|
|
if(closedProjectTotal == NumConstant.ZERO){ |
|
|
entity.setResolvedProjectRatio(BigDecimal.ZERO); |
|
|
entity.setResolvedProjectRatio(BigDecimal.ZERO); |
|
|
}else { |
|
|
}else { |
|
@ -148,6 +163,16 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService |
|
|
entity.setResolvedProjectRatio(resolvedProjectRatio.setScale(NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
entity.setResolvedProjectRatio(resolvedProjectRatio.setScale(NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
//01.12: 新增指标:平台参与议事总人数、平台参与议事党员数、平台参与议事的党员占比
|
|
|
|
|
|
entity.setPlatJoinUserTotal(factOriginIssueLogDailyService.calPlatJoinUserTotal(customerId, gridId, null, null,null)); |
|
|
|
|
|
entity.setPlatJoinPartyTotal(factOriginIssueLogDailyService.calPlatJoinUserTotal(customerId, gridId, null, null,NumConstant.ONE_STR)); |
|
|
|
|
|
if (entity.getPlatJoinPartyTotal() == NumConstant.ZERO) { |
|
|
|
|
|
entity.setPlatJoinPartyRatio(BigDecimal.ZERO); |
|
|
|
|
|
} else { |
|
|
|
|
|
BigDecimal platJoinPartyRatio = new BigDecimal((double) entity.getPlatJoinPartyTotal() / entity.getPlatJoinUserTotal()).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)); |
|
|
|
|
|
entity.setPlatJoinPartyRatio(platJoinPartyRatio.setScale(NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
screenPioneerDataService.delAndSavePioneerData(customerId, OrgTypeConstant.GRID, IndexCalConstant.DELETE_SIZE, gridList); |
|
|
screenPioneerDataService.delAndSavePioneerData(customerId, OrgTypeConstant.GRID, IndexCalConstant.DELETE_SIZE, gridList); |
|
|
} |
|
|
} |
|
@ -184,31 +209,42 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService |
|
|
//1、党员参与议事
|
|
|
//1、党员参与议事
|
|
|
entity.setIssueTotal(calPartyPartiIssueTotal(customerId,null,communityId,null,NumConstant.ONE_STR)); |
|
|
entity.setIssueTotal(calPartyPartiIssueTotal(customerId,null,communityId,null,NumConstant.ONE_STR)); |
|
|
log.info("extractCommunityPioneerData 当前communityId="+communityId+";党员参与议事issueTotal="+entity.getIssueTotal()); |
|
|
log.info("extractCommunityPioneerData 当前communityId="+communityId+";党员参与议事issueTotal="+entity.getIssueTotal()); |
|
|
|
|
|
|
|
|
|
|
|
//01.12新增
|
|
|
|
|
|
int issueTotal=calPartyPartiIssueTotal(customerId,null,communityId,null,null); |
|
|
|
|
|
log.info("extractCommunityPioneerData 当前communityId="+communityId+";参与议事总数issueTotal="+issueTotal); |
|
|
|
|
|
entity.setPlatIssueTotal(issueTotal); |
|
|
|
|
|
|
|
|
if(entity.getIssueTotal()==0){ |
|
|
if(entity.getIssueTotal()==0){ |
|
|
entity.setIssueRatio(BigDecimal.ZERO); |
|
|
entity.setIssueRatio(BigDecimal.ZERO); |
|
|
}else{ |
|
|
}else{ |
|
|
//2、党员参与议事占比
|
|
|
//2、党员参与议事占比
|
|
|
int issueTotal=calPartyPartiIssueTotal(customerId,null,communityId,null,null); |
|
|
|
|
|
log.info("extractCommunityPioneerData 当前communityId="+communityId+";参与议事总数issueTotal="+issueTotal); |
|
|
|
|
|
entity.setIssueRatio(new BigDecimal((double)entity.getIssueTotal()/issueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.SIX,RoundingMode.HALF_UP)); |
|
|
entity.setIssueRatio(new BigDecimal((double)entity.getIssueTotal()/issueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.SIX,RoundingMode.HALF_UP)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//3、党员发布话题:
|
|
|
//3、党员发布话题:
|
|
|
entity.setTopicTotal(getTopicTotal(customerId, null, communityId)); |
|
|
entity.setTopicTotal(getTopicTotal(customerId, null, communityId)); |
|
|
log.info("extractCommunityPioneerData 当前communityId="+communityId+";党员发布话题topicTotal="+entity.getTopicTotal()); |
|
|
log.info("extractCommunityPioneerData 当前communityId="+communityId+";党员发布话题topicTotal="+entity.getTopicTotal()); |
|
|
|
|
|
|
|
|
|
|
|
//01.12新增
|
|
|
|
|
|
//当前社区内所有话题总数
|
|
|
|
|
|
int communityTopicTotal = getGridOrCommunityTopicTotal(customerId, null, communityId); |
|
|
|
|
|
log.info("extractCommunityPioneerData 当前communityId="+communityId+";当前社区内所有话题总数communityTopicTotal="+communityTopicTotal); |
|
|
|
|
|
entity.setPlatTopicTotal(communityTopicTotal); |
|
|
|
|
|
|
|
|
//4、党员发布话题占比: 社区内注册党员发布的话题总数占 社区内话题总数的 比率
|
|
|
//4、党员发布话题占比: 社区内注册党员发布的话题总数占 社区内话题总数的 比率
|
|
|
if (entity.getTopicTotal() == NumConstant.ZERO) { |
|
|
if (entity.getTopicTotal() == NumConstant.ZERO) { |
|
|
entity.setTopicRatio(BigDecimal.ZERO); |
|
|
entity.setTopicRatio(BigDecimal.ZERO); |
|
|
} else { |
|
|
} else { |
|
|
//当前社区内所有话题总数
|
|
|
|
|
|
int communityTopicTotal = getGridOrCommunityTopicTotal(customerId, null, communityId); |
|
|
|
|
|
log.info("extractCommunityPioneerData 当前communityId="+communityId+";当前社区内所有话题总数communityTopicTotal="+communityTopicTotal); |
|
|
|
|
|
entity.setTopicRatio(communityTopicTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal((double)entity.getTopicTotal() / communityTopicTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
entity.setTopicRatio(communityTopicTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal((double)entity.getTopicTotal() / communityTopicTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//01.12新增
|
|
|
//当前社区内所有议题总数
|
|
|
//当前社区内所有议题总数
|
|
|
int communityIssueTotal = getGridOrCommunityIssueTotal(customerId, null, communityId); |
|
|
int communityIssueTotal = getGridOrCommunityIssueTotal(customerId, null, communityId); |
|
|
log.info("extractCommunityPioneerData 当前communityId="+communityId+";当前社区内所有议题总数communityIssueTotal="+communityIssueTotal); |
|
|
log.info("extractCommunityPioneerData 当前communityId="+communityId+";当前社区内所有议题总数communityIssueTotal="+communityIssueTotal); |
|
|
|
|
|
entity.setPlatPublishIssueTotal(communityIssueTotal); |
|
|
|
|
|
|
|
|
if (communityIssueTotal != NumConstant.ZERO) { |
|
|
if (communityIssueTotal != NumConstant.ZERO) { |
|
|
//5、党员发布议题
|
|
|
//5、党员发布议题
|
|
|
entity.setPublishIssueTotal(getParyPublishIssueTotal(customerId, null, communityId)); |
|
|
entity.setPublishIssueTotal(getParyPublishIssueTotal(customerId, null, communityId)); |
|
@ -236,14 +272,28 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService |
|
|
// 9、已解决项目
|
|
|
// 9、已解决项目
|
|
|
entity.setResolvedProjectTotal(getGridOrCommunityClosedProjectTotal(customerId, null, communityId, DimObjectStatusConstant.RESOLVED)); |
|
|
entity.setResolvedProjectTotal(getGridOrCommunityClosedProjectTotal(customerId, null, communityId, DimObjectStatusConstant.RESOLVED)); |
|
|
log.info("extractCommunityPioneerData 当前communityId="+communityId+";已解决项目resolvedProjectTotal="+entity.getResolvedProjectTotal()); |
|
|
log.info("extractCommunityPioneerData 当前communityId="+communityId+";已解决项目resolvedProjectTotal="+entity.getResolvedProjectTotal()); |
|
|
|
|
|
|
|
|
|
|
|
//01.12新增
|
|
|
|
|
|
int closedProjectTotal = getGridOrCommunityClosedProjectTotal(customerId, null, communityId, null); |
|
|
|
|
|
log.info("extractCommunityPioneerData 当前communityId="+communityId+";总结项目closedProjectTotal="+closedProjectTotal); |
|
|
|
|
|
entity.setPlatClosedProjectTotal(closedProjectTotal); |
|
|
|
|
|
|
|
|
if (entity.getResolvedProjectTotal() == NumConstant.ZERO) { |
|
|
if (entity.getResolvedProjectTotal() == NumConstant.ZERO) { |
|
|
entity.setResolvedProjectRatio(BigDecimal.ZERO); |
|
|
entity.setResolvedProjectRatio(BigDecimal.ZERO); |
|
|
} else { |
|
|
} else { |
|
|
// 10、占总结项目
|
|
|
// 10、占总结项目
|
|
|
int closedProjectTotal = getGridOrCommunityClosedProjectTotal(customerId, null, communityId, null); |
|
|
|
|
|
log.info("extractCommunityPioneerData 当前communityId="+communityId+";总结项目closedProjectTotal="+closedProjectTotal); |
|
|
|
|
|
entity.setResolvedProjectRatio(closedProjectTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal((double)entity.getResolvedProjectTotal() / closedProjectTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
entity.setResolvedProjectRatio(closedProjectTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal((double)entity.getResolvedProjectTotal() / closedProjectTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//01.12: 新增指标:平台参与议事总人数、平台参与议事党员数、平台参与议事的党员占比
|
|
|
|
|
|
entity.setPlatJoinUserTotal(factOriginIssueLogDailyService.calPlatJoinUserTotal(customerId, null, communityId,null, null)); |
|
|
|
|
|
entity.setPlatJoinPartyTotal(factOriginIssueLogDailyService.calPlatJoinUserTotal(customerId, null, communityId,null, NumConstant.ONE_STR)); |
|
|
|
|
|
if (entity.getPlatJoinPartyTotal() == NumConstant.ZERO) { |
|
|
|
|
|
entity.setPlatJoinPartyRatio(BigDecimal.ZERO); |
|
|
|
|
|
} else { |
|
|
|
|
|
BigDecimal platJoinPartyRatio = new BigDecimal((double) entity.getPlatJoinPartyTotal() / entity.getPlatJoinUserTotal()).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)); |
|
|
|
|
|
entity.setPlatJoinPartyRatio(platJoinPartyRatio.setScale(NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
|
|
|
} |
|
|
}); |
|
|
}); |
|
|
screenPioneerDataService.delAndSavePioneerData(customerId, OrgTypeConstant.AGENCY, IndexCalConstant.DELETE_SIZE, communityList); |
|
|
screenPioneerDataService.delAndSavePioneerData(customerId, OrgTypeConstant.AGENCY, IndexCalConstant.DELETE_SIZE, communityList); |
|
|
} |
|
|
} |
|
@ -267,31 +317,42 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService |
|
|
//1、党员参与议事
|
|
|
//1、党员参与议事
|
|
|
entity.setIssueTotal(calPartyPartiIssueTotal(customerId,null,null,entity.getAgencyPath(),NumConstant.ONE_STR)); |
|
|
entity.setIssueTotal(calPartyPartiIssueTotal(customerId,null,null,entity.getAgencyPath(),NumConstant.ONE_STR)); |
|
|
log.info("extractExceptCommunityPioneerData 党员参与议事issueTotal="+entity.getIssueTotal()); |
|
|
log.info("extractExceptCommunityPioneerData 党员参与议事issueTotal="+entity.getIssueTotal()); |
|
|
|
|
|
|
|
|
|
|
|
//01.12新增
|
|
|
|
|
|
int issueTotal=calPartyPartiIssueTotal(customerId,null,null,entity.getAgencyPath(),null); |
|
|
|
|
|
log.info("extractExceptCommunityPioneerData 平台参与议事issueTotal="+issueTotal); |
|
|
|
|
|
entity.setPlatIssueTotal(issueTotal); |
|
|
|
|
|
|
|
|
if(entity.getIssueTotal()==0){ |
|
|
if(entity.getIssueTotal()==0){ |
|
|
entity.setIssueRatio(BigDecimal.ZERO); |
|
|
entity.setIssueRatio(BigDecimal.ZERO); |
|
|
}else{ |
|
|
}else{ |
|
|
//2、党员参与议事占比
|
|
|
//2、党员参与议事占比
|
|
|
int issueTotal=calPartyPartiIssueTotal(customerId,null,null,entity.getAgencyPath(),null); |
|
|
|
|
|
log.info("extractExceptCommunityPioneerData 平台参与议事issueTotal="+issueTotal); |
|
|
|
|
|
entity.setIssueRatio(new BigDecimal((double)entity.getIssueTotal()/issueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.SIX,RoundingMode.HALF_UP)); |
|
|
entity.setIssueRatio(new BigDecimal((double)entity.getIssueTotal()/issueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.SIX,RoundingMode.HALF_UP)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//3、党员发布话题:
|
|
|
//3、党员发布话题:
|
|
|
entity.setTopicTotal(getAgencyTopicTotal(customerId, entity.getAgencyPath(),NumConstant.ONE_STR)); |
|
|
entity.setTopicTotal(getAgencyTopicTotal(customerId, entity.getAgencyPath(),NumConstant.ONE_STR)); |
|
|
log.info("extractExceptCommunityPioneerData 党员发布话题topicTotal="+entity.getTopicTotal()); |
|
|
log.info("extractExceptCommunityPioneerData 党员发布话题topicTotal="+entity.getTopicTotal()); |
|
|
|
|
|
|
|
|
|
|
|
//01.12新增
|
|
|
|
|
|
//当前组织内所有话题总数
|
|
|
|
|
|
int agencyTopicTotal = getAgencyTopicTotal(customerId, entity.getAgencyPath(),null); |
|
|
|
|
|
log.info("extractExceptCommunityPioneerData 当前组织内所有话题总数agencyTopicTotal="+agencyTopicTotal); |
|
|
|
|
|
entity.setPlatTopicTotal(agencyTopicTotal); |
|
|
|
|
|
|
|
|
//4、党员发布话题占比: 组织内注册党员发布的话题总数占 组织内话题总数的 比率
|
|
|
//4、党员发布话题占比: 组织内注册党员发布的话题总数占 组织内话题总数的 比率
|
|
|
if (entity.getTopicTotal() == NumConstant.ZERO) { |
|
|
if (entity.getTopicTotal() == NumConstant.ZERO) { |
|
|
entity.setTopicRatio(BigDecimal.ZERO); |
|
|
entity.setTopicRatio(BigDecimal.ZERO); |
|
|
} else { |
|
|
} else { |
|
|
//当前组织内所有话题总数
|
|
|
|
|
|
int agencyTopicTotal = getAgencyTopicTotal(customerId, entity.getAgencyPath(),null); |
|
|
|
|
|
log.info("extractExceptCommunityPioneerData 当前组织内所有话题总数agencyTopicTotal="+agencyTopicTotal); |
|
|
|
|
|
entity.setTopicRatio(agencyTopicTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal((double)entity.getTopicTotal() / agencyTopicTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
entity.setTopicRatio(agencyTopicTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal((double)entity.getTopicTotal() / agencyTopicTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//01.12新增
|
|
|
//当前组织内所有议题总数
|
|
|
//当前组织内所有议题总数
|
|
|
int agencyIssueTotal = getAgencyIssueTotal(customerId, entity.getAgencyPath()); |
|
|
int agencyIssueTotal = getAgencyIssueTotal(customerId, entity.getAgencyPath()); |
|
|
log.info("extractExceptCommunityPioneerData 当前组织内所有议题总数agencyIssueTotal="+agencyIssueTotal); |
|
|
log.info("extractExceptCommunityPioneerData 当前组织内所有议题总数agencyIssueTotal="+agencyIssueTotal); |
|
|
|
|
|
entity.setPlatPublishIssueTotal(agencyIssueTotal); |
|
|
|
|
|
|
|
|
if (agencyIssueTotal != NumConstant.ZERO) { |
|
|
if (agencyIssueTotal != NumConstant.ZERO) { |
|
|
//5、党员发布议题
|
|
|
//5、党员发布议题
|
|
|
entity.setPublishIssueTotal(getAgencyParyPublishIssueTotal(customerId, entity.getAgencyPath())); |
|
|
entity.setPublishIssueTotal(getAgencyParyPublishIssueTotal(customerId, entity.getAgencyPath())); |
|
@ -319,14 +380,29 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService |
|
|
// 9、已解决项目
|
|
|
// 9、已解决项目
|
|
|
entity.setResolvedProjectTotal(getAgencyClosedProjectTotal(customerId, entity.getAgencyPath(), DimObjectStatusConstant.RESOLVED)); |
|
|
entity.setResolvedProjectTotal(getAgencyClosedProjectTotal(customerId, entity.getAgencyPath(), DimObjectStatusConstant.RESOLVED)); |
|
|
log.info("extractExceptCommunityPioneerData 已解决项目resolvedProjectTotal="+entity.getResolvedProjectTotal()); |
|
|
log.info("extractExceptCommunityPioneerData 已解决项目resolvedProjectTotal="+entity.getResolvedProjectTotal()); |
|
|
|
|
|
|
|
|
|
|
|
//01.12新增
|
|
|
|
|
|
int closedProjectTotal = getAgencyClosedProjectTotal(customerId, entity.getAgencyPath(), null); |
|
|
|
|
|
log.info("extractExceptCommunityPioneerData 总结项目closedProjectTotal="+closedProjectTotal); |
|
|
|
|
|
entity.setPlatClosedProjectTotal(closedProjectTotal); |
|
|
|
|
|
|
|
|
if (entity.getResolvedProjectTotal() == NumConstant.ZERO) { |
|
|
if (entity.getResolvedProjectTotal() == NumConstant.ZERO) { |
|
|
entity.setResolvedProjectRatio(BigDecimal.ZERO); |
|
|
entity.setResolvedProjectRatio(BigDecimal.ZERO); |
|
|
} else { |
|
|
} else { |
|
|
// 10、占总结项目
|
|
|
// 10、占总结项目
|
|
|
int closedProjectTotal = getAgencyClosedProjectTotal(customerId, entity.getAgencyPath(), null); |
|
|
|
|
|
log.info("extractExceptCommunityPioneerData 总结项目closedProjectTotal="+closedProjectTotal); |
|
|
|
|
|
entity.setResolvedProjectRatio(closedProjectTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal((double)entity.getResolvedProjectTotal() / closedProjectTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
entity.setResolvedProjectRatio(closedProjectTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal((double)entity.getResolvedProjectTotal() / closedProjectTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//01.12: 新增指标:平台参与议事总人数、平台参与议事党员数、平台参与议事的党员占比
|
|
|
|
|
|
entity.setPlatJoinUserTotal(factOriginIssueLogDailyService.calPlatJoinUserTotal(customerId, null, null, entity.getAgencyPath(), null)); |
|
|
|
|
|
entity.setPlatJoinPartyTotal(factOriginIssueLogDailyService.calPlatJoinUserTotal(customerId, null, null, entity.getAgencyPath(), NumConstant.ONE_STR)); |
|
|
|
|
|
if (entity.getPlatJoinPartyTotal() == NumConstant.ZERO) { |
|
|
|
|
|
entity.setPlatJoinPartyRatio(BigDecimal.ZERO); |
|
|
|
|
|
} else { |
|
|
|
|
|
BigDecimal platJoinPartyRatio = new BigDecimal((double) entity.getPlatJoinPartyTotal() / entity.getPlatJoinUserTotal()).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)); |
|
|
|
|
|
entity.setPlatJoinPartyRatio(platJoinPartyRatio.setScale(NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
screenPioneerDataService.delAndSavePioneerData(customerId, OrgTypeConstant.AGENCY, IndexCalConstant.DELETE_SIZE, agencyList); |
|
|
screenPioneerDataService.delAndSavePioneerData(customerId, OrgTypeConstant.AGENCY, IndexCalConstant.DELETE_SIZE, agencyList); |
|
|
|
|
|
|
|
|