Browse Source

代码暂存

dev_shibei_match
jianjun 5 years ago
parent
commit
837b946892
  1. 30
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridGroupUserCountResultDTO.java
  2. 68
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/IssueVoteStatisticalResultDTO.java
  3. 26
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/IssueVoteUserCountResultDTO.java
  4. 69
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java
  5. 42
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueLogDailyDao.java
  6. 229
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/StatsIssueDao.java
  7. 37
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/IssueService.java
  8. 30
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/IssueServiceImpl.java
  9. 17
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginGroupMainDailyService.java
  10. 24
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginIssueLogDailyService.java
  11. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMainDailyServiceImpl.java
  12. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginIssueLogDailyServiceImpl.java
  13. 49
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java
  14. 15
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml
  15. 16
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueLogDailyDao.xml

30
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridGroupUserCountResultDTO.java

@ -0,0 +1,30 @@
package com.epmet.dto.extract.result;
import lombok.Data;
import java.io.Serializable;
/**
* desc: 网格级别小组内的组成员数
*
* @author LiuJanJun
* @date 2020/9/27 2:27 下午
*/
@Data
public class GridGroupUserCountResultDTO implements Serializable {
private static final long serialVersionUID = -4729061928990808187L;
/**
* 客户ID
*/
private String customerId;
private String gridId;
private Integer memberCount;
/**
* 网格的pids
*/
private String pids;
}

68
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/IssueVoteStatisticalResultDTO.java

@ -0,0 +1,68 @@
package com.epmet.dto.extract.result;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* desc: 议题投票统计结果DTO
*
* @author LiuJanJun
* @date 2020/9/27 11:22 上午
*/
@Data
public class IssueVoteStatisticalResultDTO implements Serializable {
private static final long serialVersionUID = 2631108929053690349L;
/**
* 主键ID
*/
private String id;
/**
* 议题ID
*/
private String issueId;
/**
* 统计日期 yyyy-MM-dd
*/
private Date statisticalDate;
/**
* 到该日的总赞成数
*/
private Integer supportCount;
/**
* 到该日的总反对数
*/
private Integer oppositionCount;
/**
* 到该日的总票数
*/
private Integer totalCount;
/**
* 该日增量
*/
private Integer todayIncrement;
/**
* 该日赞成增量
*/
private Integer supportIncrement;
/**
* 该日反对增量
*/
private Integer oppositionIncrement;
/**
* 到该日的应表决数
*/
private Integer votableCount;
}

26
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/IssueVoteUserCountResultDTO.java

@ -0,0 +1,26 @@
package com.epmet.dto.extract.result;
import lombok.Data;
import java.io.Serializable;
/**
* desc: 议题投票人数
*
* @author LiuJanJun
* @date 2020/9/27 2:27 下午
*/
@Data
public class IssueVoteUserCountResultDTO implements Serializable {
private static final long serialVersionUID = -4729061928990808187L;
private String gridId;
private String issueId;
private Integer voteCount;
private Integer issueCount;
/**
* 网格的pids
*/
private String pids;
}

69
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java

