Browse Source

暂存-先锋模范抽取

master
yinzuomei 4 years ago
parent
commit
0f3a2f46f9
  1. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueMainDailyDao.java
  2. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java
  3. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java
  4. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginIssueMainDailyService.java
  5. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java
  6. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginIssueMainDailyServiceImpl.java
  7. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java
  8. 78
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PioneerDataExtractServiceImpl.java
  9. 3
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueMainDailyDao.xml
  10. 3
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueMainDailyDao.java

@ -186,12 +186,14 @@ public interface FactOriginIssueMainDailyDao extends BaseDao<FactOriginIssueMain
* @return java.lang.Integer * @return java.lang.Integer
* @param customerId * @param customerId
* @param agencyPath * @param agencyPath
* @param topicUserIsParty 创建话题用户身份标识1:党员0:非党员
* @author yinzuomei * @author yinzuomei
* @description 组织下议题转项目数 * @description 组织下议题转项目数
* @Date 2020/9/24 17:05 * @Date 2020/9/24 17:05
**/ **/
Integer getAgencyShiftProjectTotal(@Param("customerId")String customerId, Integer getAgencyShiftProjectTotal(@Param("customerId")String customerId,
@Param("agencyPath")String agencyPath); @Param("agencyPath")String agencyPath,
@Param("topicUserIsParty")String topicUserIsParty);
/** /**
* 网格内议题总数 * 网格内议题总数

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java

@ -140,6 +140,7 @@ public interface FactOriginProjectMainDailyDao extends BaseDao<FactOriginProject
* @param agencyPath * @param agencyPath
* @param closedStatus :resolved unresolved * @param closedStatus :resolved unresolved
* @param projectStatus :pending closed * @param projectStatus :pending closed
* @param isParty 是否是党员 1:
* @author yinzuomei * @author yinzuomei
* @description 组织下已解决项目 or 已结案项目总数 * @description 组织下已解决项目 or 已结案项目总数
* @Date 2020/9/24 17:38 * @Date 2020/9/24 17:38
@ -147,7 +148,8 @@ public interface FactOriginProjectMainDailyDao extends BaseDao<FactOriginProject
int getAgencyClosedProjectTotal(@Param("customerId") String customerId, int getAgencyClosedProjectTotal(@Param("customerId") String customerId,
@Param("agencyPath")String agencyPath, @Param("agencyPath")String agencyPath,
@Param("closedStatus")String closedStatus, @Param("closedStatus")String closedStatus,
@Param("projectStatus") String projectStatus); @Param("projectStatus") String projectStatus,
@Param("isParty") String isParty);
/** /**
* 组织自治项目数 * 组织自治项目数

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

@ -98,7 +98,7 @@ public class ScreenPioneerDataEntity extends BaseEpmetEntity {
private Integer publishIssueTotal; private Integer publishIssueTotal;
/** /**
* 3.2当前组织维度发布议题总数PUBLISH_ISSUE_RATIO的分母SHIFT_PROJECT_RATIO的分母 * 3.2当前组织维度发布议题总数PUBLISH_ISSUE_RATIO的分母
*/ */
private Integer platPublishIssueTotal; private Integer platPublishIssueTotal;

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

