diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/result/CpcIndexCommonDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/result/CpcIndexCommonDTO.java new file mode 100644 index 0000000000..10b5603577 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/result/CpcIndexCommonDTO.java @@ -0,0 +1,18 @@ +package com.epmet.dto.indexcollect.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 描述一下 + * + * @author yinzuomei@elink-cn.com + * @date 2020/10/12 21:57 + */ +@Data +public class CpcIndexCommonDTO implements Serializable { + private static final long serialVersionUID = -424750065699208595L; + private String userId; + private Integer indexValue; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueMainDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueMainDailyDao.java index 794b9f091a..c8969fea56 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueMainDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueMainDailyDao.java @@ -23,12 +23,12 @@ import com.epmet.dto.extract.form.IssueMainDailyFormDTO; import com.epmet.dto.extract.result.GridProjectCountResultDTO; import com.epmet.dto.extract.result.OrgStatisticsResultDTO; import com.epmet.dto.extract.result.ShiftProjectCountResultDTO; +import com.epmet.dto.indexcollect.result.CpcIndexCommonDTO; import com.epmet.entity.evaluationindex.extract.FactOriginIssueMainDailyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; -import java.util.Map; /** * 议题主表 @@ -84,14 +84,13 @@ public interface FactOriginIssueMainDailyDao extends BaseDao selectGridProjectCount(@Param("customerId") String customerId,@Param("monthId") String monthId, @Param("status") String status); /** - * @return java.util.List> * @param customerId * @param monthId * @author yinzuomei * @description 党员提出的话题转议题数 * @Date 2020/9/18 13:58 **/ - List> selectShiftIssueCount(@Param("customerId") String customerId,@Param("monthId") String monthId); + List selectShiftIssueCount(@Param("customerId") String customerId, @Param("monthId") String monthId); /** * @Description 查询网格 党员/群众 人均提出的议题转项目数 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java index 4ed5d1303c..bc982b3c82 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java @@ -19,8 +19,9 @@ package com.epmet.dao.evaluationindex.extract; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.extract.FactOriginProjectMainDailyDTO; -import com.epmet.dto.extract.result.OrgStatisticsResultDTO; import com.epmet.dto.extract.result.GridProjectClosedTotalResultDTO; +import com.epmet.dto.extract.result.OrgStatisticsResultDTO; +import com.epmet.dto.indexcollect.result.CpcIndexCommonDTO; import com.epmet.dto.screen.form.ProjectSourceMapFormDTO; import com.epmet.entity.evaluationindex.extract.FactOriginProjectMainDailyEntity; import com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity; @@ -28,7 +29,6 @@ import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; -import java.util.Map; /** * 项目主表_日统计 @@ -88,14 +88,13 @@ public interface FactOriginProjectMainDailyDao extends BaseDao> * @param customerId * @param monthId * @author yinzuomei * @description 党员提出的议题转项目数 * @Date 2020/9/18 14:11 **/ - List> selectShiftProjectCount(@Param("customerId") String customerId, @Param("monthId") String monthId); + List selectShiftProjectCount(@Param("customerId") String customerId, @Param("monthId") String monthId); /** * @return java.lang.Integer @@ -113,7 +112,8 @@ public interface FactOriginProjectMainDailyDao extends BaseDao list); /** - * @return java.util.List> * @param customerId * @param monthId * @author yinzuomei * @description 查询客户下,这个月内,每个党员评论话题的次数 * @Date 2020/9/18 13:36 **/ - List> selectJoinTopicCount(@Param("customerId") String customerId, @Param("monthId") String monthId); + List selectJoinTopicCount(@Param("customerId") String customerId, @Param("monthId") String monthId); /** * @return java.util.List> @@ -73,7 +72,7 @@ public interface FactOriginTopicLogDailyDao extends BaseDao> selectGroupTopicCount(@Param("customerId") String customerId, @Param("monthId") String monthId); + List selectGroupTopicCount(@Param("customerId") String customerId, @Param("monthId") String monthId); /** * @return java.lang.Integer diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginTopicMainDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginTopicMainDailyDao.java index 547d713e90..ae3ad01fd5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginTopicMainDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginTopicMainDailyDao.java @@ -20,12 +20,12 @@ package com.epmet.dao.evaluationindex.extract; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.extract.result.CreateTopicCountResultDTO; import com.epmet.dto.extract.result.OrgStatisticsResultDTO; +import com.epmet.dto.indexcollect.result.CpcIndexCommonDTO; import com.epmet.entity.evaluationindex.extract.FactOriginTopicMainDailyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; -import java.util.Map; /** * 话题主表_日统计 @@ -65,7 +65,7 @@ public interface FactOriginTopicMainDailyDao extends BaseDao> selectPartyCreateTopicCount(@Param("customerId") String customerId, @Param("monthId") String monthId); + List selectPartyCreateTopicCount(@Param("customerId") String customerId, @Param("monthId") String monthId); /** * @Description 查询网格 党员/群众 人均提出话题数 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginProjectMainDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginProjectMainDailyEntity.java index 3c7fe26b11..c570c4e453 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginProjectMainDailyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginProjectMainDailyEntity.java @@ -133,6 +133,4 @@ public class FactOriginProjectMainDailyEntity extends BaseEpmetEntity { */ private String finishOrgIds; - private String closedStatus; - } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalCpcIndexServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalCpcIndexServiceImpl.java index d76391ece8..c4ba146e48 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalCpcIndexServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalCpcIndexServiceImpl.java @@ -2,6 +2,7 @@ package com.epmet.service.evaluationindex.extract.dataToIndex.impl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.dto.indexcollect.result.CpcIndexCommonDTO; import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyEntity; import com.epmet.service.evaluationindex.extract.dataToIndex.CalCpcIndexService; import com.epmet.service.evaluationindex.extract.todata.*; @@ -158,12 +159,10 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService { * @Date 2020/9/18 10:59 **/ private Map calCreateTopicCount(String customerId, String monthId) { - List> mapList = factOriginTopicMainDailyService.selectPartyCreateTopicCount(customerId, monthId); + List list = factOriginTopicMainDailyService.selectPartyCreateTopicCount(customerId, monthId); Map resultMap = new HashMap<>(); - for (Map map : mapList) { - for (Map.Entry m : map.entrySet()) { - resultMap.put(m.getKey(), m.getValue()); - } + for (CpcIndexCommonDTO cpcIndexCommonDTO: list) { + resultMap.put(cpcIndexCommonDTO.getUserId(), cpcIndexCommonDTO.getIndexValue()); } return resultMap; } @@ -177,12 +176,10 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService { * @Date 2020/9/18 13:33 **/ private Map calJoinTopicCount(String customerId, String monthId) { - List> mapList = factOriginTopicLogDailyService.selectJoinTopicCount(customerId, monthId); + List list = factOriginTopicLogDailyService.selectJoinTopicCount(customerId, monthId); Map resultMap = new HashMap<>(); - for (Map map : mapList) { - for (Map.Entry m : map.entrySet()) { - resultMap.put(m.getKey(), m.getValue()); - } + for (CpcIndexCommonDTO cpcIndexCommonDTO : list) { + resultMap.put(cpcIndexCommonDTO.getUserId(), cpcIndexCommonDTO.getIndexValue()); } return resultMap; } @@ -197,12 +194,10 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService { * @Date 2020/9/18 13:53 **/ private Map calShiftIssueCount(String customerId, String monthId) { - List> mapList = issueExtractService.selectShiftIssueCount(customerId, monthId); + List list = issueExtractService.selectShiftIssueCount(customerId, monthId); Map resultMap = new HashMap<>(); - for (Map map : mapList) { - for (Map.Entry m : map.entrySet()) { - resultMap.put(m.getKey(), m.getValue()); - } + for (CpcIndexCommonDTO cpcIndexCommonDTO : list) { + resultMap.put(cpcIndexCommonDTO.getUserId(), cpcIndexCommonDTO.getIndexValue()); } return resultMap; } @@ -217,12 +212,10 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService { **/ private Map calShiftProjectCount(String customerId, String monthId) { //查询fact_origin_project_main_daily 表 中议题的议题的状态为 shift_ - List> mapList = factOriginProjectMainDailyService.selectShiftProjectCount(customerId, monthId); + List list = factOriginProjectMainDailyService.selectShiftProjectCount(customerId, monthId); Map resultMap = new HashMap<>(); - for (Map map : mapList) { - for (Map.Entry m : map.entrySet()) { - resultMap.put(m.getKey(), m.getValue()); - } + for (CpcIndexCommonDTO cpcIndexCommonDTO : list) { + resultMap.put(cpcIndexCommonDTO.getUserId(), cpcIndexCommonDTO.getIndexValue()); } return resultMap; } @@ -337,12 +330,10 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService { 数据来源:话题表。 计算方法:从话题表中统计党员自建群i的话题总数;对所有自建群话题数累加。 对评价结果的影响:正向。*/ - List> mapList = factOriginTopicLogDailyService.selectGroupTopicCount(customerId, monthId); + List list = factOriginTopicLogDailyService.selectGroupTopicCount(customerId, monthId); Map resultMap = new HashMap<>(); - for (Map map : mapList) { - for (Map.Entry m : map.entrySet()) { - resultMap.put(m.getKey(), m.getValue()); - } + for (CpcIndexCommonDTO dto : list) { + resultMap.put(dto.getUserId(), dto.getIndexValue()); } return resultMap; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java index ef295cf1bc..956cd4a029 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java @@ -22,10 +22,10 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.dto.extract.FactOriginProjectMainDailyDTO; import com.epmet.dto.extract.result.GridProjectClosedTotalResultDTO; import com.epmet.dto.extract.result.OrgStatisticsResultDTO; +import com.epmet.dto.indexcollect.result.CpcIndexCommonDTO; import com.epmet.dto.screen.form.ProjectSourceMapFormDTO; import com.epmet.entity.evaluationindex.extract.FactOriginProjectMainDailyEntity; import com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity; -import com.mysql.cj.x.protobuf.MysqlxDatatypes; import java.util.List; import java.util.Map; @@ -147,14 +147,13 @@ public interface FactOriginProjectMainDailyService extends BaseService> * @param customerId * @param monthId * @author yinzuomei * @description 党员提出的议题转项目数 * @Date 2020/9/18 14:11 **/ - List> selectShiftProjectCount(String customerId, String monthId); + List selectShiftProjectCount(String customerId, String monthId); /** * @return java.lang.Integer @@ -171,23 +170,25 @@ public interface FactOriginProjectMainDailyService extends BaseService { /** - * @return java.util.List> * @param customerId * @param monthId * @author yinzuomei * @description 查询客户下,这个月内,每个党员评论话题的次数 * @Date 2020/9/18 13:35 **/ - List> selectJoinTopicCount(String customerId, String monthId); + List selectJoinTopicCount(String customerId, String monthId); /** - * @return java.util.List> * @param customerId * @param monthId * @author yinzuomei * @description 党员自建群活跃度——话题数 * @Date 2020/9/18 14:33 **/ - List> selectGroupTopicCount(String customerId, String monthId); + List selectGroupTopicCount(String customerId, String monthId); /** * @return int diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginTopicMainDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginTopicMainDailyService.java index e059614d26..5c4f8da390 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginTopicMainDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginTopicMainDailyService.java @@ -21,10 +21,10 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.dto.extract.form.ExtractOriginFormDTO; import com.epmet.dto.extract.result.CreateTopicCountResultDTO; import com.epmet.dto.extract.result.OrgStatisticsResultDTO; +import com.epmet.dto.indexcollect.result.CpcIndexCommonDTO; import com.epmet.entity.evaluationindex.extract.FactOriginTopicMainDailyEntity; import java.util.List; -import java.util.Map; /** @@ -44,14 +44,13 @@ public interface FactOriginTopicMainDailyService extends BaseService> * @param customerId * @param monthId yyyyMM * @author yinzuomei * @description 党员提出话题数:返回每个党员这个月内,提出的话题数 * @Date 2020/9/18 11:03 **/ - List> selectPartyCreateTopicCount(String customerId, String monthId); + List selectPartyCreateTopicCount(String customerId, String monthId); /** * @Description 查询网格 党员/群众 人均提出话题数 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/IssueExtractService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/IssueExtractService.java index b169556f73..2ee29acd93 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/IssueExtractService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/IssueExtractService.java @@ -5,9 +5,9 @@ import com.epmet.dto.extract.form.GridIssueCountResultDTO; import com.epmet.dto.extract.result.GridProjectCountResultDTO; import com.epmet.dto.extract.result.PartyActiveResultDTO; import com.epmet.dto.extract.result.ShiftProjectCountResultDTO; +import com.epmet.dto.indexcollect.result.CpcIndexCommonDTO; import java.util.List; -import java.util.Map; /** * @Author zxc @@ -60,14 +60,13 @@ public interface IssueExtractService { List selectGridProjectCount(String customerId, String monthId,String status); /** - * @return java.util.List> * @param customerId * @param monthId * @author yinzuomei * @description 党员提出的话题转议题数 * @Date 2020/9/18 13:57 **/ - List> selectShiftIssueCount(String customerId, String monthId); + List selectShiftIssueCount(String customerId, String monthId); /** * @Description 查询网格 党员/群众 人均提出的议题转项目数 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java index c4fe8c7fab..4571862990 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java @@ -30,6 +30,7 @@ import com.epmet.dao.evaluationindex.extract.FactOriginProjectMainDailyDao; import com.epmet.dto.extract.FactOriginProjectMainDailyDTO; import com.epmet.dto.extract.result.GridProjectClosedTotalResultDTO; import com.epmet.dto.extract.result.OrgStatisticsResultDTO; +import com.epmet.dto.indexcollect.result.CpcIndexCommonDTO; import com.epmet.dto.screen.form.ProjectSourceMapFormDTO; import com.epmet.entity.evaluationindex.extract.FactOriginProjectMainDailyEntity; import com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity; @@ -141,13 +142,12 @@ public class FactOriginProjectMainDailyServiceImpl extends BaseServiceImpl> * @author yinzuomei * @description 党员提出的议题转项目数 * @Date 2020/9/18 14:11 **/ @Override - public List> selectShiftProjectCount(String customerId, String monthId) { + public List selectShiftProjectCount(String customerId, String monthId) { //查询项目主表fact_origin_project_main_daily,这个月内新增的项目,按话题发布人分组 /*含义:评价周期内,党员提出的议题转数目数。 数据来源:项目表。 @@ -176,29 +176,31 @@ public class FactOriginProjectMainDailyServiceImpl extends BaseServiceImpl> * @author yinzuomei * @description 查询客户下,这个月内,每个党员评论话题的次数 * @Date 2020/9/18 13:35 **/ @Override - public List> selectJoinTopicCount(String customerId, String monthId) { + public List selectJoinTopicCount(String customerId, String monthId) { //这个月内新增的话题评论,按人分组,不限制评论时的身份,以当前用户最新身份为准 return baseDao.selectJoinTopicCount(customerId,monthId); } @@ -59,13 +58,12 @@ public class FactOriginTopicLogDailyServiceImpl extends BaseServiceImpl> * @author yinzuomei * @description 党员自建群活跃度——话题数 * @Date 2020/9/18 14:33 **/ @Override - public List> selectGroupTopicCount(String customerId, String monthId) { + public List selectGroupTopicCount(String customerId, String monthId) { return baseDao.selectGroupTopicCount(customerId,monthId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginTopicMainDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginTopicMainDailyServiceImpl.java index e281b9518a..7519d9496d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginTopicMainDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginTopicMainDailyServiceImpl.java @@ -31,6 +31,7 @@ import com.epmet.dao.evaluationindex.extract.FactOriginTopicMainDailyDao; import com.epmet.dto.extract.form.ExtractOriginFormDTO; import com.epmet.dto.extract.result.CreateTopicCountResultDTO; import com.epmet.dto.extract.result.OrgStatisticsResultDTO; +import com.epmet.dto.indexcollect.result.CpcIndexCommonDTO; import com.epmet.dto.org.GridInfoDTO; import com.epmet.dto.topic.TopicOriginInfoDTO; import com.epmet.entity.evaluationindex.extract.FactOriginTopicLogDailyEntity; @@ -258,7 +259,7 @@ public class FactOriginTopicMainDailyServiceImpl extends BaseServiceImpl> selectPartyCreateTopicCount(String customerId, String monthId) { + public List selectPartyCreateTopicCount(String customerId, String monthId) { //这个月内新增的话题,按人分组,不限制发话题人的身份,也就是说以用户最新的身份为准 return baseDao.selectPartyCreateTopicCount(customerId,monthId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/IssueExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/IssueExtractServiceImpl.java index acee7bda4a..2d02bc6a7f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/IssueExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/IssueExtractServiceImpl.java @@ -16,6 +16,7 @@ import com.epmet.dto.extract.form.GridIssueCountResultDTO; import com.epmet.dto.extract.form.IssueLogDailyFormDTO; import com.epmet.dto.extract.form.IssueMainDailyFormDTO; import com.epmet.dto.extract.result.*; +import com.epmet.dto.indexcollect.result.CpcIndexCommonDTO; import com.epmet.service.Issue.IssueService; import com.epmet.service.evaluationindex.extract.todata.IssueExtractService; import com.epmet.service.topic.TopicService; @@ -293,14 +294,13 @@ public class IssueExtractServiceImpl implements IssueExtractService { /** * @param customerId * @param monthId - * @return java.util.List> * @author yinzuomei * @description 党员提出的话题转议题数 * @Date 2020/9/18 13:57 **/ @DataSource(DataSourceConstant.STATS) @Override - public List> selectShiftIssueCount(String customerId, String monthId) { + public List selectShiftIssueCount(String customerId, String monthId) { //查询fact_origin_issue_main_daily 表,转议题的时间在评价周期内的,按发布话题的人分组 /*含义:评价周期内,党员提出的话题转为议题的数目。 数据来源:议题表。 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java index e22c8e8b75..bf892c6a84 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java @@ -87,12 +87,11 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { List closeProjects = pendingList.stream().flatMap(pending -> closedList.stream().filter(closed -> pending.getId().equals(closed.getProjectId())).map(process -> { FactOriginProjectMainDailyEntity entity = new FactOriginProjectMainDailyEntity(); - entity.setId(process.getId()); + entity.setId(process.getProjectId()); entity.setProjectStatus("close"); entity.setCreatedTime(DateUtils.stringToDate(pending.getDateId(), DateUtils.DATE_PATTERN_YYYYMMDD)); entity.setUpdatedTime(process.getUpdatedTime()); entity.setIsResolved(process.getIsResolved()); - entity.setClosedStatus(entity.getIsResolved()); return entity; })).collect(Collectors.toList()); @@ -140,7 +139,6 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { entity.setIssueId(project.getOriginId()); entity.setProjectStatus(project.getStatus()); entity.setIsResolved(project.getClosedStatus()); - entity.setClosedStatus(entity.getIsResolved()); entity.setCreatedTime(project.getCreatedTime()); entity.setUpdatedTime(project.getUpdatedTime()); entity.setPids(project.getOrgIdPath()); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PioneerDataExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PioneerDataExtractServiceImpl.java index e71227623c..2cb4feff51 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PioneerDataExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PioneerDataExtractServiceImpl.java @@ -5,6 +5,7 @@ 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.entity.evaluationindex.screen.ScreenPioneerDataEntity; import com.epmet.service.evaluationindex.extract.todata.FactOriginIssueLogDailyService; import com.epmet.service.evaluationindex.extract.todata.FactOriginIssueMainDailyService; @@ -284,7 +285,7 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService //组织下:已解决项目 or 已结案项目总数 private int getAgencyClosedProjectTotal(String customerId, String agencyPath, String closedStatus) { - return factOriginProjectMainDailyService.getAgencyClosedProjectTotal(customerId,agencyPath,closedStatus); + return factOriginProjectMainDailyService.getAgencyClosedProjectTotal(customerId,agencyPath,closedStatus, ProjectConstant.CLOSED); } //组织下:议题转项目数 @@ -317,7 +318,7 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService * @description 网格或者社区下: 已解决项目 **/ private Integer getGridOrCommunityClosedProjectTotal(String customerId, String gridId, String communityId, String closedStatus) { - return factOriginProjectMainDailyService.getGridOrCommunityClosedProjectTotal(customerId, gridId, communityId, closedStatus); + return factOriginProjectMainDailyService.getGridOrCommunityClosedProjectTotal(customerId, gridId, communityId, closedStatus,ProjectConstant.CLOSED); } /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java index 7f85fe8339..bdbb60d9d7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java @@ -122,8 +122,7 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService { log.debug("user:{}", JSON.toJSONString(user)); if (!user.getRegTotal().equals(0)) { BigDecimal avgIssueCount = new BigDecimal(issue.getIssueIncr()).divide(new BigDecimal(user.getRegTotal()) - .divide(new BigDecimal(NumConstant.ONE_HUNDRED)), 4, BigDecimal.ROUND_HALF_UP) - .multiply(new BigDecimal(NumConstant.ONE_HUNDRED)); + .divide(new BigDecimal(NumConstant.ONE_HUNDRED)), 4, BigDecimal.ROUND_HALF_UP); entity.setAvgIssue(avgIssueCount); } }); @@ -146,6 +145,7 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService { //遍历实际参与人数 Map> voteMap = voteCountList.stream().collect(Collectors.groupingBy(IssueVoteUserCountResultDTO::getOrgId)); + log.debug("平均参与度:实际参与人数:{}", JSON.toJSONString(voteMap)); for (Map.Entry> entry : voteMap.entrySet()) { String gridId = entry.getKey(); ScreenUserJoinEntity entity = insertMap.get(gridId); @@ -154,6 +154,7 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService { BigDecimal votedByIssueCount = new BigDecimal(issueList.get(0).getIssueCount()); for (IssueVoteUserCountResultDTO vote : issueList) { Integer memberCount = gridMemberCount.get(gridId); + log.debug("平均参与度:网格Id:{},实际投票人数:{},参与投票人数:{}", gridId, vote.getVoteCount(), memberCount); if (memberCount == null) { memberCount = 0; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java index 88e6b14578..34b95afaf4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java @@ -278,7 +278,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni if (IndexCodeEnum.SHE_QU_XIA_SHU_SYWGZLNLHZPJZ.getCode().equals(detail.getIndexCode())) { List subGridGovernAvg = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (CollectionUtils.isEmpty(subGridGovernAvg)){ - log.error("社区下级治理能力平均分集合为空"); + log.warn("社区下级治理能力平均分集合为空"); }else{ MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); List> governAvg = ListUtils.partition(subGridGovernAvg, IndexCalConstant.PAGE_SIZE); @@ -351,7 +351,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni if (IndexCodeEnum.SHE_QU_XIA_JI_SYWGFWNLDFPJZ.getCode().equals(indexCode)) { List subGridServiceAvg = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); if (CollectionUtils.isEmpty(subGridServiceAvg)) { - log.error("查询社区下级所有网格服务能力得分平均值集合为空"); + log.warn("查询社区下级所有网格服务能力得分平均值集合为空"); } else { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); List> serviceAvgList = ListUtils.partition(subGridServiceAvg, IndexCalConstant.PAGE_SIZE); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java index 9334fa2351..cc640e1853 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java @@ -309,7 +309,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict } } if (CollectionUtils.isEmpty(deptScoreAvgList)) { - log.error("查询所有直属部门治理能力平均值集合为空"); + log.warn("查询所有直属部门治理能力平均值集合为空"); } else{ MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(deptScoreAvgList.stream().map(o -> o.getScore()).collect(Collectors.toList())); List> governAvg = ListUtils.partition(deptScoreAvgList, IndexCalConstant.PAGE_SIZE); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java index 4809870eef..d7637f8e5a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java @@ -279,7 +279,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ if (IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQZLNLHZ.getCode().equals(detail.getIndexCode())) { List subGridGovernAvg = communityScoreDao.selectSubCommAvgScore(customerId, monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (CollectionUtils.isEmpty(subGridGovernAvg)){ - log.error("查询街道下属所有社区治理能力汇总为空"); + log.warn("查询街道下属所有社区治理能力汇总为空"); }else if (subGridGovernAvg.size() > NumConstant.ZERO) { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); List> governAvg = ListUtils.partition(subGridGovernAvg, IndexCalConstant.PAGE_SIZE); @@ -352,7 +352,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ if (IndexCodeEnum.JIE_DAO_XIA_SHU_SQFWNLDFPYZ.getCode().equals(indexCode)) { List subCommServiceAvg = communityScoreDao.selectSubCommAvgScore(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); if (CollectionUtils.isEmpty(subCommServiceAvg)) { - log.error("查询街道下属社区服务能力得分平均值为空"); + log.warn("查询街道下属社区服务能力得分平均值为空"); } else if (subCommServiceAvg.size() > NumConstant.ZERO) { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subCommServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); List> serviceAvgList = ListUtils.partition(subCommServiceAvg, IndexCalConstant.PAGE_SIZE); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueMainDailyDao.xml index b1085f5058..42949df17b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueMainDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueMainDailyDao.xml @@ -111,10 +111,10 @@ - SELECT - t1.CREATE_TOPIC_USER_ID AS USER_ID, - COUNT( 1 ) AS SHIFT_ISSUE_COUNT + t1.CREATE_TOPIC_USER_ID AS userId, + COUNT( 1 ) AS indexValue FROM fact_origin_issue_main_daily t1 WHERE diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml index f8c2d6db81..6e3e0c5628 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml @@ -113,10 +113,10 @@ - SELECT - t1.TOPIC_CREATOR_ID AS USER_ID, - COUNT( 1 ) AS SHIFT_PROJECT_COUNT + t1.TOPIC_CREATOR_ID AS userId, + COUNT( 1 ) AS indexValue FROM fact_origin_project_main_daily t1 WHERE @@ -160,7 +160,10 @@ and t1.AGENCY_ID=#{communityId} - and t1.CLOSED_STATUS=#{closedStatus} + and t1.IS_RESOLVED=#{closedStatus} + + + and t1.PROJECT_STATUS=#{projectStatus} @@ -175,7 +178,10 @@ AND T1.CUSTOMER_ID = #{customerId} and t1.PIDS LIKE CONCAT(#{agencyPath},'%') - and t1.CLOSED_STATUS=#{closedStatus} + and t1.IS_RESOLVED=#{closedStatus} + + + and t1.PROJECT_STATUS=#{projectStatus} + - + select T2.USER_ID as userId, + COUNT(1) AS indexValue from fact_origin_topic_main_daily t1 INNER JOIN ( select main.GROUP_OWNER_ID AS USER_ID,main.ID AS GROUP_ID diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml index c05217083f..a4f2d9bbaa 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml @@ -68,10 +68,10 @@ - SELECT - T1.CREATE_TOPIC_USER_ID AS USER_ID, - COUNT( 1 ) AS CREATE_TOPIC_COUNT + T1.CREATE_TOPIC_USER_ID AS userId, + COUNT( 1 ) AS indexValue FROM fact_origin_topic_main_daily t1 WHERE diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml index a1e7942543..3e0b92ed5b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml @@ -77,7 +77,7 @@