@ -18,16 +18,16 @@
package com.epmet.dao.evaluationindex.extract;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO;
import com.epmet.dto.extract.result.PartyCreateGroupCountResultDTO;
import com.epmet.dto.extract.FactOriginGroupMainDailyDTO;
import com.epmet.dto.extract.form.GridHeartedFormDTO;
import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO;
import com.epmet.dto.extract.result.GridGroupUserCountResultDTO;
import com.epmet.dto.extract.result.PartyCreateGroupCountResultDTO;
import com.epmet.dto.group.result.ExtractGroupMemberActionRecordResultDTO;
import com.epmet.entity.evaluationindex.extract.FactOriginGroupMainDailyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
@ -40,86 +40,87 @@ import java.util.List;
public interface FactOriginGroupMainDailyDao extends BaseDao<FactOriginGroupMainDailyEntity> {
/**
* @Description 查询建群党员数
* @param customerId
* @param monthId
* @Description 查询建群党员数
* @author zxc
* @date 2020/9/19 3:49 下午
*/
List<PartyCreateGroupCountResultDTO> selectPartyCreateGroupCount(@Param("customerId") String customerId,@Param("monthId") String monthId);
List<PartyCreateGroupCountResultDTO> selectPartyCreateGroupCount(@Param("customerId") String customerId, @Param("monthId") String monthId);
/**
* @Description 查询是否存在该客户下的数据
* @param customerId
* @return
* @Description 查询是否存在该客户下的数据
* @author wangc
* @date 2020.09.18 23:30
**/
int selectIfExist(@Param("customerId")String customerId);
**/
int selectIfExist(@Param("customerId") String customerId);
/**
* @Description 按照客户Id清除组数据
* @param customerId
* @return
* @Description 按照客户Id清除组数据
* @author wangc
* @date 2020.09.20 09:58
**/
void deleteBatchByCustomerId(@Param("customerId")String customerId);
**/
void deleteBatchByCustomerId(@Param("customerId") String customerId);
/**
* @Description 按照客户Id清除组员数据
* @param customerId
* @return
* @Description 按照客户Id清除组员数据
* @author wangc
* @date 2020.09.20 09:58
**/
void deleteBatchMemberByCustomerId(@Param("customerId")String customerId,@Param("dimId") String dimId,@Param("dateType") String dateType);
void deleteBatchMemberByCustomerId(@Param("customerId") String customerId, @Param("dimId") String dimId, @Param("dateType") String dateType);
/**
* @Description 按照组Id清除组和组员数据
* @param customerId
* @return
* @Description 按照组Id清除组和组员数据
* @author wangc
* @date 2020.09.20 12:16
**/
void deleteBatchByGroupId(@Param("customerId")String customerId,@Param("list") List<String> list);
**/
void deleteBatchByGroupId(@Param("customerId") String customerId, @Param("list") List<String> list);
/**
* @Description 更新群主的党员信息
* @param list
* @return
* @Description 更新群主的党员信息
* @author wangc
* @date 2020.09.20 12:44
**/
int updatePartyFlag(@Param("list") List<String> list,@Param("customerId")String customerId);
**/
int updatePartyFlag(@Param("list") List<String> list, @Param("customerId") String customerId);
/**
* @Description 更新群主的热心居民信息
* @param list
* @return
* @Description 更新群主的热心居民信息
* @author wangc
* @date 2020.09.20 12:44
**/
int updateHeartedFlag(@Param("list") List<GridHeartedFormDTO> list,@Param("customerId")String customerId);
**/
int updateHeartedFlag(@Param("list") List<GridHeartedFormDTO> list, @Param("customerId") String customerId);
/**
* @Description 批量插入组主表
* @param list
* @return
* @Description 批量插入组主表
* @author wangc
* @date 2020.09.20 15:37
**/
**/
int insertBatchMain(@Param("list") List<FactOriginGroupMainDailyDTO> list);
/**
* @Description 批量插入组员表
* @param list
* @return
* @Description 批量插入组员表
* @author wangc
* @date 2020.09.20 15:37
**/
**/
int insertBatchMembers(List<ExtractGroupMemberActionRecordResultDTO> list);
/**
* @param customerId
* @param groupOwnerId
@ -131,8 +132,8 @@ public interface FactOriginGroupMainDailyDao extends BaseDao<FactOriginGroupMain
List<String> selectGroupIds(@Param("customerId") String customerId, @Param("groupOwnerId") String groupOwnerId);
/**
* @return java.util.List<java.lang.String>
* @param groupIdList
* @return java.util.List<java.lang.String>
* @author yinzuomei
* @description 查询组成员数去重
* @Date 2020/9/20 21:29
@ -140,11 +141,21 @@ public interface FactOriginGroupMainDailyDao extends BaseDao<FactOriginGroupMain
List<String> selectGroupMemberList(@Param("list") List<String> groupIdList);
/**
* @Description 查询党员建组信息
* @param customerId
* @param monthId
* @Description 查询党员建组信息
* @author zxc
* @date 2020/9/25 9:46 上午
*/
List<ScreenPartyLinkMassesDataFormDTO> selectPartyCreateGroupInfo(@Param("customerId") String customerId, @Param("monthId") String monthId,@Param("gridIds") List<String> gridIds);
List<ScreenPartyLinkMassesDataFormDTO> selectPartyCreateGroupInfo(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("gridIds") List<String> gridIds);
/**
* desc: 获取所有网格的组中成员人数 去重
*
* @param customerId
* @return java.util.List<com.epmet.dto.extract.result.GridGroupUserCountResultDTO>
* @author LiuJanJun
* @date 2020/9/27 2:31 下午
*/
List<GridGroupUserCountResultDTO> selectDistinctGroupMemberCount(@Param("customerId") String customerId);
}

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

