|
|
@ -106,7 +106,7 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService |
|
|
|
//当前网格内所有议题总数
|
|
|
|
int gridIssueTotal = getGridOrCommunityIssueTotal(customerId, gridId, null,StrConstant.EPMETY_STR); |
|
|
|
log.info("extractGridPioneerData 当前网格id=" + gridId + ";当前网格内所有议题总数=" + gridIssueTotal); |
|
|
|
// 3.2当前组织维度,发布议题总数,PUBLISH_ISSUE_RATIO的分母,SHIFT_PROJECT_RATIO的分母
|
|
|
|
// 3.2当前组织维度,发布议题总数,PUBLISH_ISSUE_RATIO的分母
|
|
|
|
entity.setPlatPublishIssueTotal(gridIssueTotal); |
|
|
|
|
|
|
|
//当前网格内,议题已经转为项目的总数
|
|
|
@ -114,7 +114,7 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService |
|
|
|
// 4.2当前组织维度,已经转为项目的议题总数,SHIFT_PROJECT_RATIO的分母
|
|
|
|
entity.setPlatShiftProjectTotal(gridIssueToProjectTotal); |
|
|
|
|
|
|
|
if (gridIssueTotal != NumConstant.ZERO) { |
|
|
|
if (gridIssueTotal != NumConstant.ZERO && gridIssueToProjectTotal !=NumConstant.ZERO) { |
|
|
|
// 3.1党员发布议题总数:话题发布人是党员
|
|
|
|
entity.setPublishIssueTotal(getParyPublishIssueTotal(customerId, gridId, null)); |
|
|
|
log.info("extractGridPioneerData 当前网格id=" + gridId + ";党员发布议题publishIssueTotal"+entity.getPublishIssueTotal()); |
|
|
@ -248,14 +248,16 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService |
|
|
|
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)); |
|
|
|
} |
|
|
|
|
|
|
|
//3.2当前组织维度,发布议题总数,PUBLISH_ISSUE_RATIO的分母,SHIFT_PROJECT_RATIO的分母
|
|
|
|
//3.2当前组织维度,发布议题总数,PUBLISH_ISSUE_RATIO的分母
|
|
|
|
int communityIssueTotal = getGridOrCommunityIssueTotal(customerId, null, communityId,StrConstant.EPMETY_STR); |
|
|
|
log.info("extractCommunityPioneerData 当前communityId="+communityId+";当前社区内所有议题总数communityIssueTotal="+communityIssueTotal); |
|
|
|
entity.setPlatPublishIssueTotal(communityIssueTotal); |
|
|
|
|
|
|
|
int communityIssueToProjectTotal = getGridOrCommunityIssueTotal(customerId, null, communityId,IssueConstant.SHIFT_PROJECT); |
|
|
|
//4.2当前组织维度,已经转为项目的议题总数,SHIFT_PROJECT_RATIO的分母.0708新增此列
|
|
|
|
entity.setPlatShiftProjectTotal(communityIssueToProjectTotal); |
|
|
|
|
|
|
|
if (communityIssueTotal != NumConstant.ZERO) { |
|
|
|
if (communityIssueTotal != NumConstant.ZERO && communityIssueToProjectTotal != NumConstant.ZERO) { |
|
|
|
//3.1党员发布议题总数:话题发布人是党员
|
|
|
|
entity.setPublishIssueTotal(getParyPublishIssueTotal(customerId, null, communityId)); |
|
|
|
log.info("extractCommunityPioneerData 当前communityId="+communityId+";党员发布议题publishIssueTotal="+entity.getPublishIssueTotal()); |
|
|
@ -270,7 +272,7 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService |
|
|
|
entity.setShiftProjectTotal(getGridOrCommunityShiftProjectTotal(customerId, null, communityId,NumConstant.ONE_STR)); |
|
|
|
log.info("extractCommunityPioneerData 当前communityId="+communityId+";党员议题转项目数shiftProjectTotal="+entity.getShiftProjectTotal()); |
|
|
|
|
|
|
|
//8、议题转项目占比 : 占社区内议题转项目总数的比率
|
|
|
|
//4.3议题转项目占比
|
|
|
|
entity.setShiftProjectRatio(entity.getShiftProjectTotal() == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal((double)entity.getShiftProjectTotal() / communityIssueToProjectTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
|
}else{ |
|
|
|
log.info("extractCommunityPioneerData 当前communityId="+communityId+"communityIssueTotal =0"); |
|
|
@ -281,20 +283,20 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 9、党员已解决项目总数
|
|
|
|
// 5.1党员解决项目总数:话题发布人是党员的议题,转为项目并且已经解决
|
|
|
|
entity.setResolvedProjectTotal(getGridOrCommunityClosedProjectTotal(customerId, null, communityId, DimObjectStatusConstant.RESOLVED, ProjectConstant.CLOSED, NumConstant.ONE_STR)); |
|
|
|
log.info("extractCommunityPioneerData 当前communityId="+communityId+";已解决项目resolvedProjectTotal="+entity.getResolvedProjectTotal()); |
|
|
|
|
|
|
|
//01.12新增
|
|
|
|
//已解决项目总数
|
|
|
|
// 5.2当前组织维度,所有结案项目数,RESOLVED_PROJECT_RATIO的分母
|
|
|
|
int closedProjectTotal = getGridOrCommunityClosedProjectTotal(customerId, null, communityId, null,ProjectConstant.CLOSED,StrConstant.EPMETY_STR); |
|
|
|
log.info("extractCommunityPioneerData 当前communityId="+communityId+";总结项目closedProjectTotal="+closedProjectTotal); |
|
|
|
entity.setPlatClosedProjectTotal(closedProjectTotal); |
|
|
|
|
|
|
|
//5.3解决项目总数占比
|
|
|
|
if (entity.getResolvedProjectTotal() == NumConstant.ZERO) { |
|
|
|
entity.setResolvedProjectRatio(BigDecimal.ZERO); |
|
|
|
} else { |
|
|
|
// 10、占总结项目
|
|
|
|
// 5.3解决项目总数占比
|
|
|
|
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)); |
|
|
|
} |
|
|
|
|
|
|
@ -327,60 +329,66 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService |
|
|
|
entity.setAgencyPath(entity.getAgencyPids().concat(StrConstant.COLON).concat(entity.getOrgId())); |
|
|
|
} |
|
|
|
log.info("extractExceptCommunityPioneerData 当前orgId="+entity.getOrgId()+";agencyPath="+entity.getAgencyPath()); |
|
|
|
//1、党员参与议事
|
|
|
|
//1.1党员参与议事:何为参与?议题的表决行为次数总计
|
|
|
|
entity.setIssueTotal(calPartyPartiIssueTotal(customerId,null,null,entity.getAgencyPath(),NumConstant.ONE_STR)); |
|
|
|
log.info("extractExceptCommunityPioneerData 党员参与议事issueTotal="+entity.getIssueTotal()); |
|
|
|
|
|
|
|
//01.12新增
|
|
|
|
//1.2平台参与议事总数
|
|
|
|
int issueTotal=calPartyPartiIssueTotal(customerId,null,null,entity.getAgencyPath(),null); |
|
|
|
log.info("extractExceptCommunityPioneerData 平台参与议事issueTotal="+issueTotal); |
|
|
|
entity.setPlatIssueTotal(issueTotal); |
|
|
|
|
|
|
|
//1.3党员参与议事占比=issue_total/plat_issue_total
|
|
|
|
if(entity.getIssueTotal()==0){ |
|
|
|
entity.setIssueRatio(BigDecimal.ZERO); |
|
|
|
}else{ |
|
|
|
//2、党员参与议事占比
|
|
|
|
entity.setIssueRatio(new BigDecimal((double)entity.getIssueTotal()/issueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.SIX,RoundingMode.HALF_UP)); |
|
|
|
} |
|
|
|
|
|
|
|
//3、党员发布话题:
|
|
|
|
//2.1党员发布话题
|
|
|
|
entity.setTopicTotal(getAgencyTopicTotal(customerId, entity.getAgencyPath(),NumConstant.ONE_STR)); |
|
|
|
log.info("extractExceptCommunityPioneerData 党员发布话题topicTotal="+entity.getTopicTotal()); |
|
|
|
|
|
|
|
//01.12新增
|
|
|
|
//当前组织内所有话题总数
|
|
|
|
//2.2当前组织维度,话题总数,TOPIC_RATIO的分母
|
|
|
|
int agencyTopicTotal = getAgencyTopicTotal(customerId, entity.getAgencyPath(),null); |
|
|
|
log.info("extractExceptCommunityPioneerData 当前组织内所有话题总数agencyTopicTotal="+agencyTopicTotal); |
|
|
|
entity.setPlatTopicTotal(agencyTopicTotal); |
|
|
|
|
|
|
|
//4、党员发布话题占比: 组织内注册党员发布的话题总数占 组织内话题总数的 比率
|
|
|
|
//2.3党员发布话题占比
|
|
|
|
if (entity.getTopicTotal() == NumConstant.ZERO) { |
|
|
|
entity.setTopicRatio(BigDecimal.ZERO); |
|
|
|
} else { |
|
|
|
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新增
|
|
|
|
//当前组织内所有议题总数
|
|
|
|
//3.2当前组织维度,发布议题总数,PUBLISH_ISSUE_RATIO的分母
|
|
|
|
int agencyIssueTotal = getAgencyIssueTotal(customerId, entity.getAgencyPath()); |
|
|
|
log.info("extractExceptCommunityPioneerData 当前组织内所有议题总数agencyIssueTotal="+agencyIssueTotal); |
|
|
|
entity.setPlatPublishIssueTotal(agencyIssueTotal); |
|
|
|
|
|
|
|
if (agencyIssueTotal != NumConstant.ZERO) { |
|
|
|
//5、党员发布议题
|
|
|
|
//4.2当前组织维度,已经转为项目的议题总数,SHIFT_PROJECT_RATIO的分母.0708新增此列
|
|
|
|
int platShiftProjectTotal=getAgencyShiftProjectTotal(customerId, entity.getAgencyPath(),StrConstant.EPMETY_STR); |
|
|
|
entity.setPlatShiftProjectTotal(platShiftProjectTotal); |
|
|
|
|
|
|
|
if (agencyIssueTotal != NumConstant.ZERO && platShiftProjectTotal != NumConstant.ZERO) { |
|
|
|
//3.1党员发布议题总数:话题发布人是党员
|
|
|
|
entity.setPublishIssueTotal(getAgencyParyPublishIssueTotal(customerId, entity.getAgencyPath())); |
|
|
|
log.info("extractExceptCommunityPioneerData 党员发布议题publishIssueTotal="+entity.getPublishIssueTotal()); |
|
|
|
//6、党员发布议题占比 : 占社区内所有议题的比率
|
|
|
|
|
|
|
|
//3.3党员发布议题占比
|
|
|
|
if (entity.getPublishIssueTotal() == NumConstant.ZERO) { |
|
|
|
entity.setPublishIssueRatio(BigDecimal.ZERO); |
|
|
|
} |
|
|
|
entity.setPublishIssueRatio(agencyIssueTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal((double)entity.getPublishIssueTotal() / agencyIssueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
|
|
|
|
|
//7、议题转项目数
|
|
|
|
entity.setShiftProjectTotal(getAgencyShiftProjectTotal(customerId, entity.getAgencyPath())); |
|
|
|
//4.1党员议题转项目数:话题发布人党员+已经转为项目的议题总数
|
|
|
|
entity.setShiftProjectTotal(getAgencyShiftProjectTotal(customerId, entity.getAgencyPath(),NumConstant.ONE_STR)); |
|
|
|
log.info("extractExceptCommunityPioneerData 议题转项目数shiftProjectTotal="+entity.getShiftProjectTotal()); |
|
|
|
//8、议题转项目占比 : 占网格内议题总数的比率
|
|
|
|
entity.setShiftProjectRatio(entity.getShiftProjectTotal() == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal((double)entity.getShiftProjectTotal() / agencyIssueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
|
|
|
|
|
//4.3议题转项目占比
|
|
|
|
entity.setShiftProjectRatio(entity.getShiftProjectTotal() == NumConstant.ZERO ? |
|
|
|
BigDecimal.ZERO : |
|
|
|
new BigDecimal((double)entity.getShiftProjectTotal() / agencyIssueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.SIX, RoundingMode.HALF_UP)); |
|
|
|
}else{ |
|
|
|
log.info("extractExceptCommunityPioneerData 当前组织内所有议题总数agencyIssueTotal=0"); |
|
|
|
entity.setPublishIssueTotal(NumConstant.ZERO); |
|
|
@ -390,19 +398,21 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 9、已解决项目
|
|
|
|
entity.setResolvedProjectTotal(getAgencyClosedProjectTotal(customerId, entity.getAgencyPath(), DimObjectStatusConstant.RESOLVED)); |
|
|
|
// 5.1党员解决项目总数:话题发布人是党员的议题,转为项目并且已经解决
|
|
|
|
entity.setResolvedProjectTotal(getAgencyClosedProjectTotal(customerId, entity.getAgencyPath(), DimObjectStatusConstant.RESOLVED,NumConstant.ONE_STR)); |
|
|
|
log.info("extractExceptCommunityPioneerData 已解决项目resolvedProjectTotal="+entity.getResolvedProjectTotal()); |
|
|
|
|
|
|
|
//01.12新增
|
|
|
|
int closedProjectTotal = getAgencyClosedProjectTotal(customerId, entity.getAgencyPath(), null); |
|
|
|
//5.2当前组织维度,所有结案项目数,RESOLVED_PROJECT_RATIO的分母
|
|
|
|
int closedProjectTotal = getAgencyClosedProjectTotal(customerId, entity.getAgencyPath(), null,StrConstant.EPMETY_STR); |
|
|
|
log.info("extractExceptCommunityPioneerData 总结项目closedProjectTotal="+closedProjectTotal); |
|
|
|
entity.setPlatClosedProjectTotal(closedProjectTotal); |
|
|
|
|
|
|
|
//5.3解决项目总数占比
|
|
|
|
if (entity.getResolvedProjectTotal() == NumConstant.ZERO) { |
|
|
|
//5.3解决项目总数占比
|
|
|
|
entity.setResolvedProjectRatio(BigDecimal.ZERO); |
|
|
|
} else { |
|
|
|
// 10、占总结项目
|
|
|
|
// 5.3解决项目总数占比
|
|
|
|
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)); |
|
|
|
} |
|
|
|
|
|
|
@ -422,13 +432,13 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService |
|
|
|
} |
|
|
|
|
|
|
|
//组织下:已解决项目 or 已结案项目总数
|
|
|
|
private int getAgencyClosedProjectTotal(String customerId, String agencyPath, String closedStatus) { |
|
|
|
return factOriginProjectMainDailyService.getAgencyClosedProjectTotal(customerId,agencyPath,closedStatus, ProjectConstant.CLOSED); |
|
|
|
private int getAgencyClosedProjectTotal(String customerId, String agencyPath, String closedStatus,String isParty) { |
|
|
|
return factOriginProjectMainDailyService.getAgencyClosedProjectTotal(customerId,agencyPath,closedStatus, ProjectConstant.CLOSED,isParty); |
|
|
|
} |
|
|
|
|
|
|
|
//组织下:议题转项目数
|
|
|
|
private Integer getAgencyShiftProjectTotal(String customerId, String agencyPath) { |
|
|
|
return factOriginIssueMainDailyService.getAgencyShiftProjectTotal(customerId,agencyPath); |
|
|
|
private Integer getAgencyShiftProjectTotal(String customerId, String agencyPath,String topicUserIsParty) { |
|
|
|
return factOriginIssueMainDailyService.getAgencyShiftProjectTotal(customerId,agencyPath,topicUserIsParty); |
|
|
|
} |
|
|
|
|
|
|
|
//组织内: 党员发布议题
|
|
|
|