Browse Source

组织能力-用户相关查询接口初始提交v1

master
yinzuomei 5 years ago
parent
commit
1cceb8cb0e
  1. 22
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/constant/DataReportModuleConstant.java
  2. 27
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/user/result/UserSummaryInfoResultDTO.java
  3. 0
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/.gitignore
  4. 0
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/.gitignore
  5. 32
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/user/UserAnalysisDao.java
  6. 0
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/.gitignore
  7. 46
      epmet-module/data-report/data-report-server/src/main/resources/mapper/user/UserAnalysisDao.xml

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>
Loading…
Cancel
Save