@ -19,6 +19,7 @@ package com.epmet.dao.evaluationindex.extract;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.extract.form.IssueLogDailyFormDTO;
import com.epmet.dto.extract.result.IssueVoteUserCountResultDTO;
import com.epmet.dto.extract.result.PartyActiveResultDTO;
import com.epmet.entity.evaluationindex.extract.FactOriginIssueLogDailyEntity;
import org.apache.ibatis.annotations.Mapper;
@ -27,7 +28,7 @@ import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 议题记录附表
* 议题记录附表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-09-14
@ -36,50 +37,50 @@ import java.util.List;
public interface FactOriginIssueLogDailyDao extends BaseDao<FactOriginIssueLogDailyEntity> {
/**
* @Description 议题记录附表插入
* @param issueLogList
* @Description 议题记录附表插入
* @author zxc
* @date 2020/9/14 5:53 下午
*/
void insertIssueLogList(@Param("issueLogList")List<IssueLogDailyFormDTO> issueLogList);
void insertIssueLogList(@Param("issueLogList") List<IssueLogDailyFormDTO> issueLogList);
/**
* @Description 删除旧的记录
* @param customerId
* @param dateId
* @Description 删除旧的记录
* @author zxc
* @date 2020/9/16 9:33 上午
*/
void deleteOldLogRecord(@Param("customerId")String customerId,@Param("dateId")String dateId);
void deleteOldLogRecord(@Param("customerId") String customerId, @Param("dateId") String dateId);
/**
* @return java.lang.Integer
* @param userId 用户id
* @param userId 用户id
* @param customerId
* @param monthId
* @return java.lang.Integer
* @author yinzuomei
* @description 查询用户在这个月内表决的总次数
* @Date 2020/9/20 21:52
**/
Integer selectCountUserVote(@Param("userId") String userId, @Param("customerId") String customerId, @Param("monthId")String monthId);
Integer selectCountUserVote(@Param("userId") String userId, @Param("customerId") String customerId, @Param("monthId") String monthId);
/**
* @Description 查询 议题表决党员/群众
* @param customerId
* @param monthId
* @param isParty
* @Description 查询 议题表决党员/群众
* @author zxc
* @date 2020/9/21 9:37 上午
*/
List<PartyActiveResultDTO> selectPartyActiveIssueVote(@Param("customerId")String customerId,@Param("monthId") String monthId,@Param("isParty") Integer isParty);
List<PartyActiveResultDTO> selectPartyActiveIssueVote(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("isParty") Integer isParty);
/**
* @return int
* @param customerId
* @param gridId
* @param communityId
* @param agencyPath
* @param isParty
* @return int
* @author yinzuomei
* @description 党员参与议事支持或者反对的次数
* @Date 2020/9/26 18:05
@ -91,14 +92,25 @@ public interface FactOriginIssueLogDailyDao extends BaseDao<FactOriginIssueLogDa
@Param("isParty")String isParty);
/**
* @return int
* @param gridId 网格id
* @param pids 网格的pids
* @param pids 网格的pids
* @return int
* @author yinzuomei
* @description 参与人数: 议题的表决行为的用户数去重的累计值
* @Date 2020/9/27 14:19
* @Date 2020/9/27 14:19
**/
int selectCountJoinUserTotal(@Param("customerId") String customerId,
@Param("gridId") String gridId,
@Param("pids")String pids);
@Param("pids") String pids);
/**
* desc: 获取每个议题的表决人数
*
* @param customerId
* @param monthId
* @return java.util.List<com.epmet.dto.extract.IssueVoteUserCountResultDTO>
* @author LiuJanJun
* @date 2020/9/27 1:58 下午
*/
List<IssueVoteUserCountResultDTO> getVoteCount(@Param("customerId") String customerId, @Param("monthId") String monthId);
}

229
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/StatsIssueDao.java

