diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/DataSourceConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/DataSourceConstant.java
index f89ede1ba6..ce0dccf1a5 100644
--- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/DataSourceConstant.java
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/DataSourceConstant.java
@@ -12,5 +12,6 @@ public interface DataSourceConstant {
String RESI_GROUP = "resiGroup";
String EPMET_USER = "epmetuser";
String EVALUATION_INDEX = "evaluationIndex";
+ String PARTY_MEMBER = "partyMember";
}
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimCustomerPartymemberDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimCustomerPartymemberDTO.java
new file mode 100644
index 0000000000..8e1612fa8b
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/DimCustomerPartymemberDTO.java
@@ -0,0 +1,131 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dto.stats;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+
+/**
+ * 党员维度表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-09-17
+ */
+@Data
+public class DimCustomerPartymemberDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ private String id;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 党员认证时的网格id
+ */
+ private String gridId;
+
+ /**
+ * 所属机关ID
+ */
+ private String agencyId;
+
+ /**
+ * agencyId的上一级组织id
+ */
+ private String parentId;
+
+ /**
+ * 党员认证成功的日期yyyyMMdd
+ */
+ private String dateId;
+
+ /**
+ * 周ID eg:2020W01 = 2020年第一周
+ */
+ private String weekId;
+
+ /**
+ * 月份ID eg:202006 = 2020年6月、2020-07 = 2020年7月
+ */
+ private String monthId;
+
+ /**
+ * 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度
+ */
+ private String quarterId;
+
+ /**
+ * 年度ID eg:2020 = 2020年、2021 = 2021年
+ */
+ private String yearId;
+
+ /**
+ * 用户id
+ */
+ private String userId;
+
+ /**
+ * 身份证
+ */
+ private String idCard;
+
+ /**
+ * 生日
+ */
+ private Date birthday;
+
+ /**
+ * 删除标识0未删除1已删除
+ */
+ private String delFlag;
+
+ /**
+ * 乐观锁
+ */
+ private Integer revision;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/form/CustomerIdAndDateIdFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/form/CustomerIdAndDateIdFormDTO.java
new file mode 100644
index 0000000000..749d52a1a0
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/form/CustomerIdAndDateIdFormDTO.java
@@ -0,0 +1,25 @@
+package com.epmet.dto.stats.form;
+
+import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/9/17 11:02 上午
+ */
+@Data
+public class CustomerIdAndDateIdFormDTO implements Serializable {
+
+ private static final long serialVersionUID = -3381286960911634231L;
+
+ public interface CustomerIdAndDateId extends CustomerClientShowGroup{}
+
+ @NotBlank(message = "客户ID不能为空",groups = CustomerIdAndDateId.class)
+ private String customerId;
+
+ @NotBlank(message = "日期Id不能为空",groups = CustomerIdAndDateId.class)
+ private String dateId;
+}
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/form/DimCustomerPartyMemberFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/form/DimCustomerPartyMemberFormDTO.java
new file mode 100644
index 0000000000..9a57ade5e6
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/form/DimCustomerPartyMemberFormDTO.java
@@ -0,0 +1,104 @@
+package com.epmet.dto.stats.form;
+
+import com.epmet.commons.tools.constant.NumConstant;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/9/17 11:15 上午
+ */
+@Data
+public class DimCustomerPartyMemberFormDTO implements Serializable {
+
+ private static final long serialVersionUID = -9178779369245037701L;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 党员认证时的网格id
+ */
+ private String gridId;
+
+ /**
+ * 所属机关ID
+ */
+ private String agencyId;
+
+ /**
+ * agencyId的上一级组织id
+ */
+ private String parentId;
+
+ /**
+ * 党员认证成功的日期yyyyMMdd
+ */
+ private String dateId;
+
+ /**
+ * 周ID eg:2020W01 = 2020年第一周
+ */
+ private String weekId;
+
+ /**
+ * 月份ID eg:202006 = 2020年6月、2020-07 = 2020年7月
+ */
+ private String monthId;
+
+ /**
+ * 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度
+ */
+ private String quarterId;
+
+ /**
+ * 年度ID eg:2020 = 2020年、2021 = 2021年
+ */
+ private String yearId;
+
+ /**
+ * 用户id
+ */
+ private String userId;
+
+ /**
+ * 身份证
+ */
+ private String idCard;
+
+ /**
+ * 生日
+ */
+ private Date birthday;
+
+ /**
+ * 删除标识0未删除1已删除
+ */
+ private String delFlag;
+
+ /**
+ * 乐观锁
+ */
+ private Integer revision;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ public DimCustomerPartyMemberFormDTO() {
+ this.delFlag = NumConstant.ZERO_STR;
+ this.revision = NumConstant.ZERO;
+ this.createdBy = "APP_USER";
+ this.updatedBy = "APP_USER";
+ }
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml
index d930651a68..70dc12bf01 100644
--- a/epmet-module/data-statistical/data-statistical-server/pom.xml
+++ b/epmet-module/data-statistical/data-statistical-server/pom.xml
@@ -192,6 +192,12 @@
epmet_evaluation_index_user
EpmEt-db-UsEr
+
+
+
+ epmet_resi_partymember_user
+ EpmEt-db-UsEr
+
0
192.168.1.130
@@ -290,6 +296,12 @@
epmet_evaluation_index_user
EpmEt-db-UsEr
+
+
+
+ epmet_resi_partymember_user
+ EpmEt-db-UsEr
+
0
192.168.1.130
@@ -388,6 +400,12 @@
epmet
elink@833066
+
+
+
+ epmet
+ elink@833066
+
0
r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com
@@ -482,6 +500,12 @@
epmet_evaluation_index_user
EpmEt-db-UsEr
+
+
+
+ epmet_resi_partymember_user
+ EpmEt-db-UsEr
+
0
r-m5ez3n1j0qc3ykq2ut.redis.rds.aliyuncs.com
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java
index 018857ae8e..6db7fd4245 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java
@@ -16,6 +16,7 @@ import com.epmet.dao.stats.DimCustomerDao;
import com.epmet.dao.stats.DimDateDao;
import com.epmet.dto.AgencySubTreeDto;
import com.epmet.dto.indexcal.CalculateCommonFormDTO;
+import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyEntity;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyEntity;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyEntity;
@@ -27,6 +28,7 @@ import com.epmet.service.StatsDemoService;
import com.epmet.service.evaluationindex.extract.FactOriginTopicMainDailyService;
import com.epmet.service.evaluationindex.indexcal.*;
import com.epmet.service.stats.DimAgencyService;
+import com.epmet.service.stats.DimCustomerPartymemberService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -515,4 +517,13 @@ public class DemoController {
}
return new Result();
}
+
+ @Autowired
+ private DimCustomerPartymemberService partymemberService;
+
+ @PostMapping("statsparty")
+ public Result getPartyInfo(@RequestBody CustomerIdAndDateIdFormDTO customerIdAndDateIdFormDTO){
+ partymemberService.statsPartyMember(customerIdAndDateIdFormDTO);
+ return new Result();
+ }
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/partymember/PartyMemberDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/partymember/PartyMemberDao.java
new file mode 100644
index 0000000000..02c0b76a95
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/partymember/PartyMemberDao.java
@@ -0,0 +1,29 @@
+package com.epmet.dao.partymember;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.extract.result.IssueInfoResultDTO;
+import com.epmet.dto.extract.result.IssueProcessInfoResultDTO;
+import com.epmet.dto.extract.result.SatisfactionInfoResultDTO;
+import com.epmet.dto.issue.IssueAgencyDTO;
+import com.epmet.dto.issue.IssueGridDTO;
+import com.epmet.dto.issue.IssueProjectDTO;
+import com.epmet.dto.stats.form.DimCustomerPartyMemberFormDTO;
+import com.epmet.entity.issue.IssueEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+@Mapper
+public interface PartyMemberDao{
+
+ /**
+ * @Description 查询党员信息
+ * @param customerId
+ * @param dateId
+ * @author zxc
+ * @date 2020/9/17 1:58 下午
+ */
+ List selectPartyMemberInfo(@Param("customerId") String customerId,@Param("dateId") String dateId);
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimCustomerPartymemberDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimCustomerPartymemberDao.java
new file mode 100644
index 0000000000..f8d3e8c295
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimCustomerPartymemberDao.java
@@ -0,0 +1,45 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao.stats;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.stats.form.DimCustomerPartyMemberFormDTO;
+import com.epmet.entity.stats.DimCustomerPartymemberEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 党员维度表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-09-17
+ */
+@Mapper
+public interface DimCustomerPartymemberDao extends BaseDao {
+
+ /**
+ * @Description 批量插入党员信息
+ * @param partyMemberInfos
+ * @author zxc
+ * @date 2020/9/17 11:18 上午
+ */
+ void insertPartyMemberInfo(@Param("partyMemberInfos")List partyMemberInfos);
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimCustomerPartymemberEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimCustomerPartymemberEntity.java
new file mode 100644
index 0000000000..2c84bf98c4
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimCustomerPartymemberEntity.java
@@ -0,0 +1,101 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.entity.stats;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 党员维度表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-09-17
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("dim_customer_partymember")
+public class DimCustomerPartymemberEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 党员认证时的网格id
+ */
+ private String gridId;
+
+ /**
+ * 所属机关ID
+ */
+ private String agencyId;
+
+ /**
+ * agencyId的上一级组织id
+ */
+ private String pid;
+
+ /**
+ * 党员认证成功的日期yyyyMMdd
+ */
+ private String dateId;
+
+ /**
+ * 周ID eg:2020W01 = 2020年第一周
+ */
+ private String weekId;
+
+ /**
+ * 月份ID eg:202006 = 2020年6月、2020-07 = 2020年7月
+ */
+ private String monthId;
+
+ /**
+ * 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度
+ */
+ private String quarterId;
+
+ /**
+ * 年度ID eg:2020 = 2020年、2021 = 2021年
+ */
+ private String yearId;
+
+ /**
+ * 用户id
+ */
+ private String userId;
+
+ /**
+ * 身份证
+ */
+ private String idCard;
+
+ /**
+ * 生日
+ */
+ private Date birthday;
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/partymember/PartyMemberService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/partymember/PartyMemberService.java
new file mode 100644
index 0000000000..9f8cdde947
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/partymember/PartyMemberService.java
@@ -0,0 +1,22 @@
+package com.epmet.service.partymember;
+
+import com.epmet.dto.stats.form.DimCustomerPartyMemberFormDTO;
+
+import java.util.List;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/9/17 1:52 下午
+ */
+public interface PartyMemberService {
+
+ /**
+ * @Description 查询党员信息
+ * @param customerId
+ * @param dateId
+ * @author zxc
+ * @date 2020/9/17 1:58 下午
+ */
+ List selectPartyMemberInfo(String customerId, String dateId);
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/partymember/impl/PartyMemberServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/partymember/impl/PartyMemberServiceImpl.java
new file mode 100644
index 0000000000..6e346a01d7
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/partymember/impl/PartyMemberServiceImpl.java
@@ -0,0 +1,38 @@
+package com.epmet.service.partymember.impl;
+
+import com.epmet.commons.dynamic.datasource.annotation.DataSource;
+import com.epmet.constant.DataSourceConstant;
+import com.epmet.dao.partymember.PartyMemberDao;
+import com.epmet.dto.stats.form.DimCustomerPartyMemberFormDTO;
+import com.epmet.service.partymember.PartyMemberService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/9/17 1:53 下午
+ */
+@Service
+@Slf4j
+@DataSource(DataSourceConstant.PARTY_MEMBER)
+public class PartyMemberServiceImpl implements PartyMemberService {
+
+ @Autowired
+ private PartyMemberDao partyMemberDao;
+
+ /**
+ * @Description 查询党员信息
+ * @param customerId
+ * @param dateId
+ * @author zxc
+ * @date 2020/9/17 1:58 下午
+ */
+ @Override
+ public List selectPartyMemberInfo(String customerId, String dateId){
+ return partyMemberDao.selectPartyMemberInfo(customerId, dateId);
+ }
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimCustomerPartymemberService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimCustomerPartymemberService.java
new file mode 100644
index 0000000000..267eca8c73
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimCustomerPartymemberService.java
@@ -0,0 +1,104 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service.stats;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.dto.stats.DimCustomerPartymemberDTO;
+import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO;
+import com.epmet.entity.stats.DimCustomerPartymemberEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 党员维度表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-09-17
+ */
+public interface DimCustomerPartymemberService extends BaseService {
+
+ /**
+ * 默认分页
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2020-09-17
+ */
+ PageData page(Map params);
+
+ /**
+ * 默认查询
+ *
+ * @param params
+ * @return java.util.List
+ * @author generator
+ * @date 2020-09-17
+ */
+ List list(Map params);
+
+ /**
+ * 单条查询
+ *
+ * @param id
+ * @return DimCustomerPartymemberDTO
+ * @author generator
+ * @date 2020-09-17
+ */
+ DimCustomerPartymemberDTO get(String id);
+
+ /**
+ * 默认保存
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2020-09-17
+ */
+ void save(DimCustomerPartymemberDTO dto);
+
+ /**
+ * 默认更新
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2020-09-17
+ */
+ void update(DimCustomerPartymemberDTO dto);
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return void
+ * @author generator
+ * @date 2020-09-17
+ */
+ void delete(String[] ids);
+
+ /**
+ * @Description 统计党员
+ * @param customerIdAndDateIdFormDTO
+ * @author zxc
+ * @date 2020/9/17 11:05 上午
+ */
+ Boolean statsPartyMember(CustomerIdAndDateIdFormDTO customerIdAndDateIdFormDTO);
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerPartymemberServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerPartymemberServiceImpl.java
new file mode 100644
index 0000000000..5585cebb89
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerPartymemberServiceImpl.java
@@ -0,0 +1,123 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service.stats.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.utils.ConvertUtils;
+import com.epmet.commons.tools.constant.FieldConstant;
+import com.epmet.dao.stats.DimCustomerPartymemberDao;
+import com.epmet.dto.stats.DimCustomerPartymemberDTO;
+import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO;
+import com.epmet.dto.stats.form.DimCustomerPartyMemberFormDTO;
+import com.epmet.entity.stats.DimCustomerPartymemberEntity;
+import com.epmet.service.partymember.PartyMemberService;
+import com.epmet.service.stats.DimCustomerPartymemberService;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 党员维度表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-09-17
+ */
+@Service
+public class DimCustomerPartymemberServiceImpl extends BaseServiceImpl implements DimCustomerPartymemberService {
+
+ @Autowired
+ private DimCustomerPartymemberDao partyMemberDao;
+ @Autowired
+ private PartyMemberService partyMemberService;
+
+ @Override
+ public PageData page(Map params) {
+ IPage page = baseDao.selectPage(
+ getPage(params, FieldConstant.CREATED_TIME, false),
+ getWrapper(params)
+ );
+ return getPageData(page, DimCustomerPartymemberDTO.class);
+ }
+
+ @Override
+ public List list(Map params) {
+ List entityList = baseDao.selectList(getWrapper(params));
+
+ return ConvertUtils.sourceToTarget(entityList, DimCustomerPartymemberDTO.class);
+ }
+
+ private QueryWrapper getWrapper(Map params){
+ String id = (String)params.get(FieldConstant.ID_HUMP);
+
+ QueryWrapper wrapper = new QueryWrapper<>();
+ wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
+
+ return wrapper;
+ }
+
+ @Override
+ public DimCustomerPartymemberDTO get(String id) {
+ DimCustomerPartymemberEntity entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, DimCustomerPartymemberDTO.class);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void save(DimCustomerPartymemberDTO dto) {
+ DimCustomerPartymemberEntity entity = ConvertUtils.sourceToTarget(dto, DimCustomerPartymemberEntity.class);
+ insert(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(DimCustomerPartymemberDTO dto) {
+ DimCustomerPartymemberEntity entity = ConvertUtils.sourceToTarget(dto, DimCustomerPartymemberEntity.class);
+ updateById(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delete(String[] ids) {
+ // 逻辑删除(@TableLogic 注解)
+ baseDao.deleteBatchIds(Arrays.asList(ids));
+ }
+
+ /**
+ * @Description 统计党员
+ * @param customerIdAndDateIdFormDTO
+ * @author zxc
+ * @date 2020/9/17 11:05 上午
+ */
+ @Override
+ public Boolean statsPartyMember(CustomerIdAndDateIdFormDTO customerIdAndDateIdFormDTO) {
+ String customerId = customerIdAndDateIdFormDTO.getCustomerId();
+ String dateId = customerIdAndDateIdFormDTO.getDateId();
+ List partyMemberList = partyMemberService.selectPartyMemberInfo(customerId, dateId);
+
+ return true;
+ }
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml
index c2b2f726f4..7e0ac4e99d 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml
@@ -170,6 +170,11 @@ dynamic:
url: @datasource.druid.evaluationIndex.url@
username: @datasource.druid.evaluationIndex.username@
password: @datasource.druid.evaluationIndex.password@
+ partyMember:
+ driver-class-name: com.mysql.cj.jdbc.Driver
+ url: @datasource.druid.partyMember.url@
+ username: @datasource.druid.partyMember.username@
+ password: @datasource.druid.partyMember.password@
thread:
# 线程池配置
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/partymember/PartyMemberDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/partymember/PartyMemberDao.xml
new file mode 100644
index 0000000000..85079be740
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/partymember/PartyMemberDao.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+ SELECT
+ CUSTOMER_ID,
+ GRID_ID,
+ USER_ID,
+ ID_CARD,
+ CONCAT(
+ SUBSTRING( ID_CARD, 7, 4 ),
+ '-',
+ SUBSTRING( ID_CARD, 11, 2 ),
+ '-',
+ SUBSTRING( ID_CARD, 12, 2 )) AS birthday
+ FROM
+ partymember_info
+ WHERE
+ DEL_FLAG = 0
+ AND ( CONFIRM_RESULT = 'auto_confirm_success' OR CONFIRM_RESULT = 'approved' )
+ AND CUSTOMER_ID = #{customerId}
+ AND DATE_FORMAT( UPDATED_TIME, '%Y%m%d' ) = #{dateId}
+
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimCustomerPartymemberDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimCustomerPartymemberDao.xml
new file mode 100644
index 0000000000..9b8009c7a9
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimCustomerPartymemberDao.xml
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+ INSERT INTO dim_customer_partymember (
+ ID,
+ CUSTOMER_ID,
+ GRID_ID,
+ AGENCY_ID,
+ PARENT_ID,
+ DATE_ID,
+ WEEK_ID,
+ MONTH_ID,
+ QUARTER_ID,
+ YEAR_ID,
+ USER_ID,
+ ID_CARD,
+ BIRTHDAY,
+ DEL_FLAG,
+ REVISION,
+ CREATED_BY,
+ CREATED_TIME,
+ UPDATED_BY,
+ UPDATED_TIME
+ )
+ VALUES
+
+ (
+ REPLACE ( UUID(), '-', '' ),
+ #{item.customerId},
+ #{item.gridId},
+ #{item.agencyId},
+ #{item.parentId},
+ #{item.dateId},
+ #{item.weekId},
+ #{item.monthId},
+ #{item.quarterId},
+ #{item.yearId},
+ #{item.userId},
+ #{item.idCard},
+ #{item.birthday},
+ #{item.delFlag},
+ #{item.revision},
+ #{item.createdBy},
+ NOW(),
+ #{item.updatedBy},
+ NOW()
+ )
+
+
+
\ No newline at end of file
diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java
index 2e49c80102..de4de9ed21 100644
--- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java
+++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java
@@ -75,13 +75,13 @@ public class ExtAppJwtTokenUtils {
public static void genToken() {
HashMap claim = new HashMap<>();
- claim.put("appId", "2c448b7da527055fbeebb628f8d3dcb0");
- claim.put("customerId", "c1");
+ claim.put("appId", "acc4ad66c82a7b46e741364b4c62dce2");
+ claim.put("customerId", "b09527201c4409e19d1dbc5e3c3429a1");
long ts = System.currentTimeMillis() - 1000 * 60 * 4;
System.out.println("时间戳:" + ts);
claim.put("ts", ts);
- String abc = new ExtAppJwtTokenUtils().createToken(claim, "d4b73db4cf8e46ef99fa1f95149c2791ef2396fded114dd09e406cbce83fc88a");
+ String abc = new ExtAppJwtTokenUtils().createToken(claim, "612d304095c50369c3ef06e490f05779eeb8f19ff16566c73aeafafc5fa01970");
System.out.println(abc);
}