diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactPartyMemberVanguardAgencyDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactPartyMemberVanguardAgencyDailyDTO.java
new file mode 100644
index 0000000000..434775abd2
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactPartyMemberVanguardAgencyDailyDTO.java
@@ -0,0 +1,179 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dto.stats;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * 党员先锋-机关日统计数据
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-05-13
+ */
+@Data
+public class FactPartyMemberVanguardAgencyDailyDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 唯一标识
+ */
+ private String id;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 机构ID
+ */
+ private String agencyId;
+
+ /**
+ * 父级机关ID
+ */
+ private String pid;
+
+ /**
+ * 统计日期 关联日期dim表
+ */
+ private String dateId;
+
+ /**
+ * 周ID
+ */
+ private String weekId;
+
+ /**
+ * 月ID
+ */
+ private String monthId;
+
+ /**
+ * 季ID
+ */
+ private String quarterId;
+
+ /**
+ * 年ID
+ */
+ private String yearId;
+
+ /**
+ * 党员建组数
+ */
+ private Integer groupCount;
+
+ /**
+ * 党员建组数占比
+ */
+ private BigDecimal groupRatio;
+
+ /**
+ * 组内党员人数
+ */
+ private Integer groupMemberCount;
+
+ /**
+ * 组内党员人数占比
+ */
+ private BigDecimal groupMemberRatio;
+
+ /**
+ * 党员发布话题数
+ */
+ private Integer topicCount;
+
+ /**
+ * 党员发布话题数占比
+ */
+ private BigDecimal topicRatio;
+
+ /**
+ * 党员发布话题转议题数
+ */
+ private Integer issueCount;
+
+ /**
+ * 党员发布话题转议题数占比
+ */
+ private BigDecimal issueRatio;
+
+ /**
+ * 党员发布话题转项目数
+ */
+ private Integer projectCount;
+
+ /**
+ * 党员发布话题转项目数占比
+ */
+ private BigDecimal projectRatio;
+
+ /**
+ * 党员发布话题转项目结案数
+ */
+ private Integer projectClosedCount;
+
+ /**
+ * 党员发布话题转项目结案数占比
+ */
+ private BigDecimal projectClosedRatio;
+
+ private Integer groupTotal;
+ private Integer groupMemberTotal;
+ private Integer topicTotal;
+ private Integer issueTotal;
+ private Integer projectTotal;
+ private Integer projectClosedTotal;
+
+ /**
+ * 删除标识 未删除:0,已删除:1
+ */
+ private String delFlag;
+
+ /**
+ * 乐观锁
+ */
+ private Integer revision;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactPartyMemberVanguardGridDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactPartyMemberVanguardGridDailyDTO.java
new file mode 100644
index 0000000000..7d28a3e095
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/FactPartyMemberVanguardGridDailyDTO.java
@@ -0,0 +1,179 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dto.stats;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * 党员先锋-网格日统计数据
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-05-13
+ */
+@Data
+public class FactPartyMemberVanguardGridDailyDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 唯一标识
+ */
+ private String id;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 机构ID
+ */
+ private String agencyId;
+
+ /**
+ * 网格ID
+ */
+ private String gridId;
+
+ /**
+ * 统计日期 关联日期dim表
+ */
+ private String dateId;
+
+ /**
+ * 周ID
+ */
+ private String weekId;
+
+ /**
+ * 月ID
+ */
+ private String monthId;
+
+ /**
+ * 季ID
+ */
+ private String quarterId;
+
+ /**
+ * 年ID
+ */
+ private String yearId;
+
+ /**
+ * 党员建组数
+ */
+ private Integer groupCount;
+
+ /**
+ * 党员建组数占比
+ */
+ private BigDecimal groupRatio;
+
+ /**
+ * 组内党员人数
+ */
+ private Integer groupMemberCount;
+
+ /**
+ * 组内党员人数占比
+ */
+ private BigDecimal groupMemberRatio;
+
+ /**
+ * 党员发布话题数
+ */
+ private Integer topicCount;
+
+ /**
+ * 党员发布话题数占比
+ */
+ private BigDecimal topicRatio;
+
+ /**
+ * 党员发布话题转议题数
+ */
+ private Integer issueCount;
+
+ /**
+ * 党员发布话题转议题数占比
+ */
+ private BigDecimal issueRatio;
+
+ /**
+ * 党员发布话题转项目数
+ */
+ private Integer projectCount;
+
+ /**
+ * 党员发布话题转项目数占比
+ */
+ private BigDecimal projectRatio;
+
+ /**
+ * 党员发布话题转项目结案数
+ */
+ private Integer projectClosedCount;
+
+ /**
+ * 党员发布话题转项目结案数占比
+ */
+ private BigDecimal projectClosedRatio;
+
+ private Integer groupTotal;
+ private Integer groupMemberTotal;
+ private Integer topicTotal;
+ private Integer issueTotal;
+ private Integer projectTotal;
+ private Integer projectClosedTotal;
+
+ /**
+ * 删除标识 未删除:0,已删除:1
+ */
+ private String delFlag;
+
+ /**
+ * 乐观锁
+ */
+ private Integer revision;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java
index 1037de6af4..018dc35102 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java
@@ -18,6 +18,7 @@ import com.epmet.dao.stats.DimCustomerDao;
import com.epmet.dao.stats.DimDateDao;
import com.epmet.dao.stats.DimMonthDao;
import com.epmet.dto.AgencySubTreeDto;
+import com.epmet.dto.StatsFormDTO;
import com.epmet.dto.extract.form.ExtractOriginFormDTO;
import com.epmet.dto.extract.form.ExtractScreenFormDTO;
import com.epmet.dto.indexcal.CalculateCommonFormDTO;
@@ -34,6 +35,7 @@ import com.epmet.entity.stats.DimCustomerEntity;
import com.epmet.entity.stats.DimDateEntity;
import com.epmet.entity.stats.DimMonthEntity;
import com.epmet.service.StatsDemoService;
+import com.epmet.service.StatsPartyMemberVanguardService;
import com.epmet.service.evaluationindex.extract.dataToIndex.*;
import com.epmet.service.evaluationindex.extract.todata.FactGroupActDailyService;
import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectCategoryDailyService;
@@ -111,6 +113,8 @@ public class DemoController {
@Autowired
private FactOriginProjectCategoryDailyService originProjectCategoryDailyService;
@Autowired
+ private StatsPartyMemberVanguardService statsPartyMemberVanguardService;
+ @Autowired
private FactGroupActDailyService factGroupActDailyService;
@GetMapping("testAlarm")
@@ -873,6 +877,13 @@ public class DemoController {
return new Result().ok(ndddYhjfService.difficultyDataExtract(param));
}
+ @PostMapping("vanguard")
+ public Result partyMemberVanguard(StatsFormDTO formDTO) {
+ statsPartyMemberVanguardService.agencyStats(formDTO);
+ statsPartyMemberVanguardService.gridStats(formDTO);
+ return new Result();
+ }
+
@PostMapping("extractgroupact")
public Result extractGroupAct(@RequestParam("customerId") String customerId,@RequestParam("dateId")String dateId){
factGroupActDailyService.extractGridGroupActDaily(customerId,dateId);
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java
index 7ffdf0c1f3..1533d70143 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java
@@ -205,4 +205,24 @@ public interface FactOriginGroupMainDailyDao extends BaseDao selectCustomerGroupList(@Param("customerId") String customerId, @Param("dateId") String dateId);
+
+ /**
+ * 获取组织级别党员建组统计
+ * @author zhaoqifeng
+ * @date 2021/5/13 17:06
+ * @param customerId
+ * @param dateId
+ * @return java.util.List
+ */
+ List selectPartyMemberGroupStaticByAgency(@Param("customerId") String customerId, @Param("dateId") String dateId);
+
+ /**
+ * 获取网格级别党员建组统计
+ * @author zhaoqifeng
+ * @date 2021/5/13 17:07
+ * @param customerId
+ * @param dateId
+ * @return java.util.List
+ */
+ List selectPartyMemberGroupStaticByGrid(@Param("customerId") String customerId, @Param("dateId") String dateId);
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMemberDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMemberDailyDao.java
index 662f2a14c5..81a0dd3303 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMemberDailyDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMemberDailyDao.java
@@ -18,8 +18,12 @@
package com.epmet.dao.evaluationindex.extract;
import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.extract.result.OrgStatisticsResultDTO;
import com.epmet.entity.evaluationindex.extract.FactOriginGroupMemberDailyEntity;
import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
/**
*
@@ -29,5 +33,25 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface FactOriginGroupMemberDailyDao extends BaseDao {
+
+ /**
+ * 获取组织级别党员建组统计
+ * @author zhaoqifeng
+ * @date 2021/5/13 17:06
+ * @param customerId
+ * @param dateId
+ * @return java.util.List
+ */
+ List selectGroupPartyMemberStaticByAgency(@Param("customerId") String customerId, @Param("dateId") String dateId);
+
+ /**
+ * 获取网格级别党员建组统计
+ * @author zhaoqifeng
+ * @date 2021/5/13 17:07
+ * @param customerId
+ * @param dateId
+ * @return java.util.List
+ */
+ List selectGroupPartyMemberStaticByGrid(@Param("customerId") String customerId, @Param("dateId") String dateId);
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueMainDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueMainDailyDao.java
index c8969fea56..280e38213e 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueMainDailyDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueMainDailyDao.java
@@ -205,4 +205,24 @@ public interface FactOriginIssueMainDailyDao extends BaseDao selectOrgIssueCount(@Param("customerId") String customerId, @Param("monthId") String monthId,
@Param("level") String level);
+
+ /**
+ * 获取组织级别党员发布话题转议题统计
+ * @author zhaoqifeng
+ * @date 2021/5/17 15:02
+ * @param customerId
+ * @param dateId
+ * @return java.util.List
+ */
+ List selectPartyMemberIssueStaticByAgency(@Param("customerId") String customerId, @Param("dateId") String dateId);
+
+ /**
+ * 获取组织级别党员发布话题转议题统计
+ * @author zhaoqifeng
+ * @date 2021/5/17 15:03
+ * @param customerId
+ * @param dateId
+ * @return java.util.List
+ */
+ List selectPartyMemberIssueStaticByGrid(@Param("customerId") String customerId, @Param("dateId") String dateId);
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java
index dbc532b90c..179574ae7a 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java
@@ -370,4 +370,45 @@ public interface FactOriginProjectMainDailyDao extends BaseDao getProjectPeriodForDiff(@Param("customerId") String customerId, @Param("dateId") String dateId);
List selectResponseCount(@Param("customerId") String customerId);
+
+
+ /**
+ * 获取组织级别党员发布话题转项目统计
+ * @author zhaoqifeng
+ * @date 2021/5/17 15:02
+ * @param customerId
+ * @param dateId
+ * @return java.util.List
+ */
+ List selectPartyMemberProjectStaticByAgency(@Param("customerId") String customerId, @Param("dateId") String dateId);
+
+ /**
+ * 获取组织级别党员发布话题转项目统计
+ * @author zhaoqifeng
+ * @date 2021/5/17 15:03
+ * @param customerId
+ * @param dateId
+ * @return java.util.List
+ */
+ List selectPartyMemberProjectStaticByGrid(@Param("customerId") String customerId, @Param("dateId") String dateId);
+
+ /**
+ * 获取组织级别党员发布话题结案统计
+ * @author zhaoqifeng
+ * @date 2021/5/17 15:02
+ * @param customerId
+ * @param dateId
+ * @return java.util.List
+ */
+ List selectPartyMemberClosedProjectStaticByAgency(@Param("customerId") String customerId, @Param("dateId") String dateId);
+
+ /**
+ * 获取组织级别党员发布话题结案统计
+ * @author zhaoqifeng
+ * @date 2021/5/17 15:03
+ * @param customerId
+ * @param dateId
+ * @return java.util.List
+ */
+ List selectPartyMemberClosedProjectStaticByGrid(@Param("customerId") String customerId, @Param("dateId") String dateId);
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginTopicMainDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginTopicMainDailyDao.java
index ae3ad01fd5..f34fbf3a4b 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginTopicMainDailyDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginTopicMainDailyDao.java
@@ -139,4 +139,24 @@ public interface FactOriginTopicMainDailyDao extends BaseDao selectOrgTopicCount(@Param("customerId") String customerId, @Param("monthId") String monthId,
@Param("level") String level);
+
+ /**
+ * 组织内党员发布话题占比统计
+ * @author zhaoqifeng
+ * @date 2021/5/17 10:29
+ * @param customerId
+ * @param dateId
+ * @return java.util.List
+ */
+ List selectPartyMemberTopicStaticByAgency(@Param("customerId") String customerId, @Param("dateId") String dateId);
+
+ /**
+ * 网格内党员发布话题占比统计
+ * @author zhaoqifeng
+ * @date 2021/5/17 10:31
+ * @param customerId
+ * @param dateId
+ * @return java.util.List
+ */
+ List selectPartyMemberTopicStaticByGrid(@Param("customerId") String customerId, @Param("dateId") String dateId);
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactPartyMemberVanguardAgencyDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactPartyMemberVanguardAgencyDailyDao.java
new file mode 100644
index 0000000000..812935ef6e
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactPartyMemberVanguardAgencyDailyDao.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao.stats;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.stats.FactPartyMemberVanguardAgencyDailyEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * 党员先锋-机关日统计数据
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-05-13
+ */
+@Mapper
+public interface FactPartyMemberVanguardAgencyDailyDao extends BaseDao {
+
+ /**
+ * 删除日统计数据
+ * @author zhaoqifeng
+ * @date 2021/5/17 17:19
+ * @param customerId
+ * @param dateId
+ * @return int
+ */
+ int deleteDailyData(@Param("customerId") String customerId, @Param("dateId") String dateId);
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactPartyMemberVanguardGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactPartyMemberVanguardGridDailyDao.java
new file mode 100644
index 0000000000..310bcabdef
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactPartyMemberVanguardGridDailyDao.java
@@ -0,0 +1,42 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao.stats;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.stats.FactPartyMemberVanguardGridDailyEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * 党员先锋-网格日统计数据
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-05-13
+ */
+@Mapper
+public interface FactPartyMemberVanguardGridDailyDao extends BaseDao {
+ /**
+ * 删除日统计数据
+ * @author zhaoqifeng
+ * @date 2021/5/17 17:19
+ * @param customerId
+ * @param dateId
+ * @return int
+ */
+ int deleteDailyData(@Param("customerId") String customerId, @Param("dateId") String dateId);
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactPartyMemberVanguardAgencyDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactPartyMemberVanguardAgencyDailyEntity.java
new file mode 100644
index 0000000000..44666ec1d9
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactPartyMemberVanguardAgencyDailyEntity.java
@@ -0,0 +1,149 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.entity.stats;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 党员先锋-机关日统计数据
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-05-13
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("fact_party_member_vanguard_agency_daily")
+public class FactPartyMemberVanguardAgencyDailyEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 机构ID
+ */
+ private String agencyId;
+
+ /**
+ * 父级机关ID
+ */
+ private String pid;
+
+ /**
+ * 统计日期 关联日期dim表
+ */
+ private String dateId;
+
+ /**
+ * 周ID
+ */
+ private String weekId;
+
+ /**
+ * 月ID
+ */
+ private String monthId;
+
+ /**
+ * 季ID
+ */
+ private String quarterId;
+
+ /**
+ * 年ID
+ */
+ private String yearId;
+
+ /**
+ * 党员建组数
+ */
+ private Integer groupCount;
+
+ private Integer groupTotal;
+ private Integer groupMemberTotal;
+ private Integer topicTotal;
+ private Integer issueTotal;
+ private Integer projectTotal;
+ private Integer projectClosedTotal;
+
+ /**
+ * 党员建组数占比
+ */
+ private BigDecimal groupRatio;
+
+ /**
+ * 组内党员人数
+ */
+ private Integer groupMemberCount;
+
+ /**
+ * 组内党员人数占比
+ */
+ private BigDecimal groupMemberRatio;
+
+ /**
+ * 党员发布话题数
+ */
+ private Integer topicCount;
+
+ /**
+ * 党员发布话题数占比
+ */
+ private BigDecimal topicRatio;
+
+ /**
+ * 党员发布话题转议题数
+ */
+ private Integer issueCount;
+
+ /**
+ * 党员发布话题转议题数占比
+ */
+ private BigDecimal issueRatio;
+
+ /**
+ * 党员发布话题转项目数
+ */
+ private Integer projectCount;
+
+ /**
+ * 党员发布话题转项目数占比
+ */
+ private BigDecimal projectRatio;
+
+ /**
+ * 党员发布话题转项目结案数
+ */
+ private Integer projectClosedCount;
+
+ /**
+ * 党员发布话题转项目结案数占比
+ */
+ private BigDecimal projectClosedRatio;
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactPartyMemberVanguardGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactPartyMemberVanguardGridDailyEntity.java
new file mode 100644
index 0000000000..5b591a8e7e
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactPartyMemberVanguardGridDailyEntity.java
@@ -0,0 +1,149 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.entity.stats;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 党员先锋-网格日统计数据
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-05-13
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("fact_party_member_vanguard_grid_daily")
+public class FactPartyMemberVanguardGridDailyEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 机构ID
+ */
+ private String agencyId;
+
+ /**
+ * 网格ID
+ */
+ private String gridId;
+
+ /**
+ * 统计日期 关联日期dim表
+ */
+ private String dateId;
+
+ /**
+ * 周ID
+ */
+ private String weekId;
+
+ /**
+ * 月ID
+ */
+ private String monthId;
+
+ /**
+ * 季ID
+ */
+ private String quarterId;
+
+ /**
+ * 年ID
+ */
+ private String yearId;
+
+ /**
+ * 党员建组数
+ */
+ private Integer groupCount;
+
+ private Integer groupTotal;
+ private Integer groupMemberTotal;
+ private Integer topicTotal;
+ private Integer issueTotal;
+ private Integer projectTotal;
+ private Integer projectClosedTotal;
+
+ /**
+ * 党员建组数占比
+ */
+ private BigDecimal groupRatio;
+
+ /**
+ * 组内党员人数
+ */
+ private Integer groupMemberCount;
+
+ /**
+ * 组内党员人数占比
+ */
+ private BigDecimal groupMemberRatio;
+
+ /**
+ * 党员发布话题数
+ */
+ private Integer topicCount;
+
+ /**
+ * 党员发布话题数占比
+ */
+ private BigDecimal topicRatio;
+
+ /**
+ * 党员发布话题转议题数
+ */
+ private Integer issueCount;
+
+ /**
+ * 党员发布话题转议题数占比
+ */
+ private BigDecimal issueRatio;
+
+ /**
+ * 党员发布话题转项目数
+ */
+ private Integer projectCount;
+
+ /**
+ * 党员发布话题转项目数占比
+ */
+ private BigDecimal projectRatio;
+
+ /**
+ * 党员发布话题转项目结案数
+ */
+ private Integer projectClosedCount;
+
+ /**
+ * 党员发布话题转项目结案数占比
+ */
+ private BigDecimal projectClosedRatio;
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsPartyMemberVanguardService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsPartyMemberVanguardService.java
new file mode 100644
index 0000000000..c4ba1d4fe2
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsPartyMemberVanguardService.java
@@ -0,0 +1,31 @@
+package com.epmet.service;
+
+import com.epmet.dto.StatsFormDTO;
+import com.epmet.dto.group.form.GroupStatsFormDTO;
+import com.epmet.dto.group.form.GroupTotalFormDTO;
+
+/**
+ * 党员先锋相关统计
+ * @author zhaoqifeng
+ * @date 2021/5/13 15:07
+ */
+public interface StatsPartyMemberVanguardService {
+ /**
+ * 组织统计
+ * @author zhaoqifeng
+ * @date 2021/5/13 15:13
+ * @param formDTO
+ * @return void
+ */
+ void agencyStats(StatsFormDTO formDTO);
+
+ /**
+ * 网格统计
+ * @author zhaoqifeng
+ * @date 2021/5/13 15:13
+ * @param formDTO
+ * @return void
+ */
+ void gridStats(StatsFormDTO formDTO);
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginGroupMainDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginGroupMainDailyService.java
index 21d55ac87e..89beadf503 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginGroupMainDailyService.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginGroupMainDailyService.java
@@ -26,6 +26,7 @@ import com.epmet.dto.group.result.ExtractGroupMemberActionRecordResultDTO;
import com.epmet.entity.evaluationindex.extract.FactOriginGroupMainDailyEntity;
import java.util.List;
+import java.util.Map;
/**
@@ -112,4 +113,16 @@ public interface FactOriginGroupMainDailyService extends BaseService getGroupListByCustomerId(String customerId, String dateId);
+
+ /**
+ * 获取组织/网格级别党员建组统计
+ * @author zhaoqifeng
+ * @date 2021/5/13 16:55
+ * @param customerId
+ * @param dateId
+ * @param type agency grid
+ * @return java.util.List
+ */
+ Map getPartyMemberGroupStatic(String customerId, String dateId, String type);
+
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginGroupMemberDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginGroupMemberDailyService.java
index 618c340d66..53ff5cf084 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginGroupMemberDailyService.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginGroupMemberDailyService.java
@@ -20,6 +20,7 @@ package com.epmet.service.evaluationindex.extract.todata;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.extract.FactOriginGroupMemberDailyDTO;
+import com.epmet.dto.extract.result.OrgStatisticsResultDTO;
import com.epmet.entity.evaluationindex.extract.FactOriginGroupMemberDailyEntity;
import java.util.List;
@@ -92,4 +93,15 @@ public interface FactOriginGroupMemberDailyService extends BaseService
+ */
+ Map getGroupPartyMemberStatic(String customerId, String dateId, String type);
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginIssueMainDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginIssueMainDailyService.java
index de2ac6f8c7..a1e4ac55de 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginIssueMainDailyService.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginIssueMainDailyService.java
@@ -22,6 +22,7 @@ import com.epmet.dto.extract.result.OrgStatisticsResultDTO;
import com.epmet.entity.evaluationindex.extract.FactOriginIssueMainDailyEntity;
import java.util.List;
+import java.util.Map;
/**
* 议题主表
@@ -110,4 +111,15 @@ public interface FactOriginIssueMainDailyService extends BaseService
*/
List getOrgIssueCount(String customerId, String monthId, String level);
+
+ /**
+ * 获取组织/网格级别党员发布话题转议题统计
+ * @author zhaoqifeng
+ * @date 2021/5/17 14:52
+ * @param customerId
+ * @param dateId
+ * @param type
+ * @return java.util.Map
+ */
+ Map getPartyMemberIssueStatic(String customerId, String dateId, String type);
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java
index 449e546658..b160131db7 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java
@@ -32,6 +32,7 @@ import com.epmet.entity.evaluationindex.extract.FactOriginProjectOrgPeriodDailyE
import com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity;
import java.util.List;
+import java.util.Map;
/**
* 项目主表_日统计
@@ -367,4 +368,26 @@ public interface FactOriginProjectMainDailyService extends BaseService list, String customerId);
+ /**
+ * 获取组织/网格级别党员发布话题转项目统计
+ * @author zhaoqifeng
+ * @date 2021/5/17 15:25
+ * @param customerId
+ * @param dateId
+ * @param type
+ * @return java.util.Map
+ */
+ Map getPartyMemberProjectStatic(String customerId, String dateId, String type);
+
+ /**
+ * 获取组织/网格级别党员发布话题结案统计
+ * @author zhaoqifeng
+ * @date 2021/5/17 15:39
+ * @param customerId
+ * @param dateId
+ * @param type
+ * @return java.util.Map
+ */
+ Map getPartyMemberClosedProjectStatic(String customerId, String dateId, String type);
+
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginTopicMainDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginTopicMainDailyService.java
index 5c4f8da390..aa66fc44e0 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginTopicMainDailyService.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginTopicMainDailyService.java
@@ -25,6 +25,7 @@ import com.epmet.dto.indexcollect.result.CpcIndexCommonDTO;
import com.epmet.entity.evaluationindex.extract.FactOriginTopicMainDailyEntity;
import java.util.List;
+import java.util.Map;
/**
@@ -111,4 +112,15 @@ public interface FactOriginTopicMainDailyService extends BaseService
*/
List getOrgTopicCount(String customerId, String monthId, String level);
+
+ /**
+ * 获取组织/网格级别党员发布话题统计
+ * @author zhaoqifeng
+ * @date 2021/5/17 14:25
+ * @param customerId
+ * @param dateId
+ * @param type
+ * @return java.util.Map
+ */
+ Map getPartyMemberTopicStatic(String customerId, String dateId, String type);
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMainDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMainDailyServiceImpl.java
index d7819f31b1..164b0b76dc 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMainDailyServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMainDailyServiceImpl.java
@@ -20,6 +20,7 @@ package com.epmet.service.evaluationindex.extract.todata.impl;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.ConvertUtils;
+import com.epmet.constant.OrgTypeConstant;
import com.epmet.dao.evaluationindex.extract.FactOriginGroupMainDailyDao;
import com.epmet.dao.evaluationindex.extract.FactOriginGroupMemberDailyDao;
import com.epmet.dto.extract.FactOriginGroupMainDailyDTO;
@@ -37,8 +38,13 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
+import java.util.Map;
+import java.util.function.Function;
import java.util.stream.Collectors;
@@ -159,4 +165,37 @@ public class FactOriginGroupMainDailyServiceImpl extends BaseServiceImpl
+ * @author zhaoqifeng
+ * @date 2021/5/13 16:55
+ */
+ @Override
+ public Map getPartyMemberGroupStatic(String customerId, String dateId, String type) {
+ List result;
+ if (OrgTypeConstant.AGENCY.equals(type)) {
+ result = baseDao.selectPartyMemberGroupStaticByAgency(customerId, dateId);
+ } else {
+ result = baseDao.selectPartyMemberGroupStaticByGrid(customerId, dateId);
+ }
+ if (CollectionUtils.isEmpty(result)) {
+ return Collections.emptyMap();
+ }
+ result.forEach(item -> {
+ BigDecimal count = new BigDecimal(item.getCount());
+ BigDecimal sum = new BigDecimal(item.getSum());
+ item.setRatio(count.divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
+ });
+ if (OrgTypeConstant.AGENCY.equals(type)) {
+ return result.stream().collect(Collectors.toMap(OrgStatisticsResultDTO::getAgencyId, Function.identity()));
+ } else {
+ return result.stream().collect(Collectors.toMap(OrgStatisticsResultDTO::getOrgId, Function.identity()));
+ }
+ }
+
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMemberDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMemberDailyServiceImpl.java
index aea9baa4bc..e8ab17e4d1 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMemberDailyServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMemberDailyServiceImpl.java
@@ -20,21 +20,30 @@ package com.epmet.service.evaluationindex.extract.todata.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
+import com.epmet.constant.OrgTypeConstant;
import com.epmet.dao.evaluationindex.extract.FactOriginGroupMemberDailyDao;
import com.epmet.dto.extract.FactOriginGroupMemberDailyDTO;
+import com.epmet.dto.extract.result.OrgStatisticsResultDTO;
import com.epmet.entity.evaluationindex.extract.FactOriginGroupMemberDailyEntity;
import com.epmet.service.evaluationindex.extract.todata.FactOriginGroupMemberDailyService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
import java.util.Arrays;
+import java.util.Collections;
import java.util.List;
import java.util.Map;
+import java.util.function.Function;
+import java.util.stream.Collectors;
/**
*
@@ -98,4 +107,39 @@ public class FactOriginGroupMemberDailyServiceImpl extends BaseServiceImpl
+ * @author zhaoqifeng
+ * @date 2021/5/14 10:33
+ */
+ @Override
+ public Map getGroupPartyMemberStatic(String customerId, String dateId, String type) {
+ List staticsList;
+ if (OrgTypeConstant.AGENCY.equals(type)) {
+ //组织级别统计
+ staticsList = baseDao.selectGroupPartyMemberStaticByAgency(customerId, dateId);
+ } else {
+ //网格级别统计
+ staticsList = baseDao.selectGroupPartyMemberStaticByGrid(customerId, dateId);
+ }
+ if (CollectionUtils.isEmpty(staticsList)) {
+ return Collections.emptyMap();
+ }
+ staticsList.forEach(item -> {
+ BigDecimal count = new BigDecimal(item.getCount());
+ BigDecimal sum = new BigDecimal(item.getSum());
+ item.setRatio(count.divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
+ });
+ if (OrgTypeConstant.AGENCY.equals(type)) {
+ return staticsList.stream().collect(Collectors.toMap(OrgStatisticsResultDTO::getAgencyId, Function.identity()));
+ } else {
+ return staticsList.stream().collect(Collectors.toMap(OrgStatisticsResultDTO::getOrgId, Function.identity()));
+ }
+ }
+
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginIssueMainDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginIssueMainDailyServiceImpl.java
index 0eac851c63..86e60734b7 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginIssueMainDailyServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginIssueMainDailyServiceImpl.java
@@ -19,15 +19,24 @@ package com.epmet.service.evaluationindex.extract.todata.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.constant.DataSourceConstant;
+import com.epmet.constant.OrgTypeConstant;
import com.epmet.dao.evaluationindex.extract.FactOriginIssueMainDailyDao;
import com.epmet.dto.extract.result.OrgStatisticsResultDTO;
import com.epmet.entity.evaluationindex.extract.FactOriginIssueMainDailyEntity;
import com.epmet.service.evaluationindex.extract.todata.FactOriginIssueMainDailyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.Collections;
import java.util.List;
+import java.util.Map;
+import java.util.function.Function;
+import java.util.stream.Collectors;
/**
* 议题主表
@@ -127,4 +136,37 @@ public class FactOriginIssueMainDailyServiceImpl extends BaseServiceImpl getOrgIssueCount(String customerId, String monthId, String level) {
return baseDao.selectOrgIssueCount(customerId, monthId, level);
}
+
+ /**
+ * 获取组织/网格级别党员发布话题转议题统计
+ *
+ * @param customerId
+ * @param dateId
+ * @param type
+ * @return java.util.Map
+ * @author zhaoqifeng
+ * @date 2021/5/17 14:52
+ */
+ @Override
+ public Map getPartyMemberIssueStatic(String customerId, String dateId, String type) {
+ List result;
+ if (OrgTypeConstant.AGENCY.equals(type)) {
+ result = baseDao.selectPartyMemberIssueStaticByAgency(customerId, dateId);
+ } else {
+ result = baseDao.selectPartyMemberIssueStaticByGrid(customerId, dateId);
+ }
+ if (CollectionUtils.isEmpty(result)) {
+ return Collections.emptyMap();
+ }
+ result.forEach(item -> {
+ BigDecimal count = new BigDecimal(item.getCount());
+ BigDecimal sum = new BigDecimal(item.getSum());
+ item.setRatio(count.divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
+ });
+ if (OrgTypeConstant.AGENCY.equals(type)) {
+ return result.stream().collect(Collectors.toMap(OrgStatisticsResultDTO::getAgencyId, Function.identity()));
+ } else {
+ return result.stream().collect(Collectors.toMap(OrgStatisticsResultDTO::getOrgId, Function.identity()));
+ }
+ }
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java
index 00f8ecbb9c..73830ce377 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java
@@ -23,6 +23,7 @@ import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.DataSourceConstant;
+import com.epmet.constant.OrgTypeConstant;
import com.epmet.constant.ProjectConstant;
import com.epmet.dao.evaluationindex.extract.FactOriginProjectMainDailyDao;
import com.epmet.dao.evaluationindex.extract.FactOriginProjectOrgPeriodDailyDao;
@@ -47,10 +48,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Map;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.*;
+import java.util.function.Function;
import java.util.stream.Collectors;
/**
@@ -528,5 +529,71 @@ public class FactOriginProjectMainDailyServiceImpl extends BaseServiceImpl
+ * @author zhaoqifeng
+ * @date 2021/5/17 15:25
+ */
+ @Override
+ public Map getPartyMemberProjectStatic(String customerId, String dateId, String type) {
+ List result;
+ if (OrgTypeConstant.AGENCY.equals(type)) {
+ result = baseDao.selectPartyMemberProjectStaticByAgency(customerId, dateId);
+ } else {
+ result = baseDao.selectPartyMemberProjectStaticByGrid(customerId, dateId);
+ }
+ if (CollectionUtils.isEmpty(result)) {
+ return Collections.emptyMap();
+ }
+ result.forEach(item -> {
+ BigDecimal count = new BigDecimal(item.getCount());
+ BigDecimal sum = new BigDecimal(item.getSum());
+ item.setRatio(count.divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
+ });
+ if (OrgTypeConstant.AGENCY.equals(type)) {
+ return result.stream().collect(Collectors.toMap(OrgStatisticsResultDTO::getAgencyId, Function.identity()));
+ } else {
+ return result.stream().collect(Collectors.toMap(OrgStatisticsResultDTO::getOrgId, Function.identity()));
+ }
+ }
+
+ /**
+ * 获取组织/网格级别党员发布话题结案统计
+ *
+ * @param customerId
+ * @param dateId
+ * @param type
+ * @return java.util.Map
+ * @author zhaoqifeng
+ * @date 2021/5/17 15:39
+ */
+ @Override
+ public Map getPartyMemberClosedProjectStatic(String customerId, String dateId, String type) {
+ List result;
+ if (OrgTypeConstant.AGENCY.equals(type)) {
+ result = baseDao.selectPartyMemberClosedProjectStaticByAgency(customerId, dateId);
+ } else {
+ result = baseDao.selectPartyMemberClosedProjectStaticByGrid(customerId, dateId);
+ }
+ if (CollectionUtils.isEmpty(result)) {
+ return Collections.emptyMap();
+ }
+ result.forEach(item -> {
+ BigDecimal count = new BigDecimal(item.getCount());
+ BigDecimal sum = new BigDecimal(item.getSum());
+ item.setRatio(count.divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
+ });
+ if (OrgTypeConstant.AGENCY.equals(type)) {
+ return result.stream().collect(Collectors.toMap(OrgStatisticsResultDTO::getAgencyId, Function.identity()));
+ } else {
+ return result.stream().collect(Collectors.toMap(OrgStatisticsResultDTO::getOrgId, Function.identity()));
+ }
+ }
+
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginTopicMainDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginTopicMainDailyServiceImpl.java
index 7519d9496d..ac1e8af7a3 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginTopicMainDailyServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginTopicMainDailyServiceImpl.java
@@ -26,6 +26,7 @@ import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.constant.DimObjectActionConstant;
import com.epmet.constant.IndexCalConstant;
+import com.epmet.constant.OrgTypeConstant;
import com.epmet.dao.evaluationindex.extract.FactOriginTopicLogDailyDao;
import com.epmet.dao.evaluationindex.extract.FactOriginTopicMainDailyDao;
import com.epmet.dto.extract.form.ExtractOriginFormDTO;
@@ -46,10 +47,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.*;
+import java.util.function.Function;
import java.util.stream.Collectors;
@@ -325,4 +326,37 @@ public class FactOriginTopicMainDailyServiceImpl extends BaseServiceImpl
+ * @author zhaoqifeng
+ * @date 2021/5/17 14:25
+ */
+ @Override
+ public Map getPartyMemberTopicStatic(String customerId, String dateId, String type) {
+ List result;
+ if (OrgTypeConstant.AGENCY.equals(type)) {
+ result = baseDao.selectPartyMemberTopicStaticByAgency(customerId, dateId);
+ } else {
+ result = baseDao.selectPartyMemberTopicStaticByGrid(customerId, dateId);
+ }
+ if (CollectionUtils.isEmpty(result)) {
+ return Collections.emptyMap();
+ }
+ result.forEach(item -> {
+ BigDecimal count = new BigDecimal(item.getCount());
+ BigDecimal sum = new BigDecimal(item.getSum());
+ item.setRatio(count.divide(sum, NumConstant.SIX, RoundingMode.HALF_UP));
+ });
+ if (OrgTypeConstant.AGENCY.equals(type)) {
+ return result.stream().collect(Collectors.toMap(OrgStatisticsResultDTO::getAgencyId, Function.identity()));
+ } else {
+ return result.stream().collect(Collectors.toMap(OrgStatisticsResultDTO::getOrgId, Function.identity()));
+ }
+ }
+
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsPartyMemberVanguardServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsPartyMemberVanguardServiceImpl.java
new file mode 100644
index 0000000000..080a168591
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsPartyMemberVanguardServiceImpl.java
@@ -0,0 +1,414 @@
+package com.epmet.service.impl;
+
+import com.epmet.commons.tools.constant.NumConstant;
+import com.epmet.commons.tools.utils.DateUtils;
+import com.epmet.constant.OrgTypeConstant;
+import com.epmet.dto.StatsFormDTO;
+import com.epmet.dto.extract.result.OrgStatisticsResultDTO;
+import com.epmet.dto.stats.DimAgencyDTO;
+import com.epmet.dto.stats.DimGridDTO;
+import com.epmet.entity.stats.DimGridEntity;
+import com.epmet.entity.stats.FactPartyMemberVanguardAgencyDailyEntity;
+import com.epmet.entity.stats.FactPartyMemberVanguardGridDailyEntity;
+import com.epmet.service.StatsPartyMemberVanguardService;
+import com.epmet.service.evaluationindex.extract.todata.*;
+import com.epmet.service.stats.*;
+import com.epmet.util.DimIdGenerator;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @author zhaoqifeng
+ * @dscription
+ * @date 2021/5/13 15:13
+ */
+@Slf4j
+@Service
+public class StatsPartyMemberVanguardServiceImpl implements StatsPartyMemberVanguardService {
+
+ @Resource
+ private DimCustomerService dimCustomerService;
+ @Resource
+ private DimAgencyService dimAgencyService;
+ @Resource
+ private DimGridService dimGridService;
+ @Resource
+ private FactPartyMemberVanguardAgencyDailyService factPartyMemberVanguardAgencyDailyService;
+ @Resource
+ private FactPartyMemberVanguardGridDailyService factPartyMemberVanguardGridDailyService;
+ @Resource
+ private FactOriginGroupMainDailyService factOriginGroupMainDailyService;
+ @Resource
+ private FactOriginGroupMemberDailyService factOriginGroupMemberDailyService;
+ @Resource
+ private FactOriginTopicMainDailyService factOriginTopicMainDailyService;
+ @Resource
+ private FactOriginIssueMainDailyService factOriginIssueMainDailyService;
+ @Resource
+ private FactOriginProjectMainDailyService factOriginProjectMainDailyService;
+
+
+
+
+ /**
+ * 组织统计
+ *
+ * @param formDTO
+ * @return void
+ * @author zhaoqifeng
+ * @date 2021/5/13 15:13
+ */
+ @Override
+ public void agencyStats(StatsFormDTO formDTO) {
+ Date date = yesterday();
+ //入参有时间的则按具体时间执行,没有的则按当前时间前一天执行
+ if (null != formDTO && StringUtils.isNotBlank(formDTO.getDate())) {
+ date = DateUtils.parse(formDTO.getDate(), DateUtils.DATE_PATTERN_YYYYMMDD);
+ }
+ //入参有客户Id的则按客户Id执行,没有的则全部客户都执行
+ if (null != formDTO && StringUtils.isNotBlank(formDTO.getCustomerId())) {
+ customerAgencyStats(formDTO.getCustomerId(), date);
+ } else {
+ int pageNo = 1;
+ int pageSize = 100;
+ List customerIdList;
+ do {
+ customerIdList = dimCustomerService.selectCustomerIdPage(pageNo++, pageSize);
+ if (CollectionUtils.isNotEmpty(customerIdList)) {
+ for (String customerId : customerIdList) {
+ try {
+ //遍历统计每一个客户数据
+ customerAgencyStats(customerId, date);
+ } catch (Exception e) {
+ log.error("Error creating model JSON", e);
+ }
+ }
+ }
+ } while (CollectionUtils.isNotEmpty(customerIdList) && customerIdList.size() == pageSize);
+ }
+ }
+
+ private void customerAgencyStats(String customerId, Date date) {
+ //1:查询日期各维度表Id
+ DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(date);
+
+ //2:根据客户Id查询机关维度表数据
+ log.info("根据客户Id查询机关维度数据,对应客户Id:" + customerId);
+ DimAgencyDTO dimAgencyDTO = new DimAgencyDTO();
+ dimAgencyDTO.setCustomerId(customerId);
+ List dimAgencyList = dimAgencyService.getDimAgencyList(dimAgencyDTO);
+
+ if (CollectionUtils.isNotEmpty(dimAgencyList)) {
+ List vanguardList = dimAgencyList.stream().map(item -> initAgencyDailyEntity(item, dimId)).collect(Collectors.toList());
+ //党员建组占比统计
+ Map groupStatic = factOriginGroupMainDailyService.getPartyMemberGroupStatic(customerId,
+ dimId.getDateId(), OrgTypeConstant.AGENCY);
+ if (!groupStatic.isEmpty()) {
+ vanguardList.forEach(item -> {
+ OrgStatisticsResultDTO dto = groupStatic.get(item.getAgencyId());
+ if (null != dto) {
+ item.setGroupCount(dto.getCount());
+ item.setGroupRatio(dto.getRatio());
+ item.setGroupTotal(dto.getSum());
+ }
+ });
+ }
+
+ //小组成员党员占比统计
+ Map memberStatic = factOriginGroupMemberDailyService.getGroupPartyMemberStatic(customerId,
+ dimId.getDateId(), OrgTypeConstant.AGENCY);
+ if (!memberStatic.isEmpty()) {
+ vanguardList.forEach(item -> {
+ OrgStatisticsResultDTO dto = memberStatic.get(item.getAgencyId());
+ if (null != dto) {
+ item.setGroupMemberCount(dto.getCount());
+ item.setGroupMemberRatio(dto.getRatio());
+ item.setGroupMemberTotal(dto.getSum());
+ }
+ });
+ }
+ //党员发布话题占比统计
+ Map topicStatic = factOriginTopicMainDailyService.getPartyMemberTopicStatic(customerId,
+ dimId.getDateId(), OrgTypeConstant.AGENCY);
+ if (!topicStatic.isEmpty()) {
+ vanguardList.forEach(item -> {
+ OrgStatisticsResultDTO dto = topicStatic.get(item.getAgencyId());
+ if (null != dto) {
+ item.setGroupMemberCount(dto.getCount());
+ item.setGroupMemberRatio(dto.getRatio());
+ item.setGroupMemberTotal(dto.getSum());
+ }
+ });
+ }
+ //党员发布话题转议题占比统计
+ Map issueStatic = factOriginIssueMainDailyService.getPartyMemberIssueStatic(customerId,
+ dimId.getDateId(), OrgTypeConstant.AGENCY);
+ if (!issueStatic.isEmpty()) {
+ vanguardList.forEach(item -> {
+ OrgStatisticsResultDTO dto = issueStatic.get(item.getAgencyId());
+ if (null != dto) {
+ item.setGroupMemberCount(dto.getCount());
+ item.setGroupMemberRatio(dto.getRatio());
+ item.setGroupMemberTotal(dto.getSum());
+ }
+ });
+ }
+ //党员发布话题转项目占比统计
+ Map projectStatic = factOriginProjectMainDailyService.getPartyMemberProjectStatic(customerId,
+ dimId.getDateId(), OrgTypeConstant.AGENCY);
+ if (!projectStatic.isEmpty()) {
+ vanguardList.forEach(item -> {
+ OrgStatisticsResultDTO dto = projectStatic.get(item.getAgencyId());
+ if (null != dto) {
+ item.setGroupMemberCount(dto.getCount());
+ item.setGroupMemberRatio(dto.getRatio());
+ item.setGroupMemberTotal(dto.getSum());
+ }
+ });
+ }
+ //项目结案占比统计
+ Map closedStatic = factOriginProjectMainDailyService.getPartyMemberClosedProjectStatic(customerId,
+ dimId.getDateId(), OrgTypeConstant.AGENCY);
+ if (!closedStatic.isEmpty()) {
+ vanguardList.forEach(item -> {
+ OrgStatisticsResultDTO dto = closedStatic.get(item.getAgencyId());
+ if (null != dto) {
+ item.setGroupMemberCount(dto.getCount());
+ item.setGroupMemberRatio(dto.getRatio());
+ item.setGroupMemberTotal(dto.getSum());
+ }
+ });
+ }
+ //删除旧数据
+ factPartyMemberVanguardAgencyDailyService.deleteDailyData(customerId, dimId.getDateId());
+ //批量插入
+ factPartyMemberVanguardAgencyDailyService.insertBatch(vanguardList);
+ }
+ }
+ /**
+ * 网格统计
+ *
+ * @param formDTO
+ * @return void
+ * @author zhaoqifeng
+ * @date 2021/5/13 15:13
+ */
+ @Override
+ public void gridStats(StatsFormDTO formDTO) {
+ Date date = yesterday();
+ //入参有时间的则按具体时间执行,没有的则按当前时间前一天执行
+ if (null != formDTO && StringUtils.isNotBlank(formDTO.getDate())) {
+ date = DateUtils.parse(formDTO.getDate(), DateUtils.DATE_PATTERN_YYYYMMDD);
+ }
+ //入参有客户Id的则按客户Id执行,没有的则全部客户都执行
+ if (null != formDTO && StringUtils.isNotBlank(formDTO.getCustomerId())) {
+ customerAgencyStats(formDTO.getCustomerId(), date);
+ } else {
+ int pageNo = 1;
+ int pageSize = 100;
+ List customerIdList;
+ do {
+ customerIdList = dimCustomerService.selectCustomerIdPage(pageNo++, pageSize);
+ if (CollectionUtils.isNotEmpty(customerIdList)) {
+ for (String customerId : customerIdList) {
+ try {
+ //遍历统计每一个客户数据
+ customerGridStats(customerId, date);
+ } catch (Exception e) {
+ log.error("Error creating model JSON", e);
+ }
+ }
+ }
+ } while (CollectionUtils.isNotEmpty(customerIdList) && customerIdList.size() == pageSize);
+ }
+ }
+
+ private void customerGridStats(String customerId, Date date) {
+ //1:查询日期各维度表Id
+ DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(date);
+
+ //2:根据客户Id查询机关维度表数据
+ log.info("根据客户Id查询网格维度数据,对应客户Id:" + customerId);
+ DimAgencyDTO dimAgencyDTO = new DimAgencyDTO();
+ dimAgencyDTO.setCustomerId(customerId);
+ List dimGridList = dimGridService.getGridListByCustomerId(customerId);
+
+ if (CollectionUtils.isNotEmpty(dimGridList)) {
+ List vanguardList =
+ dimGridList.stream().map(item -> initGridDailyEntity(item, dimId)).collect(Collectors.toList());
+ //党员建组占比统计
+ Map groupStatic = factOriginGroupMainDailyService.getPartyMemberGroupStatic(customerId,
+ dimId.getDateId(), OrgTypeConstant.GRID);
+ if (!groupStatic.isEmpty()) {
+ vanguardList.forEach(item -> {
+ OrgStatisticsResultDTO dto = groupStatic.get(item.getGridId());
+ if (null != dto) {
+ item.setGroupCount(dto.getCount());
+ item.setGroupRatio(dto.getRatio());
+ item.setGroupTotal(dto.getSum());
+ }
+ });
+ }
+
+ //小组成员党员占比统计
+ Map memberStatic = factOriginGroupMemberDailyService.getGroupPartyMemberStatic(customerId,
+ dimId.getDateId(), OrgTypeConstant.GRID);
+ if (!memberStatic.isEmpty()) {
+ vanguardList.forEach(item -> {
+ OrgStatisticsResultDTO dto = memberStatic.get(item.getGridId());
+ if (null != dto) {
+ item.setGroupMemberCount(dto.getCount());
+ item.setGroupMemberRatio(dto.getRatio());
+ item.setGroupMemberTotal(dto.getSum());
+ }
+ });
+ }
+ //党员发布话题占比统计
+ Map topicStatic = factOriginTopicMainDailyService.getPartyMemberTopicStatic(customerId,
+ dimId.getDateId(), OrgTypeConstant.GRID);
+ if (!topicStatic.isEmpty()) {
+ vanguardList.forEach(item -> {
+ OrgStatisticsResultDTO dto = topicStatic.get(item.getGridId());
+ if (null != dto) {
+ item.setGroupMemberCount(dto.getCount());
+ item.setGroupMemberRatio(dto.getRatio());
+ item.setGroupMemberTotal(dto.getSum());
+ }
+ });
+ }
+ //党员发布话题转议题占比统计
+ Map issueStatic = factOriginIssueMainDailyService.getPartyMemberIssueStatic(customerId,
+ dimId.getDateId(), OrgTypeConstant.GRID);
+ if (!issueStatic.isEmpty()) {
+ vanguardList.forEach(item -> {
+ OrgStatisticsResultDTO dto = issueStatic.get(item.getGridId());
+ if (null != dto) {
+ item.setGroupMemberCount(dto.getCount());
+ item.setGroupMemberRatio(dto.getRatio());
+ item.setGroupMemberTotal(dto.getSum());
+ }
+ });
+ }
+ //党员发布话题转项目占比统计
+ Map projectStatic = factOriginProjectMainDailyService.getPartyMemberProjectStatic(customerId,
+ dimId.getDateId(), OrgTypeConstant.GRID);
+ if (!projectStatic.isEmpty()) {
+ vanguardList.forEach(item -> {
+ OrgStatisticsResultDTO dto = projectStatic.get(item.getGridId());
+ if (null != dto) {
+ item.setGroupMemberCount(dto.getCount());
+ item.setGroupMemberRatio(dto.getRatio());
+ item.setGroupMemberTotal(dto.getSum());
+ }
+ });
+ }
+ //项目结案占比统计
+ Map closedStatic = factOriginProjectMainDailyService.getPartyMemberClosedProjectStatic(customerId,
+ dimId.getDateId(), OrgTypeConstant.GRID);
+ if (!closedStatic.isEmpty()) {
+ vanguardList.forEach(item -> {
+ OrgStatisticsResultDTO dto = closedStatic.get(item.getGridId());
+ if (null != dto) {
+ item.setGroupMemberCount(dto.getCount());
+ item.setGroupMemberRatio(dto.getRatio());
+ item.setGroupMemberTotal(dto.getSum());
+ }
+ });
+ }
+ //删除旧数据
+ factPartyMemberVanguardGridDailyService.deleteDailyData(customerId, dimId.getDateId());
+ //批量插入
+ factPartyMemberVanguardGridDailyService.insertBatch(vanguardList);
+ }
+ }
+
+
+ private Date yesterday() {
+ Date date = new Date();
+ try {
+ DateFormat sdf = new SimpleDateFormat(DateUtils.DATE_PATTERN_YYYYMMDD);
+ Calendar calendar = Calendar.getInstance();
+ calendar.set(Calendar.HOUR_OF_DAY, -24);
+ String str = sdf.format(calendar.getTime());
+ date = sdf.parse(str);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return date;
+ }
+
+ private FactPartyMemberVanguardAgencyDailyEntity initAgencyDailyEntity(DimAgencyDTO agency, DimIdGenerator.DimIdBean dimId) {
+ FactPartyMemberVanguardAgencyDailyEntity entity = new FactPartyMemberVanguardAgencyDailyEntity();
+ entity.setCustomerId(agency.getCustomerId());
+ entity.setAgencyId(agency.getId());
+ entity.setPid(agency.getPid());
+ entity.setDateId(dimId.getDateId());
+ entity.setWeekId(dimId.getWeekId());
+ entity.setMonthId(dimId.getMonthId());
+ entity.setQuarterId(dimId.getQuarterId());
+ entity.setYearId(dimId.getYearId());
+ entity.setGroupCount(NumConstant.ZERO);
+ entity.setGroupRatio(new BigDecimal(NumConstant.ZERO));
+ entity.setGroupTotal(NumConstant.ZERO);
+ entity.setGroupMemberCount(NumConstant.ZERO);
+ entity.setGroupMemberRatio(new BigDecimal(NumConstant.ZERO));
+ entity.setGroupMemberTotal(NumConstant.ZERO);
+ entity.setTopicCount(NumConstant.ZERO);
+ entity.setTopicRatio(new BigDecimal(NumConstant.ZERO));
+ entity.setTopicTotal(NumConstant.ZERO);
+ entity.setIssueCount(NumConstant.ZERO);
+ entity.setIssueRatio(new BigDecimal(NumConstant.ZERO));
+ entity.setIssueTotal(NumConstant.ZERO);
+ entity.setProjectCount(NumConstant.ZERO);
+ entity.setProjectRatio(new BigDecimal(NumConstant.ZERO));
+ entity.setProjectTotal(NumConstant.ZERO);
+ entity.setProjectClosedCount(NumConstant.ZERO);
+ entity.setProjectClosedRatio(new BigDecimal(NumConstant.ZERO));
+ entity.setProjectClosedTotal(NumConstant.ZERO);
+ return entity;
+ }
+
+
+ private FactPartyMemberVanguardGridDailyEntity initGridDailyEntity(DimGridEntity grid, DimIdGenerator.DimIdBean dimId) {
+ FactPartyMemberVanguardGridDailyEntity entity = new FactPartyMemberVanguardGridDailyEntity();
+ entity.setCustomerId(grid.getCustomerId());
+ entity.setAgencyId(grid.getAgencyId());
+ entity.setGridId(grid.getId());
+ entity.setDateId(dimId.getDateId());
+ entity.setWeekId(dimId.getWeekId());
+ entity.setMonthId(dimId.getMonthId());
+ entity.setQuarterId(dimId.getQuarterId());
+ entity.setYearId(dimId.getYearId());
+ entity.setGroupCount(NumConstant.ZERO);
+ entity.setGroupRatio(new BigDecimal(NumConstant.ZERO));
+ entity.setGroupTotal(NumConstant.ZERO);
+ entity.setGroupMemberCount(NumConstant.ZERO);
+ entity.setGroupMemberRatio(new BigDecimal(NumConstant.ZERO));
+ entity.setGroupMemberTotal(NumConstant.ZERO);
+ entity.setTopicCount(NumConstant.ZERO);
+ entity.setTopicRatio(new BigDecimal(NumConstant.ZERO));
+ entity.setTopicTotal(NumConstant.ZERO);
+ entity.setIssueCount(NumConstant.ZERO);
+ entity.setIssueRatio(new BigDecimal(NumConstant.ZERO));
+ entity.setIssueTotal(NumConstant.ZERO);
+ entity.setProjectCount(NumConstant.ZERO);
+ entity.setProjectRatio(new BigDecimal(NumConstant.ZERO));
+ entity.setProjectTotal(NumConstant.ZERO);
+ entity.setProjectClosedCount(NumConstant.ZERO);
+ entity.setProjectClosedRatio(new BigDecimal(NumConstant.ZERO));
+ entity.setProjectClosedTotal(NumConstant.ZERO);
+ return entity;
+ }
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactPartyMemberVanguardAgencyDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactPartyMemberVanguardAgencyDailyService.java
new file mode 100644
index 0000000000..385b615549
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactPartyMemberVanguardAgencyDailyService.java
@@ -0,0 +1,105 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service.stats;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.dto.stats.FactPartyMemberVanguardAgencyDailyDTO;
+import com.epmet.entity.stats.FactPartyMemberVanguardAgencyDailyEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 党员先锋-机关日统计数据
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-05-13
+ */
+public interface FactPartyMemberVanguardAgencyDailyService extends BaseService {
+
+ /**
+ * 默认分页
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2021-05-13
+ */
+ PageData page(Map params);
+
+ /**
+ * 默认查询
+ *
+ * @param params
+ * @return java.util.List
+ * @author generator
+ * @date 2021-05-13
+ */
+ List list(Map params);
+
+ /**
+ * 单条查询
+ *
+ * @param id
+ * @return FactPartyMemberVanguardAgencyDailyDTO
+ * @author generator
+ * @date 2021-05-13
+ */
+ FactPartyMemberVanguardAgencyDailyDTO get(String id);
+
+ /**
+ * 默认保存
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2021-05-13
+ */
+ void save(FactPartyMemberVanguardAgencyDailyDTO dto);
+
+ /**
+ * 默认更新
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2021-05-13
+ */
+ void update(FactPartyMemberVanguardAgencyDailyDTO dto);
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return void
+ * @author generator
+ * @date 2021-05-13
+ */
+ void delete(String[] ids);
+
+ /**
+ * 清除日数据
+ * @author zhaoqifeng
+ * @date 2021/5/17 15:55
+ * @param customerId
+ * @param dateId
+ * @return void
+ */
+ void deleteDailyData(String customerId, String dateId);
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactPartyMemberVanguardGridDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactPartyMemberVanguardGridDailyService.java
new file mode 100644
index 0000000000..bfe7d258ce
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactPartyMemberVanguardGridDailyService.java
@@ -0,0 +1,105 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service.stats;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.dto.stats.FactPartyMemberVanguardGridDailyDTO;
+import com.epmet.entity.stats.FactPartyMemberVanguardGridDailyEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 党员先锋-网格日统计数据
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-05-13
+ */
+public interface FactPartyMemberVanguardGridDailyService extends BaseService {
+
+ /**
+ * 默认分页
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2021-05-13
+ */
+ PageData page(Map params);
+
+ /**
+ * 默认查询
+ *
+ * @param params
+ * @return java.util.List
+ * @author generator
+ * @date 2021-05-13
+ */
+ List list(Map params);
+
+ /**
+ * 单条查询
+ *
+ * @param id
+ * @return FactPartyMemberVanguardGridDailyDTO
+ * @author generator
+ * @date 2021-05-13
+ */
+ FactPartyMemberVanguardGridDailyDTO get(String id);
+
+ /**
+ * 默认保存
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2021-05-13
+ */
+ void save(FactPartyMemberVanguardGridDailyDTO dto);
+
+ /**
+ * 默认更新
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2021-05-13
+ */
+ void update(FactPartyMemberVanguardGridDailyDTO dto);
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return void
+ * @author generator
+ * @date 2021-05-13
+ */
+ void delete(String[] ids);
+
+ /**
+ * 清除日数据
+ * @author zhaoqifeng
+ * @date 2021/5/17 15:55
+ * @param customerId
+ * @param dateId
+ * @return void
+ */
+ void deleteDailyData(String customerId, String dateId);
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactPartyMemberVanguardAgencyDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactPartyMemberVanguardAgencyDailyServiceImpl.java
new file mode 100644
index 0000000000..9c951b7b2f
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactPartyMemberVanguardAgencyDailyServiceImpl.java
@@ -0,0 +1,118 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service.stats.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.epmet.commons.dynamic.datasource.annotation.DataSource;
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.utils.ConvertUtils;
+import com.epmet.commons.tools.constant.FieldConstant;
+import com.epmet.constant.DataSourceConstant;
+import com.epmet.dao.stats.FactPartyMemberVanguardAgencyDailyDao;
+import com.epmet.dto.stats.FactPartyMemberVanguardAgencyDailyDTO;
+import com.epmet.entity.stats.FactPartyMemberVanguardAgencyDailyEntity;
+import com.epmet.service.stats.FactPartyMemberVanguardAgencyDailyService;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 党员先锋-机关日统计数据
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-05-13
+ */
+@Service
+@DataSource(DataSourceConstant.STATS)
+public class FactPartyMemberVanguardAgencyDailyServiceImpl extends BaseServiceImpl implements FactPartyMemberVanguardAgencyDailyService {
+
+
+ @Override
+ public PageData page(Map params) {
+ IPage page = baseDao.selectPage(
+ getPage(params, FieldConstant.CREATED_TIME, false),
+ getWrapper(params)
+ );
+ return getPageData(page, FactPartyMemberVanguardAgencyDailyDTO.class);
+ }
+
+ @Override
+ public List list(Map params) {
+ List entityList = baseDao.selectList(getWrapper(params));
+
+ return ConvertUtils.sourceToTarget(entityList, FactPartyMemberVanguardAgencyDailyDTO.class);
+ }
+
+ private QueryWrapper getWrapper(Map params){
+ String id = (String)params.get(FieldConstant.ID_HUMP);
+
+ QueryWrapper wrapper = new QueryWrapper<>();
+ wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
+
+ return wrapper;
+ }
+
+ @Override
+ public FactPartyMemberVanguardAgencyDailyDTO get(String id) {
+ FactPartyMemberVanguardAgencyDailyEntity entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, FactPartyMemberVanguardAgencyDailyDTO.class);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void save(FactPartyMemberVanguardAgencyDailyDTO dto) {
+ FactPartyMemberVanguardAgencyDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactPartyMemberVanguardAgencyDailyEntity.class);
+ insert(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(FactPartyMemberVanguardAgencyDailyDTO dto) {
+ FactPartyMemberVanguardAgencyDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactPartyMemberVanguardAgencyDailyEntity.class);
+ updateById(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delete(String[] ids) {
+ // 逻辑删除(@TableLogic 注解)
+ baseDao.deleteBatchIds(Arrays.asList(ids));
+ }
+
+ /**
+ * 清除日数据
+ *
+ * @param customerId
+ * @param dateId
+ * @return void
+ * @author zhaoqifeng
+ * @date 2021/5/17 15:55
+ */
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void deleteDailyData(String customerId, String dateId) {
+ baseDao.deleteDailyData(customerId, dateId);
+ }
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactPartyMemberVanguardGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactPartyMemberVanguardGridDailyServiceImpl.java
new file mode 100644
index 0000000000..235cf53e23
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactPartyMemberVanguardGridDailyServiceImpl.java
@@ -0,0 +1,118 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service.stats.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.epmet.commons.dynamic.datasource.annotation.DataSource;
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.commons.tools.constant.FieldConstant;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.utils.ConvertUtils;
+import com.epmet.constant.DataSourceConstant;
+import com.epmet.dao.stats.FactPartyMemberVanguardGridDailyDao;
+import com.epmet.dto.stats.FactPartyMemberVanguardGridDailyDTO;
+import com.epmet.entity.stats.FactPartyMemberVanguardGridDailyEntity;
+import com.epmet.service.stats.FactPartyMemberVanguardGridDailyService;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 党员先锋-网格日统计数据
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-05-13
+ */
+@Service
+@DataSource(DataSourceConstant.STATS)
+public class FactPartyMemberVanguardGridDailyServiceImpl extends BaseServiceImpl implements FactPartyMemberVanguardGridDailyService {
+
+
+ @Override
+ public PageData page(Map params) {
+ IPage page = baseDao.selectPage(
+ getPage(params, FieldConstant.CREATED_TIME, false),
+ getWrapper(params)
+ );
+ return getPageData(page, FactPartyMemberVanguardGridDailyDTO.class);
+ }
+
+ @Override
+ public List list(Map params) {
+ List entityList = baseDao.selectList(getWrapper(params));
+
+ return ConvertUtils.sourceToTarget(entityList, FactPartyMemberVanguardGridDailyDTO.class);
+ }
+
+ private QueryWrapper getWrapper(Map params){
+ String id = (String)params.get(FieldConstant.ID_HUMP);
+
+ QueryWrapper wrapper = new QueryWrapper<>();
+ wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
+
+ return wrapper;
+ }
+
+ @Override
+ public FactPartyMemberVanguardGridDailyDTO get(String id) {
+ FactPartyMemberVanguardGridDailyEntity entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, FactPartyMemberVanguardGridDailyDTO.class);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void save(FactPartyMemberVanguardGridDailyDTO dto) {
+ FactPartyMemberVanguardGridDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactPartyMemberVanguardGridDailyEntity.class);
+ insert(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(FactPartyMemberVanguardGridDailyDTO dto) {
+ FactPartyMemberVanguardGridDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactPartyMemberVanguardGridDailyEntity.class);
+ updateById(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delete(String[] ids) {
+ // 逻辑删除(@TableLogic 注解)
+ baseDao.deleteBatchIds(Arrays.asList(ids));
+ }
+
+ /**
+ * 清除日数据
+ *
+ * @param customerId
+ * @param dateId
+ * @return void
+ * @author zhaoqifeng
+ * @date 2021/5/17 15:55
+ */
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void deleteDailyData(String customerId, String dateId) {
+ baseDao.deleteDailyData(customerId, dateId);
+ }
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml
index 2f40e1de70..eeec0fa8e5 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml
@@ -350,5 +350,31 @@
AND customer_id = #{customerId}
+
+ SELECT
+ AGENCY_ID,
+ count( ID ) AS "sum",
+ sum(IF( IS_OWNER_PARTY = 1, 1, 0 )) AS "count"
+ FROM
+ fact_origin_group_main_daily
+ WHERE CUSTOMER_ID = #{customerId}
+ AND DATE_ID <= #{dateId}
+ AND (GROUP_STATE = 'approved' OR GROUP_STATE = 'hidden')
+ GROUP BY
+ AGENCY_ID
+
+
+ SELECT
+ GRID_ID AS "orgId",
+ count( ID ) AS "sum",
+ sum(IF( IS_OWNER_PARTY = 1, 1, 0 )) AS "count"
+ FROM
+ fact_origin_group_main_daily
+ WHERE CUSTOMER_ID = #{customerId}
+ AND DATE_ID <= #{dateId}
+ AND ( GROUP_STATE = 'approved' OR GROUP_STATE = 'hidden' )
+ GROUP BY
+ GRID_ID
+
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMemberDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMemberDailyDao.xml
index 1c0a1d4edb..c0fb2fb43c 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMemberDailyDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMemberDailyDao.xml
@@ -27,6 +27,50 @@
+
+ SELECT
+ a.AGENCY_ID,
+ COUNT( DISTINCT MEMBER_ID ) AS "sum",
+ IFNULL( b.partyCount, 0 ) AS "count"
+ FROM
+ fact_origin_group_member_daily a
+ LEFT JOIN
+ (SELECT
+ AGENCY_ID,
+ COUNT( DISTINCT MEMBER_ID ) AS partyCount
+ FROM fact_origin_group_member_daily
+ WHERE IS_PARTY = 1
+ AND CUSTOMER_ID = #{customerId}
+ AND DATE_ID <= #{dateId}
+ GROUP BY AGENCY_ID
+ ) b ON a.AGENCY_ID = b.AGENCY_ID
+ WHERE a.CUSTOMER_ID = #{customerId}
+ AND a.DATE_ID <= #{dateId}
+ GROUP BY
+ a.AGENCY_ID
+
+
+ SELECT
+ a.GRID_ID AS "orgId",
+ COUNT( DISTINCT MEMBER_ID ) AS "sum",
+ IFNULL( b.partyCount, 0 ) AS "count"
+ FROM
+ fact_origin_group_member_daily a
+ LEFT JOIN
+ (SELECT
+ GRID_ID,
+ COUNT( DISTINCT MEMBER_ID ) AS partyCount
+ FROM fact_origin_group_member_daily
+ WHERE IS_PARTY = 1
+ AND CUSTOMER_ID = #{customerId}
+ AND DATE_ID <= #{dateId}
+ GROUP BY GRID_ID
+ ) b ON a.GRID_ID = b.GRID_ID
+ WHERE a.CUSTOMER_ID = #{customerId}
+ AND a.DATE_ID <= #{dateId}
+ GROUP BY
+ a.GRID_ID
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueMainDailyDao.xml
index 42949df17b..259e46c150 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueMainDailyDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueMainDailyDao.xml
@@ -291,4 +291,24 @@
AND f.MONTH_ID = #{monthId}
GROUP BY f.AGENCY_ID
+
+ SELECT
+ AGENCY_ID,
+ COUNT(ID) AS "sum",
+ SUM(IF(IS_PARTY = 1 ,1, 0)) AS "count"
+ FROM fact_origin_issue_main_daily
+ WHERE CUSTOMER_ID = #{customerId}
+ AND DATE_ID <= #{dateId}
+ GROUP BY AGENCY_ID
+
+
+ SELECT
+ GRID_ID AS "orgId",
+ COUNT(ID) AS "sum",
+ SUM(IF(IS_PARTY = 1 ,1, 0)) AS "count"
+ FROM fact_origin_issue_main_daily
+ WHERE CUSTOMER_ID = #{customerId}
+ AND DATE_ID <= #{dateId}
+ GROUP BY GRID_ID
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml
index 18aa1d5123..92fe50a99c 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml
@@ -761,5 +761,47 @@
WHERE CUSTOMER_ID = #{customerId}
AND DEL_FLAG = '0'
+
+ SELECT
+ AGENCY_ID,
+ COUNT(ID) AS "sum",
+ SUM(IF(IS_PARTY = 1 ,1, 0)) AS "count"
+ FROM fact_origin_project_main_daily
+ WHERE CUSTOMER_ID = #{customerId}
+ AND DATE_ID <= #{dateId}
+ GROUP BY AGENCY_ID
+
+
+ SELECT
+ GRID_ID AS "orgId",
+ COUNT(ID) AS "sum",
+ SUM(IF(IS_PARTY = 1 ,1, 0)) AS "count"
+ FROM fact_origin_project_main_daily
+ WHERE CUSTOMER_ID = #{customerId}
+ AND DATE_ID <= #{dateId}
+ GROUP BY GRID_ID
+
+
+ SELECT
+ AGENCY_ID,
+ COUNT(ID) AS "sum",
+ SUM(IF(IS_PARTY = 1 ,1, 0)) AS "count"
+ FROM fact_origin_project_main_daily
+ WHERE CUSTOMER_ID = #{customerId}
+ AND DATE_ID <= #{dateId}
+ AND PROJECT_STATUS = 'closed'
+ GROUP BY AGENCY_ID
+
+
+ SELECT
+ GRID_ID AS "orgId",
+ COUNT(ID) AS "sum",
+ SUM(IF(IS_PARTY = 1 ,1, 0)) AS "count"
+ FROM fact_origin_project_main_daily
+ WHERE CUSTOMER_ID = #{customerId}
+ AND DATE_ID <= #{dateId}
+ AND PROJECT_STATUS = 'closed'
+ GROUP BY GRID_ID
+
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml
index a4f2d9bbaa..c8136df35a 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml
@@ -177,4 +177,24 @@
AND f.MONTH_ID = #{monthId}
GROUP BY f.AGENCY_ID
+
+ SELECT
+ AGENCY_ID,
+ COUNT(ID) as "sum",
+ SUM(IF(CREATE_TOPIC_USER_IS_PARTY = 1 ,1, 0)) as "count"
+ FROM fact_origin_topic_main_daily
+ WHERE CUSTOMER_ID = #{customerId}
+ AND DATE_ID <= #{dateId}
+ GROUP BY AGENCY_ID
+
+
+ SELECT
+ GRID_ID AS "orgId",
+ COUNT(ID) as "sum",
+ SUM(IF(CREATE_TOPIC_USER_IS_PARTY = 1 ,1, 0)) as "count"
+ FROM fact_origin_topic_main_daily
+ WHERE CUSTOMER_ID = #{customerId}
+ AND DATE_ID <= #{dateId}
+ GROUP BY GRID_ID
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactPartyMemberVanguardAgencyDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactPartyMemberVanguardAgencyDailyDao.xml
new file mode 100644
index 0000000000..f6de9644d1
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactPartyMemberVanguardAgencyDailyDao.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ delete from fact_party_member_vanguard_agency_daily where customer_id = #{customerId} and DATE_ID = #{dateId}
+
+
+
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactPartyMemberVanguardGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactPartyMemberVanguardGridDailyDao.xml
new file mode 100644
index 0000000000..311262a04f
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactPartyMemberVanguardGridDailyDao.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ delete from fact_party_member_vanguard_grid_daily where customer_id = #{customerId} and DATE_ID = #{dateId}
+
+
+
+
\ No newline at end of file