@ -1,13 +1,14 @@
package com.epmet.dao.issue;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.extract.result.SatisfactionInfoResultDTO;
import com.epmet.dto.extract.result.IssueInfoResultDTO;
import com.epmet.dto.extract.result.IssueProcessInfoResultDTO;
import com.epmet.dto.extract.result.IssueVoteStatisticalResultDTO;
import com.epmet.dto.extract.result.SatisfactionInfoResultDTO;
import com.epmet.dto.issue.IssueAgencyDTO;
import com.epmet.dto.issue.IssueDTO;
import com.epmet.dto.issue.IssueGridDTO;
import com.epmet.dto.issue.IssueProjectDTO;
import com.epmet.dto.extract.result.IssueInfoResultDTO;
import com.epmet.entity.issue.IssueEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -29,33 +30,36 @@ public interface StatsIssueDao extends BaseDao<IssueEntity> {
*/
List<IssueAgencyDTO> selectAgencyIssueTotal(@Param("customerId") String customerId, @Param("date") String date);
/**
* 获取当前日期组织下议题增量
* @author zhaoqifeng
* @date 2020/6/18 9:55
* @param customerId
* @param date
* @return java.util.List<com.epmet.dto.issue.IssueAgencyDTO>
*/
/**
* 获取当前日期组织下议题增量
*
* @param customerId
* @param date
* @return java.util.List<com.epmet.dto.issue.IssueAgencyDTO>
* @author zhaoqifeng
* @date 2020/6/18 9:55
*/
List<IssueAgencyDTO> selectAgencyIssueInc(@Param("customerId") String customerId, @Param("date") String date);
/**
* 已关闭议题统计
* @author zhaoqifeng
* @date 2020/6/18 14:41
* @param customerId
* @param date
* @return java.util.List<com.epmet.dto.issue.IssueAgencyDTO>
/**
* 已关闭议题统计
*
* @param customerId
* @param date
* @return java.util.List<com.epmet.dto.issue.IssueAgencyDTO>
* @author zhaoqifeng
* @date 2020/6/18 14:41
*/
List<IssueAgencyDTO> selectAgencyClosedIssueTotal(@Param("customerId") String customerId, @Param("date") String date);
/**
* 已关闭议题增量
* @author zhaoqifeng
* @date 2020/6/18 14:41
* @param customerId
* @param date
* @return java.util.List<com.epmet.dto.issue.IssueAgencyDTO>
/**
* 已关闭议题增量
*
* @param customerId
* @param date
* @return java.util.List<com.epmet.dto.issue.IssueAgencyDTO>
* @author zhaoqifeng
* @date 2020/6/18 14:41
*/
List<IssueAgencyDTO> selectAgencyClosedIssueInc(@Param("customerId") String customerId, @Param("date") String date);
@ -66,6 +70,7 @@ public interface StatsIssueDao extends BaseDao<IssueEntity> {
* @Description 根据客户Id查询议题库已转项目的网格项目关系数据
**/
List<IssueEntity> selectGridProjectList(IssueEntity issueEntity);
/**
* 获取当前日期网格下议题统计结果
*
@ -77,87 +82,103 @@ public interface StatsIssueDao extends BaseDao<IssueEntity> {
*/
List<IssueGridDTO> selectGridIssueTotal(@Param("customerId") String customerId, @Param("date") String date);
/**
* 获取当前日期网格下议题增量
* @author zhaoqifeng
* @date 2020/6/18 9:55
* @param customerId
* @param date
* @return java.util.List<com.epmet.dto.issue.IssueGridDTO>
*/
List<IssueGridDTO> selectGridIssueInc(@Param("customerId") String customerId, @Param("date") String date);
/**
* 网格已关闭议题统计
* @author zhaoqifeng
* @date 2020/6/18 14:41
* @param customerId
* @param date
* @return java.util.List<com.epmet.dto.issue.IssueGridDTO>
*/
List<IssueGridDTO> selectGridClosedIssueTotal(@Param("customerId") String customerId, @Param("date") String date);
/**
* 网格已关闭议题增量
* @author zhaoqifeng
* @date 2020/6/18 14:41
* @param customerId
* @param date
* @return java.util.List<com.epmet.dto.issue.IssueGridDTO>
*/
List<IssueGridDTO> selectGridClosedIssueInc(@Param("customerId") String customerId, @Param("date") String date);
/**
* 查询客户下议题和项目关系
* @author zhaoqifeng
* @date 2020/6/19 17:34
* @param customerId
* @return java.util.List<com.epmet.dto.issue.IssueProjectDTO>
/**
* 获取当前日期网格下议题增量
*
* @param customerId
* @param date
* @return java.util.List<com.epmet.dto.issue.IssueGridDTO>
* @author zhaoqifeng
* @date 2020/6/18 9:55
*/
List<IssueGridDTO> selectGridIssueInc(@Param("customerId") String customerId, @Param("date") String date);
/**
* 网格已关闭议题统计
*
* @param customerId
* @param date
* @return java.util.List<com.epmet.dto.issue.IssueGridDTO>
* @author zhaoqifeng
* @date 2020/6/18 14:41
*/
List<IssueGridDTO> selectGridClosedIssueTotal(@Param("customerId") String customerId, @Param("date") String date);
/**
* 网格已关闭议题增量
*
* @param customerId
* @param date
* @return java.util.List<com.epmet.dto.issue.IssueGridDTO>
* @author zhaoqifeng
* @date 2020/6/18 14:41
*/
List<IssueGridDTO> selectGridClosedIssueInc(@Param("customerId") String customerId, @Param("date") String date);
/**
* 查询客户下议题和项目关系
*
* @param customerId
* @return java.util.List<com.epmet.dto.issue.IssueProjectDTO>
* @author zhaoqifeng
* @date 2020/6/19 17:34
*/
List<IssueProjectDTO> selectIssueProjectList(@Param("customerId") String customerId);
/**
* 根据ID获取议题信息
* @author zhaoqifeng
* @date 2020/9/15 16:56
* @param ids
* @return java.util.List<com.epmet.dto.issue.IssueDTO>
*/
List<IssueDTO> selectIssueInfoByIds(@Param("ids") List<String> ids);
/**
* @Description 查询议题信息
* @param customerId
* @param dateId
* @author zxc
* @date 2020/9/15 2:28 下午
*/
List<IssueInfoResultDTO> selectIssueInfo(@Param("customerId")String customerId, @Param("dateId")String dateId);
/**
* @Description 查询议题process信息
* @param customerId
* @param dateId
* @author zxc
* @date 2020/9/16 1:48 下午
*/
List<IssueProcessInfoResultDTO> selectIssueProcessInfo(@Param("customerId")String customerId, @Param("dateId")String dateId);
/**
* @Description 查询议题满意度评价信息
* @param customerId
* @param dateId
* @author zxc
* @date 2020/9/16 1:48 下午
*/
List<SatisfactionInfoResultDTO> selectIssueSatisfactionInfo(@Param("customerId")String customerId, @Param("dateId")String dateId);
/**
* @Description 查询议题支持反对信息
* @param customerId
* @param dateId
* @author zxc
* @date 2020/9/16 1:48 下午
*/
List<SatisfactionInfoResultDTO> selectIssueVoteInfo(@Param("customerId")String customerId, @Param("dateId")String dateId);
/**
* 根据ID获取议题信息
*
* @param ids
* @return java.util.List<com.epmet.dto.issue.IssueDTO>
* @author zhaoqifeng
* @date 2020/9/15 16:56
*/
List<IssueDTO> selectIssueInfoByIds(@Param("ids") List<String> ids);
/**
* @param customerId
* @param dateId
* @Description 查询议题信息
* @author zxc
* @date 2020/9/15 2:28 下午
*/
List<IssueInfoResultDTO> selectIssueInfo(@Param("customerId") String customerId, @Param("dateId") String dateId);
/**
* @param customerId
* @param dateId
* @Description 查询议题process信息
* @author zxc
* @date 2020/9/16 1:48 下午
*/
List<IssueProcessInfoResultDTO> selectIssueProcessInfo(@Param("customerId") String customerId, @Param("dateId") String dateId);
/**
* @param customerId
* @param dateId
* @Description 查询议题满意度评价信息
* @author zxc
* @date 2020/9/16 1:48 下午
*/
List<SatisfactionInfoResultDTO> selectIssueSatisfactionInfo(@Param("customerId") String customerId, @Param("dateId") String dateId);
/**
* @param customerId
* @param dateId
* @Description 查询议题支持反对信息
* @author zxc
* @date 2020/9/16 1:48 下午
*/
List<SatisfactionInfoResultDTO> selectIssueVoteInfo(@Param("customerId") String customerId, @Param("dateId") String dateId);
/**
* desc: 根据客户id 获取当前议题的情况
*
* @param customerId
* @param dateId
* @return java.util.List<com.epmet.dto.extract.result.IssueVoteStatisticalResultDTO>
* @author LiuJanJun
* @date 2020/9/27 1:22 下午
*/
List<IssueVoteStatisticalResultDTO> selectIssueVoteStatis(@Param("customerId") String customerId, @Param("dateId") String dateId);
}

37
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/IssueService.java

@ -1,12 +1,13 @@
package com.epmet.service.Issue;
import com.epmet.dto.extract.result.SatisfactionInfoResultDTO;
import com.epmet.dto.extract.result.IssueInfoResultDTO;
import com.epmet.dto.extract.result.IssueProcessInfoResultDTO;
import com.epmet.dto.extract.result.IssueVoteStatisticalResultDTO;
import com.epmet.dto.extract.result.SatisfactionInfoResultDTO;
import com.epmet.dto.issue.IssueAgencyDTO;
import com.epmet.dto.issue.IssueDTO;
import com.epmet.dto.issue.IssueGridDTO;
import com.epmet.dto.issue.IssueProjectDTO;
import com.epmet.dto.extract.result.IssueInfoResultDTO;
import com.epmet.entity.issue.IssueEntity;
import java.util.List;
@ -149,14 +150,26 @@ public interface IssueService {
* @author zxc
* @date 2020/9/16 1:48 下午
*/
List<SatisfactionInfoResultDTO> selectIssueSatisfactionInfo(String customerId,String dateId);
/**
* @Description 查询议题支持反对信息
* @param customerId
* @param dateId
* @author zxc
* @date 2020/9/16 1:48 下午
*/
List<SatisfactionInfoResultDTO> selectIssueVoteInfo(String customerId,String dateId);
List<SatisfactionInfoResultDTO> selectIssueSatisfactionInfo(String customerId, String dateId);
/**
* @param customerId
* @param dateId
* @Description 查询议题支持反对信息
* @author zxc
* @date 2020/9/16 1:48 下午
*/
List<SatisfactionInfoResultDTO> selectIssueVoteInfo(String customerId, String dateId);
/**
* desc: 查询议题支持反对及应表决人数
* 数据由两部分组成 1本月内已经关闭的话题的支持和反对数据 来自issueissue_vote_statistical
*
* @param customerId
* @param monthId
* @return java.util.List<com.epmet.dto.extract.result.IssueVoteStatisticalResultDTO>
* @author LiuJanJun
* @date 2020/9/27 11:20 上午
*/
List<IssueVoteStatisticalResultDTO> selectIssueVoteStatis(String customerId, String monthId);
}

30
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/IssueServiceImpl.java

@ -3,13 +3,14 @@ package com.epmet.service.Issue.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.issue.StatsIssueDao;
import com.epmet.dto.extract.result.SatisfactionInfoResultDTO;
import com.epmet.dto.extract.result.IssueInfoResultDTO;
import com.epmet.dto.extract.result.IssueProcessInfoResultDTO;
import com.epmet.dto.extract.result.IssueVoteStatisticalResultDTO;
import com.epmet.dto.extract.result.SatisfactionInfoResultDTO;
import com.epmet.dto.issue.IssueAgencyDTO;
import com.epmet.dto.issue.IssueDTO;
import com.epmet.dto.issue.IssueGridDTO;
import com.epmet.dto.issue.IssueProjectDTO;
import com.epmet.dto.extract.result.IssueInfoResultDTO;
import com.epmet.entity.issue.IssueEntity;
import com.epmet.service.Issue.IssueService;
import org.springframework.beans.factory.annotation.Autowired;
@ -127,14 +128,19 @@ public class IssueServiceImpl implements IssueService {
}
/**
* @Description 查询议题支持反对信息
* @param customerId
* @param dateId
* @author zxc
* @date 2020/9/16 1:48 下午
*/
@Override
public List<SatisfactionInfoResultDTO> selectIssueVoteInfo(String customerId, String dateId) {
return statsIssueDao.selectIssueVoteInfo(customerId, dateId);
}
* @Description 查询议题支持反对信息
* @param customerId
* @param dateId
* @author zxc
* @date 2020/9/16 1:48 下午
*/
@Override
public List<SatisfactionInfoResultDTO> selectIssueVoteInfo(String customerId, String dateId) {
return statsIssueDao.selectIssueVoteInfo(customerId, dateId);
}
@Override
public List<IssueVoteStatisticalResultDTO> selectIssueVoteStatis(String customerId, String dateId) {
return statsIssueDao.selectIssueVoteStatis(customerId, dateId);
}
}

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

