diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/constant/OrgConstant.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/constant/OrgConstant.java
index a7da3d564b..b3083d658e 100644
--- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/constant/OrgConstant.java
+++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/constant/OrgConstant.java
@@ -7,4 +7,8 @@ package com.epmet.dataaggre.constant;
public interface OrgConstant {
String AGENCY = "agency";
String GRID = "grid";
+ String PROVINCE = "province";
+ String CITY = "city";
+ String DISTRICT = "district";
+
}
diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/form/AgencyGovrnFormDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/form/AgencyGovrnFormDTO.java
index 82315c125f..14bfa2c51b 100644
--- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/form/AgencyGovrnFormDTO.java
+++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/form/AgencyGovrnFormDTO.java
@@ -33,6 +33,14 @@ public class AgencyGovrnFormDTO implements Serializable {
* 街道解决占比:street
*/
private String type;
+ /**
+ * 组织级别
+ */
+ private String level;
+ /**
+ * 组织地区码
+ */
+ private String areaCode;
public interface Agency extends CustomerClientShowGroup {}
}
diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/form/GovrnRatioFormDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/form/GovrnRatioFormDTO.java
index 7e5407a8ef..d760cd834f 100644
--- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/form/GovrnRatioFormDTO.java
+++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/form/GovrnRatioFormDTO.java
@@ -28,6 +28,8 @@ public class GovrnRatioFormDTO implements Serializable {
* 日维度Id[日期,不传值默认查前一天的【格式:20210101】]
*/
private String dateId;
+ private String areaCode;
+ private String level;
public interface AgencyGrid extends CustomerClientShowGroup {}
}
diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/result/SubAgencyGroupResultDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/result/SubAgencyGroupResultDTO.java
index 144368c26e..8b0f229204 100644
--- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/result/SubAgencyGroupResultDTO.java
+++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/result/SubAgencyGroupResultDTO.java
@@ -19,6 +19,10 @@ public class SubAgencyGroupResultDTO implements Serializable {
private String agencyId;
//组织名称
private String agencyName;
+ //机关级别[社区级:community;乡(镇、街道)级:street;区县级: district;市级: city;省级:province
+ private String level;
+ //行政地区编码
+ private String areaCode;
//党群小组总数
private Integer groupTotal = 0;
//楼院小组总数
diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/result/SubAgencyIssueResultDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/result/SubAgencyIssueResultDTO.java
index 5bece9dab4..a13f9d158b 100644
--- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/result/SubAgencyIssueResultDTO.java
+++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/result/SubAgencyIssueResultDTO.java
@@ -19,6 +19,10 @@ public class SubAgencyIssueResultDTO implements Serializable {
private String agencyId;
//组织名称
private String agencyName;
+ //机关级别[社区级:community;乡(镇、街道)级:street;区县级: district;市级: city;省级:province
+ private String level;
+ //行政地区编码
+ private String areaCode;
//议题总数
private Integer issueTotal = 0;
//表决中总数
diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/result/SubAgencyProjectResultDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/result/SubAgencyProjectResultDTO.java
index 33aa889ad4..63b0c512ca 100644
--- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/result/SubAgencyProjectResultDTO.java
+++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/result/SubAgencyProjectResultDTO.java
@@ -19,6 +19,10 @@ public class SubAgencyProjectResultDTO implements Serializable {
private String agencyId;
//组织名称
private String agencyName;
+ //机关级别[社区级:community;乡(镇、街道)级:street;区县级: district;市级: city;省级:province
+ private String level;
+ //行政地区编码
+ private String areaCode;
//项目总数
private Integer projectTotal = 0;
//处理中总数
diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/result/SubAgencyTopicResultDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/result/SubAgencyTopicResultDTO.java
index bad0896389..3712128526 100644
--- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/result/SubAgencyTopicResultDTO.java
+++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/result/SubAgencyTopicResultDTO.java
@@ -19,6 +19,10 @@ public class SubAgencyTopicResultDTO implements Serializable {
private String agencyId;
//组织名称
private String agencyName;
+ //机关级别[社区级:community;乡(镇、街道)级:street;区县级: district;市级: city;省级:province
+ private String level;
+ //行政地区编码
+ private String areaCode;
//话题总数
private Integer topicTotal = 0;
//热议中总数
diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/result/SubAgencyUserResultDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/result/SubAgencyUserResultDTO.java
index a60c3ad76b..d1cc92cd8f 100644
--- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/result/SubAgencyUserResultDTO.java
+++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/result/SubAgencyUserResultDTO.java
@@ -19,6 +19,10 @@ public class SubAgencyUserResultDTO implements Serializable {
private String agencyId;
//组织名称
private String agencyName;
+ //机关级别[社区级:community;乡(镇、街道)级:street;区县级: district;市级: city;省级:province
+ private String level;
+ //行政地区编码
+ private String areaCode;
//用户总数
private Integer userTotal = 0;
//党员总数
diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/GovStaffRoleDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/GovStaffRoleDTO.java
index 9e569488d2..b6d866eda6 100644
--- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/GovStaffRoleDTO.java
+++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/GovStaffRoleDTO.java
@@ -93,6 +93,11 @@ public class GovStaffRoleDTO implements Serializable {
*/
private Integer fullTimeOnly;
+ /**
+ * 角色对应的职责说明
+ */
+ private String description;
+
/**
* 排序
*/
diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/GovStaffRoleTemplateDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/GovStaffRoleTemplateDTO.java
index 5c38ca8a2c..731a3de81d 100644
--- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/GovStaffRoleTemplateDTO.java
+++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/GovStaffRoleTemplateDTO.java
@@ -58,6 +58,16 @@ public class GovStaffRoleTemplateDTO implements Serializable {
*/
private Integer fullTimeOnly;
+ /**
+ * 角色对应的职责说明
+ */
+ private String description;
+
+ /**
+ * 排序
+ */
+ private String sort;
+
/**
*
*/
diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/form/GridMemberStatsFormDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/form/GridMemberStatsFormDTO.java
new file mode 100644
index 0000000000..45ad8c8d62
--- /dev/null
+++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/form/GridMemberStatsFormDTO.java
@@ -0,0 +1,21 @@
+package com.epmet.dataaggre.dto.epmetuser.form;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+
+/**
+ * @Description 网格员相关统计formdto
+ * @author wxz
+ * @date 2021.07.05 15:46:23
+*/
+@Data
+public class GridMemberStatsFormDTO {
+
+ public interface IssueProjectStats {}
+
+ @NotBlank(message = "网格ID不能为空", groups = {IssueProjectStats.class})
+ private String gridId;
+
+
+}
diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/form/OpenStaffDetailFormDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/form/OpenStaffDetailFormDTO.java
new file mode 100644
index 0000000000..4d3d81aebe
--- /dev/null
+++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/form/OpenStaffDetailFormDTO.java
@@ -0,0 +1,29 @@
+package com.epmet.dataaggre.dto.epmetuser.form;
+
+import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * @Description 对外接口--查询工作人员基本信息-接口入参
+ * @Auth sun
+ */
+@Data
+public class OpenStaffDetailFormDTO implements Serializable {
+
+ private static final long serialVersionUID = -3381286960911634231L;
+ /**
+ * 客户Id
+ */
+ @NotBlank(message = "客户Id不能为空", groups = OpenStaffDetailFormDTO.Open.class)
+ private String customerId;
+ /**
+ * 手机号
+ */
+ @NotBlank(message = "手机号不能为空", groups = OpenStaffDetailFormDTO.Open.class)
+ private String mobile;
+ public interface Open extends CustomerClientShowGroup {}
+
+}
diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/form/StaffListFormDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/form/StaffListFormDTO.java
index 4945b5de46..4de304f917 100644
--- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/form/StaffListFormDTO.java
+++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/form/StaffListFormDTO.java
@@ -24,7 +24,7 @@ public class StaffListFormDTO implements Serializable {
@NotNull(message = "最近时间不能为空", groups = StaffListFormDTO.Staff.class)
private Integer time;
/**
- * 排序字段【巡查总次数:patrolTotal;最近开始巡查时间:latestPatrolledTime】
+ * 排序字段【巡查总次数:patrolTotal;最近开始巡查时间:latestPatrolledTime;上报项目数: reportProjectCount;巡查总时长:totalTime】
*/
@NotBlank(message = "排序条件不能为空", groups = StaffListFormDTO.Staff.class)
private String sortCode;
diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/OpenStaffDetailResultDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/OpenStaffDetailResultDTO.java
new file mode 100644
index 0000000000..9707a14f67
--- /dev/null
+++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/OpenStaffDetailResultDTO.java
@@ -0,0 +1,28 @@
+package com.epmet.dataaggre.dto.epmetuser.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Description 对外接口--查询工作人员基本信息-接口返参
+ * @Auth sun
+ */
+@Data
+public class OpenStaffDetailResultDTO implements Serializable {
+ private static final long serialVersionUID = 7129564173128153335L;
+
+ //工作人员用户id
+ private String staffId = "";
+ //工作人员姓名
+ private String staffName = "";
+ //手机号
+ private String mobile = "";
+ //用户所属组织id
+ private String agencyId = "";
+ //用户所属组织全路径名称
+ private String agencyAllName = "";
+ //客户Id
+ private String customerId = "";
+
+}
diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/PersonalPatrolListResultDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/PersonalPatrolListResultDTO.java
new file mode 100644
index 0000000000..8e99eec996
--- /dev/null
+++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/PersonalPatrolListResultDTO.java
@@ -0,0 +1,20 @@
+package com.epmet.dataaggre.dto.epmetuser.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Description 个人中心-网格员巡查记录-接口入参
+ * @Auth sun
+ */
+@Data
+public class PersonalPatrolListResultDTO implements Serializable {
+ private static final long serialVersionUID = 7129564173128153335L;
+
+ //巡查总次数;巡查总时长;立项事件数
+ private String key;
+ //key对应值
+ private String value;
+
+}
diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/StaffListResultDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/StaffListResultDTO.java
index 15f2647e88..53bf3715c1 100644
--- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/StaffListResultDTO.java
+++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/StaffListResultDTO.java
@@ -1,5 +1,6 @@
package com.epmet.dataaggre.dto.epmetuser.result;
+import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
@@ -28,5 +29,11 @@ public class StaffListResultDTO implements Serializable {
private String gender = "0";
//正在巡查中:patrolling;否则返回空字符串
private String status = "";
+ //上报项目数
+ private Integer reportProjectCount;
+ //巡查总时长
+ private String totalTime = "";
+ @JsonIgnore
+ private Integer timeNum;
}
diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/evaluationindex/ScreenCustomerAgencyDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/evaluationindex/ScreenCustomerAgencyDTO.java
new file mode 100644
index 0000000000..3b2c818967
--- /dev/null
+++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/evaluationindex/ScreenCustomerAgencyDTO.java
@@ -0,0 +1,49 @@
+package com.epmet.dataaggre.dto.evaluationindex;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 组织机构信息
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-08-21
+ */
+@Data
+public class ScreenCustomerAgencyDTO implements Serializable {
+ private static final long serialVersionUID = 6328123559936824470L;
+ /**
+ * 客户id
+ */
+ private String customerId;
+
+ /**
+ * 组织id
+ */
+ private String agencyId;
+
+ /**
+ * 组织名称
+ */
+ private String agencyName;
+
+ /**
+ * 机关级别(社区级:community,
+ 乡(镇、街道)级:street,
+ 区县级: district,
+ 市级: city
+ 省级:province)
+ */
+ private String level;
+
+ /**
+ * 行政地区编码
+ */
+ private String areaCode;
+
+ /**
+ * 当前组织的上级行政地区编码add0204;举例平阴县对应的是济南市3701
+ */
+ private String parentAreaCode;
+}
diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/evaluationindex/ScreenCustomerGridDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/evaluationindex/ScreenCustomerGridDTO.java
new file mode 100644
index 0000000000..e57fd42ac5
--- /dev/null
+++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/evaluationindex/ScreenCustomerGridDTO.java
@@ -0,0 +1,119 @@
+/**
+ * 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.dataaggre.dto.evaluationindex;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+ * 网格(党支部)信息
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-08-26
+ */
+@Data
+public class ScreenCustomerGridDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键ID 主键ID
+ */
+ private String id;
+
+ /**
+ * 客户id
+ */
+ private String customerId;
+
+ /**
+ * 网格id
+ */
+ private String gridId;
+
+ /**
+ * 组织名称
+ */
+ private String gridName;
+
+ /**
+ * 网格所属组织id
+ */
+ private String parentAgencyId;
+
+ /**
+ * 坐标区域
+ */
+ private String areaMarks;
+
+ /**
+ * 中心点位
+ */
+ private String centerMark;
+
+ /**
+ * 党支部(=网格)的位置
+ */
+ private String partyMark;
+
+ /**
+ * 删除标识 0.未删除 1.已删除
+ */
+ private Integer delFlag;
+
+ /**
+ * 乐观锁
+ */
+ private Integer revision;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+ /**
+ * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增)
+ */
+ private String dataEndTime;
+
+ /**
+ * 所有上级ID,用英文逗号分开
+ */
+ private String allParentIds;
+ private String pid;
+ private String pids;
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/evaluationindex/ScreenGovernRankDataDailyDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/evaluationindex/ScreenGovernRankDataDailyDTO.java
new file mode 100644
index 0000000000..6542b8eb1c
--- /dev/null
+++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/evaluationindex/ScreenGovernRankDataDailyDTO.java
@@ -0,0 +1,161 @@
+/**
+ * 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.dataaggre.dto.evaluationindex;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 基层治理-治理能力排行数据(按月统计)
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-05-24
+ */
+@Data
+public class ScreenGovernRankDataDailyDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * ID 主键
+ */
+ private String id;
+
+ /**
+ * 客户Id
+ */
+ private String customerId;
+
+ /**
+ * 年Id
+ */
+ private String yearId;
+
+ /**
+ * 月份Id
+ */
+ private String monthId;
+
+ /**
+ * 数据更新至:yyyyMMdd
+ */
+ private String dateId;
+
+ /**
+ * 组织类别 agency:组织;部门:department;网格:grid
+ */
+ private String orgType;
+
+ /**
+ * 组织Id 可以为网格,机关id
+ */
+ private String orgId;
+
+ /**
+ * 上级组织Id
+ */
+ private String parentId;
+
+ /**
+ * 组织名称
+ */
+ private String orgName;
+
+ /**
+ * 响应率
+ */
+ private BigDecimal responseRatio;
+
+ /**
+ * 解决率
+ */
+ private BigDecimal resolvedRatio;
+
+ /**
+ * 自治率
+ */
+ private BigDecimal governRatio;
+
+ /**
+ * 满意率
+ */
+ private BigDecimal satisfactionRatio;
+
+ /**
+ * 响应数
+ */
+ private Integer responseCount;
+ /**
+ * 项目转入次数
+ */
+ private Integer transferCount;
+ /**
+ * 解决项目数
+ */
+ private Integer resolvedCount;
+ /**
+ * 已关闭项目数
+ */
+ private Integer closedCount;
+ /**
+ * 自治项目数
+ */
+ private Integer governCount;
+ /**
+ * 满意项目数
+ */
+ private Integer satisfactionCount;
+ /**
+ * 已关闭项目(由议题转的项目)数
+ */
+ private Integer closedProjectCount;
+
+ /**
+ * 删除标识 0未删除;1已删除
+ */
+ private String delFlag;
+
+ /**
+ * 乐观锁
+ */
+ private Integer revision;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/form/GridMemberDataAnalysisFromDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/form/GridMemberDataAnalysisFromDTO.java
new file mode 100644
index 0000000000..1803db4c96
--- /dev/null
+++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/form/GridMemberDataAnalysisFromDTO.java
@@ -0,0 +1,22 @@
+package com.epmet.dataaggre.dto.govorg.form;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.util.List;
+
+@Data
+public class GridMemberDataAnalysisFromDTO {
+
+ public interface listGridMemberDatas {}
+
+ private List gridIds;
+
+ // 搜索的人员姓名
+ private String searchedStaffName;
+ private String month;
+ @NotBlank(message = "排序规则不能为空", groups = { listGridMemberDatas.class })
+ private String sort;
+ private Integer pageNo = 1;
+ private Integer pageSize = 10;
+}
diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/result/GridMemberDataAnalysisResultDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/result/GridMemberDataAnalysisResultDTO.java
new file mode 100644
index 0000000000..b431cfafab
--- /dev/null
+++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/result/GridMemberDataAnalysisResultDTO.java
@@ -0,0 +1,20 @@
+package com.epmet.dataaggre.dto.govorg.result;
+
+import lombok.Data;
+
+@Data
+public class GridMemberDataAnalysisResultDTO {
+
+ private String gridId;
+ private String staffId;
+ private String staffName;
+ private String orgName;
+
+ private Integer projectCount;
+ private Integer issueToProjectCount;
+ private Integer closedIssueCount;
+ private Integer projectResponseCount;
+ private Integer projectTransferCount;
+ private Integer projectClosedCount;
+
+}
diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/enums/GridMemberDataAnalysisEnums.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/enums/GridMemberDataAnalysisEnums.java
new file mode 100644
index 0000000000..2dfc6a5c1b
--- /dev/null
+++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/enums/GridMemberDataAnalysisEnums.java
@@ -0,0 +1,39 @@
+package com.epmet.dataaggre.enums;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public enum GridMemberDataAnalysisEnums {
+
+ SORT_SORT_PROJECT_COUNT("projectCount", "project_count"),
+ SORT_ISSUE_TO_PROJECT_COUNT("issueToProjectCount", "issue_to_project_count"),
+ SORT_CLOSED_ISSUE_COUNT("closedIssueCount", "closed_issue_count"),
+ SORT_PROJECT_RESPONSE_COUNT("projectResponseCount", "project_response_count"),
+ SORT_PROJECT_TRANSFER_COUNT("projectTransferCount", "project_transfer_count"),
+ SORT_PROJECT_CLOSED_COUNT("projectClosedCount", "project_closed_count");
+
+ private String key;
+ private String value;
+
+ GridMemberDataAnalysisEnums(String key, String value) {
+ this.key = key;
+ this.value = value;
+ }
+
+ public static GridMemberDataAnalysisEnums get(String key) {
+ for (GridMemberDataAnalysisEnums gm : GridMemberDataAnalysisEnums.values()) {
+ if (gm.key.equals(key)) {
+ return gm;
+ }
+ }
+ return null;
+ }
+
+ public String getKey() {
+ return key;
+ }
+
+ public String getValue() {
+ return value;
+ }
+}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/EpmetUserController.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/EpmetUserController.java
index bd535ae77c..39a634fb76 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/EpmetUserController.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/EpmetUserController.java
@@ -7,12 +7,18 @@ import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
+import com.epmet.dataaggre.dto.epmetuser.form.OpenStaffDetailFormDTO;
+import com.epmet.dataaggre.dto.epmetuser.form.GridMemberStatsFormDTO;
import com.epmet.dataaggre.dto.epmetuser.form.PatrolDateListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.form.PatrolRecordListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.form.StaffListFormDTO;
+import com.epmet.dataaggre.dto.epmetuser.result.OpenStaffDetailResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.PatrolDateListResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.PatrolRecordListResultDTO;
+import com.epmet.dataaggre.dto.epmetuser.result.PersonalPatrolListResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.StaffListResultDTO;
+import com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO;
+import com.epmet.dataaggre.service.datastats.DataStatsService;
import com.epmet.dataaggre.service.epmetuser.EpmetUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
@@ -20,7 +26,10 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* @Author zxc
@@ -33,6 +42,9 @@ public class EpmetUserController {
@Autowired
private EpmetUserService epmetUserService;
+ @Autowired
+ private DataStatsService dataStatsService;
+
/**
* @Param formDTO
@@ -79,5 +91,113 @@ public class EpmetUserController {
return new Result().ok(epmetUserService.patrolDateList(formDTO));
}
+ /**
+ * @Param formDTO
+ * @Description 【更多-巡查记录-人员巡查记录列表】
+ * @author sun
+ */
+ @PostMapping("staffpatrollist")
+ @RequirePermission(requirePermission = RequirePermissionEnum.MORE_PATROL_RECORD_LIST)
+ public Result> staffPatrolList(@LoginUser TokenDto tokenDto, @RequestBody StaffListFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO, StaffListFormDTO.Staff.class);
+ if (!"patrolTotal".equals(formDTO.getSortCode()) && !"latestPatrolledTime".equals(formDTO.getSortCode())
+ && !"reportProjectCount".equals(formDTO.getSortCode()) && !"totalTime".equals(formDTO.getSortCode())) {
+ throw new RenException("参数错误,排序条件值错误");
+ }
+ if (formDTO.getTime() != 1 && formDTO.getTime() != 3) {
+ throw new RenException("参数错误,最近时间值不正确");
+ }
+ formDTO.setUserId(tokenDto.getUserId());
+ return new Result>().ok(epmetUserService.staffPatrolList(formDTO));
+ }
+
+ /**
+ * @Description 个人中心-网格员巡查记录
+ * @author sun
+ */
+ @PostMapping("personalpatrollist")
+ public Result> personalPatrolList(@LoginUser TokenDto tokenDto) {
+ return new Result>().ok(epmetUserService.personalPatrolList(tokenDto.getUserId()));
+ }
+
+ /**
+ * @Description 网格员项目议题统计数据
+ * @return
+ * @author wxz
+ * @date 2021.07.05 15:49
+ */
+ @PostMapping("/gridmember/issueprojectstats")
+ public Result>> getGridMemberIssueProjectStats(@LoginUser TokenDto loginUser) {
+ String userId = loginUser.getUserId();
+
+ GridMemberDataAnalysisResultDTO data = dataStatsService.getGridMemberIssueProjectStats(userId);
+ List> result = convertToMapList(data);
+ return new Result>>().ok(result);
+ }
+
+ /**
+ * @Description 将议题项目统计数据转为前端需要的格式
+ * @return
+ * @author wxz
+ * @date 2021.07.05 16:35
+ */
+ private List> convertToMapList(GridMemberDataAnalysisResultDTO data) {
+ Integer projectCount = data == null ? 0 : data.getProjectCount();
+ Integer closedIssueCount = data == null ? 0 : data.getClosedIssueCount();
+ Integer issueToProjectCount = data == null ? 0 : data.getIssueToProjectCount();
+ Integer projectClosedCount = data == null ? 0 : data.getProjectClosedCount();
+ Integer projectResponseCount = data == null ? 0 : data.getProjectResponseCount();
+ Integer projectTransferCount = data == null ? 0 : data.getProjectTransferCount();
+
+ HashMap projectCountMap = new HashMap<>();
+ projectCountMap.put("key", "直接立项数");
+ projectCountMap.put("value", projectCount);
+ projectCountMap.put("type", "project");
+
+ HashMap closedIssueCountMap = new HashMap<>();
+ closedIssueCountMap.put("key", "议题转项目数");
+ closedIssueCountMap.put("value", issueToProjectCount);
+ closedIssueCountMap.put("type", "project");
+
+ HashMap issueClosedCountMap = new HashMap<>();
+ issueClosedCountMap.put("key", "议题关闭数");
+ issueClosedCountMap.put("value", closedIssueCount);
+ issueClosedCountMap.put("type", "issue");
+
+ HashMap projectResponseCountMap = new HashMap<>();
+ projectResponseCountMap.put("key", "项目响应数");
+ projectResponseCountMap.put("value", projectResponseCount);
+ projectResponseCountMap.put("type", "project");
+
+ HashMap projectTransferCountMap = new HashMap<>();
+ projectTransferCountMap.put("key", "项目吹哨数");
+ projectTransferCountMap.put("value", projectTransferCount);
+ projectTransferCountMap.put("type", "project");
+
+ HashMap projectClosedCountMap = new HashMap<>();
+ projectClosedCountMap.put("key", "项目结案数");
+ projectClosedCountMap.put("value", projectClosedCount);
+ projectClosedCountMap.put("type", "project");
+
+ ArrayList> maps = new ArrayList<>(6);
+ maps.add(projectCountMap);
+ maps.add(closedIssueCountMap);
+ maps.add(issueClosedCountMap);
+ maps.add(projectResponseCountMap);
+ maps.add(projectTransferCountMap);
+ maps.add(projectClosedCountMap);
+ return maps;
+ }
+ /**
+ * @Param formDTO
+ * @Description 对外接口--查询工作人员基本信息
+ * @author sun
+ */
+ @PostMapping("open-staffdetail")
+ public Result openStaffDetail(@RequestBody OpenStaffDetailFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO, OpenStaffDetailFormDTO.Open.class);
+ return new Result().ok(epmetUserService.openStaffDetail(formDTO));
+ }
+
}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovOrgController.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovOrgController.java
index 262aff38c3..064669c50d 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovOrgController.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovOrgController.java
@@ -1,20 +1,35 @@
package com.epmet.dataaggre.controller;
import com.epmet.commons.tools.annotation.LoginUser;
+import com.epmet.commons.tools.annotation.RequirePermission;
+import com.epmet.commons.tools.enums.RequirePermissionEnum;
+import com.epmet.commons.tools.exception.EpmetErrorCode;
+import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
+import com.epmet.dataaggre.dto.govorg.form.GridMemberDataAnalysisFromDTO;
import com.epmet.dataaggre.dto.govorg.form.NextAreaCodeFormDTO;
import com.epmet.dataaggre.dto.govorg.result.AgencyGridListResultDTO;
+import com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO;
import com.epmet.dataaggre.dto.govorg.result.NextAreaCodeResultDTO;
+import com.epmet.dataaggre.enums.GridMemberDataAnalysisEnums;
+import com.epmet.dataaggre.service.AggreGridService;
import com.epmet.dataaggre.service.govorg.GovOrgService;
+import com.epmet.dto.result.PublicAndInternalFileResultDTO;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.xmlbeans.impl.xb.xsdschema.Public;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import java.util.ArrayList;
import java.util.List;
+import java.util.PriorityQueue;
/**
* @Author zxc
@@ -27,6 +42,12 @@ public class GovOrgController {
@Autowired
private GovOrgService govOrgService;
+ @Autowired
+ private LoginUserUtil loginUserUtil;
+
+ @Autowired
+ private AggreGridService aggreGridService;
+
/**
* @param tokenDTO
@@ -51,4 +72,51 @@ public class GovOrgController {
ValidatorUtils.validateEntity(formDTO);
return new Result>().ok(govOrgService.queryNextLevelAreaCodeList(formDTO));
}
+
+ /**
+ * @Description 网格员统计,列表查询
+ * @return
+ * @author wxz
+ * @date 2021.07.05 11:14
+ */
+ @PostMapping("gridmemberdataanalysis")
+ @RequirePermission(requirePermission = RequirePermissionEnum.MORE_GRID_MEMBER_STATS_ANALYSIS)
+ public Result getGridMemberDataAnalysis(@RequestBody GridMemberDataAnalysisFromDTO input) {
+ ValidatorUtils.validateEntity(input, GridMemberDataAnalysisFromDTO.listGridMemberDatas.class);
+
+ List gridIds = input.getGridIds();
+ String month = input.getMonth();
+ Integer pageNo = input.getPageNo();
+ Integer pageSize = input.getPageSize();
+ String sort = input.getSort();
+ String searchedStaffName = input.getSearchedStaffName();
+ String loginUserId = loginUserUtil.getLoginUserId();
+
+ // 排序字段检验
+ GridMemberDataAnalysisEnums sortType;
+ if ((sortType = GridMemberDataAnalysisEnums.get(sort)) == null ) {
+ throw new RenException(EpmetErrorCode.OPEN_API_PARAMS_MISSING.getCode(), "未知的排序方式");
+ }
+
+ // 用户登录状态判断
+ if (StringUtils.isBlank(loginUserId)) {
+ throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), "查询网格员统计数据失败");
+ }
+
+ // 月份格式判断
+ if (StringUtils.isNotBlank(month)) {
+ if (!month.matches("\\d{4}/\\d{2}")) {
+ throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), "月份格式错误:" + month);
+ } else {
+ month = month.replace("/", "");
+ }
+ }
+
+ // 网格id为空处理
+ if (CollectionUtils.isEmpty(gridIds)) {
+ gridIds = new ArrayList<>();
+ }
+ List resultList = aggreGridService.getGridMemberDataAnalysis(gridIds, searchedStaffName, loginUserId, month, sortType.getValue(), pageNo, pageSize);
+ return new Result().ok(resultList);
+ }
}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/datastats/DataStatsDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/datastats/DataStatsDao.java
index b49b16fc0c..d157058b2e 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/datastats/DataStatsDao.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/datastats/DataStatsDao.java
@@ -25,6 +25,7 @@ import com.epmet.dataaggre.dto.resigroup.ActCategoryDictDTO;
import com.epmet.dataaggre.dto.resigroup.result.GroupActRankDetailDTO;
import com.epmet.dataaggre.entity.datastats.DimAgencyEntity;
import com.epmet.dataaggre.entity.datastats.DimGridEntity;
+import com.epmet.dataaggre.entity.datastats.FactAgencyGovernDailyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -41,43 +42,43 @@ public interface DataStatsDao {
* @Description 查询组织下注册用户最新日统计数据
* @author sun
*/
- AgencyBasicDataResultDTO getAgnecyRegUser(@Param("agencyId") String agencyId, @Param("dateId") String dateId);
+ List getAgnecyRegUser(@Param("agencyIds") List agencyIds, @Param("dateId") String dateId);
/**
* @Description 查询组织下最新群组日统计数据
* @author sun
*/
- AgencyBasicDataResultDTO getAgnecyGroup(@Param("agencyId") String agencyId, @Param("dateId") String dateId);
+ List getAgnecyGroup(@Param("agencyIds") List agencyIds, @Param("dateId") String dateId);
/**
* @Description 查询组织下最新状态话题-机关日统计数据表
* @author sun
*/
- List getAgencyTopic(@Param("agencyId") String agencyId, @Param("dateId") String dateId);
+ List getAgencyTopic(@Param("agencyIds") List agencyIds, @Param("dateId") String dateId);
/**
* @Description 查询组织下最新转议题话题-机关日统计数据表
* @author sun
*/
- AgencyBasicDataResultDTO.Topic getAgencyTopicShiftIssue(@Param("agencyId") String agencyId, @Param("dateId") String dateId);
+ List getAgencyTopicShiftIssue(@Param("agencyIds") List agencyIds, @Param("dateId") String dateId);
/**
* @Description 热议中话题-机关日统计数据
* @author sun
*/
- AgencyBasicDataResultDTO.Topic getAgencyTopicHotDiscuss(@Param("agencyId") String agencyId, @Param("dateId") String dateId);
+ List getAgencyTopicHotDiscuss(@Param("agencyIds") List agencyIds, @Param("dateId") String dateId);
/**
* @Description 查询组织下最新议题日统计数据
* @author sun
*/
- AgencyBasicDataResultDTO getAgencyIssue(@Param("agencyId") String agencyId, @Param("dateId") String dateId);
+ List getAgencyIssue(@Param("agencyIds") List agencyIds, @Param("dateId") String dateId);
/**
* @Description 查询组织下最新项目日统计数据
* @author sun
*/
- AgencyBasicDataResultDTO getAgencyProject(@Param("agencyId") String agencyId, @Param("dateId") String dateId);
+ List getAgencyProject(@Param("agencyIds") List agencyIds, @Param("dateId") String dateId);
/**
* @Description 查询当前组织的直属下级组织信息
@@ -242,4 +243,14 @@ public interface DataStatsDao {
* @author sun
*/
List getGridGovern(@Param("gridIds") List gridIds, @Param("dateId") String dateId);
+
+ /**
+ * 根据组织Id查询事件治理指数
+ * @author zhaoqifeng
+ * @date 2021/6/25 15:08
+ * @param agencyIds
+ * @param dateId
+ * @return com.epmet.dataaggre.entity.datastats.FactAgencyGovernDailyEntity
+ */
+ List getAgencyGovernDaily(@Param("agencyIds") List agencyIds, @Param("dateId") String dateId);
}
\ No newline at end of file
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/datastats/FactGridMemberStatisticsDailyDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/datastats/FactGridMemberStatisticsDailyDao.java
new file mode 100644
index 0000000000..a8ea0bcc94
--- /dev/null
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/datastats/FactGridMemberStatisticsDailyDao.java
@@ -0,0 +1,55 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dataaggre.dao.datastats;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO;
+import com.epmet.dataaggre.entity.datastats.FactGridMemberStatisticsDailyEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 网格员数据统计_日统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-07-05
+ */
+@Mapper
+public interface FactGridMemberStatisticsDailyDao extends BaseDao {
+
+ /**
+ * @Description 查询网格员统计数据
+ * @return
+ * @author wxz
+ * @date 2021.07.05 13:19
+ */
+ List listGridMemberDataStats(@Param("gridIds") List gridIds,
+ @Param("searchedStaffName") String searchedStaffName,
+ @Param("month") String month,
+ @Param("sort") String sort);
+
+ /**
+ * @Description 查询网格员议题项目统计数据
+ * @return
+ * @author wxz
+ * @date 2021.07.05 16:17
+ */
+ GridMemberDataAnalysisResultDTO getGridMemberIssueProjectStats(@Param("staffId") String staffId);
+}
\ No newline at end of file
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/CustomerStaffDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/CustomerStaffDao.java
index 9d3004c815..b3ca304972 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/CustomerStaffDao.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/CustomerStaffDao.java
@@ -18,8 +18,10 @@
package com.epmet.dataaggre.dao.epmetuser;
import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dataaggre.dto.epmetuser.CustomerStaffDTO;
import com.epmet.dataaggre.entity.epmetuser.CustomerStaffEntity;
import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
/**
* 政府工作人员表
@@ -29,5 +31,10 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface CustomerStaffDao extends BaseDao {
-
+
+ /**
+ * @Description 按staffId查询基础信息
+ * @author sun
+ */
+ CustomerStaffDTO selectByMobile(@Param("customerId") String customerId, @Param("mobile") String mobile);
}
\ No newline at end of file
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/StaffPatrolRecordDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/StaffPatrolRecordDao.java
index 5c6cb03bdb..36385a7cbd 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/StaffPatrolRecordDao.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/StaffPatrolRecordDao.java
@@ -23,6 +23,7 @@ import com.epmet.dataaggre.dto.epmetuser.form.StaffListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.result.StaffListResultDTO;
import com.epmet.dataaggre.entity.epmetuser.StaffPatrolRecordEntity;
import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -41,4 +42,15 @@ public interface StaffPatrolRecordDao extends BaseDao {
*/
List selectPatrolList(StaffListFormDTO formDTO);
+ /**
+ * @Description 按条件查询巡查业务数据V2
+ * @author sun
+ */
+ List selectStaffPatrolList(StaffListFormDTO formDTO);
+
+ /**
+ * @Description 汇总查询当前工作人员所有巡查记录数据
+ * @author sun
+ */
+ StaffListResultDTO selectPersonalPatrolList(@Param("staffId") String staffId);
}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/evaluationindex/EvaluationIndexDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/evaluationindex/EvaluationIndexDao.java
index c9084a0b4b..197b4e05e6 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/evaluationindex/EvaluationIndexDao.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/evaluationindex/EvaluationIndexDao.java
@@ -18,9 +18,14 @@
package com.epmet.dataaggre.dao.evaluationindex;
import com.epmet.dataaggre.dto.datastats.result.GovrnRatioResultDTO;
+import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerAgencyDTO;
+import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerGridDTO;
+import com.epmet.dataaggre.dto.evaluationindex.ScreenGovernRankDataDailyDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
+import java.util.List;
+
/**
* @Author sun
* @Description 指标统计服务
@@ -34,4 +39,60 @@ public interface EvaluationIndexDao {
* @author sun
*/
GovrnRatioResultDTO getAgnecyOrGridGoverRatio(@Param("orgId") String orgId, @Param("orgType") String orgType, @Param("dateId") String dateId);
+
+ /**
+ * @Description 查询areaCode对应的直属下级且不是agencyId对应的客户id的客户组织列表
+ * @author sun
+ */
+ List getAgencyByAreaCodeAgencyId(@Param("agencyId") String agencyId, @Param("areaCode") String areaCode);
+
+ /**
+ * @Description 查询直属下级组织列表,有areaCode的按areaCode查,没有的按agencyId查
+ * @author sun
+ */
+ List getSubAgencyList(@Param("agencyId") String agencyId, @Param("areaCode") String areaCode);
+
+ /**
+ * @Description 查询指标库组织直属网格列表【这个客户组织网格数据包括小程序的和项目上报的】
+ * @author sun
+ */
+ List getSubGridList(@Param("agencyId") String agencyId);
+
+ /**
+ * 根据组织Id查询治理指数
+ * @author zhaoqifeng
+ * @date 2021/6/25 16:36
+ * @param agencyIds
+ * @param dateId
+ * @return java.util.List
+ */
+ ScreenGovernRankDataDailyDTO getGovernRankList(@Param("agencyIds") List agencyIds, @Param("dateId") String dateId);
+
+ /**
+ * 获取组织信息
+ * @author zhaoqifeng
+ * @date 2021/6/29 13:58
+ * @param agencyId
+ * @return com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerAgencyDTO
+ */
+ ScreenCustomerAgencyDTO getAgencyInfo(@Param("agencyId") String agencyId);
+
+ /**
+ * @Description 查询agencyId对应组织信息
+ * @author sun
+ */
+ ScreenCustomerAgencyDTO getByAgencyId(@Param("agencyId") String agencyId);
+
+ /**
+ * @Description 存在子客户的,查询当前组织的areaCode对应的直属下级且不是agencyId对应的客户id的但是存在父子客户关系的客户组织列表
+ * @author sun
+ */
+ List getAgencyIdsByAgencyId(@Param("agencyId") String agencyId, @Param("areaCode") String areaCode, @Param("list") List list);
+
+ /**
+ * @Description 查询直属下级组织列表,有areaCode的按areaCode查,没有的按agencyId查且是在当前客户和子客户范围内查询
+ * @author sun
+ */
+ List getSubAgencyListByAgency(@Param("agencyId") String agencyId, @Param("areaCode") String areaCode, @Param("list") List list);
+
}
\ No newline at end of file
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerGridDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerGridDao.java
index cc73cc2c1f..3fcc8655ed 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerGridDao.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerGridDao.java
@@ -62,4 +62,10 @@ public interface CustomerGridDao extends BaseDao {
* @Description 查询工作人员所属组织下网格列表
**/
List gridListByStaffId(@Param("staffId") String staffId);
+
+ /**
+ * @Description 有网格列表的查询网格基本信息,没有的查询工作人员所属组织级下级所有的网格信息
+ * @author sun
+ */
+ List getGridInfoList(@Param("gridIds") List gridIds, @Param("staffId") String staffId);
}
\ No newline at end of file
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerStaffAgencyDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerStaffAgencyDao.java
index f8b58c698b..445e796c61 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerStaffAgencyDao.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerStaffAgencyDao.java
@@ -18,6 +18,7 @@
package com.epmet.dataaggre.dao.govorg;
import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dataaggre.dto.govorg.CustomerAgencyDTO;
import com.epmet.dataaggre.dto.govorg.CustomerStaffAgencyDTO;
import com.epmet.dataaggre.entity.govorg.CustomerStaffAgencyEntity;
import org.apache.ibatis.annotations.Mapper;
@@ -38,4 +39,9 @@ public interface CustomerStaffAgencyDao extends BaseDao selectUsedAreaCodeList(String areaCode);
+
+ /**
+ * 根据customerId查询其所有下级子客户id
+ * @author zhaoqifeng
+ * @date 2021/6/29 11:04
+ * @param customerId
+ * @return java.util.List
+ */
+ List selectAllSubCustomerIds(String customerId);
}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/datastats/FactAgencyGovernDailyEntity.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/datastats/FactAgencyGovernDailyEntity.java
new file mode 100644
index 0000000000..d709731f77
--- /dev/null
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/datastats/FactAgencyGovernDailyEntity.java
@@ -0,0 +1,174 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dataaggre.entity.datastats;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+
+/**
+ * 组织的治理指数,按天统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-05-24
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("fact_agency_govern_daily")
+public class FactAgencyGovernDailyEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户id
+ */
+ private String customerId;
+
+ /**
+ * 数据更新至:yyyyMMdd;
+ */
+ private String dateId;
+
+ /**
+ * 组织id
+ */
+ private String agencyId;
+
+ /**
+ * agency_id所属的机关级别(社区级:community,
+乡(镇、街道)级:street,
+区县级: district,
+市级: city
+省级:province)
+ */
+ private String level;
+
+ /**
+ * 组织i所属的组织id
+ */
+ private String pid;
+
+ /**
+ * 组织i所有上级id
+ */
+ private String pids;
+
+ /**
+ * 界面展示:问题解决总数=1+2+3+4+5+6+7+8
+ */
+ private Integer problemResolvedCount;
+
+ /**
+ * 界面展示:党群自治占比=(9+10)/PROBLEM_RESOLVED_COUNT; 此列存储的是小数
+ */
+ private BigDecimal groupSelfGovernRatio;
+
+ /**
+ * 界面展示:网格自治占比=GRID_SELF_GOVERN_PROJECT_TOTAL/PROBLEM_RESOLVED_COUNT;此列存储的是小数
+ */
+ private BigDecimal gridSelfGovernRatio;
+
+ /**
+ * 界面展示:社区解决占比=COMMUNITY_CLOSED_COUNT/PROBLEM_RESOLVED_COUNT;此列存储的是小数
+ */
+ private BigDecimal communityClosedRatio;
+
+ /**
+ * 界面展示:街道解决占比=STREET_CLOSED_COUNT/PROBLEM_RESOLVED_COUNT;此列存储的是小数
+ */
+ private BigDecimal streetClosedRatio;
+
+ /**
+ * 界面展示:区直部门解决占比=DISTRICT_DEPT_CLOSED_COUNT/PROBLEM_RESOLVED_COUNT;此列存储的是小数
+ */
+ private BigDecimal districtDeptClosedRatio;
+
+ /**
+ * 1、当前组织内,话题关闭已解决数
+ */
+ private Integer topicResolvedCount;
+
+ /**
+ * 2、当前组织内,话题关闭无需解决数
+ */
+ private Integer topicUnResolvedCount;
+
+ /**
+ * 3、当前组织内,议题关闭已解决数
+ */
+ private Integer issueResolvedCount;
+
+ /**
+ * 4、当前组织内,议题关闭无需解决数
+ */
+ private Integer issueUnResolvedCount;
+
+ /**
+ * 5、当前组织内:来源于议题的项目:结案已解决数
+ */
+ private Integer issueProjectResolvedCount;
+
+ /**
+ * 6、当前组织内:来源于议题的项目:结案无需解决数
+ */
+ private Integer issueProjectUnResolvedCount;
+
+ /**
+ * 7、当前组织内:项目立项,结案已解决数;默认为0,
+ */
+ private Integer approvalProjectResolvedCount;
+
+ /**
+ * 8、当前组织内:项目立项,结案无需解决数;默认为0,
+ */
+ private Integer approvalProjectUnResolvedCount;
+
+ /**
+ * 9、当前组织内,未出小组即未转议题的:话题关闭已解决数
+ */
+ private Integer inGroupTopicResolvedCount;
+
+ /**
+ * 10、当前组织内,未出小组即未转议题的:话题关闭无需解决数
+ */
+ private Integer inGroupTopicUnResolvedCount;
+
+ /**
+ * 未出当前网格的,结案项目数
+ */
+ private Integer gridSelfGovernProjectTotal;
+
+ /**
+ * 当前组织内结案的项目中:由社区结案的项目总数
+ */
+ private Integer communityClosedCount;
+
+ /**
+ * 当前组织内结案的项目中:由街道结案的项目总数
+ */
+ private Integer streetClosedCount;
+
+ /**
+ * 当前组织内结案的项目中:由区直部门结案的项目总数
+ */
+ private Integer districtDeptClosedCount;
+
+}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/datastats/FactGridMemberStatisticsDailyEntity.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/datastats/FactGridMemberStatisticsDailyEntity.java
new file mode 100644
index 0000000000..dbcc2d5f26
--- /dev/null
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/datastats/FactGridMemberStatisticsDailyEntity.java
@@ -0,0 +1,131 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dataaggre.entity.datastats;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 网格员数据统计_日统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-07-05
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("fact_grid_member_statistics_daily")
+public class FactGridMemberStatisticsDailyEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * yyyyMMdd
+ */
+ private String dateId;
+
+ /**
+ * 月份ID
+ */
+ private String monthId;
+
+ /**
+ * 年度ID
+ */
+ private String yearId;
+
+ /**
+ * 来源类型 external:外部,internal:内部
+ */
+ private String sourceType;
+
+ /**
+ * 客户Id
+ */
+ private String customerId;
+
+ /**
+ * 数据来源客户Id
+ */
+ private String sourceCustomerId;
+
+ /**
+ * 组织ID
+ */
+ private String agencyId;
+
+ /**
+ * 网格I
+ */
+ private String gridId;
+
+ /**
+ * 上级ID(项目来源Agency的上级组织Id)
+ */
+ private String pid;
+
+ /**
+ * 所有agencyId的上级组织ID(包含agencyId)
+ */
+ private String pids;
+
+ /**
+ * 工作人员ID
+ */
+ private String staffId;
+
+ /**
+ * 工作人员姓名
+ */
+ private String staffName;
+
+ /**
+ * 项目立项数
+ */
+ private Integer projectCount;
+
+ /**
+ * 议题转项目数
+ */
+ private Integer issueToProjectCount;
+
+ /**
+ * 议题关闭数
+ */
+ private Integer closedIssueCount;
+
+ /**
+ * 项目响应数
+ */
+ private Integer projectResponseCount;
+
+ /**
+ * 项目吹哨数
+ */
+ private Integer projectTransferCount;
+
+ /**
+ * 项目结案数
+ */
+ private Integer projectClosedCount;
+
+}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmetuser/GovStaffRoleEntity.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmetuser/GovStaffRoleEntity.java
index d10c281e10..be03ad7913 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmetuser/GovStaffRoleEntity.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmetuser/GovStaffRoleEntity.java
@@ -63,6 +63,11 @@ public class GovStaffRoleEntity extends BaseEpmetEntity {
*/
private Integer fullTimeOnly;
+ /**
+ * 角色对应的职责说明
+ */
+ private String description;
+
/**
* 排序
*/
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmetuser/GovStaffRoleTemplateEntity.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmetuser/GovStaffRoleTemplateEntity.java
index 24e77d5ef3..aa6b1e6db9 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmetuser/GovStaffRoleTemplateEntity.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmetuser/GovStaffRoleTemplateEntity.java
@@ -58,4 +58,14 @@ public class GovStaffRoleTemplateEntity extends BaseEpmetEntity {
*/
private Integer fullTimeOnly;
+ /**
+ * 角色对应的职责说明
+ */
+ private String description;
+
+ /**
+ * 排序
+ */
+ private String sort;
+
}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/AggreGridService.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/AggreGridService.java
new file mode 100644
index 0000000000..3702bbb319
--- /dev/null
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/AggreGridService.java
@@ -0,0 +1,20 @@
+package com.epmet.dataaggre.service;
+
+import com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO;
+
+import java.util.List;
+
+/**
+ * @Description 聚合的网格相关service,不指定具体的数据源,它调用其他子service,子service中指定具体数据源
+ * @author wxz
+ * @date 2021.07.05 13:06:35
+*/
+public interface AggreGridService {
+ /**
+ * @Description 网格员数据统计列表查询
+ * @return
+ * @author wxz
+ * @date 2021.07.05 11:17
+ */
+ List getGridMemberDataAnalysis(List gridIds, String searchedStaffName, String currStaffId, String month, String sort, Integer pageNo, Integer pageSize);
+}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/DataStatsService.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/DataStatsService.java
index 8b08a765d2..36ec2943db 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/DataStatsService.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/DataStatsService.java
@@ -3,9 +3,11 @@ package com.epmet.dataaggre.service.datastats;
import com.epmet.dataaggre.dto.datastats.FactGroupActDailyDTO;
import com.epmet.dataaggre.dto.datastats.form.*;
import com.epmet.dataaggre.dto.datastats.result.*;
+import com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO;
import com.epmet.dataaggre.dto.resigroup.ActCategoryDictDTO;
import com.epmet.dataaggre.dto.resigroup.result.GroupActRankDetailDTO;
+import java.security.PrivateKey;
import java.util.List;
/**
@@ -159,4 +161,25 @@ public interface DataStatsService {
* @author sun
*/
GovrnRatioResultDTO governRatio(GovrnRatioFormDTO formDTO);
+
+ /**
+ * @Description 查询网格员统计数据列表
+ * @return
+ * @author wxz
+ * @date 2021.07.05 13:13
+ */
+ List listGridMemberDataStats(List gridIds,
+ String searchedStaffName,
+ String month,
+ String sort,
+ Integer pageNo,
+ Integer pageSize);
+
+ /**
+ * @Description 单个网格员议题项目统计数据
+ * @return
+ * @author wxz
+ * @date 2021.07.05 16:05
+ */
+ GridMemberDataAnalysisResultDTO getGridMemberIssueProjectStats(String staffId);
}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java
index b61338b163..bfa9a29710 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java
@@ -1,20 +1,30 @@
package com.epmet.dataaggre.service.datastats.impl;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.constant.OrgConstant;
import com.epmet.dataaggre.dao.datastats.DataStatsDao;
+import com.epmet.dataaggre.dao.datastats.FactGridMemberStatisticsDailyDao;
import com.epmet.dataaggre.dto.datastats.FactGroupActDailyDTO;
import com.epmet.dataaggre.dto.datastats.form.*;
import com.epmet.dataaggre.dto.datastats.result.*;
+import com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO;
+import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerAgencyDTO;
+import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerGridDTO;
+import com.epmet.dataaggre.dto.evaluationindex.ScreenGovernRankDataDailyDTO;
import com.epmet.dataaggre.dto.resigroup.ActCategoryDictDTO;
import com.epmet.dataaggre.dto.resigroup.result.GroupActRankDetailDTO;
import com.epmet.dataaggre.entity.datastats.DimAgencyEntity;
import com.epmet.dataaggre.entity.datastats.DimGridEntity;
+import com.epmet.dataaggre.entity.datastats.FactGridMemberStatisticsDailyEntity;
+import com.epmet.dataaggre.entity.datastats.FactAgencyGovernDailyEntity;
import com.epmet.dataaggre.service.datastats.DataStatsService;
import com.epmet.dataaggre.service.evaluationindex.EvaluationIndexService;
+import com.github.pagehelper.PageHelper;
+import com.epmet.dataaggre.service.opercrm.CustomerRelation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
@@ -42,6 +52,11 @@ public class DataStatsServiceImpl implements DataStatsService {
private DataStatsDao dataStatsDao;
@Autowired
private EvaluationIndexService indexService;
+ @Autowired
+ private CustomerRelation customerRelation;
+
+ @Autowired
+ private FactGridMemberStatisticsDailyDao factGridMemberStatisticsDailyDao;
/**
@@ -52,6 +67,7 @@ public class DataStatsServiceImpl implements DataStatsService {
@Override
public AgencyBasicDataResultDTO agencyBasicData(AgenctBasicDataFormDTO formDTO) {
AgencyBasicDataResultDTO resultDTO = new AgencyBasicDataResultDTO();
+ List agencyList = new ArrayList<>();
resultDTO.setAgencyId(formDTO.getAgencyId());
NumberFormat numberFormat = NumberFormat.getInstance();
numberFormat.setMaximumFractionDigits(NumConstant.THREE);
@@ -63,78 +79,100 @@ public class DataStatsServiceImpl implements DataStatsService {
formDTO.setDateId(format.format(yesterday));
}
+ //0.根据组织Id查询是否存在子客户,存在的按areaCode查询当前客户之外的客户组织列表
+ agencyList = indexService.getAgencyIdsByAgencyId(formDTO.getAgencyId());
+ agencyList.add(formDTO.getAgencyId());
+
//1.查询组织下注册用户最新日统计数据【只查询注册用户的统计数据,不涉及参与用户的】
- AgencyBasicDataResultDTO user = dataStatsDao.getAgnecyRegUser(formDTO.getAgencyId(), formDTO.getDateId());
- if (null != user) {
- resultDTO.setUserTotal(user.getUserTotal());
- resultDTO.setResiTotal(user.getResiTotal());
- resultDTO.setResiRatio(user.getResiTotal() == 0 || user.getUserTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) user.getResiTotal() / (float) user.getUserTotal())));
- resultDTO.setPartyMemberTotal(user.getPartyMemberTotal());
- resultDTO.setPartyMemberRatio(user.getPartyMemberTotal() == 0 || user.getUserTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) user.getPartyMemberTotal() / (float) user.getUserTotal())));
- }
+ List userList = dataStatsDao.getAgnecyRegUser(agencyList, formDTO.getDateId());
+ int userTotal = 0;
+ int resiTotal = 0;
+ int partyMemberTotal = 0;
+ for (AgencyBasicDataResultDTO u : userList){
+ userTotal+=u.getUserTotal();
+ resiTotal+=u.getResiTotal();
+ partyMemberTotal+=u.getPartyMemberTotal();
+ }
+ resultDTO.setUserTotal(userTotal);
+ resultDTO.setResiTotal(resiTotal);
+ resultDTO.setResiRatio(resultDTO.getResiTotal() == 0 || resultDTO.getUserTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) resultDTO.getResiTotal() / (float) resultDTO.getUserTotal())));
+ resultDTO.setPartyMemberTotal(partyMemberTotal);
+ resultDTO.setPartyMemberRatio(resultDTO.getPartyMemberTotal() == 0 || resultDTO.getUserTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) resultDTO.getPartyMemberTotal() / (float) resultDTO.getUserTotal())));
//2.查询组织下最新群组日统计数据
- AgencyBasicDataResultDTO group = dataStatsDao.getAgnecyGroup(formDTO.getAgencyId(), formDTO.getDateId());
- if (null != group) {
- resultDTO.setGroupTotal(group.getGroupTotal());
- resultDTO.setOrdinaryTotal(group.getOrdinaryTotal());
- resultDTO.setOrdinaryRatio(group.getOrdinaryTotal() == 0 || group.getGroupTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) group.getOrdinaryTotal() / (float) group.getGroupTotal())));
- resultDTO.setBranchTotal(group.getBranchTotal());
- resultDTO.setBranchRatio(group.getBranchTotal() == 0 || group.getGroupTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) group.getBranchTotal() / (float) group.getGroupTotal())));
- }
+ List groupList = dataStatsDao.getAgnecyGroup(agencyList, formDTO.getDateId());
+ int groupTotal = 0;
+ int ordinaryTotal = 0;
+ int branchTotal = 0;
+ for (AgencyBasicDataResultDTO g : groupList){
+ groupTotal+=g.getGroupTotal();
+ ordinaryTotal+=g.getOrdinaryTotal();
+ branchTotal+=g.getBranchTotal();
+ }
+ resultDTO.setGroupTotal(groupTotal);
+ resultDTO.setOrdinaryTotal(ordinaryTotal);
+ resultDTO.setOrdinaryRatio(resultDTO.getOrdinaryTotal() == 0 || resultDTO.getGroupTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) resultDTO.getOrdinaryTotal() / (float) resultDTO.getGroupTotal())));
+ resultDTO.setBranchTotal(branchTotal);
+ resultDTO.setBranchRatio(resultDTO.getBranchTotal() == 0 || resultDTO.getGroupTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) resultDTO.getBranchTotal() / (float) resultDTO.getGroupTotal())));
//3.查询组织下最新话题日统计数据
//状态话题-机关日统计数据表最新日期三种状态数据
//机关日表里三种类型数据之和就是话题总量,讨论中数量与热议中不是一个概念
- List topic = dataStatsDao.getAgencyTopic(formDTO.getAgencyId(), formDTO.getDateId());
+ List topic = dataStatsDao.getAgencyTopic(agencyList, formDTO.getDateId());
//转议题话题-机关日统计数据表
- AgencyBasicDataResultDTO.Topic topicSHiftIssue = dataStatsDao.getAgencyTopicShiftIssue(formDTO.getAgencyId(), formDTO.getDateId());
+ List topicSHiftIssue = dataStatsDao.getAgencyTopicShiftIssue(agencyList, formDTO.getDateId());
//热议中话题-机关日统计数据
- AgencyBasicDataResultDTO.Topic hotdiscuss = dataStatsDao.getAgencyTopicHotDiscuss(formDTO.getAgencyId(), formDTO.getDateId());
- AtomicReference closedTotal = new AtomicReference<>(0);
- if (topic.size() > NumConstant.ZERO) {
- resultDTO.setTopicTotal(topic.stream().collect(Collectors.summingInt(AgencyBasicDataResultDTO.Topic::getTopicCount)));
- topic.forEach(t -> {
- if (t.getTopicStatus().equals("closed")) {
- closedTotal.set(t.getTopicCount());
- }
- });
- }
+ List hotdiscuss = dataStatsDao.getAgencyTopicHotDiscuss(agencyList, formDTO.getDateId());
+ //话题总数
+ resultDTO.setTopicTotal(topic.stream().collect(Collectors.summingInt(AgencyBasicDataResultDTO.Topic::getTopicCount)));
+ int closedTotal = topic.stream().filter(t -> t.getTopicStatus().equals("closed")).mapToInt(AgencyBasicDataResultDTO.Topic::getTopicCount).sum();
//转议题
- if (null != topicSHiftIssue) {
- resultDTO.setShiftIssueTotal(topicSHiftIssue.getShiftedIssueTotal());
- resultDTO.setShiftIssueRatio(resultDTO.getShiftIssueTotal() == 0 || resultDTO.getTopicTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) resultDTO.getShiftIssueTotal() / (float) resultDTO.getTopicTotal())));
- }
+ int shiftIssueTotal = topicSHiftIssue.stream().mapToInt(AgencyBasicDataResultDTO.Topic::getShiftedIssueTotal).sum();
+ resultDTO.setShiftIssueTotal(shiftIssueTotal);
+ resultDTO.setShiftIssueRatio(resultDTO.getShiftIssueTotal() == 0 || resultDTO.getTopicTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) resultDTO.getShiftIssueTotal() / (float) resultDTO.getTopicTotal())));
//热议中
- if (null != hotdiscuss) {
- resultDTO.setDiscussingTotal(hotdiscuss.getTopicCount());
- resultDTO.setDiscussingRatio(resultDTO.getDiscussingTotal() == 0 || resultDTO.getTopicTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) resultDTO.getDiscussingTotal() / (float) resultDTO.getTopicTotal())));
- }
+ int discussingTotal = hotdiscuss.stream().mapToInt(AgencyBasicDataResultDTO.Topic::getTopicCount).sum();
+ resultDTO.setDiscussingTotal(discussingTotal);
+ resultDTO.setDiscussingRatio(resultDTO.getDiscussingTotal() == 0 || resultDTO.getTopicTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) resultDTO.getDiscussingTotal() / (float) resultDTO.getTopicTotal())));
//已处理
- resultDTO.setClosedTopicTotal(closedTotal.get());
+ resultDTO.setClosedTopicTotal(closedTotal);
resultDTO.setClosedTopicRatio(resultDTO.getClosedTopicTotal() == 0 || resultDTO.getTopicTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) resultDTO.getClosedTopicTotal() / (float) resultDTO.getTopicTotal())));
//4.查询组织下最新议题日统计数据
- AgencyBasicDataResultDTO issue = dataStatsDao.getAgencyIssue(formDTO.getAgencyId(), formDTO.getDateId());
- if (null != issue) {
- resultDTO.setIssueTotal(issue.getIssueTotal());
- resultDTO.setVotingTotal(issue.getVotingTotal());
- resultDTO.setVotingRatio(resultDTO.getVotingTotal() == 0 || resultDTO.getIssueTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) resultDTO.getVotingTotal() / (float) resultDTO.getIssueTotal())));
- resultDTO.setClosedIssueTotal(issue.getClosedIssueTotal());
- resultDTO.setClosedIssueRatio(resultDTO.getClosedIssueTotal() == 0 || resultDTO.getIssueTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) resultDTO.getClosedIssueTotal() / (float) resultDTO.getIssueTotal())));
- resultDTO.setShiftProjectTotal(issue.getShiftProjectTotal());
- resultDTO.setShiftProjectRatio(resultDTO.getShiftProjectTotal() == 0 || resultDTO.getIssueTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) resultDTO.getShiftProjectTotal() / (float) resultDTO.getIssueTotal())));
- }
+ List issueList = dataStatsDao.getAgencyIssue(agencyList, formDTO.getDateId());
+ int issueTotal = 0;
+ int votingTotal = 0;
+ int closedIssueTotal = 0;
+ int shiftProjectTotal = 0;
+ for (AgencyBasicDataResultDTO i : issueList){
+ issueTotal+=i.getIssueTotal();
+ votingTotal+=i.getVotingTotal();
+ closedIssueTotal+=i.getClosedIssueTotal();
+ shiftProjectTotal+=i.getShiftProjectTotal();
+ }
+ resultDTO.setIssueTotal(issueTotal);
+ resultDTO.setVotingTotal(votingTotal);
+ resultDTO.setVotingRatio(resultDTO.getVotingTotal() == 0 || resultDTO.getIssueTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) resultDTO.getVotingTotal() / (float) resultDTO.getIssueTotal())));
+ resultDTO.setClosedIssueTotal(closedIssueTotal);
+ resultDTO.setClosedIssueRatio(resultDTO.getClosedIssueTotal() == 0 || resultDTO.getIssueTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) resultDTO.getClosedIssueTotal() / (float) resultDTO.getIssueTotal())));
+ resultDTO.setShiftProjectTotal(shiftProjectTotal);
+ resultDTO.setShiftProjectRatio(resultDTO.getShiftProjectTotal() == 0 || resultDTO.getIssueTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) resultDTO.getShiftProjectTotal() / (float) resultDTO.getIssueTotal())));
//5.查询组织下最新项目日统计数据
- AgencyBasicDataResultDTO project = dataStatsDao.getAgencyProject(formDTO.getAgencyId(), formDTO.getDateId());
- if (null != project) {
- resultDTO.setProjectTotal(project.getProjectTotal());
- resultDTO.setPendingTotal(project.getPendingTotal());
- resultDTO.setPendingRatio(resultDTO.getPendingTotal() == 0 || resultDTO.getProjectTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) resultDTO.getPendingTotal() / (float) resultDTO.getProjectTotal())));
- resultDTO.setClosedProjectTotal(project.getClosedProjectTotal());
- resultDTO.setClosedProjectRatio(resultDTO.getClosedProjectTotal() == 0 || resultDTO.getProjectTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) resultDTO.getClosedProjectTotal() / (float) resultDTO.getProjectTotal())));
- }
+ List projectList = dataStatsDao.getAgencyProject(agencyList, formDTO.getDateId());
+ int projectTotal = 0;
+ int pendingTotal = 0;
+ int closedProjectTotal = 0;
+ for (AgencyBasicDataResultDTO p : projectList){
+ projectTotal+=p.getProjectTotal();
+ pendingTotal+=p.getPendingTotal();
+ closedProjectTotal+=p.getClosedProjectTotal();
+ }
+ resultDTO.setProjectTotal(projectTotal);
+ resultDTO.setPendingTotal(pendingTotal);
+ resultDTO.setPendingRatio(resultDTO.getPendingTotal() == 0 || resultDTO.getProjectTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) resultDTO.getPendingTotal() / (float) resultDTO.getProjectTotal())));
+ resultDTO.setClosedProjectTotal(closedProjectTotal);
+ resultDTO.setClosedProjectRatio(resultDTO.getClosedProjectTotal() == 0 || resultDTO.getProjectTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) resultDTO.getClosedProjectTotal() / (float) resultDTO.getProjectTotal())));
return resultDTO;
}
@@ -258,23 +296,25 @@ public class DataStatsServiceImpl implements DataStatsService {
formDTO.setType("user");
}
- //1.查询当前组织的直属下级组织信息【机关维度】
- List subAgencyList = dataStatsDao.getSubAgencyList(formDTO.getAgencyId());
+ //1.查询直属下级组织列表,有子客户的按areaCode查没有的按agencyId查
+ List subAgencyList = indexService.getSubAgencyListByAgency(formDTO.getAgencyId());
if (subAgencyList.size() < NumConstant.ONE) {
return resultList;
}
- List agencyIds = subAgencyList.stream().map(DimAgencyEntity::getId).collect(Collectors.toList());
+ List agencyIds = subAgencyList.stream().map(ScreenCustomerAgencyDTO::getAgencyId).collect(Collectors.toList());
//2.查询直属下级组织注册用户日统计数据,默认按用户总数降序
List list = dataStatsDao.getSubAgencyUser(agencyIds, formDTO.getDateId());
//3.封装数据
- for (DimAgencyEntity sub : subAgencyList) {
+ for (ScreenCustomerAgencyDTO sub : subAgencyList) {
SubAgencyUserResultDTO dto = new SubAgencyUserResultDTO();
- dto.setAgencyId(sub.getId());
+ dto.setAgencyId(sub.getAgencyId());
dto.setAgencyName(sub.getAgencyName());
+ dto.setLevel(null == sub.getLevel() ? "" : sub.getLevel());
+ dto.setAreaCode(null == sub.getAreaCode() ? "" : sub.getAreaCode());
for (SubAgencyUserResultDTO u : list) {
- if (sub.getId().equals(u.getAgencyId())) {
+ if (sub.getAgencyId().equals(u.getAgencyId())) {
dto.setUserTotal(u.getUserTotal());
dto.setPartyMemberTotal(u.getPartyMemberTotal());
dto.setResiTotal(u.getResiTotal());
@@ -327,23 +367,23 @@ public class DataStatsServiceImpl implements DataStatsService {
formDTO.setType("user");
}
- //1.查询组织直属网格列表【网格维度】
- List gridList = dataStatsDao.getSubGridList(formDTO.getAgencyId());
+ //1.查询指标库组织直属网格列表【这个客户组织网格数据包括小程序的和项目上报的】
+ List gridList = indexService.getSubGridList(formDTO.getAgencyId());
if (gridList.size() < NumConstant.ONE) {
return resultList;
}
- List gridIds = gridList.stream().map(DimGridEntity::getId).collect(Collectors.toList());
+ List gridIds = gridList.stream().map(ScreenCustomerGridDTO::getGridId).collect(Collectors.toList());
//2.查询网格层级注册用户日统计数据,默认按用户总数降序
List list = dataStatsDao.getSubGridUser(gridIds, formDTO.getDateId());
//3.封装数据
- for (DimGridEntity gr : gridList) {
+ for (ScreenCustomerGridDTO gr : gridList) {
SubGridUserResultDTO dto = new SubGridUserResultDTO();
- dto.setGridId(gr.getId());
+ dto.setGridId(gr.getGridId());
dto.setGridName(gr.getGridName());
for (SubGridUserResultDTO re : list) {
- if (gr.getId().equals(re.getGridId())) {
+ if (gr.getGridId().equals(re.getGridId())) {
dto.setUserTotal(re.getUserTotal());
dto.setPartyMemberTotal(re.getPartyMemberTotal());
dto.setResiTotal(re.getResiTotal());
@@ -394,23 +434,25 @@ public class DataStatsServiceImpl implements DataStatsService {
formDTO.setType("group");
}
- //1.查询当前组织的直属下级组织信息【机关维度】
- List subAgencyList = dataStatsDao.getSubAgencyList(formDTO.getAgencyId());
+ //1.查询直属下级组织列表,有子客户的按areaCode查没有的按agencyId查
+ List subAgencyList = indexService.getSubAgencyListByAgency(formDTO.getAgencyId());
if (subAgencyList.size() < NumConstant.ONE) {
return resultList;
}
- List agencyIds = subAgencyList.stream().map(DimAgencyEntity::getId).collect(Collectors.toList());
+ List agencyIds = subAgencyList.stream().map(ScreenCustomerAgencyDTO::getAgencyId).collect(Collectors.toList());
//2.查询直属下级组织小组日统计数据,默认按群组总数降序
List list = dataStatsDao.getSubAgencyGroup(agencyIds, formDTO.getDateId());
//3.封装数据
- for (DimAgencyEntity sub : subAgencyList) {
+ for (ScreenCustomerAgencyDTO sub : subAgencyList) {
SubAgencyGroupResultDTO dto = new SubAgencyGroupResultDTO();
- dto.setAgencyId(sub.getId());
+ dto.setAgencyId(sub.getAgencyId());
dto.setAgencyName(sub.getAgencyName());
+ dto.setLevel(null == sub.getLevel() ? "" : sub.getLevel());
+ dto.setAreaCode(null == sub.getAreaCode() ? "" : sub.getAreaCode());
for (SubAgencyGroupResultDTO u : list) {
- if (sub.getId().equals(u.getAgencyId())) {
+ if (sub.getAgencyId().equals(u.getAgencyId())) {
dto.setGroupTotal(u.getGroupTotal());
dto.setOrdinaryTotal(u.getOrdinaryTotal());
dto.setBranchTotal(u.getBranchTotal());
@@ -460,23 +502,23 @@ public class DataStatsServiceImpl implements DataStatsService {
formDTO.setType("group");
}
- //1.查询组织直属网格列表【网格维度】
- List gridList = dataStatsDao.getSubGridList(formDTO.getAgencyId());
+ //1.查询指标库组织直属网格列表【这个客户组织网格数据包括小程序的和项目上报的】
+ List gridList = indexService.getSubGridList(formDTO.getAgencyId());
if (gridList.size() < NumConstant.ONE) {
return resultList;
}
- List gridIds = gridList.stream().map(DimGridEntity::getId).collect(Collectors.toList());
+ List gridIds = gridList.stream().map(ScreenCustomerGridDTO::getGridId).collect(Collectors.toList());
//2.查询网格层级小组日统计数据,默认按群组总数降序
List list = dataStatsDao.getSubGridGroup(gridIds, formDTO.getDateId());
//3.封装数据并返回
- for (DimGridEntity gr : gridList) {
+ for (ScreenCustomerGridDTO gr : gridList) {
SubGridGroupResultDTO dto = new SubGridGroupResultDTO();
- dto.setGridId(gr.getId());
+ dto.setGridId(gr.getGridId());
dto.setGridName(gr.getGridName());
for (SubGridGroupResultDTO re : list) {
- if (gr.getId().equals(re.getGridId())) {
+ if (gr.getGridId().equals(re.getGridId())) {
dto.setGroupTotal(re.getGroupTotal());
dto.setOrdinaryTotal(re.getOrdinaryTotal());
dto.setBranchTotal(re.getBranchTotal());
@@ -527,12 +569,12 @@ public class DataStatsServiceImpl implements DataStatsService {
formDTO.setType("topic");
}
- //1.查询当前组织的直属下级组织信息【机关维度】
- List subAgencyList = dataStatsDao.getSubAgencyList(formDTO.getAgencyId());
+ //1.查询直属下级组织列表,有子客户的按areaCode查没有的按agencyId查
+ List subAgencyList = indexService.getSubAgencyListByAgency(formDTO.getAgencyId());
if (subAgencyList.size() < NumConstant.ONE) {
return resultList;
}
- List agencyIds = subAgencyList.stream().map(DimAgencyEntity::getId).collect(Collectors.toList());
+ List agencyIds = subAgencyList.stream().map(ScreenCustomerAgencyDTO::getAgencyId).collect(Collectors.toList());
//2.查询直属下级组织状态话题-日统计数据
//机关日表里三种类型数据之和就是话题总量,讨论中数量与热议中不是一个概念
@@ -548,7 +590,7 @@ public class DataStatsServiceImpl implements DataStatsService {
AtomicInteger shiftIssueTotal = new AtomicInteger(0);
AtomicInteger hotdiscussTotal = new AtomicInteger(0);
topic.forEach(t -> {
- if (t.getAgencyId().equals(sub.getId())) {
+ if (t.getAgencyId().equals(sub.getAgencyId())) {
topicTotal.addAndGet(t.getTopicCount());
if (t.getTopicStatus().equals("closed")) {
closedTotal.set(t.getTopicCount());
@@ -556,18 +598,20 @@ public class DataStatsServiceImpl implements DataStatsService {
}
});
topicShiftIssue.forEach(t -> {
- if (t.getAgencyId().equals(sub.getId())) {
+ if (t.getAgencyId().equals(sub.getAgencyId())) {
shiftIssueTotal.addAndGet(t.getShiftedIssueTotal());
}
});
hotdiscuss.forEach(t -> {
- if (t.getAgencyId().equals(sub.getId())) {
+ if (t.getAgencyId().equals(sub.getAgencyId())) {
hotdiscussTotal.addAndGet(t.getTopicCount());
}
});
- resultDTO.setAgencyId(sub.getId());
+ resultDTO.setAgencyId(sub.getAgencyId());
resultDTO.setAgencyName(sub.getAgencyName());
+ resultDTO.setLevel(null == sub.getLevel() ? "" : sub.getLevel());
+ resultDTO.setAreaCode(null == sub.getAreaCode() ? "" : sub.getAreaCode());
resultDTO.setTopicTotal(topicTotal.get());
resultDTO.setDiscussingTotal(hotdiscussTotal.get());
resultDTO.setDiscussingRatio(resultDTO.getDiscussingTotal() == 0 || resultDTO.getTopicTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) resultDTO.getDiscussingTotal() / (float) resultDTO.getTopicTotal())));
@@ -621,12 +665,12 @@ public class DataStatsServiceImpl implements DataStatsService {
formDTO.setType("topic");
}
- //1.查询组织直属网格列表【网格维度】
- List gridList = dataStatsDao.getSubGridList(formDTO.getAgencyId());
+ //1.查询指标库组织直属网格列表【这个客户组织网格数据包括小程序的和项目上报的】
+ List gridList = indexService.getSubGridList(formDTO.getAgencyId());
if (gridList.size() < NumConstant.ONE) {
return resultList;
}
- List gridIds = gridList.stream().map(DimGridEntity::getId).collect(Collectors.toList());
+ List gridIds = gridList.stream().map(ScreenCustomerGridDTO::getGridId).collect(Collectors.toList());
//2.查询网格层级话题数据
//查询网格层级状态话题-日统计数据 机关日表里三种类型数据之和就是话题总量,讨论中数量与热议中不是一个概念,热议中=总量-关闭数-屏蔽数-转议题数
@@ -642,7 +686,7 @@ public class DataStatsServiceImpl implements DataStatsService {
AtomicInteger shiftIssueTotal = new AtomicInteger(0);
AtomicInteger hotdiscussTotal = new AtomicInteger(0);
topic.forEach(t -> {
- if (t.getGridId().equals(gr.getId())) {
+ if (t.getGridId().equals(gr.getGridId())) {
topicTotal.addAndGet(t.getTopicCount());
if (t.getTopicStatus().equals("closed")) {
closedTotal.set(t.getTopicCount());
@@ -650,17 +694,17 @@ public class DataStatsServiceImpl implements DataStatsService {
}
});
topicShiftIssue.forEach(t -> {
- if (t.getGridId().equals(gr.getId())) {
+ if (t.getGridId().equals(gr.getGridId())) {
shiftIssueTotal.addAndGet(t.getShiftedIssueTotal());
}
});
hotdiscuss.forEach(t -> {
- if (t.getGridId().equals(gr.getId())) {
+ if (t.getGridId().equals(gr.getGridId())) {
hotdiscussTotal.addAndGet(t.getTopicCount());
}
});
- resultDTO.setGridId(gr.getId());
+ resultDTO.setGridId(gr.getGridId());
resultDTO.setGridName(gr.getGridName());
resultDTO.setTopicTotal(topicTotal.get());
resultDTO.setDiscussingTotal(hotdiscussTotal.get());
@@ -714,23 +758,25 @@ public class DataStatsServiceImpl implements DataStatsService {
formDTO.setType("issue");
}
- //1.查询当前组织的直属下级组织信息【机关维度】
- List subAgencyList = dataStatsDao.getSubAgencyList(formDTO.getAgencyId());
+ //1.查询直属下级组织列表,有子客户的按areaCode查没有的按agencyId查
+ List subAgencyList = indexService.getSubAgencyListByAgency(formDTO.getAgencyId());
if (subAgencyList.size() < NumConstant.ONE) {
return resultList;
}
- List agencyIds = subAgencyList.stream().map(DimAgencyEntity::getId).collect(Collectors.toList());
+ List agencyIds = subAgencyList.stream().map(ScreenCustomerAgencyDTO::getAgencyId).collect(Collectors.toList());
//2.查询直属下级组织议题日统计数据,默认按议题总数降序
List list = dataStatsDao.getSubAgencyIssue(agencyIds, formDTO.getDateId());
//3.封装数据
- for (DimAgencyEntity sub : subAgencyList) {
+ for (ScreenCustomerAgencyDTO sub : subAgencyList) {
SubAgencyIssueResultDTO dto = new SubAgencyIssueResultDTO();
- dto.setAgencyId(sub.getId());
+ dto.setAgencyId(sub.getAgencyId());
dto.setAgencyName(sub.getAgencyName());
+ dto.setLevel(null == sub.getLevel() ? "" : sub.getLevel());
+ dto.setAreaCode(null == sub.getAreaCode() ? "" : sub.getAreaCode());
for (SubAgencyIssueResultDTO u : list) {
- if (sub.getId().equals(u.getAgencyId())) {
+ if (sub.getAgencyId().equals(u.getAgencyId())) {
dto.setIssueTotal(u.getIssueTotal());
dto.setVotingTotal(u.getVotingTotal());
dto.setClosedIssueTotal(u.getClosedIssueTotal());
@@ -784,23 +830,23 @@ public class DataStatsServiceImpl implements DataStatsService {
formDTO.setType("issue");
}
- //1.查询组织直属网格列表【网格维度】
- List gridList = dataStatsDao.getSubGridList(formDTO.getAgencyId());
+ //1.查询指标库组织直属网格列表【这个客户组织网格数据包括小程序的和项目上报的】
+ List gridList = indexService.getSubGridList(formDTO.getAgencyId());
if (gridList.size() < NumConstant.ONE) {
return resultList;
}
- List gridIds = gridList.stream().map(DimGridEntity::getId).collect(Collectors.toList());
+ List gridIds = gridList.stream().map(ScreenCustomerGridDTO::getGridId).collect(Collectors.toList());
//2.查询网格层级议题日统计数据,默认按议题总数降序
List list = dataStatsDao.getSubGridIssue(gridIds, formDTO.getDateId());
//3.封装数据
- for (DimGridEntity gr : gridList) {
+ for (ScreenCustomerGridDTO gr : gridList) {
SubGridIssueResultDTO dto = new SubGridIssueResultDTO();
- dto.setGridId(gr.getId());
+ dto.setGridId(gr.getGridId());
dto.setGridName(gr.getGridName());
for (SubGridIssueResultDTO re : list) {
- if (gr.getId().equals(re.getGridId())) {
+ if (gr.getGridId().equals(re.getGridId())) {
dto.setIssueTotal(re.getIssueTotal());
dto.setVotingTotal(re.getVotingTotal());
dto.setClosedIssueTotal(re.getClosedIssueTotal());
@@ -854,23 +900,25 @@ public class DataStatsServiceImpl implements DataStatsService {
formDTO.setType("project");
}
- //1.查询当前组织的直属下级组织信息【机关维度】
- List subAgencyList = dataStatsDao.getSubAgencyList(formDTO.getAgencyId());
+ //1.查询直属下级组织列表,有子客户的按areaCode查没有的按agencyId查
+ List subAgencyList = indexService.getSubAgencyListByAgency(formDTO.getAgencyId());
if (subAgencyList.size() < NumConstant.ONE) {
return resultList;
}
- List agencyIds = subAgencyList.stream().map(DimAgencyEntity::getId).collect(Collectors.toList());
+ List agencyIds = subAgencyList.stream().map(ScreenCustomerAgencyDTO::getAgencyId).collect(Collectors.toList());
//2.查询直属下级组织项目日统计数据,默认按项目总数降序
List list = dataStatsDao.getSubAgencyProject(agencyIds, formDTO.getDateId());
//3.封装数据
- for (DimAgencyEntity sub : subAgencyList) {
+ for (ScreenCustomerAgencyDTO sub : subAgencyList) {
SubAgencyProjectResultDTO dto = new SubAgencyProjectResultDTO();
- dto.setAgencyId(sub.getId());
+ dto.setAgencyId(sub.getAgencyId());
dto.setAgencyName(sub.getAgencyName());
+ dto.setLevel(null == sub.getLevel() ? "" : sub.getLevel());
+ dto.setAreaCode(null == sub.getAreaCode() ? "" : sub.getAreaCode());
for (SubAgencyProjectResultDTO u : list) {
- if (sub.getId().equals(u.getAgencyId())) {
+ if (sub.getAgencyId().equals(u.getAgencyId())) {
dto.setProjectTotal(u.getProjectTotal());
dto.setPendingTotal(u.getPendingTotal());
dto.setClosedProjectTotal(u.getClosedProjectTotal());
@@ -920,23 +968,23 @@ public class DataStatsServiceImpl implements DataStatsService {
formDTO.setType("project");
}
- //1.查询组织直属网格列表【网格维度】
- List gridList = dataStatsDao.getSubGridList(formDTO.getAgencyId());
+ //1.查询指标库组织直属网格列表【这个客户组织网格数据包括小程序的和项目上报的】
+ List gridList = indexService.getSubGridList(formDTO.getAgencyId());
if (gridList.size() < NumConstant.ONE) {
return resultList;
}
- List gridIds = gridList.stream().map(DimGridEntity::getId).collect(Collectors.toList());
+ List gridIds = gridList.stream().map(ScreenCustomerGridDTO::getGridId).collect(Collectors.toList());
//2.查询网格层级项目日统计数据,默认按项目总数降序
List list = dataStatsDao.getSubGridProject(gridIds, formDTO.getDateId());
//3.封装数据
- for (DimGridEntity gr : gridList) {
+ for (ScreenCustomerGridDTO gr : gridList) {
SubGridProjectResultDTO dto = new SubGridProjectResultDTO();
- dto.setGridId(gr.getId());
+ dto.setGridId(gr.getGridId());
dto.setGridName(gr.getGridName());
for (SubGridProjectResultDTO re : list) {
- if (gr.getId().equals(re.getGridId())) {
+ if (gr.getGridId().equals(re.getGridId())) {
dto.setProjectTotal(re.getProjectTotal());
dto.setPendingTotal(re.getPendingTotal());
dto.setClosedProjectTotal(re.getClosedProjectTotal());
@@ -1078,6 +1126,7 @@ public class DataStatsServiceImpl implements DataStatsService {
public AgencyGovrnResultDTO agencyGovrn(AgencyGovrnFormDTO formDTO) {
AgencyGovrnResultDTO resultDTO = new AgencyGovrnResultDTO();
resultDTO.setAgencyId(formDTO.getAgencyId());
+ resultDTO.setLevel(formDTO.getLevel());
NumberFormat numberFormat = NumberFormat.getInstance();
numberFormat.setMaximumFractionDigits(NumConstant.THREE);
@@ -1087,6 +1136,42 @@ public class DataStatsServiceImpl implements DataStatsService {
SimpleDateFormat format = new SimpleDateFormat(DateUtils.DATE_PATTERN_YYYYMMDD);
formDTO.setDateId(format.format(yesterday));
}
+ ScreenCustomerAgencyDTO agencyDTO = indexService.getAgencyInfo(formDTO.getAgencyId());
+ if (CollectionUtils.isNotEmpty(customerRelation.haveSubCustomer(agencyDTO.getCustomerId()))) {
+ if (OrgConstant.PROVINCE.equals(agencyDTO.getLevel()) || OrgConstant.CITY.equals(agencyDTO.getLevel()) || OrgConstant.DISTRICT.equals(agencyDTO.getLevel())) {
+ List subAgencyIds = indexService.getAgencyByAreaCodeAgencyId(formDTO.getAgencyId(), agencyDTO.getAreaCode());
+ if (CollectionUtils.isEmpty(subAgencyIds)) {
+ subAgencyIds = new ArrayList<>();
+ }
+ subAgencyIds.add(formDTO.getAgencyId());
+ List list = dataStatsDao.getAgencyGovernDaily(subAgencyIds, formDTO.getDateId());
+ if (CollectionUtils.isNotEmpty(list)) {
+ //问题解决总数
+ Integer problemResolvedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getProblemResolvedCount).sum();
+ //未出小组即未转议题的:话题关闭已解决数
+ Integer inGroupTopicResolvedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getInGroupTopicResolvedCount).sum();
+ //未出小组即未转议题的:话题关闭无需解决数
+ Integer inGroupTopicUnResolvedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getInGroupTopicUnResolvedCount).sum();
+ //未出当前网格的,结案项目数
+ Integer gridSelfGovernProjectTotal = list.stream().mapToInt(FactAgencyGovernDailyEntity::getGridSelfGovernProjectTotal).sum();
+ //由社区结案的项目总数
+ Integer communityClosedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getCommunityClosedCount).sum();
+ //由街道结案的项目总数
+ Integer streetClosedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getStreetClosedCount).sum();
+ //由区直部门结案的项目总数
+ Integer districtDeptClosedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getDistrictDeptClosedCount).sum();
+
+ resultDTO.setProblemResolvedCount(problemResolvedCount);
+ resultDTO.setGroupSelfGovernRatio(getPercentage(inGroupTopicResolvedCount + inGroupTopicUnResolvedCount, problemResolvedCount));
+ resultDTO.setGridSelfGovernRatio(getPercentage(gridSelfGovernProjectTotal, problemResolvedCount));
+ resultDTO.setCommunityResolvedRatio(getPercentage(communityClosedCount, problemResolvedCount));
+ resultDTO.setStreetResolvedRatio(getPercentage(streetClosedCount, problemResolvedCount));
+ resultDTO.setDistrictDeptResolvedRatio(getPercentage(districtDeptClosedCount, problemResolvedCount));
+
+ return resultDTO;
+ }
+ }
+ }
//1.按日期查询当前组织事件治理指数
List agencyIds = new ArrayList<>();
agencyIds.add(formDTO.getAgencyId());
@@ -1125,6 +1210,18 @@ public class DataStatsServiceImpl implements DataStatsService {
return resultList;
}
List agencyIds = subAgencyList.stream().map(DimAgencyEntity::getId).collect(Collectors.toList());
+ ScreenCustomerAgencyDTO agencyDTO = indexService.getAgencyInfo(formDTO.getAgencyId());
+ if (CollectionUtils.isNotEmpty(customerRelation.haveSubCustomer(agencyDTO.getCustomerId()))) {
+ List subAgencies = indexService.getSubAgencyList(formDTO.getAgencyId(), agencyDTO.getAreaCode());
+ agencyIds = subAgencies.stream().map(ScreenCustomerAgencyDTO::getAgencyId).collect(Collectors.toList());
+ subAgencyList = subAgencies.stream().map(item -> {
+ DimAgencyEntity entity = new DimAgencyEntity();
+ entity.setId(item.getAgencyId());
+ entity.setAgencyName(item.getAgencyName());
+ entity.setLevel(item.getLevel());
+ return entity;
+ }).collect(Collectors.toList());
+ }
//2.按日期查询所有下级组织的事件治理指数
List list = dataStatsDao.getAgencyGovern(agencyIds, formDTO.getDateId());
@@ -1223,22 +1320,22 @@ public class DataStatsServiceImpl implements DataStatsService {
}
//1.查询组织直属网格列表【网格维度】
- List gridList = dataStatsDao.getSubGridList(formDTO.getAgencyId());
+ List gridList = indexService.getSubGridList(formDTO.getAgencyId());
if (gridList.size() < NumConstant.ONE) {
return resultList;
}
- List gridIds = gridList.stream().map(DimGridEntity::getId).collect(Collectors.toList());
+ List gridIds = gridList.stream().map(ScreenCustomerGridDTO::getGridId).collect(Collectors.toList());
//2.按日期查找组织直属网格事件治理指数列表
List list = dataStatsDao.getGridGovern(gridIds, formDTO.getDateId());
//3.封装数据
- for (DimGridEntity gr : gridList) {
+ for (ScreenCustomerGridDTO gr : gridList) {
GridGovrnResultDTO dto = new GridGovrnResultDTO();
- dto.setGridId(gr.getId());
+ dto.setGridId(gr.getGridId());
dto.setGridName(gr.getGridName());
for (GridGovrnResultDTO re : list) {
- if (gr.getId().equals(re.getGridId())) {
+ if (gr.getGridId().equals(re.getGridId())) {
dto.setProblemResolvedCount(re.getProblemResolvedCount());
dto.setGroupSelfGovernRatio(re.getGroupSelfGovernRatio());
dto.setGridSelfGovernRatio(re.getGridSelfGovernRatio());
@@ -1290,6 +1387,19 @@ public class DataStatsServiceImpl implements DataStatsService {
SimpleDateFormat format = new SimpleDateFormat(DateUtils.DATE_PATTERN_YYYYMMDD);
formDTO.setDateId(format.format(yesterday));
}
+ if (OrgConstant.AGENCY.equals(formDTO.getOrgType())) {
+ ScreenCustomerAgencyDTO agencyDTO = indexService.getAgencyInfo(formDTO.getOrgId());
+ if (CollectionUtils.isNotEmpty(customerRelation.haveSubCustomer(agencyDTO.getCustomerId()))) {
+ if (OrgConstant.PROVINCE.equals(agencyDTO.getLevel()) || OrgConstant.CITY.equals(agencyDTO.getLevel()) || OrgConstant.DISTRICT.equals(agencyDTO.getLevel())) {
+ ScreenGovernRankDataDailyDTO governData = indexService.getGovernRank(formDTO.getOrgId(), agencyDTO.getAreaCode(), formDTO.getDateId());
+ resultDTO.setGovernRatio(getPercentage(governData.getGovernCount(), governData.getClosedCount()));
+ resultDTO.setResolvedRatio(getPercentage(governData.getResolvedCount(), governData.getClosedCount()));
+ resultDTO.setResponseRatio(getPercentage(governData.getResponseCount(), governData.getTransferCount()));
+ resultDTO.setSatisfactionRatio(getPercentage(governData.getSatisfactionCount(), governData.getClosedProjectCount()));
+ return resultDTO;
+ }
+ }
+ }
//1.按类型、日期查询治理指数下响应解决满意自治四个统计率
GovrnRatioResultDTO dto = indexService.governRatio(formDTO);
@@ -1302,4 +1412,31 @@ public class DataStatsServiceImpl implements DataStatsService {
return resultDTO;
}
+ @Override
+ public List listGridMemberDataStats(List gridIds,
+ String searchedStaffName,
+ String month,
+ String sort,
+ Integer pageNo,
+ Integer pageSize) {
+
+ PageHelper.startPage(pageNo, pageSize);
+ return factGridMemberStatisticsDailyDao.listGridMemberDataStats(gridIds, searchedStaffName, month, sort);
+ }
+
+ @Override
+ public GridMemberDataAnalysisResultDTO getGridMemberIssueProjectStats(String staffId) {
+ return factGridMemberStatisticsDailyDao.getGridMemberIssueProjectStats( staffId);
+ }
+ private String getPercentage(Integer countInt, Integer totalInt) {
+ if (NumConstant.ZERO == totalInt) {
+ return "0%";
+ }
+ BigDecimal count = new BigDecimal(countInt);
+ BigDecimal total = new BigDecimal(totalInt);
+ BigDecimal hundred = new BigDecimal(NumConstant.ONE_HUNDRED);
+ BigDecimal ratio = count.multiply(hundred).divide(total, NumConstant.ONE, RoundingMode.HALF_UP);
+ return ratio.toString().concat("%");
+ }
+
}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java
index 359fcbe7a0..027e36fb8a 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java
@@ -1,12 +1,10 @@
package com.epmet.dataaggre.service.epmetuser;
+import com.epmet.dataaggre.dto.epmetuser.form.OpenStaffDetailFormDTO;
import com.epmet.dataaggre.dto.epmetuser.form.PatrolDateListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.form.PatrolRecordListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.form.StaffListFormDTO;
-import com.epmet.dataaggre.dto.epmetuser.result.PatrolDateListResultDTO;
-import com.epmet.dataaggre.dto.epmetuser.result.PatrolRecordListResultDTO;
-import com.epmet.dataaggre.dto.epmetuser.result.StaffListResultDTO;
-import com.epmet.dataaggre.dto.epmetuser.result.UserInfosResultDTO;
+import com.epmet.dataaggre.dto.epmetuser.result.*;
import com.epmet.dataaggre.dto.govorg.result.GridStaffResultDTO;
import java.util.List;
@@ -64,4 +62,23 @@ public interface EpmetUserService {
*/
List staffGridRole(List forms, String staffName);
+ /**
+ * @Param formDTO
+ * @Description 【更多-巡查记录-人员巡查记录列表】
+ * @author sun
+ */
+ List staffPatrolList(StaffListFormDTO formDTO);
+
+ /**
+ * @Description 个人中心-网格员巡查记录
+ * @author sun
+ */
+ List personalPatrolList(String staffId);
+ /**
+ * @Param formDTO
+ * @Description 对外接口--查询工作人员基本信息
+ * @author sun
+ */
+ OpenStaffDetailResultDTO openStaffDetail(OpenStaffDetailFormDTO formDTO);
+
}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java
index 175525d16d..326bb24f20 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java
@@ -4,15 +4,19 @@ import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.dataaggre.constant.DataSourceConstant;
+import com.epmet.dataaggre.dao.epmetuser.CustomerStaffDao;
import com.epmet.dataaggre.dao.epmetuser.StaffPatrolRecordDao;
import com.epmet.dataaggre.dao.epmetuser.StaffRoleDao;
import com.epmet.dataaggre.dao.epmetuser.UserBaseInfoDao;
+import com.epmet.dataaggre.dto.epmetuser.CustomerStaffDTO;
import com.epmet.dataaggre.dto.epmetuser.StaffPatrolDetailDTO;
import com.epmet.dataaggre.dto.epmetuser.StaffPatrolRecordDTO;
+import com.epmet.dataaggre.dto.epmetuser.form.OpenStaffDetailFormDTO;
import com.epmet.dataaggre.dto.epmetuser.form.PatrolDateListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.form.PatrolRecordListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.form.StaffListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.result.*;
+import com.epmet.dataaggre.dto.govorg.CustomerAgencyDTO;
import com.epmet.dataaggre.dto.govorg.CustomerGridDTO;
import com.epmet.dataaggre.dto.govorg.result.GridStaffResultDTO;
import com.epmet.dataaggre.service.epmetuser.EpmetUserService;
@@ -25,6 +29,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.text.NumberFormat;
import java.util.*;
import java.util.stream.Collectors;
@@ -49,6 +55,8 @@ public class EpmetUserServiceImpl implements EpmetUserService {
private StaffPatrolRecordService staffPatrolRecordService;
@Resource
private StaffRoleDao staffRoleDao;
+ @Resource
+ private CustomerStaffDao customerStaffDao;
/**
* @Description 根据UserIds查询
@@ -247,5 +255,115 @@ public class EpmetUserServiceImpl implements EpmetUserService {
return result;
}
+ /**
+ * @Param formDTO
+ * @Description 【更多-巡查记录-人员巡查记录列表】
+ * @author sun
+ */
+ @Override
+ public List staffPatrolList(StaffListFormDTO formDTO) {
+ List resultList = new ArrayList<>();
+ //1.查询网格信息供后续封装数据使用
+ List list = govOrgService.getGridInfoList(formDTO.getGridIds(), formDTO.getUserId());
+ if (CollectionUtils.isEmpty(formDTO.getGridIds())) {
+ formDTO.setGridIds(list.stream().map(CustomerGridDTO::getId).collect(Collectors.toList()));
+ }
+
+ //2.按条件分页查询业务数据
+ int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize();
+ formDTO.setPageNo(pageIndex);
+ //起始查询日期
+ formDTO.setPatrolStartTime(DateUtils.getBeforeMonthDate(formDTO.getTime(), "yyyyMMdd"));
+ resultList = staffPatrolRecordDao.selectStaffPatrolList(formDTO);
+
+ //3.封装数据并返回
+ resultList.forEach(re -> list.stream().filter(l -> re.getGridId().equals(l.getId())).forEach(s -> re.setGridName(s.getGridName())));
+ //NumberFormat numberFormat = NumberFormat.getInstance();
+ //numberFormat.setMaximumFractionDigits(NumConstant.ZERO);
+ resultList.forEach(re -> {
+ String totalTime = "0分钟";
+ if (re.getTimeNum() > NumConstant.ZERO) {
+ int num = re.getTimeNum() / 60;
+ int hour = num / 60;
+ int minute = num % 60;
+ totalTime = (hour < 1 ? "" : hour + "小时") + (minute < 1 ? "" : minute + "分钟");
+ }
+ re.setTotalTime(totalTime == "" ? "0分钟" : totalTime);
+ //re.setTotalTime(re.getTimeNum() < 1 ? BigDecimal.ZERO + "h" : new BigDecimal(numberFormat.format((float) re.getTimeNum() / (float) 3600)) + "h");
+ //re.setTotalTime(re.getTimeNum() / 60 + "分钟");
+ list.stream().filter(l -> re.getGridId().equals(l.getId())).forEach(s -> re.setGridName(s.getGridName()));
+ });
+
+ return resultList;
+ }
+
+ /**
+ * @Description 个人中心-网格员巡查记录
+ * @author sun
+ */
+ @Override
+ public List personalPatrolList(String staffId) {
+ LinkedList resultList = new LinkedList<>();
+ //1.汇总查询当前工作人员所有巡查记录数据
+ StaffListResultDTO resultDTO = staffPatrolRecordDao.selectPersonalPatrolList(staffId);
+ if (null == resultDTO) {
+ return resultList;
+ }
+ //2.封装数据并返回
+ NumberFormat numberFormat = NumberFormat.getInstance();
+ numberFormat.setMaximumFractionDigits(NumConstant.ZERO);
+ PersonalPatrolListResultDTO personal1 = new PersonalPatrolListResultDTO();
+ personal1.setKey("总次数");
+ personal1.setValue(resultDTO.getPatrolTotal().toString());
+ resultList.add(personal1);
+ PersonalPatrolListResultDTO personal2 = new PersonalPatrolListResultDTO();
+ personal2.setKey("总时长");
+ //personal2.setValue(resultDTO.getTimeNum() / 60 + "分钟");
+ String totalTime = "0分钟";
+ if (resultDTO.getTimeNum() > NumConstant.ZERO) {
+ int num = resultDTO.getTimeNum() / 60;
+ int hour = num / 60;
+ int minute = num % 60;
+ totalTime = (hour < 1 ? "" : hour + "小时") + (minute < 1 ? "" : minute + "分钟");
+ }
+ personal2.setValue(totalTime == "" ? "0分钟" : totalTime);
+ resultList.add(personal2);
+ PersonalPatrolListResultDTO personal3 = new PersonalPatrolListResultDTO();
+ personal3.setKey("事件数");
+ personal3.setValue(resultDTO.getReportProjectCount().toString());
+ resultList.add(personal3);
+
+ return resultList;
+ }
+ /**
+ * @Param formDTO
+ * @Description 对外接口--查询工作人员基本信息
+ * @author sun
+ */
+ @Override
+ public OpenStaffDetailResultDTO openStaffDetail(OpenStaffDetailFormDTO formDTO) {
+ OpenStaffDetailResultDTO resultDTO = new OpenStaffDetailResultDTO();
+ //1.按staffId查询基础信息
+ CustomerStaffDTO staffDTO = customerStaffDao.selectByMobile(formDTO.getCustomerId(), formDTO.getMobile());
+ if (null == staffDTO) {
+ return resultDTO;
+ }
+
+ //2.查询工作人员所属组织信息
+ CustomerAgencyDTO agencyDTO = govOrgService.gridByAgencyId(formDTO.getCustomerId(), staffDTO.getUserId());
+
+ //3.封装数据并返回
+ resultDTO.setCustomerId(formDTO.getCustomerId());
+ if (null != agencyDTO) {
+ resultDTO.setAgencyId(agencyDTO.getId());
+ resultDTO.setAgencyAllName(agencyDTO.getAllParentName());
+ }
+ resultDTO.setStaffId(staffDTO.getUserId());
+ resultDTO.setStaffName(staffDTO.getRealName());
+ resultDTO.setMobile(formDTO.getMobile());
+
+ return resultDTO;
+ }
+
}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/EvaluationIndexService.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/EvaluationIndexService.java
index 909a3dc208..43be38a84f 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/EvaluationIndexService.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/EvaluationIndexService.java
@@ -2,6 +2,11 @@ package com.epmet.dataaggre.service.evaluationindex;
import com.epmet.dataaggre.dto.datastats.form.GovrnRatioFormDTO;
import com.epmet.dataaggre.dto.datastats.result.GovrnRatioResultDTO;
+import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerAgencyDTO;
+import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerGridDTO;
+import com.epmet.dataaggre.dto.evaluationindex.ScreenGovernRankDataDailyDTO;
+
+import java.util.List;
/**
* @Author sun
@@ -15,4 +20,55 @@ public interface EvaluationIndexService {
* @author sun
*/
GovrnRatioResultDTO governRatio(GovrnRatioFormDTO formDTO);
+
+ /**
+ * @Description 查询areaCode对应的直属下级且不是agencyId对应的客户id的客户组织列表
+ * @author sun
+ */
+ List getAgencyByAreaCodeAgencyId(String agencyId, String areaCode);
+
+ /**
+ * @Description 查询直属下级组织列表,有areaCode的按areaCode查,没有的按agencyId查
+ * @author sun
+ */
+ List getSubAgencyList(String agencyId, String areaCode);
+
+ /**
+ * @Description 查询指标库组织直属网格列表【这个客户组织网格数据包括小程序的和项目上报的】
+ * @author sun
+ */
+ List getSubGridList(String agencyId);
+
+ /**
+ * 根据组织ID获取治理指数
+ * @author zhaoqifeng
+ * @date 2021/6/25 16:33
+ * @param agencyId
+ * @param areaCode
+ * @param dateId
+ * @return java.util.List
+ */
+ ScreenGovernRankDataDailyDTO getGovernRank(String agencyId, String areaCode, String dateId);
+
+ /**
+ * 获取组织信息
+ * @author zhaoqifeng
+ * @date 2021/6/29 13:57
+ * @param agencyId
+ * @return com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerAgencyDTO
+ */
+ ScreenCustomerAgencyDTO getAgencyInfo(String agencyId);
+
+ /**
+ * @Description 根据组织Id查询是否存在子客户,存在的按areaCode查询当前客户之外的客户组织列表
+ * @author sun
+ */
+ List getAgencyIdsByAgencyId(String agencyId);
+
+ /**
+ * @Description 查询直属下级组织列表,有子客户的按areaCode查没有的按agencyId查
+ * @author sun
+ */
+ List getSubAgencyListByAgency(String agencyId);
+
}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java
index bec7bafd90..fc9e6b8ba6 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java
@@ -7,14 +7,21 @@ import com.epmet.dataaggre.dao.datastats.DataStatsDao;
import com.epmet.dataaggre.dao.evaluationindex.EvaluationIndexDao;
import com.epmet.dataaggre.dto.datastats.form.GovrnRatioFormDTO;
import com.epmet.dataaggre.dto.datastats.result.GovrnRatioResultDTO;
+import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerAgencyDTO;
+import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerGridDTO;
+import com.epmet.dataaggre.dto.evaluationindex.ScreenGovernRankDataDailyDTO;
import com.epmet.dataaggre.service.evaluationindex.EvaluationIndexService;
+import com.epmet.dataaggre.service.opercrm.CustomerRelation;
import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
+import java.util.ArrayList;
import java.util.Date;
+import java.util.List;
/**
* @Author sun
@@ -26,6 +33,8 @@ import java.util.Date;
public class EvaluationIndexServiceImpl implements EvaluationIndexService {
@Autowired
private EvaluationIndexDao evaluationIndexDao;
+ @Autowired
+ private CustomerRelation customerRelation;
/**
* @Param formDTO
@@ -37,4 +46,99 @@ public class EvaluationIndexServiceImpl implements EvaluationIndexService {
return evaluationIndexDao.getAgnecyOrGridGoverRatio(formDTO.getOrgId(),formDTO.getOrgType(),formDTO.getDateId());
}
+ /**
+ * @Description 查询areaCode对应的直属下级且不是agencyId对应的客户id的客户组织列表
+ * @author sun
+ */
+ @Override
+ public List getAgencyByAreaCodeAgencyId(String agencyId, String areaCode) {
+ return evaluationIndexDao.getAgencyByAreaCodeAgencyId(agencyId,areaCode);
+ }
+
+ /**
+ * @Description 查询直属下级组织列表,有areaCode的按areaCode查,没有的按agencyId查
+ * @author sun
+ */
+ @Override
+ public List getSubAgencyList(String agencyId, String areaCode) {
+ return evaluationIndexDao.getSubAgencyList(agencyId,areaCode);
+ }
+
+ /**
+ * @Description 查询指标库组织直属网格列表【这个客户组织网格数据包括小程序的和项目上报的】
+ * @author sun
+ */
+ @Override
+ public List getSubGridList(String agencyId) {
+ return evaluationIndexDao.getSubGridList(agencyId);
+ }
+
+ /**
+ * 根据组织ID获取治理指数
+ *
+ * @param agencyId
+ * @param areaCode
+ * @param dateId
+ * @return java.util.List
+ * @author zhaoqifeng
+ * @date 2021/6/25 16:33
+ */
+ @Override
+ public ScreenGovernRankDataDailyDTO getGovernRank(String agencyId, String areaCode, String dateId) {
+ List agencyIdList = getAgencyByAreaCodeAgencyId(agencyId, areaCode);
+ if (CollectionUtils.isEmpty(agencyIdList)) {
+ agencyIdList = new ArrayList<>();
+ }
+ agencyIdList.add(agencyId);
+ return evaluationIndexDao.getGovernRankList(agencyIdList, dateId);
+ }
+
+ /**
+ * 获取组织信息
+ *
+ * @param agencyId
+ * @return com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerAgencyDTO
+ * @author zhaoqifeng
+ * @date 2021/6/29 13:57
+ */
+ @Override
+ public ScreenCustomerAgencyDTO getAgencyInfo(String agencyId) {
+ return evaluationIndexDao.getAgencyInfo(agencyId);
+ }
+
+ /**
+ * @Description 根据组织Id查询是否存在子客户,存在的按areaCode查询当前客户之外的客户组织列表
+ * @author sun
+ */
+ @Override
+ public List getAgencyIdsByAgencyId(String agencyId) {
+ //1.查询agencyId对应组织信息
+ ScreenCustomerAgencyDTO dto = evaluationIndexDao.getByAgencyId(agencyId);
+ //2.判断客户是否存在子客户
+ List list = customerRelation.haveSubCustomer(dto.getCustomerId());
+ if (!CollectionUtils.isNotEmpty(list)) {
+ return new ArrayList<>();
+ }
+ //3.存在子客户的,查询当前组织的areaCode对应的直属下级且不是agencyId对应的客户id的但是存在父子客户关系的客户组织列表
+ return evaluationIndexDao.getAgencyIdsByAgencyId(agencyId, dto.getAreaCode(), list);
+ }
+
+ /**
+ * @Description 查询直属下级组织列表,有子客户的按areaCode查没有的按agencyId查且是在当前客户和子客户范围内查询
+ * @author sun
+ */
+ @Override
+ public List getSubAgencyListByAgency(String agencyId) {
+ //1.查询agencyId对应组织信息
+ ScreenCustomerAgencyDTO dto = evaluationIndexDao.getByAgencyId(agencyId);
+ //2.判断客户是否存在子客户
+ List list = customerRelation.haveSubCustomer(dto.getCustomerId());
+ if (!CollectionUtils.isNotEmpty(list)) {
+ return evaluationIndexDao.getSubAgencyListByAgency(agencyId, null, null);
+ } else {
+ list.add(dto.getCustomerId());
+ return evaluationIndexDao.getSubAgencyListByAgency(null, dto.getAreaCode(), list);
+ }
+ }
+
}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java
index 8008242d5f..8cfd4a2276 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java
@@ -1,5 +1,6 @@
package com.epmet.dataaggre.service.govorg;
+import com.epmet.dataaggre.dto.govorg.CustomerAgencyDTO;
import com.epmet.dataaggre.dto.govorg.CustomerGridDTO;
import com.epmet.dataaggre.dto.govorg.form.NextAreaCodeFormDTO;
import com.epmet.dataaggre.dto.govorg.result.*;
@@ -59,4 +60,16 @@ public interface GovOrgService {
* @author sun
*/
List selectGridStaffByGridIds(List gridIds, String staffName);
+
+ /**
+ * @Description 查询网格信息或查询当前人员所属组织下所有网格信息
+ * @author sun
+ */
+ List getGridInfoList(List gridIds, String staffId);
+
+ /**
+ * @Description 查询工作人员所属组织信息
+ * @author sun
+ */
+ CustomerAgencyDTO gridByAgencyId(String customerId, String staffId);
}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java
index 29ed9208cf..31b5f9272c 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java
@@ -11,6 +11,7 @@ import com.epmet.dataaggre.dao.govorg.CustomerAgencyDao;
import com.epmet.dataaggre.dao.govorg.CustomerGridDao;
import com.epmet.dataaggre.dao.govorg.CustomerStaffAgencyDao;
import com.epmet.dataaggre.dao.govorg.CustomerStaffGridDao;
+import com.epmet.dataaggre.dto.govorg.CustomerAgencyDTO;
import com.epmet.dataaggre.dto.govorg.CustomerGridDTO;
import com.epmet.dataaggre.dto.govorg.CustomerStaffAgencyDTO;
import com.epmet.dataaggre.dto.govorg.form.NextAreaCodeFormDTO;
@@ -264,4 +265,24 @@ public class GovOrgServiceImpl implements GovOrgService {
return result;
}
+ /**
+ * @Description 查询网格信息或查询当前人员所属组织下所有网格信息
+ * @author sun
+ */
+ @Override
+ public List getGridInfoList(List gridIds, String staffId) {
+ //1.有网格列表的查询网格基本信息,没有的查询工作人员所属组织级下级所有的网格信息
+ List list = customerGridDao.getGridInfoList(gridIds, staffId);
+ return list;
+ }
+
+ /**
+ * @Description 查询工作人员所属组织信息
+ * @author sun
+ */
+ @Override
+ public CustomerAgencyDTO gridByAgencyId(String customerId, String staffId) {
+ return customerStaffAgencyDao.selectAgencyByStaffId(customerId, staffId);
+ }
+
}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/AggreGridServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/AggreGridServiceImpl.java
new file mode 100644
index 0000000000..d2fc60ad35
--- /dev/null
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/AggreGridServiceImpl.java
@@ -0,0 +1,51 @@
+package com.epmet.dataaggre.service.impl;
+
+import com.epmet.dataaggre.dto.govorg.CustomerGridDTO;
+import com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO;
+import com.epmet.dataaggre.service.AggreGridService;
+import com.epmet.dataaggre.service.datastats.DataStatsService;
+import com.epmet.dataaggre.service.govorg.GovOrgService;
+import org.apache.commons.collections4.CollectionUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+@Service
+public class AggreGridServiceImpl implements AggreGridService {
+
+ @Autowired
+ private GovOrgService govOrgService;
+
+ @Autowired
+ private DataStatsService dataStatsService;
+
+ @Override
+ public List getGridMemberDataAnalysis(
+ List gridIds,
+ String searchedStaffName,
+ String currStaffId,
+ String month,
+ String sort,
+ Integer pageNo,
+ Integer pageSize) {
+
+ //1.得到网格id列表
+ Map gridIdAndName = new HashMap<>();
+ List grids = govOrgService.getGridInfoList(gridIds, currStaffId);
+ grids.forEach(g -> {
+ gridIds.add(g.getId());
+ gridIdAndName.put(g.getId(), g.getGridName());
+ });
+
+ //2.查询列表,并且填充内容
+ List records = dataStatsService.listGridMemberDataStats(gridIds, searchedStaffName, month, sort, pageNo, pageSize);
+ records.forEach(r -> r.setOrgName(gridIdAndName.get(r.getGridId())));
+ return records;
+ }
+
+}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/opercrm/CustomerRelation.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/opercrm/CustomerRelation.java
index af0dc94e88..71d96fe17b 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/opercrm/CustomerRelation.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/opercrm/CustomerRelation.java
@@ -10,4 +10,13 @@ import java.util.List;
*/
public interface CustomerRelation {
List selectUsedAreaCodeList(String areaCode);
+
+ /**
+ * 是否有子客户
+ * @author zhaoqifeng
+ * @date 2021/6/29 11:06
+ * @param customerId
+ * @return List
+ */
+ List haveSubCustomer(String customerId);
}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/opercrm/impl/CustomerRelationImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/opercrm/impl/CustomerRelationImpl.java
index 045232e1a7..af5f40e53f 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/opercrm/impl/CustomerRelationImpl.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/opercrm/impl/CustomerRelationImpl.java
@@ -5,6 +5,7 @@ import com.epmet.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.dao.opercrm.CustomerRelationDao;
import com.epmet.dataaggre.service.opercrm.CustomerRelation;
import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -27,4 +28,17 @@ public class CustomerRelationImpl implements CustomerRelation {
public List selectUsedAreaCodeList(String areaCode) {
return customerRelationDao.selectUsedAreaCodeList(areaCode);
}
+
+ /**
+ * 是否有子客户
+ *
+ * @param customerId
+ * @return boolean
+ * @author zhaoqifeng
+ * @date 2021/6/29 11:06
+ */
+ @Override
+ public List haveSubCustomer(String customerId) {
+ return customerRelationDao.selectAllSubCustomerIds(customerId);
+ }
}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml
index fb5757da88..7b4361e463 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml
@@ -12,9 +12,10 @@
fact_reg_user_agency_daily
WHERE
del_flag = '0'
- AND agency_id = #{agencyId}
AND date_id = #{dateId}
- LIMIT 1
+
+ agency_id = #{agencyId}
+
@@ -26,9 +27,10 @@
fact_group_total_agency_daily
WHERE
del_flag = '0'
- AND agency_id = #{agencyId}
AND date_id = #{dateId}
- LIMIT 1
+
+ agency_id = #{agencyId}
+
@@ -40,9 +42,10 @@
WHERE
del_flag = '0'
AND topic_status_id in('discussing','closed','hidden')
- AND agency_id = #{agencyId}
AND date_id = #{dateId}
- LIMIT 3
+
+ agency_id = #{agencyId}
+
@@ -53,9 +56,10 @@
fact_topic_issue_agency_daily
WHERE
del_flag = '0'
- AND agency_id = #{agencyId}
AND date_id = #{dateId}
- LIMIT 1
+
+ agency_id = #{agencyId}
+
@@ -66,9 +70,10 @@
fact_topic_hotdiscuss_agency_daily
WHERE
del_flag = '0'
- AND agency_id = #{agencyId}
AND date_id = #{dateId}
- LIMIT 1
+
+ agency_id = #{agencyId}
+
@@ -81,9 +86,10 @@
fact_issue_agency_daily
WHERE
del_flag = '0'
- AND agency_id = #{agencyId}
AND date_id = #{dateId}
- LIMIT 1
+
+ agency_id = #{agencyId}
+
@@ -95,9 +101,10 @@
fact_agency_project_daily
WHERE
del_flag = '0'
- AND agency_id = #{agencyId}
AND date_id = #{dateId}
- LIMIT 1
+
+ agency_id = #{agencyId}
+
@@ -653,5 +660,30 @@
ORDER BY problem_resolved_count DESC
+
+ SELECT
+ AGENCY_ID,
+ `LEVEL`,
+ PROBLEM_RESOLVED_COUNT,
+ GROUP_SELF_GOVERN_RATIO,
+ GRID_SELF_GOVERN_RATIO,
+ COMMUNITY_CLOSED_RATIO,
+ STREET_CLOSED_RATIO,
+ DISTRICT_DEPT_CLOSED_RATIO,
+ IN_GROUP_TOPIC_RESOLVED_COUNT,
+ IN_GROUP_TOPIC_UN_RESOLVED_COUNT,
+ GRID_SELF_GOVERN_PROJECT_TOTAL,
+ COMMUNITY_CLOSED_COUNT,
+ STREET_CLOSED_COUNT,
+ DISTRICT_DEPT_CLOSED_COUNT
+ FROM
+ fact_agency_govern_daily
+ WHERE
+ DEL_FLAG = '0'
+ AND DATE_ID = #{dateId}
+
+ AGENCY_ID = #{agencyId}
+
+
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/FactGridMemberStatisticsDailyDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/FactGridMemberStatisticsDailyDao.xml
new file mode 100644
index 0000000000..fdbb6fdc04
--- /dev/null
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/FactGridMemberStatisticsDailyDao.xml
@@ -0,0 +1,133 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ member.id,
+ member.date_id,
+ member.month_id,
+ member.year_id,
+ member.customer_id,
+ member.agency_id,
+ member.grid_id,
+ member.pid,
+ member.pids,
+ member.staff_id,
+ member.staff_name,
+ member.project_count,
+ member.issue_to_project_count,
+ member.closed_issue_count,
+ member.project_response_count,
+ member.project_transfer_count,
+ member.project_closed_count,
+ member.project_incr,
+ member.issue_to_project_incr,
+ member.closed_issue_incr,
+ member.project_response_incr,
+ member.project_transfer_incr,
+ member.project_closed_incr,
+ member.del_flag,
+ member.revision,
+ member.created_by,
+ member.created_time,
+ member.updated_by,
+ member.updated_time
+
+
+
+
+
+ select member.id,
+ member.date_id,
+ member.month_id,
+ member.year_id,
+ member.customer_id,
+ member.agency_id,
+ member.grid_id,
+ member.pid,
+ member.pids,
+ member.staff_id,
+ member.staff_name,
+
+ sum(member.project_incr) project_count,
+ sum(member.issue_to_project_incr) issue_to_project_count,
+ sum(member.closed_issue_incr) closed_issue_count,
+ sum(member.project_response_incr) project_response_count,
+ sum(member.project_transfer_incr) project_transfer_count,
+ sum(member.project_closed_incr) project_closed_count
+ from fact_grid_member_statistics_daily member
+
+
+
+ member.GRID_ID = #{gridId}
+
+
+
+ and member.STAFF_NAME like CONCAT('%',#{searchedStaffName},'%')
+
+
+ and member.MONTH_ID = #{month}
+
+ and del_flag = 0
+
+ group by member.staff_id, member.grid_id
+ order by ${sort} desc, convert(member.staff_name using gbk) asc, member.GRID_ID asc
+
+
+
+ SELECT member.id,
+ member.date_id,
+ member.month_id,
+ member.year_id,
+ member.customer_id,
+ member.agency_id,
+ member.grid_id,
+ member.pid,
+ member.pids,
+ member.staff_id,
+ member.staff_name,
+ sum(member.project_count) project_count,
+ sum(member.issue_to_project_count) issue_to_project_count,
+ sum(member.closed_issue_count) closed_issue_count,
+ sum(member.project_response_count) project_response_count,
+ sum(member.project_transfer_count) project_transfer_count,
+ sum(member.project_closed_count) project_closed_count
+ FROM fact_grid_member_statistics_daily member
+ inner join (select max(mt.DATE_ID) latest_date
+ from fact_grid_member_statistics_daily mt
+ where mt.STAFF_ID = #{staffId} and mt.del_flag=0) latest_record
+ on (member.DATE_ID = latest_record.latest_date)
+ WHERE member.STAFF_ID = #{staffId}
+ and member.DEL_FLAG = 0
+
+
+
+
\ No newline at end of file
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/CustomerStaffDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/CustomerStaffDao.xml
index 43e15095e4..3b1b0c9db3 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/CustomerStaffDao.xml
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/CustomerStaffDao.xml
@@ -3,4 +3,16 @@
+
+ SELECT
+ *
+ FROM
+ customer_staff
+ WHERE
+ del_flag = '0'
+ AND customer_id = #{customerId}
+ AND mobile = #{mobile}
+ LIMIT 1
+
+
\ No newline at end of file
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/StaffPatrolRecordDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/StaffPatrolRecordDao.xml
index 662ce08625..ce078c21f3 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/StaffPatrolRecordDao.xml
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/StaffPatrolRecordDao.xml
@@ -51,4 +51,70 @@
-->
+
+ SELECT
+ d.latest_patrol_status AS status,
+ t.*
+ FROM(
+ SELECT
+ ssp.grid_id AS gridId,
+ ssp.staff_id AS staffId,
+ cs.real_name AS staffName,
+ cs.gender AS gender,
+ IFNULL(MAX(ssp.latest_patrol_time), '') AS patrolStartTime,
+ IFNULL(SUM(ssp.patrol_total), 0) AS patrolTotal,
+ MAX(DATE_ID) dateId,
+ IFNULL(SUM(ssp.report_project_count), 0) AS reportProjectCount,
+ IFNULL(SUM(ssp.total_time), 0) AS timeNum
+ FROM
+ stats_staff_patrol_record_daily ssp
+ LEFT JOIN customer_staff cs ON ssp.staff_id = cs.user_id
+ WHERE
+ ssp.del_flag = '0'
+ AND ssp.date_id >= #{patrolStartTime}
+
+ AND cs.real_name = #{staffName}
+
+
+
+ ssp.grid_id = #{gridId}
+
+
+ GROUP BY ssp.grid_id, ssp.staff_id
+
+
+
+ ORDER BY SUM(ssp.patrol_total) DESC
+
+
+ ORDER BY MAX(ssp.latest_patrol_time) DESC
+
+
+ ORDER BY SUM(ssp.report_project_count) DESC
+
+
+ ORDER BY SUM(ssp.total_time) DESC
+
+
+
+ LIMIT
+ #{pageNo}, #{pageSize}
+ ) t
+ INNER JOIN stats_staff_patrol_record_daily d ON t.dateId = d.date_id
+ AND t.gridId = d.grid_id
+ AND t.staffId = d.staff_id
+
+
+
+ SELECT
+ IFNULL(SUM(ssp.patrol_total), 0) AS patrolTotal,
+ IFNULL(SUM(ssp.total_time), 0) AS timeNum,
+ IFNULL(SUM(ssp.report_project_count), 0) AS reportProjectCount
+ FROM
+ stats_staff_patrol_record_daily ssp
+ WHERE
+ ssp.del_flag = '0'
+ AND ssp.staff_id = #{staffId}
+
+
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml
index a0c2e0c245..d248aa13df 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml
@@ -20,4 +20,158 @@
AND date_id = #{dateId}
+
+ SELECT
+ agency_id
+ FROM
+ screen_customer_agency
+ WHERE
+ del_flag = '0'
+ AND parent_area_code = #{areaCode}
+ AND customer_id != (
+ SELECT
+ customer_id
+ FROM
+ screen_customer_agency
+ WHERE
+ agency_id = #{agencyId}
+ )
+
+
+
+ SELECT
+ customer_id AS customerId,
+ agency_id AS agencyId,
+ agency_name AS agencyName,
+ level AS level,
+ area_code AS areaCode,
+ parent_area_code AS parentAreaCode
+ FROM
+ SCREEN_CUSTOMER_AGENCY
+ WHERE
+ del_flag = '0'
+
+
+ AND parent_area_code = #{areaCode}
+
+
+ AND pid = #{agencyId}
+
+
+
+
+
+ SELECT
+ customer_id AS customerId,
+ grid_id AS gridId,
+ grid_name AS gridName,
+ parent_agency_id AS parentAgencyId,
+ area_marks AS areaMarks,
+ center_mark AS centerMark,
+ party_mark AS partyMark,
+ data_end_time AS dataEndTime,
+ all_parent_ids AS allParentIds
+ FROM
+ screen_customer_grid
+ WHERE
+ del_flag = '0'
+ AND parent_agency_id = #{agencyId}
+
+
+ SELECT
+ IFNULL( SUM( RESPONSE_COUNT ), 0 ) AS responseCount,
+ IFNULL( SUM( TRANSFER_COUNT ), 0 ) AS transferCount,
+ IFNULL( SUM( RESOLVED_COUNT ), 0 ) AS resolvedCount,
+ IFNULL( SUM( CLOSED_COUNT ), 0 ) AS closedCount,
+ IFNULL( SUM( GOVERN_COUNT ), 0 ) AS governCount,
+ IFNULL( SUM( SATISFACTION_COUNT ), 0 ) AS satisfactionCount,
+ IFNULL( SUM( CLOSED_PROJECT_COUNT ), 0 ) AS closedProjectCount
+ FROM
+ screen_govern_rank_data_daily
+ WHERE
+ DEL_FLAG = '0'
+
+ ORG_ID = #{agencyId}
+
+ AND ORG_TYPE = 'agency'
+ AND DATE_ID = #{dateId}
+
+
+ SELECT
+ customer_id,
+ agency_id ,
+ agency_name,
+ level,
+ area_code,
+ parent_area_code
+ FROM
+ SCREEN_CUSTOMER_AGENCY
+ WHERE
+ del_flag = '0'
+ and AGENCY_ID = #{agencyId}
+
+
+
+ SELECT
+ customer_id AS customerId,
+ agency_id AS agencyId,
+ agency_name AS agencyName,
+ level AS level,
+ area_code AS areaCode,
+ parent_area_code AS parentAreaCode
+ FROM
+ screen_customer_agency
+ WHERE
+ del_flag = '0'
+ AND agency_id = #{agencyId}
+
+
+
+ SELECT
+ agency_id
+ FROM
+ screen_customer_agency
+ WHERE
+ del_flag = '0'
+ AND parent_area_code = #{areaCode}
+ AND customer_id != (
+ SELECT
+ customer_id
+ FROM
+ screen_customer_agency
+ WHERE
+ agency_id = #{agencyId}
+ )
+
+ customer_id = #{customerId}
+
+
+
+
+ SELECT
+ customer_id AS customerId,
+ agency_id AS agencyId,
+ agency_name AS agencyName,
+ level AS level,
+ area_code AS areaCode,
+ parent_area_code AS parentAreaCode
+ FROM
+ screen_customer_agency
+ WHERE
+ del_flag = '0'
+
+
+ AND parent_area_code = #{areaCode}
+
+
+ AND pid = #{agencyId}
+
+
+
+
+ customer_id = #{customerId}
+
+
+
+
\ No newline at end of file
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerGridDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerGridDao.xml
index 92cffd9271..2ca96e0edd 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerGridDao.xml
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerGridDao.xml
@@ -99,4 +99,52 @@
)
+
+ SELECT
+ cg.id AS 'id',
+ IF (
+ ca.pid = '0',
+ IF (
+ ca.organization_name = '',
+ cg.grid_name,
+ CONCAT(ca.organization_name,'-',cg.grid_name)
+ ),
+ CONCAT(
+ (select organization_name from customer_agency where id = ca.pid),
+ '-',
+ IF (
+ ca.organization_name = '',
+ cg.grid_name,
+ CONCAT(ca.organization_name,'-',cg.grid_name)
+ )
+ )
+ )AS 'gridName'
+ FROM
+ customer_grid cg
+ INNER JOIN customer_agency ca ON cg.pid = ca.id
+ WHERE
+ cg.del_flag = '0'
+ AND ca.del_flag = '0'
+
+
+
+ cg.id = #{id}
+
+
+
+ AND cg.pids
+ LIKE CONCAT(
+ '%',
+ (
+ select agency_id
+ from customer_staff_agency
+ where del_flag = '0'
+ AND user_id = #{staffId}
+ ),
+ '%'
+ )
+
+
+
+
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerStaffAgencyDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerStaffAgencyDao.xml
index 50269ca116..763c06694b 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerStaffAgencyDao.xml
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerStaffAgencyDao.xml
@@ -16,4 +16,18 @@
AND user_id = #{userId}
+
+ SELECT
+ ca.id,
+ ca.all_parent_name
+ FROM
+ customer_staff_agency csa
+ INNER JOIN customer_agency ca ON csa.agency_id = ca.id
+ WHERE
+ csa.del_flag = '0'
+ AND ca.del_flag = '0'
+ AND csa.customer_id = #{customerId}
+ AND csa.user_id = #{staffId}
+
+
\ No newline at end of file
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/opercrm/CustomerRelationDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/opercrm/CustomerRelationDao.xml
index 169a44070f..439efdb207 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/opercrm/CustomerRelationDao.xml
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/opercrm/CustomerRelationDao.xml
@@ -14,4 +14,13 @@
AND cr.AREA_CODE LIKE concat(#{areaCode}, '%')
AND cr.AREA_CODE != #{areaCode}
+
+ SELECT
+ cr.CUSTOMER_ID
+ FROM
+ customer_relation cr
+ WHERE
+ cr.DEL_FLAG = '0'
+ AND cr.PIDS like CONCAT(#{customerId},'%')
+
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/AgencyInfoDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/AgencyInfoDTO.java
index 04d4896995..e2d3f77953 100644
--- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/AgencyInfoDTO.java
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/AgencyInfoDTO.java
@@ -13,8 +13,9 @@ import java.util.List;
*/
@Data
public class AgencyInfoDTO implements Serializable {
- private String agencyId;
- private String areaCode;
- private List subAgencyIds;
- private List subGridIds;
+ private String currentAgencyId;
+ private String currentAgencyName;
+ private String currentAreaCode;
+ private List subAgencies;
+ private List subGrids;
}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenCustomerAgencyCommonDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenCustomerAgencyCommonDTO.java
new file mode 100644
index 0000000000..3a1078fd69
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenCustomerAgencyCommonDTO.java
@@ -0,0 +1,18 @@
+package com.epmet.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * screen_customer_agency
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2021/7/13 15:31
+ */
+@Data
+public class ScreenCustomerAgencyCommonDTO implements Serializable {
+ private static final long serialVersionUID = -6222325433226628163L;
+ private String agencyId;
+ private String agencyName;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenCustomerGridCommonDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenCustomerGridCommonDTO.java
new file mode 100644
index 0000000000..2578a6c482
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenCustomerGridCommonDTO.java
@@ -0,0 +1,18 @@
+package com.epmet.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * screen_customer_grid
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2021/7/13 15:32
+ */
+@Data
+public class ScreenCustomerGridCommonDTO implements Serializable {
+ private static final long serialVersionUID = -4405092094598416917L;
+ private String gridId;
+ private String gridName;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenCustomerGridDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenCustomerGridDTO.java
new file mode 100644
index 0000000000..10c2a503c3
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenCustomerGridDTO.java
@@ -0,0 +1,119 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+ * 网格(党支部)信息
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-08-26
+ */
+@Data
+public class ScreenCustomerGridDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键ID 主键ID
+ */
+ private String id;
+
+ /**
+ * 客户id
+ */
+ private String customerId;
+
+ /**
+ * 网格id
+ */
+ private String gridId;
+
+ /**
+ * 组织名称
+ */
+ private String gridName;
+
+ /**
+ * 网格所属组织id
+ */
+ private String parentAgencyId;
+
+ /**
+ * 坐标区域
+ */
+ private String areaMarks;
+
+ /**
+ * 中心点位
+ */
+ private String centerMark;
+
+ /**
+ * 党支部(=网格)的位置
+ */
+ private String partyMark;
+
+ /**
+ * 删除标识 0.未删除 1.已删除
+ */
+ private Integer delFlag;
+
+ /**
+ * 乐观锁
+ */
+ private Integer revision;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+ /**
+ * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增)
+ */
+ private String dataEndTime;
+
+ /**
+ * 所有上级ID,用英文逗号分开
+ */
+ private String allParentIds;
+ private String pid;
+ private String pids;
+ private String areaCode;
+}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/AgencyDetailMulticFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/AgencyDetailMulticFormDTO.java
new file mode 100644
index 0000000000..003e925379
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/AgencyDetailMulticFormDTO.java
@@ -0,0 +1,34 @@
+package com.epmet.dto.form;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * 工作端小程序-数据上面的 当前组织调用此接口
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2021/6/24 15:26
+ */
+@Data
+public class AgencyDetailMulticFormDTO implements Serializable {
+ private static final long serialVersionUID = 6603177626712295270L;
+ /**
+ * 内部错误分组
+ * */
+ public interface AddUserInternalGroup{}
+
+ /**
+ * 机关组织Id
+ */
+ @NotBlank(message = "机关组织ID不能为空" , groups = {AddUserInternalGroup.class})
+ private String agencyId;
+
+
+ /**
+ * 当前登录用户所属的客户id
+ */
+ private String customerId;
+
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/project/MassesDiscontentFormV2DTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/project/MassesDiscontentFormV2DTO.java
new file mode 100644
index 0000000000..55df09cdfe
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/form/project/MassesDiscontentFormV2DTO.java
@@ -0,0 +1,57 @@
+package com.epmet.dto.form.project;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+/**
+ * 群众不满列表查询入参DTO,从指标库取值
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2021/6/24 10:55
+ */
+@Data
+public class MassesDiscontentFormV2DTO implements Serializable {
+ public interface MassesDiscontentFormV2 {
+ }
+
+ /**
+ * 时间区间,三个月:threeMonth;半年:sixMonth;一年:twelveMonth
+ * 一个月按照30天,三个月90天,半年180天,一年365天
+ */
+ @NotBlank(message = "timeSection不能为空,取值:三个月:threeMonth;半年:sixMonth;一年:twelveMonth", groups = MassesDiscontentFormV2.class)
+ private String timeSection;
+
+ /**
+ * asc:分数由低到高
+ * desc:分数由高到低
+ */
+ @NotBlank(message = "sortType不能为空,取值:asc:分数由低到高;desc:分数由高到低", groups = MassesDiscontentFormV2.class)
+ private String sortType;
+
+ /**
+ * 组织ID
+ */
+ @NotBlank(message = "agencyId不能为空", groups = MassesDiscontentFormV2.class)
+ private String agencyId;
+
+ @NotNull(message = "pageNo不能为空", groups = MassesDiscontentFormV2.class)
+ private Integer pageNo;
+
+ @NotNull(message = "pageSize不能为空", groups = MassesDiscontentFormV2.class)
+ private Integer pageSize;
+
+ /**
+ * 当前agency对应的区域编码,由前端传入,前端从/data/report/screen/agency/agencydetail这取值
+ */
+ private String areaCode;
+
+
+
+
+ //以下属性无需前端传入
+ private String startDate;
+ private String endDate;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/AgencyDetailMulticResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/AgencyDetailMulticResultDTO.java
new file mode 100644
index 0000000000..7b34abcec9
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/AgencyDetailMulticResultDTO.java
@@ -0,0 +1,104 @@
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 描述一下
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2021/6/24 15:31
+ */
+@Data
+public class AgencyDetailMulticResultDTO implements Serializable {
+ /**
+ * 机关组织Id
+ */
+ private String agencyId = "";
+
+ /**
+ * 组织名称
+ */
+ private String agencyName = "";
+
+ /**
+ * 机关级别(社区级:community,
+ * 乡(镇、街道)级:street,
+ * 区县级: district,
+ * 市级: city
+ * 省级:province) 机关级别(社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province)
+ */
+ private String level = "";
+
+ /**
+ * 地区编码
+ */
+ private String areaCode = "";
+
+ /**
+ * 【省份】名称
+ */
+ private String province = "";
+
+ /**
+ * 【城市】名称
+ */
+ private String city = "";
+
+ /**
+ * 【区县】名称
+ */
+ private String district = "";
+
+ /**
+ * 本机关的所有上级机关
+ */
+ private List parentList;
+
+ /**
+ * 街道
+ */
+ private String street="";
+
+ /**
+ * 社区
+ */
+ private String community="";
+
+ /**
+ * open: 选择地区编码必填;closed: 无需选择地区编码;;0409新增返参
+ */
+ private String areaCodeSwitch;
+
+ /**
+ * 组织区划的名称
+ */
+ private String areaName;
+
+ /**
+ * 当前组织对应客户根组织级别(社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province)
+ */
+ private String rootlevel;
+
+
+ //以下参数是06.24新增
+ private String rootAgencyId;
+ private String parentAreaCode;
+ /**
+ * 是否有字客户
+ */
+ private Boolean haveSubCustomer;
+
+ /**
+ * 子客户列表
+ */
+ private List subCustomerIds;
+
+ // @JsonIgnore
+ /**
+ * 当前agencyId所属的客户id
+ */
+ private String customerId;
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/ParentListResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/ParentListResultDTO.java
new file mode 100644
index 0000000000..60683bf779
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/ParentListResultDTO.java
@@ -0,0 +1,46 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+
+/**
+ * 组织首页-获取组织机构信息接口-本机关的所有上级机关信息
+ *
+ * @author sun
+ */
+@Data
+public class ParentListResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 机关组织Id
+ */
+ private String id = "";
+ /**
+ * 机关组织名称
+ */
+ private String name = "";
+
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/ScreenCustomerAgencyDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/ScreenCustomerAgencyDTO.java
index 5ceeca49a7..a07fa65053 100644
--- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/ScreenCustomerAgencyDTO.java
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/ScreenCustomerAgencyDTO.java
@@ -46,4 +46,14 @@ public class ScreenCustomerAgencyDTO implements Serializable {
* 当前组织的上级行政地区编码add0204;举例平阴县对应的是济南市3701
*/
private String parentAreaCode;
+
+ /**
+ * 父级id ,顶级,此列为0
+ */
+ private String pid;
+
+ /**
+ * 所有上级ID,用逗号(英文)分开
+ */
+ private String pids;
}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/MassesDiscontentResultV2DTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/MassesDiscontentResultV2DTO.java
new file mode 100644
index 0000000000..627edc6daa
--- /dev/null
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/project/MassesDiscontentResultV2DTO.java
@@ -0,0 +1,69 @@
+package com.epmet.dto.result.project;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 群众不满列表查询返参DTO,从指标库取值
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2021/6/24 11:02
+ */
+@Data
+public class MassesDiscontentResultV2DTO implements Serializable {
+ private static final long serialVersionUID = 403953150174574960L;
+ /**
+ * 项目ID
+ */
+ private String projectId;
+
+ /**
+ * 议题ID
+ */
+ private String issueId;
+
+ /**
+ * 话题所在网格
+ */
+ private String gridName;
+
+ /**
+ * 话题图片
+ */
+ private List photos;
+
+ /**
+ * 话题内容
+ */
+ private String topicContent;
+
+ /**
+ * 项目分类标签
+ */
+ private String projectCategory;
+
+ /**
+ * 项目评价分数
+ * 直接取整数位展示
+ */
+ private BigDecimal score;
+
+ @JsonIgnore
+ private String customerId;
+ @JsonIgnore
+ private String parentAgencyId;
+ @JsonIgnore
+ private String areaCode;
+
+ public MassesDiscontentResultV2DTO() {
+ this.gridName = "";
+ this.photos = new ArrayList<>();
+ this.topicContent = "";
+ this.projectCategory = "";
+ }
+}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/index/form/IndexExplainFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/index/form/IndexExplainFormDTO.java
index b97139c8ff..245d3f7d04 100644
--- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/index/form/IndexExplainFormDTO.java
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/index/form/IndexExplainFormDTO.java
@@ -19,6 +19,7 @@ package com.epmet.evaluationindex.index.form;
import lombok.Data;
+import javax.validation.constraints.NotBlank;
import java.io.Serializable;
@@ -37,20 +38,24 @@ public class IndexExplainFormDTO implements Serializable {
/**
* 客户id
*/
+ @NotBlank(message = "客户ID不能为空")
private String customerId;
/**
* 组织级别(网格级:grid;社区级:community;乡(镇、街道)级:street;区县级: district;市级: city;省级:province)
*/
+ @NotBlank(message = "组织级别不能为空")
private String orgLevel;
/**
* 组织id
*/
+ @NotBlank(message = "组织ID不能为空")
private String orgId;
/**
* 月份Id
*/
+ @NotBlank(message = "月份不能为空")
private String monthId;
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/index/result/IndexExplainResult.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/index/result/IndexExplainResult.java
index 1ade73b168..1d5f837199 100644
--- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/index/result/IndexExplainResult.java
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/index/result/IndexExplainResult.java
@@ -1,5 +1,6 @@
package com.epmet.evaluationindex.index.result;
+import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.util.ArrayList;
@@ -49,5 +50,8 @@ public class IndexExplainResult {
*/
private String tableDesc;
+ @JsonIgnore
+ private String indexCode;
+
}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/index/result/IndexScoreResult.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/index/result/IndexScoreResult.java
index d6ca46a913..1186e7ff70 100644
--- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/index/result/IndexScoreResult.java
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/index/result/IndexScoreResult.java
@@ -23,6 +23,15 @@ public class IndexScoreResult implements Serializable {
*/
private BigDecimal score;
+ /**
+ * 本级分数
+ */
+ private BigDecimal selfScore;
+ /**
+ * 下级分数
+ */
+ private BigDecimal subScore;
+
/**
* 指标对应的权重
*/
@@ -43,4 +52,9 @@ public class IndexScoreResult implements Serializable {
*/
private String valueType;
+ /**
+ * 是否是总分
+ */
+ private Boolean isTotal;
+
}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AgencyFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AgencyFormDTO.java
index 166c9c2aa9..fcba02911c 100644
--- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AgencyFormDTO.java
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AgencyFormDTO.java
@@ -21,4 +21,9 @@ public class AgencyFormDTO implements Serializable {
@NotBlank(message = "机关Id不能为空" , groups = CommonAgencyIdGroup.class)
private String agencyId;
+
+ /**
+ * 平阴县默认穿370124,跟随8个街道点击事件,传入街道的areaCode
+ * */
+ private String areaCode;
}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/FineExampleFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/FineExampleFormDTO.java
index 542c2e5b48..b5aeaf83ee 100644
--- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/FineExampleFormDTO.java
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/FineExampleFormDTO.java
@@ -3,7 +3,6 @@ package com.epmet.evaluationindex.screen.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
@@ -22,4 +21,16 @@ public class FineExampleFormDTO implements Serializable {
*/
@NotBlank(message = "机关ID不能为空",groups = {FineExample.class})
private String agencyId;
+
+ /**
+ * 目前只有平阴在传,默认赋值:370124,跟随8个街道变化
+ */
+ private String areaCode;
+
+ /**
+ * 当前token中的客户id
+ */
+ @NotBlank(message = "token中的customerId不能为空",groups = {FineExample.class})
+ private String customerId;
+
}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/RootAgencyFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/RootAgencyFormDTO.java
index 42a67c936f..ce778cf651 100644
--- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/RootAgencyFormDTO.java
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/RootAgencyFormDTO.java
@@ -21,4 +21,9 @@ public class RootAgencyFormDTO implements Serializable {
@NotBlank(message = "组织ID不能为空",groups = {RootAgencyFormDTO.AddUserInternalGroup.class})
private String agencyId;
+ /**
+ * token中客户Id
+ */
+ private String customerId;
+
}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthBarchartResult.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthBarchartResult.java
index 051af134ba..5a010ea45b 100644
--- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthBarchartResult.java
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthBarchartResult.java
@@ -39,4 +39,19 @@ public class MonthBarchartResult implements Serializable {
* 治理能力分数,权重
*/
private BigDecimal governAblityWeight;
+
+ /**
+ * 党建能力 原始得分
+ */
+ private BigDecimal partyOriginScore = new BigDecimal(0.0);
+
+ /**
+ * 治理能力 原始得分
+ */
+ private BigDecimal governOriginScore = new BigDecimal(0.0);
+
+ /**
+ * 服务能力 原始得分
+ */
+ private BigDecimal serviceOriginScore = new BigDecimal(0.0);
}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthBarchartResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthBarchartResultDTO.java
index 8a8da975f1..c86efe0c28 100644
--- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthBarchartResultDTO.java
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthBarchartResultDTO.java
@@ -55,4 +55,19 @@ public class MonthBarchartResultDTO implements Serializable {
* 治理能力分数,权重
*/
private List governAblityWeightData;
+
+ /**
+ * 党建能力 原始得分
+ */
+ private List partyOriginScore;
+
+ /**
+ * 治理能力 原始得分
+ */
+ private List governOriginScore;
+
+ /**
+ * 服务能力 原始得分
+ */
+ private List serviceOriginScore;
}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthPieChartResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthPieChartResultDTO.java
index de0b16022b..b9abf888d1 100644
--- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthPieChartResultDTO.java
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthPieChartResultDTO.java
@@ -3,6 +3,7 @@ package com.epmet.evaluationindex.screen.dto.result;
import lombok.Data;
import java.io.Serializable;
+import java.math.BigDecimal;
/**
* @Author zxc
@@ -28,6 +29,34 @@ public class MonthPieChartResultDTO implements Serializable {
*/
private Double governAbility = 0.0;
+ /**
+ * 党建能力 原始得分
+ */
+ private BigDecimal partyOriginScore = new BigDecimal(0.0);
+
+ /**
+ * 治理能力 原始得分
+ */
+ private BigDecimal governOriginScore = new BigDecimal(0.0);
+
+ /**
+ * 服务能力 原始得分
+ */
+ private BigDecimal serviceOriginScore = new BigDecimal(0.0);
+
+ /**
+ * 服务能力权重(保留一位小数)
+ */
+ private Double serviceAblityWeight=0.0;
+ /**
+ * 党建能力权重(保留一位小数)
+ */
+ private Double partyDevWeight=0.0;
+ /**
+ * 治理能力权重(保留一位小数)
+ */
+ private Double governAblityWeight=0.0;
+
/**
* 月份Id
*/
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ScreenProjectDetailResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ScreenProjectDetailResultDTO.java
index 1c7391dd93..ece032ba4d 100644
--- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ScreenProjectDetailResultDTO.java
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ScreenProjectDetailResultDTO.java
@@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import java.io.Serializable;
+import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Set;
@@ -24,6 +25,11 @@ public class ScreenProjectDetailResultDTO implements Serializable {
* 项目id
*/
private String projectId;
+ /**
+ * 项目标题,06.25新增,工作端小程序难点赌点+群众不满详情用
+ */
+ private String projectTitle;
+
/**
* 议题内容,其实就是项目内容
*/
@@ -66,6 +72,11 @@ public class ScreenProjectDetailResultDTO implements Serializable {
*/
private List processList;
+ /**
+ * 满意度得分 06.25新增,这个返参目前大屏和工作端小程序都没有用到,工作端小程序详情的得分是取得列表返回去的值
+ */
+ private BigDecimal score;
+
@Data
public static class processDTO{
private String processId;
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserJoinIndicatorGrowthRateResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserJoinIndicatorGrowthRateResultDTO.java
index 94e4f20546..3e02aa4e96 100644
--- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserJoinIndicatorGrowthRateResultDTO.java
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserJoinIndicatorGrowthRateResultDTO.java
@@ -8,7 +8,7 @@ import java.math.BigDecimal;
/**
* @Description 用户参与各项指标以及增长查询结果dto
* @ClassName UserJoinIndicatorGrowthRateResultDTO
- * @Auth wangc
+ * @author wangc
* @Date 2020-08-21 16:07
*/
@Data
@@ -16,25 +16,33 @@ public class UserJoinIndicatorGrowthRateResultDTO implements Serializable {
private static final long serialVersionUID = -8830240350298414599L;
private String id;
-
+ /**
+ * 总参与数
+ * */
private Integer total;
+ /**
+ * 总参与数:月增长
+ * */
private BigDecimal monthIncr;
/**
- * incr上升, decr下降
+ * 总参与数:incr上升, decr下降
* */
private String monthTrend;
+ /**
+ * 人均议题
+ * */
private BigDecimal averageIssue;
/**
- * 较上月百分比
+ * 人均议题:较上月百分比
* */
private BigDecimal issueCompareLatestMonth;
/**
- * 较上月趋势:incr上升,decr下降
+ * 人均议题:较上月趋势:incr上升,decr下降
* */
private String issueCompareLatestTrend;
@@ -43,7 +51,13 @@ public class UserJoinIndicatorGrowthRateResultDTO implements Serializable {
*/
private BigDecimal averageJoin;
+ /**
+ * 平均参与度: 较上月百分比
+ */
private BigDecimal joinCompareLatestMonth;
+ /**
+ * 平均参与度:较上月趋势:incr上升,decr下降
+ */
private String joinCompareLatestTrend;
}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordSubRank.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordSubRank.java
index 91f3d027e9..84776cf8b1 100644
--- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordSubRank.java
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordSubRank.java
@@ -31,4 +31,6 @@ public class WorkRecordSubRank implements Serializable {
* 组织次数
*/
private Integer participateTotal;
+
+ private String isDefault;
}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/constant/ProjectConstant.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/constant/ProjectConstant.java
index 7b07db5c72..ac850effbe 100644
--- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/constant/ProjectConstant.java
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/constant/ProjectConstant.java
@@ -22,4 +22,11 @@ public interface ProjectConstant {
String PROCESS_FAILURE = "查询项目进展失败......";
+ /**
+ * 三个月,六个月,12个月
+ */
+ String THREE_MONTH = "threeMonth";
+ String SIX_MONTH = "sixMonth";
+ String TWELVE_MONTH = "twelveMonth";
+ String YESTERDAY = "yesterday";
}
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/form/DifficultyRankFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/form/DifficultyRankFormDTO.java
index 5a3936db6a..8f62ab848e 100644
--- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/form/DifficultyRankFormDTO.java
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/form/DifficultyRankFormDTO.java
@@ -40,4 +40,15 @@ public class DifficultyRankFormDTO implements Serializable {
* 组织类型: 网格:grid ; 组织:agency
*/
private String orgType;
+
+ /**
+ * 当前agency对应的区域编码,由前端传入,前端从/data/report/screen/agency/agencydetail这取值
+ */
+ private String areaCode;
+
+ //以下属性无需前端赋值
+ /**
+ * 当前登录用户所属客户id
+ */
+ private String customerId;
}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectDifficultRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectDifficultRankResultDTO.java
index f781d62d15..f3d1967599 100644
--- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectDifficultRankResultDTO.java
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectDifficultRankResultDTO.java
@@ -3,7 +3,6 @@ package com.epmet.project.dto.result;
import lombok.Data;
import java.io.Serializable;
-import java.util.ArrayList;
import java.util.List;
/**
@@ -25,11 +24,17 @@ public class ProjectDifficultRankResultDTO implements Serializable {
* 项目标题
* */
private String title;
-
+ // 3个街道和产品这边状态码不一样..
/**
* 状态: 待处理: pending; 结案closed
* */
private String statusCode;
+ // pending 处理中
+ // closed 已结案
+ // 10 已结案
+ // 5 已关闭
+ // 0 处理中
+ private String statusDesc;
/**
* 社区-网格名
diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectNextAgencyResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectNextAgencyResultDTO.java
index 2c867a6398..9aaf0b6050 100644
--- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectNextAgencyResultDTO.java
+++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectNextAgencyResultDTO.java
@@ -1,9 +1,9 @@
package com.epmet.project.dto.result;
+import com.epmet.commons.tools.constant.StrConstant;
import lombok.Data;
import java.io.Serializable;
-import java.util.List;
/**
* @Description 难点赌点-当前登录人员本级一级下一级组织机构/网格 返参DTO
@@ -30,5 +30,15 @@ public class ProjectNextAgencyResultDTO implements Serializable {
* */
private String orgType;
+ /**
+ * orgId对应的areaCode。 只有当前客户有子客户时,才会返回指,否则返回null或者空字符串
+ * */
+ private String areaCode;
+ public ProjectNextAgencyResultDTO(){
+ this.orgId= StrConstant.EPMETY_STR;
+ this.orgName= StrConstant.EPMETY_STR;
+ this.orgType= StrConstant.EPMETY_STR;
+ this.areaCode= StrConstant.EPMETY_STR;
+ }
}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/constant/IndexConstant.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/constant/IndexConstant.java
index dd34c3c42d..3f174a32b2 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/constant/IndexConstant.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/constant/IndexConstant.java
@@ -24,17 +24,25 @@ public class IndexConstant {
public static final String ZB_CN = "指标";
public static final String BEN_JI_CN = "本级";
public static final String XIA_JI_CN = "下级";
+ public static final String BEN_JI_EN = "self";
+ public static final String XIA_JI_EN = "sub";
public static final String ZI_SHEN = "zishen";
public static final String XIA_JI = "xiaji";
public static final String THRESHOLD_TEXT = "给定阈值%d%%,超过阈值不加分";
public static final String TABLE_DESC = "详见下表:";
public static final String INDEX_SCORE_TITLE = "当月指数";
- public static final String INDEX_SCORE_DESC = "自然月周期内,当月指数得分=党建指数得分*相关权重+治理指数得分*相关权重+服务指数得分*相关权重";
+ public static final String INDEX_SCORE_DESC = "自然月周期内,当月指数得分#(totalScore)#=党建指数得分#(dangjiannengli)#*相关权重#(dangjiannengliweight)#" +
+ "+治理指数得分#(zhilinengli)#*相关权重#(zhilinengliweight)#+服务指数得分#(fuwunengli)#*相关权重#(fuwunengliweight)#";
public static final String INDEX_DISTRINCT_TABLE1_INDEX_CODE = "suoyoujiedaozlnlpjz";
+ public static final String INDEX_DISTRINCT_TABLE2_INDEX_CODE = "suoyouzhishubmzlnlpjz";
public static final String ZHI_LI_NENG_LI = "zhilinengli";
+ public static final String PATTERN_FIX = "#";
public static final String PATTERN_D = "d";
+ public static final String PATTERN_WEIGHT = "weight";
+ public static final String PATTERN_TOTAL = "totalScore";
public static final String QUAN_QU_ZHI_LI_INDEX_CODE = "quanquxiangguan:zhilinengli";
+ public static final String PATTERN_ALL = "[#][^#]+[#]";
/**
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/fact/FactIndexController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/fact/FactIndexController.java
index 3a2f5cfebb..29d8cb939b 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/fact/FactIndexController.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/fact/FactIndexController.java
@@ -1,5 +1,7 @@
package com.epmet.datareport.controller.fact;
+import com.epmet.commons.tools.annotation.LoginUser;
+import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.datareport.service.fact.FactIndexService;
@@ -98,8 +100,9 @@ public class FactIndexController {
* @author sun
*/
@PostMapping("index/rootagency")
- public Result rootAgency(@RequestBody RootAgencyFormDTO formDTO) {
+ public Result rootAgency(@LoginUser TokenDto tokenDto, @RequestBody RootAgencyFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, RootAgencyFormDTO.AddUserInternalGroup.class);
+ formDTO.setCustomerId(tokenDto.getCustomerId());
return new Result().ok(factIndexService.rootAgency(formDTO));
}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/index/IndexExplainController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/index/IndexExplainController.java
index abac68a416..e248a6ac35 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/index/IndexExplainController.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/index/IndexExplainController.java
@@ -17,12 +17,15 @@
package com.epmet.datareport.controller.index;
+import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.datareport.service.evaluationindex.index.IndexExplainService;
import com.epmet.evaluationindex.index.form.IndexExplainFormDTO;
import com.epmet.evaluationindex.index.form.IndexScoreFormDTO;
import com.epmet.evaluationindex.index.result.IndexExplainResult;
import com.epmet.evaluationindex.screen.dto.result.IndexDictResultDTO;
+import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -56,6 +59,8 @@ public class IndexExplainController {
*/
@PostMapping("detail")
public Result> getScoreDetail(@RequestBody IndexExplainFormDTO formDTO){
+ formDTO.setMonthId(StringUtils.isBlank(formDTO.getMonthId()) ? DateUtils.getCurrentTimeBeforeMonthId() : formDTO.getMonthId());
+ ValidatorUtils.validateEntity(formDTO);
Result> ok = new Result>().ok(indexExplainService.getScoreDetail(formDTO));
return ok;
}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java
index 2f704b6b16..6f485e507e 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java
@@ -11,6 +11,8 @@ import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectQuantity
import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectQuantityOrgMonthlyService;
import com.epmet.datareport.service.project.ProjectService;
import com.epmet.dto.form.ProcessListFormDTO;
+import com.epmet.dto.form.project.MassesDiscontentFormV2DTO;
+import com.epmet.dto.result.project.MassesDiscontentResultV2DTO;
import com.epmet.project.constant.ProjectConstant;
import com.epmet.project.dto.form.DifficultyRankFormDTO;
import com.epmet.project.dto.form.ProjectIncrTrendFormDTO;
@@ -114,6 +116,21 @@ public class ProjectController {
return new Result>().ok(projectService.getDifficultyRank(param));
}
+ /**
+ * @return com.epmet.commons.tools.utils.Result>
+ * @param formDTO
+ * @author yinzuomei
+ * @description 难点赌点-耗时最长|涉及部门最多|处理次数 返回该组织下所有的难点堵点的 数据
+ * 2021.06.21新增次API,多客户版本,eg:平阴县的工作人员可以看到8个街道的难点赌点
+ * @Date 2021/6/23 13:09
+ **/
+ @PostMapping("difficultyrank-multic")
+ public Result> difficultyRankMultic(@RequestHeader("CustomerId") String customerId,@RequestBody DifficultyRankFormDTO formDTO){
+ formDTO.setCustomerId(customerId);
+ ValidatorUtils.validateEntity(formDTO, DifficultyRankFormDTO.DifficultyRankInternalGroup.class);
+ return new Result>().ok(projectService.difficultyRankMultic(formDTO));
+ }
+
/**
* @Description 难点赌点-耗时最长|涉及部门最多|处理次数
* @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321614
@@ -127,6 +144,20 @@ public class ProjectController {
return new Result>().ok(projectService.getMyNextAgency(tokenDto));
}
+ /**
+ * @return com.epmet.commons.tools.utils.Result>
+ * @param tokenDto
+ * @author yinzuomei
+ * @description 001、难点堵点-组织下拉框
+ * 需求描述:下拉框显示当前用户所属组织和下级组织 ;1)如果当前用户是街道工作人员, 显示所属街道和该街道下的社区+直属网格;2)如果当前用户是社区人员, 显示所属社区和该社区下的网格+直属网格。
+ * 210622: 新增此API, 后端改为从指标库取值 , 保证平阴县的工作人员,看到的下拉框是平阴县、以及8个街道
+ * @Date 2021/6/22 14:20
+ **/
+ @PostMapping("mynextagency-multic")
+ public Result> myNextAgencyMultic(@LoginUser TokenDto tokenDto){
+ return new Result>().ok(projectService.myNextAgencyMultic(tokenDto.getUserId(),tokenDto.getCustomerId()));
+ }
+
/**
* 002、项目分类字典查询
* 查询当前客户的父客户下,项目分类字典
@@ -140,4 +171,18 @@ public class ProjectController {
public Result> categoryDict(@RequestHeader("CustomerId") String customerId) {
return new Result>().ok(projectService.getCategoryDict(customerId));
}
+
+ /**
+ * @return com.epmet.commons.tools.utils.Result>
+ * @param formDTO
+ * @author yinzuomei
+ * @description 群众不满列表,改为从指标库的screen_project_data取值
+ * sql里面写死<75分的展示
+ * @Date 2021/6/24 11:13
+ **/
+ @PostMapping("massesdiscontent-multic")
+ public Result> queryMassesDiscontentMultic(@RequestBody MassesDiscontentFormV2DTO formDTO){
+ ValidatorUtils.validateEntity(formDTO, MassesDiscontentFormV2DTO.MassesDiscontentFormV2.class);
+ return new Result>().ok(projectService.queryMassesDiscontentMultic(formDTO));
+ }
}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java
index 1eba0b727c..6c71a15009 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java
@@ -1,10 +1,14 @@
package com.epmet.datareport.controller.screen;
+import com.epmet.commons.tools.annotation.LoginUser;
+import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.datareport.service.evaluationindex.screen.AgencyService;
import com.epmet.dto.form.AddAreaCodeDictFormDTO;
+import com.epmet.dto.form.AgencyDetailMulticFormDTO;
import com.epmet.dto.form.AreaCodeDictFormDTO;
+import com.epmet.dto.result.AgencyDetailMulticResultDTO;
import com.epmet.dto.result.AreaCodeDictResultDTO;
import com.epmet.dto.result.commonservice.AddAreaCodeDictResultDTO;
import com.epmet.dto.result.plugins.AgencyNodeDTO;
@@ -110,4 +114,19 @@ public class AgencyController {
}
return new Result<>();
}
+
+
+ /**
+ * @return com.epmet.commons.tools.utils.Result
+ * @param
+ * @author yinzuomei
+ * @description 工作端小程序-数据上面的 当前组织调用此接口
+ * @Date 2021/6/24 15:29
+ **/
+ @PostMapping("agencydetail-multic")
+ public Result queryAgencyDetailMultiC(@LoginUser TokenDto tokenDto, @RequestBody AgencyDetailMulticFormDTO formDTO){
+ formDTO.setCustomerId(tokenDto.getCustomerId());
+ ValidatorUtils.validateEntity(formDTO, AgencyDetailMulticFormDTO.AddUserInternalGroup.class);
+ return new Result().ok(agencyService.queryAgencyDetailMultiC(formDTO));
+ }
}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/PartyMemberLeadController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/PartyMemberLeadController.java
index bbd0039e71..f5615c15bd 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/PartyMemberLeadController.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/PartyMemberLeadController.java
@@ -30,7 +30,8 @@ public class PartyMemberLeadController {
* @date 2020/8/20 1:56 下午
*/
@PostMapping("fineexample")
- public Result fineExample(@RequestBody FineExampleFormDTO fineExampleFormDTO){
+ public Result fineExample(@RequestHeader("CustomerId") String customerId,@RequestBody FineExampleFormDTO fineExampleFormDTO){
+ fineExampleFormDTO.setCustomerId(customerId);
ValidatorUtils.validateEntity(fineExampleFormDTO, FineExampleFormDTO.FineExample.class);
return new Result().ok(partyMemberLeadService.fineExample(fineExampleFormDTO));
}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java
index 986a880aac..04c509de8b 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java
@@ -17,6 +17,9 @@
package com.epmet.datareport.dao.evaluationindex.screen;
+import com.epmet.dto.ScreenCustomerAgencyCommonDTO;
+import com.epmet.dto.ScreenCustomerGridDTO;
+import com.epmet.dto.result.ParentListResultDTO;
import com.epmet.dto.result.ScreenCustomerAgencyDTO;
import com.epmet.dto.result.plugins.AgencyNodeDTO;
import com.epmet.dto.result.plugins.DeptNodeDTO;
@@ -98,7 +101,7 @@ public interface ScreenCustomerAgencyDao {
* @Description 根据组织ID判断是否根组织
* @author sun
*/
- int selectRootAgency(@Param("agencyId") String agencyId);
+ int selectRootAgency(@Param("agencyId") String agencyId, @Param("customerId") String customerId);
/**
* desc: 根据orgId获取组织信息
@@ -161,7 +164,7 @@ public interface ScreenCustomerAgencyDao {
**/
List getNextAgencyIds(@Param("areaCode")String areaCode,@Param("agencyId")String agencyId);
- List selectSubAgencyIds(@Param("areaCode")String areaCode,@Param("agencyId")String agencyId);
+ List selectSubAgencyIds(@Param("areaCode")String areaCode, @Param("agencyId")String agencyId);
/**
* @Description 根据agencyId查询网格
@@ -170,4 +173,35 @@ public interface ScreenCustomerAgencyDao {
* @date 2021/6/8 1:27 下午
*/
List selectGrid(@Param("agencyId")String agencyId,@Param("areaCode")String areaCode);
+
+ /**
+ * 查询当前组织的下一级组织,可根据areaCode查询,也可根据pid查询
+ *
+ * @param areaCode
+ * @param pid
+ * @return java.util.List
+ */
+ List selectNextAgencyList(@Param("areaCode") String areaCode, @Param("pid") String pid, @Param("allCustomerIds") List allCustomerIds);
+
+ /**
+ * 查询当前组织的下面的网格,可根据areaCode查询,也可根据parentAgencyId查询
+ *
+ * @param areaCode
+ * @param parentAgencyId
+ * @return java.util.List
+ */
+ List selectGridDTOList(@Param("areaCode") String areaCode, @Param("parentAgencyId") String parentAgencyId,@Param("allCustomerIds") List allCustomerIds);
+
+ List selectPAgencyById(@Param("listStr")List pidList);
+
+ /**
+ * @return com.epmet.dto.result.ScreenCustomerAgencyDTO
+ * @param customerId
+ * @author yinzuomei
+ * @description 根据客户id,返回当前客户下的跟组织信息
+ * @Date 2021/6/24 17:43
+ **/
+ ScreenCustomerAgencyDTO selectCustomerRootAgency(String customerId);
+
+ ScreenCustomerAgencyDTO selectByAreaCode(String areaCode);
}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java
index e0484794e6..abf21dd119 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java
@@ -17,6 +17,7 @@
package com.epmet.datareport.dao.evaluationindex.screen;
+import com.epmet.dto.ScreenCustomerGridCommonDTO;
import com.epmet.evaluationindex.screen.dto.result.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -81,5 +82,5 @@ public interface ScreenCustomerGridDao {
*/
List selectGridInfo(@Param("agencyId")String agencyId);
- List selectSubGridIds(@Param("areaCode")String areaCode, @Param("agencyId")String agencyId);
+ List selectSubGridIds(@Param("areaCode")String areaCode, @Param("agencyId")String agencyId);
}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java
index 976c3c85b4..18a3795b05 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java
@@ -127,4 +127,6 @@ public interface ScreenIndexDataMonthlyDao{
@Param("yearId") String yearId,
@Param("areaCode") String areaCode,
@Param("topNum") int topNum);
+
+ List selectKczSubAgencyOrGridIndexMonthlyRank(SubAgencyIndexRankYMFormDTO formDTO);
}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java
index 6735487317..2fb33f60d5 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java
@@ -51,4 +51,7 @@ public interface ScreenIndexDataYearlyDao{
* @Date 09:38 2020-09-08
**/
List selectAnNingSubAgencyIndexYearlyRank(SubAgencyIndexRankYMFormDTO formDTO);
+
+
+ List selectKczSubAgencyIndexYearlyRank(SubAgencyIndexRankYMFormDTO formDTO);
}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPioneerDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPioneerDataDao.java
index 5bc3077e85..0983d7c047 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPioneerDataDao.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPioneerDataDao.java
@@ -21,8 +21,6 @@ import com.epmet.evaluationindex.screen.dto.result.FineExampleResultDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
-import java.util.List;
-
/**
* 党建引领-先锋模范数据
*
@@ -43,12 +41,11 @@ public interface ScreenPioneerDataDao{
/**
* @Description 根据地区码查询先锋模范
* @param areaCode
- * @param customerId
- * @param customerIds - 子级客户列表
+ * @param dataEndTime 默认是昨天yyyyMMdd
* @return com.epmet.evaluationindex.screen.dto.result.FineExampleResultDTO
* @author wangc
* @date 2021.02.24 15:39
*/
- FineExampleResultDTO selectFineExampleByAreaCode(@Param("areaCode")String areaCode,@Param("customerId")String customerId,@Param("list") List customerIds);
+ FineExampleResultDTO selectFineExampleByAreaCode(@Param("areaCode") String areaCode, @Param("dataEndTime") String dataEndTime);
}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexAgencyScoreDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexAgencyScoreDao.java
index 57a9829f1d..147d12ef3f 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexAgencyScoreDao.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexAgencyScoreDao.java
@@ -17,6 +17,7 @@
package com.epmet.datareport.dao.fact;
+import com.epmet.evaluationindex.index.result.IndexScoreResult;
import com.epmet.evaluationindex.screen.dto.form.AblityIndexFormDTO;
import com.epmet.evaluationindex.screen.dto.form.MonthScoreListFormDTO;
import com.epmet.evaluationindex.screen.dto.form.ScoreListFormDTO;
@@ -24,6 +25,7 @@ import com.epmet.evaluationindex.screen.dto.result.AblityIndexResultDTO;
import com.epmet.evaluationindex.screen.dto.result.MonthScoreListResultDTO;
import com.epmet.evaluationindex.screen.dto.result.ScoreListResultDTO;
import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
import java.util.LinkedList;
import java.util.List;
@@ -57,4 +59,6 @@ public interface FactIndexAgencyScoreDao {
* @author sun
*/
LinkedList selectAgencyMonthWeightScoreList(MonthScoreListFormDTO formDTO);
+
+ List selectAgencyScoreList(@Param("customerId") String customerId, @Param("orgId") String orgId, @Param("monthId") String monthId);
}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexCommunityScoreDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexCommunityScoreDao.java
index d0bfc62ac5..f5784b5a56 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexCommunityScoreDao.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexCommunityScoreDao.java
@@ -17,6 +17,7 @@
package com.epmet.datareport.dao.fact;
+import com.epmet.evaluationindex.index.result.IndexScoreResult;
import com.epmet.evaluationindex.screen.dto.form.AblityIndexFormDTO;
import com.epmet.evaluationindex.screen.dto.form.MonthScoreListFormDTO;
import com.epmet.evaluationindex.screen.dto.form.ScoreListFormDTO;
@@ -24,6 +25,7 @@ import com.epmet.evaluationindex.screen.dto.result.AblityIndexResultDTO;
import com.epmet.evaluationindex.screen.dto.result.MonthScoreListResultDTO;
import com.epmet.evaluationindex.screen.dto.result.ScoreListResultDTO;
import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
import java.util.LinkedList;
import java.util.List;
@@ -57,4 +59,6 @@ public interface FactIndexCommunityScoreDao {
* @author sun
*/
LinkedList selectCommunityMonthWeightScoreList(MonthScoreListFormDTO formDTO);
+
+ List selectComunityScoreList(@Param("customerId") String customerId, @Param("orgId") String orgId, @Param("monthId") String monthId);
}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexGridScoreDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexGridScoreDao.java
index c94fdb23a3..c98582ec77 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexGridScoreDao.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexGridScoreDao.java
@@ -17,6 +17,7 @@
package com.epmet.datareport.dao.fact;
+import com.epmet.evaluationindex.index.result.IndexScoreResult;
import com.epmet.evaluationindex.screen.dto.form.AblityIndexFormDTO;
import com.epmet.evaluationindex.screen.dto.form.MonthScoreListFormDTO;
import com.epmet.evaluationindex.screen.dto.form.ScoreListFormDTO;
@@ -24,6 +25,7 @@ import com.epmet.evaluationindex.screen.dto.result.AblityIndexResultDTO;
import com.epmet.evaluationindex.screen.dto.result.MonthScoreListResultDTO;
import com.epmet.evaluationindex.screen.dto.result.ScoreListResultDTO;
import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
import java.util.LinkedList;
import java.util.List;
@@ -57,4 +59,7 @@ public interface FactIndexGridScoreDao {
* @author sun
*/
LinkedList selectGridMonthWeightScoreList(MonthScoreListFormDTO formDTO);
+
+ List selectGridScoreList(@Param("customerId") String customerId, @Param("orgId") String orgId, @Param("monthId") String monthId);
+
}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java
index d27a4eee75..3f323c0dd5 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java
@@ -55,16 +55,16 @@ public interface ScreenWorkRecordOrgDailyDao extends BaseDao