@ -89,11 +89,12 @@ public interface FactOriginIssueMainDailyService extends BaseService<FactOriginI
* @return java.lang.Integer * @return java.lang.Integer
* @param customerId * @param customerId
* @param agencyPath * @param agencyPath
* @param topicUserIsParty 创建话题用户身份标识1:党员0:非党员
* @author yinzuomei * @author yinzuomei
* @description 组织下议题转项目数 * @description 组织下议题转项目数
* @Date 2020/9/24 17:04 * @Date 2020/9/24 17:04
**/ **/
Integer getAgencyShiftProjectTotal(String customerId, String agencyPath); Integer getAgencyShiftProjectTotal(String customerId, String agencyPath,String topicUserIsParty);
/** /**
* 网格内议题数 * 网格内议题数

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

@ -133,11 +133,12 @@ public interface FactOriginProjectMainDailyService extends BaseService<FactOrigi
* @param agencyPath * @param agencyPath
* @param closedStatus :resolved unresolved * @param closedStatus :resolved unresolved
* @param projectStatus :pending closed * @param projectStatus :pending closed
* @param isParty 是否是党员 1:
* @author yinzuomei * @author yinzuomei
* @description 组织下已解决项目 or 已结案项目总数 * @description 组织下已解决项目 or 已结案项目总数
* @Date 2020/9/24 17:37 * @Date 2020/9/24 17:37
**/ **/
int getAgencyClosedProjectTotal(String customerId, String agencyPath, String closedStatus,String projectStatus); int getAgencyClosedProjectTotal(String customerId, String agencyPath, String closedStatus,String projectStatus,String isParty);
/** /**
* 自治项目数 * 自治项目数

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

@ -121,14 +121,15 @@ public class FactOriginIssueMainDailyServiceImpl extends BaseServiceImpl<FactOri
/** /**
* @param customerId * @param customerId
* @param agencyPath * @param agencyPath
* @param topicUserIsParty 创建话题用户身份标识1:党员0:非党员
* @return java.lang.Integer * @return java.lang.Integer
* @author yinzuomei * @author yinzuomei
* @description 组织下议题转项目数 * @description 组织下议题转项目数
* @Date 2020/9/24 17:04 * @Date 2020/9/24 17:04
**/ **/
@Override @Override
public Integer getAgencyShiftProjectTotal(String customerId, String agencyPath) { public Integer getAgencyShiftProjectTotal(String customerId, String agencyPath,String topicUserIsParty) {
return baseDao.getAgencyShiftProjectTotal(customerId,agencyPath); return baseDao.getAgencyShiftProjectTotal(customerId,agencyPath,topicUserIsParty);
} }
@Override @Override

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

@ -167,14 +167,15 @@ public class FactOriginProjectMainDailyServiceImpl extends BaseServiceImpl<FactO
* @param agencyPath * @param agencyPath
* @param closedStatus :resolved unresolved * @param closedStatus :resolved unresolved
* @param projectStatus :pending closed * @param projectStatus :pending closed
* @param isParty 是否是党员 1:
* @return int * @return int
* @author yinzuomei * @author yinzuomei
* @description 组织下已解决项目 or 已结案项目总数 * @description 组织下已解决项目 or 已结案项目总数
* @Date 2020/9/24 17:37 * @Date 2020/9/24 17:37
**/ **/
@Override @Override
public int getAgencyClosedProjectTotal(String customerId, String agencyPath, String closedStatus,String projectStatus) { public int getAgencyClosedProjectTotal(String customerId, String agencyPath, String closedStatus,String projectStatus,String isParty) {
return baseDao.getAgencyClosedProjectTotal(customerId,agencyPath,closedStatus,projectStatus); return baseDao.getAgencyClosedProjectTotal(customerId,agencyPath,closedStatus,projectStatus,isParty);
} }
@Override @Override

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

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

3
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueMainDailyDao.xml

@ -272,6 +272,9 @@
AND t1.ISSUE_STATUS = 'shift_project' AND t1.ISSUE_STATUS = 'shift_project'
AND t1.CUSTOMER_ID = #{customerId} AND t1.CUSTOMER_ID = #{customerId}
and t1.PIDS LIKE CONCAT(#{agencyPath},'%') and t1.PIDS LIKE CONCAT(#{agencyPath},'%')
<if test='null != topicUserIsParty and ""!=topicUserIsParty'>
and t1.TOPIC_USER_IS_PARTY = #{topicUserIsParty}
</if>
</select> </select>
<select id="selectGridIssueCount" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO"> <select id="selectGridIssueCount" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO">
SELECT SELECT

3
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml

@ -192,6 +192,9 @@
<if test='null != projectStatus and "" != projectStatus'> <if test='null != projectStatus and "" != projectStatus'>
and t1.PROJECT_STATUS=#{projectStatus} and t1.PROJECT_STATUS=#{projectStatus}
</if> </if>
<if test='null != isParty and "" != isParty'>
and t1.IS_PARTY=#{isParty}
</if>
</select> </select>
<select id="getSelfProject" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO"> <select id="getSelfProject" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO">
SELECT SELECT

Loading…
Cancel
Save