@ -20,6 +20,7 @@ package com.epmet.service.evaluationindex.extract.todata;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.dto.extract.FactOriginGroupMainDailyDTO;
import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO;
import com.epmet.dto.extract.result.GridGroupUserCountResultDTO;
import com.epmet.dto.group.result.ExtractGroupMemberActionRecordResultDTO;
import com.epmet.entity.evaluationindex.extract.FactOriginGroupMainDailyEntity;
@ -62,14 +63,24 @@ public interface FactOriginGroupMainDailyService extends BaseService<FactOriginG
* @author wangc
* @date 2020.09.23 16:30
**/
boolean insertExtractedData(boolean isFirst,String customerId,String dateId,List<FactOriginGroupMainDailyDTO> originGroupData,List<ExtractGroupMemberActionRecordResultDTO> memberList);
boolean insertExtractedData(boolean isFirst, String customerId, String dateId, List<FactOriginGroupMainDailyDTO> originGroupData, List<ExtractGroupMemberActionRecordResultDTO> memberList);
/**
* @Description 查询党员建组信息
* @param customerId
* @param monthId
* @Description 查询党员建组信息
* @author zxc
* @date 2020/9/25 9:46 上午
*/
List<ScreenPartyLinkMassesDataFormDTO> selectPartyCreateGroupInfo(String customerId,String monthId,List<String> gridIds);
List<ScreenPartyLinkMassesDataFormDTO> selectPartyCreateGroupInfo(String customerId, String monthId, List<String> gridIds);
/**
* desc: 获取客户下每个网格小组内的 去重人数
*
* @param customerId
* @return java.util.List<com.epmet.entity.evaluationindex.extract.GridGroupUserCountResultDTO>
* @author LiuJanJun
* @date 2020/9/27 2:24 下午
*/
List<GridGroupUserCountResultDTO> selectDistinctGroupMemberCount(String customerId);
}

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

