Browse Source

Merge remote-tracking branch 'origin/dev'

dev_shibei_match
yinzuomei 5 years ago
parent
commit
8cdb9a921a
  1. 17
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueLogDailyDao.java
  2. 37
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java
  3. 12
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginIssueLogDailyService.java
  4. 15
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginIssueLogDailyServiceImpl.java
  5. 122
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PioneerDataExtractServiceImpl.java
  6. 24
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueLogDailyDao.xml
  7. 17
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenPioneerDataDao.xml

17
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueLogDailyDao.java

@ -108,11 +108,26 @@ public interface FactOriginIssueLogDailyDao extends BaseDao<FactOriginIssueLogDa
* *
* @param customerId * @param customerId
* @param monthId * @param monthId
* @param pids
* @param groupField * @param groupField
* @return java.util.List<com.epmet.dto.extract.IssueVoteUserCountResultDTO> * @return java.util.List<com.epmet.dto.extract.IssueVoteUserCountResultDTO>
* @author LiuJanJun * @author LiuJanJun
* @date 2020/9/27 1:58 下午 * @date 2020/9/27 1:58 下午
*/ */
List<IssueVoteUserCountResultDTO> getVoteCount(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("groupField") String groupField); List<IssueVoteUserCountResultDTO> getVoteCount(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("groupField") String groupField);
/**
* @param customerId
* @param gridId
* @param agencyPath
* @param isParty
* @return int
* @author yinzuomei
* @description 大屏先锋模范计算 平台参与议事总人数平台参与议事党员数
* @Date 2021/1/12 15:08
**/
int selectPlatJoinUserTotal(@Param("customerId") String customerId,
@Param("gridId") String gridId,
@Param("communityId") String communityId,
@Param("agencyPath") String agencyPath,
@Param("isParty") String isParty);
} }

37
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java

@ -67,7 +67,12 @@ public class ScreenPioneerDataEntity extends BaseEpmetEntity {
*/ */
private Integer issueTotal; private Integer issueTotal;
/** /**
* 01.12新增PLAT_ISSUE_TOTAL 平台参与议事总数
*/
private Integer platIssueTotal;
/**
* 党员参与议事占比 * 党员参与议事占比
*/ */
private BigDecimal issueRatio; private BigDecimal issueRatio;
@ -77,6 +82,11 @@ public class ScreenPioneerDataEntity extends BaseEpmetEntity {
*/ */
private Integer topicTotal; private Integer topicTotal;
/**
* 01.12新增PLAT_TOPIC_TOTAL 当前组织维度话题总数,TOPIC_RATIO的分母
*/
private Integer platTopicTotal;
/** /**
* 党员发布话题占比 * 党员发布话题占比
*/ */
@ -87,6 +97,11 @@ public class ScreenPioneerDataEntity extends BaseEpmetEntity {
*/ */
private Integer publishIssueTotal; private Integer publishIssueTotal;
/**
* 01.12新增PLAT_PUBLISH_ISSUE_TOTAL 当前组织维度发布议题总数PUBLISH_ISSUE_RATIO的分母SHIFT_PROJECT_RATIO的分母
*/
private Integer platPublishIssueTotal;
/** /**
* 党员发布议题占比 * 党员发布议题占比
*/ */
@ -107,6 +122,10 @@ public class ScreenPioneerDataEntity extends BaseEpmetEntity {
*/ */
private Integer resolvedProjectTotal; private Integer resolvedProjectTotal;
/**
* 01.12新增PLAT_CLOSED_PROJECT_TOTAL 当前组织维度所有结案项目数RESOLVED_PROJECT_RATIO的分母
*/
private Integer platClosedProjectTotal;
/** /**
* 解决项目总数占比 * 解决项目总数占比
*/ */
@ -124,4 +143,20 @@ public class ScreenPioneerDataEntity extends BaseEpmetEntity {
private String pid; private String pid;
private String agencyPids; private String agencyPids;
private String agencyPath; private String agencyPath;
/**
* PLAT_JOIN_USER_TOTAL 平台参与议事总人数
*/
private Integer platJoinUserTotal;
/**
* PLAT_JOIN_PARTY_TOTAL 平台参与议事党员数
*/
private Integer platJoinPartyTotal;
/**
* PLAT_JOIN PARTY_RATIO 平台参与议事的党员占比
*/
private BigDecimal platJoinPartyRatio;
} }

12
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginIssueLogDailyService.java

@ -65,4 +65,16 @@ public interface FactOriginIssueLogDailyService extends BaseService<FactOriginIs
* @date 2020/9/27 1:58 下午 * @date 2020/9/27 1:58 下午
*/ */
List<IssueVoteUserCountResultDTO> getVoteCount(String customerId, String monthId, String groupField); List<IssueVoteUserCountResultDTO> getVoteCount(String customerId, String monthId, String groupField);
/**
* @return java.lang.Integer
* @param customerId
* @param gridId
* @param agencyPath
* @param isParty
* @author yinzuomei
* @description 计算 平台参与议事总人数平台参与议事党员数
* @Date 2021/1/12 15:02
**/
int calPlatJoinUserTotal(String customerId, String gridId, String communityId,String agencyPath, String isParty);
} }

15
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginIssueLogDailyServiceImpl.java

@ -100,4 +100,19 @@ public class FactOriginIssueLogDailyServiceImpl extends BaseServiceImpl<FactOrig
public List<IssueVoteUserCountResultDTO> getVoteCount(String customerId, String monthId, String groupField) { public List<IssueVoteUserCountResultDTO> getVoteCount(String customerId, String monthId, String groupField) {
return baseDao.getVoteCount(customerId, monthId, groupField); return baseDao.getVoteCount(customerId, monthId, groupField);
} }
/**
* @param customerId
* @param gridId
* @param agencyPath
* @param isParty
* @return java.lang.Integer
* @author yinzuomei
* @description 计算 平台参与议事总人数平台参与议事党员数
* @Date 2021/1/12 15:02
**/
@Override
public int calPlatJoinUserTotal(String customerId, String gridId,String communityId, String agencyPath, String isParty) {
return baseDao.selectPlatJoinUserTotal(customerId,gridId,communityId,agencyPath,isParty);
}
} }

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

