Browse Source

Merge branch 'dev' of http://git.elinkit.com.cn:7070/r/epmet-cloud into dev_bugfix_ljj

dev_shibei_match
zhaoqifeng 4 years ago
parent
commit
2578794caf
  1. 2
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml
  2. 12
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml
  3. 25
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PioneerDataFormDTO.java
  4. 16
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueMainDailyDao.java
  5. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java
  6. 32
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java
  7. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginIssueMainDailyService.java
  8. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java
  9. 16
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginIssueMainDailyServiceImpl.java
  10. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java
  11. 205
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PioneerDataExtractServiceImpl.java
  12. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ShiBeiScreenCollServiceImpl.java
  13. 9
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueMainDailyDao.xml
  14. 6
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml
  15. 20
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenPioneerDataDao.xml

2
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml

@ -70,7 +70,7 @@
on(diff.ORG_ID=scg.GRID_ID and scg.DEL_FLAG='0')
WHERE
diff.DEL_FLAG = '0'
and diff.orgType='grid'
and diff.ORG_TYPE='grid'
and diff.EVENT_STATUS_CODE in('pending','0')
AND scg.AREA_CODE like concat(#{areaCode},'%')
ORDER BY

12
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml

@ -33,17 +33,17 @@
<!-- 根据地区码查询先锋模范 -->
<select id="selectFineExampleByAreaCode" resultType="com.epmet.evaluationindex.screen.dto.result.FineExampleResultDTO">
SELECT
CEILING(avg(data.issue_total)) AS issueTotal,
CEILING(sum(data.issue_total)) AS issueTotal,
IFNULL(avg(data.issue_ratio),0) AS issueRatioA,
CEILING(avg(data.topic_total)) AS topicTotal,
CEILING(sum(data.topic_total)) AS topicTotal,
IFNULL(avg(data.topic_ratio),0) AS topicRatioA,
CEILING(avg(data.shift_project_total)) AS shiftProjectTotal,
CEILING(sum(data.shift_project_total)) AS shiftProjectTotal,
IFNULL(avg(data.shift_project_Ratio),0) AS shiftProjectRatioA,
CEILING(avg(data.resolved_project_total)) AS resolvedProjectTotal,
CEILING(sum(data.resolved_project_total)) AS resolvedProjectTotal,
IFNULL(avg(data.resolved_project_ratio),0) AS resolvedProjectRatioA,
CEILING(avg(data.publish_issue_total)) AS publishIssueTotal,
CEILING(sum(data.publish_issue_total)) AS publishIssueTotal,
IFNULL(avg(data.publish_issue_ratio),0) AS publishIssueRatioA,
CEILING(avg(data.PLAT_ISSUE_TOTAL)) AS platIssueTotal,
CEILING(sum(data.PLAT_ISSUE_TOTAL)) AS platIssueTotal,
IFNULL(avg(data.PLAT_JOIN_PARTY_RATIO),0) AS platJoinPartyRatio
FROM
screen_pioneer_data data

25
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PioneerDataFormDTO.java

@ -90,4 +90,29 @@ public class PioneerDataFormDTO implements Serializable {
* 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增)
*/
private String dataEndTime;
/**
* V2升级新增字段, 详见说明文档,对应 platIssueTotal
*/
private Integer issueRatioFm;
/**
* V2升级新增字段, 详见说明文档,对应 platTopicTotal
*/
private Integer topicRatioFm;
/**
* V2升级新增字段, 详见说明文档,对应 platShiftProjectTotal
*/
private Integer shiftProjectRatioFm;
/**
* V2升级新增字段, 详见说明文档,对应 platClosedProjectTotal
*/
private Integer resolvedProjectRatioFm;
/**
* V2升级新增字段, 详见说明文档,对应 platPublishIssueTotal
*/
private Integer publishIssueRatioFm;
}

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