@ -18,10 +18,13 @@
package com.epmet.service.evaluationindex.extract.todata;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.dto.extract.result.IssueVoteUserCountResultDTO;
import com.epmet.entity.evaluationindex.extract.FactOriginIssueLogDailyEntity;
import java.util.List;
/**
* 议题记录附表
* 议题记录附表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-09-23
@ -29,12 +32,12 @@ import com.epmet.entity.evaluationindex.extract.FactOriginIssueLogDailyEntity;
public interface FactOriginIssueLogDailyService extends BaseService<FactOriginIssueLogDailyEntity> {
/**
* @return int
* @param customerId
* @param gridId
* @param communityId
* @param agencyPath
* @param isParty
* @return int
* @author yinzuomei
* @description 党员参与议事支持或者反对的次数
* @Date 2020/9/26 17:57
@ -42,12 +45,23 @@ public interface FactOriginIssueLogDailyService extends BaseService<FactOriginIs
int calPartyPartiIssueTotal(String customerId, String gridId, String communityId, String agencyPath, String isParty);
/**
* @return int
* @param orgType 组织类别 agency组织网格grid部门department
* @param orgId 组织Id 可以为网格id
* @param orgId 组织Id 可以为网格id
* @return int
* @author yinzuomei
* @description 参与人数参与人数: 议题的表决行为的用户数去重的累计值
* @Date 2020/9/27 14:06
**/
int queryJoinUserTotal(String customerId,String orgType, String orgId);
int queryJoinUserTotal(String customerId, String orgType, String orgId);
/**
* desc: 获取每个议题的表决人数
*
* @param customerId
* @param monthId
* @return java.util.List<com.epmet.dto.extract.FactOriginIssueLogDailyEntity>
* @author LiuJanJun
* @date 2020/9/27 1:58 下午
*/
List<IssueVoteUserCountResultDTO> getVoteCount(String customerId, String monthId);
}

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

