Browse Source

Merge remote-tracking branch 'origin/dev_data_stats' into dev_data_stats

master
zhaoqifeng 5 years ago
parent
commit
a8ff696533
  1. 10
      epmet-gateway/pom.xml
  2. 9
      epmet-gateway/src/main/resources/bootstrap.yml
  3. 22
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/constant/DataReportModuleConstant.java
  4. 27
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/user/result/UserSummaryInfoResultDTO.java
  5. 0
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/.gitignore
  6. 0
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/.gitignore
  7. 32
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/user/UserAnalysisDao.java
  8. 0
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/.gitignore
  9. 46
      epmet-module/data-report/data-report-server/src/main/resources/mapper/user/UserAnalysisDao.xml
  10. 2
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsGroupAgencyDailyTask.java
  11. 2
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsGroupAgencyMonthlyTask.java
  12. 2
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsGroupGridDailyTask.java

10
epmet-gateway/pom.xml

@ -175,6 +175,12 @@
<!-- 27、居民端-党建声音 -->
<gateway.routes.resi-voice-server.uri>lb://resi-voice-server</gateway.routes.resi-voice-server.uri>
<!-- <gateway.routes.resi-voice-server.uri>http://localhost:8106</gateway.routes.resi-voice-server.uri>-->
<!-- 28、政府端-数据首页 -->
<gateway.routes.data-report-server.uri>lb://data-report-server</gateway.routes.data-report-server.uri>
<!-- <gateway.routes.data-report-server.uri>http://localhost:8109</gateway.routes.data-report-server.uri>-->
<!-- 29、统计服务 -->
<gateway.routes.data-statistical-server.uri>lb://data-statistical-server</gateway.routes.data-statistical-server.uri>
<!-- <gateway.routes.data-statistical-server.uri>http://localhost:8108</gateway.routes.data-statistical-server.uri>-->
</properties>
</profile>
<profile>
@ -251,6 +257,10 @@
<gateway.routes.gov-voice-server.uri>lb://gov-voice-server</gateway.routes.gov-voice-server.uri>
<!-- 27、居民端-党建声音 -->
<gateway.routes.resi-voice-server.uri>lb://resi-voice-server</gateway.routes.resi-voice-server.uri>
<!-- 28、政府端-数据首页 -->
<gateway.routes.data-report-server.uri>lb://data-report-server</gateway.routes.data-report-server.uri>
<!-- 29、数据统计服务 -->
<gateway.routes.data-statistical-server.uri>lb://data-statistical-server</gateway.routes.data-statistical-server.uri>
</properties>
</profile>
</profiles>

9
epmet-gateway/src/main/resources/bootstrap.yml

@ -268,6 +268,15 @@ spring:
filters:
- StripPrefix=1
- CpAuth=true
#统计服务
- id: data-statistical-server
uri: @gateway.routes.data-statistical-server.uri@
order: 29
predicates:
- Path=${server.servlet.context-path}/data/stats/**
filters:
- StripPrefix=1
- CpAuth=true
nacos:
discovery:
server-addr: @nacos.server-addr@

22
epmet-module/data-report/data-report-client/src/main/java/com/epmet/constant/DataReportModuleConstant.java

@ -0,0 +1,22 @@
package com.epmet.constant;
/**
* 描述一下
*
* @author yinzuomei@elink-cn.com
* @date 2020/6/22 16:35
*/
public interface DataReportModuleConstant {
/**
* reg注册居民 parti参与用户如果值为null默认为reg
*/
String REG_FLAG="reg";
/**
* reg注册居民 parti参与用户如果值为null默认为reg
*/
String PARTI_FLAG="parti";
String QUERY_USER_AGENCY_FAILED="查询用户所属机关信息失败";
}

27
epmet-module/data-report/data-report-client/src/main/java/com/epmet/user/result/UserSummaryInfoResultDTO.java

@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 用户汇总信息 返参DTO
@ -38,17 +39,39 @@ public class UserSummaryInfoResultDTO implements Serializable {
* 党员占比
*/
private String partymemberProportion;
/**
* 热心居民数
*/
private String warmHeartedTotal;
private Integer warmHeartedTotal;
/**
* 热心居民占比
*/
private String warmHeartedProportion;
@JsonIgnore
private BigDecimal partymemberProportionValue;
@JsonIgnore
private BigDecimal warmHeartedProportionValue;
@JsonIgnore
private String id;
public UserSummaryInfoResultDTO(){
this.currentDate="";
this.regTotal=0;
this.partiTotal=0;
this.partymemberTotal=0;
this.partymemberProportion="0%";
this.warmHeartedTotal=0;
this.warmHeartedProportion="0%";
this.id="";
}
public static void main(String[] args) {
StringBuffer s=new StringBuffer("20190305").insert(4,".").insert(7,".");
System.out.println(s);
}
}

