selectSubListByPath(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("allIndexCodePath") String allIndexCodePath);
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptSelfSubScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptSelfSubScoreDao.java
new file mode 100644
index 0000000000..a8b5b90a2b
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptSelfSubScoreDao.java
@@ -0,0 +1,39 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao.evaluationindex.indexcal;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.evaluationindex.indexcal.DeptSelfSubScoreEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 社区相关 自身/下级分数表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-09-21
+ */
+@Mapper
+public interface DeptSelfSubScoreDao extends BaseDao {
+
+ int deleteByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("parentIndexCode") String parentIndexCode);
+
+ int insertBatch(@Param("list") List deptSelfSubScoreEntities);
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptSubScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptSubScoreDao.java
index fe388c6b6b..c9ec728209 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptSubScoreDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptSubScoreDao.java
@@ -22,7 +22,6 @@ import com.epmet.entity.evaluationindex.indexcal.DeptSubScoreEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
-import javax.annotation.security.PermitAll;
import java.util.List;
/**
@@ -54,7 +53,9 @@ public interface DeptSubScoreDao extends BaseDao {
* @Date 2020/9/10 12:28
**/
int deleteBatches(@Param("customerId") String customerId,
- @Param("monthId") String monthId,
- @Param("allParentIndexCode") String allParentIndexCode,
- @Param("deleteSize") Integer deleteSize);
+ @Param("monthId") String monthId,
+ @Param("allParentIndexCode") String allParentIndexCode,
+ @Param("deleteSize") Integer deleteSize);
+
+ List selectSubListByPath(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("allIndexCodePath") String allIndexCodePath);
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java
index 927e157db0..2e047268de 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java
@@ -104,21 +104,6 @@ public interface FactIndexGovrnAblityGridMonthlyDao extends BaseDao selectAllGridInfo(String customerId);
- /**
- * @Description 查询全部网格信息
- * @param customerId
- * @author zxc
- * @date 2020/9/19 10:50 上午
- */
- List selectAllGridInfoToParty(String customerId);
-
/**
* @Description 批量插入治理能力
* @param lists
@@ -135,4 +120,14 @@ public interface FactIndexGovrnAblityGridMonthlyDao extends BaseDao
+ */
+ List selectGridByCustomer(@Param("customerId")String customerId, @Param("monthId")String monthId);
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCpcBaseDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCpcBaseDataDao.java
index c27f8b8857..716d9b2cfb 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCpcBaseDataDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCpcBaseDataDao.java
@@ -85,4 +85,12 @@ public interface ScreenCpcBaseDataDao extends BaseDao {
* @date 2020/9/23 2:01 下午
*/
List selectPartyInfo(@Param("customerId") String customerId,@Param("dateId") String dateId, String agencyId);
+
+ /**
+ * @Description 查询党员信息【直属网格的】
+ * @param gridIds
+ * @author zxc
+ * @date 2020/9/24 3:23 下午
+ */
+ List selectDirectGridPartyInfo(@Param("gridIds") List gridIds,@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/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java
index 65f2faf3b1..62ba836b5c 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java
@@ -19,7 +19,9 @@ package com.epmet.dao.evaluationindex.screen;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.extract.form.PartyBaseInfoFormDTO;
+import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO;
import com.epmet.dto.extract.result.CustomerAgencyInfoResultDTO;
+import com.epmet.dto.extract.result.OrgNameResultDTO;
import com.epmet.dto.screen.result.TreeResultDTO;
import com.epmet.dto.screencoll.form.CustomerAgencyFormDTO;
import com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity;
@@ -152,4 +154,21 @@ public interface ScreenCustomerAgencyDao extends BaseDao selectAllAgencyIdToParty(@Param("customerId")String customerId,@Param("dateId")String dateId);
+
+ /**
+ * @Description 查询客户下所有机关ID
+ * @Param customerId
+ * @Param monthId
+ * @author zxc
+ * @date 2020/9/25 10:39 上午
+ */
+ List selectAllAgencyIdToPartyLinkMessage(String customerId, String monthId);
+
+ /**
+ * @Description 查询org名称【机关】
+ * @param agencyIds
+ * @author zxc
+ * @date 2020/9/24 1:27 下午
+ */
+ List selectOrgNameAgency(@Param("agencyIds") List agencyIds);
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java
index 28338f0da7..d917f62ffb 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java
@@ -19,7 +19,12 @@ package com.epmet.dao.evaluationindex.screen;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.ScreenCustomerGridDTO;
+import com.epmet.dto.extract.form.GovernAbilityGridMonthlyFormDTO;
+import com.epmet.dto.extract.form.PartyAbilityGridMonthlyFormDTO;
import com.epmet.dto.extract.form.PartyBaseInfoFormDTO;
+import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO;
+import com.epmet.dto.extract.result.GridInfoResultDTO;
+import com.epmet.dto.extract.result.OrgNameResultDTO;
import com.epmet.dto.indexcal.PageQueryGridFormDTO;
import com.epmet.dto.screencoll.form.CustomerGridFormDTO;
import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity;
@@ -138,4 +143,45 @@ public interface ScreenCustomerGridDao extends BaseDao
* @date 2020/9/23 3:10 下午
*/
List selectAllGridIdToParty(String customerId, String dateId);
+
+ /**
+ * @Description 查询客户下所有网格ID
+ * @Param customerId
+ * @Param monthId
+ * @author zxc
+ * @date 2020/9/25 10:43 上午
+ */
+ List selectAllGridIdToPartyLinkMessage(@Param("customerId") String customerId,@Param("monthId") String monthId);
+
+ /**
+ * @Description 查询org名称
+ * @param gridIds
+ * @author zxc
+ * @date 2020/9/24 1:27 下午
+ */
+ List selectOrgName(@Param("gridIds") List gridIds);
+
+ /**
+ * @Description 查询机关的直属网格
+ * @param agencyIds
+ * @author zxc
+ * @date 2020/9/24 2:33 下午
+ */
+ List selectDirectGrid(@Param("agencyIds") List agencyIds);
+
+ /**
+ * @Description 查询全部网格信息
+ * @param customerId
+ * @author zxc
+ * @date 2020/9/19 10:50 上午
+ */
+ List selectAllGridInfoToParty(String customerId);
+
+ /**
+ * @Description 查询全部网格信息
+ * @param customerId
+ * @author zxc
+ * @date 2020/9/18 10:47 上午
+ */
+ List selectAllGridInfo(@Param("customerId") String customerId);
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenGovernRankDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenGovernRankDataDao.java
index 24e3d65a09..d40a702dbe 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenGovernRankDataDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenGovernRankDataDao.java
@@ -56,4 +56,23 @@ public interface ScreenGovernRankDataDao extends BaseDao list, @Param("customerId")String customerId);
+
+ /**
+ * 组织级别初始化数据
+ * @author zhaoqifeng
+ * @date 2020/9/24 14:52
+ * @param customerId
+ * @param level
+ * @return java.util.List
+ */
+ List initAgencyDataList(@Param("customerId") String customerId, @Param("level") String level);
+
+ /**
+ * 网格级别初始化数据
+ * @author zhaoqifeng
+ * @date 2020/9/24 14:52
+ * @param customerId
+ * @return java.util.List
+ */
+ List initGridDataList(@Param("customerId") String customerId);
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyBranchDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyBranchDataDao.java
index 385f27d2f9..8c5211cefc 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyBranchDataDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyBranchDataDao.java
@@ -18,6 +18,7 @@
package com.epmet.dao.evaluationindex.screen;
import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.extract.form.ScreenPartyBranchDataFormDTO;
import com.epmet.dto.screencoll.form.PartyBranchDataFormDTO;
import com.epmet.entity.evaluationindex.screen.ScreenPartyBranchDataEntity;
import org.apache.ibatis.annotations.Mapper;
@@ -56,4 +57,12 @@ public interface ScreenPartyBranchDataDao extends BaseDao list, @Param("customerId")String customerId);
+
+ /**
+ * @Description 插入建设情况数据
+ * @param lists
+ * @author zxc
+ * @date 2020/9/25 9:16 上午
+ */
+ void insertScreenPartyBranchData(@Param("lists") List lists);
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java
index 857958ad1c..586ab1d0a8 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java
@@ -18,6 +18,7 @@
package com.epmet.dao.evaluationindex.screen;
import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO;
import com.epmet.dto.screencoll.form.PartyLinkMassesDataFormDTO;
import com.epmet.entity.evaluationindex.screen.ScreenPartyLinkMassesDataEntity;
import org.apache.ibatis.annotations.Mapper;
@@ -55,4 +56,32 @@ public interface ScreenPartyLinkMassesDataDao extends BaseDao list, @Param("customerId")String customerId);
+
+ /**
+ * @Description 批量插入党员联系群众数据
+ * @param lists
+ * @author zxc
+ * @date 2020/9/24 6:06 下午
+ */
+ void insertScreenPartyLinkMassesData(@Param("lists")List lists);
+
+ /**
+ * @Description 删除旧的党员联系群众
+ * @param customerId
+ * @param monthId
+ * @param orgIds
+ * @author zxc
+ * @date 2020/9/22 3:28 下午
+ */
+ Integer deleteOldPartyLinkInfo(@Param("customerId") String customerId,@Param("monthId") String monthId,@Param("orgIds") List orgIds);
+
+ /**
+ * @Description 查询党员联系群众信息
+ * @Param customerId
+ * @Param monthId
+ * @Param agencyId
+ * @author zxc
+ * @date 2020/9/25 1:19 下午
+ */
+ List selectPartyLinkMassesInfo(@Param("customerId")String customerId,@Param("monthId") String monthId,@Param("agencyId") String agencyId);
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPioneerDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPioneerDataDao.java
index becb9d1034..daeb4c7443 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPioneerDataDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPioneerDataDao.java
@@ -43,10 +43,24 @@ public interface ScreenPioneerDataDao extends BaseDao {
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
+ Integer deletePioneerDataByCustomerId(@Param("customerId") String customerId,
+ @Param("deleteSize") Integer deleteSize);
+
+
+ /**
+ * @return java.lang.Integer
+ * @param customerId
+ * @param orgType
+ * @param deleteSize
+ * @param orgIds
+ * @author yinzuomei
+ * @description 产品客户采集用删除方法
+ * @Date 2020/9/24 14:59
+ **/
Integer deletePioneerData(@Param("customerId") String customerId,
@Param("orgType") String orgType,
- @Param("dataEndTime")String dataEndTime,
- @Param("deleteSize") Integer deleteSize);
+ @Param("deleteSize") Integer deleteSize,
+ @Param("orgIds")List orgIds);
/**
* 10、党建引领-先锋模范数据
@@ -71,12 +85,20 @@ public interface ScreenPioneerDataDao extends BaseDao {
/**
* @return java.util.List
* @param customerId
- * @param agencyLevel
* @author yinzuomei
- * @description 初始化好orgType="agency"的插入对象
+ * @description 初始化好社区, orgType="agency"的插入对象
* @Date 2020/9/22 15:03
**/
- List initAgencyPioneerDataList(@Param("customerId")String customerId, @Param("agencyLevel")String agencyLevel);
+ List initCommunityPioneerDataList(@Param("customerId")String customerId);
+
+ /**
+ * @return java.util.List
+ * @param customerId
+ * @author yinzuomei
+ * @description 初始化好非社区的, orgType="agency"的插入对象
+ * @Date 2020/9/24 13:45
+ **/
+ List initExceptCommunityPioneerDataList(@Param("customerId")String customerId);
/**
* @return void
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserTotalDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserTotalDataDao.java
index f09189dce0..2456d0d93a 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserTotalDataDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserTotalDataDao.java
@@ -55,4 +55,6 @@ public interface ScreenUserTotalDataDao extends BaseDao list, @Param("customerId")String customerId);
+
+ void insertBatch(@Param("list") List list);
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimCustomerPartymemberDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimCustomerPartymemberDao.java
index 22129567a5..0d614b2e4a 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimCustomerPartymemberDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimCustomerPartymemberDao.java
@@ -76,8 +76,28 @@ public interface DimCustomerPartymemberDao extends BaseDao selectGridPartyMemberUserIds(@Param("customerId") String customerId, @Param("gridId")String gridId);
+
+ /**
+ * @return java.util.List
+ * @param customerId
+ * @param communityId
+ * @author yinzuomei
+ * @description 社区内注册的党员
+ * @Date 2020/9/24 10:22
+ **/
+ List selectCommunityPartyMemberUserIds(@Param("customerId") String customerId, @Param("communityId")String communityId);
+
+ /**
+ * @return java.util.List
+ * @param customerId
+ * @param pids
+ * @author yinzuomei
+ * @description 根据pids查询党员
+ * @Date 2020/9/24 14:31
+ **/
+ List selectPartyMemberUserIdsByPids(@Param("customerId") String customerId, @Param("pids")String pids);
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyProjectDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyProjectDailyDao.java
index 2fbabdec6c..87409a6607 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyProjectDailyDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyProjectDailyDao.java
@@ -19,8 +19,10 @@ package com.epmet.dao.stats;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.project.form.MonthProjectListFormDTO;
+import com.epmet.entity.evaluationindex.screen.ScreenUserTotalDataEntity;
import com.epmet.entity.stats.FactAgencyProjectDailyEntity;
import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -46,4 +48,16 @@ public interface FactAgencyProjectDailyDao extends BaseDao selectProjectCountByOrgLevel(@Param("orgLevel") String orgLevel, @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/FactGroupGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGroupGridDailyDao.java
index c97f5c8120..5dfd4bc79d 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGroupGridDailyDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGroupGridDailyDao.java
@@ -19,11 +19,13 @@ package com.epmet.dao.stats;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.group.result.GroupGridDailyResultDTO;
+import com.epmet.entity.evaluationindex.screen.ScreenUserTotalDataEntity;
import com.epmet.entity.stats.FactGroupGridDailyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
+import java.util.Map;
/**
* 组-网格日统计数据
@@ -47,5 +49,15 @@ public interface FactGroupGridDailyDao extends BaseDao
* @author zxc
*/
void deleteInsertDateId(@Param("dateId")String dateId,@Param("customerId")String customerId);
-
+
+ /**
+ * @Description 根据机关级别查询小组数据
+ * @param orgLevel
+ * @param customerId
+ * @param dateId
+ * @return
+ * @author wangc
+ * @date 2020.09.24 16:19
+ **/
+ List selectGroupCountByOrgLevel(@Param("orgLevel") String orgLevel, @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/FactIssueGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactIssueGridDailyDao.java
index 595131257d..c26edcd375 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactIssueGridDailyDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactIssueGridDailyDao.java
@@ -18,10 +18,13 @@
package com.epmet.dao.stats;
import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.evaluationindex.screen.ScreenUserTotalDataEntity;
import com.epmet.entity.stats.FactIssueGridDailyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
+import java.util.List;
+
/**
* 网格议题数量(按日)
*
@@ -39,5 +42,16 @@ public interface FactIssueGridDailyDao extends BaseDao
* @return void
*/
void deleteByCustomerId(@Param("customerId") String customerId, @Param("dateId") String dateId);
+
+ /**
+ * @Description 根据机关类型查询议题数据
+ * @param orgLevel
+ * @param customerId
+ * @param dateId
+ * @return
+ * @author wangc
+ * @date 2020.09.24 17:19
+ **/
+ List selectIssueCountByOrgLevel(@Param("orgLevel") String orgLevel, @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/topic/FactTopicTotalGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/topic/FactTopicTotalGridDailyDao.java
index 7276945b90..7a0e6439df 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/topic/FactTopicTotalGridDailyDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/topic/FactTopicTotalGridDailyDao.java
@@ -19,6 +19,7 @@ package com.epmet.dao.stats.topic;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.stats.topic.FactTopicTotalGridDailyDTO;
+import com.epmet.entity.evaluationindex.screen.ScreenUserTotalDataEntity;
import com.epmet.entity.stats.topic.FactTopicTotalGridDailyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -36,4 +37,15 @@ public interface FactTopicTotalGridDailyDao extends BaseDao list);
void deleteByParams(@Param("dateId")String dateId,@Param("customerId")String customerId);
+
+ /**
+ * @Description 根据机关类型查询话题数据
+ * @param orgLevel
+ * @param customerId
+ * @param dateId
+ * @return
+ * @author wangc
+ * @date 2020.09.24 17:19
+ **/
+ List selectTopicCountByOrgLevel(@Param("orgLevel") String orgLevel, @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/user/FactParticipationUserGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactParticipationUserGridDailyDao.java
index 248efe22a6..cd84b6d3b0 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactParticipationUserGridDailyDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactParticipationUserGridDailyDao.java
@@ -20,6 +20,7 @@ package com.epmet.dao.stats.user;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.extract.result.UserCountResultDTO;
import com.epmet.dto.stats.user.FactParticipationUserGridDailyDTO;
+import com.epmet.entity.evaluationindex.screen.ScreenUserTotalDataEntity;
import com.epmet.entity.stats.user.FactParticipationUserGridDailyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -48,4 +49,12 @@ public interface FactParticipationUserGridDailyDao extends BaseDao selectUserCount(String customerId, String dateId);
+ /**
+ * @Description 根据机构级别查询用户数与党员数
+ * @param orgLevel
+ * @return
+ * @author wangc
+ * @date 2020.09.24 14:59
+ **/
+ List selectUserAndPartymemberByOrgLevel(@Param("orgLevel") String orgLevel,@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/evaluationindex/indexcal/AgencySubScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencySubScoreEntity.java
index 8b87b26a4e..3fc2a5888b 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencySubScoreEntity.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencySubScoreEntity.java
@@ -96,4 +96,9 @@ public class AgencySubScoreEntity extends BaseEpmetEntity {
* 权重(同一组权重总和=1)
*/
private BigDecimal weight;
+
+ /**
+ * 所有指标code拼接的字符串 冒号隔开
+ */
+ private String allParentIndexCode;
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptSelfSubScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptSelfSubScoreEntity.java
new file mode 100644
index 0000000000..7e5395450f
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptSelfSubScoreEntity.java
@@ -0,0 +1,100 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.entity.evaluationindex.indexcal;
+
+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 2020-09-23
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("fact_index_dept_self_sub_score")
+public class DeptSelfSubScoreEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户Id
+ */
+ private String customerId;
+
+ /**
+ * 部门id
+ */
+ private String deptId;
+
+ /**
+ * 组织id
+ */
+ private String agencyId;
+
+ /**
+ * 年度ID: yyyy
+ */
+ private String yearId;
+
+ /**
+ * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4
+ */
+ private String quarterId;
+
+ /**
+ * 月维度Id: yyyyMM
+ */
+ private String monthId;
+
+ /**
+ * 自身指标得分
+ */
+ private BigDecimal selfScore;
+
+ /**
+ * 下级指标得分
+ */
+ private BigDecimal subScore;
+
+ /**
+ * 党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;
+ */
+ private String parentIndexCode;
+
+ /**
+ * 所有指标code拼接的字符串 冒号隔开
+ */
+ private String allParentIndexCode;
+
+ /**
+ * 自身指标权重
+ */
+ private BigDecimal selfWeight;
+
+ /**
+ * 下级指标权重
+ */
+ private BigDecimal subWeight;
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java
index a51b8b6449..c03d32f1df 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java
@@ -117,4 +117,11 @@ public class ScreenPioneerDataEntity extends BaseEpmetEntity {
*/
private String dataEndTime;
+
+ /**
+ *
+ */
+ private String pid;
+ private String agencyPids;
+ private String agencyPath;
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalGridIndexServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalGridIndexServiceImpl.java
index 5e69ff1c2d..9a9b0c0aa1 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalGridIndexServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalGridIndexServiceImpl.java
@@ -15,6 +15,7 @@ import com.epmet.service.evaluationindex.extract.todata.*;
import com.epmet.service.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyService;
import com.epmet.service.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyService;
import com.epmet.service.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyService;
+import com.epmet.service.evaluationindex.screen.ScreenCustomerGridService;
import com.epmet.service.heart.ActInfoService;
import com.epmet.service.partymember.PartyMemberService;
import com.epmet.service.stats.FactArticlePublishedGridDailyService;
@@ -74,6 +75,8 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
private UserService userService;
@Autowired
private PartyMemberService partyMemberService;
+ @Autowired
+ private ScreenCustomerGridService gridService;
/**
* @Description 计算网格指标党建能力
@@ -84,7 +87,7 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
*/
@Override
public Boolean calGridIndexPartyAbility(String customerId, String monthId) {
- List result = governAbilityDao.selectAllGridInfoToParty(customerId);
+ List result = gridService.selectAllGridInfoToParty(customerId);
if (CollectionUtils.isEmpty(result)){
log.warn(String.format(ExtractConstant.CUSTOMER_INFO_NULL,customerId));
return true;
@@ -239,7 +242,7 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
@Override
public Boolean calGridIndexGovernAbility(String customerId, String monthId) {
- List result = governAbilityDao.selectAllGridInfo(customerId);
+ List result = gridService.selectAllGridInfo(customerId);
if (CollectionUtils.isEmpty(result)){
log.warn(String.format(ExtractConstant.CUSTOMER_INFO_NULL,customerId));
return true;
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 bf40ac8388..fdaac9d36e 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
@@ -19,6 +19,7 @@ package com.epmet.service.evaluationindex.extract.todata;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.dto.extract.FactOriginGroupMainDailyDTO;
+import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO;
import com.epmet.dto.group.result.ExtractGroupMemberActionRecordResultDTO;
import com.epmet.entity.evaluationindex.extract.FactOriginGroupMainDailyEntity;
@@ -62,4 +63,13 @@ public interface FactOriginGroupMainDailyService extends BaseService originGroupData,List memberList);
+
+ /**
+ * @Description 查询党员建组信息
+ * @param customerId
+ * @param monthId
+ * @author zxc
+ * @date 2020/9/25 9:46 上午
+ */
+ List selectPartyCreateGroupInfo(String customerId,String monthId,List gridIds);
}
\ 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 7061178362..8afc53cd16 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
@@ -20,8 +20,6 @@ package com.epmet.service.evaluationindex.extract.todata;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.entity.evaluationindex.extract.FactOriginIssueMainDailyEntity;
-import java.util.List;
-
/**
* 议题主表
*
@@ -33,29 +31,59 @@ public interface FactOriginIssueMainDailyService extends BaseService partyMemberUserIds);
+ int getParyPublishIssueTotal(String customerId,String gridId,String agencyId);
+
/**
- * @return int
+ * @return java.lang.Integer
* @param customerId
* @param gridId
* @author yinzuomei
- * @description 具体某个网格的议题总数
- * @Date 2020/9/23 15:22
+ * @description 网格内议题转项目数
+ * @Date 2020/9/23 15:39
+ **/
+ Integer getGridOrCommunityShiftProjectTotal(String customerId, String gridId,String communityId);
+
+ /**
+ * @return int
+ * @param customerId
+ * @param communityId
+ * @author yinzuomei
+ * @description 某个网格内或者社区内议题总数
+ * @Date 2020/9/24 10:45
**/
- int getGridIssueTotalByGrid(String customerId, String gridId);
+ int getGridOrCommunityIssueTotal(String customerId, String gridId,String communityId);
/**
* @return java.lang.Integer
* @param customerId
- * @param gridId
+ * @param agencyPath
* @author yinzuomei
- * @description 网格内议题转项目数
- * @Date 2020/9/23 15:39
+ * @description 组织内: 党员发布议题
+ * @Date 2020/9/24 16:23
+ **/
+ Integer getAgencyParyPublishIssueTotal(String customerId, String agencyPath);
+
+ /**
+ * @return int
+ * @param customerId
+ * @param agencyPath
+ * @author yinzuomei
+ * @description 组织内:所有议题总数
+ * @Date 2020/9/24 16:26
+ **/
+ int getAgencyIssueTotal(String customerId, String agencyPath);
+
+ /**
+ * @return java.lang.Integer
+ * @param customerId
+ * @param agencyPath
+ * @author yinzuomei
+ * @description 组织下:议题转项目数
+ * @Date 2020/9/24 17:04
**/
- Integer getShiftProjectTotalByGrid(String customerId, String gridId);
+ Integer getAgencyShiftProjectTotal(String customerId, String agencyPath);
}
\ 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 ea2679c372..9440cf9bc8 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
@@ -173,5 +173,16 @@ public interface FactOriginProjectMainDailyService extends BaseService partyMemberUserIds);
+ int calPublishedByPartyTopicCount(String customerId,String gridId,String agencyId);
/**
* @return int
* @param customerId
* @param gridId
* @author yinzuomei
- * @description 具体某个网格的话题数
+ * @description 具体某个网格或者社区的话题数
* @Date 2020/9/23 14:22
**/
- int calGridTopicTotalByGrid(String customerId, String gridId);
+ int calGridOrCommunityTopicTotal(String customerId, String gridId,String communityId);
+
+ /**
+ * @return java.lang.Integer
+ * @param customerId
+ * @param agencyPath
+ * @param createTopicUserIsParty 1是党员
+ * @author yinzuomei
+ * @description 在当前组织下,话题总数(createTopicUserIsParty=1时查询党员发布的话题总数)
+ * @Date 2020/9/24 15:49
+ **/
+ Integer getAgencyPartyTopicTotal(String customerId, String agencyPath,String createTopicUserIsParty);
}
\ 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 ed5aeca1a1..4cc0ebb248 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMainDailyServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMainDailyServiceImpl.java
@@ -21,13 +21,16 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.dao.evaluationindex.extract.FactOriginGroupMainDailyDao;
import com.epmet.dto.extract.FactOriginGroupMainDailyDTO;
+import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO;
import com.epmet.dto.group.result.ExtractGroupMemberActionRecordResultDTO;
import com.epmet.entity.evaluationindex.extract.FactOriginGroupMainDailyEntity;
import com.epmet.service.evaluationindex.extract.todata.FactOriginGroupMainDailyService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
+import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
@@ -97,4 +100,19 @@ public class FactOriginGroupMainDailyServiceImpl extends BaseServiceImpl selectPartyCreateGroupInfo(String customerId, String monthId,List gridIds) {
+ if (!CollectionUtils.isEmpty(gridIds)){
+ return baseDao.selectPartyCreateGroupInfo(customerId, monthId, gridIds);
+ }
+ return new ArrayList<>();
+ }
+
}
\ 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 78d9434cd1..c67d2d8151 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,16 +19,12 @@ 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.dao.evaluationindex.extract.FactOriginIssueMainDailyDao;
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.util.List;
/**
* 议题主表
@@ -44,43 +40,78 @@ public class FactOriginIssueMainDailyServiceImpl extends BaseServiceImpl partyMemberUserIds) {
- if(CollectionUtils.isEmpty(partyMemberUserIds)){
- return NumConstant.ZERO;
- }
- return baseDao.getParyPublishIssueTotal(customerId,partyMemberUserIds);
+ public int getParyPublishIssueTotal(String customerId,String gridId,String agencyId) {
+ return baseDao.getParyPublishIssueTotal(customerId,gridId,agencyId);
}
/**
* @param customerId
* @param gridId
+ * @return java.lang.Integer
+ * @author yinzuomei
+ * @description 网格内议题转项目数
+ * @Date 2020/9/23 15:39
+ **/
+ @Override
+ public Integer getGridOrCommunityShiftProjectTotal(String customerId, String gridId,String communityId) {
+ return baseDao.getGridOrCommunityShiftProjectTotal(customerId,gridId,communityId);
+ }
+
+ /**
+ * @param customerId
+ * @param communityId
* @return int
* @author yinzuomei
- * @description 具体某个网格的议题总数
- * @Date 2020/9/23 15:22
+ * @description 网格内或者社区内议题总数
+ * @Date 2020/9/24 10:45
**/
@Override
- public int getGridIssueTotalByGrid(String customerId, String gridId) {
- return baseDao.getGridIssueTotalByGrid(customerId,gridId);
+ public int getGridOrCommunityIssueTotal(String customerId, String gridId,String communityId) {
+ return baseDao.getGridOrCommunityIssueTotal(customerId,gridId,communityId);
}
/**
* @param customerId
- * @param gridId
+ * @param agencyPath
* @return java.lang.Integer
* @author yinzuomei
- * @description 网格内议题转项目数
- * @Date 2020/9/23 15:39
+ * @description 组织内: 党员发布议题
+ * @Date 2020/9/24 16:23
+ **/
+ @Override
+ public Integer getAgencyParyPublishIssueTotal(String customerId, String agencyPath) {
+ return baseDao.getAgencyParyPublishIssueTotal(customerId,agencyPath);
+ }
+
+ /**
+ * @param customerId
+ * @param agencyPath
+ * @return int
+ * @author yinzuomei
+ * @description 组织内:所有议题总数
+ * @Date 2020/9/24 16:26
+ **/
+ @Override
+ public int getAgencyIssueTotal(String customerId, String agencyPath) {
+ return baseDao.getAgencyIssueTotal(customerId,agencyPath);
+ }
+
+ /**
+ * @param customerId
+ * @param agencyPath
+ * @return java.lang.Integer
+ * @author yinzuomei
+ * @description 组织下:议题转项目数
+ * @Date 2020/9/24 17:04
**/
@Override
- public Integer getShiftProjectTotalByGrid(String customerId, String gridId) {
- return baseDao.getShiftProjectTotalByGrid(customerId,gridId);
+ public Integer getAgencyShiftProjectTotal(String customerId, String agencyPath) {
+ return baseDao.getAgencyShiftProjectTotal(customerId,agencyPath);
}
}
\ 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 f38a04aefc..68bea2819d 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
@@ -181,7 +181,21 @@ public class FactOriginProjectMainDailyServiceImpl extends BaseServiceImpl updateTopicOriginInfoList) {
- //批量更新
- List> partition = ListUtils.partition(updateTopicOriginInfoList, IndexCalConstant.INSERT_SIZE);
- partition.forEach(list -> {
- baseDao.updateFactOriginTopicMain(list);
+ updateTopicOriginInfoList.forEach(topicOriginInfoDTO -> {
+ baseDao.updateFactOriginTopicMain(topicOriginInfoDTO.getTopicId(),
+ topicOriginInfoDTO.getTopicStatus(),
+ topicOriginInfoDTO.getClosedStatus());
});
}
@@ -277,18 +277,14 @@ public class FactOriginTopicMainDailyServiceImpl extends BaseServiceImpl partyMemberUserIds) {
- if(CollectionUtils.isEmpty(partyMemberUserIds)){
- return NumConstant.ZERO;
- }
- return baseDao.selectPublishedByPartyTopicCount(customerId,partyMemberUserIds);
+ public int calPublishedByPartyTopicCount(String customerId,String gridId,String agencyId) {
+ return baseDao.selectPublishedByPartyTopicCount(customerId,gridId,agencyId);
}
/**
@@ -296,11 +292,25 @@ public class FactOriginTopicMainDailyServiceImpl extends BaseServiceImpl {
if (r.getAgencyId().equals(pid.getAgencyId())){
r.setPid(pid.getPid());
- r.setPids(pid.getPids());
+ r.setPids(pid.getPids().concat(":").concat(pid.getPid()));
}
});
});
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/GovernRankDataExtractService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/GovernRankDataExtractService.java
new file mode 100644
index 0000000000..0d44c2143e
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/GovernRankDataExtractService.java
@@ -0,0 +1,41 @@
+package com.epmet.service.evaluationindex.extract.toscreen;
+
+/**
+ * @author zhaoqifeng
+ * @dscription
+ * @date 2020/9/24 14:28
+ */
+public interface GovernRankDataExtractService {
+ /**
+ * 网格治理能力
+ *
+ * @param customerId
+ * @param monthId
+ * @return void
+ * @author zhaoqifeng
+ * @date 2020/9/24 15:16
+ */
+ void extractGridData(String customerId, String monthId);
+
+ /**
+ * 社区治理能力
+ *
+ * @param customerId
+ * @param monthId
+ * @return void
+ * @author zhaoqifeng
+ * @date 2020/9/24 15:17
+ */
+ void extractCommunityData(String customerId, String monthId);
+
+ /**
+ * 街道治理能力
+ *
+ * @param customerId
+ * @param monthId
+ * @return void
+ * @author zhaoqifeng
+ * @date 2020/9/24 15:17
+ */
+ void extractStreetData(String customerId, String monthId);
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/PartyGuideService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/PartyGuideService.java
new file mode 100644
index 0000000000..8700a2b7e2
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/PartyGuideService.java
@@ -0,0 +1,18 @@
+package com.epmet.service.evaluationindex.extract.toscreen;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/9/24 5:05 下午
+ */
+public interface PartyGuideService {
+
+ /**
+ * @Description 党建引领抽取
+ * @param customerId
+ * @param monthId
+ * @author zxc
+ * @date 2020/9/24 5:10 下午
+ */
+ Boolean partyGuideExtract(String customerId,String monthId);
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/PioneerDataExtractService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/PioneerDataExtractService.java
index 7aadba0ae5..0b8384a024 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/PioneerDataExtractService.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/PioneerDataExtractService.java
@@ -26,11 +26,5 @@ public interface PioneerDataExtractService {
// 社区、街道、区县、市级别、省级
void extractCommunityPioneerData(String customerId, String dateId);
- void extractStreetPioneerData(String customerId, String dateId);
-
- void extractDistrictPioneerData(String customerId, String dateId);
-
- void extractCityPioneerData(String customerId, String dateId);
-
- void extractProvincePioneerData(String customerId, String dateId);
+ void extractExceptCommunityPioneerData(String customerId, String dateId);
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/PublicPartExtractService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/PublicPartExtractService.java
new file mode 100644
index 0000000000..388559649d
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/PublicPartExtractService.java
@@ -0,0 +1,32 @@
+package com.epmet.service.evaluationindex.extract.toscreen;
+
+/**
+ * @desc: 大屏 公众参与抽取服务接口
+ * @Author: LiuJanJun
+ * @Date: 2020/9/25 10:03 上午
+ * @Version: 1.0
+ */
+public interface PublicPartExtractService {
+
+ /**
+ * desc: 抽取公众参与 人均议题 总次数和平均参与度
+ * target:screen_user_join
+ *
+ * @param
+ * @return java.lang.Boolean
+ * @author LiuJanJun
+ * @date 2020/9/25 10:24 上午
+ */
+ Boolean extractTotalDataMonthly();
+
+ /**
+ * desc: 抽取公众参与 各类总数
+ * target:screen_public_parti_total_data
+ *
+ * @param
+ * @return java.lang.Boolean
+ * @author LiuJanJun
+ * @date 2020/9/25 10:24 上午
+ */
+ Boolean extractPerTotalDataDaily();
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/ScreenCentralZoneDataAbsorptionService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/ScreenCentralZoneDataAbsorptionService.java
new file mode 100644
index 0000000000..7c11d3acb3
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/ScreenCentralZoneDataAbsorptionService.java
@@ -0,0 +1,19 @@
+package com.epmet.service.evaluationindex.extract.toscreen;
+
+import com.epmet.dto.screen.form.ScreenCentralZoneDataFormDTO;
+
+/**
+ * 大屏中央区数据写入
+ * */
+
+public interface ScreenCentralZoneDataAbsorptionService {
+
+ /**
+ * @Description 中央区数据写入
+ * @param param
+ * @return
+ * @author wangc
+ * @date 2020.09.24 10:41
+ **/
+ void centralZoneDataHub(ScreenCentralZoneDataFormDTO param);
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/ScreenExtractService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/ScreenExtractService.java
new file mode 100644
index 0000000000..70ff60bff3
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/ScreenExtractService.java
@@ -0,0 +1,19 @@
+package com.epmet.service.evaluationindex.extract.toscreen;
+
+import com.epmet.dto.extract.form.ExtractFormDTO;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/9/24 9:57 上午
+ */
+public interface ScreenExtractService {
+
+ /**
+ * @Description 抽取数据到大屏【天】
+ * @param extractFormDTO
+ * @author zxc
+ * @date 2020/9/24 10:15 上午
+ */
+ void extractDailyAll(ExtractFormDTO extractFormDTO);
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/ScreenOrgService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/ScreenOrgService.java
new file mode 100644
index 0000000000..bb177bd877
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/ScreenOrgService.java
@@ -0,0 +1,32 @@
+package com.epmet.service.evaluationindex.extract.toscreen;
+
+/**
+ * @desc: 大屏 产品内部客户组织结构数据
+ * @Author: LiuJanJun
+ * @Date: 2020/9/25 10:03 上午
+ * @Version: 1.0
+ */
+public interface ScreenOrgService {
+
+ /**
+ * desc: 抽取公众参与 人均议题 总次数和平均参与度
+ * target:screen_user_join
+ *
+ * @param
+ * @return java.lang.Boolean
+ * @author LiuJanJun
+ * @date 2020/9/25 10:24 上午
+ */
+ Boolean getInnerCustomerAgencyTree();
+
+ /**
+ * desc: 抽取公众参与 各类总数
+ * target:screen_public_parti_total_data
+ *
+ * @param
+ * @return java.lang.Boolean
+ * @author LiuJanJun
+ * @date 2020/9/25 10:24 上午
+ */
+ Boolean extractPerTotalDataDaily();
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/GovernRankDataExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/GovernRankDataExtractServiceImpl.java
new file mode 100644
index 0000000000..58e149d6fd
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/GovernRankDataExtractServiceImpl.java
@@ -0,0 +1,64 @@
+package com.epmet.service.evaluationindex.extract.toscreen.impl;
+
+import com.epmet.commons.tools.constant.NumConstant;
+import com.epmet.constant.OrgTypeConstant;
+import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyDao;
+import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyEntity;
+import com.epmet.entity.evaluationindex.screen.ScreenGovernRankDataEntity;
+import com.epmet.service.evaluationindex.extract.toscreen.GovernRankDataExtractService;
+import com.epmet.service.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyService;
+import com.epmet.service.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyService;
+import com.epmet.service.evaluationindex.screen.ScreenGovernRankDataService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.CollectionUtils;
+
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.List;
+
+/**
+ * @author zhaoqifeng
+ * @dscription
+ * @date 2020/9/24 14:31
+ */
+public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractService {
+ @Autowired
+ private ScreenGovernRankDataService screenGovernRankDataService;
+ @Autowired
+ private FactIndexGovrnAblityOrgMonthlyService factIndexGovrnAblityOrgMonthlyService;
+ @Autowired
+ private FactIndexGovrnAblityGridMonthlyService factIndexGovrnAblityGridMonthlyService;
+
+ @Override
+ public void extractGridData(String customerId, String monthId) {
+ List list = screenGovernRankDataService.initList(customerId, OrgTypeConstant.GRID, null);
+ if (CollectionUtils.isEmpty(list)) {
+ return;
+ }
+ List gridList = factIndexGovrnAblityGridMonthlyService.getGridByCustomer(customerId, monthId);
+ list.forEach(entity -> gridList.stream().filter(gridAblity -> entity.getOrgId().equals(gridAblity.getGridId())).forEach(grid -> {
+ BigDecimal total = new BigDecimal(grid.getProjectTotal());
+ entity.setYearId(grid.getYearId());
+ entity.setMonthId(grid.getMonthId());
+ //TODO 响应率
+ //解决率
+ BigDecimal resolveCount = new BigDecimal(grid.getResolveProjectCount());
+ entity.setResolvedRatio(resolveCount.divide(total, NumConstant.SIX, RoundingMode.HALF_UP));
+ //自治率
+ BigDecimal selfCount = new BigDecimal(grid.getSelfSolveProjectCount());
+ entity.setGovernRatio(selfCount.divide(total, NumConstant.SIX, RoundingMode.HALF_UP));
+ //满意率
+ entity.setSatisfactionRatio(grid.getSatisfactionRatio());
+ }));
+ }
+
+ @Override
+ public void extractCommunityData(String customerId, String monthId) {
+
+ }
+
+ @Override
+ public void extractStreetData(String customerId, String monthId) {
+
+ }
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyBaseInfoServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyBaseInfoServiceImpl.java
index 050b8df4ce..f30e987bb9 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyBaseInfoServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyBaseInfoServiceImpl.java
@@ -2,10 +2,7 @@ package com.epmet.service.evaluationindex.extract.toscreen.impl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.dto.extract.form.PartyBaseInfoFormDTO;
-import com.epmet.dto.extract.result.CustomerAgencyInfoResultDTO;
-import com.epmet.dto.extract.result.PartyInfoResultDTO;
-import com.epmet.dto.extract.result.PartyMemberInfoResultDTO;
-import com.epmet.dto.extract.result.UserCountResultDTO;
+import com.epmet.dto.extract.result.*;
import com.epmet.service.evaluationindex.extract.toscreen.PartyBaseInfoService;
import com.epmet.service.evaluationindex.screen.ScreenCpcBaseDataService;
import com.epmet.service.evaluationindex.screen.ScreenCustomerAgencyService;
@@ -63,24 +60,30 @@ public class PartyBaseInfoServiceImpl implements PartyBaseInfoService {
public Boolean statsPartyMemberBaseInfoToScreen(String customerId, String dateId) {
List agencyIdList = agencyService.selectAllAgencyId(customerId);
if (!CollectionUtils.isEmpty(agencyIdList)){
+ // 根据组织级别分组
Map> groupByLevel = agencyIdList.stream().collect(Collectors.groupingBy(CustomerAgencyInfoResultDTO::getLevel));
if (groupByLevel.containsKey(ScreenConstant.COMMUNITY)){
+ // 社区级别
List customerGridInfoList = groupByLevel.get(ScreenConstant.COMMUNITY);
disPose(customerGridInfoList,true,customerId,dateId);
}
if (groupByLevel.containsKey(ScreenConstant.STREET)){
+ // 街道级别
List customerGridInfoList = groupByLevel.get(ScreenConstant.STREET);
disPose(customerGridInfoList,false,customerId,dateId);
}
if (groupByLevel.containsKey(ScreenConstant.DISTRICT)){
+ // 区级
List customerGridInfoList = groupByLevel.get(ScreenConstant.DISTRICT);
disPose(customerGridInfoList,false,customerId,dateId);
}
if (groupByLevel.containsKey(ScreenConstant.CITY)){
+ // 市级
List customerGridInfoList = groupByLevel.get(ScreenConstant.CITY);
disPose(customerGridInfoList,false,customerId,dateId);
}
if (groupByLevel.containsKey(ScreenConstant.PROVINCE)){
+ // 省级
List customerGridInfoList = groupByLevel.get(ScreenConstant.PROVINCE);
disPose(customerGridInfoList,false,customerId,dateId);
}
@@ -96,60 +99,34 @@ public class PartyBaseInfoServiceImpl implements PartyBaseInfoService {
*/
public void disPose(List agencyIdList, Boolean isGrid, String customerId, String dateId){
if (!CollectionUtils.isEmpty(agencyIdList)){
+ // 网格ID或机关Id
List orgIds = agencyIdList.stream().map(m -> m.getAgencyId()).collect(Collectors.toList());
List result = new ArrayList<>();
if (isGrid == true){
+ // 是 community 级别,子级为gridId
List userCountList = userGridDailyService.selectUserCount(customerId, dateId);
agencyIdList.forEach(agency -> {
- // 1. 处理社区下的所有网格中的党员信息
- String agencyId = agency.getAgencyId();
- Map agencyMap = agencyService.selectAllSubAgencyId(agencyId, customerId);
- List gridIds = (List) agencyMap.get(agencyId);
- orgIds.addAll(gridIds);
- List partyMemberInfoList = partyMemberService.selectPartyMemberInfo(customerId, gridIds);
- if (!CollectionUtils.isEmpty(partyMemberInfoList)){
- // 为每个人赋值年龄
- partyMemberInfoList.forEach(party -> {
- party.setAge(getAge(party.getBirthday()));
- });
- Map> groupByGridId = partyMemberInfoList.stream().collect(Collectors.groupingBy(PartyMemberInfoResultDTO::getGridId));
- groupByGridId.forEach((gridId,partyInfos) -> {
- PartyBaseInfoFormDTO form = new PartyBaseInfoFormDTO();
- form.setOrgType(ScreenConstant.GRID);
- form.setOrgId(gridId);
- form.setOrgName(partyInfos.get(NumConstant.ZERO).getGridName());
- form.setAgeLevel1(disposeAge(partyInfos,NumConstant.TWENTY,false));
- form.setAgeLevel2(disposeAgeArea(partyInfos,NumConstant.TWENTY,NumConstant.THIRTY));
- form.setAgeLevel3(disposeAgeArea(partyInfos,NumConstant.THIRTY_ONE,NumConstant.FORTY));
- form.setAgeLevel4(disposeAgeArea(partyInfos,NumConstant.FORTY_ONE,NumConstant.FIFTY));
- form.setAgeLevel5(disposeAgeArea(partyInfos,NumConstant.FIFTY_ONE,NumConstant.SIXTY));
- form.setAgeLevel6(disposeAge(partyInfos,NumConstant.SIXTY,true));
- form.setCustomerId(customerId);
- form.setDataEndTime(dateId);
- form.setParentId(partyInfos.get(NumConstant.ZERO).getAgencyId());
- if (!CollectionUtils.isEmpty(userCountList)){
- userCountList.forEach(user -> {
- if (gridId.equals(user.getOrgId())){
- form.setResiTotal(user.getResiTotal());
- form.setRegisterUserCount(user.getRegisterUserCount());
- form.setPartyMemberCount(user.getPartyMemberCount());
- }
- });
- }
- result.add(form);
- });
- }
+ GridPartyDTO gridPartyDTO = gridParty(customerId, dateId, agency);
+ result.addAll(gridPartyDTO.getResult());
+ orgIds.addAll(gridPartyDTO.getOrgIds());
});
- // 2. 处理社区级别的党员信息
+ // 2. 处理社区级别的党员信息(因为网格级别的已算出,社区级别直接累加)
Map> groupByAgency = result.stream().collect(Collectors.groupingBy(PartyBaseInfoFormDTO::getParentId));
+ List orgNameAgencyList = agencyService.selectOrgNameAgency(result.stream().map(m -> m.getParentId()).distinct().collect(Collectors.toList()));
groupByAgency.forEach((commAgencyId,party) -> {
PartyBaseInfoFormDTO form = new PartyBaseInfoFormDTO();
- form.setOrgName(party.get(NumConstant.ZERO).getOrgName());
+ if (!CollectionUtils.isEmpty(orgNameAgencyList)){
+ orgNameAgencyList.forEach(name -> {
+ if (commAgencyId.equals(name.getAgencyId())){
+ form.setOrgName(name.getAgencyName());
+ form.setParentId(name.getParentId());
+ }
+ });
+ }
form.setOrgId(commAgencyId);
form.setCustomerId(customerId);
form.setDataEndTime(dateId);
form.setOrgType(ScreenConstant.AGENCY);
- form.setParentId(party.get(NumConstant.ZERO).getParentId());
form.setAgeLevel1(party.stream().collect(Collectors.summingInt(PartyBaseInfoFormDTO::getAgeLevel1)));
form.setAgeLevel2(party.stream().collect(Collectors.summingInt(PartyBaseInfoFormDTO::getAgeLevel2)));
form.setAgeLevel3(party.stream().collect(Collectors.summingInt(PartyBaseInfoFormDTO::getAgeLevel3)));
@@ -163,9 +140,66 @@ public class PartyBaseInfoServiceImpl implements PartyBaseInfoService {
});
delAndInsert(result,customerId,dateId,orgIds);
}else {
+ // 级别为 street,district,city,province
+ List directGridIds = gridService.selectDirectGrid(orgIds);
+ List userCountList = userGridDailyService.selectUserCount(customerId, dateId);
agencyIdList.forEach(agency -> {
String agencyId = agency.getAgencyId();
+ List dGridId = new ArrayList<>();
+ directGridIds.forEach(grid -> {
+ if (agencyId.equals(grid.getAgencyId())){
+ dGridId.add(grid.getGridId());
+ }
+ });
+ // 不为空 存在直属网格
+ if (!CollectionUtils.isEmpty(dGridId)){
+ List disGrid = new ArrayList<>();
+ List partyMemberInfoList = partyMemberService.selectPartyMemberInfo(customerId, dGridId);
+ List orgNameList = agencyService.selectOrgNameGrid(partyMemberInfoList.stream().map(m -> m.getGridId()).collect(Collectors.toList()));
+ if (!CollectionUtils.isEmpty(partyMemberInfoList)){
+ // 为每个人赋值年龄
+ partyMemberInfoList.forEach(party -> {
+ party.setAge(getAge(party.getBirthday()));
+ orgNameList.forEach(orgName -> {
+ if (party.getGridId().equals(orgName.getGridId())){
+ party.setGridName(orgName.getGridName());
+ party.setAgencyName(orgName.getAgencyName());
+ }
+ });
+ });
+ Map> groupByGridId = partyMemberInfoList.stream().collect(Collectors.groupingBy(PartyMemberInfoResultDTO::getGridId));
+ groupByGridId.forEach((gridId,partyInfos) -> {
+ PartyBaseInfoFormDTO form = new PartyBaseInfoFormDTO();
+ form.setOrgType(ScreenConstant.GRID);
+ form.setOrgId(gridId);
+ form.setOrgName(partyInfos.get(NumConstant.ZERO).getGridName());
+ form.setAgeLevel1(disposeAge(partyInfos,NumConstant.TWENTY,false));
+ form.setAgeLevel2(disposeAgeArea(partyInfos,NumConstant.TWENTY,NumConstant.THIRTY));
+ form.setAgeLevel3(disposeAgeArea(partyInfos,NumConstant.THIRTY_ONE,NumConstant.FORTY));
+ form.setAgeLevel4(disposeAgeArea(partyInfos,NumConstant.FORTY_ONE,NumConstant.FIFTY));
+ form.setAgeLevel5(disposeAgeArea(partyInfos,NumConstant.FIFTY_ONE,NumConstant.SIXTY));
+ form.setAgeLevel6(disposeAge(partyInfos,NumConstant.SIXTY,true));
+ form.setCustomerId(customerId);
+ form.setDataEndTime(dateId);
+ form.setParentId(partyInfos.get(NumConstant.ZERO).getAgencyId());
+ if (!CollectionUtils.isEmpty(userCountList)){
+ userCountList.forEach(user -> {
+ if (gridId.equals(user.getOrgId())){
+ form.setResiTotal(user.getResiTotal());
+ form.setRegisterUserCount(user.getRegisterUserCount());
+ form.setPartyMemberCount(user.getPartyMemberCount());
+ }
+ });
+ }
+ disGrid.add(form);
+ });
+ }
+ delAndInsert(disGrid,customerId,dateId,dGridId);
+ }
+ // 查询下级机关的党员信息,直接累加 【包括直属网格】
+ List directGridList = cpcBaseDataService.selectDirectGridPartyInfo(dGridId, customerId, dateId);
List partyInfoList = cpcBaseDataService.selectPartyInfo(customerId, dateId, agencyId);
+ partyInfoList.addAll(directGridList);
if (!CollectionUtils.isEmpty(partyInfoList)){
PartyBaseInfoFormDTO form = new PartyBaseInfoFormDTO();
form.setOrgName(partyInfoList.get(NumConstant.ZERO).getOrgName());
@@ -207,6 +241,7 @@ public class PartyBaseInfoServiceImpl implements PartyBaseInfoService {
int birthDayMonth = birth.getMonthValue();
int birthDayOfMonth = birth.getDayOfMonth();
int age = nowYear - birthDayYear;
+ // 当前月小于出生年的月份 或者 当前月等于出生年的月 并且 当前日小于出生年的日,就是不满一岁
if (nowMonth < birthDayMonth || (nowMonth == birthDayMonth && nowDayOfMonth < birthDayOfMonth)) {
age--;
}
@@ -223,6 +258,7 @@ public class PartyBaseInfoServiceImpl implements PartyBaseInfoService {
*/
public Integer disposeAgeArea(List partyMemberInfoList, Integer startAge,Integer endAge ){
if (!CollectionUtils.isEmpty(partyMemberInfoList)){
+ // 计算大于多少岁并小于多少岁的人
List collect = partyMemberInfoList.stream().filter(p -> p.getAge() >= startAge).filter(p -> p.getAge() <= endAge).collect(Collectors.toList());
return collect.size();
}
@@ -241,8 +277,10 @@ public class PartyBaseInfoServiceImpl implements PartyBaseInfoService {
if (!CollectionUtils.isEmpty(partyMemberInfoList)){
List collect = new ArrayList<>();
if (isGreater == true){
+ // 大于
collect = partyMemberInfoList.stream().filter(p -> p.getAge() > age).collect(Collectors.toList());
}else {
+ // 小于
collect = partyMemberInfoList.stream().filter(p -> p.getAge() < age).collect(Collectors.toList());
}
return collect.size();
@@ -260,10 +298,13 @@ public class PartyBaseInfoServiceImpl implements PartyBaseInfoService {
*/
@Transactional(rollbackFor = Exception.class)
public void delAndInsert(List result, String customerId, String dateId, List orgIds){
+ // 查询客户下所有的agency
List partyBaseInfoList = agencyService.selectAllAgencyIdToParty(customerId,dateId);
+ // 查询客户下所有的grid
List resultList = gridService.selectAllGridIdToParty(customerId, dateId);
resultList.addAll(partyBaseInfoList);
List finalResult = new ArrayList<>();
+ // 因为是根据级别来删除,插入,所以把需要操作的orgIds单独出来
resultList.forEach(rl -> {
orgIds.forEach(orgId -> {
if (rl.getOrgId().equals(orgId)){
@@ -289,4 +330,57 @@ public class PartyBaseInfoServiceImpl implements PartyBaseInfoService {
cpcBaseDataService.insertPartyBaseInfo(p);
});
}
+
+ public GridPartyDTO gridParty(String customerId,String dateId,CustomerAgencyInfoResultDTO agency){
+ List result = new ArrayList<>();
+ List orgIds = new ArrayList<>();
+ List userCountList = userGridDailyService.selectUserCount(customerId, dateId);
+ // 1. 处理社区下的所有网格中的党员信息
+ String agencyId = agency.getAgencyId();
+ // 获取下级所有agencyId【根据agencyMap中的level判断下级orgId是否是gridId】(此处直接作为gridId)
+ Map agencyMap = agencyService.selectAllSubAgencyId(agencyId, customerId);
+ List gridIds = (List) agencyMap.get(agencyId);
+ orgIds.addAll(gridIds);
+ List partyMemberInfoList = partyMemberService.selectPartyMemberInfo(customerId, gridIds);
+ List orgNameList = agencyService.selectOrgNameGrid(partyMemberInfoList.stream().map(m -> m.getGridId()).collect(Collectors.toList()));
+ if (!CollectionUtils.isEmpty(partyMemberInfoList)){
+ // 为每个人赋值年龄
+ partyMemberInfoList.forEach(party -> {
+ party.setAge(getAge(party.getBirthday()));
+ orgNameList.forEach(orgName -> {
+ if (party.getGridId().equals(orgName.getGridId())){
+ party.setGridName(orgName.getGridName());
+ party.setAgencyName(orgName.getAgencyName());
+ }
+ });
+ });
+ Map> groupByGridId = partyMemberInfoList.stream().collect(Collectors.groupingBy(PartyMemberInfoResultDTO::getGridId));
+ groupByGridId.forEach((gridId,partyInfos) -> {
+ PartyBaseInfoFormDTO form = new PartyBaseInfoFormDTO();
+ form.setOrgType(ScreenConstant.GRID);
+ form.setOrgId(gridId);
+ form.setOrgName(partyInfos.get(NumConstant.ZERO).getGridName());
+ form.setAgeLevel1(disposeAge(partyInfos,NumConstant.TWENTY,false));
+ form.setAgeLevel2(disposeAgeArea(partyInfos,NumConstant.TWENTY,NumConstant.THIRTY));
+ form.setAgeLevel3(disposeAgeArea(partyInfos,NumConstant.THIRTY_ONE,NumConstant.FORTY));
+ form.setAgeLevel4(disposeAgeArea(partyInfos,NumConstant.FORTY_ONE,NumConstant.FIFTY));
+ form.setAgeLevel5(disposeAgeArea(partyInfos,NumConstant.FIFTY_ONE,NumConstant.SIXTY));
+ form.setAgeLevel6(disposeAge(partyInfos,NumConstant.SIXTY,true));
+ form.setCustomerId(customerId);
+ form.setDataEndTime(dateId);
+ form.setParentId(partyInfos.get(NumConstant.ZERO).getAgencyId());
+ if (!CollectionUtils.isEmpty(userCountList)){
+ userCountList.forEach(user -> {
+ if (gridId.equals(user.getOrgId())){
+ form.setResiTotal(user.getResiTotal());
+ form.setRegisterUserCount(user.getRegisterUserCount());
+ form.setPartyMemberCount(user.getPartyMemberCount());
+ }
+ });
+ }
+ result.add(form);
+ });
+ }
+ return new GridPartyDTO(orgIds, result);
+ }
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyGuideServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyGuideServiceImpl.java
new file mode 100644
index 0000000000..19b0eaa9d4
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyGuideServiceImpl.java
@@ -0,0 +1,253 @@
+package com.epmet.service.evaluationindex.extract.toscreen.impl;
+
+import com.epmet.commons.tools.constant.NumConstant;
+import com.epmet.commons.tools.utils.ConvertUtils;
+import com.epmet.constant.ScreenConstant;
+import com.epmet.dto.extract.form.PartyBaseInfoFormDTO;
+import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO;
+import com.epmet.dto.extract.result.*;
+import com.epmet.service.evaluationindex.extract.todata.FactOriginGroupMainDailyService;
+import com.epmet.service.evaluationindex.extract.toscreen.PartyGuideService;
+import com.epmet.service.evaluationindex.screen.ScreenCustomerAgencyService;
+import com.epmet.service.evaluationindex.screen.ScreenCustomerGridService;
+import com.epmet.service.evaluationindex.screen.ScreenPartyBranchDataService;
+import com.epmet.service.evaluationindex.screen.ScreenPartyLinkMassesDataService;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.ListUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/9/24 5:06 下午
+ */
+@Service
+@Slf4j
+public class PartyGuideServiceImpl implements PartyGuideService {
+
+ @Autowired
+ private ScreenPartyLinkMassesDataService linkMassesDataService;
+ @Autowired
+ private ScreenPartyBranchDataService partyBranchDataService;
+ @Autowired
+ private FactOriginGroupMainDailyService groupMainService;
+ @Autowired
+ private ScreenCustomerAgencyService agencyService;
+ @Autowired
+ private ScreenCustomerGridService gridService;
+
+ /**
+ * @Description 党建引领抽取
+ * @param customerId
+ * @param monthId
+ * @author zxc
+ * @date 2020/9/24 5:10 下午
+ */
+ @Override
+ public Boolean partyGuideExtract(String customerId, String monthId) {
+ //【党员建群数,群成员数】
+ List agencyIdList = agencyService.selectAllAgencyId(customerId);
+ if (!CollectionUtils.isEmpty(agencyIdList)){
+ // 根据组织级别分组
+ Map> groupByLevel = agencyIdList.stream().collect(Collectors.groupingBy(CustomerAgencyInfoResultDTO::getLevel));
+ if (groupByLevel.containsKey(ScreenConstant.COMMUNITY)){
+ // 社区级别
+ List customerGridInfoList = groupByLevel.get(ScreenConstant.COMMUNITY);
+ disPose(customerGridInfoList,true,customerId,monthId);
+ }
+ if (groupByLevel.containsKey(ScreenConstant.STREET)){
+ // 街道级别
+ List customerGridInfoList = groupByLevel.get(ScreenConstant.STREET);
+ disPose(customerGridInfoList,false,customerId,monthId);
+ }
+ if (groupByLevel.containsKey(ScreenConstant.DISTRICT)){
+ // 区级
+ List customerGridInfoList = groupByLevel.get(ScreenConstant.DISTRICT);
+ disPose(customerGridInfoList,false,customerId,monthId);
+ }
+ if (groupByLevel.containsKey(ScreenConstant.CITY)){
+ // 市级
+ List customerGridInfoList = groupByLevel.get(ScreenConstant.CITY);
+ disPose(customerGridInfoList,false,customerId,monthId);
+ }
+ if (groupByLevel.containsKey(ScreenConstant.PROVINCE)){
+ // 省级
+ List customerGridInfoList = groupByLevel.get(ScreenConstant.PROVINCE);
+ disPose(customerGridInfoList,false,customerId,monthId);
+ }
+ }
+ return true;
+ }
+
+ /**
+ * @Description 处理
+ * @Param agencyIdList
+ * @Param isGrid
+ * @Param customerId
+ * @Param monthId
+ * @author zxc
+ * @date 2020/9/25 2:57 下午
+ */
+ public void disPose(List agencyIdList, Boolean isGrid, String customerId, String monthId) {
+ List result = new ArrayList<>();
+ if (!CollectionUtils.isEmpty(agencyIdList)){
+ List orgIds = agencyIdList.stream().map(m -> m.getAgencyId()).collect(Collectors.toList());
+ if (isGrid == true){
+ agencyIdList.forEach(agency -> {
+ GridPartyGuideDTO gridPartyGuideDTO = communityLevelSubGrid(customerId, monthId, agency);
+ orgIds.addAll(gridPartyGuideDTO.getOrgIds());
+ result.addAll(gridPartyGuideDTO.getResult());
+ });
+ Map> groupByAgency = result.stream().collect(Collectors.groupingBy(ScreenPartyLinkMassesDataFormDTO::getParentId));
+ groupByAgency.forEach((agencyId,gridList) -> {
+ ScreenPartyLinkMassesDataFormDTO form = new ScreenPartyLinkMassesDataFormDTO();
+ List orgNameAgencyList = agencyService.selectOrgNameAgency(result.stream().map(m -> m.getParentId()).distinct().collect(Collectors.toList()));
+ if (!CollectionUtils.isEmpty(orgNameAgencyList)){
+ orgNameAgencyList.forEach(name -> {
+ if (agencyId.equals(name.getAgencyId())){
+ form.setOrgName(name.getAgencyName());
+ form.setParentId(name.getParentId());
+ }
+ });
+ }
+ form.setOrgId(agencyId);
+ form.setCustomerId(customerId);
+ form.setDataEndTime(monthId);
+ form.setOrgType(ScreenConstant.AGENCY);
+ form.setCreateGroupTotal(gridList.stream().collect(Collectors.summingInt(ScreenPartyLinkMassesDataFormDTO::getCreateGroupTotal)));
+ form.setGroupUserTotal(gridList.stream().collect(Collectors.summingInt(ScreenPartyLinkMassesDataFormDTO::getGroupUserTotal)));
+ result.add(form);
+ });
+ delAndInsertLink(result,customerId,monthId,orgIds);
+ }else {
+ // 级别为 street,district,city,province
+ List directGridIds = gridService.selectDirectGrid(orgIds);
+ agencyIdList.forEach(agency -> {
+ String agencyId = agency.getAgencyId();
+ List disGridIds = new ArrayList<>();
+ directGridIds.forEach(grid -> {
+ if (agencyId.equals(grid.getAgencyId())){
+ disGridIds.add(grid.getGridId());
+ }
+ });
+ // 不为空 存在直属网格
+ if (!CollectionUtils.isEmpty(disGridIds)){
+ List gridResult = new ArrayList<>();
+ List partyLinkMassesDataList = groupMainService.selectPartyCreateGroupInfo(customerId, monthId, disGridIds);
+ List orgNameList = agencyService.selectOrgNameGrid(partyLinkMassesDataList.stream().map(m -> m.getOrgId()).collect(Collectors.toList()));
+ if (!CollectionUtils.isEmpty(partyLinkMassesDataList)){
+ partyLinkMassesDataList.forEach(party -> {
+ orgNameList.forEach(org -> {
+ if (party.getOrgId().equals(org.getGridId())){
+ party.setOrgName(org.getGridName());
+ }
+ });
+ ScreenPartyLinkMassesDataFormDTO copyParty = ConvertUtils.sourceToTarget(party, ScreenPartyLinkMassesDataFormDTO.class);
+ gridResult.add(copyParty);
+ });
+ }
+ delAndInsertLink(gridResult,customerId,monthId,disGridIds);
+ }
+ List screenPartyLinkMassesDataGrid = groupMainService.selectPartyCreateGroupInfo(customerId, monthId, disGridIds);
+ List screenPartyLinkMassesDataList = linkMassesDataService.selectPartyLinkMassesInfo(customerId, monthId, agencyId);
+ screenPartyLinkMassesDataList.addAll(screenPartyLinkMassesDataGrid);
+ if (!CollectionUtils.isEmpty(screenPartyLinkMassesDataList)){
+ ScreenPartyLinkMassesDataFormDTO form = new ScreenPartyLinkMassesDataFormDTO();
+ form.setOrgId(agencyId);
+ form.setOrgType(ScreenConstant.AGENCY);
+ form.setOrgName(screenPartyLinkMassesDataList.get(NumConstant.ZERO).getOrgName());
+ form.setCustomerId(customerId);
+ form.setDataEndTime(monthId);
+ form.setParentId(screenPartyLinkMassesDataList.get(NumConstant.ZERO).getParentId());
+ form.setGroupUserTotal(screenPartyLinkMassesDataList.stream().collect(Collectors.summingInt(ScreenPartyLinkMassesDataFormDTO::getGroupUserTotal)));
+ form.setCreateGroupTotal(screenPartyLinkMassesDataList.stream().collect(Collectors.summingInt(ScreenPartyLinkMassesDataFormDTO::getCreateGroupTotal)));
+ result.add(form);
+ }
+ });
+ delAndInsertLink(result,customerId,monthId,orgIds);
+ }
+ }
+ }
+
+ /**
+ * @Description 社区级别的处理
+ * @Param customerId
+ * @Param monthId
+ * @Param agency
+ * @author zxc
+ * @date 2020/9/25 10:06 上午
+ */
+ public GridPartyGuideDTO communityLevelSubGrid(String customerId, String monthId, CustomerAgencyInfoResultDTO agency){
+ String agencyId = agency.getAgencyId();
+ // 获取下级所有agencyId【根据agencyMap中的level判断下级orgId是否是gridId】(此处直接作为gridId)
+ Map agencyMap = agencyService.selectAllSubAgencyId(agencyId, customerId);
+ List gridIds = (List) agencyMap.get(agencyId);
+ List partyLinkMassesDataList = groupMainService.selectPartyCreateGroupInfo(customerId, monthId, gridIds);
+ List orgIds = partyLinkMassesDataList.stream().map(m -> m.getOrgId()).collect(Collectors.toList());
+ List orgNameList = agencyService.selectOrgNameGrid(orgIds);
+ partyLinkMassesDataList.forEach(party -> {
+ orgNameList.forEach(orgName -> {
+ if (party.getOrgId().equals(orgName.getGridId())){
+ party.setOrgName(orgName.getGridName());
+ }
+ });
+ });
+ return new GridPartyGuideDTO(gridIds,partyLinkMassesDataList);
+ }
+
+ /**
+ * @Description 删除并插入党员联系群众【党员建群数,群成员数】
+ * @Param result
+ * @Param customerId
+ * @Param monthId
+ * @Param orgIds
+ * @author zxc
+ * @date 2020/9/25 2:57 下午
+ */
+ @Transactional(rollbackFor = Exception.class)
+ public void delAndInsertLink(List result, String customerId, String monthId, List orgIds){
+ List screenPartyLinkMassesAgencyList = agencyService.selectAllAgencyIdToPartyLinkMessage(customerId, monthId);
+ List resultList = gridService.selectAllGridIdToPartyLinkMessage(customerId, monthId);
+ resultList.addAll(screenPartyLinkMassesAgencyList);
+ List finalResult = new ArrayList<>();
+ // 因为是根据级别来删除,插入,所以把需要操作的orgIds单独出来
+ resultList.forEach(rl -> {
+ orgIds.forEach(orgId -> {
+ if (rl.getOrgId().equals(orgId)){
+ finalResult.add(rl);
+ }
+ });
+ });
+ if (!CollectionUtils.isEmpty(result)){
+ finalResult.forEach(fr -> {
+ result.forEach(r -> {
+ if (fr.getOrgId().equals(r.getOrgId())){
+ BeanUtils.copyProperties(r,fr);
+ }
+ });
+ });
+ }
+ Integer delNum;
+ do {
+ delNum = linkMassesDataService.deleteOldPartyLinkInfo(customerId, monthId, orgIds);
+ }while (delNum > NumConstant.ZERO);
+ List> partition = ListUtils.partition(finalResult, NumConstant.ONE_HUNDRED);
+ partition.forEach(p -> {
+ linkMassesDataService.insertScreenPartyLinkMassesData(p);
+ });
+ }
+
+
+
+
+
+ // TODO 党员志愿服务【参与人数,组织次数】
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PioneerDataExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PioneerDataExtractServiceImpl.java
index e363b39646..df9d7ab3c8 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PioneerDataExtractServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PioneerDataExtractServiceImpl.java
@@ -9,9 +9,10 @@ import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectMainDai
import com.epmet.service.evaluationindex.extract.todata.FactOriginTopicMainDailyService;
import com.epmet.service.evaluationindex.extract.toscreen.PioneerDataExtractService;
import com.epmet.service.evaluationindex.screen.ScreenPioneerDataService;
-import com.epmet.service.stats.DimCustomerPartymemberService;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
+import org.springframework.util.StringUtils;
import java.math.BigDecimal;
import java.math.RoundingMode;
@@ -23,6 +24,7 @@ import java.util.List;
* @author yinzuomei@elink-cn.com
* @date 2020/9/22 11:25
*/
+@Service
public class PioneerDataExtractServiceImpl implements PioneerDataExtractService {
@Autowired
@@ -30,8 +32,6 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
@Autowired
private FactOriginTopicMainDailyService factOriginTopicMainDailyService;
@Autowired
- private DimCustomerPartymemberService dimCustomerPartymemberService;
- @Autowired
private FactOriginIssueMainDailyService factOriginIssueMainDailyService;
@Autowired
private FactOriginProjectMainDailyService factOriginProjectMainDailyService;
@@ -47,7 +47,7 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
@Override
public void extractGridPioneerData(String customerId, String dateId) {
//查询客户下所有的网格,初始数据值为0
- List gridList = screenPioneerDataService.initPioneerDataList(customerId, "grid", StrConstant.EPMETY_STR);
+ List gridList = screenPioneerDataService.initPioneerDataList(customerId, "grid");
if (CollectionUtils.isEmpty(gridList)) {
return;
}
@@ -60,26 +60,22 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
entity.setIssueRatio(BigDecimal.ZERO);
- //网格内的党员集合
- List partyMemberUserIds = dimCustomerPartymemberService.getPartyMemberUserIds(customerId, gridId);
-
-
//3、党员发布话题:
- entity.setTopicTotal(getTopicTotal(customerId, partyMemberUserIds));
+ entity.setTopicTotal(getTopicTotal(customerId, gridId, null));
//4、党员发布话题占比: 网格内注册党员发布的话题总数占 网格内话题总数的 比率
if (entity.getTopicTotal() == NumConstant.ZERO) {
entity.setTopicRatio(BigDecimal.ZERO);
} else {
//当前网格内所有话题总数
- int gridTopicTotal = getGridTopicTotal(customerId, gridId);
+ int gridTopicTotal = getGridOrCommunityTopicTotal(customerId, gridId, null);
entity.setTopicRatio(gridTopicTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getTopicTotal() / gridTopicTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
}
//当前网格内所有议题总数
- int gridIssueTotal = getGridIssueTotal(customerId, gridId);
+ int gridIssueTotal = getGridOrCommunityIssueTotal(customerId, gridId, null);
if (gridIssueTotal != NumConstant.ZERO) {
//5、党员发布议题
- entity.setPublishIssueTotal(getParyPublishIssueTotal(customerId, partyMemberUserIds));
+ entity.setPublishIssueTotal(getParyPublishIssueTotal(customerId, gridId, null));
//6、党员发布议题占比 : 占网格内所有议题的比率
if (entity.getPublishIssueTotal() == NumConstant.ZERO) {
entity.setPublishIssueRatio(BigDecimal.ZERO);
@@ -87,128 +83,239 @@ public class PioneerDataExtractServiceImpl implements PioneerDataExtractService
entity.setPublishIssueRatio(gridIssueTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getPublishIssueTotal() / gridIssueTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
//7、议题转项目数
- entity.setShiftProjectTotal(getGridShiftProjectTotal(customerId, gridId));
+ entity.setShiftProjectTotal(getGridOrCommunityShiftProjectTotal(customerId, gridId, null));
//8、议题转项目占比 : 占网格内议题总数的比率
entity.setShiftProjectRatio(entity.getShiftProjectTotal() == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getShiftProjectTotal() / gridIssueTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
}
// 9、已解决项目
- entity.setResolvedProjectTotal(getGridClosedProjectTotal(customerId,gridId,"resolved"));
- if(entity.getResolvedProjectTotal()==NumConstant.ZERO){
+ entity.setResolvedProjectTotal(getGridOrCommunityClosedProjectTotal(customerId, gridId, null, "resolved"));
+ if (entity.getResolvedProjectTotal() == NumConstant.ZERO) {
+ entity.setResolvedProjectRatio(BigDecimal.ZERO);
+ } else {
+ // 10、占总结项目
+ int closedProjectTotal = getGridOrCommunityClosedProjectTotal(customerId, gridId, null, null);
+ entity.setResolvedProjectRatio(closedProjectTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getResolvedProjectTotal() / closedProjectTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
+ }
+ });
+ screenPioneerDataService.delAndSavePioneerData(customerId, "grid", IndexCalConstant.DELETE_SIZE, gridList);
+ }
+
+ @Override
+ public void extractCommunityPioneerData(String customerId, String dateId) {
+ //查询客户下所有的社区,初始数据值为0
+ List communityList = screenPioneerDataService.initPioneerDataList(customerId, "community");
+ if (CollectionUtils.isEmpty(communityList)) {
+ return;
+ }
+ communityList.forEach(entity -> {
+ entity.setDataEndTime(dateId);
+ String communityId = entity.getOrgId();
+ //1、党员参与议事 todo
+ entity.setIssueTotal(NumConstant.ZERO);
+ //2、党员参与议事占比 todo
+ entity.setIssueRatio(BigDecimal.ZERO);
+
+
+ //3、党员发布话题:
+ entity.setTopicTotal(getTopicTotal(customerId, null, communityId));
+ //4、党员发布话题占比: 社区内注册党员发布的话题总数占 社区内话题总数的 比率
+ if (entity.getTopicTotal() == NumConstant.ZERO) {
+ entity.setTopicRatio(BigDecimal.ZERO);
+ } else {
+ //当前社区内所有话题总数
+ int communityTopicTotal = getGridOrCommunityTopicTotal(customerId, null, communityId);
+ entity.setTopicRatio(communityTopicTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getTopicTotal() / communityTopicTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
+ }
+
+ //当前社区内所有议题总数
+ int communityIssueTotal = getGridOrCommunityIssueTotal(customerId, null, communityId);
+ if (communityIssueTotal != NumConstant.ZERO) {
+ //5、党员发布议题
+ entity.setPublishIssueTotal(getParyPublishIssueTotal(customerId, null, communityId));
+ //6、党员发布议题占比 : 占社区内所有议题的比率
+ if (entity.getPublishIssueTotal() == NumConstant.ZERO) {
+ entity.setPublishIssueRatio(BigDecimal.ZERO);
+ }
+ entity.setPublishIssueRatio(communityIssueTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getPublishIssueTotal() / communityIssueTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
+
+ //7、议题转项目数
+ entity.setShiftProjectTotal(getGridOrCommunityShiftProjectTotal(customerId, null, communityId));
+ //8、议题转项目占比 : 占社区内议题总数的比率
+ entity.setShiftProjectRatio(entity.getShiftProjectTotal() == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getShiftProjectTotal() / communityIssueTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
+ }
+
+
+ // 9、已解决项目
+ entity.setResolvedProjectTotal(getGridOrCommunityClosedProjectTotal(customerId, null, communityId, "resolved"));
+ if (entity.getResolvedProjectTotal() == NumConstant.ZERO) {
+ entity.setResolvedProjectRatio(BigDecimal.ZERO);
+ } else {
+ // 10、占总结项目
+ int closedProjectTotal = getGridOrCommunityClosedProjectTotal(customerId, null, communityId, null);
+ entity.setResolvedProjectRatio(closedProjectTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getResolvedProjectTotal() / closedProjectTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
+ }
+ });
+ screenPioneerDataService.delAndSavePioneerData(customerId, "agency", IndexCalConstant.DELETE_SIZE, communityList);
+ }
+
+
+ @Override
+ public void extractExceptCommunityPioneerData(String customerId, String dateId) {
+ //查询客户下所有的组织(社区除外),初始数据值为0
+ List agencyList = screenPioneerDataService.initPioneerDataList(customerId, "agency");
+ if (CollectionUtils.isEmpty(agencyList)) {
+ return;
+ }
+ agencyList.forEach(entity -> {
+ entity.setDataEndTime(dateId);
+ String agencyId = entity.getOrgId();
+ //1、党员参与议事 todo
+ entity.setIssueTotal(NumConstant.ZERO);
+ //2、党员参与议事占比 todo
+ entity.setIssueRatio(BigDecimal.ZERO);
+ if (StringUtils.isEmpty(entity.getPid()) || NumConstant.ZERO_STR.equals(entity.getPid())) {
+ entity.setAgencyPath(entity.getOrgId());
+ } else {
+ entity.setAgencyPath(entity.getAgencyPids().concat(StrConstant.COLON).concat(entity.getOrgId()));
+ }
+
+
+ //3、党员发布话题:
+ entity.setTopicTotal(getAgencyTopicTotal(customerId, entity.getAgencyPath(),NumConstant.ONE_STR));
+ //4、党员发布话题占比: 组织内注册党员发布的话题总数占 组织内话题总数的 比率
+ if (entity.getTopicTotal() == NumConstant.ZERO) {
+ entity.setTopicRatio(BigDecimal.ZERO);
+ } else {
+ //当前组织内所有话题总数
+ int agencyTopicTotal = getAgencyTopicTotal(customerId, entity.getAgencyPath(),null);
+ entity.setTopicRatio(agencyTopicTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getTopicTotal() / agencyTopicTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
+ }
+
+ //当前组织内所有议题总数
+ int agencyIssueTotal = getAgencyIssueTotal(customerId, entity.getAgencyPath());
+ if (agencyIssueTotal != NumConstant.ZERO) {
+ //5、党员发布议题
+ entity.setPublishIssueTotal(getAgencyParyPublishIssueTotal(customerId, entity.getAgencyPath()));
+ //6、党员发布议题占比 : 占社区内所有议题的比率
+ if (entity.getPublishIssueTotal() == NumConstant.ZERO) {
+ entity.setPublishIssueRatio(BigDecimal.ZERO);
+ }
+ entity.setPublishIssueRatio(agencyIssueTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getPublishIssueTotal() / agencyIssueTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
+
+ //7、议题转项目数
+ entity.setShiftProjectTotal(getAgencyShiftProjectTotal(customerId, entity.getAgencyPath()));
+ //8、议题转项目占比 : 占网格内议题总数的比率
+ entity.setShiftProjectRatio(entity.getShiftProjectTotal() == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getShiftProjectTotal() / agencyIssueTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
+ }
+
+
+ // 9、已解决项目
+ entity.setResolvedProjectTotal(getAgencyClosedProjectTotal(customerId, entity.getAgencyPath(), "resolved"));
+ if (entity.getResolvedProjectTotal() == NumConstant.ZERO) {
entity.setResolvedProjectRatio(BigDecimal.ZERO);
- }else{
+ } else {
// 10、占总结项目
- int closedProjectTotal=getGridClosedProjectTotal(customerId,gridId,null);
- entity.setResolvedProjectRatio(closedProjectTotal==NumConstant.ZERO?BigDecimal.ZERO:new BigDecimal(entity.getResolvedProjectTotal()/closedProjectTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
+ int closedProjectTotal = getAgencyClosedProjectTotal(customerId, entity.getAgencyPath(), null);
+ entity.setResolvedProjectRatio(closedProjectTotal == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(entity.getResolvedProjectTotal() / closedProjectTotal).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
}
});
- screenPioneerDataService.delAndSavePioneerData(customerId, "grid", dateId, IndexCalConstant.DELETE_SIZE, gridList);
+ screenPioneerDataService.delAndSavePioneerData(customerId, "agency", IndexCalConstant.DELETE_SIZE, agencyList);
+
+ }
+
+ //组织下:已解决项目 or 已结案项目总数
+ private int getAgencyClosedProjectTotal(String customerId, String agencyPath, String closedStatus) {
+ return factOriginProjectMainDailyService.getAgencyClosedProjectTotal(customerId,agencyPath,closedStatus);
+ }
+
+ //组织下:议题转项目数
+ private Integer getAgencyShiftProjectTotal(String customerId, String agencyPath) {
+ return factOriginIssueMainDailyService.getAgencyShiftProjectTotal(customerId,agencyPath);
+ }
+
+ //组织内: 党员发布议题
+ private Integer getAgencyParyPublishIssueTotal(String customerId, String agencyPath) {
+ return factOriginIssueMainDailyService.getAgencyParyPublishIssueTotal(customerId,agencyPath);
+ }
+
+ //组织内:所有议题总数
+ private int getAgencyIssueTotal(String customerId, String agencyPath) {
+ return factOriginIssueMainDailyService.getAgencyIssueTotal(customerId,agencyPath);
+ }
+
+
+ //在当前组织下,话题总数(createTopicUserIsParty=1时查询党员发布的话题总数)
+ private Integer getAgencyTopicTotal(String customerId, String agencyPath,String createTopicUserIsParty) {
+ return factOriginTopicMainDailyService.getAgencyPartyTopicTotal(customerId,agencyPath,createTopicUserIsParty);
}
+
/**
- * @return java.lang.Integer
- * @param customerId
- * @param gridId
+ * @param customerId 客户id
+ * @param gridId 网格id
+ * @param communityId 社区的agencyId
* @param closedStatus 结案状态:已解决 resolved,未解决 unresolved
- * @author yinzuomei
- * @description 网格内已解决项目
- * @Date 2020/9/23 16:24
+ * @description 网格或者社区下: 已解决项目
**/
- private Integer getGridClosedProjectTotal(String customerId, String gridId,String closedStatus) {
- return factOriginProjectMainDailyService.getGridClosedProjectTotal(customerId,gridId,closedStatus);
+ private Integer getGridOrCommunityClosedProjectTotal(String customerId, String gridId, String communityId, String closedStatus) {
+ return factOriginProjectMainDailyService.getGridOrCommunityClosedProjectTotal(customerId, gridId, communityId, closedStatus);
}
/**
- * @param customerId
- * @param partyMemberUserIds
* @return int
- * @author yinzuomei
- * @description 党员发布的话题总数
- * @Date 2020/9/23 13:44
+ * @param customerId 客户id
+ * @param gridId 网格id
+ * @param agencyId 社区的agencyId
+ * @description 网格或者社区下: 党员发布的话题总数
**/
- private int getTopicTotal(String customerId, List partyMemberUserIds) {
- if (CollectionUtils.isEmpty(partyMemberUserIds)) {
- //如果网格内没有党员,直接返回0
- return NumConstant.ZERO;
- }
- return factOriginTopicMainDailyService.calPublishedByPartyTopicCount(customerId, partyMemberUserIds);
+ private int getTopicTotal(String customerId, String gridId, String agencyId) {
+ return factOriginTopicMainDailyService.calPublishedByPartyTopicCount(customerId, gridId, agencyId);
}
/**
- * @param customerId
- * @param gridId
* @return int
- * @author yinzuomei
- * @description 当前网格内,发布的话题总数
- * @Date 2020/9/23 14:18
+ * @param customerId 客户id
+ * @param gridId 网格id
+ * @param communityId 社区的agencyId
+ * @description 网格或者社区下 :话题总数
**/
- private int getGridTopicTotal(String customerId, String gridId) {
- return factOriginTopicMainDailyService.calGridTopicTotalByGrid(customerId, gridId);
+ private int getGridOrCommunityTopicTotal(String customerId, String gridId, String communityId) {
+ return factOriginTopicMainDailyService.calGridOrCommunityTopicTotal(customerId, gridId, communityId);
}
/**
- * @param customerId
- * @param partyMemberUserIds
- * @return java.lang.Integer
- * @author yinzuomei
- * @description 党员发布的议题总数
- * @Date 2020/9/23 14:39
+ * @return int
+ * @param customerId 客户id
+ * @param gridId 网格id
+ * @param agencyId 社区的agencyId
+ * @description 网格或者社区下: 党员发布的议题总数
**/
- private int getParyPublishIssueTotal(String customerId, List partyMemberUserIds) {
- if (CollectionUtils.isEmpty(partyMemberUserIds)) {
- return NumConstant.ZERO;
- }
- return factOriginIssueMainDailyService.getParyPublishIssueTotal(customerId, partyMemberUserIds);
+ private int getParyPublishIssueTotal(String customerId, String gridId, String agencyId) {
+ return factOriginIssueMainDailyService.getParyPublishIssueTotal(customerId, gridId, agencyId);
}
/**
- * @param customerId
- * @param gridId
* @return int
- * @author yinzuomei
- * @description 当前网格内所有议题总数
- * @Date 2020/9/23 15:21
+ * @param customerId 客户id
+ * @param gridId 网格id
+ * @param communityId 社区的agencyId
+ * @description 网格或者社区下 :议题总数
**/
- private int getGridIssueTotal(String customerId, String gridId) {
- return factOriginIssueMainDailyService.getGridIssueTotalByGrid(customerId, gridId);
+ private int getGridOrCommunityIssueTotal(String customerId, String gridId, String communityId) {
+ return factOriginIssueMainDailyService.getGridOrCommunityIssueTotal(customerId, gridId, communityId);
}
/**
- * @param customerId
- * @param gridId
* @return java.lang.Integer
- * @author yinzuomei
- * @description 网格内议题转项目数
- * @Date 2020/9/23 15:38
+ * @param customerId 客户id
+ * @param gridId 网格id
+ * @param communityId 社区的agencyId
+ * @description 网格或者社区下: 议题转项目数
**/
- private Integer getGridShiftProjectTotal(String customerId, String gridId) {
- return factOriginIssueMainDailyService.getShiftProjectTotalByGrid(customerId, gridId);
- }
-
-
- @Override
- public void extractCommunityPioneerData(String customerId, String dateId) {
-
+ private Integer getGridOrCommunityShiftProjectTotal(String customerId, String gridId, String communityId) {
+ return factOriginIssueMainDailyService.getGridOrCommunityShiftProjectTotal(customerId, gridId, communityId);
}
- @Override
- public void extractStreetPioneerData(String customerId, String dateId) {
-
- }
-
- @Override
- public void extractDistrictPioneerData(String customerId, String dateId) {
-
- }
-
- @Override
- public void extractCityPioneerData(String customerId, String dateId) {
-
- }
-
- @Override
- public void extractProvincePioneerData(String customerId, String dateId) {
-
- }
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java
new file mode 100644
index 0000000000..ae0aab7fa0
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java
@@ -0,0 +1,54 @@
+package com.epmet.service.evaluationindex.extract.toscreen.impl;
+
+import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectMainDailyService;
+import com.epmet.service.evaluationindex.extract.toscreen.PublicPartExtractService;
+import com.epmet.service.evaluationindex.screen.ScreenCustomerAgencyService;
+import com.epmet.service.evaluationindex.screen.ScreenPublicPartiTotalDataService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * desc:公众参与抽取到大屏的接口实现类
+ *
+ * @author: LiuJanJun
+ * @date: 2020/9/25 10:46 上午
+ * @version: 1.0
+ */
+@Service
+public class PublicPartExtractServiceImpl implements PublicPartExtractService {
+
+ @Autowired
+ private ScreenPublicPartiTotalDataService screenPublicPartiTotalDataService;
+ @Autowired
+ private FactOriginProjectMainDailyService factOriginProjectMainDailyService;
+ @Autowired
+ private ScreenCustomerAgencyService agencyService;
+
+
+ /**
+ * desc: 【月】抽取公众参与 人均议题 总次数和平均参与度
+ * target:screen_user_join
+ *
+ * @return java.lang.Boolean
+ * @author LiuJanJun
+ * @date 2020/9/25 10:24 上午
+ */
+ @Override
+ public Boolean extractTotalDataMonthly() {
+ //agencyService.initAgencies();
+ return null;
+ }
+
+ /**
+ * desc: 【日】抽取公众参与 各类总数
+ * target:screen_public_parti_total_data
+ *
+ * @return java.lang.Boolean
+ * @author LiuJanJun
+ * @date 2020/9/25 10:24 上午
+ */
+ @Override
+ public Boolean extractPerTotalDataDaily() {
+ return null;
+ }
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenCentralZoneDataAbsorptionServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenCentralZoneDataAbsorptionServiceImpl.java
new file mode 100644
index 0000000000..40d47d4f91
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenCentralZoneDataAbsorptionServiceImpl.java
@@ -0,0 +1,50 @@
+package com.epmet.service.evaluationindex.extract.toscreen.impl;
+
+import com.epmet.commons.tools.constant.NumConstant;
+import com.epmet.commons.tools.utils.DateUtils;
+import com.epmet.dto.screen.form.ScreenCentralZoneDataFormDTO;
+import com.epmet.entity.evaluationindex.screen.ScreenUserTotalDataEntity;
+import com.epmet.service.evaluationindex.extract.toscreen.ScreenCentralZoneDataAbsorptionService;
+import com.epmet.service.evaluationindex.screen.ScreenUserTotalDataService;
+import com.epmet.service.stats.ScreenCentralZoneDataExtractService;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+
+/**
+ * @Description
+ * @ClassName ScreenCentralZoneDataAbsorptionServiceImpl
+ * @Auth wangc
+ * @Date 2020-09-24 10:42
+ */
+@Service
+@Slf4j
+public class ScreenCentralZoneDataAbsorptionServiceImpl implements ScreenCentralZoneDataAbsorptionService {
+
+ @Autowired
+ private ScreenCentralZoneDataExtractService screenCentralZoneDataExtractService;
+ @Autowired
+ private ScreenUserTotalDataService screenUserTotalDataService;
+
+ /**
+ * @Description 中央区数据写入
+ * @param param
+ * @return
+ * @author wangc
+ * @date 2020.09.24 10:41
+ **/
+ @Override
+ public void centralZoneDataHub(ScreenCentralZoneDataFormDTO param) {
+ if(StringUtils.isBlank(param.getDateId())){
+ //默认前一天
+ param.setDateId(DateUtils.getBeforeNDay(NumConstant.ONE));
+ }
+ List dataList = screenCentralZoneDataExtractService.extractCentralZoneData(param.getCustomerId(),param.getDateId());
+
+ screenUserTotalDataService.dataClean(dataList,param.getCustomerId());
+ }
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java
new file mode 100644
index 0000000000..bab236a466
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java
@@ -0,0 +1,82 @@
+package com.epmet.service.evaluationindex.extract.toscreen.impl;
+
+import com.epmet.commons.tools.constant.NumConstant;
+import com.epmet.commons.tools.utils.DateUtils;
+import com.epmet.dto.extract.form.ExtractFormDTO;
+import com.epmet.service.evaluationindex.extract.toscreen.PartyBaseInfoService;
+import com.epmet.service.evaluationindex.extract.toscreen.PioneerDataExtractService;
+import com.epmet.service.evaluationindex.extract.toscreen.ScreenExtractService;
+import com.epmet.service.stats.DimCustomerService;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.time.LocalDate;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Author zxc
+ * @DateTime 2020/9/24 9:57 上午
+ */
+@Service
+@Slf4j
+public class ScreenExtractServiceImpl implements ScreenExtractService {
+
+ @Autowired
+ private DimCustomerService dimCustomerService;
+ @Autowired
+ private PartyBaseInfoService partyBaseInfoService;
+ @Autowired
+ private PioneerDataExtractService pioneerDataExtractService;
+
+ /**
+ * @Description 抽取数据到大屏【天】
+ * @param extractFormDTO
+ * @author zxc
+ * @date 2020/9/24 10:15 上午
+ */
+ @Override
+ public void extractDailyAll(ExtractFormDTO extractFormDTO) {
+ List customerIds = new ArrayList<>();
+ if (StringUtils.isNotBlank(extractFormDTO.getCustomerId())){
+ customerIds.add(extractFormDTO.getCustomerId());
+ }else {
+ int pageNo = NumConstant.ONE;
+ int pageSize = NumConstant.ONE_HUNDRED;
+ customerIds = dimCustomerService.selectCustomerIdPage(pageNo, pageSize);
+ }
+ if (!CollectionUtils.isEmpty(customerIds)){
+ customerIds.forEach(customerId -> {
+ if (StringUtils.isNotBlank(extractFormDTO.getStartDate()) && StringUtils.isNotBlank(extractFormDTO.getEndDate())){
+ List daysBetween = DateUtils.getDaysBetween(extractFormDTO.getStartDate(), extractFormDTO.getEndDate());
+ daysBetween.forEach(dateId -> {
+ extractDaily(customerId,dateId);
+ });
+ }else if (StringUtils.isNotBlank(extractFormDTO.getDateId())){
+ extractDaily(customerId,extractFormDTO.getDateId());
+ }else {
+ String dateId = LocalDate.now().minusDays(NumConstant.ONE).toString().replace("-", "");
+ extractDaily(customerId,dateId);
+ }
+ });
+ }
+
+ }
+
+ /**
+ * @Description 按天计算
+ * @param customerId
+ * @param dateId
+ * @author zxc
+ * @date 2020/9/24 10:16 上午
+ */
+ public void extractDaily(String customerId,String dateId){
+ partyBaseInfoService.statsPartyMemberBaseInfoToScreen(customerId,dateId);
+ pioneerDataExtractService.extractGridPioneerData(customerId,dateId);
+ pioneerDataExtractService.extractCommunityPioneerData(customerId,dateId);
+ pioneerDataExtractService.extractExceptCommunityPioneerData(customerId,dateId);
+ }
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java
index c9e0411462..33246cad86 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java
@@ -26,14 +26,18 @@ import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.constant.IndexCalConstant;
+import com.epmet.constant.ProjectConstant;
import com.epmet.dao.evaluationindex.indexcal.DeptScoreDao;
+import com.epmet.dao.evaluationindex.indexcal.DeptSelfSubScoreDao;
import com.epmet.dao.evaluationindex.indexcal.DeptSubScoreDao;
import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyDao;
+import com.epmet.dao.evaluationindex.screen.IndexGroupDetailDao;
import com.epmet.dao.evaluationindex.screen.ScreenCustomerDeptDao;
import com.epmet.dto.indexcal.CalculateCommonFormDTO;
import com.epmet.dto.indexcal.DeotScore;
import com.epmet.dto.indexcal.DeptScoreDetailDTO;
import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity;
+import com.epmet.entity.evaluationindex.indexcal.DeptSelfSubScoreEntity;
import com.epmet.entity.evaluationindex.indexcal.DeptSubScoreEntity;
import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity;
import com.epmet.entity.evaluationindex.screen.ScreenCustomerDeptEntity;
@@ -59,10 +63,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
@@ -91,6 +92,10 @@ public class DeptScoreServiceImpl extends BaseServiceImpl indexList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(),
+ IndexCodeEnum.QU_ZHI_BU_MEN.getCode());
+ if (CollectionUtils.isEmpty(indexList)) {
+ log.error("calculateSelfSubScore customerId:{} have not any indexGroupDetail", formDTO.getCustomerId());
+ throw new RenException("客户【网格相关】指标权重信息不存在");
+ }
+ indexList.forEach(index -> {
+ String levelIndexPath = index.getAllParentIndexCode().concat(StrConstant.COLON).concat(index.getIndexCode());
+ //获取出指标之间的关系
+ List selfSubIndexList = indexGroupDetailDao.selectSelfSubIndex(formDTO.getCustomerId(), levelIndexPath);
+ if (CollectionUtils.isEmpty(selfSubIndexList)) {
+ log.error("calculateSelfSubScore indexGroupDetailDao.selectSelfSubIndex return empty,customerId:{}", formDTO.getCustomerId());
+ return;
+ }
+ //获取该能力下的分数
+ List subScore = deptSubScoreDao.selectSubListByPath(formDTO.getCustomerId(), formDTO.getMonthId(), levelIndexPath);
+ if (CollectionUtils.isEmpty(subScore)) {
+ log.error("calculateSelfSubScore communitySubScoreDao.selectSubListByPath return empty,customerId:{} ", formDTO.getCustomerId());
+ return;
+ }
+ Map> selfSubParentMap = new HashMap<>();
+ selfSubParentMap.put(ProjectConstant.ZI_SHEN, new HashSet<>());
+ selfSubParentMap.put(ProjectConstant.XIA_JI, new HashSet<>());
+ selfSubIndexList.forEach(o -> {
+ //找出自身 和下级的指标
+ if (o.getAllIndexCodePath().indexOf(ProjectConstant.XIA_JI) > -1) {
+ selfSubParentMap.get(ProjectConstant.XIA_JI).add(o.getIndexCode());
+ } else {
+ selfSubParentMap.get(ProjectConstant.ZI_SHEN).add(o.getIndexCode());
+ }
+ });
+ Map insertMap = new HashMap<>();
+ subScore.forEach(score -> {
+ String key = score.getAgencyId().concat(index.getIndexCode());
+ DeptSelfSubScoreEntity scoreEntity = insertMap.get(key);
+ if (scoreEntity == null) {
+ scoreEntity = ConvertUtils.sourceToTarget(score, DeptSelfSubScoreEntity.class);
+ insertMap.put(key, scoreEntity);
+ scoreEntity.setSelfScore(new BigDecimal(0));
+ scoreEntity.setSubScore(new BigDecimal(0));
+ scoreEntity.setParentIndexCode(index.getIndexCode());
+ scoreEntity.setSelfWeight(new BigDecimal(0));
+ scoreEntity.setSubWeight(new BigDecimal(0));
+ }
+ BigDecimal partScore = score.getScore().multiply(score.getWeight());
+ if (selfSubParentMap.get(ProjectConstant.XIA_JI).contains(score.getIndexCode())) {
+ scoreEntity.setSubScore(scoreEntity.getSubScore().add(partScore));
+ scoreEntity.setSubWeight(scoreEntity.getSubWeight().add(score.getWeight()));
+ } else {
+ scoreEntity.setSelfScore(scoreEntity.getSelfScore().add(partScore));
+ scoreEntity.setSelfWeight(scoreEntity.getSelfWeight().add(score.getWeight()));
+ }
+ log.debug("=====key" + key + ",grid:{},originScore:{},weight:{},finalScore:{},total", score.getAgencyId(), score.getScore(), score.getWeight(), partScore);
+ });
+ deleteAndInsertSelfSubScore(formDTO, index.getIndexCode(), insertMap);
+ });
+ }
+
+ @Transactional(rollbackFor = Exception.class)
+ public void deleteAndInsertSelfSubScore(CalculateCommonFormDTO formDTO, String indexCode, Map insertMap) {
+ int effectRow = 0;
+ do {
+ deptSelfSubScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), indexCode);
+ } while (effectRow > 0);
+
+ deptSelfSubScoreDao.insertBatch(new ArrayList<>(insertMap.values()));
+ }
+
/**
- * @return void
* @param formDTO
+ * @return void
* @author yinzuomei
* @description 区直部门-党建能力分值计算
- * @Date 2020/9/10 17:21
+ * @Date 2020/9/10 17:21
**/
private void calculateZhiLiNengLiScore(CalculateCommonFormDTO formDTO) {
//获取区直部门的治理能力下,五级指标权重
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java
index 96a20fa266..dd000900d3 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java
@@ -9,6 +9,7 @@ import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.constant.IndexCalConstant;
+import com.epmet.constant.ProjectConstant;
import com.epmet.dao.evaluationindex.indexcal.CpcScoreDao;
import com.epmet.dao.evaluationindex.indexcal.GridScoreDao;
import com.epmet.dao.evaluationindex.indexcal.GridSelfSubScoreDao;
@@ -126,14 +127,14 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
return;
}
Map> selfSubParentMap = new HashMap<>();
- selfSubParentMap.put("zishen", new HashSet<>());
- selfSubParentMap.put("xiaji", new HashSet<>());
+ selfSubParentMap.put(ProjectConstant.ZI_SHEN, new HashSet<>());
+ selfSubParentMap.put(ProjectConstant.XIA_JI, new HashSet<>());
selfSubIndexList.forEach(o -> {
//找出自身 和下级的指标
- if (o.getAllIndexCodePath().indexOf("xiaji") > -1) {
- selfSubParentMap.get("xiaji").add(o.getIndexCode());
+ if (o.getAllIndexCodePath().indexOf(ProjectConstant.XIA_JI) > -1) {
+ selfSubParentMap.get(ProjectConstant.XIA_JI).add(o.getIndexCode());
} else {
- selfSubParentMap.get("zishen").add(o.getIndexCode());
+ selfSubParentMap.get(ProjectConstant.ZI_SHEN).add(o.getIndexCode());
}
});
Map insertMap = new HashMap<>();
@@ -151,8 +152,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
scoreEntity.setSubWeight(new BigDecimal(0));
}
BigDecimal partScore = score.getScore().multiply(score.getWeight());
- BigDecimal partWeight = score.getScore().multiply(score.getWeight());
- if (selfSubParentMap.get("xiaji").contains(score.getIndexCode())) {
+ if (selfSubParentMap.get(ProjectConstant.XIA_JI).contains(score.getIndexCode())) {
scoreEntity.setSubScore(scoreEntity.getSubScore().add(partScore));
scoreEntity.setSubWeight(scoreEntity.getSubWeight().add(score.getWeight()));
} else {
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java
index 9fee142586..5d9523550c 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java
@@ -10,6 +10,7 @@ import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.constant.IndexCalConstant;
+import com.epmet.constant.ProjectConstant;
import com.epmet.dao.evaluationindex.indexcal.CommunityScoreDao;
import com.epmet.dao.evaluationindex.indexcal.CommunitySelfSubScoreDao;
import com.epmet.dao.evaluationindex.indexcal.CommunitySubScoreDao;
@@ -135,14 +136,14 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
return;
}
Map> selfSubParentMap = new HashMap<>();
- selfSubParentMap.put("zishen", new HashSet<>());
- selfSubParentMap.put("xiaji", new HashSet<>());
+ selfSubParentMap.put(ProjectConstant.ZI_SHEN, new HashSet<>());
+ selfSubParentMap.put(ProjectConstant.XIA_JI, new HashSet<>());
selfSubIndexList.forEach(o -> {
//找出自身 和下级的指标
- if (o.getAllIndexCodePath().indexOf("xiaji") > -1) {
- selfSubParentMap.get("xiaji").add(o.getIndexCode());
+ if (o.getAllIndexCodePath().indexOf(ProjectConstant.XIA_JI) > -1) {
+ selfSubParentMap.get(ProjectConstant.XIA_JI).add(o.getIndexCode());
} else {
- selfSubParentMap.get("zishen").add(o.getIndexCode());
+ selfSubParentMap.get(ProjectConstant.ZI_SHEN).add(o.getIndexCode());
}
});
Map insertMap = new HashMap<>();
@@ -159,7 +160,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
scoreEntity.setSubWeight(new BigDecimal(0));
}
BigDecimal partScore = score.getScore().multiply(score.getWeight());
- if (selfSubParentMap.get("xiaji").contains(score.getIndexCode())) {
+ if (selfSubParentMap.get(ProjectConstant.XIA_JI).contains(score.getIndexCode())) {
scoreEntity.setSubScore(scoreEntity.getSubScore().add(partScore));
scoreEntity.setSubWeight(scoreEntity.getSubWeight().add(score.getWeight()));
} else {
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java
index 0c5ecca06c..80163e8646 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java
@@ -10,6 +10,8 @@ import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.constant.IndexCalConstant;
+import com.epmet.constant.OrgTypeConstant;
+import com.epmet.constant.ProjectConstant;
import com.epmet.dao.evaluationindex.indexcal.AgencyScoreDao;
import com.epmet.dao.evaluationindex.indexcal.AgencySelfSubScoreDao;
import com.epmet.dao.evaluationindex.indexcal.AgencySubScoreDao;
@@ -112,7 +114,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
private void calculateSelfSubScore(CalculateCommonFormDTO formDTO) {
//todo 指标添加缓存
List indexList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(),
- IndexCodeEnum.QU_ZHI_BU_MEN.getCode());
+ IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode());
if (CollectionUtils.isEmpty(indexList)) {
log.error("calculateSelfSubScore customerId:{} have not any indexGroupDetail", formDTO.getCustomerId());
throw new RenException("客户【网格相关】指标权重信息不存在");
@@ -126,20 +128,20 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
return;
}
//获取该能力下的分数
- List subScore = agencySubScoreDao.selectSubListByPath(formDTO.getCustomerId(), formDTO.getMonthId(), levelIndexPath);
+ List subScore = agencySubScoreDao.selectSubListByPath(formDTO.getCustomerId(), formDTO.getMonthId(), OrgTypeConstant.DISTRICT, levelIndexPath);
if (CollectionUtils.isEmpty(subScore)) {
log.error("calculateSelfSubScore communitySubScoreDao.selectSubListByPath return empty,customerId:{} ", formDTO.getCustomerId());
return;
}
Map> selfSubParentMap = new HashMap<>();
- selfSubParentMap.put("zishen", new HashSet<>());
- selfSubParentMap.put("xiaji", new HashSet<>());
+ selfSubParentMap.put(ProjectConstant.ZI_SHEN, new HashSet<>());
+ selfSubParentMap.put(ProjectConstant.XIA_JI, new HashSet<>());
selfSubIndexList.forEach(o -> {
//找出自身 和下级的指标
- if (o.getAllIndexCodePath().indexOf("xiaji") > -1) {
- selfSubParentMap.get("xiaji").add(o.getIndexCode());
+ if (o.getAllIndexCodePath().indexOf(ProjectConstant.XIA_JI) > -1) {
+ selfSubParentMap.get(ProjectConstant.XIA_JI).add(o.getIndexCode());
} else {
- selfSubParentMap.get("zishen").add(o.getIndexCode());
+ selfSubParentMap.get(ProjectConstant.ZI_SHEN).add(o.getIndexCode());
}
});
Map insertMap = new HashMap<>();
@@ -156,7 +158,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
scoreEntity.setSubWeight(new BigDecimal(0));
}
BigDecimal partScore = score.getScore().multiply(score.getWeight());
- if (selfSubParentMap.get("xiaji").contains(score.getIndexCode())) {
+ if (selfSubParentMap.get(ProjectConstant.XIA_JI).contains(score.getIndexCode())) {
scoreEntity.setSubScore(scoreEntity.getSubScore().add(partScore));
scoreEntity.setSubWeight(scoreEntity.getSubWeight().add(score.getWeight()));
} else {
@@ -173,7 +175,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
public void deleteAndInsertSelfSubScore(CalculateCommonFormDTO formDTO, String indexCode, Map insertMap) {
int effectRow = 0;
do {
- agencySelfSubScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), indexCode);
+ agencySelfSubScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), OrgTypeConstant.DISTRICT, indexCode);
} while (effectRow > 0);
agencySelfSubScoreDao.insertBatch(new ArrayList<>(insertMap.values()));
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java
index c5099fe557..88d329ca6b 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java
@@ -10,6 +10,8 @@ import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.constant.IndexCalConstant;
+import com.epmet.constant.OrgTypeConstant;
+import com.epmet.constant.ProjectConstant;
import com.epmet.dao.evaluationindex.indexcal.AgencyScoreDao;
import com.epmet.dao.evaluationindex.indexcal.AgencySelfSubScoreDao;
import com.epmet.dao.evaluationindex.indexcal.AgencySubScoreDao;
@@ -129,20 +131,20 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
return;
}
//获取该能力下的分数
- List subScore = agencySubScoreDao.selectSubListByPath(formDTO.getCustomerId(), formDTO.getMonthId(), levelIndexPath);
+ List subScore = agencySubScoreDao.selectSubListByPath(formDTO.getCustomerId(), formDTO.getMonthId(), OrgTypeConstant.STREET, levelIndexPath);
if (CollectionUtils.isEmpty(subScore)) {
log.error("calculateSelfSubScore communitySubScoreDao.selectSubListByPath return empty,customerId:{} ", formDTO.getCustomerId());
return;
}
Map> selfSubParentMap = new HashMap<>();
- selfSubParentMap.put("zishen", new HashSet<>());
- selfSubParentMap.put("xiaji", new HashSet<>());
+ selfSubParentMap.put(ProjectConstant.ZI_SHEN, new HashSet<>());
+ selfSubParentMap.put(ProjectConstant.XIA_JI, new HashSet<>());
selfSubIndexList.forEach(o -> {
//找出自身 和下级的指标
- if (o.getAllIndexCodePath().indexOf("xiaji") > -1) {
- selfSubParentMap.get("xiaji").add(o.getIndexCode());
+ if (o.getAllIndexCodePath().indexOf(ProjectConstant.XIA_JI) > -1) {
+ selfSubParentMap.get(ProjectConstant.XIA_JI).add(o.getIndexCode());
} else {
- selfSubParentMap.get("zishen").add(o.getIndexCode());
+ selfSubParentMap.get(ProjectConstant.ZI_SHEN).add(o.getIndexCode());
}
});
Map insertMap = new HashMap<>();
@@ -159,7 +161,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
scoreEntity.setSubWeight(new BigDecimal(0));
}
BigDecimal partScore = score.getScore().multiply(score.getWeight());
- if (selfSubParentMap.get("xiaji").contains(score.getIndexCode())) {
+ if (selfSubParentMap.get(ProjectConstant.XIA_JI).contains(score.getIndexCode())) {
scoreEntity.setSubScore(scoreEntity.getSubScore().add(partScore));
scoreEntity.setSubWeight(scoreEntity.getSubWeight().add(score.getWeight()));
} else {
@@ -176,7 +178,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
public void deleteAndInsertSelfSubScore(CalculateCommonFormDTO formDTO, String indexCode, Map insertMap) {
int effectRow = 0;
do {
- agencySelfSubScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), indexCode);
+ agencySelfSubScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), OrgTypeConstant.STREET, indexCode);
} while (effectRow > 0);
agencySelfSubScoreDao.insertBatch(new ArrayList<>(insertMap.values()));
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyService.java
new file mode 100644
index 0000000000..8010a566d2
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyService.java
@@ -0,0 +1,24 @@
+package com.epmet.service.evaluationindex.indexcoll;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyEntity;
+
+import java.util.List;
+
+/**
+ * @author zhaoqifeng
+ * @dscription
+ * @date 2020/9/24 14:34
+ */
+public interface FactIndexGovrnAblityGridMonthlyService extends BaseService {
+ /**
+ * 查询客户下网格治理能力
+ *
+ * @param customerId
+ * @param monthId
+ * @return java.util.List
+ * @author zhaoqifeng
+ * @date 2020/9/24 15:41
+ */
+ List getGridByCustomer(String customerId, String monthId);
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexGovrnAblityGridMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexGovrnAblityGridMonthlyServiceImpl.java
new file mode 100644
index 0000000000..5143882c49
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexGovrnAblityGridMonthlyServiceImpl.java
@@ -0,0 +1,20 @@
+package com.epmet.service.evaluationindex.indexcoll.impl;
+
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyDao;
+import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyEntity;
+import com.epmet.service.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyService;
+
+import java.util.List;
+
+/**
+ * @author zhaoqifeng
+ * @dscription
+ * @date 2020/9/24 14:36
+ */
+public class FactIndexGovrnAblityGridMonthlyServiceImpl extends BaseServiceImpl implements FactIndexGovrnAblityGridMonthlyService {
+ @Override
+ public List getGridByCustomer(String customerId, String monthId) {
+ return baseDao.selectGridByCustomer(customerId, monthId);
+ }
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCpcBaseDataService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCpcBaseDataService.java
index d6fc5828cc..314bd3181a 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCpcBaseDataService.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCpcBaseDataService.java
@@ -60,4 +60,12 @@ public interface ScreenCpcBaseDataService extends BaseService selectPartyInfo(String customerId, String dateId,String agencyId);
+ /**
+ * @Description 查询党员信息【直属网格的】
+ * @param gridIds
+ * @author zxc
+ * @date 2020/9/24 3:23 下午
+ */
+ List selectDirectGridPartyInfo(List gridIds,String customerId,String dateId);
+
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCustomerAgencyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCustomerAgencyService.java
index 6d955563f7..0b2ee8e93e 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCustomerAgencyService.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCustomerAgencyService.java
@@ -18,9 +18,12 @@
package com.epmet.service.evaluationindex.screen;
import com.epmet.dto.extract.form.PartyBaseInfoFormDTO;
+import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO;
import com.epmet.dto.extract.result.CustomerAgencyInfoResultDTO;
import java.util.List;
+
+import com.epmet.dto.extract.result.OrgNameResultDTO;
import com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity;
import com.epmet.entity.org.CustomerAgencyEntity;
@@ -75,4 +78,29 @@ public interface ScreenCustomerAgencyService{
* @date 2020/9/23 3:10 下午
*/
List selectAllAgencyIdToParty(String customerId,String dateId);
+
+ /**
+ * @Description 查询客户下所有机关ID
+ * @Param customerId
+ * @Param dateId
+ * @author zxc
+ * @date 2020/9/25 10:39 上午
+ */
+ List