diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/TimeListResultDTO.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/TimeListResultDTO.java
new file mode 100644
index 0000000000..89aed6547c
--- /dev/null
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/TimeListResultDTO.java
@@ -0,0 +1,21 @@
+package com.epmet.commons.tools.dto.form;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/9/15 5:41 下午
+ */
+@Data
+public class TimeListResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 1482639109300981626L;
+
+ private String dateId;
+ private String weekId;
+ private String monthId;
+ private String quarterId;
+ private String yearId;
+}
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java
index 75174f4216..37abbb5878 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java
@@ -10,6 +10,7 @@ package com.epmet.commons.tools.utils;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
+import com.epmet.commons.tools.dto.form.TimeListResultDTO;
import org.apache.commons.lang3.StringUtils;
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
@@ -593,4 +594,23 @@ public class DateUtils {
}
return StrConstant.EPMETY_STR;
}
+
+ public static TimeListResultDTO getTimeList(String dateId){
+ TimeListResultDTO result = new TimeListResultDTO();
+ result.setDateId(dateId);
+ String monthId = dateId.substring(NumConstant.ZERO, NumConstant.SIX);
+ result.setMonthId(monthId);
+ result.setQuarterId(getQuarterId(monthId));
+ result.setYearId(getYearId(monthId));
+ SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");
+ try {
+ Date date = formatter.parse(dateId);
+ int weekOfYear = getWeekOfYear(date);
+ String weekId = dateId.substring(NumConstant.ZERO,NumConstant.FOUR).concat("W").concat(String.valueOf(weekOfYear));
+ result.setWeekId(weekId);
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+ return result;
+ }
}
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/constant/ExtractConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/ExtractConstant.java
new file mode 100644
index 0000000000..7bf337367d
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/ExtractConstant.java
@@ -0,0 +1,21 @@
+package com.epmet.constant;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/9/16 3:56 下午
+ */
+public interface ExtractConstant {
+
+ String PARTY = "党员";
+
+ String STRANGER = "陌生人";
+
+ String ISSUE_INFO = "查询议题信息为空";
+
+ String CREATED_TOPIC_USER_IDENTITY = "查询创建话题用户身份信息为空";
+
+ String PARENT_AGENCY_ID_LIST = "查询组织上级ID集合为空......";
+
+ String ISSUE_PROCESS = "查询查询议题process集合为空";
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/StatsConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/StatsConstant.java
new file mode 100644
index 0000000000..a5bec0da20
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/StatsConstant.java
@@ -0,0 +1,13 @@
+package com.epmet.constant;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/9/17 2:56 下午
+ */
+public interface StatsConstant {
+
+ String PARTY_INFO_LIST = "客户【%s】查询党员信息集合为空......";
+
+ String CUSTOMER_INFO_NULL = "查询所有客户ID为空";
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/DimObjectActionDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/DimObjectActionDTO.java
new file mode 100644
index 0000000000..fc179c63e9
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/DimObjectActionDTO.java
@@ -0,0 +1,91 @@
+/**
+ * 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.extract;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+
+/**
+ * 对象行为动作维度表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-09-15
+ */
+@Data
+public class DimObjectActionDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ private String id;
+
+ /**
+ * 行为code
+ */
+ private String actionCode;
+
+ /**
+ * 行为描述
+ */
+ private String actionDesc;
+
+ /**
+ * 行为类型 topic,issue,project,article,group
+ */
+ private String actionType;
+
+ /**
+ * 父级ID(本表id)
+ */
+ private String pid;
+
+ /**
+ * 删除标识
+ */
+ 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/extract/DimObjectStatusDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/DimObjectStatusDTO.java
new file mode 100644
index 0000000000..28128a83ce
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/DimObjectStatusDTO.java
@@ -0,0 +1,86 @@
+/**
+ * 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.extract;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+
+/**
+ * 对象行为状态维度表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-09-15
+ */
+@Data
+public class DimObjectStatusDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ private String id;
+
+ /**
+ * 行为code
+ */
+ private String statusCode;
+
+ /**
+ * 行为描述
+ */
+ private String statusDesc;
+
+ /**
+ * 行为类型 topic,issue,project,article,group
+ */
+ private String statusType;
+
+ /**
+ * 删除标识
+ */
+ 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/extract/FactOriginIssueLogDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactOriginIssueLogDailyDTO.java
new file mode 100644
index 0000000000..433f95177e
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactOriginIssueLogDailyDTO.java
@@ -0,0 +1,136 @@
+/**
+ * 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.extract;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+
+/**
+ * 议题记录附表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-09-14
+ */
+@Data
+public class FactOriginIssueLogDailyDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * id
+ */
+ private String id;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 网格ID
+ */
+ private String gridId;
+
+ /**
+ * 组织上级ID
+ */
+ private String pid;
+
+ /**
+ * 机关ID
+ */
+ private String agencyId;
+
+ /**
+ * 日期ID
+ */
+ private String dateId;
+
+ /**
+ * 周ID
+ */
+ private String weekId;
+
+ /**
+ * 月份ID
+ */
+ private String monthId;
+
+ /**
+ * 季度ID
+ */
+ private String quarterId;
+
+ /**
+ * 年度ID
+ */
+ private String yearId;
+
+ /**
+ * 议题ID
+ */
+ private String issueId;
+
+ /**
+ * 操作用户ID
+ */
+ private String operationUserId;
+
+ /**
+ * 动作CODE
+ */
+ private String actionCode;
+
+ /**
+ * 党员 热心居民 居民
+ */
+ private Integer isParty;
+
+ /**
+ * 删除状态,0:正常,1:删除
+ */
+ private Integer 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/extract/FactOriginIssueMainDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactOriginIssueMainDailyDTO.java
new file mode 100644
index 0000000000..a77815e3ea
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactOriginIssueMainDailyDTO.java
@@ -0,0 +1,152 @@
+/**
+ * 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.extract;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+
+/**
+ * 议题主表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-09-14
+ */
+@Data
+public class FactOriginIssueMainDailyDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 议题ID
+ */
+ private String id;
+
+ /**
+ * 日ID(指议题创建的yyyymmdd)
+ */
+ private String dateId;
+
+ /**
+ * 周ID
+ */
+ private String weekId;
+
+ /**
+ * 月份ID
+ */
+ private String monthId;
+
+ /**
+ * 季度ID
+ */
+ private String quarterId;
+
+ /**
+ * 年度ID
+ */
+ private String yearId;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 用户身份标识
+ */
+ private Integer isParty;
+
+ /**
+ * 转议题用户ID
+ */
+ private String userId;
+
+ /**
+ * 创建话题用户的ID
+ */
+ private String createTopicUserId;
+
+ /**
+ * 转为议题的话题ID
+ */
+ private String topicId;
+
+ /**
+ * 议题网格ID
+ */
+ private String gridId;
+
+ /**
+ * 上级ID
+ */
+ private String pid;
+
+ /**
+ * 议题组织ID(网格所属组织ID)
+ */
+ private String agencyId;
+
+ /**
+ * 议题状态
+ */
+ private String issueStatus;
+
+ /**
+ * 创建话题用户身份标识
+ */
+ private Integer topicUserIsParty;
+
+ /**
+ * 删除状态,0:正常,1:删除
+ */
+ private Integer delFlag;
+
+ /**
+ * 乐观锁
+ */
+ private Integer revision;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+ public FactOriginIssueMainDailyDTO() {
+ this.delFlag = 0;
+ this.revision = 0;
+ this.createdBy = "APP_USER";
+ this.updatedBy = "APP_USER";
+ }
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/ExtractFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/ExtractFormDTO.java
new file mode 100644
index 0000000000..50b3a91f5c
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/ExtractFormDTO.java
@@ -0,0 +1,25 @@
+package com.epmet.dto.extract.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/16 6:01 下午
+ */
+@Data
+public class ExtractFormDTO implements Serializable {
+
+ private static final long serialVersionUID = -6180252151765854242L;
+
+ public interface ExtractForm extends CustomerClientShowGroup{}
+
+ @NotBlank(message = "客户ID不能为空",groups = ExtractForm.class)
+ private String customerId;
+
+ @NotBlank(message = "dateId不能为空",groups = ExtractForm.class)
+ private String dateId;
+}
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/IssueInfoFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/IssueInfoFormDTO.java
new file mode 100644
index 0000000000..7ab1f8d280
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/IssueInfoFormDTO.java
@@ -0,0 +1,33 @@
+package com.epmet.dto.extract.form;
+
+import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/9/15 2:23 下午
+ */
+@Data
+@AllArgsConstructor
+public class IssueInfoFormDTO implements Serializable {
+
+ private static final long serialVersionUID = 8805754438522195653L;
+
+ public interface IssueInfo extends CustomerClientShowGroup{}
+
+ /**
+ * 客户ID
+ */
+ @NotBlank(message = "customerId",groups = IssueInfo.class)
+ private String customerId;
+
+ /**
+ * 日期ID(实际为议题创建的 "yyyymmdd" )
+ */
+ @NotBlank(message = "dateId",groups = IssueInfo.class)
+ private String dateId;
+}
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/IssueLogDailyFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/IssueLogDailyFormDTO.java
new file mode 100644
index 0000000000..4e0e26026c
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/IssueLogDailyFormDTO.java
@@ -0,0 +1,112 @@
+package com.epmet.dto.extract.form;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/9/14 5:42 下午
+ */
+@Data
+public class IssueLogDailyFormDTO implements Serializable {
+
+ private static final long serialVersionUID = 7036617958351476594L;
+
+ /**
+ * 议题ID
+ */
+ private String id;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 网格ID
+ */
+ private String gridId;
+
+ /**
+ * 组织上级ID
+ */
+ private String pid;
+
+ /**
+ * 机关ID
+ */
+ private String agencyId;
+
+ /**
+ * 议题ID
+ */
+ private String issueId;
+
+ /**
+ * 日期ID
+ */
+ private String dateId;
+
+ /**
+ * 周ID
+ */
+ private String weekId;
+
+ /**
+ * 月份ID
+ */
+ private String monthId;
+
+ /**
+ * 季度ID
+ */
+ private String quarterId;
+
+ /**
+ * 年度ID
+ */
+ private String yearId;
+
+ /**
+ * 操作用户ID
+ */
+ private String operationUserId;
+
+ /**
+ * 动作CODE
+ */
+ private String actionCode;
+
+ /**
+ * 党员 热心居民 居民
+ */
+ private Integer isParty;
+
+ /**
+ * 是否已删除(0-未删除,1-已删除)
+ */
+ private Integer delFlag;
+
+ /**
+ * 乐观锁
+ */
+ private Integer revision;
+
+ /**
+ * 创建者
+ */
+ private String createdBy;
+
+ /**
+ * 修改者
+ */
+ private String updatedBy;
+
+ public IssueLogDailyFormDTO() {
+ this.delFlag = delFlag = 0;
+ this.revision = revision = 0;
+ this.createdBy = createdBy = "APP_USER";
+ this.updatedBy = updatedBy = "APP_USER";
+ }
+}
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/IssueMainDailyFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/IssueMainDailyFormDTO.java
new file mode 100644
index 0000000000..bb7a5b5ea7
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/IssueMainDailyFormDTO.java
@@ -0,0 +1,123 @@
+package com.epmet.dto.extract.form;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/9/14 5:47 下午
+ */
+@Data
+public class IssueMainDailyFormDTO implements Serializable {
+
+ private static final long serialVersionUID = -5288003778076157611L;
+
+ /**
+ * 议题ID
+ */
+ private String id;
+
+ /**
+ * 日ID(指议题创建的yyyymmdd)
+ */
+ private String dateId;
+
+ /**
+ * 周ID
+ */
+ private String weekId;
+
+ /**
+ * 月份ID
+ */
+ private String monthId;
+
+ /**
+ * 季度ID
+ */
+ private String quarterId;
+
+ /**
+ * 年度ID
+ */
+ private String yearId;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 用户身份标识
+ */
+ private Integer isParty;
+
+ /**
+ * 转议题用户ID
+ */
+ private String userId;
+
+ /**
+ * 创建话题用户的ID
+ */
+ private String createTopicUserId;
+
+ /**
+ * 转为议题的话题ID
+ */
+ private String topicId;
+
+ /**
+ * 议题网格ID
+ */
+ private String gridId;
+
+ /**
+ * 上级ID
+ */
+ private String pid;
+
+ /**
+ * 议题组织ID(网格所属组织ID)
+ */
+ private String agencyId;
+
+ /**
+ * 议题状态
+ */
+ private String issueStatus;
+
+ /**
+ * 创建话题用户身份标识
+ */
+ private Integer topicUserIsParty;
+
+ /**
+ * 删除状态,0:正常,1:删除
+ */
+ private Integer delFlag;
+
+ /**
+ * 乐观锁
+ */
+ private Integer revision;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ public IssueMainDailyFormDTO() {
+ this.delFlag = 0;
+ this.revision = 0;
+ this.createdBy = "APP_USER";
+ this.updatedBy = "APP_USER";
+ }
+}
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/AgencyInfoResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/AgencyInfoResultDTO.java
new file mode 100644
index 0000000000..6434fd6836
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/AgencyInfoResultDTO.java
@@ -0,0 +1,25 @@
+package com.epmet.dto.extract.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/9/15 6:13 下午
+ */
+@Data
+public class AgencyInfoResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 2823049943836552367L;
+
+ /**
+ * 机关ID
+ */
+ private String agencyId;
+
+ /**
+ * 机关的父ID
+ */
+ private String pid;
+}
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/IssueInfoResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/IssueInfoResultDTO.java
new file mode 100644
index 0000000000..4dd3bcac07
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/IssueInfoResultDTO.java
@@ -0,0 +1,50 @@
+package com.epmet.dto.extract.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/9/15 2:04 下午
+ */
+@Data
+public class IssueInfoResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 3097591617162404015L;
+
+ /**
+ * 议题ID
+ */
+ private String issueId;
+
+ /**
+ * 议题状态
+ */
+ private String issueStatus;
+
+ /**
+ * 话题ID
+ */
+ private String topicId;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 网格ID
+ */
+ private String gridId;
+
+ /**
+ * 机关ID
+ */
+ private String agencyId;
+
+ /**
+ * 用户ID
+ */
+ private String userId;
+}
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/IssueProcessInfoResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/IssueProcessInfoResultDTO.java
new file mode 100644
index 0000000000..5d9bbb0cf2
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/IssueProcessInfoResultDTO.java
@@ -0,0 +1,45 @@
+package com.epmet.dto.extract.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/9/16 1:27 下午
+ */
+@Data
+public class IssueProcessInfoResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 104679947108492259L;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 网格ID
+ */
+ private String gridId;
+
+ /**
+ * 机关ID
+ */
+ private String agencyId;
+
+ /**
+ * 议题ID
+ */
+ private String issueId;
+
+ /**
+ * 动作CODE
+ */
+ private String actionCode;
+
+ /**
+ * 用户ID
+ */
+ private String userId;
+}
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/SatisfactionInfoResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/SatisfactionInfoResultDTO.java
new file mode 100644
index 0000000000..7d9f03f897
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/SatisfactionInfoResultDTO.java
@@ -0,0 +1,45 @@
+package com.epmet.dto.extract.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/9/16 5:14 下午
+ */
+@Data
+public class SatisfactionInfoResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 1194031573388458848L;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 网格ID
+ */
+ private String gridId;
+
+ /**
+ * 机关ID
+ */
+ private String agencyId;
+
+ /**
+ * 议题ID
+ */
+ private String issueId;
+
+ /**
+ * 动作CODE
+ */
+ private String actionCode;
+
+ /**
+ * 用户ID
+ */
+ private String userId;
+}
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/TopicInfoResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/TopicInfoResultDTO.java
new file mode 100644
index 0000000000..4e22a2908f
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/TopicInfoResultDTO.java
@@ -0,0 +1,21 @@
+package com.epmet.dto.extract.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/9/15 4:52 下午
+ */
+@Data
+public class TopicInfoResultDTO implements Serializable {
+
+ private static final long serialVersionUID = -5902552728088278104L;
+
+ private String topicId;
+
+ private String userId;
+
+ private Integer isParty;
+}
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/UserPartyResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/UserPartyResultDTO.java
new file mode 100644
index 0000000000..c0011ab7c0
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/UserPartyResultDTO.java
@@ -0,0 +1,19 @@
+package com.epmet.dto.extract.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/9/15 4:20 下午
+ */
+@Data
+public class UserPartyResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 6688297568032159824L;
+
+ private String userId;
+
+ private String roleName;
+}
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/GridInfoDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/GridInfoDTO.java
new file mode 100644
index 0000000000..894e6e3d7d
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/GridInfoDTO.java
@@ -0,0 +1,35 @@
+package com.epmet.dto.org;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 网格基本信息
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/9/16 14:00
+ */
+@Data
+public class GridInfoDTO implements Serializable {
+ private static final long serialVersionUID = -5328705277000477630L;
+ /**
+ * 话题所属的网格ID
+ */
+ private String gridId;
+
+ /**
+ * 所属机关ID 发布单位所属机关ID
+ */
+ private String agencyId;
+
+ /**
+ * agencyId的上一级组织id
+ */
+ private String pid;
+
+ /**
+ * 客户id
+ */
+ private String customerId;
+}
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..820d3a5447
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/form/CustomerIdAndDateIdFormDTO.java
@@ -0,0 +1,24 @@
+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{}
+
+ 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-client/src/main/java/com/epmet/dto/stats/result/GridBelongAgencyResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/result/GridBelongAgencyResultDTO.java
new file mode 100644
index 0000000000..a04c5fe2b4
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/result/GridBelongAgencyResultDTO.java
@@ -0,0 +1,30 @@
+package com.epmet.dto.stats.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/9/17 2:32 下午
+ */
+@Data
+public class GridBelongAgencyResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 6781297915444918432L;
+
+ /**
+ * 网格ID
+ */
+ private String gridId;
+
+ /**
+ * 网格所属机关ID
+ */
+ private String agencyId;
+
+ /**
+ * 机关的上级ID
+ */
+ private String parentId;
+}
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/topic/TopicOriginInfoDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/topic/TopicOriginInfoDTO.java
new file mode 100644
index 0000000000..9514d388c5
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/topic/TopicOriginInfoDTO.java
@@ -0,0 +1,82 @@
+package com.epmet.dto.topic;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 原始话题相关信息
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/9/15 18:01
+ */
+@Data
+public class TopicOriginInfoDTO implements Serializable {
+ private static final long serialVersionUID = -182136873047614269L;
+
+ /**
+ * 话题id
+ */
+ private String topicId;
+
+ /**
+ * 操作类型(发布 - discussing 、 屏蔽 - hidden、 取消屏蔽 - hidden_cancelled、 关闭话题 - closed)
+ * 补充 转议题:shift_issue 、评论话题:comment
+ */
+ private String actionCode;
+
+ /**
+ * 本条记录的操作人 resi_topic_operation.CREATED_BY
+ */
+ private String operateUserId;
+
+ /**
+ * 用户操作时间 resi_topic_operation.CREATED_TIME 对应的yyyyMMdd
+ */
+ private String dateId;
+
+ /**
+ * 用户操作时间 resi_topic_operation.CREATED_TIME 对应的yyyyMM
+ */
+ private String monthId;
+
+ /**
+ * 用户操作时间 resi_topic_operation.CREATED_TIME 对应的yyyy
+ */
+ private String yearId;
+
+ /**
+ * 用户操作时间 resi_topic_operation.CREATED_TIME
+ */
+ private Date originalBusinessTime;
+
+ /**
+ * 话题状态(讨论中 - discussing、 已屏蔽 - hidden、 已关闭 - closed)
+ */
+ private String groupId;
+
+ /**
+ * 话题的状态
+ */
+ private String topicStatus;
+
+ /**
+ * 话题关闭时的状态:已解决 resolved,未解决 unresolved
+ */
+// private String closedStatus;
+
+ /**
+ * 网格id ( 其实就是小组所属的网格id)
+ */
+ private String gridId;
+
+ /**
+ * 客户id
+ */
+ private String customerId;
+
+
+
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java
index 107bc8f478..c9ca758964 100644
--- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java
@@ -5,6 +5,7 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.StatsFormDTO;
import com.epmet.dto.group.form.GroupStatsFormDTO;
import com.epmet.dto.issue.form.IssueJobFromDTO;
+import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO;
import com.epmet.feign.impl.DataStatisticalOpenFeignClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
@@ -174,10 +175,11 @@ public interface DataStatisticalOpenFeignClient {
Result execTopicStatistical(@RequestParam(value = "date",required = false) String date);
/**
- * 处理暂停的计算
- * @return
+ * @Description 统计党员
+ * @param customerIdAndDateIdFormDTO
+ * @author zxc
+ * @date 2020/9/17 3:10 下午
*/
- @PostMapping("/data/stats/indexcalculate/process-pendding-cals")
- Result processPenddingCalculate();
-
+ @PostMapping("/data/stats/dim/statsparty")
+ Result getPartyInfo(@RequestBody CustomerIdAndDateIdFormDTO customerIdAndDateIdFormDTO);
}
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java
index 1c79cfc56b..629b2e6762 100644
--- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java
@@ -6,6 +6,7 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.StatsFormDTO;
import com.epmet.dto.group.form.GroupStatsFormDTO;
import com.epmet.dto.issue.form.IssueJobFromDTO;
+import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO;
import com.epmet.feign.DataStatisticalOpenFeignClient;
import org.springframework.stereotype.Component;
@@ -172,7 +173,7 @@ public class DataStatisticalOpenFeignClientFallBack implements DataStatisticalOp
}
@Override
- public Result processPenddingCalculate() {
- return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "processPenddingCalculate");
+ public Result getPartyInfo(CustomerIdAndDateIdFormDTO customerIdAndDateIdFormDTO) {
+ return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "getPartyInfo",customerIdAndDateIdFormDTO);
}
}
diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml
index 8ae7e84d3b..1d4a19e939 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/constant/DimObjectActionConstant.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/DimObjectActionConstant.java
new file mode 100644
index 0000000000..5476a93a1b
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/DimObjectActionConstant.java
@@ -0,0 +1,14 @@
+package com.epmet.constant;
+
+/**
+ * 对象行为动作维度表
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/9/16 10:13
+ */
+public interface DimObjectActionConstant {
+ /**
+ * 发布话题
+ */
+ String TOPIC_PUBLISH="discussing";
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/DimObjectStatusConstant.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/DimObjectStatusConstant.java
new file mode 100644
index 0000000000..5ceae84d44
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/DimObjectStatusConstant.java
@@ -0,0 +1,10 @@
+package com.epmet.constant;
+
+/**
+ * 对象行为状态维度表
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/9/16 10:14
+ */
+public interface DimObjectStatusConstant {
+}
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 360571a1e4..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
@@ -1,5 +1,6 @@
package com.epmet.controller;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.utils.DateUtils;
@@ -11,22 +12,27 @@ import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyDa
import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyDao;
import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyDao;
import com.epmet.dao.evaluationindex.screen.ScreenCustomerGridDao;
+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;
import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity;
import com.epmet.entity.stats.DimAgencyEntity;
+import com.epmet.entity.stats.DimCustomerEntity;
+import com.epmet.entity.stats.DimDateEntity;
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;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@@ -57,6 +63,24 @@ public class DemoController {
private DeptScoreService deptScoreService;
@Autowired
private IndexCalculateDistrictService indexCalculateDistrictService;
+ @Autowired
+ private GridScoreDao gridScoreDao;
+ @Autowired
+ private FactIndexPartyAblityGridMonthlyDao factIndexPartyAblityGridMonthlyDao;
+ @Autowired
+ private FactIndexGovrnAblityGridMonthlyDao factIndexGovrnAblityGridMonthlyDao;
+ @Autowired
+ private FactIndexServiceAblityGridMonthlyDao factIndexServiceAblityGridMonthlyDao;
+ @Autowired
+ private ScreenCustomerGridDao screenCustomerGridDao;
+ @Autowired
+ private CpcIndexCalculateService cpcIndexCalculateService;
+ @Autowired
+ private DimDateDao dimDateDao;
+ @Autowired
+ private DimCustomerDao dimCustomerDao;
+ @Autowired
+ private FactOriginTopicMainDailyService factOriginTopicMainDailyService;
@GetMapping("testAlarm")
public void testAlarm() {
@@ -147,19 +171,6 @@ public class DemoController {
return new Result();
}
- @Autowired
- private GridScoreDao gridScoreDao;
- @Autowired
- private FactIndexPartyAblityGridMonthlyDao factIndexPartyAblityGridMonthlyDao;
- @Autowired
- private FactIndexGovrnAblityGridMonthlyDao factIndexGovrnAblityGridMonthlyDao;
- @Autowired
- private FactIndexServiceAblityGridMonthlyDao factIndexServiceAblityGridMonthlyDao;
- @Autowired
- private ScreenCustomerGridDao screenCustomerGridDao;
- @Autowired
- private CpcIndexCalculateService cpcIndexCalculateService;
-// private static Integer testcal=100;
@PostMapping("testcal")
public Result testCal(){
@@ -487,4 +498,32 @@ public class DemoController {
c.setMonthId(monthId);
deptScoreService.calculateDeptCorreLation(c);
}
+
+
+ @PostMapping("inserttopicorigin")
+ public Result topicDataCleaning(@RequestParam("customerId") String customerId, @RequestParam("dateId")String dateId) {
+ if (StringUtils.isNotBlank(customerId) && StringUtils.isNotBlank(dateId)) {
+ factOriginTopicMainDailyService.topicCleaning(customerId,dateId);
+ }else{
+ QueryWrapper customerEntityQueryWrapper = new QueryWrapper<>();
+ List customerEntityList=dimCustomerDao.selectList(customerEntityQueryWrapper);
+ QueryWrapper wrapper = new QueryWrapper<>();
+ List dimDateEntityList= dimDateDao.selectList(wrapper);
+ for(DimCustomerEntity customerEntity:customerEntityList){
+ for(DimDateEntity dateEntity:dimDateEntityList){
+ factOriginTopicMainDailyService.topicCleaning(customerEntity.getId(),dateEntity.getId());
+ }
+ }
+ }
+ 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/controller/DimController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DimController.java
index 3318ef39a0..8796c77d71 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DimController.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DimController.java
@@ -1,8 +1,10 @@
package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.AgencySubDeptTreeDto;
import com.epmet.dto.AgencySubTreeDto;
+import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO;
import com.epmet.service.StatsDimService;
import com.epmet.service.stats.*;
import org.slf4j.Logger;
@@ -39,6 +41,9 @@ public class DimController {
@Autowired
private DimAgencyService dimAgencyService;
+ @Autowired
+ private DimCustomerPartymemberService partyMemberService;
+
/**
* 初始化所有维度
*
@@ -250,4 +255,16 @@ public class DimController {
return dimAgencyService.getTopAgencyWithDept();
}
+ /**
+ * @Description
+ * @param customerIdAndDateIdFormDTO
+ * @author zxc
+ * @date 2020/9/17 3:01 下午
+ */
+ @PostMapping("statsparty")
+ public Result getPartyInfo(@RequestBody CustomerIdAndDateIdFormDTO customerIdAndDateIdFormDTO) {
+ ValidatorUtils.validateEntity(customerIdAndDateIdFormDTO, CustomerIdAndDateIdFormDTO.CustomerIdAndDateId.class);
+ return new Result().ok(partyMemberService.statsPartyMember(customerIdAndDateIdFormDTO));
+ }
+
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactOriginController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactOriginController.java
new file mode 100644
index 0000000000..a8c2eff94f
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactOriginController.java
@@ -0,0 +1,76 @@
+package com.epmet.controller;
+
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.validator.ValidatorUtils;
+import com.epmet.dto.extract.form.ExtractFormDTO;
+import com.epmet.service.evaluationindex.extract.IssueExtractService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import com.epmet.service.evaluationindex.extract.FactOriginTopicMainDailyService;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+
+
+/**
+ * 原始数据清洗
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/9/15 11:06
+ */
+@RestController
+@RequestMapping("factorigin")
+public class FactOriginController {
+
+ @Autowired
+ private IssueExtractService issueExtractService;
+ @Autowired
+ private FactOriginTopicMainDailyService factOriginTopicMainDailyService;
+
+ /**
+ * @Description 议题抽取(main)
+ * @param extractFormDTO
+ * @author zxc
+ * @date 2020/9/15 2:02 下午
+ */
+ @PostMapping("issueextractmain")
+ public Result issueExtractMain(@RequestBody ExtractFormDTO extractFormDTO){
+ ValidatorUtils.validateEntity(extractFormDTO, ExtractFormDTO.ExtractForm.class);
+ issueExtractService.issueExtractMain(extractFormDTO);
+ return new Result();
+ }
+
+ /**
+ * @Description 议题抽取(log)
+ * @param extractFormDTO
+ * @author zxc
+ * @date 2020/9/16 9:41 上午
+ */
+ @PostMapping("issueextractlog")
+ public Result issueExtractLog(@RequestBody ExtractFormDTO extractFormDTO){
+ ValidatorUtils.validateEntity(extractFormDTO, ExtractFormDTO.ExtractForm.class);
+ issueExtractService.issueExtractLog(extractFormDTO);
+ return new Result();
+ }
+
+ /**
+ * @param customerId yyyyMMdd
+ * @param dateId yyyyMMdd
+ * @return com.epmet.commons.tools.utils.Result
+ * @author yinzuomei
+ * @description 话题 (fact_origin_topic_main_daily 话题主表_日统计 fact_origin_topic_log_daily 话题明细_日统计)
+ * @Date 2020/9/15 13:39
+ **/
+ @PostMapping("topic")
+ public Result topicDataCleaning(String customerId,String dateId) {
+ if (StringUtils.isNotBlank(customerId) && StringUtils.isNotBlank(dateId)) {
+ factOriginTopicMainDailyService.topicCleaning(customerId,dateId);
+ }
+ return new Result();
+ }
+
+
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/DimObjectActionDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/DimObjectActionDao.java
new file mode 100644
index 0000000000..090c9b9488
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/DimObjectActionDao.java
@@ -0,0 +1,33 @@
+/**
+ * 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.evaluationindex.extract;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.evaluationindex.extract.DimObjectActionEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 对象行为动作维度表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-09-15
+ */
+@Mapper
+public interface DimObjectActionDao extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/DimObjectStatusDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/DimObjectStatusDao.java
new file mode 100644
index 0000000000..012d6a15a9
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/DimObjectStatusDao.java
@@ -0,0 +1,33 @@
+/**
+ * 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.evaluationindex.extract;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.evaluationindex.extract.DimObjectStatusEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 对象行为状态维度表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-09-15
+ */
+@Mapper
+public interface DimObjectStatusDao extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueLogDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueLogDailyDao.java
new file mode 100644
index 0000000000..a98372928e
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueLogDailyDao.java
@@ -0,0 +1,54 @@
+/**
+ * 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.evaluationindex.extract;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.extract.form.IssueLogDailyFormDTO;
+import com.epmet.entity.evaluationindex.extract.FactOriginIssueLogDailyEntity;
+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-14
+ */
+@Mapper
+public interface FactOriginIssueLogDailyDao extends BaseDao {
+
+ /**
+ * @Description 议题记录附表插入
+ * @param issueLogList
+ * @author zxc
+ * @date 2020/9/14 5:53 下午
+ */
+ void insertIssueLogList(@Param("issueLogList")List issueLogList);
+
+ /**
+ * @Description 删除旧的记录
+ * @param customerId
+ * @param dateId
+ * @author zxc
+ * @date 2020/9/16 9:33 上午
+ */
+ void deleteOldLogRecord(@Param("customerId")String customerId,@Param("dateId")String dateId);
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueMainDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueMainDailyDao.java
new file mode 100644
index 0000000000..1866a593a5
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueMainDailyDao.java
@@ -0,0 +1,53 @@
+/**
+ * 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.evaluationindex.extract;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.extract.form.IssueMainDailyFormDTO;
+import com.epmet.entity.evaluationindex.extract.FactOriginIssueMainDailyEntity;
+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-14
+ */
+@Mapper
+public interface FactOriginIssueMainDailyDao extends BaseDao {
+
+ /**
+ * @Description 议题主表插入
+ * @param issueMainList
+ * @author zxc
+ * @date 2020/9/14 5:53 下午
+ */
+ void insertIssueMainList(@Param("issueMainList") List issueMainList);
+
+ /**
+ * @Description 删除旧的记录
+ * @param customerId
+ * @param dateId
+ * @author zxc
+ * @date 2020/9/16 9:33 上午
+ */
+ void deleteOldMainRecord(@Param("customerId")String customerId, @Param("dateId")String dateId);
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginTopicLogDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginTopicLogDailyDao.java
new file mode 100644
index 0000000000..ef66cc0c73
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginTopicLogDailyDao.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.epmet.dao.evaluationindex.extract;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.evaluationindex.extract.FactOriginTopicLogDailyEntity;
+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-15
+ */
+@Mapper
+public interface FactOriginTopicLogDailyDao extends BaseDao {
+ /**
+ * @return int
+ * @param customerId
+ * @param dateId
+ * @param deleteSize
+ * @author yinzuomei
+ * @description 批量删除
+ * @Date 2020/9/16 12:54
+ **/
+ int deleteByDateIdAndCustomerId(@Param("customerId") String customerId,
+ @Param("dateId") String dateId,
+ @Param("deleteSize") Integer deleteSize);
+ /**
+ * @return int
+ * @param list
+ * @author yinzuomei
+ * @description 批量插入
+ * @Date 2020/9/16 12:54
+ **/
+ int insertBatchEntity(@Param("list") List list);
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginTopicMainDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginTopicMainDailyDao.java
new file mode 100644
index 0000000000..26738dc2b3
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginTopicMainDailyDao.java
@@ -0,0 +1,57 @@
+/**
+ * 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.evaluationindex.extract;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.evaluationindex.extract.FactOriginTopicMainDailyEntity;
+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-15
+ */
+@Mapper
+public interface FactOriginTopicMainDailyDao extends BaseDao {
+
+ /**
+ * @param customerId
+ * @param dateId
+ * @param deleteSize
+ * @return int
+ * @author yinzuomei
+ * @description 批量删除
+ * @Date 2020/9/16 11:16
+ **/
+ int deleteByDateIdAndCustomerId(@Param("customerId") String customerId,
+ @Param("dateId") String dateId,
+ @Param("deleteSize") Integer deleteSize);
+
+ /**
+ * @return int
+ * @param list
+ * @author yinzuomei
+ * @description 批量插入
+ * @Date 2020/9/16 12:48
+ **/
+ int insertBatchEntity(@Param("list") List list);
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/StatsIssueDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/StatsIssueDao.java
index f09091487f..2ad3653c87 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/StatsIssueDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/StatsIssueDao.java
@@ -1,9 +1,12 @@
package com.epmet.dao.issue;
import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.extract.result.SatisfactionInfoResultDTO;
+import com.epmet.dto.extract.result.IssueProcessInfoResultDTO;
import com.epmet.dto.issue.IssueAgencyDTO;
import com.epmet.dto.issue.IssueGridDTO;
import com.epmet.dto.issue.IssueProjectDTO;
+import com.epmet.dto.extract.result.IssueInfoResultDTO;
import com.epmet.entity.issue.IssueEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -112,4 +115,39 @@ public interface StatsIssueDao extends BaseDao {
*/
List selectIssueProjectList(@Param("customerId") String customerId);
+ /**
+ * @Description 查询议题信息
+ * @param customerId
+ * @param dateId
+ * @author zxc
+ * @date 2020/9/15 2:28 下午
+ */
+ List selectIssueInfo(@Param("customerId")String customerId, @Param("dateId")String dateId);
+
+ /**
+ * @Description 查询议题process信息
+ * @param customerId
+ * @param dateId
+ * @author zxc
+ * @date 2020/9/16 1:48 下午
+ */
+ List selectIssueProcessInfo(@Param("customerId")String customerId, @Param("dateId")String dateId);
+
+ /**
+ * @Description 查询议题满意度评价信息
+ * @param customerId
+ * @param dateId
+ * @author zxc
+ * @date 2020/9/16 1:48 下午
+ */
+ List selectIssueSatisfactionInfo(@Param("customerId")String customerId, @Param("dateId")String dateId);
+
+ /**
+ * @Description 查询议题支持反对信息
+ * @param customerId
+ * @param dateId
+ * @author zxc
+ * @date 2020/9/16 1:48 下午
+ */
+ List selectIssueVoteInfo(@Param("customerId")String customerId, @Param("dateId")String dateId);
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/CustomerGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/CustomerGridDao.java
index 9f26b8b98d..b8d9093631 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/CustomerGridDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/CustomerGridDao.java
@@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.group.AgencyDTO;
import com.epmet.dto.group.result.AgencyGridTotalCountResultDTO;
import com.epmet.dto.group.result.GridIdListByCustomerResultDTO;
+import com.epmet.dto.org.GridInfoDTO;
import com.epmet.entity.org.CustomerGridEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -67,4 +68,13 @@ public interface CustomerGridDao extends BaseDao {
* @return
*/
List listUpdatedGridsByUpdateTime(@Param("startTime") Date startTime, @Param("endTime") Date endTime);
+
+ /**
+ * @return java.util.List
+ * @param customerId
+ * @author yinzuomei
+ * @description 查询客户下的网格的agencyId, 还有pid
+ * @Date 2020/9/16 14:03
+ **/
+ List selectListGridInfo(String customerId);
}
\ No newline at end of file
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/DimAgencyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimAgencyDao.java
index 8788232a7b..7e20babbeb 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimAgencyDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimAgencyDao.java
@@ -21,6 +21,7 @@ package com.epmet.dao.stats;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.AgencySubDeptTreeDto;
import com.epmet.dto.AgencySubTreeDto;
+import com.epmet.dto.extract.result.AgencyInfoResultDTO;
import com.epmet.dto.stats.DimAgencyDTO;
import com.epmet.entity.stats.DimAgencyEntity;
import org.apache.ibatis.annotations.Mapper;
@@ -126,4 +127,12 @@ public interface DimAgencyDao extends BaseDao {
DimAgencyEntity getLatestCreatedAgencyDimEntity();
DimAgencyEntity getLatestUpdatedAgencyDimEntity();
+
+ /**
+ * @Description 查询pid信息
+ * @param agencyIds
+ * @author zxc
+ * @date 2020/9/15 6:15 下午
+ */
+ List selectAgencyInfo(@Param("agencyIds")List agencyIds);
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimCustomerDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimCustomerDao.java
index 8bd2c3cf8d..12244e2076 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimCustomerDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimCustomerDao.java
@@ -49,4 +49,11 @@ public interface DimCustomerDao extends BaseDao {
DimCustomerEntity getLatestCreatedDimEntity();
DimCustomerEntity getLatestUpdatedDimEntity();
+
+ /**
+ * @Description 查询所有客户ID
+ * @author zxc
+ * @date 2020/9/17 3:30 下午
+ */
+ List getAllCustomerId();
}
\ No newline at end of file
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..afab95849a
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimCustomerPartymemberDao.java
@@ -0,0 +1,53 @@
+/**
+ * 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);
+
+ /**
+ * @Description 删除旧党员记录
+ * @param customerId
+ * @param dateId
+ * @author zxc
+ * @date 2020/9/17 2:43 下午
+ */
+ void deleteOldPartyRecord(@Param("customerId")String customerId,@Param("dateId")String dateId);
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimGridDao.java
index c1671131b1..dd2338bb69 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimGridDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimGridDao.java
@@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.group.AgencyDTO;
import com.epmet.dto.group.result.AgencyGridInfoResultDTO;
import com.epmet.dto.group.result.SubAgencyIdResultDTO;
+import com.epmet.dto.stats.result.GridBelongAgencyResultDTO;
import com.epmet.entity.stats.DimGridEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -60,4 +61,12 @@ public interface DimGridDao extends BaseDao {
List selectSubAgencyId(@Param("formDTO")List formDTO);
DimGridEntity getLastUpdatedGridDim();
+
+ /**
+ * @Description 查询网格属于哪个机关
+ * @param gridIds
+ * @author zxc
+ * @date 2020/9/17 2:34 下午
+ */
+ List selectGridBelongAgencyInfo(@Param("gridIds") List gridIds);
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/topic/TopicDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/topic/TopicDao.java
index 9244b799b1..b317ee0d7c 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/topic/TopicDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/topic/TopicDao.java
@@ -7,6 +7,8 @@ package com.epmet.dao.topic;
* @since v1.0.0 2020-05-11
*/
+import com.epmet.dto.extract.result.TopicInfoResultDTO;
+import com.epmet.dto.topic.TopicOriginInfoDTO;
import com.epmet.dto.topic.result.ResiGroupTopicResultDTO;
import com.epmet.dto.topic.result.ResiTopicOperationResultDTO;
import org.apache.ibatis.annotations.Mapper;
@@ -56,4 +58,23 @@ public interface TopicDao {
* @date 2020.06.22 11:07
**/
List selectTopicOperationRecordBetweenTimeRange(@Param("startDate")Date startDate, @Param("endDate")Date endDate);
+
+ /**
+ * @Description 查询话题创建者信息
+ * @param topicIds
+ * @author zxc
+ * @date 2020/9/15 4:55 下午
+ */
+ List selectTopicInfo(@Param("topicIds")List topicIds);
+
+ /**
+ * @return java.util.List
+ * @param customerId
+ * @param dateId yyyyMMdd
+ * @author yinzuomei
+ * @description 根据日期查询resi_topic_operation,返回当前日期这一天内所有话题相关的操作记录
+ * @Date 2020/9/15 18:14
+ **/
+ List selectListTopicOriginInfo(@Param("customerId")String customerId, @Param("dateId")String dateId);
+
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/user/UserDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/user/UserDao.java
index d96d1787e1..9e50c2d7d4 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/user/UserDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/user/UserDao.java
@@ -1,5 +1,6 @@
package com.epmet.dao.user;
+import com.epmet.dto.extract.result.UserPartyResultDTO;
import com.epmet.dto.user.result.CommonTotalAndIncCountResultDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -97,4 +98,12 @@ public interface UserDao {
* @date 2020.06.18 18:50
**/
Integer selectWarmIncrWithinTimeRange(@Param("incrUserIds")List incrUserIds,@Param("gridIds") Set gridIds,@Param("startDate")Date startDate,@Param("endDate")Date endDate);
+
+ /**
+ * @Description 查询用户是不是党员
+ * @param userIds
+ * @author zxc
+ * @date 2020/9/15 4:23 下午
+ */
+ List selectUserIsParty(@Param("userIds") List userIds);;
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/DimObjectActionEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/DimObjectActionEntity.java
new file mode 100644
index 0000000000..2cf22199a9
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/DimObjectActionEntity.java
@@ -0,0 +1,61 @@
+/**
+ * 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.evaluationindex.extract;
+
+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-15
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("dim_object_action")
+public class DimObjectActionEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 行为code
+ */
+ private String actionCode;
+
+ /**
+ * 行为描述
+ */
+ private String actionDesc;
+
+ /**
+ * 行为类型 topic,issue,project,article,group
+ */
+ private String actionType;
+
+ /**
+ * 父级ID(本表id)
+ */
+ private String pid;
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/DimObjectStatusEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/DimObjectStatusEntity.java
new file mode 100644
index 0000000000..121ff1a40e
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/DimObjectStatusEntity.java
@@ -0,0 +1,56 @@
+/**
+ * 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.evaluationindex.extract;
+
+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-15
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("dim_object_status")
+public class DimObjectStatusEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 行为code
+ */
+ private String statusCode;
+
+ /**
+ * 行为描述
+ */
+ private String statusDesc;
+
+ /**
+ * 行为类型 topic,issue,project,article,group
+ */
+ private String statusType;
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginIssueLogDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginIssueLogDailyEntity.java
new file mode 100644
index 0000000000..51f4e58c3a
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginIssueLogDailyEntity.java
@@ -0,0 +1,106 @@
+/**
+ * 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.evaluationindex.extract;
+
+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-14
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("fact_origin_issue_log_daily")
+public class FactOriginIssueLogDailyEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 网格ID
+ */
+ private String gridId;
+
+ /**
+ * 组织上级ID
+ */
+ private String pid;
+
+ /**
+ * 机关ID
+ */
+ private String agencyId;
+
+ /**
+ * 日期ID
+ */
+ private String dateId;
+
+ /**
+ * 周ID
+ */
+ private String weekId;
+
+ /**
+ * 月份ID
+ */
+ private String monthId;
+
+ /**
+ * 季度ID
+ */
+ private String quarterId;
+
+ /**
+ * 年度ID
+ */
+ private String yearId;
+
+ /**
+ * 议题ID
+ */
+ private String issueId;
+
+ /**
+ * 操作用户ID
+ */
+ private String operationUserId;
+
+ /**
+ * 动作CODE
+ */
+ private String actionCode;
+
+ /**
+ * 党员 热心居民 居民
+ */
+ private String userIdentity;
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginIssueMainDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginIssueMainDailyEntity.java
new file mode 100644
index 0000000000..a64aec4525
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginIssueMainDailyEntity.java
@@ -0,0 +1,121 @@
+/**
+ * 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.evaluationindex.extract;
+
+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-14
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("fact_origin_issue_main_daily")
+public class FactOriginIssueMainDailyEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 日ID(指议题创建的yyyymmdd)
+ */
+ private String dateId;
+
+ /**
+ * 周ID
+ */
+ private String weekId;
+
+ /**
+ * 月份ID
+ */
+ private String monthId;
+
+ /**
+ * 季度ID
+ */
+ private String quarterId;
+
+ /**
+ * 年度ID
+ */
+ private String yearId;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 用户身份标识
+ */
+ private String userIdentity;
+
+ /**
+ * 转议题用户ID
+ */
+ private String userId;
+
+ /**
+ * 创建话题用户的ID
+ */
+ private String createTopicUserId;
+
+ /**
+ * 议题ID
+ */
+ private String issueId;
+
+ /**
+ * 转为议题的话题ID
+ */
+ private String topicId;
+
+ /**
+ * 议题网格ID
+ */
+ private String gridId;
+
+ /**
+ * 上级ID
+ */
+ private String pid;
+
+ /**
+ * 议题组织ID(网格所属组织ID)
+ */
+ private String agencyId;
+
+ /**
+ * 议题状态
+ */
+ private String issueStatus;
+
+ /**
+ * 创建话题用户身份标识
+ */
+ private String topicUserIdentity;
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginTopicLogDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginTopicLogDailyEntity.java
new file mode 100644
index 0000000000..a1da41988a
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginTopicLogDailyEntity.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.epmet.entity.evaluationindex.extract;
+
+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-15
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("fact_origin_topic_log_daily")
+public class FactOriginTopicLogDailyEntity 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;
+
+ /**
+ * 业务的发生时间 格式:日期ID
+ */
+ 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 topicId;
+
+ /**
+ * 话题所属小组id
+ */
+ private String groupId;
+
+ /**
+ * 行为code 来自dim_object_action表
+ */
+ private String actionCode;
+
+ /**
+ * 本条数据操作用户Id
+ */
+ private String operateUserId;
+
+ /**
+ * 本条数据操作用户是否是党员, 1是0不是
+ */
+ private Boolean operateUserIsParty;
+
+ /**
+ * 原始业务发生时间
+ */
+ private Date originalBusinessTime;
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginTopicMainDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginTopicMainDailyEntity.java
new file mode 100644
index 0000000000..39e5304527
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginTopicMainDailyEntity.java
@@ -0,0 +1,106 @@
+/**
+ * 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.evaluationindex.extract;
+
+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-15
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("fact_origin_topic_main_daily")
+public class FactOriginTopicMainDailyEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 话题所属的网格ID
+ */
+ private String gridId;
+
+ /**
+ * 所属机关ID 发布单位所属机关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 groupId;
+
+ /**
+ * 话题状态 来自dim_object_status表
+ */
+ private String topicStatus;
+
+ /**
+ * 话题发布人id
+ */
+ private String createTopicUserId;
+
+ /**
+ * 话题发布人是否是党员:1是党员0不是。 默认0
+ */
+ private Boolean createTopicUserIsParty;
+
+}
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/Issue/IssueService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/IssueService.java
index d2a9ef721a..1ace044dc5 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/IssueService.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/IssueService.java
@@ -1,8 +1,11 @@
package com.epmet.service.Issue;
+import com.epmet.dto.extract.result.SatisfactionInfoResultDTO;
+import com.epmet.dto.extract.result.IssueProcessInfoResultDTO;
import com.epmet.dto.issue.IssueAgencyDTO;
import com.epmet.dto.issue.IssueGridDTO;
import com.epmet.dto.issue.IssueProjectDTO;
+import com.epmet.dto.extract.result.IssueInfoResultDTO;
import com.epmet.entity.issue.IssueEntity;
import java.util.List;
@@ -109,4 +112,40 @@ public interface IssueService {
* @return java.util.List
*/
List getIssueProjectList(String customerId);
+
+ /**
+ * @Description 查询议题信息
+ * @param customerId
+ * @param dateId
+ * @author zxc
+ * @date 2020/9/15 2:28 下午
+ */
+ List selectIssueInfo(String customerId,String dateId);
+
+ /**
+ * @Description 查询议题process信息
+ * @param customerId
+ * @param dateId
+ * @author zxc
+ * @date 2020/9/16 1:48 下午
+ */
+ List selectIssueProcessInfo(String customerId,String dateId);
+
+ /**
+ * @Description 查询议题满意度评价信息
+ * @param customerId
+ * @param dateId
+ * @author zxc
+ * @date 2020/9/16 1:48 下午
+ */
+ List selectIssueSatisfactionInfo(String customerId,String dateId);
+
+ /**
+ * @Description 查询议题支持反对信息
+ * @param customerId
+ * @param dateId
+ * @author zxc
+ * @date 2020/9/16 1:48 下午
+ */
+ List selectIssueVoteInfo(String customerId,String dateId);
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/IssueServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/IssueServiceImpl.java
index 25cd62b30a..9518266148 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/IssueServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/IssueServiceImpl.java
@@ -3,9 +3,12 @@ package com.epmet.service.Issue.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.issue.StatsIssueDao;
+import com.epmet.dto.extract.result.SatisfactionInfoResultDTO;
+import com.epmet.dto.extract.result.IssueProcessInfoResultDTO;
import com.epmet.dto.issue.IssueAgencyDTO;
import com.epmet.dto.issue.IssueGridDTO;
import com.epmet.dto.issue.IssueProjectDTO;
+import com.epmet.dto.extract.result.IssueInfoResultDTO;
import com.epmet.entity.issue.IssueEntity;
import com.epmet.service.Issue.IssueService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -80,4 +83,52 @@ public class IssueServiceImpl implements IssueService {
public List getIssueProjectList(String customerId) {
return statsIssueDao.selectIssueProjectList(customerId);
}
+
+ /**
+ * @Description 查询议题信息
+ * @param customerId
+ * @param dateId
+ * @author zxc
+ * @date 2020/9/15 2:28 下午
+ */
+ @Override
+ public List selectIssueInfo(String customerId,String dateId) {
+ return statsIssueDao.selectIssueInfo(customerId, dateId);
+ }
+
+ /**
+ * @Description 查询议题process信息
+ * @param customerId
+ * @param dateId
+ * @author zxc
+ * @date 2020/9/16 1:48 下午
+ */
+ @Override
+ public List selectIssueProcessInfo(String customerId, String dateId) {
+ return statsIssueDao.selectIssueProcessInfo(customerId, dateId);
+ }
+
+ /**
+ * @Description 查询议题满意度评价信息
+ * @param customerId
+ * @param dateId
+ * @author zxc
+ * @date 2020/9/16 1:48 下午
+ */
+ @Override
+ public List selectIssueSatisfactionInfo(String customerId, String dateId) {
+ return statsIssueDao.selectIssueSatisfactionInfo(customerId, dateId);
+ }
+
+ /**
+ * @Description 查询议题支持反对信息
+ * @param customerId
+ * @param dateId
+ * @author zxc
+ * @date 2020/9/16 1:48 下午
+ */
+ @Override
+ public List selectIssueVoteInfo(String customerId, String dateId) {
+ return statsIssueDao.selectIssueVoteInfo(customerId, dateId);
+ }
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactOriginTopicLogDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactOriginTopicLogDailyService.java
new file mode 100644
index 0000000000..76c118972b
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactOriginTopicLogDailyService.java
@@ -0,0 +1,35 @@
+/**
+ * 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.evaluationindex.extract;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.entity.evaluationindex.extract.FactOriginTopicLogDailyEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 话题明细_日统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-09-15
+ */
+public interface FactOriginTopicLogDailyService extends BaseService {
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactOriginTopicMainDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactOriginTopicMainDailyService.java
new file mode 100644
index 0000000000..cb68dadf3c
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactOriginTopicMainDailyService.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.epmet.service.evaluationindex.extract;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.dto.topic.TopicOriginInfoDTO;
+import com.epmet.entity.evaluationindex.extract.FactOriginTopicMainDailyEntity;
+
+import java.util.List;
+
+
+/**
+ * 话题主表_日统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-09-15
+ */
+public interface FactOriginTopicMainDailyService extends BaseService {
+
+ /**
+ * @return void
+ * @param customerId 客户id
+ * @param dateId yyyyMMdd
+ * @author yinzuomei 数据采集:话题本身
+ * @description fact_origin_topic_log_daily 话题明细_日统计 fact_origin_topic_main_daily 话题主表_日统计
+ * @Date 2020/9/15 13:40
+ **/
+ Boolean topicCleaning(String customerId, String dateId);
+
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/IssueExtractService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/IssueExtractService.java
new file mode 100644
index 0000000000..4d05ba19d7
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/IssueExtractService.java
@@ -0,0 +1,26 @@
+package com.epmet.service.evaluationindex.extract;
+
+import com.epmet.dto.extract.form.ExtractFormDTO;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/9/14 5:07 下午
+ */
+public interface IssueExtractService {
+
+ /**
+ * @Description 议题抽取(main)
+ * @param extractFormDTO
+ * @author zxc
+ * @date 2020/9/15 2:02 下午
+ */
+ Boolean issueExtractMain(ExtractFormDTO extractFormDTO);
+
+ /**
+ * @Description 议题抽取(log)
+ * @param extractFormDTO
+ * @author zxc
+ * @date 2020/9/16 9:41 上午
+ */
+ Boolean issueExtractLog(ExtractFormDTO extractFormDTO);
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginTopicLogDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginTopicLogDailyServiceImpl.java
new file mode 100644
index 0000000000..b95bc36cb7
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginTopicLogDailyServiceImpl.java
@@ -0,0 +1,36 @@
+/**
+ * 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.evaluationindex.extract.impl;
+
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.dao.evaluationindex.extract.FactOriginTopicLogDailyDao;
+import com.epmet.entity.evaluationindex.extract.FactOriginTopicLogDailyEntity;
+import com.epmet.service.evaluationindex.extract.FactOriginTopicLogDailyService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 话题明细_日统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-09-15
+ */
+@Service
+public class FactOriginTopicLogDailyServiceImpl extends BaseServiceImpl implements FactOriginTopicLogDailyService {
+
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginTopicMainDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginTopicMainDailyServiceImpl.java
new file mode 100644
index 0000000000..6b4c2391fd
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginTopicMainDailyServiceImpl.java
@@ -0,0 +1,226 @@
+/**
+ * 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.evaluationindex.extract.impl;
+
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.commons.tools.constant.NumConstant;
+import com.epmet.commons.tools.exception.RenException;
+import com.epmet.commons.tools.utils.ConvertUtils;
+import com.epmet.commons.tools.utils.DateUtils;
+import com.epmet.constant.DimObjectActionConstant;
+import com.epmet.constant.IndexCalConstant;
+import com.epmet.dao.evaluationindex.extract.FactOriginTopicLogDailyDao;
+import com.epmet.dao.evaluationindex.extract.FactOriginTopicMainDailyDao;
+import com.epmet.dto.org.GridInfoDTO;
+import com.epmet.dto.topic.TopicOriginInfoDTO;
+import com.epmet.entity.evaluationindex.extract.FactOriginTopicLogDailyEntity;
+import com.epmet.entity.evaluationindex.extract.FactOriginTopicMainDailyEntity;
+import com.epmet.service.evaluationindex.extract.FactOriginTopicMainDailyService;
+import com.epmet.service.org.CustomerGridService;
+import com.epmet.service.topic.TopicService;
+import com.epmet.service.user.UserService;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.ListUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+
+/**
+ * 话题主表_日统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-09-15
+ */
+@Slf4j
+@Service
+public class FactOriginTopicMainDailyServiceImpl extends BaseServiceImpl implements FactOriginTopicMainDailyService {
+ @Autowired
+ private TopicService topicService;
+ @Autowired
+ private CustomerGridService customerGridService;
+ @Autowired
+ private FactOriginTopicLogDailyDao factOriginTopicLogDailyDao;
+ @Autowired
+ private UserService userService;
+ /**
+ * @param customerId 客户id
+ * @param dateId yyyyMMdd
+ * @return void
+ * @author yinzuomei 数据采集:话题本身
+ * @description fact_origin_topic_log_daily 话题明细_日统计 fact_origin_topic_main_daily 话题主表_日统计
+ * @Date 2020/9/15 13:40
+ **/
+ @Override
+ public Boolean topicCleaning(String customerId, String dateId) {
+ List topicOriginInfoList = topicService.queryTopicOriginInfoList(customerId, dateId);
+ if (CollectionUtils.isEmpty(topicOriginInfoList)) {
+ log.info(String.format("customerId%s,dateId%s,doesn't have any topic operation record",customerId,dateId));
+ return true;
+ }
+ Map gridMap=getGridInfoMap(customerId);
+ Map map=this.constructFactOriginData(topicOriginInfoList,gridMap);
+ List mainDailyEntityList= (List) map.get("main");
+ List logDailyEntityList= (List) map.get("log");
+ //删除之前统计的数据
+ deleteFactOriginData(customerId,dateId);
+ //批量保存主表
+ saveFactOriginTopicMainDailyEntity(mainDailyEntityList);
+ //批量保存明细表
+ saveFactOriginTopicLogDailyEntity(logDailyEntityList);
+ return true;
+ }
+
+ private Map getGridInfoMap(String customerId) {
+ Map map=new HashMap<>();
+ List list=customerGridService.queryGridInfoList(customerId);
+ if(!CollectionUtils.isEmpty(list)){
+ return list.stream().collect(Collectors.toMap(GridInfoDTO::getGridId, gridInfoDTO -> gridInfoDTO));
+ }
+ return map;
+ }
+
+
+ /**
+ * @return void
+ * @param mainDailyEntityList
+ * @author yinzuomei
+ * @description 批量插入 fact_origin_topic_main_daily
+ * @Date 2020/9/16 11:21
+ **/
+ private void saveFactOriginTopicMainDailyEntity(List mainDailyEntityList) {
+ //批量插入
+ List> partition = ListUtils.partition(mainDailyEntityList, IndexCalConstant.INSERT_SIZE);
+ partition.forEach(list -> {
+ baseDao.insertBatchEntity(list);
+ });
+ }
+
+ /**
+ * @return void
+ * @param logDailyEntityList
+ * @author yinzuomei
+ * @description 批量插入fact_origin_topic_log_daily
+ * @Date 2020/9/16 12:53
+ **/
+ private void saveFactOriginTopicLogDailyEntity(List logDailyEntityList) {
+ //批量插入
+ List> partition = ListUtils.partition(logDailyEntityList, IndexCalConstant.INSERT_SIZE);
+ partition.forEach(list -> {
+ factOriginTopicLogDailyDao.insertBatchEntity(list);
+ });
+ }
+
+ /**
+ * @return java.util.Map
+ * @param topicOriginInfoList
+ * @author yinzuomei
+ * @description 构造好要插入的数据
+ * @Date 2020/9/16 11:21
+ **/
+ private Map constructFactOriginData(List topicOriginInfoList,Map gridMap) {
+ Map map=new HashMap<>();
+ List mainDailyEntityList=new ArrayList<>();
+ List logDailyEntityList=new ArrayList<>();
+ List userIds = topicOriginInfoList.stream().map(topic -> topic.getOperateUserId()).distinct().collect(Collectors.toList());
+ Map userIsPartyMap = userService.selectUserIsParty(userIds);
+ for(TopicOriginInfoDTO topicOriginInfoDTO:topicOriginInfoList){
+ GridInfoDTO gridInfoDTO=gridMap.get(topicOriginInfoDTO.getGridId());
+ if(null==gridInfoDTO){
+ log.error("没有找到 gridId="+topicOriginInfoDTO.getGridId()+" 的基本信息");
+// continue;
+ throw new RenException("xxxxxx");
+ }
+ // 一年的第几周
+ String weekId = DateUtils.format(topicOriginInfoDTO.getOriginalBusinessTime(), DateUtils.DATE_PATTERN_YYYY).concat("W").concat(String.valueOf(DateUtils.getWeekOfYear(topicOriginInfoDTO.getOriginalBusinessTime())));
+ String quarterId=DateUtils.getQuarterId(topicOriginInfoDTO.getMonthId());
+ if(DimObjectActionConstant.TOPIC_PUBLISH.equals(topicOriginInfoDTO.getActionCode())){
+ //如果是新发布的话题需要插入主表
+ FactOriginTopicMainDailyEntity mainDailyEntity=ConvertUtils.sourceToTarget(topicOriginInfoDTO, FactOriginTopicMainDailyEntity.class);
+ mainDailyEntity.setId(topicOriginInfoDTO.getTopicId());
+ mainDailyEntity.setWeekId(weekId);
+ mainDailyEntity.setQuarterId(quarterId);
+ mainDailyEntity.setCreateTopicUserId(topicOriginInfoDTO.getOperateUserId());
+ //网格所属的组织id
+ mainDailyEntity.setAgencyId(gridInfoDTO.getAgencyId());
+ //网格的上上级组织id=街道id
+ mainDailyEntity.setPid(gridInfoDTO.getPid());
+ //TODO
+ //话题发布人是否是党员:1是党员0不是。 默认0
+ if (null != userIsPartyMap && null != userIsPartyMap.get(topicOriginInfoDTO.getOperateUserId())) {
+ mainDailyEntity.setCreateTopicUserIsParty(userIsPartyMap.get(topicOriginInfoDTO.getOperateUserId()) == NumConstant.ONE ? true : false);
+ } else {
+ mainDailyEntity.setCreateTopicUserIsParty(false);
+ }
+
+ mainDailyEntityList.add(mainDailyEntity);
+ }
+ FactOriginTopicLogDailyEntity logDailyEntity= ConvertUtils.sourceToTarget(topicOriginInfoDTO, FactOriginTopicLogDailyEntity.class);
+ logDailyEntity.setCustomerId(topicOriginInfoDTO.getCustomerId());
+ logDailyEntity.setGridId(topicOriginInfoDTO.getGridId());
+ logDailyEntity.setWeekId(weekId);
+ logDailyEntity.setQuarterId(quarterId);
+ logDailyEntity.setAgencyId(gridInfoDTO.getAgencyId());
+ logDailyEntity.setPid(gridInfoDTO.getPid());
+ //TODO
+ if (null != userIsPartyMap && null != userIsPartyMap.get(topicOriginInfoDTO.getOperateUserId())) {
+ logDailyEntity.setOperateUserIsParty(userIsPartyMap.get(topicOriginInfoDTO.getOperateUserId()) == NumConstant.ONE ? true : false);
+ } else {
+ logDailyEntity.setOperateUserIsParty(false);
+ }
+ logDailyEntityList.add(logDailyEntity);
+ }
+ map.put("main",mainDailyEntityList);
+ map.put("log",logDailyEntityList);
+ return map;
+ }
+
+ /**
+ * @return void
+ * @param customerId
+ * @param dateId
+ * @author yinzuomei
+ * @description 删除之前统计过的数据
+ * @Date 2020/9/16 11:21
+ **/
+ private void deleteFactOriginData(String customerId, String dateId) {
+ int mainDeleteNum;
+ do {
+ //一次删除50条
+ mainDeleteNum = baseDao.deleteByDateIdAndCustomerId(customerId,
+ dateId,
+ IndexCalConstant.DELETE_SIZE);
+ } while (mainDeleteNum > NumConstant.ZERO);
+ int logDeleteNum;
+ do {
+ //一次删除50条
+ logDeleteNum = factOriginTopicLogDailyDao.deleteByDateIdAndCustomerId(customerId,
+ dateId,
+ IndexCalConstant.DELETE_SIZE);
+ } while (logDeleteNum > NumConstant.ZERO);
+ }
+
+
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/IssueExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/IssueExtractServiceImpl.java
new file mode 100644
index 0000000000..d277675b03
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/IssueExtractServiceImpl.java
@@ -0,0 +1,243 @@
+package com.epmet.service.evaluationindex.extract.impl;
+
+import com.epmet.commons.tools.dto.form.TimeListResultDTO;
+import com.epmet.commons.tools.exception.RenException;
+import com.epmet.commons.tools.utils.ConvertUtils;
+import com.epmet.commons.tools.utils.DateUtils;
+import com.epmet.constant.ExtractConstant;
+import com.epmet.dao.evaluationindex.extract.FactOriginIssueLogDailyDao;
+import com.epmet.dao.evaluationindex.extract.FactOriginIssueMainDailyDao;
+import com.epmet.dao.stats.DimAgencyDao;
+import com.epmet.dto.extract.form.ExtractFormDTO;
+import com.epmet.dto.extract.form.IssueLogDailyFormDTO;
+import com.epmet.dto.extract.form.IssueMainDailyFormDTO;
+import com.epmet.dto.extract.result.SatisfactionInfoResultDTO;
+import com.epmet.dto.extract.result.AgencyInfoResultDTO;
+import com.epmet.dto.extract.result.IssueInfoResultDTO;
+import com.epmet.dto.extract.result.IssueProcessInfoResultDTO;
+import com.epmet.dto.extract.result.TopicInfoResultDTO;
+import com.epmet.service.Issue.IssueService;
+import com.epmet.service.evaluationindex.extract.IssueExtractService;
+import com.epmet.service.topic.TopicService;
+import com.epmet.service.user.UserService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
+
+import javax.validation.constraints.NotBlank;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/9/14 5:08 下午
+ */
+@Service
+@Slf4j
+public class IssueExtractServiceImpl implements IssueExtractService {
+
+ @Autowired
+ private FactOriginIssueMainDailyDao issueMainDailyDao;
+ @Autowired
+ private IssueService issueService;
+ @Autowired
+ private UserService userService;
+ @Autowired
+ private TopicService topicService;
+ @Autowired
+ private DimAgencyDao dimAgencyDao;
+ @Autowired
+ private FactOriginIssueLogDailyDao issueLogDailyDao;
+
+ /**
+ * @Description 议题抽取
+ * @param extractFormDTO
+ * @author zxc
+ * @date 2020/9/15 2:02 下午
+ */
+ @Override
+ public Boolean issueExtractMain(ExtractFormDTO extractFormDTO) {
+ String customerId = extractFormDTO.getCustomerId();
+ String dateId = extractFormDTO.getDateId();
+ // 1. 议题信息查询
+ List listResult = issueService.selectIssueInfo(customerId, dateId);
+ List result = new ArrayList<>();
+ if (CollectionUtils.isEmpty(listResult)){
+ throw new RenException(ExtractConstant.ISSUE_INFO);
+ }
+ listResult.forEach(issue -> {
+ IssueMainDailyFormDTO issueMainDailyFormDTO = ConvertUtils.sourceToTarget(issue, IssueMainDailyFormDTO.class);
+ issueMainDailyFormDTO.setId(issue.getIssueId());
+ result.add(issueMainDailyFormDTO);
+ });
+
+ // 2. 创建议题人ID
+ List userIds = listResult.stream().map(issue -> issue.getUserId()).distinct().collect(Collectors.toList());
+ Map map = userService.selectUserIsParty(userIds);
+ if (null != map){
+ result.forEach(r -> {
+ map.forEach((userId,isParty) -> {
+ if (r.getUserId().equals(userId)){
+ r.setIsParty(isParty);
+ }
+ });
+ });
+ }
+ // 3. 创建话题用户身份信息查询
+ List topicIds = listResult.stream().map(issue -> issue.getTopicId()).collect(Collectors.toList());
+ List topicInfoList = topicService.selectTopicInfo(topicIds);
+ if (CollectionUtils.isEmpty(topicInfoList)){
+ throw new RenException(ExtractConstant.CREATED_TOPIC_USER_IDENTITY);
+ }
+ List createTopicUserIds = topicInfoList.stream().map(topic -> topic.getUserId()).distinct().collect(Collectors.toList());
+ Map topicUserIsParty = userService.selectUserIsParty(createTopicUserIds);
+ topicInfoList.forEach(topic -> {
+ topicUserIsParty.forEach((userId,isParty) -> {
+ if (topic.getUserId().equals(userId)){
+ topic.setIsParty(isParty);
+ }
+ });
+ });
+ // 4. 根据dateId赋值
+ TimeListResultDTO timeList = DateUtils.getTimeList(dateId);
+ result.forEach(r -> {
+ r.setDateId(dateId);
+ r.setWeekId(timeList.getWeekId());
+ r.setMonthId(timeList.getMonthId());
+ r.setQuarterId(timeList.getQuarterId());
+ r.setYearId(timeList.getYearId());
+ topicInfoList.forEach(topic -> {
+ if (r.getTopicId().equals(topic.getTopicId())){
+ r.setCreateTopicUserId(topic.getUserId());
+ r.setTopicUserIsParty(topic.getIsParty());
+ }
+ });
+ });
+ // 5. 查询pid
+ List agencyIds = result.stream().map(r -> r.getAgencyId()).distinct().collect(Collectors.toList());
+ List agencyInfoList = dimAgencyDao.selectAgencyInfo(agencyIds);
+ if (CollectionUtils.isEmpty(agencyInfoList)){
+ throw new RenException(ExtractConstant.PARENT_AGENCY_ID_LIST);
+ }
+ result.forEach(r -> {
+ agencyInfoList.forEach(pid -> {
+ if (r.getAgencyId().equals(pid.getAgencyId())){
+ r.setPid(pid.getPid());
+ }
+ });
+ });
+ delAndInsertMain(customerId,dateId,result);
+ return true;
+ }
+
+ /**
+ * @Description 议题主表删除插入
+ * @param customerId
+ * @param dateId
+ * @param result
+ * @author zxc
+ * @date 2020/9/16 3:32 下午
+ */
+ @Transactional(rollbackFor = Exception.class)
+ public void delAndInsertMain(String customerId,String dateId,List result){
+ issueMainDailyDao.deleteOldMainRecord(customerId, dateId);
+ issueMainDailyDao.insertIssueMainList(result);
+ }
+
+ /**
+ * @Description 议题抽取(log)
+ * @param extractFormDTO
+ * @author zxc
+ * @date 2020/9/16 9:41 上午
+ */
+ @Override
+ public Boolean issueExtractLog(ExtractFormDTO extractFormDTO) {
+ String customerId = extractFormDTO.getCustomerId();
+ String dateId = extractFormDTO.getDateId();
+ List result = new ArrayList<>();
+ // 1. 查询议题process
+ List listResult = issueService.selectIssueProcessInfo(customerId, dateId);
+ if (CollectionUtils.isEmpty(listResult)){
+ throw new RenException(ExtractConstant.ISSUE_PROCESS);
+ }
+ listResult.forEach(issueProcess -> {
+ IssueLogDailyFormDTO issueLogDailyFormDTO = ConvertUtils.sourceToTarget(issueProcess, IssueLogDailyFormDTO.class);
+ issueLogDailyFormDTO.setOperationUserId(issueProcess.getUserId());
+ result.add(issueLogDailyFormDTO);
+ });
+
+ // 2. 查询议题满意度
+ List satisfactionInfoList = issueService.selectIssueSatisfactionInfo(customerId, dateId);
+ if (!CollectionUtils.isEmpty(satisfactionInfoList)){
+ satisfactionInfoList.forEach(s -> {
+ IssueLogDailyFormDTO issueLogDailyFormDTO = ConvertUtils.sourceToTarget(s, IssueLogDailyFormDTO.class);
+ issueLogDailyFormDTO.setOperationUserId(s.getUserId());
+ result.add(issueLogDailyFormDTO);
+ });
+ }
+
+ // 3. 查询议题支持反对
+ List voteInfoList = issueService.selectIssueVoteInfo(customerId, dateId);
+ if (!CollectionUtils.isEmpty(voteInfoList)){
+ voteInfoList.forEach(v -> {
+ IssueLogDailyFormDTO issueLogDailyFormDTO = ConvertUtils.sourceToTarget(v, IssueLogDailyFormDTO.class);
+ issueLogDailyFormDTO.setOperationUserId(v.getUserId());
+ result.add(issueLogDailyFormDTO);
+ });
+ }
+
+ // 4. 动作操作人的身份标识是否是党员
+ List userIds = listResult.stream().map(issue -> issue.getUserId()).distinct().collect(Collectors.toList());
+ Map map = userService.selectUserIsParty(userIds);
+ if (null != map){
+ result.forEach(r -> {
+ map.forEach((userId,isParty) -> {
+ if (r.getOperationUserId().equals(userId)){
+ r.setIsParty(isParty);
+ }
+ });
+ });
+ }
+
+ // 5. 上级ID
+ List agencyIds = listResult.stream().map(process -> process.getAgencyId()).distinct().collect(Collectors.toList());
+ List agencyInfoList = dimAgencyDao.selectAgencyInfo(agencyIds);
+ if (CollectionUtils.isEmpty(agencyInfoList)){
+ throw new RenException(ExtractConstant.PARENT_AGENCY_ID_LIST);
+ }
+ TimeListResultDTO timeList = DateUtils.getTimeList(dateId);
+ result.forEach(r -> {
+ r.setDateId(dateId);
+ r.setWeekId(timeList.getWeekId());
+ r.setMonthId(timeList.getMonthId());
+ r.setQuarterId(timeList.getQuarterId());
+ r.setYearId(timeList.getYearId());
+ agencyInfoList.forEach(agency -> {
+ if (r.getAgencyId().equals(agency.getAgencyId())){
+ r.setPid(agency.getPid());
+ }
+ });
+ });
+ delAndInsertLog(customerId,dateId,result);
+ return true;
+ }
+
+ /**
+ * @Description 议题附表删除插入
+ * @param customerId
+ * @param dateId
+ * @param result
+ * @author zxc
+ * @date 2020/9/16 3:32 下午
+ */
+ @Transactional(rollbackFor = Exception.class)
+ public void delAndInsertLog(String customerId,String dateId,List result){
+ issueLogDailyDao.deleteOldLogRecord(customerId, dateId);
+ issueLogDailyDao.insertIssueLogList(result);
+ }
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerGridService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerGridService.java
index b2b7a5b129..2cdee8ccad 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerGridService.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerGridService.java
@@ -3,6 +3,7 @@ package com.epmet.service.org;
import com.epmet.dto.group.AgencyDTO;
import com.epmet.dto.group.result.AgencyGridTotalCountResultDTO;
import com.epmet.dto.group.result.GridIdListByCustomerResultDTO;
+import com.epmet.dto.org.GridInfoDTO;
import com.epmet.entity.org.CustomerGridEntity;
import java.util.Date;
@@ -40,4 +41,13 @@ public interface CustomerGridService {
* @return
*/
List listUpdatedGridsByUpdateTime(Date lastInitTime, Date now);
+
+ /**
+ * @return java.util.List
+ * @param customerId
+ * @author yinzuomei
+ * @description 查询客户下的网格的agencyId, 还有pid
+ * @Date 2020/9/16 14:02
+ **/
+ List queryGridInfoList(String customerId);
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerGridServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerGridServiceImpl.java
index 5bab5596a7..fa8018e1e1 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerGridServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerGridServiceImpl.java
@@ -6,6 +6,7 @@ import com.epmet.dao.org.CustomerGridDao;
import com.epmet.dto.group.AgencyDTO;
import com.epmet.dto.group.result.AgencyGridTotalCountResultDTO;
import com.epmet.dto.group.result.GridIdListByCustomerResultDTO;
+import com.epmet.dto.org.GridInfoDTO;
import com.epmet.entity.org.CustomerGridEntity;
import com.epmet.service.org.CustomerGridService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -51,4 +52,16 @@ public class CustomerGridServiceImpl implements CustomerGridService {
public List listUpdatedGridsByUpdateTime(Date lastInitTime, Date now) {
return customerGridDao.listUpdatedGridsByUpdateTime(lastInitTime, now);
}
+
+ /**
+ * @param customerId
+ * @return java.util.List
+ * @author yinzuomei
+ * @description 查询客户下的网格的agencyId, 还有pid
+ * @Date 2020/9/16 14:02
+ **/
+ @Override
+ public List queryGridInfoList(String customerId) {
+ return customerGridDao.selectListGridInfo(customerId);
+ }
}
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/DimCustomerService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimCustomerService.java
index 9d53593957..5a02299b44 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimCustomerService.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimCustomerService.java
@@ -116,4 +116,11 @@ public interface DimCustomerService extends BaseService {
DimCustomerEntity getLatestCreatedDimEntity();
DimCustomerEntity getLatestUpdatedDimEntity();
+
+ /**
+ * @Description 查询所有客户ID
+ * @author zxc
+ * @date 2020/9/17 3:30 下午
+ */
+ List getAllCustomerId();
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimGridService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimGridService.java
index b937efdf9e..399781d3d3 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimGridService.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimGridService.java
@@ -23,6 +23,7 @@ import com.epmet.dto.group.AgencyDTO;
import com.epmet.dto.group.result.AgencyGridInfoResultDTO;
import com.epmet.dto.group.result.SubAgencyIdResultDTO;
import com.epmet.dto.stats.DimGridDTO;
+import com.epmet.dto.stats.result.GridBelongAgencyResultDTO;
import com.epmet.entity.stats.DimGridEntity;
import com.epmet.entity.stats.LastExecRecordEntity;
@@ -129,4 +130,12 @@ public interface DimGridService extends BaseService {
List selectSubAgencyId(List formDTO);
DimGridEntity getLastUpdatedGridDim();
+
+ /**
+ * @Description 查询网格属于哪个机关
+ * @param gridIds
+ * @author zxc
+ * @date 2020/9/17 2:34 下午
+ */
+ List selectGridBelongAgencyInfo(List gridIds);
}
\ 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..69f09d0ce0
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerPartymemberServiceImpl.java
@@ -0,0 +1,174 @@
+/**
+ * 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.dto.form.TimeListResultDTO;
+import com.epmet.commons.tools.exception.RenException;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.utils.ConvertUtils;
+import com.epmet.commons.tools.constant.FieldConstant;
+import com.epmet.commons.tools.utils.DateUtils;
+import com.epmet.constant.StatsConstant;
+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.dto.stats.result.GridBelongAgencyResultDTO;
+import com.epmet.entity.stats.DimCustomerPartymemberEntity;
+import com.epmet.service.partymember.PartyMemberService;
+import com.epmet.service.stats.DimCustomerPartymemberService;
+import com.epmet.service.stats.DimCustomerService;
+import com.epmet.service.stats.DimGridService;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * 党员维度表
+ *
+ * @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;
+ @Autowired
+ private DimGridService dimGridService;
+ @Autowired
+ private DimCustomerService dimCustomerService;
+
+ @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) {
+
+ List allCustomerId = dimCustomerService.getAllCustomerId();
+ if (CollectionUtils.isEmpty(allCustomerId)){
+ throw new RenException(StatsConstant.CUSTOMER_INFO_NULL);
+ }
+ allCustomerId.forEach(customerId -> {
+ String dateId = customerIdAndDateIdFormDTO.getDateId();
+ List partyMemberList = partyMemberService.selectPartyMemberInfo(customerId, dateId);
+ if (CollectionUtils.isEmpty(partyMemberList)){
+ throw new RenException(String.format(StatsConstant.PARTY_INFO_LIST,customerId));
+ }
+ List gridIds = partyMemberList.stream().map(party -> party.getGridId()).distinct().collect(Collectors.toList());
+ List agencyInfos = dimGridService.selectGridBelongAgencyInfo(gridIds);
+ TimeListResultDTO timeList = DateUtils.getTimeList(dateId);
+ partyMemberList.forEach(party -> {
+ BeanUtils.copyProperties(timeList,party);
+ agencyInfos.forEach(agency -> {
+ if (party.getGridId().equals(agency.getGridId())){
+ party.setAgencyId(agency.getAgencyId());
+ party.setParentId(agency.getParentId());
+ }
+ });
+ });
+ delAndInsertParty(partyMemberList,customerId,dateId);
+ });
+ return true;
+ }
+
+ /**
+ * @Description 删除旧纪录,插入新纪录
+ * @param partyMemberList
+ * @param customerId
+ * @param dateId
+ * @author zxc
+ * @date 2020/9/17 2:46 下午
+ */
+ @Transactional(rollbackFor = Exception.class)
+ public void delAndInsertParty(List partyMemberList,String customerId,String dateId){
+ if (!CollectionUtils.isEmpty(partyMemberList)){
+ partyMemberDao.deleteOldPartyRecord(customerId, dateId);
+ partyMemberDao.insertPartyMemberInfo(partyMemberList);
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerServiceImpl.java
index cd5a1bad1d..367b06629b 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerServiceImpl.java
@@ -159,4 +159,14 @@ public class DimCustomerServiceImpl extends BaseServiceImpl getAllCustomerId() {
+ return baseDao.getAllCustomerId();
+ }
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java
index aa4091f60b..f7cec14b13 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java
@@ -34,6 +34,7 @@ import com.epmet.dto.group.AgencyDTO;
import com.epmet.dto.group.result.AgencyGridInfoResultDTO;
import com.epmet.dto.group.result.SubAgencyIdResultDTO;
import com.epmet.dto.stats.DimGridDTO;
+import com.epmet.dto.stats.result.GridBelongAgencyResultDTO;
import com.epmet.entity.stats.DimGridEntity;
import com.epmet.service.stats.DimGridService;
import org.apache.commons.lang3.StringUtils;
@@ -165,4 +166,15 @@ public class DimGridServiceImpl extends BaseServiceImpl selectGridBelongAgencyInfo(List gridIds) {
+ return baseDao.selectGridBelongAgencyInfo(gridIds);
+ }
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/topic/TopicService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/topic/TopicService.java
index a83bc3a5c0..ee6181accb 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/topic/TopicService.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/topic/TopicService.java
@@ -1,8 +1,10 @@
package com.epmet.service.topic;
import com.epmet.dto.AgencySubTreeDto;
+import com.epmet.dto.extract.result.TopicInfoResultDTO;
import com.epmet.dto.stats.DimTopicStatusDTO;
import com.epmet.dto.stats.topic.result.TopicStatisticalData;
+import com.epmet.dto.topic.TopicOriginInfoDTO;
import com.epmet.util.DimIdGenerator;
import java.util.Date;
@@ -25,4 +27,21 @@ public interface TopicService {
**/
TopicStatisticalData compute(List agencies, Date targetDate, DimIdGenerator.DimIdBean timeDimension, String customerId, List statusDimension);
+ /**
+ * @return java.util.List
+ * @param customerId
+ * @param dateId yyyyMMdd
+ * @author yinzuomei
+ * @description 根据日期查询resi_topic_operation,返回所有对话体的操作记录
+ * @Date 2020/9/15 18:12
+ **/
+ List queryTopicOriginInfoList(String customerId, String dateId);
+ /**
+ * @Description 查询话题创建者信息
+ * @param topicIds
+ * @author zxc
+ * @date 2020/9/15 4:55 下午
+ */
+ List selectTopicInfo(List topicIds);
+
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java
index 0bc3aacd65..6c80ecd8cf 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java
@@ -5,11 +5,13 @@ import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.topic.TopicDao;
import com.epmet.dto.AgencySubTreeDto;
+import com.epmet.dto.extract.result.TopicInfoResultDTO;
import com.epmet.dto.stats.DimTopicStatusDTO;
import com.epmet.dto.stats.topic.*;
import com.epmet.dto.stats.topic.result.GridTopicData;
import com.epmet.dto.stats.topic.result.GroupTopicData;
import com.epmet.dto.stats.topic.result.TopicStatisticalData;
+import com.epmet.dto.topic.TopicOriginInfoDTO;
import com.epmet.dto.topic.result.ResiGroupTopicResultDTO;
import com.epmet.dto.topic.result.ResiTopicOperationResultDTO;
import com.epmet.dto.topic.result.ResiTopicResultDTO;
@@ -94,6 +96,20 @@ public class TopicServiceImpl implements TopicService {
}
+
+ /**
+ * @Description 查询话题创建者信息
+ * @param topicIds
+ * @author zxc
+ * @date 2020/9/15 4:55 下午
+ */
+ @Override
+ public List selectTopicInfo(List topicIds) {
+ return topicDao.selectTopicInfo(topicIds);
+ }
+
+
+
/**
* @Description 初始化机关-所有下级网格Map
* @param pid - 固定一个机关Id
@@ -219,8 +235,9 @@ public class TopicServiceImpl implements TopicService {
List groupList = new LinkedList<>();
for(Map.Entry> entry : gridGroupMap.entrySet()){
- if(null != entry.getValue() && entry.getValue().size() > NumConstant.ZERO)
+ if(null != entry.getValue() && entry.getValue().size() > NumConstant.ZERO){
groupList.addAll(entry.getValue());
+ }
}
//key -> groupId
@@ -353,8 +370,9 @@ public class TopicServiceImpl implements TopicService {
List groupListBetweenTimeRange = new LinkedList<>();
for(Map.Entry> entryBetweenTimeRange : GridGroupMapBetweenTimeRange.entrySet()){
- if(null != entryBetweenTimeRange.getValue() && entryBetweenTimeRange.getValue().size() > NumConstant.ZERO)
+ if(null != entryBetweenTimeRange.getValue() && entryBetweenTimeRange.getValue().size() > NumConstant.ZERO){
groupListBetweenTimeRange.addAll(entryBetweenTimeRange.getValue());
+ }
}
List operationsBetweenTimeRange =
topicDao.selectTopicOperationRecordBetweenTimeRange(calendar.getTime(),targetDateCheck);
@@ -447,9 +465,9 @@ public class TopicServiceImpl implements TopicService {
* @date 2020.06.22 16:03
**/
Map traverseGroupTopic(List groups, Map> topicOperationMap){
- if(null == groups || groups.size() < NumConstant.ONE)
+ if(null == groups || groups.size() < NumConstant.ONE){
return null;
-
+ }
Map groupTopicStatistical = new HashMap<>();
groups.forEach(group -> {
@@ -477,7 +495,9 @@ public class TopicServiceImpl implements TopicService {
//}else{
for (ResiTopicResultDTO topic : group.getTopics()) {
- if(StringUtils.isBlank(topic.getTopicId())) continue;
+ if(StringUtils.isBlank(topic.getTopicId())){
+ continue;
+ }
if (StringUtils.equals(NumConstant.ONE_STR, topic.getIncrFlag())) {
groupTopicData.setTopicIncr(groupTopicData.getTopicIncr() + NumConstant.ONE);
}
@@ -966,8 +986,9 @@ public class TopicServiceImpl implements TopicService {
List groupList = new LinkedList<>();
for(Map.Entry> entry : gridGroupMap.entrySet()){
- if(null != entry.getValue() && entry.getValue().size() > NumConstant.ZERO)
+ if(null != entry.getValue() && entry.getValue().size() > NumConstant.ZERO){
groupList.addAll(entry.getValue());
+ }
}
//key -> groupId
@@ -1134,8 +1155,9 @@ public class TopicServiceImpl implements TopicService {
List groupListBetweenTimeRange = new LinkedList<>();
for(Map.Entry> entryBetweenTimeRange : GridGroupMapBetweenTimeRange.entrySet()){
- if(null != entryBetweenTimeRange.getValue() && entryBetweenTimeRange.getValue().size() > NumConstant.ZERO)
+ if(null != entryBetweenTimeRange.getValue() && entryBetweenTimeRange.getValue().size() > NumConstant.ZERO){
groupListBetweenTimeRange.addAll(entryBetweenTimeRange.getValue());
+ }
}
List operationsBetweenTimeRange =
topicDao.selectTopicOperationRecordBetweenTimeRange(calendar.getTime(),targetDate);
@@ -1251,5 +1273,17 @@ public class TopicServiceImpl implements TopicService {
}
-
+ /**
+ * @param customerId
+ * @param dateId
+ * @return java.util.List
+ * @author yinzuomei
+ * @description 根据日期查询resi_topic_operation,返回所有对话题操作记录
+ * @Date 2020/9/15 18:13
+ **/
+ @DataSource(DataSourceConstant.RESI_GROUP)
+ @Override
+ public List queryTopicOriginInfoList(String customerId, String dateId) {
+ return topicDao.selectListTopicOriginInfo(customerId, dateId);
+ }
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/UserService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/UserService.java
index cd4c70287b..60934ed2c1 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/UserService.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/UserService.java
@@ -27,4 +27,12 @@ public interface UserService {
* @date 2020.06.18 10:03
**/
UserStatisticalData traverseGridUser(List agencies, Date targetDate, DimIdGenerator.DimIdBean timeDimension);
+
+ /**
+ * @Description 查询用户是不是党员
+ * @param userIds
+ * @author zxc
+ * @date 2020/9/15 4:23 下午
+ */
+ Map selectUserIsParty(List userIds);
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java
index 3882b0d524..3d230f476b 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java
@@ -3,8 +3,10 @@ package com.epmet.service.user.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.constant.DataSourceConstant;
+import com.epmet.constant.ExtractConstant;
import com.epmet.dao.user.UserDao;
import com.epmet.dto.AgencySubTreeDto;
+import com.epmet.dto.extract.result.UserPartyResultDTO;
import com.epmet.dto.stats.user.*;
import com.epmet.dto.stats.user.result.UserStatisticalData;
import com.epmet.dto.user.result.CommonTotalAndIncCountResultDTO;
@@ -16,11 +18,13 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.*;
+import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
/**
@@ -118,6 +122,36 @@ public class UserServiceImpl implements UserService {
return dataPacket;
}
+ /**
+ * @Description 查询用户是不是党员
+ * @param userIds
+ * @author zxc
+ * @date 2020/9/15 4:23 下午
+ */
+ @Override
+ public Map selectUserIsParty(List userIds) {
+ List userPartyResultDTOS = userDao.selectUserIsParty(userIds);
+ Map result = new HashMap<>();
+ if (!CollectionUtils.isEmpty(userPartyResultDTOS)){
+ Map> collect = userPartyResultDTOS.stream().collect(Collectors.groupingBy(UserPartyResultDTO::getUserId));
+ collect.forEach((userId,c) -> {
+ AtomicReference isParty = new AtomicReference<>(false);
+ c.forEach(user -> {
+ if (user.getRoleName().equals(ExtractConstant.PARTY)){
+ isParty.set(true);
+ }
+ });
+ result.put(userId,isParty.get() == true ? NumConstant.ONE : NumConstant.ZERO);
+ });
+ }
+ for (String userId : userIds) {
+ if (!result.containsKey(userId)){
+ result.put(userId,NumConstant.ZERO);
+ }
+ }
+ return result;
+ }
+
/**
* @Description 初始化机关-所有下级网格Map
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/evaluationindex/extract/DimObjectActionDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/DimObjectActionDao.xml
new file mode 100644
index 0000000000..1190fcb7d4
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/DimObjectActionDao.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/DimObjectStatusDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/DimObjectStatusDao.xml
new file mode 100644
index 0000000000..e29c6c19f8
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/DimObjectStatusDao.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueLogDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueLogDailyDao.xml
new file mode 100644
index 0000000000..ab19b88e80
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueLogDailyDao.xml
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+ INSERT INTO fact_origin_issue_log_daily (
+ ID,
+ CUSTOMER_ID,
+ GRID_ID,
+ PID,
+ AGENCY_ID,
+ DATE_ID,
+ WEEK_ID,
+ MONTH_ID,
+ QUARTER_ID,
+ YEAR_ID,
+ ISSUE_ID,
+ OPERATION_USER_ID,
+ ACTION_CODE,
+ IS_PARTY,
+ DEL_FLAG,
+ REVISION,
+ CREATED_BY,
+ CREATED_TIME,
+ UPDATED_BY,
+ UPDATED_TIME)
+ VALUES
+
+ (
+ REPLACE ( UUID(), '-', '' ),
+ #{item.customerId},
+ #{item.gridId},
+ #{item.pid},
+ #{item.agencyId},
+ #{item.dateId},
+ #{item.weekId},
+ #{item.monthId},
+ #{item.quarterId},
+ #{item.yearId},
+ #{item.issueId},
+ #{item.operationUserId},
+ #{item.actionCode},
+ #{item.isParty},
+ #{item.delFlag},
+ #{item.revision},
+ #{item.createdBy},
+ NOW(),
+ #{item.updatedBy},
+ NOW()
+ )
+
+
+
+
+
+ DELETE
+ FROM
+ fact_origin_issue_log_daily
+ WHERE
+ CUSTOMER_ID = #{customerId}
+ AND DATE_ID = #{dateId}
+
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueMainDailyDao.xml
new file mode 100644
index 0000000000..9d3ad44198
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueMainDailyDao.xml
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+ INSERT INTO fact_origin_issue_main_daily(
+ ID,
+ DATE_ID,
+ WEEK_ID,
+ MONTH_ID,
+ QUARTER_ID,
+ YEAR_ID,
+ CUSTOMER_ID,
+ IS_PARTY,
+ USER_ID,
+ CREATE_TOPIC_USER_ID,
+ TOPIC_ID,
+ GRID_ID,
+ PID,
+ AGENCY_ID,
+ ISSUE_STATUS,
+ TOPIC_USER_IS_PARTY,
+ DEL_FLAG,
+ REVISION,
+ CREATED_BY,
+ CREATED_TIME,
+ UPDATED_BY,
+ UPDATED_TIME)
+ VALUES
+
+ (
+ #{item.id},
+ #{item.dateId},
+ #{item.weekId},
+ #{item.monthId},
+ #{item.quarterId},
+ #{item.yearId},
+ #{item.customerId},
+ #{item.isParty},
+ #{item.userId},
+ #{item.createTopicUserId},
+ #{item.topicId},
+ #{item.gridId},
+ #{item.pid},
+ #{item.agencyId},
+ #{item.issueStatus},
+ #{item.topicUserIsParty},
+ #{item.delFlag},
+ #{item.revision},
+ #{item.createdBy},
+ NOW(),
+ #{item.updatedBy},
+ NOW()
+ )
+
+
+
+
+
+ DELETE
+ FROM
+ fact_origin_issue_main_daily
+ WHERE
+ CUSTOMER_ID = #{customerId}
+ AND DATE_ID = #{dateId}
+
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicLogDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicLogDailyDao.xml
new file mode 100644
index 0000000000..3efebcd69f
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicLogDailyDao.xml
@@ -0,0 +1,68 @@
+
+
+
+
+
+ DELETE
+ FROM
+ fact_origin_topic_log_daily
+ WHERE
+ CUSTOMER_ID = #{customerId}
+ AND DATE_ID = #{dateId}
+ LIMIT #{deleteSize}
+
+
+
+ insert into fact_origin_topic_log_daily
+ (
+ ID,
+ CUSTOMER_ID,
+ GRID_ID,
+ AGENCY_ID,
+ PID,
+ DATE_ID,
+ WEEK_ID,
+ MONTH_ID,
+ QUARTER_ID,
+ YEAR_ID,
+ TOPIC_ID,
+ GROUP_ID,
+ ACTION_CODE,
+ OPERATE_USER_ID,
+ OPERATE_USER_IS_PARTY,
+ ORIGINAL_BUSINESS_TIME,
+ DEL_FLAG,
+ REVISION,
+ CREATED_BY,
+ CREATED_TIME,
+ UPDATED_BY,
+ UPDATED_TIME
+ ) values
+
+ (
+ #{item.id},
+ #{item.customerId},
+ #{item.gridId},
+ #{item.agencyId},
+ #{item.pid},
+ #{item.dateId},
+ #{item.weekId},
+ #{item.monthId},
+ #{item.quarterId},
+ #{item.yearId},
+ #{item.topicId},
+ #{item.groupId},
+ #{item.actionCode},
+ #{item.operateUserId},
+ #{item.operateUserIsParty},
+ #{item.originalBusinessTime},
+ 0,
+ 0,
+ 'APP_USER',
+ now(),
+ 'APP_USER',
+ now()
+ )
+
+
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml
new file mode 100644
index 0000000000..377f09bd45
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+ DELETE
+ FROM
+ fact_origin_topic_main_daily
+ WHERE
+ CUSTOMER_ID = #{customerId}
+ AND DATE_ID = #{dateId}
+ LIMIT #{deleteSize}
+
+
+
+ insert into fact_origin_topic_main_daily
+ (
+ ID,
+ CUSTOMER_ID,
+ GRID_ID,
+ AGENCY_ID,
+ PID,
+ DATE_ID,
+ WEEK_ID,
+ MONTH_ID,
+ QUARTER_ID,
+ YEAR_ID,
+ GROUP_ID,
+ TOPIC_STATUS,
+ CREATE_TOPIC_USER_ID,
+ CREATE_TOPIC_USER_IS_PARTY,
+ DEL_FLAG,
+ REVISION,
+ CREATED_BY,
+ CREATED_TIME,
+ UPDATED_BY,
+ UPDATED_TIME
+ ) values
+
+ (
+ #{item.id},
+ #{item.customerId},
+ #{item.gridId},
+ #{item.agencyId},
+ #{item.pid},
+ #{item.dateId},
+ #{item.weekId},
+ #{item.monthId},
+ #{item.quarterId},
+ #{item.yearId},
+ #{item.groupId},
+ #{item.topicStatus},
+ #{item.createTopicUserId},
+ #{item.createTopicUserIsParty},
+ 0,
+ 0,
+ 'APP_USER',
+ now(),
+ 'APP_USER',
+ now()
+ )
+
+
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/issue/StatsIssueDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/issue/StatsIssueDao.xml
index 2b6c50fb7f..3cf6957432 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/issue/StatsIssueDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/issue/StatsIssueDao.xml
@@ -182,4 +182,85 @@
+
+
+ SELECT
+ ID AS issueId,
+ ISSUE_STATUS,
+ SOURCE_ID AS topicId,
+ CUSTOMER_ID,
+ GRID_ID,
+ ORG_ID AS agencyId,
+ CREATED_BY AS userId
+ FROM issue
+ WHERE
+ DEL_FLAG = '0'
+ AND customer_id = #{customerId}
+ AND DATE_FORMAT( CREATED_TIME, '%Y%m%d' ) = #{dateId}
+
+
+
+
+ SELECT
+ i.GRID_ID AS gridId,
+ i.ORG_ID AS agencyId,
+ i.CUSTOMER_ID AS customerId,
+ ip.ISSUE_ID AS issueId,
+ ip.CREATED_BY AS userId,
+ (case when i.RESOLVE_TYPE = 'resolved' then 'closed_resolved'
+ when i.RESOLVE_TYPE = 'unresolved' then 'closed_unresolved'
+ else i.ISSUE_STATUS end ) AS actionCode
+ FROM
+ issue_process ip
+ LEFT JOIN issue i ON i.id = ip.issue_id
+ WHERE
+ i.DEL_FLAG = '0'
+ AND ip.DEL_FLAG = '0'
+ AND i.CUSTOMER_ID = #{customerId}
+ AND DATE_FORMAT(i.CREATED_TIME,'%Y%m%d') = #{dateId}
+
+
+
+
+ SELECT
+ isd.ISSUE_ID AS issueId,
+ ( CASE WHEN isd.SATISFACTION = 'bad' THEN 'evaluste_bad'
+ WHEN isd.SATISFACTION = 'good' THEN 'evaluste_good'
+ WHEN isd.SATISFACTION = 'perfect' THEN 'evaluste_perfect'
+ ELSE '' END ) AS actionCode,
+ isd.CREATED_BY AS userId,
+ i.GRID_ID AS gridId,
+ i.ORG_ID AS agencyId,
+ i.CUSTOMER_ID AS customerId
+ FROM
+ issue_satisfaction_detail isd
+ LEFT JOIN issue i ON i.id = isd.issue_id
+ WHERE
+ isd.del_flag = '0'
+ AND i.del_flag = '0'
+ AND i.CUSTOMER_ID = #{customerId}
+ AND DATE_FORMAT(isd.CREATED_TIME,'%Y%m%d') = #{dateId}
+
+
+
+
+ SELECT
+ ivd.ISSUE_ID AS issueId,
+ ( CASE WHEN ivd.ATTITUDE = 'support' THEN 'vote_support'
+ WHEN ivd.ATTITUDE = 'opposition' THEN 'vote_opposition'
+ ELSE '' END ) AS actionCode,
+ ivd.CREATED_BY AS userId,
+ i.GRID_ID AS gridId,
+ i.ORG_ID AS agencyId,
+ i.CUSTOMER_ID AS customerId
+ FROM
+ issue_vote_detail ivd
+ LEFT JOIN issue i ON i.id = ivd.issue_id
+ WHERE
+ ivd.del_flag = '0'
+ AND i.del_flag = '0'
+ AND i.CUSTOMER_ID = #{customerId}
+ AND DATE_FORMAT(ivd.CREATED_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/org/CustomerGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml
index 48c5176a78..c12feef84b 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml
@@ -68,4 +68,18 @@
WHERE UPDATED_TIME >= #{startTime}
AND UPDATED_TIME #{endTime}
+
+
+ SELECT
+ cg.ID as GRID_ID,
+ cg.PID as AGENCY_ID,
+ ca.PID AS PID,
+ CG.CUSTOMER_ID
+ FROM
+ customer_grid cg
+ LEFT JOIN customer_agency ca ON ( cg.PID = CA.ID )
+ WHERE
+ CG.CUSTOMER_ID =#{customerId}
+ and cg.del_flag='0'
+
\ No newline at end of file
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..847228f46a
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/partymember/PartyMemberDao.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+ SELECT
+ CUSTOMER_ID,
+ GRID_ID,
+ USER_ID,
+ ID_CARD,
+ STR_TO_DATE( SUBSTRING( ID_CARD, 7, 8 ),'%Y%m%d') 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/DimAgencyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimAgencyDao.xml
index 3b7fb8b8ba..357265ee82 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimAgencyDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimAgencyDao.xml
@@ -299,4 +299,21 @@
limit 1
+
+
+ SELECT
+ id AS agencyId,
+ pid
+ FROM
+ dim_agency
+ WHERE
+ del_flag = '0'
+ AND
+ (
+
+ id = #{item}
+
+ )
+
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimCustomerDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimCustomerDao.xml
index 13bc6a3e01..54914e24d0 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimCustomerDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimCustomerDao.xml
@@ -40,4 +40,9 @@
order by UPDATED_TIME desc
limit 1;
+
+
+
+ SELECT ID FROM dim_customer WHERE DEL_FLAG = '0'
+
\ 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..8dbc158531
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimCustomerPartymemberDao.xml
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+ 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()
+ )
+
+
+
+
+
+ DELETE FROM dim_customer_partymember
+ WHERE
+ CUSTOMER_ID = #{customerId}
+ AND DATE_ID = #{dateId}
+
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimGridDao.xml
index eef43456f7..d3f6c044a3 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimGridDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimGridDao.xml
@@ -69,4 +69,24 @@
limit 1;
+
+
+ SELECT
+ dg.id AS gridId,
+ dg.AGENCY_ID AS agencyId,
+ da.PID AS parentId
+ FROM
+ dim_grid dg
+ LEFT JOIN dim_agency da ON da.id = dg.agency_id
+ WHERE
+ dg.DEL_FLAG = '0'
+ AND da.DEL_FLAG = '0'
+ AND
+ (
+
+ dg.id = #{gridId}
+
+ )
+
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/topic/TopicDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/topic/TopicDao.xml
index c567d0c842..7d84adfa91 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/topic/TopicDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/topic/TopicDao.xml
@@ -129,4 +129,71 @@
order by TOPIC_ID
+
+
+ SELECT
+ id AS topicId,
+ CREATED_BY AS userId
+ FROM
+ resi_topic
+ WHERE
+ del_flag = '0'
+ AND
+ (
+
+ id = #{item}
+
+ )
+
+
+
+
+ SELECT
+ rto.TOPIC_ID,
+ (case
+ when rto.OPERATION_TYPE='closed' and rt.CLOSED_STATUS='resolved' then 'closed_resolved'
+ when rto.OPERATION_TYPE='closed' and rt.CLOSED_STATUS='unresolved' then 'closed_unresolved'
+ else rto.OPERATION_TYPE
+ end
+ )as ACTION_CODE,
+ rto.CREATED_BY as OPERATE_USER_ID,
+ DATE_FORMAT(rto.CREATED_TIME,'%Y%m%d') as DATE_ID,
+ DATE_FORMAT(rto.CREATED_TIME,'%Y%m') as MONTH_ID,
+ DATE_FORMAT(rto.CREATED_TIME,'%Y') as YEAR_ID,
+ rto.CREATED_TIME AS ORIGINAL_BUSINESS_TIME,
+ rt.GROUP_ID,
+ rt.STATUS as TOPIC_STATUS,
+ rg.GRID_ID,
+ RG.CUSTOMER_ID
+ FROM
+ resi_topic_operation rto
+ LEFT JOIN resi_topic rt ON ( rto.TOPIC_ID = rt.id AND rt.DEL_FLAG = '0' )
+ LEFT JOIN RESI_GROUP RG ON(RT.GROUP_ID=RG.ID AND RG.DEL_FLAG='0')
+ WHERE
+ rto.DEL_FLAG = '0'
+ AND DATE_FORMAT(rto.CREATED_TIME,'%Y%m%d')=#{dateId}
+ AND RG.CUSTOMER_ID=#{customerId}
+ union all
+ SELECT
+ rtc.TOPIC_ID,
+ 'comment' as ACTION_CODE,
+ rtc.CREATED_BY as OPERATE_USER_ID,
+ DATE_FORMAT(rtc.CREATED_TIME,'%Y%m%d') as DATE_ID,
+ DATE_FORMAT(rtc.CREATED_TIME,'%Y%m') as MONTH_ID,
+ DATE_FORMAT(rtc.CREATED_TIME,'%Y') as YEAR_ID,
+ rtc.CREATED_TIME AS ORIGINAL_BUSINESS_TIME,
+ rt.GROUP_ID ,
+ rt.STATUS as TOPIC_STATUS,
+ rg.GRID_ID,
+ rg.CUSTOMER_ID
+ FROM
+ resi_topic_comment rtc
+ LEFT JOIN resi_topic rt ON ( rtc.TOPIC_ID = rt.id AND rt.DEL_FLAG = '0' )
+ LEFT JOIN resi_group rg ON ( rt.GROUP_ID = rg.id AND rg.DEL_FLAG = '0' )
+ WHERE
+ rtc.DEL_FLAG = '0'
+ AND DATE_FORMAT( rtc.CREATED_TIME, '%Y%m%d' )=#{dateId}
+ AND RG.CUSTOMER_ID =#{customerId}
+
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/UserDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/UserDao.xml
index 6b796d944e..67e2ab9442 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/UserDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/UserDao.xml
@@ -408,4 +408,20 @@
AND urole.CREATED_TIME =]]> #{startDate} AND urole.CREATED_TIME DATE_SUB( #{endDate}, INTERVAL - 1 DAY)
AND erole.ROLE_NAME = '热心居民'
+
+
+
+ SELECT ur.user_id AS userId,
+ er.role_name AS roleName
+ FROM user_role ur
+ LEFT JOIN epmet_role er ON er.id = ur.role_id
+ WHERE ur.del_flag = 0
+ AND er.del_flag = 0
+ AND
+ (
+
+ ur.user_id = #{item}
+
+ )
+
diff --git a/epmet-module/epmet-common-service/common-service-server/pom.xml b/epmet-module/epmet-common-service/common-service-server/pom.xml
index 25f4cd05a9..c5f2f8bdab 100644
--- a/epmet-module/epmet-common-service/common-service-server/pom.xml
+++ b/epmet-module/epmet-common-service/common-service-server/pom.xml
@@ -178,7 +178,7 @@
-->
8103
- dev
+ test
diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/DimPartyMemberService.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/DimPartyMemberService.java
new file mode 100644
index 0000000000..d33490b2eb
--- /dev/null
+++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/DimPartyMemberService.java
@@ -0,0 +1,13 @@
+package com.epmet.service;
+
+import com.epmet.commons.tools.utils.Result;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/9/17 3:05 下午
+ */
+public interface DimPartyMemberService {
+
+ Result getPartyInfo(String date);
+
+}
diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/DimPartyMemberServiceImpl.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/DimPartyMemberServiceImpl.java
new file mode 100644
index 0000000000..e5b86e6d73
--- /dev/null
+++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/DimPartyMemberServiceImpl.java
@@ -0,0 +1,27 @@
+package com.epmet.service.impl;
+
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO;
+import com.epmet.feign.DataStatisticalOpenFeignClient;
+import com.epmet.service.DimPartyMemberService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/9/17 3:06 下午
+ */
+@Service
+public class DimPartyMemberServiceImpl implements DimPartyMemberService {
+
+ @Autowired
+ private DataStatisticalOpenFeignClient statsFeignClient;
+
+
+ @Override
+ public Result getPartyInfo(String dateId) {
+ CustomerIdAndDateIdFormDTO c = new CustomerIdAndDateIdFormDTO();
+ c.setDateId(dateId);
+ return statsFeignClient.getPartyInfo(c);
+ }
+}
diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/DimPartyMemberTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/DimPartyMemberTask.java
new file mode 100644
index 0000000000..1998cbe6fa
--- /dev/null
+++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/DimPartyMemberTask.java
@@ -0,0 +1,30 @@
+package com.epmet.task;
+
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.service.DimPartyMemberService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/9/17 3:04 下午
+ */
+@Slf4j
+@Component("dimPartyMemberTask")
+public class DimPartyMemberTask implements ITask{
+
+ @Autowired
+ private DimPartyMemberService dimPartyMemberService;
+
+ @Override
+ public void run(String params) {
+ log.info("dimPartyMemberTask定时任务正在执行,参数为:{}", params);
+ Result result = dimPartyMemberService.getPartyInfo(params);
+ if (result.success()){
+ log.info("dimPartyMemberTask定时任务执行成功");
+ }else {
+ log.error("dimPartyMemberTask定时任务执行失败:" + result.getMsg());
+ }
+ }
+}