@ -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);

24
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueLogDailyDao.xml

@ -153,4 +153,28 @@
and m.PIDS LIKE CONCAT(#{pids},'%') and m.PIDS LIKE CONCAT(#{pids},'%')
</if> </if>
</select> </select>
<!-- 大屏:先锋模范:计算 平台参与议事总人数、平台参与议事党员数-->
<select id="selectPlatJoinUserTotal" parameterType="map" resultType="int">
SELECT
count( DISTINCT m.OPERATION_USER_ID ) as total
FROM
fact_origin_issue_log_daily m
WHERE
m.DEL_FLAG = '0'
and m.ACTION_CODE like'vote_%'
and m.CUSTOMER_ID=#{customerId}
<if test='null != gridId and "" != gridId'>
and m.GRID_ID=#{gridId}
</if>
<if test='null != communityId and "" != communityId'>
AND M.AGENCY_ID=#{communityId}
</if>
<if test='null != agencyPath and "" != agencyPath'>
AND M.PIDS LIKE CONCAT(#{agencyPath},'%')
</if>
<if test='null != isParty and "" != isParty'>
and M.IS_PARTY=#{isParty}
</if>
</select>
</mapper> </mapper>

17
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenPioneerDataDao.xml

@ -188,7 +188,14 @@
CREATED_TIME, CREATED_TIME,
UPDATED_BY, UPDATED_BY,
UPDATED_TIME, UPDATED_TIME,
DATA_END_TIME DATA_END_TIME,
PLAT_ISSUE_TOTAL,
PLAT_JOIN_USER_TOTAL,
PLAT_JOIN_PARTY_TOTAL,
PLAT_JOIN PARTY_RATIO,
PLAT_TOPIC_TOTAL,
PLAT_PUBLISH_ISSUE_TOTAL,
PLAT_CLOSED_PROJECT_TOTAL
) values ) values
<foreach collection="list" item="item" index="index" separator=","> <foreach collection="list" item="item" index="index" separator=",">
( (
@ -214,7 +221,13 @@
now(), now(),
'APP_USER', 'APP_USER',
now(), now(),
#{item.dataEndTime} #{item.dataEndTime},
#{item.platIssueTotal},
#{item.platJoinUserTotal},
#{item.platJoinPartyTotal},
#{item.platTopicTotal},
#{item.platPublishIssueTotal},
#{item.platClosedProjectTotal}
) )
</foreach> </foreach>
</insert> </insert>

Loading…
Cancel
Save