@ -135,23 +135,31 @@ public interface FactOriginIssueMainDailyDao extends BaseDao<FactOriginIssueMain
/**
* @param customerId
* @param gridId
* @param issueStatus 议题状态 voting 已转项目shift_project 已关闭closed_resloved
* @return int
* @author yinzuomei
* @description 具体某个网格/社区下的议题总数
* @Date 2020/9/23 15:23
**/
int getGridOrCommunityIssueTotal(@Param("customerId") String customerId, @Param("gridId") String gridId,@Param("communityId") String communityId);
int getGridOrCommunityIssueTotal(@Param("customerId") String customerId,
@Param("gridId") String gridId,
@Param("communityId") String communityId,
@Param("issueStatus")String issueStatus);
/**
* @return int
* @param customerId
* @param gridId
* @param communityId
* @param topicUserIsParty 创建话题用户身份标识1:党员0:非党员
* @author yinzuomei
* @description 网格社区内议题转项目数
* @Date 2020/9/23 15:45
**/
int getGridOrCommunityShiftProjectTotal(@Param("customerId") String customerId, @Param("gridId") String gridId,@Param("communityId") String communityId);
int getGridOrCommunityShiftProjectTotal(@Param("customerId") String customerId,
@Param("gridId") String gridId,
@Param("communityId") String communityId,
@Param("topicUserIsParty") String topicUserIsParty);
/**
* @return java.lang.Integer
@ -178,12 +186,14 @@ public interface FactOriginIssueMainDailyDao extends BaseDao<FactOriginIssueMain
* @return java.lang.Integer
* @param customerId
* @param agencyPath
* @param topicUserIsParty 创建话题用户身份标识1:党员0:非党员
* @author yinzuomei
* @description 组织下议题转项目数
* @Date 2020/9/24 17:05
**/
Integer getAgencyShiftProjectTotal(@Param("customerId")String customerId,
@Param("agencyPath")String agencyPath);
@Param("agencyPath")String agencyPath,
@Param("topicUserIsParty")String topicUserIsParty);
/**
* 网格内议题总数

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

@ -122,6 +122,7 @@ public interface FactOriginProjectMainDailyDao extends BaseDao<FactOriginProject
* @param communityId
* @param closedStatus :resolved unresolved
* @param projectStatus :pending closed
* @param isParty 是否是党员 1:
* @author yinzuomei
* @description 具体某个网格或者社区内的项目
* @Date 2020/9/23 18:18
@ -130,7 +131,8 @@ public interface FactOriginProjectMainDailyDao extends BaseDao<FactOriginProject
@Param("gridId") String gridId,
@Param("communityId") String communityId,
@Param("closedStatus") String closedStatus,
@Param("projectStatus") String projectStatus);
@Param("projectStatus") String projectStatus,
@Param("isParty")String isParty);
/**
* @return int
@ -138,6 +140,7 @@ public interface FactOriginProjectMainDailyDao extends BaseDao<FactOriginProject
* @param agencyPath
* @param closedStatus :resolved unresolved
* @param projectStatus :pending closed
* @param isParty 是否是党员 1:
* @author yinzuomei
* @description 组织下已解决项目 or 已结案项目总数
* @Date 2020/9/24 17:38
@ -145,7 +148,8 @@ public interface FactOriginProjectMainDailyDao extends BaseDao<FactOriginProject
int getAgencyClosedProjectTotal(@Param("customerId") String customerId,
@Param("agencyPath")String agencyPath,
@Param("closedStatus")String closedStatus,
@Param("projectStatus") String projectStatus);
@Param("projectStatus") String projectStatus,
@Param("isParty") String isParty);
/**
* 组织自治项目数

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

@ -63,71 +63,75 @@ public class ScreenPioneerDataEntity extends BaseEpmetEntity {
private String orgName;
/**
* 党员参与议事
* 1.1党员参与议事何为参与议题的表决行为次数总计
*/
private Integer issueTotal;
/**
* 01.12新增PLAT_ISSUE_TOTAL 平台参与议事总数
* 1.2平台参与议事总数
*/
private Integer platIssueTotal;
/**
* 党员参与议事占比
* 1.3党员参与议事占比=issue_total/plat_issue_total
*/
private BigDecimal issueRatio;
/**
* 党员发布话题
* 2.1党员发布话题
*/
private Integer topicTotal;
/**
* 01.12新增PLAT_TOPIC_TOTAL 当前组织维度话题总数,TOPIC_RATIO的分母
* 2.2当前组织维度话题总数,TOPIC_RATIO的分母
*/
private Integer platTopicTotal;
/**
* 党员发布话题占比
* 2.3党员发布话题占比
*/
private BigDecimal topicRatio;
/**
* 党员发布议题
* 3.1党员发布议题总数话题发布人是党员
*/
private Integer publishIssueTotal;
/**
* 01.12新增PLAT_PUBLISH_ISSUE_TOTAL 当前组织维度发布议题总数PUBLISH_ISSUE_RATIO的分母SHIFT_PROJECT_RATIO的分母
* 3.2当前组织维度发布议题总数PUBLISH_ISSUE_RATIO的分母
*/
private Integer platPublishIssueTotal;
/**
* 党员发布议题占比
* 3.3党员发布议题占比
*/
private BigDecimal publishIssueRatio;
/**
* 议题转项目数
* 4.1党员议题转项目数话题发布人党员+已经转为项目的议题总数
*/
private Integer shiftProjectTotal;
/**
* 4.2当前组织维度已经转为项目的议题总数SHIFT_PROJECT_RATIO的分母.0708新增此列
*/
private Integer platShiftProjectTotal;
/**
* 议题转项目占比
* 4.3议题转项目占比
*/
private BigDecimal shiftProjectRatio;
/**
* 解决项目总数
* 5.1党员解决项目总数话题发布人是党员的议题转为项目并且已经解决
*/
private Integer resolvedProjectTotal;
/**
* 01.12新增PLAT_CLOSED_PROJECT_TOTAL 当前组织维度所有结案项目数RESOLVED_PROJECT_RATIO的分母
* 5.2当前组织维度所有结案项目数RESOLVED_PROJECT_RATIO的分母
*/
private Integer platClosedProjectTotal;
/**
* 解决项目总数占比
* 5.3解决项目总数占比
*/
private BigDecimal resolvedProjectRatio;

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

