diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java
index 9e50e6b796..d1cc70552e 100644
--- a/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java
+++ b/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java
@@ -86,7 +86,7 @@ public class ThirdLoginServiceImpl implements ThirdLoginService {
String token = this.generateToken(formDTO, userId);
//4.存放Redis
- this.saveTokenDto(formDTO, userId, userWechatDTO, token);
+ this.saveTokenDto(formDTO, userId, userWechatDTO, token, userWechatDTO.getCustomerId());
//5.接口返参
UserTokenResultDTO userTokenResultDTO = new UserTokenResultDTO();
@@ -111,9 +111,10 @@ public class ThirdLoginServiceImpl implements ThirdLoginService {
/**
* @Description 将token存入redis
**/
- private String saveTokenDto(LoginCommonFormDTO formDTO, String userId, UserWechatDTO userWechatDTO, String token) {
+ private String saveTokenDto(LoginCommonFormDTO formDTO, String userId, UserWechatDTO userWechatDTO, String token, String customerId) {
int expire = jwtTokenProperties.getExpire();
TokenDto tokenDto = new TokenDto();
+ tokenDto.setCustomerId(customerId);
tokenDto.setApp(formDTO.getApp());
tokenDto.setClient(formDTO.getClient());
tokenDto.setUserId(userId);
diff --git a/epmet-commons/epmet-commons-rocketmq/pom.xml b/epmet-commons/epmet-commons-rocketmq/pom.xml
new file mode 100644
index 0000000000..41ee2e97e1
--- /dev/null
+++ b/epmet-commons/epmet-commons-rocketmq/pom.xml
@@ -0,0 +1,21 @@
+
+
+
+ epmet-commons
+ com.epmet
+ 2.0.0
+
+ 4.0.0
+
+ epmet-commons-rocketmq
+
+
+
+ org.apache.rocketmq
+ rocketmq-spring-boot-starter
+ 2.1.1
+
+
+
\ No newline at end of file
diff --git a/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/constants/ConsomerGroupConstants.java b/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/constants/ConsomerGroupConstants.java
new file mode 100644
index 0000000000..0bcf7d4aa6
--- /dev/null
+++ b/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/constants/ConsomerGroupConstants.java
@@ -0,0 +1,21 @@
+package com.epmet.commons.rocketmq.constants;
+
+/**
+ * 消费者组常量
+ */
+public interface ConsomerGroupConstants {
+
+ /**
+ * 初始化客户角色消费者组
+ */
+ String INIT_CUSTOMER_ROLES_GROUP = "init_customer_roles_group";
+ /**
+ * 初始化客户自定义消费者组
+ */
+ String INIT_CUSTOMER_CUSTOMIZE_GROUP = "init_customer_customize_group";
+ /**
+ * 初始化客户组织机构信息分组
+ */
+ String INIT_CUSTOMER_ORG_GROUP = "init_customer_org_group";
+
+}
diff --git a/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/constants/TopicConstants.java b/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/constants/TopicConstants.java
new file mode 100644
index 0000000000..d95a829b8f
--- /dev/null
+++ b/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/constants/TopicConstants.java
@@ -0,0 +1,5 @@
+package com.epmet.commons.rocketmq.constants;
+
+public interface TopicConstants {
+ String INIT_CUSTOMER = "init_customer_topic";
+}
diff --git a/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/InitCustomerMQMsg.java b/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/InitCustomerMQMsg.java
new file mode 100644
index 0000000000..104d77581c
--- /dev/null
+++ b/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/InitCustomerMQMsg.java
@@ -0,0 +1,148 @@
+package com.epmet.commons.rocketmq.messages;
+
+public class InitCustomerMQMsg {
+
+ private String customerId;
+
+ private InitCustomerAgency agency;
+
+ private InitCustomerStaff staff;
+
+ public static class InitCustomerStaff {
+ private String agencyId;
+ private Integer gender;
+ private String mobile;
+ private String name;
+ private String workType;
+
+ public String getAgencyId() {
+ return agencyId;
+ }
+
+ public void setAgencyId(String agencyId) {
+ this.agencyId = agencyId;
+ }
+
+ public Integer getGender() {
+ return gender;
+ }
+
+ public void setGender(Integer gender) {
+ this.gender = gender;
+ }
+
+ public String getMobile() {
+ return mobile;
+ }
+
+ public void setMobile(String mobile) {
+ this.mobile = mobile;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getWorkType() {
+ return workType;
+ }
+
+ public void setWorkType(String workType) {
+ this.workType = workType;
+ }
+ }
+
+ public static class InitCustomerAgency {
+ private String agencyId;
+ private String organizationName;
+ private String level;
+ private String areaCode;
+ private String province;
+ private String city;
+ private String district;
+
+ public String getAgencyId() {
+ return agencyId;
+ }
+
+ public void setAgencyId(String agencyId) {
+ this.agencyId = agencyId;
+ }
+
+ public String getOrganizationName() {
+ return organizationName;
+ }
+
+ public void setOrganizationName(String organizationName) {
+ this.organizationName = organizationName;
+ }
+
+ public String getLevel() {
+ return level;
+ }
+
+ public void setLevel(String level) {
+ this.level = level;
+ }
+
+ public String getAreaCode() {
+ return areaCode;
+ }
+
+ public void setAreaCode(String areaCode) {
+ this.areaCode = areaCode;
+ }
+
+ public String getProvince() {
+ return province;
+ }
+
+ public void setProvince(String province) {
+ this.province = province;
+ }
+
+ public String getCity() {
+ return city;
+ }
+
+ public void setCity(String city) {
+ this.city = city;
+ }
+
+ public String getDistrict() {
+ return district;
+ }
+
+ public void setDistrict(String district) {
+ this.district = district;
+ }
+ }
+
+ public String getCustomerId() {
+ return customerId;
+ }
+
+ public void setCustomerId(String customerId) {
+ this.customerId = customerId;
+ }
+
+ public InitCustomerAgency getAgency() {
+ return agency;
+ }
+
+ public void setAgency(InitCustomerAgency agency) {
+ this.agency = agency;
+ }
+
+ public InitCustomerStaff getStaff() {
+ return staff;
+ }
+
+ public void setStaff(InitCustomerStaff staff) {
+ this.staff = staff;
+ }
+}
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
index 4d3c107de3..e3a02b4696 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
@@ -20,6 +20,7 @@ public enum EpmetErrorCode {
ERR10006(10006, "登录超时,请重新登录"),
ERR10007(10007, "当前帐号已在别处登录"),
ERR10019(10019, "验证码不正确"),
+ SYSTEM_MQ_MSG_SEND_FAIL(10020, "MQ消息发送失败"),
ERR401(401, "未授权"),
INTERNAL_VALIDATE_ERROR(7000, "内部数据校验异常"),
SERVER_ERROR(8000, "服务器开小差了..."),
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/scan/param/VideoScanParamDTO.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/scan/param/VideoScanParamDTO.java
new file mode 100644
index 0000000000..07f0962a89
--- /dev/null
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/scan/param/VideoScanParamDTO.java
@@ -0,0 +1,35 @@
+package com.epmet.commons.tools.scan.param;
+
+import lombok.Data;
+
+import javax.validation.Valid;
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * (异步检测)请求参数
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2021/1/10 21:05
+ */
+@Data
+public class VideoScanParamDTO implements Serializable {
+ private static final long serialVersionUID = -7261993744367287072L;
+ /**
+ * 是否开启回调
+ */
+ @NotNull(message = "openCallBack必填,true开启;false不开启")
+ private Boolean openCallBack;
+
+ /**
+ * 异步检测结果回调地址,执行异步审查内容时 必填
+ * openCallBack=true时,callback必填
+ */
+ private String callback;
+
+ @Valid
+ @NotEmpty(message = "任务列表不能为空")
+ private List tasks;
+}
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/scan/param/VideoTaskDTO.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/scan/param/VideoTaskDTO.java
new file mode 100644
index 0000000000..6a71d5daf4
--- /dev/null
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/scan/param/VideoTaskDTO.java
@@ -0,0 +1,32 @@
+package com.epmet.commons.tools.scan.param;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * (异步检测)请求参数
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2021/1/10 21:06
+ */
+@Data
+public class VideoTaskDTO implements Serializable {
+ private static final long serialVersionUID = -5268462578193403270L;
+ /**
+ * 不必填
+ * 要检测的数据id 非必填
+ * 检测对象对应的数据ID。
+ * 由大小写英文字母、数字、下划线(_)、短划线(-)、英文句号(.)组成,不超过128个字符,可以用于唯一标识您的业务数据。
+ * */
+ @NotBlank(message = "dataId不能为空")
+ private String dataId;
+
+ /**
+ * 必填
+ * 待检测视频的URL。该字段不能和frames同时为空,也不能和frames同时有值。
+ */
+ @NotBlank(message = "音频URL不能为空")
+ private String url;
+}
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/scan/result/AsyncScanResult.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/scan/result/AsyncScanResult.java
index 77cabbfed7..6f8c33aa5c 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/scan/result/AsyncScanResult.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/scan/result/AsyncScanResult.java
@@ -8,7 +8,7 @@ import java.util.List;
/**
* 语音异步检测 返参
- *
+ * 视频异步检测 返参通用
* @author yinzuomei@elink-cn.com
* @date 2020/12/18 10:09
*/
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/scan/result/VideoAsyncScanResultDTO.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/scan/result/VideoAsyncScanResultDTO.java
new file mode 100644
index 0000000000..86445a83e5
--- /dev/null
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/scan/result/VideoAsyncScanResultDTO.java
@@ -0,0 +1,47 @@
+package com.epmet.commons.tools.scan.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 视频异步检测结果查询接口返参
+ * 正在检测中的不返回,调用方继续轮询查询结果
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/12/29 15:37
+ */
+@Data
+public class VideoAsyncScanResultDTO implements Serializable {
+ private static final long serialVersionUID = -7302168989456734818L;
+ /**
+ * 执行成功的任务Id集合
+ * code=200,且所有语音+视频所有场景返回结果都为pass时则为成功
+ */
+ private List passDataIds = new ArrayList<>();
+ /**
+ * 执行失败的任务Id集合
+ */
+ private List noPassDataIds = new ArrayList<>();
+
+ private List passTaskIds = new ArrayList<>();
+ private List noPassTaskIds = new ArrayList<>();
+
+ /**
+ * desc:阿里内容审核API返回结果详情
+ */
+ private List details = new ArrayList<>();
+
+ /**
+ * 本地是否全部通过
+ */
+ private Boolean isAllPass;
+
+ public boolean isAllPass() {
+ if (noPassTaskIds.isEmpty() && !passTaskIds.isEmpty()) {
+ return true;
+ }
+ return isAllPass;
+ }
+}
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/scan/result/VideoScanDetailDTO.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/scan/result/VideoScanDetailDTO.java
new file mode 100644
index 0000000000..59b047a73b
--- /dev/null
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/scan/result/VideoScanDetailDTO.java
@@ -0,0 +1,56 @@
+package com.epmet.commons.tools.scan.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2021/1/10 21:24
+ */
+@Data
+public class VideoScanDetailDTO implements Serializable {
+ /**
+ * 错误码,和HTTP状态码一致。
+ * 更多信息,请参见公共错误码。
+ */
+ private Integer code;
+
+ private String codeDesc;
+
+ /**
+ * 错误描述信息。
+ */
+ private String msg;
+ /**
+ * 检测对象对应的数据ID。
+ */
+ private String dataId;
+
+ /**
+ * 检测任务的ID
+ */
+ private String taskId;
+
+ /**
+ * 返回结果,调用成功时(code=200),返回结果中包含一个或多个元素。每个元素是个结构体,具体结构描述,请参见result。
+ * 说明 视频流检测场景中,code返回280表示在检测中,返回200表示检测完成。在检测中状态时,检测结果中包含从开始检测到当前时间的检测到结果。
+ */
+ private List results;
+
+ /**
+ * 视频语音检测结果。具体结构描述,请参见audioScanResult。
+ */
+ private List audioScanResults;
+
+
+ @Data
+ public static class ResultDetail {
+ private String scene;
+ private String label;
+ private String suggestion;
+ private Float rate;
+ }
+}
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ScanContentUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ScanContentUtils.java
index effd25ccd6..6427301a18 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ScanContentUtils.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ScanContentUtils.java
@@ -8,6 +8,7 @@ import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.scan.param.*;
import com.epmet.commons.tools.scan.result.AsyncScanResult;
import com.epmet.commons.tools.scan.result.SyncScanResult;
+import com.epmet.commons.tools.scan.result.VideoAsyncScanResultDTO;
import com.epmet.commons.tools.scan.result.VoiceResultDTO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
@@ -136,6 +137,65 @@ public class ScanContentUtils {
}
}
+ /**
+ * @param url 视频地址
+ * @param param
+ * @author yinzuomei
+ * @description 异步检测-提交检测任务
+ **/
+ public static Result videoAsyncScan(String url, VideoScanParamDTO param){
+ log.debug("videoAsyncScan param:{}", JSON.toJSONString(param));
+ if (StringUtils.isBlank(url) || param == null) {
+ throw new RenException("参数错误");
+ }
+ if (param.getOpenCallBack() && StringUtils.isBlank(param.getCallback())) {
+ throw new RenException("参数错误,开启回调,callback必填");
+ }
+ try {
+ Result result = HttpClientManager.getInstance().sendPostByJSON(url, JSON.toJSONString(param));
+ log.debug("videoAsyncScan result:{}", JSON.toJSONString(result));
+ if (result.success()) {
+ return JSON.parseObject(result.getData(),new TypeReference>(){});
+ }
+ Result resultResult = new Result<>();
+ resultResult.error(result.getCode(),result.getMsg());
+ resultResult.setInternalMsg(result.getInternalMsg());
+ return resultResult;
+ } catch (Exception e) {
+ log.error("videoAsyncScan exception:", e);
+ throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), e.getMessage());
+ }
+ }
+
+ /**
+ * @param url
+ * @param taskIds
+ * @author yinzuomei
+ * @description 查询视频检测结果
+ **/
+ public static Result videoResults(String url, List taskIds) {
+ if (StringUtils.isBlank(url) || CollectionUtils.isEmpty(taskIds)) {
+ throw new RenException("参数错误");
+ }
+ if (taskIds.size() > NumConstant.ONE_HUNDRED) {
+ throw new RenException("参数错误,查询检测任务最大不能超过100");
+ }
+ try {
+ Result result = HttpClientManager.getInstance().sendPostByJSON(url, JSON.toJSONString(taskIds));
+ log.debug("videoResults result:{}", JSON.toJSONString(result));
+ if (result.success()) {
+ return JSON.parseObject(result.getData(), new TypeReference>() {
+ });
+ }
+ Result resultResult = new Result<>();
+ resultResult.error(result.getCode(), result.getMsg());
+ resultResult.setInternalMsg(result.getInternalMsg());
+ return resultResult;
+ } catch (Exception e) {
+ log.error("voiceResults exception:", e);
+ throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), e.getMessage());
+ }
+ }
public static void main(String[] args) {
//测试文本检测
@@ -143,7 +203,11 @@ public class ScanContentUtils {
//测试语音检测
// testVoiceAsyncScan();
//语音检测结果
- testVoiceResults();
+ // testVoiceResults();
+ //视频检测任务提交
+ // testVideoAsyncScan();
+ //查询视频检测结果
+ testVideoResults();
}
public static void testTextSyncScan(){
@@ -200,4 +264,26 @@ public class ScanContentUtils {
Result> asyncScanResultResult = ScanContentUtils.voiceResults(url, taskIds);
System.out.println("================" + JSON.toJSONString(asyncScanResultResult));
}
+
+ public static void testVideoAsyncScan(){
+ String url = "http://localhost:8107/epmetscan/api/videoAsyncScan";
+ VideoTaskDTO p = new VideoTaskDTO();
+ p.setDataId("1");
+ p.setUrl("https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20210111/e996a68b9f0144a3843666c430f73086.mp4");
+ List list = new ArrayList<>();
+ list.add(p);
+ VideoScanParamDTO param = new VideoScanParamDTO();
+ param.setTasks(list);
+ param.setOpenCallBack(false);
+ Result asyncScanResultResult = ScanContentUtils.videoAsyncScan(url, param);
+ System.out.println(JSON.toJSONString(asyncScanResultResult));
+ }
+
+ public static void testVideoResults(){
+ String url = "http://localhost:8107/epmetscan/api/videoResults";
+ List taskIds=new ArrayList<>();
+ taskIds.add("vi6ZatqnJEkqf5m@FZ7Ka0AU-1tKYdk");
+ Result result = ScanContentUtils.videoResults(url, taskIds);
+ System.out.println("================" + JSON.toJSONString(result));
+ }
}
diff --git a/epmet-commons/pom.xml b/epmet-commons/pom.xml
index d4b8e270b4..0bf8dd9c9f 100644
--- a/epmet-commons/pom.xml
+++ b/epmet-commons/pom.xml
@@ -23,6 +23,7 @@
epmet-commons-tools-wx-mpepmet-commons-service-callepmet-commons-extapp-auth
+ epmet-commons-rocketmq
diff --git a/epmet-gateway/src/main/java/com/epmet/auth/InternalAuthProcessor.java b/epmet-gateway/src/main/java/com/epmet/auth/InternalAuthProcessor.java
index 2ee22426f6..6a88ccf73e 100644
--- a/epmet-gateway/src/main/java/com/epmet/auth/InternalAuthProcessor.java
+++ b/epmet-gateway/src/main/java/com/epmet/auth/InternalAuthProcessor.java
@@ -111,7 +111,7 @@ public class InternalAuthProcessor extends AuthProcessor {
.header(AppClientConstant.CLIENT,baseTokenDto.getClient())
.header(AppClientConstant.USER_ID,baseTokenDto.getUserId());
- if (StringUtils.equals(baseTokenDto.getApp(), "gov")) {//工作端
+ if (StringUtils.equalsAny(baseTokenDto.getApp(), AppClientConstant.APP_GOV, AppClientConstant.APP_RESI)) {//工作端/居民端
if(StringUtils.isNotBlank(customerId)){
exchange.getRequest().mutate().header(AppClientConstant.CUSTOMER_ID, customerId);
}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/pom.xml b/epmet-module/data-aggregator/data-aggregator-server/pom.xml
index 3c4d3a685c..c1e47d3b7e 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/pom.xml
+++ b/epmet-module/data-aggregator/data-aggregator-server/pom.xml
@@ -318,28 +318,28 @@
-
+
epmet_gov_issue_userEpmEt-db-UsEr
-
+
epmet_gov_project_userEpmEt-db-UsEr
-
+
epmet_resi_group_userEpmEt-db-UsEr
-
+
epmet_user_userEpmEt-db-UsEr
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/impl/GovIssueServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/impl/GovIssueServiceImpl.java
index 3f77c42158..87ff2a6dd9 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/impl/GovIssueServiceImpl.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/impl/GovIssueServiceImpl.java
@@ -280,8 +280,7 @@ public class GovIssueServiceImpl implements GovIssueService {
shiftProject.setStatus(project.getStatus());
return shiftProject;
})).collect(Collectors.toList());
- List result = resultList.stream().sorted(Comparator.comparing(ShiftProjectIssueListResultDTO::getCount, Comparator.reverseOrder()).thenComparing(ShiftProjectIssueListResultDTO::getShiftedTime, Comparator.reverseOrder())).collect(Collectors.toList());
- return result;
+ return resultList;
}
/**
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueDao.xml
index 93d5b12ce0..96475ca863 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueDao.xml
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueDao.xml
@@ -75,7 +75,7 @@
AND i.issue_status = 'shift_project'
AND i.org_id_path like concat('%', #{agencyId}, '%')
ORDER BY
- count DESC, i.created_time ASC
+ count DESC, i.shifted_time DESC
LIMIT #{pageNo}, #{pageSize}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml
index 7d3ccb3dd7..a85b784273 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml
@@ -40,19 +40,19 @@
@@ -79,10 +79,10 @@
AND ps.DEL_FLAG = '0'
AND p.`STATUS` = 'pending'
AND ps.IS_HANDLE = 'unhandled'
- AND
+ AND(
- p.ORIGIN_ID = #{issueId}
-
+ p.ORIGIN_ID = #{issueId}
+ )
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml
index 992c347f9b..505ca018a8 100644
--- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml
+++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml
@@ -15,7 +15,9 @@
resolved_project_total AS resolvedProjectTotal,
resolved_project_ratio AS resolvedProjectRatioA,
publish_issue_total AS publishIssueTotal,
- publish_issue_ratio AS publishIssueRatioA
+ publish_issue_ratio AS publishIssueRatioA,
+ PLAT_ISSUE_TOTAL AS platIssueTotal,
+ PLAT_JOIN_PARTY_RATIO AS platJoinPartyRatio
FROM
screen_pioneer_data
WHERE
@@ -24,4 +26,4 @@
ORDER BY data_end_time DESC
LIMIT 1
-
\ No newline at end of file
+
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml
index 1a94210725..277e6c17dc 100644
--- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml
+++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml
@@ -6,24 +6,29 @@
SELECT
- ORG_NAME AS NAME,
- REG_USER_TOTAL AS regNum,
- JOIN_USER_TOTAL AS joinNum,
- TOPIC_TOTAL AS topicNum,
- ISSUE_TOTAL AS issueNum,
- PROJECT_TOTAL AS projectNum
+ totalData.ORG_NAME AS NAME,
+ totalData.REG_USER_TOTAL AS regNum,
+ totalData.JOIN_USER_TOTAL AS joinNum,
+ totalData.TOPIC_TOTAL AS topicNum,
+ totalData.ISSUE_TOTAL AS issueNum,
+ totalData.PROJECT_TOTAL AS projectNum,
+ agency.AGENCY_NAME AS parentAgencyName
FROM
- screen_public_parti_total_data
+ screen_public_parti_total_data totalData
+ LEFT JOIN
+ screen_customer_agency agency
+ ON totalData.PARENT_ID = agency.AGENCY_ID
+ AND agency.DEL_FLAG = '0' AND agency.AGENCY_ID = #{agencyId}
WHERE
- DEL_FLAG = '0'
- AND PARENT_ID = #{agencyId}
+ totalData.DEL_FLAG = '0'
+ AND totalData.PARENT_ID = #{agencyId}
ORDER BY
- (REG_USER_TOTAL + JOIN_USER_TOTAL + TOPIC_TOTAL + ISSUE_TOTAL + PROJECT_TOTAL) DESC,
- REG_USER_TOTAL desc,
- JOIN_USER_TOTAL desc,
- TOPIC_TOTAL desc,
- ISSUE_TOTAL desc,
- PROJECT_TOTAL desc
+ (totalData.REG_USER_TOTAL + totalData.JOIN_USER_TOTAL + totalData.TOPIC_TOTAL + totalData.ISSUE_TOTAL + totalData.PROJECT_TOTAL) DESC,
+ totalData.REG_USER_TOTAL desc,
+ totalData.JOIN_USER_TOTAL desc,
+ totalData.TOPIC_TOTAL desc,
+ totalData.ISSUE_TOTAL desc,
+ totalData.PROJECT_TOTAL desc
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnGrassRootsGovernMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnGrassRootsGovernMonthlyDao.xml
index f88612d078..4f4e7e96c5 100644
--- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnGrassRootsGovernMonthlyDao.xml
+++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnGrassRootsGovernMonthlyDao.xml
@@ -16,16 +16,37 @@
AND MONTH_ID = #{monthId}
- SELECT MONTH_ID,
- PARTI_PROJECT_TOTAL,
- CLOSED_PROJECT_TOTAL,
- 0 + cast( TRUNCATE ( PROJECT_RESPONSE_RATIO, 1 ) AS CHAR ) AS "projectResponseRatio",
- 0 + cast( TRUNCATE ( PROJECT_SATIS_RATIO, 1 ) AS CHAR ) AS "projectSatisRatio",
- 0 + cast( TRUNCATE ( CLOSED_PROJECT_RATIO, 1 ) AS CHAR ) AS "closedProjectRatio"
- FROM screen_an_grass_roots_govern_monthly
- WHERE DEL_FLAG = 0
- AND ORG_ID = #{agencyId}
- AND YEAR_ID = #{yearId}
+ SELECT
+ d.`month` MONTH_ID,
+ IFNULL(s.PARTI_PROJECT_TOTAL, 0) PARTI_PROJECT_TOTAL,
+ IFNULL(s.CLOSED_PROJECT_TOTAL, 0) CLOSED_PROJECT_TOTAL,
+ IFNULL(s.projectResponseRatio, 0) projectResponseRatio,
+ IFNULL(s.projectSatisRatio, 0) projectSatisRatio,
+ IFNULL(s.closedProjectRatio, 0) closedProjectRatio
+ FROM(
+ SELECT DATE_FORMAT(#{curDate}, '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 1 MONTH), '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 2 MONTH), '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 3 MONTH), '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 4 MONTH), '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 5 MONTH), '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 6 MONTH), '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 7 MONTH), '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 8 MONTH), '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 9 MONTH), '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 10 MONTH), '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 11 MONTH), '%Y%m') AS `month`
+ ) d LEFT JOIN (
+ SELECT MONTH_ID,
+ PARTI_PROJECT_TOTAL,
+ CLOSED_PROJECT_TOTAL,
+ 0 + cast( TRUNCATE ( PROJECT_RESPONSE_RATIO, 1 ) AS CHAR ) AS "projectResponseRatio",
+ 0 + cast( TRUNCATE ( PROJECT_SATIS_RATIO, 1 ) AS CHAR ) AS "projectSatisRatio",
+ 0 + cast( TRUNCATE ( CLOSED_PROJECT_RATIO, 1 ) AS CHAR ) AS "closedProjectRatio"
+ FROM screen_an_grass_roots_govern_monthly
+ WHERE DEL_FLAG = 0
+ AND ORG_ID = #{agencyId}
+ ) s ON d.`month` = s.MONTH_ID
ORDER BY MONTH_ID
@@ -41,4 +62,4 @@
AND MONTH_ID = #{monthId}
ORDER BY PARTI_PROJECT_TOTAL DESC
-
\ No newline at end of file
+
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnGrassRootsOrgMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnGrassRootsOrgMonthlyDao.xml
index 05c17e1378..9bf5d9a061 100644
--- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnGrassRootsOrgMonthlyDao.xml
+++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnGrassRootsOrgMonthlyDao.xml
@@ -14,14 +14,33 @@
AND MONTH_ID = #{monthId}
- SELECT MONTH_ID,
- GROUP_TOTAL,
- ISSUE_TOTAL,
- PROJECT_TOTAL
- FROM screen_an_grass_roots_org_monthly
- WHERE DEL_FLAG = 0
- AND ORG_ID = #{agencyId}
- AND YEAR_ID = #{yearId}
+ SELECT d.`month` MONTH_ID,
+ IFNULL(s.GROUP_TOTAL, 0) GROUP_TOTAL,
+ IFNULL(s.ISSUE_TOTAL, 0) ISSUE_TOTAL,
+ IFNULL(s.PROJECT_TOTAL, 0) PROJECT_TOTAL
+ FROM(
+ SELECT DATE_FORMAT(#{curDate}, '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 1 MONTH), '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 2 MONTH), '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 3 MONTH), '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 4 MONTH), '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 5 MONTH), '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 6 MONTH), '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 7 MONTH), '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 8 MONTH), '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 9 MONTH), '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 10 MONTH), '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 11 MONTH), '%Y%m') AS `month`
+ ) d LEFT JOIN (
+ SELECT
+ MONTH_ID,
+ GROUP_TOTAL,
+ ISSUE_TOTAL,
+ PROJECT_TOTAL
+ FROM screen_an_grass_roots_org_monthly
+ WHERE DEL_FLAG = 0
+ AND ORG_ID = #{agencyId}
+ ) s ON d.`month` = s.MONTH_ID
ORDER BY MONTH_ID
@@ -35,4 +54,4 @@
AND MONTH_ID = #{monthId}
ORDER BY GROUP_TOTAL DESC
-
\ No newline at end of file
+
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnGrassRootsPmTotalMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnGrassRootsPmTotalMonthlyDao.xml
index 6fee665d7f..58b7001046 100644
--- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnGrassRootsPmTotalMonthlyDao.xml
+++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnGrassRootsPmTotalMonthlyDao.xml
@@ -15,20 +15,37 @@
SELECT
- MONTH_ID,
- GROUP_MEMBER_TOTAL,
- TOPIC_TOTAL,
- TOPIC_PARTI_USER_TOTAL,
- ISSUE_TOTAL
- FROM
- screen_an_grass_roots_pm_total_monthly
- WHERE
- DEL_FLAG = '0'
- AND ORG_ID = #{agencyId}
-
- AND MONTH_ID <= #{monthId}
-
- ORDER BY MONTH_ID ASC
- LIMIT 12
+ d.`month` MONTH_ID,
+ IFNULL(s.GROUP_MEMBER_TOTAL, 0) GROUP_MEMBER_TOTAL,
+ IFNULL(s.TOPIC_TOTAL, 0) TOPIC_TOTAL,
+ IFNULL(s.TOPIC_PARTI_USER_TOTAL, 0) TOPIC_PARTI_USER_TOTAL,
+ IFNULL(s.ISSUE_TOTAL, 0) ISSUE_TOTAL
+ FROM(
+ SELECT DATE_FORMAT(#{curDate}, '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 1 MONTH), '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 2 MONTH), '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 3 MONTH), '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 4 MONTH), '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 5 MONTH), '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 6 MONTH), '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 7 MONTH), '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 8 MONTH), '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 9 MONTH), '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 10 MONTH), '%Y%m') AS `month`
+ UNION SELECT DATE_FORMAT((#{curDate} - INTERVAL 11 MONTH), '%Y%m') AS `month`
+ ) d LEFT JOIN (
+ SELECT
+ MONTH_ID,
+ GROUP_MEMBER_TOTAL,
+ TOPIC_TOTAL,
+ TOPIC_PARTI_USER_TOTAL,
+ ISSUE_TOTAL
+ FROM
+ screen_an_grass_roots_pm_total_monthly
+ WHERE
+ DEL_FLAG = '0'
+ AND ORG_ID = #{agencyId}
+ ) s ON d.`month` = s.MONTH_ID
+ ORDER BY MONTH_ID
-
\ No newline at end of file
+
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 32a113f464..9b700fb365 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
@@ -20,7 +20,6 @@ import com.epmet.dto.AgencySubTreeDto;
import com.epmet.dto.extract.form.ExtractOriginFormDTO;
import com.epmet.dto.extract.form.ExtractScreenFormDTO;
import com.epmet.dto.indexcal.CalculateCommonFormDTO;
-import com.epmet.dto.screen.form.ScreenCentralZoneDataFormDTO;
import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyEntity;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyEntity;
@@ -47,7 +46,6 @@ import org.springframework.web.bind.annotation.*;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
-import java.util.Map;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
@@ -660,12 +658,21 @@ public class DemoController {
@Autowired
private PublicPartiTotalDataExtractService publicPartiTotalDataExtractService;
@PostMapping("insertScreenPioneerData")
- public Result insertScreenPioneerData(@RequestParam("customerId") String customerId, @RequestParam("dateId") String dateId) {
+ public Result insertScreenPioneerData(@RequestParam("customerId") String customerId, @RequestParam("dateId") String dateId,@RequestParam("type") String type) {
if (StringUtils.isNotBlank(customerId) && StringUtils.isNotBlank(dateId)) {
- pioneerDataExtractService.extractGridPioneerData(customerId, dateId);
- pioneerDataExtractService.extractCommunityPioneerData(customerId, dateId);
- pioneerDataExtractService.extractExceptCommunityPioneerData(customerId, dateId);
- } else {
+ if ("grid".equals(type)) {
+ pioneerDataExtractService.extractGridPioneerData(customerId, dateId);
+ } else if ("community".equals(type)) {
+ pioneerDataExtractService.extractCommunityPioneerData(customerId, dateId);
+ } else if ("exceptcommunity".equals(type)) {
+ pioneerDataExtractService.extractExceptCommunityPioneerData(customerId, dateId);
+ } else {
+ pioneerDataExtractService.extractGridPioneerData(customerId, dateId);
+ pioneerDataExtractService.extractCommunityPioneerData(customerId, dateId);
+ pioneerDataExtractService.extractExceptCommunityPioneerData(customerId, dateId);
+ }
+ }
+ /*else {
QueryWrapper customerEntityQueryWrapper = new QueryWrapper<>();
List customerEntityList = dimCustomerDao.selectList(customerEntityQueryWrapper);
for (DimCustomerEntity customerEntity : customerEntityList) {
@@ -673,8 +680,8 @@ public class DemoController {
pioneerDataExtractService.extractCommunityPioneerData(customerEntity.getId(), "20200926");
pioneerDataExtractService.extractExceptCommunityPioneerData(customerEntity.getId(), "20200926");
}
- }
- return new Result();
+ }*/
+ return new Result().ok("调用成功");
}
@PostMapping("extractPublicPartiTotalData")
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactOriginExtractController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactOriginExtractController.java
index 2abcd81edd..9542bdc580 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactOriginExtractController.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactOriginExtractController.java
@@ -1,5 +1,7 @@
package com.epmet.controller;
+import com.epmet.commons.tools.utils.ConvertUtils;
+import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.extract.form.ExtractOriginFormDTO;
@@ -11,6 +13,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import java.util.List;
+
/**
* 原始数据清洗
@@ -114,7 +118,15 @@ public class FactOriginExtractController {
**/
@PostMapping("groupdatacleaning")
public Result groupDataCleaning(@RequestBody ExtractOriginFormDTO param) {
- groupExtractService.extractGroupData(param);
+ if(StringUtils.isNotBlank(param.getStartDate()) && StringUtils.isNotBlank(param.getEndDate())){
+ List finalDaysBetween = DateUtils.getDaysBetween(param.getStartDate(), param.getEndDate());
+ ExtractOriginFormDTO paramNew = ConvertUtils.sourceToTarget(param, ExtractOriginFormDTO.class);
+ for (int i = 0; i < finalDaysBetween.size(); i++) {
+ String dateDimId = finalDaysBetween.get(i);
+ paramNew.setDateId(dateDimId);
+ groupExtractService.extractGroupData(paramNew);
+ }
+ }else groupExtractService.extractGroupData(param);
return new Result();
}
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java
index 12e6151f3f..911d8b7993 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java
@@ -18,13 +18,11 @@
package com.epmet.dao.evaluationindex.extract;
import com.epmet.commons.mybatis.dao.BaseDao;
-import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO;
-import com.epmet.dto.extract.result.OrgStatisticsResultDTO;
-import com.epmet.dto.extract.result.PartyCreateGroupCountResultDTO;
import com.epmet.dto.extract.FactOriginGroupMainDailyDTO;
import com.epmet.dto.extract.form.GridHeartedFormDTO;
import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO;
import com.epmet.dto.extract.result.GridGroupUserCountResultDTO;
+import com.epmet.dto.extract.result.OrgStatisticsResultDTO;
import com.epmet.dto.extract.result.PartyCreateGroupCountResultDTO;
import com.epmet.dto.group.result.ExtractGroupMemberActionRecordResultDTO;
import com.epmet.entity.evaluationindex.extract.FactOriginGroupMainDailyEntity;
@@ -164,12 +162,11 @@ public interface FactOriginGroupMainDailyDao extends BaseDao selectPartyCreateGroupInfo(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("gridIds") List gridIds);
+ List selectPartyCreateGroupInfo(@Param("customerId") String customerId, @Param("gridIds") List gridIds);
/**
* desc: 获取所有网格的组中成员人数 去重
@@ -202,4 +199,4 @@ public interface FactOriginGroupMainDailyDao extends BaseDao selectOrgGroupCount(@Param("customerId") String customerId, @Param("monthId") String monthId,
@Param("level") String level);
-}
\ 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
index 9dd9089d97..7154f5997e 100644
--- 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
@@ -108,11 +108,26 @@ public interface FactOriginIssueLogDailyDao extends BaseDao
* @author LiuJanJun
* @date 2020/9/27 1:58 下午
*/
List getVoteCount(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("groupField") String groupField);
+
+ /**
+ * @param customerId
+ * @param gridId
+ * @param agencyPath
+ * @param isParty
+ * @return int
+ * @author yinzuomei
+ * @description 大屏:先锋模范:计算 平台参与议事总人数、平台参与议事党员数
+ * @Date 2021/1/12 15:08
+ **/
+ int selectPlatJoinUserTotal(@Param("customerId") String customerId,
+ @Param("gridId") String gridId,
+ @Param("communityId") String communityId,
+ @Param("agencyPath") String agencyPath,
+ @Param("isParty") String isParty);
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.java
index d107e0e2fe..70a1fee036 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.java
@@ -63,7 +63,7 @@ public interface FactOriginProjectOrgPeriodDailyDao extends BaseDao list);
+ void deleteByProjectIds(@Param("list") List list,@Param("customerId") String customerId);
/**
* @Description 批量插入
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java
index c03d32f1df..2100e779bb 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java
@@ -67,7 +67,12 @@ public class ScreenPioneerDataEntity extends BaseEpmetEntity {
*/
private Integer issueTotal;
- /**
+ /**
+ * 01.12新增:PLAT_ISSUE_TOTAL 平台参与议事总数
+ */
+ private Integer platIssueTotal;
+
+ /**
* 党员参与议事占比
*/
private BigDecimal issueRatio;
@@ -77,6 +82,11 @@ public class ScreenPioneerDataEntity extends BaseEpmetEntity {
*/
private Integer topicTotal;
+ /**
+ * 01.12新增:PLAT_TOPIC_TOTAL 当前组织维度,话题总数,TOPIC_RATIO的分母
+ */
+ private Integer platTopicTotal;
+
/**
* 党员发布话题占比
*/
@@ -87,6 +97,11 @@ public class ScreenPioneerDataEntity extends BaseEpmetEntity {
*/
private Integer publishIssueTotal;
+ /**
+ * 01.12新增:PLAT_PUBLISH_ISSUE_TOTAL 当前组织维度,发布议题总数,PUBLISH_ISSUE_RATIO的分母,SHIFT_PROJECT_RATIO的分母
+ */
+ private Integer platPublishIssueTotal;
+
/**
* 党员发布议题占比
*/
@@ -107,6 +122,10 @@ public class ScreenPioneerDataEntity extends BaseEpmetEntity {
*/
private Integer resolvedProjectTotal;
+ /**
+ * 01.12新增:PLAT_CLOSED_PROJECT_TOTAL 当前组织维度,所有结案项目数,RESOLVED_PROJECT_RATIO的分母
+ */
+ private Integer platClosedProjectTotal;
/**
* 解决项目总数占比
*/
@@ -124,4 +143,20 @@ public class ScreenPioneerDataEntity extends BaseEpmetEntity {
private String pid;
private String agencyPids;
private String agencyPath;
+
+ /**
+ * PLAT_JOIN_USER_TOTAL 平台参与议事总人数
+ */
+ private Integer platJoinUserTotal;
+
+ /**
+ * PLAT_JOIN_PARTY_TOTAL 平台参与议事党员数
+ */
+ private Integer platJoinPartyTotal;
+
+ /**
+ * PLAT_JOIN PARTY_RATIO 平台参与议事的党员占比
+ */
+ private BigDecimal platJoinPartyRatio;
+
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginGroupMainDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginGroupMainDailyService.java
index c9a74e31b8..730acde2c8 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginGroupMainDailyService.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginGroupMainDailyService.java
@@ -68,12 +68,11 @@ public interface FactOriginGroupMainDailyService extends BaseService selectPartyCreateGroupInfo(String customerId, String monthId, List gridIds);
+ List selectPartyCreateGroupInfo(String customerId, List gridIds);
/**
* desc: 获取客户下每个网格小组内的 去重人数
@@ -106,4 +105,4 @@ public interface FactOriginGroupMainDailyService extends BaseService
*/
List getOrgGroupCount(String customerId, String monthId, String level);
-}
\ No newline at end of file
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginIssueLogDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginIssueLogDailyService.java
index 591ff23f55..5bb46392f6 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginIssueLogDailyService.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginIssueLogDailyService.java
@@ -65,4 +65,16 @@ public interface FactOriginIssueLogDailyService extends BaseService getVoteCount(String customerId, String monthId, String groupField);
+
+ /**
+ * @return java.lang.Integer
+ * @param customerId
+ * @param gridId
+ * @param agencyPath
+ * @param isParty
+ * @author yinzuomei
+ * @description 计算 平台参与议事总人数、平台参与议事党员数
+ * @Date 2021/1/12 15:02
+ **/
+ int calPlatJoinUserTotal(String customerId, String gridId, String communityId,String agencyPath, String isParty);
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMainDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMainDailyServiceImpl.java
index ab3efce8b4..94fadea5fe 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMainDailyServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMainDailyServiceImpl.java
@@ -21,8 +21,8 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.dao.evaluationindex.extract.FactOriginGroupMainDailyDao;
import com.epmet.dto.extract.FactOriginGroupMainDailyDTO;
import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO;
-import com.epmet.dto.extract.result.OrgStatisticsResultDTO;
import com.epmet.dto.extract.result.GridGroupUserCountResultDTO;
+import com.epmet.dto.extract.result.OrgStatisticsResultDTO;
import com.epmet.dto.group.result.ExtractGroupMemberActionRecordResultDTO;
import com.epmet.entity.evaluationindex.extract.FactOriginGroupMainDailyEntity;
import com.epmet.service.evaluationindex.extract.todata.FactOriginGroupMainDailyService;
@@ -85,19 +85,21 @@ public class FactOriginGroupMainDailyServiceImpl extends BaseServiceImpl originGroupData, List memberList,List missing) {
- if (isFirst) {
- //isFirst
- baseDao.deleteBatchMemberByCustomerId(customerId,null,null);
- } else {
- if(StringUtils.isNotBlank(dateId)){
- baseDao.deleteBatchMemberByCustomerId(customerId,dateId,"date");
+ if(!CollectionUtils.isEmpty(originGroupData)) {
+ if (isFirst) {
+ //isFirst
+ baseDao.deleteBatchMemberByCustomerId(customerId, null, null);
+ } else {
+ if (StringUtils.isNotBlank(dateId)) {
+ baseDao.deleteBatchMemberByCustomerId(customerId, dateId, "date");
+ }
}
- }
- //删除要插入的组主表数据
- baseDao.deleteBatchByGroupId(customerId,originGroupData.stream().map(FactOriginGroupMainDailyDTO :: getId).distinct().collect(Collectors.toList()));
+ //删除要插入的组主表数据
+ baseDao.deleteBatchByGroupId(customerId, originGroupData.stream().map(FactOriginGroupMainDailyDTO::getId).distinct().collect(Collectors.toList()));
- baseDao.insertBatchMain(originGroupData);
- baseDao.insertBatchMembers(memberList);
+ baseDao.insertBatchMain(originGroupData);
+ baseDao.insertBatchMembers(memberList);
+ }
if(!CollectionUtils.isEmpty(missing)){
baseDao.deleteBatchByGroupId(customerId,missing);
baseDao.deleteMemberByGroupList(customerId,missing);
@@ -106,16 +108,15 @@ public class FactOriginGroupMainDailyServiceImpl extends BaseServiceImpl selectPartyCreateGroupInfo(String customerId, String monthId, List gridIds) {
+ public List selectPartyCreateGroupInfo(String customerId, List gridIds) {
if (!CollectionUtils.isEmpty(gridIds)) {
- return baseDao.selectPartyCreateGroupInfo(customerId, monthId, gridIds);
+ return baseDao.selectPartyCreateGroupInfo(customerId, gridIds);
}
return new ArrayList<>();
}
@@ -135,4 +136,4 @@ public class FactOriginGroupMainDailyServiceImpl extends BaseServiceImpl getVoteCount(String customerId, String monthId, String groupField) {
return baseDao.getVoteCount(customerId, monthId, groupField);
}
+
+ /**
+ * @param customerId
+ * @param gridId
+ * @param agencyPath
+ * @param isParty
+ * @return java.lang.Integer
+ * @author yinzuomei
+ * @description 计算 平台参与议事总人数、平台参与议事党员数
+ * @Date 2021/1/12 15:02
+ **/
+ @Override
+ public int calPlatJoinUserTotal(String customerId, String gridId,String communityId, String agencyPath, String isParty) {
+ return baseDao.selectPlatJoinUserTotal(customerId,gridId,communityId,agencyPath,isParty);
+ }
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/GroupExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/GroupExtractServiceImpl.java
index dedb5bc3a3..6f6451114d 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/GroupExtractServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/GroupExtractServiceImpl.java
@@ -1,5 +1,6 @@
package com.epmet.service.evaluationindex.extract.todata.impl;
+import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.utils.DateUtils;
@@ -84,10 +85,10 @@ public class GroupExtractServiceImpl implements GroupExtractService {
List originGroupData = groupDataService.extractGroupData(
count <= NumConstant.ZERO,
param.getCustomerId(), param.getDateId());
-
+ log.info("extractGroupData extractGroupData:result:{},param:{}", JSON.toJSONString(originGroupData), JSON.toJSONString(param));
List memberList = new LinkedList<>();
if (!CollectionUtils.isEmpty(originGroupData)) {
- List gridList = dimGridService.getGridAttributes(param.getCustomerId(),originGroupData.stream().map(FactOriginGroupMainDailyDTO::getGridId).distinct().collect(Collectors.toList()));
+ List gridList = dimGridService.getGridAttributes(param.getCustomerId(),null);
if (!CollectionUtils.isEmpty(gridList)) {
Map gridMap =
@@ -160,7 +161,7 @@ public class GroupExtractServiceImpl implements GroupExtractService {
factOriginGroupMainDailyService.insertExtractedData(
- count <= NumConstant.ZERO ? true : false,
+ count <= NumConstant.ZERO,
param.getCustomerId(),
param.getDateId(),
originGroupData,
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/IssueExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/IssueExtractServiceImpl.java
index 20169ae538..b7b4532f4f 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/IssueExtractServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/IssueExtractServiceImpl.java
@@ -22,6 +22,7 @@ import com.epmet.service.evaluationindex.extract.todata.IssueExtractService;
import com.epmet.service.topic.TopicService;
import com.epmet.service.user.UserService;
import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -129,7 +130,11 @@ public class IssueExtractServiceImpl implements IssueExtractService {
agencyInfoList.forEach(pid -> {
if (r.getAgencyId().equals(pid.getAgencyId())){
r.setPid(pid.getPid());
- r.setPids(pid.getPids().concat(":").concat(r.getAgencyId()));
+ if (StringUtils.isNotBlank(pid.getPids())) {
+ r.setPids(pid.getPids().concat(":").concat(r.getAgencyId()));
+ } else {
+ r.setPids(r.getAgencyId());
+ }
}
});
});
@@ -231,7 +236,11 @@ public class IssueExtractServiceImpl implements IssueExtractService {
agencyInfoList.forEach(agency -> {
if (r.getAgencyId().equals(agency.getAgencyId())){
r.setPid(agency.getPid());
- r.setPids(agency.getPids().concat(":").concat(r.getAgencyId()));
+ if(StringUtils.isNotBlank(agency.getPids())){
+ r.setPids(agency.getPids().concat(":").concat(r.getAgencyId()));
+ }else{
+ r.setPids(r.getAgencyId());
+ }
}
});
});
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java
index 63b158e72c..35b5bbd577 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java
@@ -439,7 +439,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService {
if(!CollectionUtils.isEmpty(formattingData)) {
List projectIds = formattingData.stream().map(FactOriginProjectOrgPeriodDailyEntity::getProjectId).distinct().collect(Collectors.toList());
if (!CollectionUtils.isEmpty(projectIds)) {
- factOriginProjectOrgPeriodDailyDao.deleteByProjectIds(projectIds);
+ factOriginProjectOrgPeriodDailyDao.deleteByProjectIds(null,param.getCustomerId());
factOriginProjectOrgPeriodDailyDao.insertBatch(formattingData);
}
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyBaseInfoServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyBaseInfoServiceImpl.java
index f0999a4605..a7435b914e 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyBaseInfoServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyBaseInfoServiceImpl.java
@@ -129,7 +129,8 @@ public class PartyBaseInfoServiceImpl implements PartyBaseInfoService {
form.setAgeLevel4(party.stream().collect(Collectors.summingInt(PartyBaseInfoFormDTO::getAgeLevel4)));
form.setAgeLevel5(party.stream().collect(Collectors.summingInt(PartyBaseInfoFormDTO::getAgeLevel5)));
form.setAgeLevel6(party.stream().collect(Collectors.summingInt(PartyBaseInfoFormDTO::getAgeLevel6)));
- form.setPartyMemberCount(party.stream().collect(Collectors.summingInt(PartyBaseInfoFormDTO::getPartyMemberCount)));
+// form.setPartyMemberCount(party.stream().collect(Collectors.summingInt(PartyBaseInfoFormDTO::getPartyMemberCount)));
+ form.setPartyMemberCount(calPartyMemberCount(form));
form.setResiTotal(party.stream().collect(Collectors.summingInt(PartyBaseInfoFormDTO::getResiTotal)));
form.setRegisterUserCount(party.stream().collect(Collectors.summingInt(PartyBaseInfoFormDTO::getRegisterUserCount)));
result.add(form);
@@ -175,6 +176,7 @@ public class PartyBaseInfoServiceImpl implements PartyBaseInfoService {
form.setAgeLevel4(disposeAgeArea(partyInfos,NumConstant.FORTY_ONE,NumConstant.FIFTY));
form.setAgeLevel5(disposeAgeArea(partyInfos,NumConstant.FIFTY_ONE,NumConstant.SIXTY));
form.setAgeLevel6(disposeAge(partyInfos,NumConstant.SIXTY,true));
+ form.setPartyMemberCount(calPartyMemberCount(form));
form.setCustomerId(customerId);
form.setDataEndTime(dateId);
form.setParentId(partyInfos.get(NumConstant.ZERO).getAgencyId());
@@ -183,7 +185,7 @@ public class PartyBaseInfoServiceImpl implements PartyBaseInfoService {
if (gridId.equals(user.getOrgId())){
form.setResiTotal(user.getResiTotal());
form.setRegisterUserCount(user.getRegisterUserCount());
- form.setPartyMemberCount(user.getPartyMemberCount());
+// form.setPartyMemberCount(user.getPartyMemberCount());
}
});
}
@@ -210,7 +212,8 @@ public class PartyBaseInfoServiceImpl implements PartyBaseInfoService {
form.setAgeLevel4(partyInfoList.stream().collect(Collectors.summingInt(PartyInfoResultDTO::getAgeLevel4)));
form.setAgeLevel5(partyInfoList.stream().collect(Collectors.summingInt(PartyInfoResultDTO::getAgeLevel5)));
form.setAgeLevel6(partyInfoList.stream().collect(Collectors.summingInt(PartyInfoResultDTO::getAgeLevel6)));
- form.setPartyMemberCount(partyInfoList.stream().collect(Collectors.summingInt(PartyInfoResultDTO::getPartyMemberCount)));
+// form.setPartyMemberCount(partyInfoList.stream().collect(Collectors.summingInt(PartyInfoResultDTO::getPartyMemberCount)));
+ form.setPartyMemberCount(calPartyMemberCount(form));
form.setResiTotal(partyInfoList.stream().collect(Collectors.summingInt(PartyInfoResultDTO::getResiTotal)));
form.setRegisterUserCount(partyInfoList.stream().collect(Collectors.summingInt(PartyInfoResultDTO::getRegisterUserCount)));
result.add(form);
@@ -361,6 +364,7 @@ public class PartyBaseInfoServiceImpl implements PartyBaseInfoService {
form.setAgeLevel3(disposeAgeArea(partyInfos,NumConstant.THIRTY_ONE,NumConstant.FORTY));
form.setAgeLevel4(disposeAgeArea(partyInfos,NumConstant.FORTY_ONE,NumConstant.FIFTY));
form.setAgeLevel5(disposeAgeArea(partyInfos,NumConstant.FIFTY_ONE,NumConstant.SIXTY));
+ form.setPartyMemberCount(calPartyMemberCount(form));
form.setAgeLevel6(disposeAge(partyInfos,NumConstant.SIXTY,true));
form.setCustomerId(customerId);
form.setDataEndTime(dateId);
@@ -370,7 +374,7 @@ public class PartyBaseInfoServiceImpl implements PartyBaseInfoService {
if (gridId.equals(user.getOrgId())){
form.setResiTotal(user.getResiTotal());
form.setRegisterUserCount(user.getRegisterUserCount());
- form.setPartyMemberCount(user.getPartyMemberCount());
+// form.setPartyMemberCount(user.getPartyMemberCount());
}
});
}
@@ -379,4 +383,9 @@ public class PartyBaseInfoServiceImpl implements PartyBaseInfoService {
}
return new GridPartyDTO(orgIds, result);
}
+
+ public Integer calPartyMemberCount(PartyBaseInfoFormDTO form){
+ Integer result = form.getAgeLevel1() + form.getAgeLevel2() + form.getAgeLevel3() + form.getAgeLevel4() + form.getAgeLevel5() + form.getAgeLevel6();
+ return result;
+ }
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyGuideServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyGuideServiceImpl.java
index 74f7b84d27..2e31f8ae4a 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyGuideServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyGuideServiceImpl.java
@@ -1,11 +1,9 @@
package com.epmet.service.evaluationindex.extract.toscreen.impl;
-import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.constant.ScreenConstant;
import com.epmet.dto.extract.form.ExtractScreenFormDTO;
-import com.epmet.dto.extract.form.ScreenExtractFormDTO;
import com.epmet.dto.extract.form.ScreenPartyBranchDataFormDTO;
import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO;
import com.epmet.dto.extract.result.*;
@@ -185,22 +183,22 @@ public class PartyGuideServiceImpl implements PartyGuideService {
// 判断当前级别agency是否为空
if (!CollectionUtils.isEmpty(agencyIdList)){
// 获取agencyIds
- List orgIds = agencyIdList.stream().map(m -> m.getAgencyId()).collect(Collectors.toList());
- if (isGrid == true){
+ List orgIds = agencyIdList.stream().map(CustomerAgencyInfoResultDTO::getAgencyId).collect(Collectors.toList());
+ if (isGrid) {
agencyIdList.forEach(agency -> {
// 计算社区级别的下级(实际就是网格)
- GridPartyGuideDTO gridPartyGuideDTO = communityLevelSubGrid(customerId, monthId, agency);
+ GridPartyGuideDTO gridPartyGuideDTO = communityLevelSubGrid(customerId, agency);
orgIds.addAll(gridPartyGuideDTO.getOrgIds());
result.addAll(gridPartyGuideDTO.getResult());
});
// 根据agencyId分组,计算各个社区的
Map> groupByAgency = result.stream().collect(Collectors.groupingBy(ScreenPartyLinkMassesDataFormDTO::getParentId));
- groupByAgency.forEach((agencyId,gridList) -> {
+ groupByAgency.forEach((agencyId, gridList) -> {
ScreenPartyLinkMassesDataFormDTO form = new ScreenPartyLinkMassesDataFormDTO();
List orgNameAgencyList = agencyService.selectOrgNameAgency(orgIds);
if (!CollectionUtils.isEmpty(orgNameAgencyList)){
orgNameAgencyList.forEach(name -> {
- if (agencyId.equals(name.getAgencyId())){
+ if (agencyId.equals(name.getAgencyId())) {
form.setOrgName(name.getAgencyName());
form.setParentId(name.getParentId());
}
@@ -210,8 +208,8 @@ public class PartyGuideServiceImpl implements PartyGuideService {
form.setCustomerId(customerId);
form.setDataEndTime(monthId);
form.setOrgType(ScreenConstant.AGENCY);
- form.setCreateGroupTotal(gridList.stream().collect(Collectors.summingInt(ScreenPartyLinkMassesDataFormDTO::getCreateGroupTotal)));
- form.setGroupUserTotal(gridList.stream().collect(Collectors.summingInt(ScreenPartyLinkMassesDataFormDTO::getGroupUserTotal)));
+ form.setCreateGroupTotal(gridList.stream().mapToInt(ScreenPartyLinkMassesDataFormDTO::getCreateGroupTotal).sum());
+ form.setGroupUserTotal(gridList.stream().mapToInt(ScreenPartyLinkMassesDataFormDTO::getGroupUserTotal).sum());
result.add(form);
});
delAndInsertLink(result,customerId,monthId,orgIds);
@@ -227,15 +225,15 @@ public class PartyGuideServiceImpl implements PartyGuideService {
}
});
// 不为空 存在直属网格
- if (!CollectionUtils.isEmpty(disGridIds)){
+ if (!CollectionUtils.isEmpty(disGridIds)) {
List gridResult = new ArrayList<>();
// 查询党员创建组,组内成员数
- List partyLinkMassesDataList = groupMainService.selectPartyCreateGroupInfo(customerId, monthId, disGridIds);
- List orgNameList = agencyService.selectOrgNameGrid(partyLinkMassesDataList.stream().map(m -> m.getOrgId()).collect(Collectors.toList()));
- if (!CollectionUtils.isEmpty(partyLinkMassesDataList)){
+ List partyLinkMassesDataList = groupMainService.selectPartyCreateGroupInfo(customerId, disGridIds);
+ List orgNameList = agencyService.selectOrgNameGrid(partyLinkMassesDataList.stream().map(ScreenPartyLinkMassesDataFormDTO::getOrgId).collect(Collectors.toList()));
+ if (!CollectionUtils.isEmpty(partyLinkMassesDataList)) {
partyLinkMassesDataList.forEach(party -> {
orgNameList.forEach(org -> {
- if (party.getOrgId().equals(org.getGridId())){
+ if (party.getOrgId().equals(org.getGridId())) {
party.setOrgName(org.getGridName());
}
});
@@ -246,10 +244,10 @@ public class PartyGuideServiceImpl implements PartyGuideService {
delAndInsertLink(gridResult,customerId,monthId,disGridIds);
}
// 查询直属网格的信息 + 下级机关的信息 = agency的机关信息
- List screenPartyLinkMassesDataGrid = groupMainService.selectPartyCreateGroupInfo(customerId, monthId, disGridIds);
+ List screenPartyLinkMassesDataGrid = groupMainService.selectPartyCreateGroupInfo(customerId, disGridIds);
List screenPartyLinkMassesDataList = linkMassesDataService.selectPartyLinkMassesInfo(customerId, monthId, agencyId);
screenPartyLinkMassesDataList.addAll(screenPartyLinkMassesDataGrid);
- if (!CollectionUtils.isEmpty(screenPartyLinkMassesDataList)){
+ if (!CollectionUtils.isEmpty(screenPartyLinkMassesDataList)) {
ScreenPartyLinkMassesDataFormDTO form = new ScreenPartyLinkMassesDataFormDTO();
form.setOrgId(agencyId);
form.setOrgType(ScreenConstant.AGENCY);
@@ -257,8 +255,8 @@ public class PartyGuideServiceImpl implements PartyGuideService {
form.setCustomerId(customerId);
form.setDataEndTime(monthId);
form.setParentId(screenPartyLinkMassesDataList.get(NumConstant.ZERO).getParentId());
- form.setGroupUserTotal(screenPartyLinkMassesDataList.stream().collect(Collectors.summingInt(ScreenPartyLinkMassesDataFormDTO::getGroupUserTotal)));
- form.setCreateGroupTotal(screenPartyLinkMassesDataList.stream().collect(Collectors.summingInt(ScreenPartyLinkMassesDataFormDTO::getCreateGroupTotal)));
+ form.setGroupUserTotal(screenPartyLinkMassesDataList.stream().mapToInt(ScreenPartyLinkMassesDataFormDTO::getGroupUserTotal).sum());
+ form.setCreateGroupTotal(screenPartyLinkMassesDataList.stream().mapToInt(ScreenPartyLinkMassesDataFormDTO::getCreateGroupTotal).sum());
result.add(form);
}
});
@@ -431,24 +429,23 @@ public class PartyGuideServiceImpl implements PartyGuideService {
}
/**
- * @Description 社区级别的处理
+ * @Description 社区级别的处理
* @Param customerId
- * @Param monthId
* @Param agency
* @author zxc
* @date 2020/9/25 10:06 上午
*/
- public GridPartyGuideDTO communityLevelSubGrid(String customerId, String monthId, CustomerAgencyInfoResultDTO agency){
+ public GridPartyGuideDTO communityLevelSubGrid(String customerId, CustomerAgencyInfoResultDTO agency) {
String agencyId = agency.getAgencyId();
// 获取下级所有agencyId【根据agencyMap中的level判断下级orgId是否是gridId】(此处直接作为gridId)
Map agencyMap = agencyService.selectAllSubAgencyId(agencyId, customerId);
List gridIds = (List) agencyMap.get(agencyId);
- List partyLinkMassesDataList = groupMainService.selectPartyCreateGroupInfo(customerId, monthId, gridIds);
+ List partyLinkMassesDataList = groupMainService.selectPartyCreateGroupInfo(customerId, gridIds);
List orgIds = partyLinkMassesDataList.stream().map(m -> m.getOrgId()).collect(Collectors.toList());
List orgNameList = agencyService.selectOrgNameGrid(orgIds);
partyLinkMassesDataList.forEach(party -> {
orgNameList.forEach(orgName -> {
- if (party.getOrgId().equals(orgName.getGridId())){
+ if (party.getOrgId().equals(orgName.getGridId())) {
party.setOrgName(orgName.getGridName());
}
});
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PioneerDataExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PioneerDataExtractServiceImpl.java
index f41366eb13..3041ba742e 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PioneerDataExtractServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PioneerDataExtractServiceImpl.java
@@ -66,56 +66,76 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
//何为参与: 议题的表决行为次数总计
//1、党员参与议事
entity.setIssueTotal(calPartyPartiIssueTotal(customerId,gridId,null,null,NumConstant.ONE_STR));
+ log.info("extractGridPioneerData 当前网格id=" + gridId + ";党员参与议事issueTotal="+entity.getIssueTotal());
+
+ //01.12新增:平台参与议事总数
+ int issueTotal=calPartyPartiIssueTotal(customerId,gridId,null,null,null);
+ entity.setPlatIssueTotal(issueTotal);
+ log.info("extractGridPioneerData 当前网格id=" + gridId + ";参与议事总数issueTotal=" + issueTotal);
+
+ //2、党员参与议事占比
if(entity.getIssueTotal()==0){
entity.setIssueRatio(BigDecimal.ZERO);
}else{
- //2、党员参与议事占比
- int issueTotal=calPartyPartiIssueTotal(customerId,gridId,null,null,null);
- BigDecimal issueRatio=new BigDecimal(entity.getIssueTotal()/issueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED));
+ BigDecimal issueRatio = new BigDecimal((double) entity.getIssueTotal() / issueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED));
+ log.info("extractGridPioneerData 当前网格id=" + gridId + ";issueRatio=" + issueRatio);
entity.setIssueRatio(issueRatio.setScale(NumConstant.SIX,RoundingMode.HALF_UP));
}
//3、党员发布话题:
entity.setTopicTotal(getTopicTotal(customerId, gridId, null));
+ log.info("extractGridPioneerData 当前网格id=" + gridId + ";党员发布话题topicTotal"+entity.getTopicTotal());
+
+ //当前网格内所有话题总数
+ int gridTopicTotal = getGridOrCommunityTopicTotal(customerId, gridId, null);
+ log.info("extractGridPioneerData 当前网格id=" + gridId + ";当前网格内所有话题总数gridTopicTotal="+gridTopicTotal);
+ //01.12新增:PLAT_TOPIC_TOTAL 当前组织维度,话题总数
+ entity.setPlatTopicTotal(gridTopicTotal);
+
//4、党员发布话题占比: 网格内注册党员发布的话题总数占 网格内话题总数的 比率
if (entity.getTopicTotal() == NumConstant.ZERO) {
entity.setTopicRatio(BigDecimal.ZERO);
} else {
- //当前网格内所有话题总数
- int gridTopicTotal = getGridOrCommunityTopicTotal(customerId, gridId, null);
if(gridTopicTotal == NumConstant.ZERO){
entity.setTopicRatio(BigDecimal.ZERO);
}else{
- BigDecimal topicRatio=new BigDecimal(entity.getTopicTotal() / gridTopicTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED));
+ BigDecimal topicRatio = new BigDecimal((double) entity.getTopicTotal() / gridTopicTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED));
+ log.info("extractGridPioneerData 当前网格id=" + gridId + ";党员发布话题占比topicRatio="+topicRatio);
entity.setTopicRatio(topicRatio.setScale(NumConstant.SIX, RoundingMode.HALF_UP));
}
}
//当前网格内所有议题总数
int gridIssueTotal = getGridOrCommunityIssueTotal(customerId, gridId, null);
+ log.info("extractGridPioneerData 当前网格id=" + gridId + ";当前网格内所有议题总数=" + gridIssueTotal);
+ //01.12新增:PLAT_PUBLISH_ISSUE_TOTAL 当前组织维度,发布议题总数
+ entity.setPlatPublishIssueTotal(gridIssueTotal);
+
if (gridIssueTotal != NumConstant.ZERO) {
//5、党员发布议题
entity.setPublishIssueTotal(getParyPublishIssueTotal(customerId, gridId, null));
+ log.info("extractGridPioneerData 当前网格id=" + gridId + ";党员发布议题publishIssueTotal"+entity.getPublishIssueTotal());
//6、党员发布议题占比 : 占网格内所有议题的比率
if (entity.getPublishIssueTotal() == NumConstant.ZERO) {
entity.setPublishIssueRatio(BigDecimal.ZERO);
}else{
- BigDecimal publishIssueRatio=new BigDecimal(entity.getPublishIssueTotal() / gridIssueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED));
+ BigDecimal publishIssueRatio=new BigDecimal((double)entity.getPublishIssueTotal() / gridIssueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED));
entity.setPublishIssueRatio(publishIssueRatio.setScale(NumConstant.SIX, RoundingMode.HALF_UP));
}
//7、议题转项目数
entity.setShiftProjectTotal(getGridOrCommunityShiftProjectTotal(customerId, gridId, null));
+ log.info("extractGridPioneerData 当前网格id=" + gridId +";议题转项目数shiftProjectTotal="+entity.getShiftProjectTotal());
//8、议题转项目占比 : 占网格内议题总数的比率
if(entity.getShiftProjectTotal() == NumConstant.ZERO){
entity.setShiftProjectRatio(BigDecimal.ZERO);
}else{
- BigDecimal shiftProjectRatio=new BigDecimal(entity.getShiftProjectTotal() / gridIssueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED));
+ BigDecimal shiftProjectRatio = new BigDecimal((double) entity.getShiftProjectTotal() / gridIssueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED));
entity.setShiftProjectRatio(shiftProjectRatio.setScale(NumConstant.SIX, RoundingMode.HALF_UP));
}
}else{
-// log.info("当前网格内所有议题总数="+gridIssueTotal);
+ log.info("extractGridPioneerData 当前网格id="+gridId+";当前网格内所有议题总数 gridIssueTotal =0 ");
entity.setPublishIssueTotal(NumConstant.ZERO);
entity.setPublishIssueRatio(BigDecimal.ZERO);
entity.setShiftProjectTotal(NumConstant.ZERO);
@@ -125,18 +145,34 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
// 9、已解决项目
entity.setResolvedProjectTotal(getGridOrCommunityClosedProjectTotal(customerId, gridId, null, DimObjectStatusConstant.RESOLVED));
+ log.info("extractGridPioneerData 当前网格id="+gridId+";已解决项目resolvedProjectTotal="+entity.getResolvedProjectTotal());
+
+ int closedProjectTotal = getGridOrCommunityClosedProjectTotal(customerId, gridId, null, null);
+ log.info("extractGridPioneerData 当前网格id="+gridId+";总结项目closedProjectTotal="+closedProjectTotal);
+ // 01.12新增:PLAT_CLOSED_PROJECT_TOTAL 当前组织维度,所有结案项目数
+ entity.setPlatClosedProjectTotal(closedProjectTotal);
+
+ // 10、占总结项目
if (entity.getResolvedProjectTotal() == NumConstant.ZERO) {
entity.setResolvedProjectRatio(BigDecimal.ZERO);
} else {
- // 10、占总结项目
- int closedProjectTotal = getGridOrCommunityClosedProjectTotal(customerId, gridId, null, null);
if(closedProjectTotal == NumConstant.ZERO){
entity.setResolvedProjectRatio(BigDecimal.ZERO);
}else {
- BigDecimal resolvedProjectRatio=new BigDecimal(entity.getResolvedProjectTotal() / closedProjectTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED));
+ BigDecimal resolvedProjectRatio = new BigDecimal((double) entity.getResolvedProjectTotal() / closedProjectTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED));
entity.setResolvedProjectRatio(resolvedProjectRatio.setScale(NumConstant.SIX, RoundingMode.HALF_UP));
}
}
+ //01.12: 新增指标:平台参与议事总人数、平台参与议事党员数、平台参与议事的党员占比
+ entity.setPlatJoinUserTotal(factOriginIssueLogDailyService.calPlatJoinUserTotal(customerId, gridId, null, null,null));
+ entity.setPlatJoinPartyTotal(factOriginIssueLogDailyService.calPlatJoinUserTotal(customerId, gridId, null, null,NumConstant.ONE_STR));
+ if (entity.getPlatJoinPartyTotal() == NumConstant.ZERO) {
+ entity.setPlatJoinPartyRatio(BigDecimal.ZERO);
+ } else {
+ BigDecimal platJoinPartyRatio = new BigDecimal((double) entity.getPlatJoinPartyTotal() / entity.getPlatJoinUserTotal()).multiply(new BigDecimal(NumConstant.ONE_HUNDRED));
+ entity.setPlatJoinPartyRatio(platJoinPartyRatio.setScale(NumConstant.SIX, RoundingMode.HALF_UP));
+ }
+
});
screenPioneerDataService.delAndSavePioneerData(customerId, OrgTypeConstant.GRID, IndexCalConstant.DELETE_SIZE, gridList);
}
@@ -172,42 +208,60 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
String communityId = entity.getOrgId();
//1、党员参与议事
entity.setIssueTotal(calPartyPartiIssueTotal(customerId,null,communityId,null,NumConstant.ONE_STR));
+ log.info("extractCommunityPioneerData 当前communityId="+communityId+";党员参与议事issueTotal="+entity.getIssueTotal());
+
+ //01.12新增
+ int issueTotal=calPartyPartiIssueTotal(customerId,null,communityId,null,null);
+ log.info("extractCommunityPioneerData 当前communityId="+communityId+";参与议事总数issueTotal="+issueTotal);
+ entity.setPlatIssueTotal(issueTotal);
+
if(entity.getIssueTotal()==0){
entity.setIssueRatio(BigDecimal.ZERO);
}else{
//2、党员参与议事占比
- int issueTotal=calPartyPartiIssueTotal(customerId,null,communityId,null,null);
- entity.setIssueRatio(new BigDecimal(entity.getIssueTotal()/issueTotal).setScale(NumConstant.SIX,RoundingMode.HALF_UP));
+ entity.setIssueRatio(new BigDecimal((double)entity.getIssueTotal()/issueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.SIX,RoundingMode.HALF_UP));
}
//3、党员发布话题:
entity.setTopicTotal(getTopicTotal(customerId, null, communityId));
+ log.info("extractCommunityPioneerData 当前communityId="+communityId+";党员发布话题topicTotal="+entity.getTopicTotal());
+
+ //01.12新增
+ //当前社区内所有话题总数
+ int communityTopicTotal = getGridOrCommunityTopicTotal(customerId, null, communityId);
+ log.info("extractCommunityPioneerData 当前communityId="+communityId+";当前社区内所有话题总数communityTopicTotal="+communityTopicTotal);
+ entity.setPlatTopicTotal(communityTopicTotal);
+
//4、党员发布话题占比: 社区内注册党员发布的话题总数占 社区内话题总数的 比率
if (entity.getTopicTotal() == NumConstant.ZERO) {
entity.setTopicRatio(BigDecimal.ZERO);
} else {
- //当前社区内所有话题总数
- int communityTopicTotal = getGridOrCommunityTopicTotal(customerId, null, communityId);
- entity.setTopicRatio(communityTopicTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getTopicTotal() / communityTopicTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
+ entity.setTopicRatio(communityTopicTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal((double)entity.getTopicTotal() / communityTopicTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
}
+ //01.12新增
//当前社区内所有议题总数
int communityIssueTotal = getGridOrCommunityIssueTotal(customerId, null, communityId);
+ log.info("extractCommunityPioneerData 当前communityId="+communityId+";当前社区内所有议题总数communityIssueTotal="+communityIssueTotal);
+ entity.setPlatPublishIssueTotal(communityIssueTotal);
+
if (communityIssueTotal != NumConstant.ZERO) {
//5、党员发布议题
entity.setPublishIssueTotal(getParyPublishIssueTotal(customerId, null, communityId));
+ log.info("extractCommunityPioneerData 当前communityId="+communityId+";党员发布议题publishIssueTotal="+entity.getPublishIssueTotal());
//6、党员发布议题占比 : 占社区内所有议题的比率
if (entity.getPublishIssueTotal() == NumConstant.ZERO) {
entity.setPublishIssueRatio(BigDecimal.ZERO);
}
- entity.setPublishIssueRatio(communityIssueTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getPublishIssueTotal() / communityIssueTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
+ entity.setPublishIssueRatio(communityIssueTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal((double)entity.getPublishIssueTotal() / communityIssueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
//7、议题转项目数
entity.setShiftProjectTotal(getGridOrCommunityShiftProjectTotal(customerId, null, communityId));
+ log.info("extractCommunityPioneerData 当前communityId="+communityId+";议题转项目数shiftProjectTotal="+entity.getShiftProjectTotal());
//8、议题转项目占比 : 占社区内议题总数的比率
- entity.setShiftProjectRatio(entity.getShiftProjectTotal() == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getShiftProjectTotal() / communityIssueTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
+ entity.setShiftProjectRatio(entity.getShiftProjectTotal() == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal((double)entity.getShiftProjectTotal() / communityIssueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
}else{
-// log.info("当前社区内所有议题总数="+communityIssueTotal);
+ log.info("extractCommunityPioneerData 当前communityId="+communityId+"communityIssueTotal =0");
entity.setPublishIssueTotal(NumConstant.ZERO);
entity.setPublishIssueRatio(BigDecimal.ZERO);
entity.setShiftProjectTotal(NumConstant.ZERO);
@@ -217,12 +271,28 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
// 9、已解决项目
entity.setResolvedProjectTotal(getGridOrCommunityClosedProjectTotal(customerId, null, communityId, DimObjectStatusConstant.RESOLVED));
+ log.info("extractCommunityPioneerData 当前communityId="+communityId+";已解决项目resolvedProjectTotal="+entity.getResolvedProjectTotal());
+
+ //01.12新增
+ int closedProjectTotal = getGridOrCommunityClosedProjectTotal(customerId, null, communityId, null);
+ log.info("extractCommunityPioneerData 当前communityId="+communityId+";总结项目closedProjectTotal="+closedProjectTotal);
+ entity.setPlatClosedProjectTotal(closedProjectTotal);
+
if (entity.getResolvedProjectTotal() == NumConstant.ZERO) {
entity.setResolvedProjectRatio(BigDecimal.ZERO);
} else {
// 10、占总结项目
- int closedProjectTotal = getGridOrCommunityClosedProjectTotal(customerId, null, communityId, null);
- entity.setResolvedProjectRatio(closedProjectTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getResolvedProjectTotal() / closedProjectTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
+ entity.setResolvedProjectRatio(closedProjectTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal((double)entity.getResolvedProjectTotal() / closedProjectTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
+ }
+
+ //01.12: 新增指标:平台参与议事总人数、平台参与议事党员数、平台参与议事的党员占比
+ entity.setPlatJoinUserTotal(factOriginIssueLogDailyService.calPlatJoinUserTotal(customerId, null, communityId,null, null));
+ entity.setPlatJoinPartyTotal(factOriginIssueLogDailyService.calPlatJoinUserTotal(customerId, null, communityId,null, NumConstant.ONE_STR));
+ if (entity.getPlatJoinPartyTotal() == NumConstant.ZERO) {
+ entity.setPlatJoinPartyRatio(BigDecimal.ZERO);
+ } else {
+ BigDecimal platJoinPartyRatio = new BigDecimal((double) entity.getPlatJoinPartyTotal() / entity.getPlatJoinUserTotal()).multiply(new BigDecimal(NumConstant.ONE_HUNDRED));
+ entity.setPlatJoinPartyRatio(platJoinPartyRatio.setScale(NumConstant.SIX, RoundingMode.HALF_UP));
}
});
screenPioneerDataService.delAndSavePioneerData(customerId, OrgTypeConstant.AGENCY, IndexCalConstant.DELETE_SIZE, communityList);
@@ -243,44 +313,63 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
} else {
entity.setAgencyPath(entity.getAgencyPids().concat(StrConstant.COLON).concat(entity.getOrgId()));
}
+ log.info("extractExceptCommunityPioneerData 当前orgId="+entity.getOrgId()+";agencyPath="+entity.getAgencyPath());
//1、党员参与议事
entity.setIssueTotal(calPartyPartiIssueTotal(customerId,null,null,entity.getAgencyPath(),NumConstant.ONE_STR));
+ log.info("extractExceptCommunityPioneerData 党员参与议事issueTotal="+entity.getIssueTotal());
+
+ //01.12新增
+ int issueTotal=calPartyPartiIssueTotal(customerId,null,null,entity.getAgencyPath(),null);
+ log.info("extractExceptCommunityPioneerData 平台参与议事issueTotal="+issueTotal);
+ entity.setPlatIssueTotal(issueTotal);
+
if(entity.getIssueTotal()==0){
entity.setIssueRatio(BigDecimal.ZERO);
}else{
//2、党员参与议事占比
- int issueTotal=calPartyPartiIssueTotal(customerId,null,null,entity.getAgencyPath(),null);
- entity.setIssueRatio(new BigDecimal(entity.getIssueTotal()/issueTotal).setScale(NumConstant.SIX,RoundingMode.HALF_UP));
+ entity.setIssueRatio(new BigDecimal((double)entity.getIssueTotal()/issueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.SIX,RoundingMode.HALF_UP));
}
//3、党员发布话题:
entity.setTopicTotal(getAgencyTopicTotal(customerId, entity.getAgencyPath(),NumConstant.ONE_STR));
+ log.info("extractExceptCommunityPioneerData 党员发布话题topicTotal="+entity.getTopicTotal());
+
+ //01.12新增
+ //当前组织内所有话题总数
+ int agencyTopicTotal = getAgencyTopicTotal(customerId, entity.getAgencyPath(),null);
+ log.info("extractExceptCommunityPioneerData 当前组织内所有话题总数agencyTopicTotal="+agencyTopicTotal);
+ entity.setPlatTopicTotal(agencyTopicTotal);
+
//4、党员发布话题占比: 组织内注册党员发布的话题总数占 组织内话题总数的 比率
if (entity.getTopicTotal() == NumConstant.ZERO) {
entity.setTopicRatio(BigDecimal.ZERO);
} else {
- //当前组织内所有话题总数
- int agencyTopicTotal = getAgencyTopicTotal(customerId, entity.getAgencyPath(),null);
- entity.setTopicRatio(agencyTopicTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getTopicTotal() / agencyTopicTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
+ entity.setTopicRatio(agencyTopicTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal((double)entity.getTopicTotal() / agencyTopicTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
}
+ //01.12新增
//当前组织内所有议题总数
int agencyIssueTotal = getAgencyIssueTotal(customerId, entity.getAgencyPath());
+ log.info("extractExceptCommunityPioneerData 当前组织内所有议题总数agencyIssueTotal="+agencyIssueTotal);
+ entity.setPlatPublishIssueTotal(agencyIssueTotal);
+
if (agencyIssueTotal != NumConstant.ZERO) {
//5、党员发布议题
entity.setPublishIssueTotal(getAgencyParyPublishIssueTotal(customerId, entity.getAgencyPath()));
+ log.info("extractExceptCommunityPioneerData 党员发布议题publishIssueTotal="+entity.getPublishIssueTotal());
//6、党员发布议题占比 : 占社区内所有议题的比率
if (entity.getPublishIssueTotal() == NumConstant.ZERO) {
entity.setPublishIssueRatio(BigDecimal.ZERO);
}
- entity.setPublishIssueRatio(agencyIssueTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getPublishIssueTotal() / agencyIssueTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
+ entity.setPublishIssueRatio(agencyIssueTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal((double)entity.getPublishIssueTotal() / agencyIssueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
//7、议题转项目数
entity.setShiftProjectTotal(getAgencyShiftProjectTotal(customerId, entity.getAgencyPath()));
+ log.info("extractExceptCommunityPioneerData 议题转项目数shiftProjectTotal="+entity.getShiftProjectTotal());
//8、议题转项目占比 : 占网格内议题总数的比率
- entity.setShiftProjectRatio(entity.getShiftProjectTotal() == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getShiftProjectTotal() / agencyIssueTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
+ entity.setShiftProjectRatio(entity.getShiftProjectTotal() == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal((double)entity.getShiftProjectTotal() / agencyIssueTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
}else{
-// log.info("当前组织内所有议题总数="+agencyIssueTotal);
+ log.info("extractExceptCommunityPioneerData 当前组织内所有议题总数agencyIssueTotal=0");
entity.setPublishIssueTotal(NumConstant.ZERO);
entity.setPublishIssueRatio(BigDecimal.ZERO);
entity.setShiftProjectTotal(NumConstant.ZERO);
@@ -290,13 +379,30 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
// 9、已解决项目
entity.setResolvedProjectTotal(getAgencyClosedProjectTotal(customerId, entity.getAgencyPath(), DimObjectStatusConstant.RESOLVED));
+ log.info("extractExceptCommunityPioneerData 已解决项目resolvedProjectTotal="+entity.getResolvedProjectTotal());
+
+ //01.12新增
+ int closedProjectTotal = getAgencyClosedProjectTotal(customerId, entity.getAgencyPath(), null);
+ log.info("extractExceptCommunityPioneerData 总结项目closedProjectTotal="+closedProjectTotal);
+ entity.setPlatClosedProjectTotal(closedProjectTotal);
+
if (entity.getResolvedProjectTotal() == NumConstant.ZERO) {
entity.setResolvedProjectRatio(BigDecimal.ZERO);
} else {
// 10、占总结项目
- int closedProjectTotal = getAgencyClosedProjectTotal(customerId, entity.getAgencyPath(), null);
- entity.setResolvedProjectRatio(closedProjectTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getResolvedProjectTotal() / closedProjectTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
+ entity.setResolvedProjectRatio(closedProjectTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal((double)entity.getResolvedProjectTotal() / closedProjectTotal).multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
}
+
+ //01.12: 新增指标:平台参与议事总人数、平台参与议事党员数、平台参与议事的党员占比
+ entity.setPlatJoinUserTotal(factOriginIssueLogDailyService.calPlatJoinUserTotal(customerId, null, null, entity.getAgencyPath(), null));
+ entity.setPlatJoinPartyTotal(factOriginIssueLogDailyService.calPlatJoinUserTotal(customerId, null, null, entity.getAgencyPath(), NumConstant.ONE_STR));
+ if (entity.getPlatJoinPartyTotal() == NumConstant.ZERO) {
+ entity.setPlatJoinPartyRatio(BigDecimal.ZERO);
+ } else {
+ BigDecimal platJoinPartyRatio = new BigDecimal((double) entity.getPlatJoinPartyTotal() / entity.getPlatJoinUserTotal()).multiply(new BigDecimal(NumConstant.ONE_HUNDRED));
+ entity.setPlatJoinPartyRatio(platJoinPartyRatio.setScale(NumConstant.SIX, RoundingMode.HALF_UP));
+ }
+
});
screenPioneerDataService.delAndSavePioneerData(customerId, OrgTypeConstant.AGENCY, IndexCalConstant.DELETE_SIZE, agencyList);
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java
index d0ab7c49a8..5a560cd05c 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java
@@ -184,6 +184,8 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr
List imgList = new LinkedList<>();
imgMap.values().forEach(list -> {imgList.addAll(list);});
+ difficulties.removeIf( diff -> StringUtils.isBlank(diff.getLatestOperateDesc()));
+
screenDifficultyDataService.dataClean(param.getCustomerId(),difficulties,imgList);
log.info("【大屏数据抽取-难点赌点执行完毕】 客户Id{} 难点赌点数据{}",param.getCustomerId(),JSON.toJSONString(difficulties));
}
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 5062b8e94f..a08e0af4ba 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
@@ -186,7 +186,7 @@ public class DimGridServiceImpl extends BaseServiceImpl getGridAttributes(String customerId,List gridIds) {
- if(CollectionUtils.isEmpty(gridIds)) return Collections.EMPTY_LIST;
+
return baseDao.selectGridAttributes(customerId,gridIds);
}
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml
index 2717a8cb5e..db5dc8b583 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml
@@ -97,7 +97,7 @@
-
+
DELETE FROM
fact_origin_group_main_daily
@@ -287,8 +287,8 @@
WHERE
DEL_FLAG = '0'
AND CUSTOMER_ID = #{customerId}
- AND MONTH_ID = #{monthId}
AND GROUP_STATE = 'approved'
+ AND IS_OWNER_PARTY = 1
AND
(
@@ -338,4 +338,4 @@
AND f.GROUP_STATE = 'approved'
GROUP BY f.AGENCY_ID
-
\ 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
index d54794d323..521ef174e4 100644
--- 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
@@ -153,4 +153,28 @@
and m.PIDS LIKE CONCAT(#{pids},'%')
+
+
+
+ SELECT
+ count( DISTINCT m.OPERATION_USER_ID ) as total
+ FROM
+ fact_origin_issue_log_daily m
+ WHERE
+ m.DEL_FLAG = '0'
+ and m.ACTION_CODE like'vote_%'
+ and m.CUSTOMER_ID=#{customerId}
+
+ and m.GRID_ID=#{gridId}
+
+
+ AND M.AGENCY_ID=#{communityId}
+
+
+ AND M.PIDS LIKE CONCAT(#{agencyPath},'%')
+
+
+ and M.IS_PARTY=#{isParty}
+
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.xml
index a01747d444..d607aac0d0 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.xml
@@ -39,9 +39,12 @@
fact_origin_project_org_period_daily
WHERE
DEL_FLAG = '0'
-
- PROJECT_ID = #{item}
-
+ AND CUSTOMER_ID = #{customerId}
+
+
+ PROJECT_ID = #{item}
+
+
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenPioneerDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenPioneerDataDao.xml
index c2ad6b5722..de20dd018c 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenPioneerDataDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenPioneerDataDao.xml
@@ -188,7 +188,14 @@
CREATED_TIME,
UPDATED_BY,
UPDATED_TIME,
- DATA_END_TIME
+ DATA_END_TIME,
+ PLAT_ISSUE_TOTAL,
+ PLAT_JOIN_USER_TOTAL,
+ PLAT_JOIN_PARTY_TOTAL,
+ PLAT_JOIN_PARTY_RATIO,
+ PLAT_TOPIC_TOTAL,
+ PLAT_PUBLISH_ISSUE_TOTAL,
+ PLAT_CLOSED_PROJECT_TOTAL
) values
(
@@ -214,7 +221,14 @@
now(),
'APP_USER',
now(),
- #{item.dataEndTime}
+ #{item.dataEndTime},
+ #{item.platIssueTotal},
+ #{item.platJoinUserTotal},
+ #{item.platJoinPartyTotal},
+ #{item.platJoinPartyRatio},
+ #{item.platTopicTotal},
+ #{item.platPublishIssueTotal},
+ #{item.platClosedProjectTotal}
)
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/group/GroupDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/group/GroupDataDao.xml
index f47b266eba..9b6da626dc 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/group/GroupDataDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/group/GroupDataDao.xml
@@ -186,7 +186,7 @@
oper.UPDATED_TIME AS joinDate,
IF(groupp.CREATED_BY = oper.CUSTOMER_USER_ID,'leader','member') AS leaderFlag,
groupp.CREATED_BY AS groupOwnerId,
- 'join' AS actionCode
+ IF(groupp.CREATED_BY = oper.CUSTOMER_USER_ID,'join','create') AS actionCode
FROM
RESI_GROUP groupp
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml
index 3236a09bea..9e2bd9fe1d 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml
@@ -56,9 +56,10 @@
ps.ORG_ID_PATH AS pids,
pp.CREATED_TIME
FROM project_staff ps
- INNER JOIN project_process pp ON ps.PROCESS_ID = pp.ID
- INNER JOIN project p ON pp.PROJECT_ID = p.ID
+ INNER JOIN project_process pp ON ps.PROCESS_ID = pp.ID AND pp.DEL_FLAG = '0'
+ INNER JOIN project p ON pp.PROJECT_ID = p.ID AND p.DEL_FLAG = '0'
WHERE p.CUSTOMER_ID = #{customerId}
+ AND ps.DEL_FLAG = '0'
AND DATE_FORMAT(pp.CREATED_TIME, '%Y%m%d') = #{date}
@@ -296,12 +297,13 @@
pp.CREATED_TIME
FROM
project_process pp
- INNER JOIN project p ON pp.PROJECT_ID = p.ID
+ INNER JOIN project p ON pp.PROJECT_ID = p.ID AND p.DEL_FLAG = '0'
LEFT JOIN project_staff ps ON pp.PROJECT_ID = ps.PROJECT_ID
AND pp.STAFF_ID = ps.STAFF_ID
AND pp.DEPARTMENT_NAME = ps.DEPARTMENT_NAME
WHERE
1=1
+ AND pp.DEL_FLAG = '0'
AND p.CUSTOMER_ID = #{customerId}
AND pp.OPERATION = 'response'
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 b83e517441..d7a33deb51 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
@@ -104,11 +104,14 @@
dg.DEL_FLAG = '0'
AND da.DEL_FLAG = '0'
AND da.CUSTOMER_ID = #{customerId}
- AND
- (
-
- dg.id = #{gridId}
-
- )
+
+ AND
+ (
+
+ dg.id = #{gridId}
+
+ )
+
+
\ No newline at end of file
diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/constant/AreaCodeConstant.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/constant/AreaCodeConstant.java
index 742c73993a..3ee44fec5f 100644
--- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/constant/AreaCodeConstant.java
+++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/constant/AreaCodeConstant.java
@@ -24,4 +24,6 @@ public interface AreaCodeConstant {
String ROOT_AGENCY_LEVEL_IS_LEVEL = "RootAreaLevel为空......";
+ String LEVEL_ERROR = "RootAreaLevel填写错误【%s】";
+
}
diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java
index 7898516b33..b511cab2c0 100644
--- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java
+++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java
@@ -313,6 +313,8 @@ public class AreaCodeServiceImpl extends BaseServiceImplfeign-httpclient
10.3.0
+
+ com.epmet
+ resi-group-client
+ 2.0.0
+ compile
+
diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/TopicAutoAuditService.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/TopicAutoAuditService.java
new file mode 100644
index 0000000000..0102b54370
--- /dev/null
+++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/TopicAutoAuditService.java
@@ -0,0 +1,12 @@
+package com.epmet.service;
+
+import com.epmet.commons.tools.utils.Result;
+
+/**
+ * @author zhaoqifeng
+ * @dscription
+ * @date 2020/12/29 17:45
+ */
+public interface TopicAutoAuditService {
+ Result autoAudit();
+}
diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/TopicAutoAuditServiceImpl.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/TopicAutoAuditServiceImpl.java
new file mode 100644
index 0000000000..2e497497e0
--- /dev/null
+++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/TopicAutoAuditServiceImpl.java
@@ -0,0 +1,24 @@
+package com.epmet.service.impl;
+
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.resi.group.feign.ResiGroupOpenFeignClient;
+import com.epmet.service.TopicAutoAuditService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author zhaoqifeng
+ * @dscription
+ * @date 2020/12/29 17:46
+ */
+@Service
+public class TopicAutoAuditServiceImpl implements TopicAutoAuditService {
+
+ @Autowired
+ private ResiGroupOpenFeignClient resiGroupOpenFeignClient;
+
+ @Override
+ public Result autoAudit() {
+ return resiGroupOpenFeignClient.autoAudit();
+ }
+}
diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/TopicAutoAuditTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/TopicAutoAuditTask.java
new file mode 100644
index 0000000000..6bc7bb3c4b
--- /dev/null
+++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/TopicAutoAuditTask.java
@@ -0,0 +1,31 @@
+package com.epmet.task;
+
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.service.TopicAutoAuditService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author zhaoqifeng
+ * @dscription
+ * @date 2020/12/29 17:43
+ */
+@Slf4j
+@Component("topicAutoAuditTask")
+public class TopicAutoAuditTask implements ITask {
+
+ @Autowired
+ private TopicAutoAuditService topicAutoAuditService;
+
+ @Override
+ public void run(String params) {
+ log.info("TopicAutoAuditTask定时任务正在执行,参数为:{}", params);
+ Result result = topicAutoAuditService.autoAudit();
+ if (result.success()) {
+ log.info("TopicAutoAuditTask定时任务执行成功");
+ } else {
+ log.error("TopicAutoAuditTask定时任务执行失败:" + result.getMsg());
+ }
+ }
+}
diff --git a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/SmsTemplateConstant.java b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/SmsTemplateConstant.java
index 3bfac0e8f7..c5647e5edf 100644
--- a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/SmsTemplateConstant.java
+++ b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/SmsTemplateConstant.java
@@ -27,4 +27,14 @@ public interface SmsTemplateConstant {
* 修改密码验证码
*/
String CHANGE_PASSWORD = "SMS_150731393";
+
+ /**
+ * 项目被吹哨提醒
+ */
+ String PROJECT_TRANSFER = "SMS_200187239";
+
+ /**
+ * 项目滞留提醒
+ */
+ String PROJECT_OVERDUE = "SMS_206885207";
}
diff --git a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/SysSmsConstant.java b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/SysSmsConstant.java
new file mode 100644
index 0000000000..32be48a287
--- /dev/null
+++ b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/SysSmsConstant.java
@@ -0,0 +1,19 @@
+package com.epmet.constant;
+
+/**
+ * @Author zxc
+ * @DateTime 2021/1/4 下午1:42
+ */
+public interface SysSmsConstant {
+
+ String IS_NULL_PARAM_LIST = "项目流转或滞留推送短信提醒入参集合为空......";
+
+ String SELECT_PARAMETER_INFO_FAILURE = "查询客户配置参数失败......";
+
+ String PARAMETER_INFO_IS_ZERO = "未查到客户配置参数......";
+
+ String NOT_ENOUGH_BALANCE = "客户:%s ,当前余额为:%s";
+
+ String NOT_ON_SWITCH = "客户:%s ,【%s】开关未开启";
+
+}
diff --git a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/SystemMessageSendApproach.java b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/SystemMessageSendApproach.java
new file mode 100644
index 0000000000..7406175d87
--- /dev/null
+++ b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/SystemMessageSendApproach.java
@@ -0,0 +1,7 @@
+package com.epmet.constant;
+
+public interface SystemMessageSendApproach {
+
+ String MQ = "mq";
+
+}
diff --git a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/SystemMessageType.java b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/SystemMessageType.java
new file mode 100644
index 0000000000..382b96e275
--- /dev/null
+++ b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/SystemMessageType.java
@@ -0,0 +1,13 @@
+package com.epmet.constant;
+
+/**
+ * 系统消息类型
+ */
+public interface SystemMessageType {
+
+ /**
+ * 初始化客户
+ */
+ String INIT_CUSTOMER = "init_customer";
+
+}
diff --git a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/WxmpMessageConstant.java b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/WxmpMessageConstant.java
new file mode 100644
index 0000000000..5c8b364e1f
--- /dev/null
+++ b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/WxmpMessageConstant.java
@@ -0,0 +1,88 @@
+package com.epmet.constant;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @description: 微信订阅消息常量
+ * @author: liushaowen
+ * @date: 2020/10/21 17:45
+ */
+
+public interface WxmpMessageConstant {
+ String SEND_MESSAGE = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=";
+
+ String ERR_CODE = "errcode";
+
+ String ERR_MSG = "errmsg";
+
+ int USER_REFUSED = 43101;
+
+ String AUTHORIZER_ACCESS_TOKEN = "authorizerAccessToken";
+
+ String RESI = "resi";
+
+ String GOV_REDIS = "work";
+
+ String GOV_DB = "gov";
+
+ String ACCESS_TOKEN = "access_token";
+
+ String TOUSER = "touser";
+
+ String TEMPLATE_ID = "template_id";
+ /*站内信模板start*/
+ String MESSAGE_TEMPLATE_TYPE = "1832";
+ String MESSAGE_TITLE = "thing5";
+ String MESSAGE_CONTENT = "thing4";
+ String MESSAGE_TIME = "date2";
+ /*站内信模板end*/
+
+ /**关注更新提醒模板start**/
+ String CONCERN_UPDATE_TEMPLATE_TYPE = "8171";
+ String CONCERN_UPDATE_TITLE = "thing5";
+ String CONCERN_UPDATE_TITLE_TEXT = "话题状态提醒";
+ String CONCERN_UPDATE_CONTENT = "thing7";
+ String CONCERN_UPDATE_CONTENT_TEXT = "你关注的话题已被转为议题,请点击查看。";
+ String CONCERN_UPDATE_TIME = "time6";
+ /**关注更新提醒模板end**/
+
+ /**内容更新消息通知模板start**/
+ String CONTENT_UPDATE_TEMPLATE_TYPE = "2092";
+ String CONTENT_UPDATE_TITLE = "name4";
+ String CONTENT_UPDATE_TITLE_TEXT = "新评论提醒";
+ String CONTENT_UPDATE_CONTENT = "thing9";
+ String CONTENT_UPDATE_CONTENT_TEXT = "你关注的话题收到新评论,请点击查看。";
+ String CONTENT_UPDATE_TIME = "date3";
+ /**内容更新消息通知模板end**/
+
+ /** 消息来源start**/
+ //话题
+ String SOURCE_TYPE_TOPIC = "topic";
+ //议题
+ String SOURCE_TYPE_ISSUE = "issue";
+ /** 消息来源end**/
+
+ String PAGE = "page";
+
+ String MESSAGE_PAGE_URL = "/subpages/mine/pages/message/skip";
+
+ String UPDATE_PAGE_URL = "/pages/index/subscribe?id=";
+
+ int TITLE_LIMIT = 20;
+
+ int MESSAGE_CONTENT_LIMIT = 20;
+
+ String DATA = "data";
+
+ String MINIPROGRAM_STATE = "miniprogram_state";
+
+ String SUCCESS = "success";
+
+ String ERROR = "error";
+
+ String STATE_DEV = "developer";
+
+ String STATE_TEST = "trial";
+
+}
diff --git a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/WxmpUpdateSendDataDTO.java b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/WxmpUpdateSendDataDTO.java
new file mode 100644
index 0000000000..75696d1a4e
--- /dev/null
+++ b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/WxmpUpdateSendDataDTO.java
@@ -0,0 +1,111 @@
+/**
+ * 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.
+ *
+ * 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.
+ *
+ * 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.controller;
+
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.utils.ExcelUtils;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.validator.AssertUtils;
+import com.epmet.commons.tools.validator.ValidatorUtils;
+import com.epmet.commons.tools.validator.group.AddGroup;
+import com.epmet.commons.tools.validator.group.UpdateGroup;
+import com.epmet.commons.tools.validator.group.DefaultGroup;
+import com.epmet.dto.WxmpUpdateSendDataDTO;
+import com.epmet.excel.WxmpUpdateSendDataExcel;
+import com.epmet.service.WxmpUpdateSendDataService;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * 订阅消息发送数据表(内容更新消息提醒、关注更新提醒)
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2021-01-04
+ */
+@RestController
+@RequestMapping("wxmpupdatesenddata")
+public class WxmpUpdateSendDataController {
+
+ @Autowired
+ private WxmpUpdateSendDataService wxmpUpdateSendDataService;
+
+ @GetMapping("page")
+ public Result> page(@RequestParam Map params){
+ PageData page = wxmpUpdateSendDataService.page(params);
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ public Result get(@PathVariable("id") String id){
+ if (StringUtils.isBlank(id) || "undefined".equals(id)){
+ return new Result().error(8000,"id不能为空");
+ }
+ WxmpUpdateSendDataDTO data = wxmpUpdateSendDataService.get(id);
+ return new Result().ok(data);
+ }
+
+ @PostMapping
+ public Result save(@RequestBody WxmpUpdateSendDataDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+ wxmpUpdateSendDataService.save(dto);
+ return new Result();
+ }
+
+ @PutMapping
+ public Result update(@RequestBody WxmpUpdateSendDataDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+ wxmpUpdateSendDataService.update(dto);
+ return new Result();
+ }
+
+ @DeleteMapping
+ public Result delete(@RequestBody String[] ids){
+ //效验数据
+ AssertUtils.isArrayEmpty(ids, "id");
+ wxmpUpdateSendDataService.delete(ids);
+ return new Result();
+ }
+
+ @GetMapping("export")
+ public void export(@RequestParam Map params, HttpServletResponse response) throws Exception {
+ List list = wxmpUpdateSendDataService.list(params);
+ ExcelUtils.exportExcelToTarget(response, null, list, WxmpUpdateSendDataExcel.class);
+ }
+
+}
diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpUpdateSendRecordController.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpUpdateSendRecordController.java
new file mode 100644
index 0000000000..42daed9b09
--- /dev/null
+++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpUpdateSendRecordController.java
@@ -0,0 +1,94 @@
+/**
+ * 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.controller;
+
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.utils.ExcelUtils;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.validator.AssertUtils;
+import com.epmet.commons.tools.validator.ValidatorUtils;
+import com.epmet.commons.tools.validator.group.AddGroup;
+import com.epmet.commons.tools.validator.group.UpdateGroup;
+import com.epmet.commons.tools.validator.group.DefaultGroup;
+import com.epmet.dto.WxmpUpdateSendRecordDTO;
+import com.epmet.excel.WxmpUpdateSendRecordExcel;
+import com.epmet.service.WxmpUpdateSendRecordService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * 订阅消息发送记录表(内容更新消息提醒、关注更新提醒)
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2020-12-30
+ */
+@RestController
+@RequestMapping("wxmpupdatesendrecord")
+public class WxmpUpdateSendRecordController {
+
+ @Autowired
+ private WxmpUpdateSendRecordService wxmpUpdateSendRecordService;
+
+ @GetMapping("page")
+ public Result> page(@RequestParam Map params){
+ PageData page = wxmpUpdateSendRecordService.page(params);
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ public Result get(@PathVariable("id") String id){
+ WxmpUpdateSendRecordDTO data = wxmpUpdateSendRecordService.get(id);
+ return new Result().ok(data);
+ }
+
+ @PostMapping
+ public Result save(@RequestBody WxmpUpdateSendRecordDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+ wxmpUpdateSendRecordService.save(dto);
+ return new Result();
+ }
+
+ @PutMapping
+ public Result update(@RequestBody WxmpUpdateSendRecordDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+ wxmpUpdateSendRecordService.update(dto);
+ return new Result();
+ }
+
+ @DeleteMapping
+ public Result delete(@RequestBody String[] ids){
+ //效验数据
+ AssertUtils.isArrayEmpty(ids, "id");
+ wxmpUpdateSendRecordService.delete(ids);
+ return new Result();
+ }
+
+ @GetMapping("export")
+ public void export(@RequestParam Map params, HttpServletResponse response) throws Exception {
+ List list = wxmpUpdateSendRecordService.list(params);
+ ExcelUtils.exportExcelToTarget(response, null, list, WxmpUpdateSendRecordExcel.class);
+ }
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/SystemMessageDao.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/SystemMessageDao.java
new file mode 100644
index 0000000000..7770c58547
--- /dev/null
+++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/SystemMessageDao.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;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.SystemMessageEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 系统消息表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-01-06
+ */
+@Mapper
+public interface SystemMessageDao extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpUpdateSendDataDao.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpUpdateSendDataDao.java
new file mode 100644
index 0000000000..89af78b681
--- /dev/null
+++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpUpdateSendDataDao.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;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.WxmpUpdateSendDataEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 订阅消息发送数据表(内容更新消息提醒、关注更新提醒)
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2021-01-04
+ */
+@Mapper
+public interface WxmpUpdateSendDataDao extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpUpdateSendRecordDao.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpUpdateSendRecordDao.java
new file mode 100644
index 0000000000..63b8812bb0
--- /dev/null
+++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpUpdateSendRecordDao.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;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.WxmpUpdateSendRecordEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 订阅消息发送记录表(内容更新消息提醒、关注更新提醒)
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2020-12-30
+ */
+@Mapper
+public interface WxmpUpdateSendRecordDao extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/SystemMessageEntity.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/SystemMessageEntity.java
new file mode 100644
index 0000000000..effdb2d59b
--- /dev/null
+++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/SystemMessageEntity.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.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.omg.CORBA.StringHolder;
+
+import java.util.Date;
+
+/**
+ * 系统消息表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-01-06
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("system_message")
+public class SystemMessageEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 消息类型
+ */
+ private String msgType;
+
+ /**
+ * 发送途径
+ */
+ private String sendApproach;
+
+ /**
+ * 消息内容
+ */
+ private String content;
+
+}
diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/WxmpUpdateSendDataEntity.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/WxmpUpdateSendDataEntity.java
new file mode 100644
index 0000000000..a4395a1bf9
--- /dev/null
+++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/WxmpUpdateSendDataEntity.java
@@ -0,0 +1,81 @@
+/**
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.redis;
+
+import com.epmet.commons.tools.redis.RedisUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * 订阅消息发送数据表(内容更新消息提醒、关注更新提醒)
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2021-01-04
+ */
+@Component
+public class WxmpUpdateSendDataRedis {
+ @Autowired
+ private RedisUtils redisUtils;
+
+ public void delete(Object[] ids) {
+
+ }
+
+ public void set(){
+
+ }
+
+ public String get(String id){
+ return null;
+ }
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/redis/WxmpUpdateSendRecordRedis.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/redis/WxmpUpdateSendRecordRedis.java
new file mode 100644
index 0000000000..05235661a1
--- /dev/null
+++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/redis/WxmpUpdateSendRecordRedis.java
@@ -0,0 +1,47 @@
+/**
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *