Browse Source

先锋模范抽取

dev_shibei_match
yinzuomei 5 years ago
parent
commit
d2a155906a
  1. 30
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PioneerDataExtractServiceImpl.java

30
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PioneerDataExtractServiceImpl.java

@ -73,7 +73,7 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
//2、党员参与议事占比
int issueTotal=calPartyPartiIssueTotal(customerId,gridId,null,null,null);
log.info("extractGridPioneerData 当前网格id=" + gridId + ";参与议事总数issueTotal=" + issueTotal);
BigDecimal issueRatio=new BigDecimal(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);
entity.setIssueRatio(issueRatio.setScale(NumConstant.SIX,RoundingMode.HALF_UP));
}
@ -91,7 +91,7 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
if(gridTopicTotal == NumConstant.ZERO){
entity.setTopicRatio(BigDecimal.ZERO);
}else{
BigDecimal topicRatio=new BigDecimal(entity.getTopicTotal() / gridTopicTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED));
BigDecimal topicRatio = new BigDecimal((double) entity.getTopicTotal() / gridTopicTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED));
log.info("extractGridPioneerData 当前网格id=" + gridId + ";党员发布话题占比topicRatio="+topicRatio);
entity.setTopicRatio(topicRatio.setScale(NumConstant.SIX, RoundingMode.HALF_UP));
}
@ -108,7 +108,7 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
if (entity.getPublishIssueTotal() == NumConstant.ZERO) {
entity.setPublishIssueRatio(BigDecimal.ZERO);
}else{
BigDecimal publishIssueRatio=new BigDecimal(entity.getPublishIssueTotal() / gridIssueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED));
BigDecimal publishIssueRatio=new BigDecimal((double)entity.getPublishIssueTotal() / gridIssueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED));
entity.setPublishIssueRatio(publishIssueRatio.setScale(NumConstant.SIX, RoundingMode.HALF_UP));
}
@ -119,7 +119,7 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
if(entity.getShiftProjectTotal() == NumConstant.ZERO){
entity.setShiftProjectRatio(BigDecimal.ZERO);
}else{
BigDecimal shiftProjectRatio=new BigDecimal(entity.getShiftProjectTotal() / gridIssueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED));
BigDecimal shiftProjectRatio = new BigDecimal((double) entity.getShiftProjectTotal() / gridIssueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED));
entity.setShiftProjectRatio(shiftProjectRatio.setScale(NumConstant.SIX, RoundingMode.HALF_UP));
}
@ -144,7 +144,7 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
if(closedProjectTotal == NumConstant.ZERO){
entity.setResolvedProjectRatio(BigDecimal.ZERO);
}else {
BigDecimal resolvedProjectRatio=new BigDecimal(entity.getResolvedProjectTotal() / closedProjectTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED));
BigDecimal resolvedProjectRatio = new BigDecimal((double) entity.getResolvedProjectTotal() / closedProjectTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED));
entity.setResolvedProjectRatio(resolvedProjectRatio.setScale(NumConstant.SIX, RoundingMode.HALF_UP));
}
}
@ -190,7 +190,7 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
//2、党员参与议事占比
int issueTotal=calPartyPartiIssueTotal(customerId,null,communityId,null,null);
log.info("extractCommunityPioneerData 当前communityId="+communityId+";参与议事总数issueTotal="+issueTotal);
entity.setIssueRatio(new BigDecimal(entity.getIssueTotal()/issueTotal).setScale(NumConstant.SIX,RoundingMode.HALF_UP));
entity.setIssueRatio(new BigDecimal((double)entity.getIssueTotal()/issueTotal).setScale(NumConstant.SIX,RoundingMode.HALF_UP));
}
//3、党员发布话题:
@ -203,7 +203,7 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
//当前社区内所有话题总数
int communityTopicTotal = getGridOrCommunityTopicTotal(customerId, null, communityId);
log.info("extractCommunityPioneerData 当前communityId="+communityId+";当前社区内所有话题总数communityTopicTotal="+communityTopicTotal);
entity.setTopicRatio(communityTopicTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getTopicTotal() / communityTopicTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
entity.setTopicRatio(communityTopicTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal((double)entity.getTopicTotal() / communityTopicTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
}
//当前社区内所有议题总数
@ -217,13 +217,13 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
if (entity.getPublishIssueTotal() == NumConstant.ZERO) {
entity.setPublishIssueRatio(BigDecimal.ZERO);
}
entity.setPublishIssueRatio(communityIssueTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getPublishIssueTotal() / communityIssueTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
entity.setPublishIssueRatio(communityIssueTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal((double)entity.getPublishIssueTotal() / communityIssueTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
//7、议题转项目数
entity.setShiftProjectTotal(getGridOrCommunityShiftProjectTotal(customerId, null, communityId));
log.info("extractCommunityPioneerData 当前communityId="+communityId+";议题转项目数shiftProjectTotal="+entity.getShiftProjectTotal());
//8、议题转项目占比 : 占社区内议题总数的比率
entity.setShiftProjectRatio(entity.getShiftProjectTotal() == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getShiftProjectTotal() / communityIssueTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
entity.setShiftProjectRatio(entity.getShiftProjectTotal() == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal((double)entity.getShiftProjectTotal() / communityIssueTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
}else{
log.info("extractCommunityPioneerData 当前communityId="+communityId+"communityIssueTotal =0");
entity.setPublishIssueTotal(NumConstant.ZERO);
@ -242,7 +242,7 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
// 10、占总结项目
int closedProjectTotal = getGridOrCommunityClosedProjectTotal(customerId, null, communityId, null);
log.info("extractCommunityPioneerData 当前communityId="+communityId+";总结项目closedProjectTotal="+closedProjectTotal);
entity.setResolvedProjectRatio(closedProjectTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getResolvedProjectTotal() / closedProjectTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
entity.setResolvedProjectRatio(closedProjectTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal((double)entity.getResolvedProjectTotal() / closedProjectTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
}
});
screenPioneerDataService.delAndSavePioneerData(customerId, OrgTypeConstant.AGENCY, IndexCalConstant.DELETE_SIZE, communityList);
@ -273,7 +273,7 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
//2、党员参与议事占比
int issueTotal=calPartyPartiIssueTotal(customerId,null,null,entity.getAgencyPath(),null);
log.info("extractExceptCommunityPioneerData 平台参与议事issueTotal="+issueTotal);
entity.setIssueRatio(new BigDecimal(entity.getIssueTotal()/issueTotal).setScale(NumConstant.SIX,RoundingMode.HALF_UP));
entity.setIssueRatio(new BigDecimal((double)entity.getIssueTotal()/issueTotal).setScale(NumConstant.SIX,RoundingMode.HALF_UP));
}
//3、党员发布话题:
@ -286,7 +286,7 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
//当前组织内所有话题总数
int agencyTopicTotal = getAgencyTopicTotal(customerId, entity.getAgencyPath(),null);
log.info("extractExceptCommunityPioneerData 当前组织内所有话题总数agencyTopicTotal="+agencyTopicTotal);
entity.setTopicRatio(agencyTopicTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getTopicTotal() / agencyTopicTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
entity.setTopicRatio(agencyTopicTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal((double)entity.getTopicTotal() / agencyTopicTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
}
//当前组织内所有议题总数
@ -300,13 +300,13 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
if (entity.getPublishIssueTotal() == NumConstant.ZERO) {
entity.setPublishIssueRatio(BigDecimal.ZERO);
}
entity.setPublishIssueRatio(agencyIssueTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getPublishIssueTotal() / agencyIssueTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
entity.setPublishIssueRatio(agencyIssueTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal((double)entity.getPublishIssueTotal() / agencyIssueTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
//7、议题转项目数
entity.setShiftProjectTotal(getAgencyShiftProjectTotal(customerId, entity.getAgencyPath()));
log.info("extractExceptCommunityPioneerData 议题转项目数shiftProjectTotal="+entity.getShiftProjectTotal());
//8、议题转项目占比 : 占网格内议题总数的比率
entity.setShiftProjectRatio(entity.getShiftProjectTotal() == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getShiftProjectTotal() / agencyIssueTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
entity.setShiftProjectRatio(entity.getShiftProjectTotal() == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal((double)entity.getShiftProjectTotal() / agencyIssueTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
}else{
log.info("extractExceptCommunityPioneerData 当前组织内所有议题总数agencyIssueTotal=0");
entity.setPublishIssueTotal(NumConstant.ZERO);
@ -325,7 +325,7 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
// 10、占总结项目
int closedProjectTotal = getAgencyClosedProjectTotal(customerId, entity.getAgencyPath(), null);
log.info("extractExceptCommunityPioneerData 总结项目closedProjectTotal="+closedProjectTotal);
entity.setResolvedProjectRatio(closedProjectTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getResolvedProjectTotal() / closedProjectTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
entity.setResolvedProjectRatio(closedProjectTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal((double)entity.getResolvedProjectTotal() / closedProjectTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
}
});
screenPioneerDataService.delAndSavePioneerData(customerId, OrgTypeConstant.AGENCY, IndexCalConstant.DELETE_SIZE, agencyList);

Loading…
Cancel
Save