@ -18,10 +18,10 @@
package com.epmet.service.evaluationindex.extract.todata.impl;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.dao.evaluationindex.extract.FactOriginGroupMainDailyDao;
import com.epmet.dto.extract.FactOriginGroupMainDailyDTO;
import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO;
import com.epmet.dto.extract.result.GridGroupUserCountResultDTO;
import com.epmet.dto.group.result.ExtractGroupMemberActionRecordResultDTO;
import com.epmet.entity.evaluationindex.extract.FactOriginGroupMainDailyEntity;
import com.epmet.service.evaluationindex.extract.todata.FactOriginGroupMainDailyService;
@ -108,11 +108,16 @@ public class FactOriginGroupMainDailyServiceImpl extends BaseServiceImpl<FactOri
* @date 2020/9/25 9:46 上午
*/
@Override
public List<ScreenPartyLinkMassesDataFormDTO> selectPartyCreateGroupInfo(String customerId, String monthId,List<String> gridIds) {
if (!CollectionUtils.isEmpty(gridIds)){
public List<ScreenPartyLinkMassesDataFormDTO> selectPartyCreateGroupInfo(String customerId, String monthId, List<String> gridIds) {
if (!CollectionUtils.isEmpty(gridIds)) {
return baseDao.selectPartyCreateGroupInfo(customerId, monthId, gridIds);
}
return new ArrayList<>();
}
@Override
public List<GridGroupUserCountResultDTO> selectDistinctGroupMemberCount(String customerId) {
return baseDao.selectDistinctGroupMemberCount(customerId);
}
}

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

@ -23,6 +23,7 @@ import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.evaluationindex.extract.FactOriginIssueLogDailyDao;
import com.epmet.dto.extract.result.IssueVoteUserCountResultDTO;
import com.epmet.dto.stats.DimAgencyDTO;
import com.epmet.entity.evaluationindex.extract.FactOriginIssueLogDailyEntity;
import com.epmet.service.evaluationindex.extract.todata.FactOriginIssueLogDailyService;
@ -31,8 +32,10 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 议题记录附表
* 议题记录附表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-09-23
@ -86,4 +89,8 @@ public class FactOriginIssueLogDailyServiceImpl extends BaseServiceImpl<FactOrig
}
@Override
public List<IssueVoteUserCountResultDTO> getVoteCount(String customerId, String monthId) {
return baseDao.getVoteCount(customerId, monthId);
}
}

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

