diff --git a/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/utils/DateUtils.java b/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/utils/DateUtils.java
index 0de5d2834..bff6daf43 100644
--- a/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/utils/DateUtils.java
+++ b/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/utils/DateUtils.java
@@ -14,9 +14,11 @@ import org.joda.time.LocalDate;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;
+import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
+import java.util.Locale;
/**
* 日期处理工具类
@@ -185,4 +187,28 @@ public class DateUtils {
DateTime dateTime = new DateTime(date);
return dateTime.plusYears(years).toDate();
}
+
+ /***
+ * 前端上传信息解析
+ * @param oldDate
+ * @return java.lang.String
+ * @author qushutong
+ * @date 2020/3/26 10:09
+ */
+ public static String dealDateFormat(String oldDate) {
+ Date date1 = null;
+ DateFormat df2 = null;
+ try {
+ oldDate= oldDate.replace("Z", " UTC");
+ DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS Z");
+ Date date = df.parse(oldDate);
+ SimpleDateFormat df1 = new SimpleDateFormat ("EEE MMM dd HH:mm:ss Z yyyy", Locale.UK);
+ date1 = df1.parse(date.toString());
+ df2 = new SimpleDateFormat("yyyy-MM-dd");
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+ return df2.format(date1);
+ }
+
}
diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/user/MetaUserGridOpiningDTO.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/user/MetaUserGridOpiningDTO.java
new file mode 100644
index 000000000..c3b3d3769
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/user/MetaUserGridOpiningDTO.java
@@ -0,0 +1,146 @@
+/**
+ * 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.elink.esua.epdc.dto.user;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+
+/**
+ * 网格开通情况
+ *
+ * @author qu elink@elink-cn.com
+ * @since v1.0.0 2020-03-25
+ */
+@Data
+public class MetaUserGridOpiningDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ private String id;
+
+ /**
+ * 网格id
+ */
+ private String gridId;
+
+ /**
+ * 用户总数
+ */
+ private int registerCount;
+
+ /**
+ * 党员数
+ */
+ private int partyCount;
+
+ /**
+ * 已注册居民
+ */
+ private int residentCount;
+
+ /**
+ * 未注册居民
+ */
+ private int unAuthorizedCount;
+
+ /**
+ * 新闻发布数
+ */
+ private int newsCount;
+
+ /**
+ * 社群数
+ */
+ private int communityCount;
+
+ /**
+ * 群成员数
+ */
+ private int communityMemberCount;
+
+ /**
+ * 群话题数
+ */
+ private int communityTopicCount;
+
+ /**
+ * 议题总数
+ */
+ private int eventCount;
+
+ /**
+ * 项目数
+ */
+ private int itemCount;
+
+ /**
+ * 项目已解决数
+ */
+ private int itemCloseCount;
+
+ /**
+ * 好评数
+ */
+ private int itemPraiseCount;
+
+ /**
+ * 网格名称
+ */
+ private String allDeptName;
+
+ /**
+ * 网格党建指导员姓名
+ */
+ private String gridLeader;
+
+ /**
+ * 删除标记
+ */
+ 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/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/user/MetaUserPartyRankDTO.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/user/MetaUserPartyRankDTO.java
new file mode 100644
index 000000000..be8c514e5
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/user/MetaUserPartyRankDTO.java
@@ -0,0 +1,127 @@
+/**
+ * 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.elink.esua.epdc.dto.user;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * 党员排行
+ *
+ * @author qu elink@elink-cn.com
+ * @since v1.0.0 2020-03-26
+ */
+@Data
+public class MetaUserPartyRankDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ private String id;
+
+ /**
+ * 街道id
+ */
+ private String streetId;
+
+ /**
+ * 街道名称
+ */
+ private String streetName;
+
+ /**
+ * 已注册党员数量(已认证)
+ */
+ private Integer partyMemberCount;
+
+ /**
+ * 年龄超过50岁党员数量
+ */
+ private Integer oldCount;
+
+ /**
+ * 老龄化比例
+ */
+ private BigDecimal oldPercent;
+
+ /**
+ * 年龄50岁以下的党员数量
+ */
+ private Integer youngCount;
+
+ /**
+ * 年轻化比例
+ */
+ private BigDecimal youngPercent;
+
+ /**
+ * 男
+ */
+ private Integer maleCount;
+
+ /**
+ * 女
+ */
+ private Integer femaleCount;
+
+ /**
+ * 未知性别
+ */
+ private Integer unknownSexCount;
+
+ /**
+ * 党员认证失败数
+ */
+ private Integer partyAuthFailureCount;
+
+ /**
+ * 删除标记
+ */
+ 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/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/user/MetaUserRegisterRankDTO.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/user/MetaUserRegisterRankDTO.java
new file mode 100644
index 000000000..52f3b7107
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/user/MetaUserRegisterRankDTO.java
@@ -0,0 +1,137 @@
+/**
+ * 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.elink.esua.epdc.dto.user;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * 用户注册排行
+ *
+ * @author qu elink@elink-cn.com
+ * @since v1.0.0 2020-03-26
+ */
+@Data
+public class MetaUserRegisterRankDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ private String id;
+
+ /**
+ * 街道id
+ */
+ private String streetId;
+
+ /**
+ * 街道名称
+ */
+ private String streetName;
+
+ /**
+ * 用户总数
+ */
+ private Integer userCount;
+
+ /**
+ * 党员数
+ */
+ private Integer partyMemberCount;
+
+ /**
+ * 已注册居民
+ */
+ private Integer residentCount;
+
+ /**
+ * 为注册居民
+ */
+ private Integer unAuthorizedCount;
+
+ /**
+ * 年龄超过50岁
+ */
+ private Integer oldCount;
+
+ /**
+ * 老龄化比例
+ */
+ private BigDecimal oldPercent;
+
+ /**
+ * 50岁以下用户数量
+ */
+ private Integer youngCount;
+
+ /**
+ * 年轻化比例
+ */
+ private BigDecimal youngPercent;
+
+ /**
+ * 男
+ */
+ private Integer maleCount;
+
+ /**
+ * 女
+ */
+ private Integer femaleCount;
+
+ /**
+ * 未知性别
+ */
+ private Integer unknownSexCount;
+
+ /**
+ * 删除标记
+ */
+ 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/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/datasources/DataSourceNames.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/datasources/DataSourceNames.java
index e75611937..55b1b3a2e 100644
--- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/datasources/DataSourceNames.java
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/datasources/DataSourceNames.java
@@ -19,4 +19,5 @@ public interface DataSourceNames {
String NINTH = "ninth";
String TENTH = "tenth";
String ELEVENTH = "eleventh";
+ String TWELVE = "twelve";
}
diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/datasources/DynamicDataSourceConfig.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/datasources/DynamicDataSourceConfig.java
index 9f078d3a1..bf0541ddd 100644
--- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/datasources/DynamicDataSourceConfig.java
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/datasources/DynamicDataSourceConfig.java
@@ -86,6 +86,12 @@ public class DynamicDataSourceConfig {
return DruidDataSourceBuilder.create().build();
}
+ @Bean
+ @ConfigurationProperties("spring.datasource.druid.twelve")
+ public DataSource twelvethDataSource() {
+ return DruidDataSourceBuilder.create().build();
+ }
+
@Bean
@Primary
public DynamicDataSource dataSource(DataSource firstDataSource, DataSource secondDataSource,
@@ -93,7 +99,7 @@ public class DynamicDataSourceConfig {
DataSource fifthDataSource, DataSource sixthDataSource,
DataSource seventhDataSource, DataSource eighthDataSource,
DataSource ninthDataSource, DataSource tenthDataSource,
- DataSource eleventhDataSource) {
+ DataSource eleventhDataSource,DataSource twelvethDataSource) {
Map targetDataSources = new HashMap<>();
targetDataSources.put(DataSourceNames.FIRST, firstDataSource);
targetDataSources.put(DataSourceNames.SECOND, secondDataSource);
@@ -106,6 +112,7 @@ public class DynamicDataSourceConfig {
targetDataSources.put(DataSourceNames.NINTH, ninthDataSource);
targetDataSources.put(DataSourceNames.TENTH, tenthDataSource);
targetDataSources.put(DataSourceNames.ELEVENTH, eleventhDataSource);
+ targetDataSources.put(DataSourceNames.TWELVE, twelvethDataSource);
return new DynamicDataSource(firstDataSource, targetDataSources);
}
}
diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/controller/MetaUserGridOpiningController.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/controller/MetaUserGridOpiningController.java
new file mode 100644
index 000000000..0f5b1fc1f
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/controller/MetaUserGridOpiningController.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.elink.esua.epdc.modules.user.controller;
+
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.utils.ExcelUtils;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
+import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
+import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
+import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
+import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
+import com.elink.esua.epdc.dto.user.MetaUserGridOpiningDTO;
+import com.elink.esua.epdc.dto.user.result.GridOpeningResultDTO;
+import com.elink.esua.epdc.modules.user.excel.MetaUserGridOpiningExcel;
+import com.elink.esua.epdc.modules.user.service.MetaUserGridOpiningService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * 网格开通情况
+ *
+ * @author qu elink@elink-cn.com
+ * @since v1.0.0 2020-03-25
+ */
+@RestController
+@RequestMapping("metausergridopining")
+public class MetaUserGridOpiningController {
+
+ @Autowired
+ private MetaUserGridOpiningService metaUserGridOpiningService;
+
+ @GetMapping("page")
+ public Result> page(@RequestParam Map params){
+ PageData page = metaUserGridOpiningService.page(params);
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ public Result get(@PathVariable("id") String id){
+ MetaUserGridOpiningDTO data = metaUserGridOpiningService.get(id);
+ return new Result().ok(data);
+ }
+
+ @PostMapping
+ public Result save(@RequestBody MetaUserGridOpiningDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+ metaUserGridOpiningService.save(dto);
+ return new Result();
+ }
+
+ @PutMapping
+ public Result update(@RequestBody MetaUserGridOpiningDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+ metaUserGridOpiningService.update(dto);
+ return new Result();
+ }
+
+ @DeleteMapping
+ public Result delete(@RequestBody String[] ids){
+ //效验数据
+ AssertUtils.isArrayEmpty(ids, "id");
+ metaUserGridOpiningService.delete(ids);
+ return new Result();
+ }
+
+ @GetMapping("export")
+ public void export(@RequestParam Map params, HttpServletResponse response) throws Exception {
+ List list = metaUserGridOpiningService.list(params);
+ ExcelUtils.exportExcelToTarget(response, null, list, MetaUserGridOpiningExcel.class);
+ }
+
+ /**
+ * @author: qushutong
+ * @Date: 2020/3/25 10:35
+ * @Description: 临时表导入
+ */
+ @GetMapping("tolead")
+ public Result> tolead() {
+ return metaUserGridOpiningService.createUserAnalysisData();
+ }
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/controller/MetaUserPartyRankController.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/controller/MetaUserPartyRankController.java
new file mode 100644
index 000000000..b4d678432
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/controller/MetaUserPartyRankController.java
@@ -0,0 +1,107 @@
+/**
+ * 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.elink.esua.epdc.modules.user.controller;
+
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.utils.ExcelUtils;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
+import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
+import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
+import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
+import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
+import com.elink.esua.epdc.dto.user.MetaUserPartyRankDTO;
+import com.elink.esua.epdc.modules.user.excel.MetaUserPartyRankExcel;
+import com.elink.esua.epdc.modules.user.service.MetaUserPartyRankService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * 党员排行
+ *
+ * @author qu elink@elink-cn.com
+ * @since v1.0.0 2020-03-26
+ */
+@RestController
+@RequestMapping("metauserpartyrank")
+public class MetaUserPartyRankController {
+
+ @Autowired
+ private MetaUserPartyRankService metaUserPartyRankService;
+
+ @GetMapping("page")
+ public Result> page(@RequestParam Map params){
+ PageData page = metaUserPartyRankService.page(params);
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ public Result get(@PathVariable("id") String id){
+ MetaUserPartyRankDTO data = metaUserPartyRankService.get(id);
+ return new Result().ok(data);
+ }
+
+ @PostMapping
+ public Result save(@RequestBody MetaUserPartyRankDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+ metaUserPartyRankService.save(dto);
+ return new Result();
+ }
+
+ @PutMapping
+ public Result update(@RequestBody MetaUserPartyRankDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+ metaUserPartyRankService.update(dto);
+ return new Result();
+ }
+
+ @DeleteMapping
+ public Result delete(@RequestBody String[] ids){
+ //效验数据
+ AssertUtils.isArrayEmpty(ids, "id");
+ metaUserPartyRankService.delete(ids);
+ return new Result();
+ }
+
+ @GetMapping("export")
+ public void export(@RequestParam Map params, HttpServletResponse response) throws Exception {
+ List list = metaUserPartyRankService.list(params);
+ ExcelUtils.exportExcelToTarget(response, null, list, MetaUserPartyRankExcel.class);
+ }
+
+ /***
+ * 定时任务导入
+ * @param
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author qushutong
+ * @date 2020/3/26 18:22
+ */
+ @GetMapping("toLeadPartyRankData")
+ public Result toLeadPartyRankData(){
+
+ return metaUserPartyRankService.toLeadPartyRankData();
+ }
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/controller/MetaUserRegisterRankController.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/controller/MetaUserRegisterRankController.java
new file mode 100644
index 000000000..e3f049e58
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/controller/MetaUserRegisterRankController.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.elink.esua.epdc.modules.user.controller;
+
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.utils.ExcelUtils;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
+import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
+import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
+import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
+import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
+import com.elink.esua.epdc.dto.user.MetaUserRegisterRankDTO;
+import com.elink.esua.epdc.modules.user.excel.MetaUserRegisterRankExcel;
+import com.elink.esua.epdc.modules.user.service.MetaUserRegisterRankService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * 用户注册排行
+ *
+ * @author qu elink@elink-cn.com
+ * @since v1.0.0 2020-03-26
+ */
+@RestController
+@RequestMapping("metauserregisterrank")
+public class MetaUserRegisterRankController {
+
+ @Autowired
+ private MetaUserRegisterRankService metaUserRegisterRankService;
+
+ @GetMapping("page")
+ public Result> page(@RequestParam Map params){
+ PageData page = metaUserRegisterRankService.page(params);
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ public Result get(@PathVariable("id") String id){
+ MetaUserRegisterRankDTO data = metaUserRegisterRankService.get(id);
+ return new Result().ok(data);
+ }
+
+ @PostMapping
+ public Result save(@RequestBody MetaUserRegisterRankDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+ metaUserRegisterRankService.save(dto);
+ return new Result();
+ }
+
+ @PutMapping
+ public Result update(@RequestBody MetaUserRegisterRankDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+ metaUserRegisterRankService.update(dto);
+ return new Result();
+ }
+
+ @DeleteMapping
+ public Result delete(@RequestBody String[] ids){
+ //效验数据
+ AssertUtils.isArrayEmpty(ids, "id");
+ metaUserRegisterRankService.delete(ids);
+ return new Result();
+ }
+
+ @GetMapping("export")
+ public void export(@RequestParam Map params, HttpServletResponse response) throws Exception {
+ List list = metaUserRegisterRankService.list(params);
+ ExcelUtils.exportExcelToTarget(response, null, list, MetaUserRegisterRankExcel.class);
+ }
+ /***
+ * 定时任务用户注册排行导入数据
+ * @param
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author qushutong
+ * @date 2020/3/26 13:44
+ */
+ @GetMapping("toLeadUserRegisterRandData")
+ public Result toLeadUserRegisterRandData(){
+ return metaUserRegisterRankService.toLeadUserRegisterRandData();
+ }
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/controller/UserAnalysisController.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/controller/UserAnalysisController.java
index b8ef9ddb5..18e38eeaa 100644
--- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/controller/UserAnalysisController.java
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/controller/UserAnalysisController.java
@@ -209,7 +209,7 @@ public class UserAnalysisController {
* @date 2020/3/23 16:36
*/
@PostMapping("export/exportOperationData")
- public void exportOperationData(@RequestBody ExportOperationFormDTO exportOperationFormDTO, HttpServletResponse response) throws Exception{
+ public void exportOperationData(@RequestBody ExportOperationFormDTO exportOperationFormDTO, HttpServletResponse response) throws Exception {
List list = userAnalysisService.listExportOperationCount(exportOperationFormDTO);
ExcelUtils.exportExcelToTarget(response, "开通网格情况", list, ExportOperationDataExcel.class);
}
diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/dao/MetaUserGridOpiningDao.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/dao/MetaUserGridOpiningDao.java
new file mode 100644
index 000000000..ca5c69bca
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/dao/MetaUserGridOpiningDao.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.elink.esua.epdc.modules.user.dao;
+
+import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.modules.user.entity.MetaUserGridOpiningEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 网格开通情况
+ *
+ * @author qu elink@elink-cn.com
+ * @since v1.0.0 2020-03-25
+ */
+@Mapper
+public interface MetaUserGridOpiningDao extends BaseDao {
+
+ /***
+ * 列表
+ * @param params
+ * @return com.elink.esua.epdc.commons.tools.page.PageData
+ * @author qushutong
+ * @date 2020/3/25 17:30
+ */
+ List pageselectListPage(Map params);
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/dao/MetaUserPartyRankDao.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/dao/MetaUserPartyRankDao.java
new file mode 100644
index 000000000..9bebf3d7a
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/dao/MetaUserPartyRankDao.java
@@ -0,0 +1,46 @@
+/**
+ * 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.elink.esua.epdc.modules.user.dao;
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
+import com.elink.esua.epdc.modules.user.entity.MetaUserPartyRankEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 党员排行
+ *
+ * @author qu elink@elink-cn.com
+ * @since v1.0.0 2020-03-26
+ */
+@Mapper
+public interface MetaUserPartyRankDao extends BaseDao {
+
+ /***
+ * 分页
+ * @param params
+ * @return java.util.List
+ * @author qushutong
+ * @date 2020/3/26 18:36
+ */
+ List selectPagePartyRank(Map params);
+
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/dao/MetaUserRegisterRankDao.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/dao/MetaUserRegisterRankDao.java
new file mode 100644
index 000000000..86223fd00
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/dao/MetaUserRegisterRankDao.java
@@ -0,0 +1,55 @@
+/**
+ * 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.elink.esua.epdc.modules.user.dao;
+
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
+import com.elink.esua.epdc.modules.user.entity.MetaUserRegisterRankEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 用户注册排行
+ *
+ * @author qu elink@elink-cn.com
+ * @since v1.0.0 2020-03-26
+ */
+@Mapper
+public interface MetaUserRegisterRankDao extends BaseDao {
+
+ /***
+ * 分页
+ * @param params
+ * @return java.util.List
+ * @author qushutong
+ * @date 2020/3/26 15:41
+ */
+ List selectPageUserRegisterRank(Map params);
+
+
+ /***
+ * 获取当前用户拥有权限的街道id
+ * @param params
+ * @return java.util.List
+ * @author qushutong
+ * @date 2020/3/26 16:54
+ */
+ List selectListStreetId(Map params);
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/entity/MetaUserGridOpiningEntity.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/entity/MetaUserGridOpiningEntity.java
new file mode 100644
index 000000000..cda46a4a2
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/entity/MetaUserGridOpiningEntity.java
@@ -0,0 +1,116 @@
+/**
+ * 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.elink.esua.epdc.modules.user.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 网格开通情况
+ *
+ * @author qu elink@elink-cn.com
+ * @since v1.0.0 2020-03-25
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("meta_epdc_user_grid_opining")
+public class MetaUserGridOpiningEntity extends BaseEpdcEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 网格id
+ */
+ private String gridId;
+
+ /**
+ * 用户总数
+ */
+ private int registerCount;
+
+ /**
+ * 党员数
+ */
+ private int partyCount;
+
+ /**
+ * 已注册居民
+ */
+ private int residentCount;
+
+ /**
+ * 未注册居民
+ */
+ private int unAuthorizedCount;
+
+ /**
+ * 新闻发布数
+ */
+ private int newsCount;
+
+ /**
+ * 社群数
+ */
+ private int communityCount;
+
+ /**
+ * 群成员数
+ */
+ private int communityMemberCount;
+
+ /**
+ * 群话题数
+ */
+ private int communityTopicCount;
+
+ /**
+ * 议题总数
+ */
+ private int eventCount;
+
+ /**
+ * 项目数
+ */
+ private int itemCount;
+
+ /**
+ * 项目已解决数
+ */
+ private int itemCloseCount;
+
+ /**
+ * 好评数
+ */
+ private int itemPraiseCount;
+
+ /**
+ * 网格名称
+ */
+ private String allDeptName;
+
+ /**
+ * 网格党建指导员姓名
+ */
+ private String gridLeader;
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/entity/MetaUserPartyRankEntity.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/entity/MetaUserPartyRankEntity.java
new file mode 100644
index 000000000..eec5ce88e
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/entity/MetaUserPartyRankEntity.java
@@ -0,0 +1,97 @@
+/**
+ * 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.elink.esua.epdc.modules.user.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 党员排行
+ *
+ * @author qu elink@elink-cn.com
+ * @since v1.0.0 2020-03-26
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("meta_epdc_user_party_rank")
+public class MetaUserPartyRankEntity extends BaseEpdcEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 街道id
+ */
+ private String streetId;
+
+ /**
+ * 街道名称
+ */
+ private String streetName;
+
+ /**
+ * 已注册党员数量(已认证)
+ */
+ private Integer partyMemberCount;
+
+ /**
+ * 年龄超过50岁党员数量
+ */
+ private Integer oldCount;
+
+ /**
+ * 老龄化比例
+ */
+ private BigDecimal oldPercent;
+
+ /**
+ * 年龄50岁以下的党员数量
+ */
+ private Integer youngCount;
+
+ /**
+ * 年轻化比例
+ */
+ private BigDecimal youngPercent;
+
+ /**
+ * 男
+ */
+ private Integer maleCount;
+
+ /**
+ * 女
+ */
+ private Integer femaleCount;
+
+ /**
+ * 未知性别
+ */
+ private Integer unknownSexCount;
+
+ /**
+ * 党员认证失败数
+ */
+ private Integer partyAuthFailureCount;
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/entity/MetaUserRegisterRankEntity.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/entity/MetaUserRegisterRankEntity.java
new file mode 100644
index 000000000..08f60b8be
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/entity/MetaUserRegisterRankEntity.java
@@ -0,0 +1,107 @@
+/**
+ * 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.elink.esua.epdc.modules.user.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 用户注册排行
+ *
+ * @author qu elink@elink-cn.com
+ * @since v1.0.0 2020-03-26
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("meta_epdc_user_register_rank")
+public class MetaUserRegisterRankEntity extends BaseEpdcEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 街道id
+ */
+ private String streetId;
+
+ /**
+ * 街道名称
+ */
+ private String streetName;
+
+ /**
+ * 用户总数
+ */
+ private Integer userCount;
+
+ /**
+ * 党员数
+ */
+ private Integer partyMemberCount;
+
+ /**
+ * 已注册居民
+ */
+ private Integer residentCount;
+
+ /**
+ * 为注册居民
+ */
+ private Integer unAuthorizedCount;
+
+ /**
+ * 年龄超过50岁
+ */
+ private Integer oldCount;
+
+ /**
+ * 老龄化比例
+ */
+ private BigDecimal oldPercent;
+
+ /**
+ * 50岁以下用户数量
+ */
+ private Integer youngCount;
+
+ /**
+ * 年轻化比例
+ */
+ private BigDecimal youngPercent;
+
+ /**
+ * 男
+ */
+ private Integer maleCount;
+
+ /**
+ * 女
+ */
+ private Integer femaleCount;
+
+ /**
+ * 未知性别
+ */
+ private Integer unknownSexCount;
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/excel/MetaUserGridOpiningExcel.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/excel/MetaUserGridOpiningExcel.java
new file mode 100644
index 000000000..104301f23
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/excel/MetaUserGridOpiningExcel.java
@@ -0,0 +1,80 @@
+/**
+ * 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.elink.esua.epdc.modules.user.excel;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 网格开通情况
+ *
+ * @author qu elink@elink-cn.com
+ * @since v1.0.0 2020-03-25
+ */
+@Data
+public class MetaUserGridOpiningExcel {
+
+ @Excel(name = "网格名称")
+ private String allDeptNames;
+
+ @Excel(name = "网格党建指导员姓名")
+ private String gridLeader;
+
+ @Excel(name = "用户总数")
+ private int registerCount;
+
+ @Excel(name = "党员数")
+ private int partyCount;
+
+ @Excel(name = "已注册居民")
+ private int residentCount;
+
+ @Excel(name = "未注册居民")
+ private int unAuthorizedCount;
+
+ @Excel(name = "新闻发布数")
+ private String newsCount;
+
+ @Excel(name = "社群数")
+ private int communityCount;
+
+ @Excel(name = "群成员数")
+ private int communityMemberCount;
+
+ @Excel(name = "群话题数")
+ private int communityTopicCount;
+
+ @Excel(name = "议题总数")
+ private int eventCount;
+
+ @Excel(name = "项目数")
+ private int itemCount;
+
+ @Excel(name = "项目已解决数")
+ private int itemCloseCount;
+
+ @Excel(name = "好评数")
+ private int itemPraiseCount;
+
+ @Excel(name = "更新时间", format = "yyyy-MM-dd HH:mm:ss")
+ private Date updatedTime;
+
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/excel/MetaUserPartyRankExcel.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/excel/MetaUserPartyRankExcel.java
new file mode 100644
index 000000000..7700c7b3a
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/excel/MetaUserPartyRankExcel.java
@@ -0,0 +1,70 @@
+/**
+ * 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.elink.esua.epdc.modules.user.excel;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 党员排行
+ *
+ * @author qu elink@elink-cn.com
+ * @since v1.0.0 2020-03-26
+ */
+@Data
+public class MetaUserPartyRankExcel {
+
+
+ @Excel(name = "街道名称")
+ private String streetName;
+
+ @Excel(name = "已注册党员数量(已认证)")
+ private Integer partyMemberCount;
+
+ @Excel(name = "年龄超过50岁党员数量")
+ private Integer oldCount;
+
+ @Excel(name = "老龄化比例")
+ private BigDecimal oldPercent;
+
+ @Excel(name = "年龄50岁以下的党员数量")
+ private Integer youngCount;
+
+ @Excel(name = "年轻化比例")
+ private BigDecimal youngPercent;
+
+ @Excel(name = "男")
+ private Integer maleCount;
+
+ @Excel(name = "女")
+ private Integer femaleCount;
+
+ @Excel(name = "未知性别")
+ private Integer unknownSexCount;
+
+ @Excel(name = "党员认证失败数")
+ private Integer partyAuthFailureCount;
+
+ @Excel(name = "更新时间", format = "yyyy-MM-dd HH:mm:ss")
+ private Date updatedTime;
+
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/excel/MetaUserRegisterRankExcel.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/excel/MetaUserRegisterRankExcel.java
new file mode 100644
index 000000000..7fd0c6793
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/excel/MetaUserRegisterRankExcel.java
@@ -0,0 +1,76 @@
+/**
+ * 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.elink.esua.epdc.modules.user.excel;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 用户注册排行
+ *
+ * @author qu elink@elink-cn.com
+ * @since v1.0.0 2020-03-26
+ */
+@Data
+public class MetaUserRegisterRankExcel {
+
+
+ @Excel(name = "街道名称")
+ private String streetName;
+
+ @Excel(name = "用户总数")
+ private Integer userCount;
+
+ @Excel(name = "党员数")
+ private Integer partyMemberCount;
+
+ @Excel(name = "已注册居民")
+ private Integer residentCount;
+
+ @Excel(name = "为注册居民")
+ private Integer unAuthorizedCount;
+
+ @Excel(name = "年龄超过50岁")
+ private Integer oldCount;
+
+ @Excel(name = "老龄化比例")
+ private BigDecimal oldPercent;
+
+ @Excel(name = "50岁以下用户数量")
+ private Integer youngCount;
+
+ @Excel(name = "年轻化比例")
+ private BigDecimal youngPercent;
+
+ @Excel(name = "男")
+ private Integer maleCount;
+
+ @Excel(name = "女")
+ private Integer femaleCount;
+
+ @Excel(name = "未知性别")
+ private Integer unknownSexCount;
+
+ @Excel(name = "更新时间", format = "yyyy-MM-dd HH:mm:ss")
+ private Date updatedTime;
+
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/MetaUserGridOpiningService.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/MetaUserGridOpiningService.java
new file mode 100644
index 000000000..c28bfabce
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/MetaUserGridOpiningService.java
@@ -0,0 +1,107 @@
+/**
+ * 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.elink.esua.epdc.modules.user.service;
+
+import com.elink.esua.epdc.commons.mybatis.service.BaseService;
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.dto.user.MetaUserGridOpiningDTO;
+import com.elink.esua.epdc.modules.user.entity.MetaUserGridOpiningEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 网格开通情况
+ *
+ * @author qu elink@elink-cn.com
+ * @since v1.0.0 2020-03-25
+ */
+public interface MetaUserGridOpiningService extends BaseService {
+
+ /**
+ * 默认分页
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2020-03-25
+ */
+ PageData page(Map params);
+
+ /**
+ * 默认查询
+ *
+ * @param params
+ * @return java.util.List
+ * @author generator
+ * @date 2020-03-25
+ */
+ List list(Map params);
+
+ /**
+ * 单条查询
+ *
+ * @param id
+ * @return MetaUserGridOpiningDTO
+ * @author generator
+ * @date 2020-03-25
+ */
+ MetaUserGridOpiningDTO get(String id);
+
+ /**
+ * 默认保存
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2020-03-25
+ */
+ void save(MetaUserGridOpiningDTO dto);
+
+ /**
+ * 默认更新
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2020-03-25
+ */
+ void update(MetaUserGridOpiningDTO dto);
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return void
+ * @author generator
+ * @date 2020-03-25
+ */
+ void delete(String[] ids);
+
+
+
+ /***
+ * 网格开通数据生成临时表导入
+ * @param
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author qushutong
+ * @date 2020/3/25 10:42
+ */
+ Result createUserAnalysisData();
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/MetaUserPartyRankService.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/MetaUserPartyRankService.java
new file mode 100644
index 000000000..b98990bbb
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/MetaUserPartyRankService.java
@@ -0,0 +1,105 @@
+/**
+ * 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.elink.esua.epdc.modules.user.service;
+
+import com.elink.esua.epdc.commons.mybatis.service.BaseService;
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.dto.user.MetaUserPartyRankDTO;
+import com.elink.esua.epdc.modules.user.entity.MetaUserPartyRankEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 党员排行
+ *
+ * @author qu elink@elink-cn.com
+ * @since v1.0.0 2020-03-26
+ */
+public interface MetaUserPartyRankService extends BaseService {
+
+ /**
+ * 默认分页
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2020-03-26
+ */
+ PageData page(Map params);
+
+ /**
+ * 默认查询
+ *
+ * @param params
+ * @return java.util.List
+ * @author generator
+ * @date 2020-03-26
+ */
+ List list(Map params);
+
+ /**
+ * 单条查询
+ *
+ * @param id
+ * @return MetaUserPartyRankDTO
+ * @author generator
+ * @date 2020-03-26
+ */
+ MetaUserPartyRankDTO get(String id);
+
+ /**
+ * 默认保存
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2020-03-26
+ */
+ void save(MetaUserPartyRankDTO dto);
+
+ /**
+ * 默认更新
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2020-03-26
+ */
+ void update(MetaUserPartyRankDTO dto);
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return void
+ * @author generator
+ * @date 2020-03-26
+ */
+ void delete(String[] ids);
+
+ /***
+ * 定时任务导入党员排行
+ * @param
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author qushutong
+ * @date 2020/3/26 18:23
+ */
+ Result toLeadPartyRankData();
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/MetaUserRegisterRankService.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/MetaUserRegisterRankService.java
new file mode 100644
index 000000000..82adfb5f2
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/MetaUserRegisterRankService.java
@@ -0,0 +1,105 @@
+/**
+ * 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.elink.esua.epdc.modules.user.service;
+
+import com.elink.esua.epdc.commons.mybatis.service.BaseService;
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.dto.user.MetaUserRegisterRankDTO;
+import com.elink.esua.epdc.modules.user.entity.MetaUserRegisterRankEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 用户注册排行
+ *
+ * @author qu elink@elink-cn.com
+ * @since v1.0.0 2020-03-26
+ */
+public interface MetaUserRegisterRankService extends BaseService {
+
+ /**
+ * 默认分页
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2020-03-26
+ */
+ PageData page(Map params);
+
+ /**
+ * 默认查询
+ *
+ * @param params
+ * @return java.util.List
+ * @author generator
+ * @date 2020-03-26
+ */
+ List list(Map params);
+
+ /**
+ * 单条查询
+ *
+ * @param id
+ * @return MetaUserRegisterRankDTO
+ * @author generator
+ * @date 2020-03-26
+ */
+ MetaUserRegisterRankDTO get(String id);
+
+ /**
+ * 默认保存
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2020-03-26
+ */
+ void save(MetaUserRegisterRankDTO dto);
+
+ /**
+ * 默认更新
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2020-03-26
+ */
+ void update(MetaUserRegisterRankDTO dto);
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return void
+ * @author generator
+ * @date 2020-03-26
+ */
+ void delete(String[] ids);
+
+ /***
+ * 导入用户注册
+ * @param
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author qushutong
+ * @date 2020/3/26 13:26
+ */
+ Result toLeadUserRegisterRandData();
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/UserAnalysisService.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/UserAnalysisService.java
index f2759b2e8..9f97ce3a9 100644
--- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/UserAnalysisService.java
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/UserAnalysisService.java
@@ -88,7 +88,6 @@ public interface UserAnalysisService {
GridDataTotalResultDTO selectGridDataTotal(Map params);
-
/***
* 运营数据导出用户相关
* @param exportOperationFormDTO
@@ -97,4 +96,32 @@ public interface UserAnalysisService {
* @date 2020/3/23 15:16
*/
List listExportOperationCount(ExportOperationFormDTO exportOperationFormDTO);
+
+ /***
+ * 获取所有网格
+ * @param params
+ * @return java.util.List
+ * @author qushutong
+ * @date 2020/3/25 17:22
+ */
+ List selectListGridHasMaCode(Map params);
+
+
+ /***
+ * 获取导入数据
+ * @param params
+ * @return java.util.List
+ * @author qushutong
+ * @date 2020/3/25 19:13
+ */
+ List getToLeadGridOpenings(Map params);
+
+ /***
+ * 获取导入用户排行数据
+ * @param params
+ * @return java.util.List
+ * @author qushutong
+ * @date 2020/3/26 13:32
+ */
+ List getToLeadUserRegisterRandData(Map params);
}
diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/impl/MetaUserGridOpiningServiceImpl.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/impl/MetaUserGridOpiningServiceImpl.java
new file mode 100644
index 000000000..a126d5d1e
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/impl/MetaUserGridOpiningServiceImpl.java
@@ -0,0 +1,138 @@
+/**
+ * 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.elink.esua.epdc.modules.user.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
+import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
+import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
+import com.elink.esua.epdc.commons.tools.utils.DateUtils;
+import com.elink.esua.epdc.commons.tools.utils.LocalDateUtils;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.datasources.DataSourceNames;
+import com.elink.esua.epdc.datasources.annotation.DataSource;
+import com.elink.esua.epdc.dto.user.MetaUserGridOpiningDTO;
+import com.elink.esua.epdc.dto.user.result.GridOpeningResultDTO;
+import com.elink.esua.epdc.modules.user.dao.MetaUserGridOpiningDao;
+import com.elink.esua.epdc.modules.user.entity.MetaUserGridOpiningEntity;
+import com.elink.esua.epdc.modules.user.service.MetaUserGridOpiningService;
+import com.elink.esua.epdc.modules.user.service.UserAnalysisService;
+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.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+/**
+ * 网格开通情况
+ *
+ * @author qu elink@elink-cn.com
+ * @since v1.0.0 2020-03-25
+ */
+@Service
+public class MetaUserGridOpiningServiceImpl extends BaseServiceImpl implements MetaUserGridOpiningService {
+ @Autowired
+ private UserAnalysisService userAnalysisService;
+
+ @Override
+ @DataSource(name = DataSourceNames.TWELVE)
+ public PageData page(Map params) {
+ IPage page = getPage(params);
+ List metaUserGridOpiningEntityList = getMetaUserGridOpiningEntities(params);
+ return getPageData(metaUserGridOpiningEntityList,page.getTotal(), MetaUserGridOpiningDTO.class);
+ }
+
+ private List getMetaUserGridOpiningEntities(Map params) {
+ // 获取所有网格
+ List gridOpeningResultDTOS = userAnalysisService.selectListGridHasMaCode(params);
+ List deptIdList = new ArrayList<>();
+ for(GridOpeningResultDTO item:gridOpeningResultDTOS){
+ deptIdList.add(item.getGridId());
+ }
+ SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+ params.put("deptIdList",deptIdList);
+ String time = (String) params.get("createdTime");
+ if(StringUtils.isBlank(time)){
+ String createdTime = format.format(new Date());
+ params.put("createdTime",createdTime);
+ }else {
+ String createdTime = DateUtils.dealDateFormat(time);
+ params.put("createdTime",createdTime);
+ }
+ return baseDao.pageselectListPage(params);
+ }
+
+ @Override
+ @DataSource(name = DataSourceNames.TWELVE)
+ public List list(Map params) {
+ List entityList = getMetaUserGridOpiningEntities(params);
+
+ return ConvertUtils.sourceToTarget(entityList, MetaUserGridOpiningDTO.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 MetaUserGridOpiningDTO get(String id) {
+ MetaUserGridOpiningEntity entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, MetaUserGridOpiningDTO.class);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void save(MetaUserGridOpiningDTO dto) {
+ MetaUserGridOpiningEntity entity = ConvertUtils.sourceToTarget(dto, MetaUserGridOpiningEntity.class);
+ insert(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(MetaUserGridOpiningDTO dto) {
+ MetaUserGridOpiningEntity entity = ConvertUtils.sourceToTarget(dto, MetaUserGridOpiningEntity.class);
+ updateById(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delete(String[] ids) {
+ // 逻辑删除(@TableLogic 注解)
+ baseDao.deleteBatchIds(Arrays.asList(ids));
+ }
+
+
+ @Override
+ @DataSource(name = DataSourceNames.TWELVE)
+ public Result createUserAnalysisData() {
+ List list = userAnalysisService.getToLeadGridOpenings(new HashMap<>());
+ List metaUserGridOpiningEntities = ConvertUtils.sourceToTarget(list, MetaUserGridOpiningEntity.class);
+ boolean b = insertBatch(metaUserGridOpiningEntities);
+ return b?new Result<>():new Result().error("录入失败");
+ }
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/impl/MetaUserPartyRankServiceImpl.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/impl/MetaUserPartyRankServiceImpl.java
new file mode 100644
index 000000000..5da1eb35a
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/impl/MetaUserPartyRankServiceImpl.java
@@ -0,0 +1,140 @@
+/**
+ * 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.elink.esua.epdc.modules.user.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
+import com.elink.esua.epdc.commons.tools.enums.YesOrNoEnum;
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
+import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
+import com.elink.esua.epdc.commons.tools.utils.DateUtils;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.datasources.DataSourceNames;
+import com.elink.esua.epdc.datasources.annotation.DataSource;
+import com.elink.esua.epdc.dto.user.MetaUserPartyRankDTO;
+import com.elink.esua.epdc.dto.user.result.UserDataRankResultDTO;
+import com.elink.esua.epdc.modules.user.dao.MetaUserPartyRankDao;
+import com.elink.esua.epdc.modules.user.entity.MetaUserPartyRankEntity;
+import com.elink.esua.epdc.modules.user.service.MetaUserPartyRankService;
+import com.elink.esua.epdc.modules.user.service.MetaUserRegisterRankService;
+import com.elink.esua.epdc.modules.user.service.UserAnalysisService;
+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.text.SimpleDateFormat;
+import java.util.*;
+
+/**
+ * 党员排行
+ *
+ * @author qu elink@elink-cn.com
+ * @since v1.0.0 2020-03-26
+ */
+@Service
+public class MetaUserPartyRankServiceImpl extends BaseServiceImpl implements MetaUserPartyRankService {
+
+ @Autowired
+ private UserAnalysisService userAnalysisService;
+
+ @Autowired
+ private MetaUserRegisterRankServiceImpl metaUserRegisterRankService;
+
+ @Override
+ @DataSource(name = DataSourceNames.TWELVE)
+ public PageData page(Map params) {
+ IPage page = getPage(params);
+ List metaUserRegisterRankEntities = getMetaUserPartyRankEntities(params);
+ return getPageData(metaUserRegisterRankEntities,page.getTotal(), MetaUserPartyRankDTO.class);
+ }
+
+ private List getMetaUserPartyRankEntities(Map params) {
+ // 获取权限下的街道id
+ List streetIdList = metaUserRegisterRankService.getListStreetId();
+ params.put("streetIdList",streetIdList);
+ SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+ String time = (String) params.get("createdTime");
+ if(StringUtils.isBlank(time)){
+ String createdTime = format.format(new Date());
+ params.put("createdTime",createdTime);
+ }else {
+ String createdTime = DateUtils.dealDateFormat(time);
+ params.put("createdTime",createdTime);
+ }
+ return baseDao.selectPagePartyRank(params);
+ }
+
+ @Override
+ @DataSource(name = DataSourceNames.TWELVE)
+ public List list(Map params) {
+ List entityList = getMetaUserPartyRankEntities(params);
+
+ return ConvertUtils.sourceToTarget(entityList, MetaUserPartyRankDTO.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 MetaUserPartyRankDTO get(String id) {
+ MetaUserPartyRankEntity entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, MetaUserPartyRankDTO.class);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void save(MetaUserPartyRankDTO dto) {
+ MetaUserPartyRankEntity entity = ConvertUtils.sourceToTarget(dto, MetaUserPartyRankEntity.class);
+ insert(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(MetaUserPartyRankDTO dto) {
+ MetaUserPartyRankEntity entity = ConvertUtils.sourceToTarget(dto, MetaUserPartyRankEntity.class);
+ updateById(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delete(String[] ids) {
+ // 逻辑删除(@TableLogic 注解)
+ baseDao.deleteBatchIds(Arrays.asList(ids));
+ }
+
+ @Override
+ @DataSource(name = DataSourceNames.TWELVE)
+ public Result toLeadPartyRankData() {
+ // 获取导出数据
+ Map params = new HashMap<>();
+ params.put("partyFlag", YesOrNoEnum.YES.value());
+ List toLeadUserRegisterRandData = userAnalysisService.getToLeadUserRegisterRandData(params);
+ List metaUserPartyRankEntities = ConvertUtils.sourceToTarget(toLeadUserRegisterRandData, MetaUserPartyRankEntity.class);
+ return insertBatch(metaUserPartyRankEntities)? new Result(): new Result().error("导入党员排行失败") ;
+ }
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/impl/MetaUserRegisterRankServiceImpl.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/impl/MetaUserRegisterRankServiceImpl.java
new file mode 100644
index 000000000..6d89b576e
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/impl/MetaUserRegisterRankServiceImpl.java
@@ -0,0 +1,147 @@
+/**
+ * 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.elink.esua.epdc.modules.user.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.security.user.SecurityUser;
+import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
+import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
+import com.elink.esua.epdc.commons.tools.utils.DateUtils;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.datasources.DataSourceNames;
+import com.elink.esua.epdc.datasources.annotation.DataSource;
+import com.elink.esua.epdc.dto.user.MetaUserRegisterRankDTO;
+import com.elink.esua.epdc.dto.user.result.UserDataRankResultDTO;
+import com.elink.esua.epdc.modules.user.dao.MetaUserRegisterRankDao;
+import com.elink.esua.epdc.modules.user.entity.MetaUserRegisterRankEntity;
+import com.elink.esua.epdc.modules.user.service.MetaUserRegisterRankService;
+import com.elink.esua.epdc.modules.user.service.UserAnalysisService;
+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.text.SimpleDateFormat;
+import java.util.*;
+
+/**
+ * 用户注册排行
+ *
+ * @author qu elink@elink-cn.com
+ * @since v1.0.0 2020-03-26
+ */
+@Service
+public class MetaUserRegisterRankServiceImpl extends BaseServiceImpl implements MetaUserRegisterRankService {
+
+ @Autowired
+ private UserAnalysisService userAnalysisService;
+ @Override
+ @DataSource(name = DataSourceNames.TWELVE)
+ public PageData page(Map params) {
+ IPage page = getPage(params);
+ List metaUserRegisterRankEntities = getMetaUserRegisterRankEntities(params);
+ return getPageData(metaUserRegisterRankEntities,page.getTotal(), MetaUserRegisterRankDTO.class);
+ }
+
+ private List getMetaUserRegisterRankEntities(Map params) {
+ // 获取权限下的街道id
+ List streetIdList = getListStreetId();
+ params.put("streetIdList",streetIdList);
+ SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+ String time = (String) params.get("createdTime");
+ if(StringUtils.isBlank(time)){
+ String createdTime = format.format(new Date());
+ params.put("createdTime",createdTime);
+ }else {
+ String createdTime = DateUtils.dealDateFormat(time);
+ params.put("createdTime",createdTime);
+ }
+ return baseDao.selectPageUserRegisterRank(params);
+ }
+
+ @Override
+ @DataSource(name = DataSourceNames.TWELVE)
+ public List list(Map params) {
+ List entityList = getMetaUserRegisterRankEntities(params);
+
+ return ConvertUtils.sourceToTarget(entityList, MetaUserRegisterRankDTO.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 MetaUserRegisterRankDTO get(String id) {
+ MetaUserRegisterRankEntity entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, MetaUserRegisterRankDTO.class);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void save(MetaUserRegisterRankDTO dto) {
+ MetaUserRegisterRankEntity entity = ConvertUtils.sourceToTarget(dto, MetaUserRegisterRankEntity.class);
+ insert(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(MetaUserRegisterRankDTO dto) {
+ MetaUserRegisterRankEntity entity = ConvertUtils.sourceToTarget(dto, MetaUserRegisterRankEntity.class);
+ updateById(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delete(String[] ids) {
+ // 逻辑删除(@TableLogic 注解)
+ baseDao.deleteBatchIds(Arrays.asList(ids));
+ }
+
+ @Override
+ @DataSource(name = DataSourceNames.TWELVE)
+ public Result toLeadUserRegisterRandData() {
+ // 获取导出数据
+ List toLeadUserRegisterRandData = userAnalysisService.getToLeadUserRegisterRandData(new HashMap<>());
+ // 导入数据
+ List metaUserRegisterRankEntities = ConvertUtils.sourceToTarget(toLeadUserRegisterRandData, MetaUserRegisterRankEntity.class);
+ return insertBatch(metaUserRegisterRankEntities) ? new Result():new Result().error("导入注册用户排行失败");
+ }
+
+ /***
+ * 获取当前用户拥有权限的街道id
+ * @param
+ * @return java.util.List
+ * @author qushutong
+ * @date 2020/3/26 16:57
+ */
+ public List getListStreetId() {
+ Map params = new HashMap();
+ params.put("deptIdList", SecurityUser.getUser().getDeptIdList());
+ return baseDao.selectListStreetId(params);
+ }
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/impl/UserAnalysisServiceImpl.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/impl/UserAnalysisServiceImpl.java
index 79b3bf943..274e26ca7 100644
--- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/impl/UserAnalysisServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/impl/UserAnalysisServiceImpl.java
@@ -53,7 +53,6 @@ public class UserAnalysisServiceImpl extends BaseServiceImpl listPageGridOpeningsForExport(Map params) {
params.put("deptIdList", SecurityUser.getUser().getDeptIdList());
-
List list = baseDao.selectListGridHasMaCode(params);
list = fillFieldForGridOpening(list, params);
@@ -141,6 +140,11 @@ public class UserAnalysisServiceImpl extends BaseServiceImpl page = getPage(params);
+ List list = getListUserDataRankResultDro(params);
+ return new PageData<>(list, page.getTotal());
+ }
+
+ private List getListUserDataRankResultDro(Map params) {
List list = baseDao.selectListUserDataRank(params);
if (CollUtil.isNotEmpty(list)) {
@@ -175,7 +179,7 @@ public class UserAnalysisServiceImpl extends BaseServiceImpl(list, page.getTotal());
+ return list;
}
@@ -284,7 +288,7 @@ public class UserAnalysisServiceImpl extends BaseServiceImpl listExportOperationCount(ExportOperationFormDTO exportOperationFormDTO) {
List allStreetIds = new ArrayList<>();
- for(Long[] item : exportOperationFormDTO.getAllDeptIdsShow()){
+ for (Long[] item : exportOperationFormDTO.getAllDeptIdsShow()) {
allStreetIds.add(item[0]);
}
exportOperationFormDTO.setAllStreetIds(allStreetIds);
@@ -308,11 +312,11 @@ public class UserAnalysisServiceImpl extends BaseServiceImpl enterpriseDataResultDTOS = baseDao.selectExportEnterpriseCount(exportOperationFormDTO);
//居民数
- for(int i= 0;i selectListGridHasMaCode(Map params) {
+ params.put("deptIdList", SecurityUser.getUser().getDeptIdList());
+ params.put("category", YesOrNoEnum.YES.value());
+ return baseDao.selectListGridHasMaCode(params);
+ }
+
+ @Override
+ public List getToLeadGridOpenings(Map params) {
+ params.put("category", YesOrNoEnum.YES.value());
+ List list = baseDao.selectListGridHasMaCode(params);
+ list = fillFieldForGridOpening(list, params);
+ return list;
+ }
+
+ @Override
+ public List getToLeadUserRegisterRandData(Map params) {
+ return getListUserDataRankResultDro(params);
+ }
+
+
}
diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/application-dev.yml b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/application-dev.yml
index 5a5ab6e28..8c0fcdf01 100644
--- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/application-dev.yml
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/application-dev.yml
@@ -47,6 +47,10 @@ spring:
url: jdbc:mysql://47.104.224.45:3308/esua_epdc_user?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
username: epdc
password: elink833066
+ twelve: #数据源12
+ url: jdbc:mysql://47.104.224.45:3308/esua_epdc_analysis?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+ username: epdc
+ password: elink833066
initial-size: 10
max-active: 100
min-idle: 10
diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/user/MetaUserGridOpiningDao.xml b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/user/MetaUserGridOpiningDao.xml
new file mode 100644
index 000000000..363aff585
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/user/MetaUserGridOpiningDao.xml
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SELECT
+ *
+ FROM
+ meta_epdc_user_grid_opining op
+ WHERE
+ del_flag = '0'
+
+ and op.GRID_ID in
+
+ #{deptId}
+
+
+
+ and op.CREATED_TIME like concat('%', #{createdTime}, '%')
+
+
+
+
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/user/MetaUserPartyRankDao.xml b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/user/MetaUserPartyRankDao.xml
new file mode 100644
index 000000000..fb795db24
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/user/MetaUserPartyRankDao.xml
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SELECT
+ *
+ FROM
+ meta_epdc_user_party_rank pr
+ WHERE
+ del_flag = '0'
+
+ and pr.STREET_ID = #{streetId}
+
+
+ and pr.CREATED_TIME like concat('%', #{createdTime}, '%')
+
+
+ and pr.STREET_ID in
+
+ #{streetId}
+
+
+
+
+
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/user/MetaUserRegisterRankDao.xml b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/user/MetaUserRegisterRankDao.xml
new file mode 100644
index 000000000..592c90d7c
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/user/MetaUserRegisterRankDao.xml
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SELECT
+ *
+ FROM
+ meta_epdc_user_register_rank rr
+ WHERE
+ del_flag = '0'
+
+ and rr.STREET_ID = #{streetId}
+
+
+ and rr.CREATED_TIME like concat('%', #{createdTime}, '%')
+
+
+ and rr.STREET_ID in
+
+ #{streetId}
+
+
+
+
+
+ SELECT
+ ad2.id streetId
+ FROM
+ esua_epdc_user.epdc_user uu
+ LEFT JOIN esua_epdc_admin.sys_dept ad ON uu.DEPT_ID = ad.ID
+ AND ad.type_key = 'grid_party'
+ LEFT JOIN esua_epdc_admin.sys_dept ad1 ON ad1.id = ad.pid
+ LEFT JOIN esua_epdc_admin.sys_dept ad2 ON ad2.id = ad1.pid
+ WHERE
+ uu.DEL_FLAG = '0'
+
+ and ad2.ID in
+
+ #{deptId}
+
+
+ AND ad.id IS NOT NULL
+ AND ad2.id IS NOT NULL
+ GROUP BY
+ ad2.id
+
+
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/user/UserAnalysisDao.xml b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/user/UserAnalysisDao.xml
index 76944bafb..3485a5d16 100644
--- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/user/UserAnalysisDao.xml
+++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/user/UserAnalysisDao.xml
@@ -44,6 +44,7 @@
AND uu.CREATED_TIME BETWEEN #{startTime} AND #{endTime}
+ AND ad2.id is NOT NULL
AND ad.id IS NOT NULL
) t GROUP BY t.streetId
) t1
diff --git a/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClint.java b/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClint.java
new file mode 100644
index 000000000..c0b7e2ec5
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClint.java
@@ -0,0 +1,41 @@
+package com.elink.esua.epdc.feign;
+
+import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.feign.fallback.UserFeignClintFallback;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+
+/**
+ * @author: qushutong
+ * @Date: 2020/3/25 10:20
+ * @Description: 用户数据分析
+ */
+@FeignClient(name = ServiceConstant.EPDC_ANALYSIS_SERVER, fallback = UserFeignClintFallback.class)
+public interface UserFeignClint {
+
+ /***
+ * 生成用户分析数据导入临时表
+ * @param
+ * @return void
+ * @author qushutong
+ * @date 2020/3/25 10:19
+ */
+ @GetMapping("analysis/metausergridopining/tolead")
+ Result createUserAnalysisData();
+
+ /***
+ * 用户注册排行导入数据
+ * @param
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author qushutong
+ * @date 2020/3/26 17:45
+ */
+ @GetMapping("analysis/metauserregisterrank/toLeadUserRegisterRandData")
+ Result toLeadUserRegisterRandData();
+
+
+ @GetMapping("analysis/metauserpartyrank/toLeadPartyRankData")
+ Result toLeadPartyRankData();
+
+}
diff --git a/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClintFallback.java b/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClintFallback.java
new file mode 100644
index 000000000..8a2a066dc
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClintFallback.java
@@ -0,0 +1,31 @@
+package com.elink.esua.epdc.feign.fallback;
+
+import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
+import com.elink.esua.epdc.commons.tools.utils.ModuleUtils;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.feign.UserFeignClint;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author: qushutong
+ * @Date: 2020/3/25 10:22
+ * @Description: 用户数据分析
+ */
+@Component
+public class UserFeignClintFallback implements UserFeignClint {
+
+ @Override
+ public Result createUserAnalysisData() {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "createUserAnalysisData", "");
+ }
+
+ @Override
+ public Result toLeadUserRegisterRandData() {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "toLeadUserRegisterRandData", "");
+ }
+
+ @Override
+ public Result toLeadPartyRankData() {
+ return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "toLeadPartyRankData", "");
+ }
+}
diff --git a/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/service/ScheduleJobUserService.java b/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/service/ScheduleJobUserService.java
new file mode 100644
index 000000000..b164e52a2
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/service/ScheduleJobUserService.java
@@ -0,0 +1,19 @@
+package com.elink.esua.epdc.service;
+
+/**
+ * @author: qushutong
+ * @Date: 2020/3/25 10:18
+ * @Description: 用户数据分析
+ */
+public interface ScheduleJobUserService {
+
+ /***
+ * 生成用户分析数据导入临时表
+ * @param
+ * @return void
+ * @author qushutong
+ * @date 2020/3/25 10:19
+ */
+ void createUserAnalysisData();
+
+}
diff --git a/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/service/impl/ScheduleJobUserServiceImpl.java b/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/service/impl/ScheduleJobUserServiceImpl.java
new file mode 100644
index 000000000..246f39540
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/service/impl/ScheduleJobUserServiceImpl.java
@@ -0,0 +1,29 @@
+package com.elink.esua.epdc.service.impl;
+
+import com.elink.esua.epdc.feign.UserFeignClint;
+import com.elink.esua.epdc.service.ScheduleJobUserService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author: qushutong
+ * @Date: 2020/3/25 10:15
+ * @Description: 用户数据数据分析
+ */
+@Component
+public class ScheduleJobUserServiceImpl implements ScheduleJobUserService {
+ @Autowired
+ private UserFeignClint userFeignClint;
+
+ @Override
+ public void createUserAnalysisData() {
+ // 网格开通
+ userFeignClint.createUserAnalysisData();
+ // 用户注册
+ userFeignClint.toLeadUserRegisterRandData();
+
+ // 党员排行绑
+ userFeignClint.toLeadPartyRankData();
+ }
+}
diff --git a/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/task/analysis/UserAnalysisTask.java b/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/task/analysis/UserAnalysisTask.java
new file mode 100644
index 000000000..d02458b5d
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/task/analysis/UserAnalysisTask.java
@@ -0,0 +1,18 @@
+package com.elink.esua.epdc.task.analysis;
+
+/**
+ * @author: qushutong
+ * @Date: 2020/3/25 10:04
+ * @Description: 用户分析
+ */
+public interface UserAnalysisTask {
+
+ /***
+ * 网格开通情况
+ * @param
+ * @return void
+ * @author qushutong
+ * @date 2020/3/25 10:11
+ */
+ void run(String params);
+}
diff --git a/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/task/analysis/UserAnalysisTaskImpl.java b/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/task/analysis/UserAnalysisTaskImpl.java
new file mode 100644
index 000000000..2430504cc
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/task/analysis/UserAnalysisTaskImpl.java
@@ -0,0 +1,21 @@
+package com.elink.esua.epdc.task.analysis;
+
+import com.elink.esua.epdc.service.ScheduleJobUserService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author: qushutong
+ * @Date: 2020/3/25 10:12
+ * @Description:
+ */
+@Component("UserAnalysisTask")
+public class UserAnalysisTaskImpl implements UserAnalysisTask {
+ @Autowired
+ private ScheduleJobUserService scheduleJobUserService;
+
+ @Override
+ public void run(String params) {
+ scheduleJobUserService.createUserAnalysisData();
+ }
+}