@ -46,21 +46,24 @@ public interface FactOriginIssueMainDailyService extends BaseService<FactOriginI
* @return java.lang.Integer
* @param customerId
* @param gridId
* @param communityId
* @param topicUserIsParty 创建话题用户身份标识1:党员0:非党员
* @author yinzuomei
* @description 网格内议题转项目数
* @Date 2020/9/23 15:39
**/
Integer getGridOrCommunityShiftProjectTotal(String customerId, String gridId,String communityId);
Integer getGridOrCommunityShiftProjectTotal(String customerId, String gridId,String communityId,String topicUserIsParty);
/**
* @return int
* @param customerId
* @param communityId
* @param issueStatus 议题状态 voting 已转项目shift_project 已关闭closed_resloved
* @author yinzuomei
* @description 某个网格内或者社区内议题总数
* @Date 2020/9/24 10:45
**/
int getGridOrCommunityIssueTotal(String customerId, String gridId,String communityId);
int getGridOrCommunityIssueTotal(String customerId, String gridId,String communityId,String issueStatus);
/**
* @return java.lang.Integer
@ -86,11 +89,12 @@ public interface FactOriginIssueMainDailyService extends BaseService<FactOriginI
* @return java.lang.Integer
* @param customerId
* @param agencyPath
* @param topicUserIsParty 创建话题用户身份标识1:党员0:非党员
* @author yinzuomei
* @description 组织下议题转项目数
* @Date 2020/9/24 17:04
**/
Integer getAgencyShiftProjectTotal(String customerId, String agencyPath);
Integer getAgencyShiftProjectTotal(String customerId, String agencyPath,String topicUserIsParty);
/**
* 网格内议题数

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

@ -120,11 +120,12 @@ public interface FactOriginProjectMainDailyService extends BaseService<FactOrigi
* @param gridId
* @param closedStatus :resolved unresolved
* @param projectStatus :pending closed
* @param isParty 是否是党员 1:
* @author yinzuomei
* @description 具体某个网格内的项目
* @Date 2020/9/23 18:17
**/
Integer getGridOrCommunityClosedProjectTotal(String customerId, String gridId, String communityId,String closedStatus,String projectStatus);
Integer getGridOrCommunityClosedProjectTotal(String customerId, String gridId, String communityId,String closedStatus,String projectStatus,String isParty);
/**
* @return int
@ -132,11 +133,12 @@ public interface FactOriginProjectMainDailyService extends BaseService<FactOrigi
* @param agencyPath
* @param closedStatus :resolved unresolved
* @param projectStatus :pending closed
* @param isParty 是否是党员 1:
* @author yinzuomei
* @description 组织下已解决项目 or 已结案项目总数
* @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);
/**
* 自治项目数

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

@ -66,27 +66,30 @@ public class FactOriginIssueMainDailyServiceImpl extends BaseServiceImpl<FactOri
/**
* @param customerId
* @param gridId
* @param communityId
* @param topicUserIsParty 创建话题用户身份标识1:党员0:非党员
* @return java.lang.Integer
* @author yinzuomei
* @description 网格内议题转项目数
* @Date 2020/9/23 15:39
**/
@Override
public Integer getGridOrCommunityShiftProjectTotal(String customerId, String gridId,String communityId) {
return baseDao.getGridOrCommunityShiftProjectTotal(customerId,gridId,communityId);
public Integer getGridOrCommunityShiftProjectTotal(String customerId, String gridId,String communityId,String topicUserIsParty) {
return baseDao.getGridOrCommunityShiftProjectTotal(customerId,gridId,communityId,topicUserIsParty);
}
/**
* @param customerId
* @param communityId
* @param issueStatus 议题状态 voting 已转项目shift_project 已关闭closed_resloved
* @return int
* @author yinzuomei
* @description 网格内或者社区内议题总数
* @Date 2020/9/24 10:45
**/
@Override
public int getGridOrCommunityIssueTotal(String customerId, String gridId,String communityId) {
return baseDao.getGridOrCommunityIssueTotal(customerId,gridId,communityId);
public int getGridOrCommunityIssueTotal(String customerId, String gridId,String communityId,String issueStatus) {
return baseDao.getGridOrCommunityIssueTotal(customerId,gridId,communityId,issueStatus);
}
/**
@ -118,14 +121,15 @@ public class FactOriginIssueMainDailyServiceImpl extends BaseServiceImpl<FactOri
/**
* @param customerId
* @param agencyPath
* @param topicUserIsParty 创建话题用户身份标识1:党员0:非党员
* @return java.lang.Integer
* @author yinzuomei
* @description 组织下议题转项目数
* @Date 2020/9/24 17:04
**/
@Override
public Integer getAgencyShiftProjectTotal(String customerId, String agencyPath) {
return baseDao.getAgencyShiftProjectTotal(customerId,agencyPath);
public Integer getAgencyShiftProjectTotal(String customerId, String agencyPath,String topicUserIsParty) {
return baseDao.getAgencyShiftProjectTotal(customerId,agencyPath,topicUserIsParty);
}
@Override

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

@ -151,14 +151,15 @@ public class FactOriginProjectMainDailyServiceImpl extends BaseServiceImpl<FactO
* @param gridId
* @param closedStatus :resolved unresolved
* @param projectStatus :pending closed
* @param isParty 是否是党员 1:
* @return java.lang.Integer
* @author yinzuomei
* @description 具体某个网格内的项目
* @Date 2020/9/23 18:17
**/
@Override
public Integer getGridOrCommunityClosedProjectTotal(String customerId, String gridId,String communityId, String closedStatus,String projectStatus) {
return baseDao.getGridOrCommunityClosedProjectTotal(customerId,gridId,communityId,closedStatus,projectStatus);
public Integer getGridOrCommunityClosedProjectTotal(String customerId, String gridId,String communityId, String closedStatus,String projectStatus,String isParty) {
return baseDao.getGridOrCommunityClosedProjectTotal(customerId,gridId,communityId,closedStatus,projectStatus,isParty);
}
/**
@ -166,14 +167,15 @@ public class FactOriginProjectMainDailyServiceImpl extends BaseServiceImpl<FactO
* @param agencyPath
* @param closedStatus :resolved unresolved
* @param projectStatus :pending closed
* @param isParty 是否是党员 1:
* @return int
* @author yinzuomei
* @description 组织下已解决项目 or 已结案项目总数
* @Date 2020/9/24 17:37
**/
@Override
public int getAgencyClosedProjectTotal(String customerId, String agencyPath, String closedStatus,String projectStatus) {
return baseDao.getAgencyClosedProjectTotal(customerId,agencyPath,closedStatus,projectStatus);
public int getAgencyClosedProjectTotal(String customerId, String agencyPath, String closedStatus,String projectStatus,String isParty) {
return baseDao.getAgencyClosedProjectTotal(customerId,agencyPath,closedStatus,projectStatus,isParty);
}
@Override

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

@ -2,10 +2,7 @@ package com.epmet.service.evaluationindex.extract.toscreen.impl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.constant.DimObjectStatusConstant;
import com.epmet.constant.IndexCalConstant;
import com.epmet.constant.OrgTypeConstant;
import com.epmet.constant.ProjectConstant;
import com.epmet.constant.*;
import com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity;
import com.epmet.service.evaluationindex.extract.todata.FactOriginIssueLogDailyService;
import com.epmet.service.evaluationindex.extract.todata.FactOriginIssueMainDailyService;
@ -63,17 +60,18 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
gridList.forEach(entity -> {
entity.setDataEndTime(dateId);
String gridId = entity.getOrgId();
//何为参与: 议题的表决行为次数总计
//1、党员参与议事
// 1.1党员参与议事:何为参与?议题的表决行为次数总计
entity.setIssueTotal(calPartyPartiIssueTotal(customerId,gridId,null,null,NumConstant.ONE_STR));
log.info("extractGridPioneerData 当前网格id=" + gridId + ";党员参与议事issueTotal="+entity.getIssueTotal());
//01.12新增:平台参与议事总数
// 1.2平台参与议事总数
int issueTotal=calPartyPartiIssueTotal(customerId,gridId,null,null,null);
entity.setPlatIssueTotal(issueTotal);
log.info("extractGridPioneerData 当前网格id=" + gridId + ";参与议事总数issueTotal=" + issueTotal);
//2、党员参与议事占比
// 1.3党员参与议事占比=issue_total/plat_issue_total
if(entity.getIssueTotal()==0){
entity.setIssueRatio(BigDecimal.ZERO);
}else{
@ -82,17 +80,17 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
entity.setIssueRatio(issueRatio.setScale(NumConstant.SIX,RoundingMode.HALF_UP));
}
//3、党员发布话题:
// 2.1党员发布话题
entity.setTopicTotal(getTopicTotal(customerId, gridId, null));
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 当前组织维度,话题总数
// 2.2当前组织维度,话题总数,TOPIC_RATIO的分母
entity.setPlatTopicTotal(gridTopicTotal);
//4、党员发布话题占比: 网格内注册党员发布的话题总数占 网格内话题总数的 比率
// 2.3党员发布话题占比
if (entity.getTopicTotal() == NumConstant.ZERO) {
entity.setTopicRatio(BigDecimal.ZERO);
} else {
@ -106,31 +104,46 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
}
//当前网格内所有议题总数
int gridIssueTotal = getGridOrCommunityIssueTotal(customerId, gridId, null);
int gridIssueTotal = getGridOrCommunityIssueTotal(customerId, gridId, null,StrConstant.EPMETY_STR);
log.info("extractGridPioneerData 当前网格id=" + gridId + ";当前网格内所有议题总数=" + gridIssueTotal);
//01.12新增:PLAT_PUBLISH_ISSUE_TOTAL 当前组织维度,发布议题总数
// 3.2当前组织维度,发布议题总数,PUBLISH_ISSUE_RATIO的分母
entity.setPlatPublishIssueTotal(gridIssueTotal);
if (gridIssueTotal != NumConstant.ZERO) {
//5、党员发布议题
//当前网格内,议题已经转为项目的总数
int gridIssueToProjectTotal=getGridOrCommunityIssueTotal(customerId, gridId, null, IssueConstant.SHIFT_PROJECT);
// 4.2当前组织维度,已经转为项目的议题总数,SHIFT_PROJECT_RATIO的分母
entity.setPlatShiftProjectTotal(gridIssueToProjectTotal);
if (gridIssueTotal != NumConstant.ZERO && gridIssueToProjectTotal !=NumConstant.ZERO) {
// 3.1党员发布议题总数:话题发布人是党员
entity.setPublishIssueTotal(getParyPublishIssueTotal(customerId, gridId, null));
log.info("extractGridPioneerData 当前网格id=" + gridId + ";党员发布议题publishIssueTotal"+entity.getPublishIssueTotal());
//6、党员发布议题占比 : 占网格内所有议题的比率
// 3.3党员发布议题占比
if (entity.getPublishIssueTotal() == NumConstant.ZERO) {
entity.setPublishIssueRatio(BigDecimal.ZERO);
}else{
BigDecimal publishIssueRatio=new BigDecimal((double)entity.getPublishIssueTotal() / gridIssueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED));
entity.setPublishIssueRatio(publishIssueRatio.setScale(NumConstant.SIX, RoundingMode.HALF_UP));
}
//7、议题转项目数
entity.setShiftProjectTotal(getGridOrCommunityShiftProjectTotal(customerId, gridId, null));
log.info("extractGridPioneerData 当前网格id=" + gridId +";议题转项目数shiftProjectTotal="+entity.getShiftProjectTotal());
//8、议题转项目占比 : 占网格内议题总数的比率
if(entity.getShiftProjectTotal() == NumConstant.ZERO){
//按照贾总要求改为:
// 先锋模范的统计的是来源于居民端话题->议题-项目的。
// 议题转项目占比(党员/用户):党员议题转项目/议题转项目数;
// 解决项目占比(党员/用户):党员已解决项目总数/已解决项目总数;
// 这个党员指的都是话题发布人是党员。
// 党员议题转项目数:当前网格内的项目,话题发布人是党员的; TOPIC_USER_IS_PARTY:创建话题用户身份标识。1:党员,0:非党员
// 4.1党员议题转项目数:话题发布人党员+已经转为项目的议题总数
entity.setShiftProjectTotal(getGridOrCommunityShiftProjectTotal(customerId, gridId, null,NumConstant.ONE_STR));
log.info("extractGridPioneerData 当前网格id=" + gridId +";党员议题转项目数shiftProjectTotal="+entity.getShiftProjectTotal());
//8、党员议题转项目占比 : 占网格内议题转项目总数的比率
if(entity.getShiftProjectTotal() == NumConstant.ZERO||gridIssueToProjectTotal ==NumConstant.ZERO){
//4.3议题转项目占比
entity.setShiftProjectRatio(BigDecimal.ZERO);
}else{
BigDecimal shiftProjectRatio = new BigDecimal((double) entity.getShiftProjectTotal() / gridIssueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED));
BigDecimal shiftProjectRatio = new BigDecimal((double) entity.getShiftProjectTotal() / gridIssueToProjectTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED));
//4.3议题转项目占比
entity.setShiftProjectRatio(shiftProjectRatio.setScale(NumConstant.SIX, RoundingMode.HALF_UP));
}
@ -143,25 +156,22 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
}
// 9、已解决项目
entity.setResolvedProjectTotal(getGridOrCommunityClosedProjectTotal(customerId, gridId, null, DimObjectStatusConstant.RESOLVED));
// 5.1党员解决项目总数:话题发布人是党员的议题,转为项目并且已经解决
entity.setResolvedProjectTotal(getGridOrCommunityClosedProjectTotal(customerId, gridId, null, DimObjectStatusConstant.RESOLVED,ProjectConstant.CLOSED,NumConstant.ONE_STR));
log.info("extractGridPioneerData 当前网格id="+gridId+";已解决项目resolvedProjectTotal="+entity.getResolvedProjectTotal());
int closedProjectTotal = getGridOrCommunityClosedProjectTotal(customerId, gridId, null, null);
//已解决项目总数
int closedProjectTotal = getGridOrCommunityClosedProjectTotal(customerId, gridId, null, DimObjectStatusConstant.RESOLVED,ProjectConstant.CLOSED,StrConstant.EPMETY_STR);
log.info("extractGridPioneerData 当前网格id="+gridId+";总结项目closedProjectTotal="+closedProjectTotal);
// 01.12新增:PLAT_CLOSED_PROJECT_TOTAL 当前组织维度,所有结案项目数
// 5.2当前组织维度,所有结案项目数,RESOLVED_PROJECT_RATIO的分母
entity.setPlatClosedProjectTotal(closedProjectTotal);
// 10、占总结项目
if (entity.getResolvedProjectTotal() == NumConstant.ZERO) {
// 5.3解决项目总数占比
if (entity.getResolvedProjectTotal() == NumConstant.ZERO ||closedProjectTotal == NumConstant.ZERO) {
entity.setResolvedProjectRatio(BigDecimal.ZERO);
} else {
if(closedProjectTotal == NumConstant.ZERO){
entity.setResolvedProjectRatio(BigDecimal.ZERO);
}else {
BigDecimal resolvedProjectRatio = new BigDecimal((double) entity.getResolvedProjectTotal() / closedProjectTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED));
entity.setResolvedProjectRatio(resolvedProjectRatio.setScale(NumConstant.SIX, RoundingMode.HALF_UP));
}
BigDecimal resolvedProjectRatio = new BigDecimal((double) entity.getResolvedProjectTotal() / closedProjectTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED));
entity.setResolvedProjectRatio(resolvedProjectRatio.setScale(NumConstant.SIX, RoundingMode.HALF_UP));
}
//01.12: 新增指标:平台参与议事总人数、平台参与议事党员数、平台参与议事的党员占比
entity.setPlatJoinUserTotal(factOriginIssueLogDailyService.calPlatJoinUserTotal(customerId, gridId, null, null,null));
@ -206,60 +216,64 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
communityList.forEach(entity -> {
entity.setDataEndTime(dateId);
String communityId = entity.getOrgId();
//1、党员参与议事
// 1.1党员参与议事:何为参与?议题的表决行为次数总计
entity.setIssueTotal(calPartyPartiIssueTotal(customerId,null,communityId,null,NumConstant.ONE_STR));
log.info("extractCommunityPioneerData 当前communityId="+communityId+";党员参与议事issueTotal="+entity.getIssueTotal());
//01.12新增
// 1.2平台参与议事总数
int issueTotal=calPartyPartiIssueTotal(customerId,null,communityId,null,null);
log.info("extractCommunityPioneerData 当前communityId="+communityId+";参与议事总数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(getTopicTotal(customerId, null, communityId));
log.info("extractCommunityPioneerData 当前communityId="+communityId+";党员发布话题topicTotal="+entity.getTopicTotal());
//01.12新增
//当前社区内所有话题总数
//2.2当前组织维度,话题总数,TOPIC_RATIO的分母
int communityTopicTotal = getGridOrCommunityTopicTotal(customerId, null, communityId);
log.info("extractCommunityPioneerData 当前communityId="+communityId+";当前社区内所有话题总数communityTopicTotal="+communityTopicTotal);
entity.setPlatTopicTotal(communityTopicTotal);
//4、党员发布话题占比: 社区内注册党员发布的话题总数占 社区内话题总数的 比率
//2.3党员发布话题占比
if (entity.getTopicTotal() == NumConstant.ZERO) {
entity.setTopicRatio(BigDecimal.ZERO);
} else {
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);
//3.2当前组织维度,发布议题总数,PUBLISH_ISSUE_RATIO的分母
int communityIssueTotal = getGridOrCommunityIssueTotal(customerId, null, communityId,StrConstant.EPMETY_STR);
log.info("extractCommunityPioneerData 当前communityId="+communityId+";当前社区内所有议题总数communityIssueTotal="+communityIssueTotal);
entity.setPlatPublishIssueTotal(communityIssueTotal);
if (communityIssueTotal != NumConstant.ZERO) {
//5、党员发布议题
int communityIssueToProjectTotal = getGridOrCommunityIssueTotal(customerId, null, communityId,IssueConstant.SHIFT_PROJECT);
//4.2当前组织维度,已经转为项目的议题总数,SHIFT_PROJECT_RATIO的分母.0708新增此列
entity.setPlatShiftProjectTotal(communityIssueToProjectTotal);
if (communityIssueTotal != NumConstant.ZERO && communityIssueToProjectTotal != NumConstant.ZERO) {
//3.1党员发布议题总数:话题发布人是党员
entity.setPublishIssueTotal(getParyPublishIssueTotal(customerId, null, communityId));
log.info("extractCommunityPioneerData 当前communityId="+communityId+";党员发布议题publishIssueTotal="+entity.getPublishIssueTotal());
//6、党员发布议题占比 : 占社区内所有议题的比率
//3.3党员发布议题占比
if (entity.getPublishIssueTotal() == NumConstant.ZERO) {
entity.setPublishIssueRatio(BigDecimal.ZERO);
}
entity.setPublishIssueRatio(communityIssueTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal((double)entity.getPublishIssueTotal() / communityIssueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).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((double)entity.getShiftProjectTotal() / communityIssueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
//4.1党员议题转项目数:话题发布人党员+已经转为项目的议题总数
entity.setShiftProjectTotal(getGridOrCommunityShiftProjectTotal(customerId, null, communityId,NumConstant.ONE_STR));
log.info("extractCommunityPioneerData 当前communityId="+communityId+";党员议题转项目数shiftProjectTotal="+entity.getShiftProjectTotal());
//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");
entity.setPublishIssueTotal(NumConstant.ZERO);
@ -269,19 +283,20 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
}
// 9、已解决项目
entity.setResolvedProjectTotal(getGridOrCommunityClosedProjectTotal(customerId, null, communityId, DimObjectStatusConstant.RESOLVED));
// 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新增
int closedProjectTotal = getGridOrCommunityClosedProjectTotal(customerId, null, communityId, null);
// 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));
}
@ -314,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);
@ -377,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));
}
@ -409,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);
}
//组织内: 党员发布议题
@ -440,10 +463,12 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
* @param gridId 网格id
* @param communityId 社区的agencyId
* @param closedStatus 结案状态已解决 resolved未解决 unresolved
* @param projectStatus :pending closed
* @param isParty 是否是党员 1:
* @description 网格或者社区下: 已解决项目
**/
private Integer getGridOrCommunityClosedProjectTotal(String customerId, String gridId, String communityId, String closedStatus) {
return factOriginProjectMainDailyService.getGridOrCommunityClosedProjectTotal(customerId, gridId, communityId, closedStatus,ProjectConstant.CLOSED);
private Integer getGridOrCommunityClosedProjectTotal(String customerId, String gridId, String communityId, String closedStatus,String projectStatus,String isParty) {
return factOriginProjectMainDailyService.getGridOrCommunityClosedProjectTotal(customerId, gridId, communityId, closedStatus,projectStatus,isParty);
}
/**
@ -484,10 +509,11 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
* @param customerId 客户id
* @param gridId 网格id
* @param communityId 社区的agencyId
* @param issueStatus 议题状态 voting 已转项目shift_project 已关闭closed_resloved
* @description 网格或者社区下 议题总数
**/
private int getGridOrCommunityIssueTotal(String customerId, String gridId, String communityId) {
return factOriginIssueMainDailyService.getGridOrCommunityIssueTotal(customerId, gridId, communityId);
private int getGridOrCommunityIssueTotal(String customerId, String gridId, String communityId,String issueStatus) {
return factOriginIssueMainDailyService.getGridOrCommunityIssueTotal(customerId, gridId, communityId,issueStatus);
}
/**
@ -495,10 +521,11 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
* @param customerId 客户id
* @param gridId 网格id
* @param communityId 社区的agencyId
* @param topicUserIsParty 创建话题用户身份标识1:党员0:非党员
* @description 网格或者社区下: 议题转项目数
**/
private Integer getGridOrCommunityShiftProjectTotal(String customerId, String gridId, String communityId) {
return factOriginIssueMainDailyService.getGridOrCommunityShiftProjectTotal(customerId, gridId, communityId);
private Integer getGridOrCommunityShiftProjectTotal(String customerId, String gridId, String communityId,String topicUserIsParty) {
return factOriginIssueMainDailyService.getGridOrCommunityShiftProjectTotal(customerId, gridId, communityId,topicUserIsParty);
}
}

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ShiBeiScreenCollServiceImpl.java

@ -547,7 +547,7 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService {
@Override
@Transactional(rollbackFor = Exception.class)
public void insertPioneerData(PioneerDataListFormDTO formDTO, String customerId) {
if (formDTO.getIsFirst()) {
if (formDTO.getIsFirst() && !CollectionUtils.isEmpty(formDTO.getDataList())) {
int deleteNum;
do {
deleteNum = screenPioneerDataDao.deletePioneerDataByCustomerId(customerId, IndexCalConstant.DELETE_SIZE);

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

@ -210,6 +210,9 @@
<if test='null != communityId and ""!=communityId'>
and t1.AGENCY_ID=#{communityId}
</if>
<if test='null != issueStatus and ""!=issueStatus'>
and t1.ISSUE_STATUS=#{issueStatus}
</if>
</select>
<!-- 网格或者社区内议题转项目数 -->
@ -228,6 +231,9 @@
<if test='null != communityId and ""!=communityId'>
and t1.AGENCY_ID=#{communityId}
</if>
<if test='null != topicUserIsParty and ""!=topicUserIsParty'>
and t1.TOPIC_USER_IS_PARTY = #{topicUserIsParty}
</if>
</select>
<!-- 组织内: 党员发布议题 -->
@ -266,6 +272,9 @@
AND t1.ISSUE_STATUS = 'shift_project'
AND t1.CUSTOMER_ID = #{customerId}
and t1.PIDS LIKE CONCAT(#{agencyPath},'%')
<if test='null != topicUserIsParty and ""!=topicUserIsParty'>
and t1.TOPIC_USER_IS_PARTY = #{topicUserIsParty}
</if>
</select>
<select id="selectGridIssueCount" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO">
SELECT

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

@ -171,6 +171,9 @@
<if test='null != projectStatus and "" != projectStatus'>
and t1.PROJECT_STATUS=#{projectStatus}
</if>
<if test='null != isParty and "" != isParty'>
and t1.IS_PARTY=#{isParty}
</if>
</select>
<!-- 组织下:已解决项目 or 已结案项目总数 -->
@ -189,6 +192,9 @@
<if test='null != projectStatus and "" != projectStatus'>
and t1.PROJECT_STATUS=#{projectStatus}
</if>
<if test='null != isParty and "" != isParty'>
and t1.IS_PARTY=#{isParty}
</if>
</select>
<select id="getSelfProject" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO">
SELECT

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

@ -51,7 +51,12 @@
CREATED_TIME,
UPDATED_BY,
UPDATED_TIME,
DATA_END_TIME
DATA_END_TIME,
PLAT_ISSUE_TOTAL,
PLAT_TOPIC_TOTAL,
PLAT_SHIFT_PROJECT_TOTAL,
PLAT_CLOSED_PROJECT_TOTAL,
PLAT_PUBLISH_ISSUE_TOTAL
) values
<foreach collection="list" item="item" index="index" separator=",">
(
@ -78,7 +83,12 @@
now(),
'APP_USER',
now(),
#{item.dataEndTime}
#{item.dataEndTime},
#{item.issueRatioFm},
#{item.topicRatioFm},
#{item.shiftProjectRatioFm},
#{item.resolvedProjectRatioFm},
#{item.publishIssueRatioFm}
)
</foreach>
</insert>
@ -195,7 +205,8 @@
PLAT_JOIN_PARTY_RATIO,
PLAT_TOPIC_TOTAL,
PLAT_PUBLISH_ISSUE_TOTAL,
PLAT_CLOSED_PROJECT_TOTAL
PLAT_CLOSED_PROJECT_TOTAL,
PLAT_SHIFT_PROJECT_TOTAL
) values
<foreach collection="list" item="item" index="index" separator=",">
(
@ -228,7 +239,8 @@
#{item.platJoinPartyRatio},
#{item.platTopicTotal},
#{item.platPublishIssueTotal},
#{item.platClosedProjectTotal}
#{item.platClosedProjectTotal},
#{item.platShiftProjectTotal}
)
</foreach>
</insert>

Loading…
Cancel
Save