@ -7,11 +7,15 @@ import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.OrgTypeConstant;
import com.epmet.dto.extract.form.ExtractScreenFormDTO;
import com.epmet.dto.extract.result.GridGroupUserCountResultDTO;
import com.epmet.dto.extract.result.GridUserCountResultDTO;
import com.epmet.dto.extract.result.IssueVoteUserCountResultDTO;
import com.epmet.entity.evaluationindex.screen.ScreenUserJoinEntity;
import com.epmet.entity.stats.DimAgencyEntity;
import com.epmet.entity.stats.DimGridEntity;
import com.epmet.entity.stats.FactIssueGridMonthlyEntity;
import com.epmet.service.evaluationindex.extract.todata.FactOriginGroupMainDailyService;
import com.epmet.service.evaluationindex.extract.todata.FactOriginIssueLogDailyService;
import com.epmet.service.evaluationindex.extract.toscreen.PublicPartExtractService;
import com.epmet.service.stats.DimAgencyService;
import com.epmet.service.stats.DimGridService;
@ -48,6 +52,10 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService {
private FactIssueGridMonthlyService factIssueGridMonthlyService;
@Autowired
private FactRegUserGridMonthlyService factRegUserGridMonthlyService;
@Autowired
private FactOriginIssueLogDailyService factOriginIssueLogDailyService;
@Autowired
private FactOriginGroupMainDailyService factOriginGroupMainDailyService;
/**
@ -55,7 +63,10 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService {
* targetscreen_user_join
* 总参与统计周期内议题表决(虽然可以评价 但是只有表决的人可以评价 所以按表决人数算)的人数
* 百人人均议题统计周期内总的议题数/注册用户数/100
* 百人平均参与度每个议题的实际参与数/应参与数 的平均值每个议题的实际参与数/应参与数的和/被表决的议题数
* 百人平均参与度每个议题的实际参与数/应参与数 的平均值每个议题的实际参与数/应参与数的和/被表决的议题数 来源 获取issue_vote_statistical_daily中 monthId的数据
* <p>
* <p>
* <p>
* 不考虑市北人均议题统计周期内议题总数/发过议题的人数 参与度各个行为(表决)的总数/发生行为的人数
*
* @return java.lang.Boolean
@ -101,16 +112,42 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService {
GridUserCountResultDTO user = userCountMap.get(gridId);
//百人人均议题:统计周期内总的议题数/(注册用户数/100)
BigDecimal avgIssueCount = new BigDecimal(issue.getIssueIncr()).divide(new BigDecimal(user.getUserCount()).divide(new BigDecimal(NumConstant.ONE_HUNDRED)));
// 需要修改字段类型
entity.setAvgIssue(avgIssueCount);
//百人平均参与度:每个议题的实际参与数/应参与数 的平均值:(每个议题的实际参与数/应参与数)的和)/被表决的议题数
});
entity.setAvgJoin(new BigDecimal(0));
});
//获取该月 表决的人数
List<IssueVoteUserCountResultDTO> voteCountList = factOriginIssueLogDailyService.getVoteCount(formDTO.getCustomerId(), formDTO.getMonthId());
Map<String, Integer> gridMemberCount = new HashMap<>();
if (!CollectionUtils.isEmpty(issueTotal)) {
//获取每个网格的应表决人数
List<GridGroupUserCountResultDTO> memberCountList = factOriginGroupMainDailyService.selectDistinctGroupMemberCount(formDTO.getCustomerId());
if (CollectionUtils.isEmpty(memberCountList)) {
log.error("抽取【公众参与-人均议题】,获取应表决人数为空");
return;
}
gridMemberCount = memberCountList.stream().collect(Collectors.toMap(GridGroupUserCountResultDTO::getGridId, o -> o.getMemberCount()));
}
//百人平均参与度:每个议题的实际参与数/应参与数 的平均值:(每个议题的实际参与数/应参与数)的和)/被表决的议题数
//遍历实际参与人数
Map<String, List<IssueVoteUserCountResultDTO>> voteMap = voteCountList.stream().collect(Collectors.groupingBy(IssueVoteUserCountResultDTO::getGridId));
for (Map.Entry<String, List<IssueVoteUserCountResultDTO>> entry : voteMap.entrySet()) {
String gridId = entry.getKey();
ScreenUserJoinEntity entity = insertMap.get(gridId);
List<IssueVoteUserCountResultDTO> issueList = entry.getValue();
BigDecimal bigDecimal = new BigDecimal(0);
BigDecimal votedByIssueCount = new BigDecimal(issueList.get(0).getIssueCount());
for (IssueVoteUserCountResultDTO vote : issueList) {
Integer memberCount = gridMemberCount.get(gridId);
if (memberCount == null) {
memberCount = 0;
}
bigDecimal = bigDecimal.add(new BigDecimal(vote.getVoteCount() / memberCount));
}
entity.setAvgJoin(bigDecimal.divide(votedByIssueCount).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)));
}
}
private void extractAgencyUserJoin(ExtractScreenFormDTO formDTO) {

15
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml

@ -264,4 +264,19 @@
)
GROUP BY GRID_ID
</select>
<select id="selectDistinctGroupMemberCount" resultType="com.epmet.dto.extract.result.GridGroupUserCountResultDTO">
SELECT
COUNT(DISTINCT MEMBER_ID) AS memberCount,
GRID_ID,
CUSTOMER_ID,
PIDS,
AGENCY_ID
FROM
fact_origin_group_member_daily
WHERE
DEL_FLAG = '0'
AND CUSTOMER_ID = #{customerId}
GROUP by GRID_ID
</select>
</mapper>

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

@ -138,4 +138,20 @@
and m.PIDS LIKE CONCAT(#{pids},'%')
</if>
</select>
<select id="getVoteCount" resultType="com.epmet.dto.extract.result.IssueVoteUserCountResultDTO">
SELECT
GRID_ID,
ISSUE_ID,
COUNT(1) AS voteCount,
COUNT( DISTINCT ISSUE_ID) issueCount
FROM
fact_origin_issue_log_daily
WHERE
DEL_FLAG = '0'
and CUSTOMER_ID = #{customerId,jdbcType=VARCHAR}
and MONTH_ID = #{monthId,jdbcType=VARCHAR}
AND ACTION_CODE LIKE 'vote_%'
group by GRID_ID
</select>
</mapper>
Loading…
Cancel
Save