0
epmet-module/data-report/data-report-server/src/main/java/com/epmet/module/user/controller/.gitignore → epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/.gitignore

0
epmet-module/data-report/data-report-server/src/main/java/com/epmet/module/user/dao/.gitignore → epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/.gitignore

32
epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/user/UserAnalysisDao.java

@ -0,0 +1,32 @@
package com.epmet.dao.user;
import com.epmet.user.result.UserSummaryInfoResultDTO;
import org.apache.ibatis.annotations.Mapper;
/**
* 描述一下
*
* @author yinzuomei@elink-cn.com
* @date 2020/6/22 16:33
*/
@Mapper
public interface UserAnalysisDao {
/**
* @param myAgencyId
* @return com.epmet.user.result.UserSummaryInfoResultDTO
* @author yinzuomei
* @description 查询注册用户汇总信息
* @Date 2020/6/22 16:52
**/
UserSummaryInfoResultDTO selectRegUserSummaryInfo(String myAgencyId);
/**
* @param myAgencyId
* @return com.epmet.user.result.UserSummaryInfoResultDTO
* @author yinzuomei
* @description 查询注册用户的汇总信息
* @Date 2020/6/22 16:52
**/
UserSummaryInfoResultDTO selectParticipationUserSummaryInfo(String myAgencyId);
}

0
epmet-module/data-report/data-report-server/src/main/java/com/epmet/module/user/service/.gitignore → epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/.gitignore

46
epmet-module/data-report/data-report-server/src/main/resources/mapper/user/UserAnalysisDao.xml

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.user.UserAnalysisDao">
<!-- 查询注册用户汇总信息 -->
<select id="selectRegUserSummaryInfo" parameterType="java.lang.String" resultType="com.epmet.user.result.UserSummaryInfoResultDTO">
SELECT
m.id,
m.DATE_ID AS currentDate,
m.REG_TOTAL AS regTotal,
0 AS partiTotal,
m.PARTYMEMBER_TOTAL AS partymemberTotal,
m.PARTYMEMBER_PROPORTION AS partymemberProportion,
m.WARM_HEARTED_TOTAL AS warmHeartedTotal,
m.WARM_HEARTED_PROPORTION AS warmHeartedProportion
FROM
fact_reg_user_agency_daily m
WHERE
m.DEL_FLAG = '0'
AND m.AGENCY_ID =#{myAgencyId}
ORDER BY
m.DATE_ID DESC
LIMIT 1
</select>
<!-- 查询注册用户的汇总信息 -->
<select id="selectParticipationUserSummaryInfo" parameterType="java.lang.String" resultType="com.epmet.user.result.UserSummaryInfoResultDTO">
SELECT
m.id,
m.DATE_ID AS currentDate,
m.REG_TOTAL AS regTotal,
0 AS partiTotal,
m.PARTYMEMBER_TOTAL AS partymemberTotal,
m.PARTYMEMBER_PROPORTION AS partymemberProportion,
m.WARM_HEARTED_TOTAL AS warmHeartedTotal,
m.WARM_HEARTED_PROPORTION AS warmHeartedProportion
FROM
fact_participation_user_agency_daily m
WHERE
m.DEL_FLAG = '0'
AND m.AGENCY_ID =#{myAgencyId}
ORDER BY
m.DATE_ID DESC
LIMIT 1
</select>
</mapper>

2
epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsGroupAgencyDailyTask.java

@ -5,6 +5,7 @@ import com.epmet.service.StatsGroupService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* @Author zxc
@ -12,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
*
* 统计 网格小组 dim机关-
*/
@Component("statsGroupAgencyDailyTask")
public class StatsGroupAgencyDailyTask implements ITask {
@Autowired

2
epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsGroupAgencyMonthlyTask.java

@ -5,6 +5,7 @@ import com.epmet.service.StatsGroupService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* @Author zxc
@ -12,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
*
* 统计 网格小组 dim机关-
*/
@Component("statsGroupAgencyMonthlyTask")
public class StatsGroupAgencyMonthlyTask implements ITask {
@Autowired

2
epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/StatsGroupGridDailyTask.java

@ -5,6 +5,7 @@ import com.epmet.service.StatsGroupService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* @Author zxc
@ -13,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
* 统计 网格小组 dim网格-
*
*/
@Component("statsGroupGridDailyTask")
public class StatsGroupGridDailyTask implements ITask {
@Autowired

Loading…
Cancel
Save