+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dataaggre.dao.evaluationindex;
+
+import com.epmet.dataaggre.dto.datastats.result.GovrnRatioResultDTO;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @Author sun
+ * @Description 指标统计服务
+ */
+@Mapper
+public interface EvaluationIndexDao {
+
+ /**
+ * @Param formDTO
+ * @Description 按类型、日期查询治理指数下响应解决满意自治四个统计率
+ * @author sun
+ */
+ GovrnRatioResultDTO getAgnecyOrGridGoverRatio(@Param("orgId") String orgId, @Param("orgType") String orgType, @Param("dateId") String dateId);
+}
\ No newline at end of file
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/DataStatsService.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/DataStatsService.java
index 1e99251989..8b08a765d2 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/DataStatsService.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/DataStatsService.java
@@ -1,11 +1,7 @@
package com.epmet.dataaggre.service.datastats;
import com.epmet.dataaggre.dto.datastats.FactGroupActDailyDTO;
-import com.epmet.dataaggre.dto.datastats.form.AgenctBasicDataFormDTO;
-import com.epmet.dataaggre.dto.datastats.form.PartyMemberVanguardFormDTO;
-import com.epmet.dataaggre.dto.datastats.form.GridBasicDataFormDTO;
-import com.epmet.dataaggre.dto.datastats.form.SubAgencyFormDTO;
-import com.epmet.dataaggre.dto.datastats.form.SubGridFormDTO;
+import com.epmet.dataaggre.dto.datastats.form.*;
import com.epmet.dataaggre.dto.datastats.result.*;
import com.epmet.dataaggre.dto.resigroup.ActCategoryDictDTO;
import com.epmet.dataaggre.dto.resigroup.result.GroupActRankDetailDTO;
@@ -128,4 +124,39 @@ public interface DataStatsService {
List querySubAnalysisByCode(String customerId, String pid, String dateId, String categoryCode);
List selectGroupActRankDetail(String customerId, String dateId, String orgId, List actCategoryDictDTOList);
+
+ /**
+ * @Param formDTO
+ * @Description 治理实况-当前组织治理指数
+ * @author sun
+ */
+ AgencyGovrnResultDTO agencyGovrn(AgencyGovrnFormDTO formDTO);
+
+ /**
+ * @Param formDTO
+ * @Description 治理实况-组织直属下级治理指数列表
+ * @author sun
+ */
+ List subAgencyGovrnList(AgencyGovrnFormDTO formDTO);
+
+ /**
+ * @Param formDTO
+ * @Description 治理实况-当前网格治理指数
+ * @author sun
+ */
+ GridGovrnResultDTO gridGovrn(GridGovrnFormDTO formDTO);
+
+ /**
+ * @Param formDTO
+ * @Description 治理实况-组织直属网格治理指数列表
+ * @author sun
+ */
+ List subGridGovrnList(GridGovrnFormDTO formDTO);
+
+ /**
+ * @Param formDTO
+ * @Description 治理实况-组织/网格下响应解决满意自治率
+ * @author sun
+ */
+ GovrnRatioResultDTO governRatio(GovrnRatioFormDTO formDTO);
}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java
index 9daf0c36ab..c636d2fe11 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java
@@ -7,17 +7,14 @@ import com.epmet.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.constant.OrgConstant;
import com.epmet.dataaggre.dao.datastats.DataStatsDao;
import com.epmet.dataaggre.dto.datastats.FactGroupActDailyDTO;
-import com.epmet.dataaggre.dto.datastats.form.AgenctBasicDataFormDTO;
-import com.epmet.dataaggre.dto.datastats.form.PartyMemberVanguardFormDTO;
-import com.epmet.dataaggre.dto.datastats.form.GridBasicDataFormDTO;
-import com.epmet.dataaggre.dto.datastats.form.SubAgencyFormDTO;
-import com.epmet.dataaggre.dto.datastats.form.SubGridFormDTO;
+import com.epmet.dataaggre.dto.datastats.form.*;
import com.epmet.dataaggre.dto.datastats.result.*;
import com.epmet.dataaggre.dto.resigroup.ActCategoryDictDTO;
import com.epmet.dataaggre.dto.resigroup.result.GroupActRankDetailDTO;
import com.epmet.dataaggre.entity.datastats.DimAgencyEntity;
import com.epmet.dataaggre.entity.datastats.DimGridEntity;
import com.epmet.dataaggre.service.datastats.DataStatsService;
+import com.epmet.dataaggre.service.evaluationindex.EvaluationIndexService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
@@ -43,6 +40,8 @@ import java.util.stream.Collectors;
public class DataStatsServiceImpl implements DataStatsService {
@Autowired
private DataStatsDao dataStatsDao;
+ @Autowired
+ private EvaluationIndexService indexService;
/**
@@ -267,18 +266,24 @@ public class DataStatsServiceImpl implements DataStatsService {
List agencyIds = subAgencyList.stream().map(DimAgencyEntity::getId).collect(Collectors.toList());
//2.查询直属下级组织注册用户日统计数据,默认按用户总数降序
- resultList = dataStatsDao.getSubAgencyUser(agencyIds, formDTO.getDateId());
+ List list = dataStatsDao.getSubAgencyUser(agencyIds, formDTO.getDateId());
//3.封装数据
- resultList.forEach(re -> {
- re.setPartyMemberRatio(re.getPartyMemberTotal() == 0 || re.getUserTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) re.getPartyMemberTotal() / (float) re.getUserTotal())));
- re.setResiRatio(re.getResiTotal() == 0 || re.getUserTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) re.getResiTotal() / (float) re.getUserTotal())));
- subAgencyList.forEach(sub -> {
- if (re.getAgencyId().equals(sub.getId())) {
- re.setAgencyName(sub.getAgencyName());
+ for (DimAgencyEntity sub : subAgencyList) {
+ SubAgencyUserResultDTO dto = new SubAgencyUserResultDTO();
+ dto.setAgencyId(sub.getId());
+ dto.setAgencyName(sub.getAgencyName());
+ for (SubAgencyUserResultDTO u : list) {
+ if (sub.getId().equals(u.getAgencyId())) {
+ dto.setUserTotal(u.getUserTotal());
+ dto.setPartyMemberTotal(u.getPartyMemberTotal());
+ dto.setResiTotal(u.getResiTotal());
}
- });
- });
+ }
+ dto.setPartyMemberRatio(dto.getPartyMemberTotal() == 0 || dto.getUserTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) dto.getPartyMemberTotal() / (float) dto.getUserTotal())));
+ dto.setResiRatio(dto.getResiTotal() == 0 || dto.getUserTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) dto.getResiTotal() / (float) dto.getUserTotal())));
+ resultList.add(dto);
+ }
//4.按要求排序并返回
Collections.sort(resultList, new Comparator() {
@@ -330,18 +335,24 @@ public class DataStatsServiceImpl implements DataStatsService {
List gridIds = gridList.stream().map(DimGridEntity::getId).collect(Collectors.toList());
//2.查询网格层级注册用户日统计数据,默认按用户总数降序
- resultList = dataStatsDao.getSubGridUser(gridIds, formDTO.getDateId());
+ List list = dataStatsDao.getSubGridUser(gridIds, formDTO.getDateId());
//3.封装数据
- resultList.forEach(re -> {
- re.setPartyMemberRatio(re.getPartyMemberTotal() == 0 || re.getUserTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) re.getPartyMemberTotal() / (float) re.getUserTotal())));
- re.setResiRatio(re.getResiTotal() == 0 || re.getUserTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) re.getResiTotal() / (float) re.getUserTotal())));
- gridList.forEach(sub -> {
- if (re.getGridId().equals(sub.getId())) {
- re.setGridName(sub.getGridName());
+ for (DimGridEntity gr : gridList) {
+ SubGridUserResultDTO dto = new SubGridUserResultDTO();
+ dto.setGridId(gr.getId());
+ dto.setGridName(gr.getGridName());
+ for (SubGridUserResultDTO re : list) {
+ if (gr.getId().equals(re.getGridId())) {
+ dto.setUserTotal(re.getUserTotal());
+ dto.setPartyMemberTotal(re.getPartyMemberTotal());
+ dto.setResiTotal(re.getResiTotal());
}
- });
- });
+ }
+ dto.setPartyMemberRatio(dto.getPartyMemberTotal() == 0 || dto.getUserTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) dto.getPartyMemberTotal() / (float) dto.getUserTotal())));
+ dto.setResiRatio(dto.getResiTotal() == 0 || dto.getUserTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) dto.getResiTotal() / (float) dto.getUserTotal())));
+ resultList.add(dto);
+ }
//4.按要求排序并返回
Collections.sort(resultList, new Comparator() {
@@ -391,18 +402,24 @@ public class DataStatsServiceImpl implements DataStatsService {
List agencyIds = subAgencyList.stream().map(DimAgencyEntity::getId).collect(Collectors.toList());
//2.查询直属下级组织小组日统计数据,默认按群组总数降序
- resultList = dataStatsDao.getSubAgencyGroup(agencyIds, formDTO.getDateId());
+ List list = dataStatsDao.getSubAgencyGroup(agencyIds, formDTO.getDateId());
//3.封装数据
- resultList.forEach(re -> {
- re.setOrdinaryRatio(re.getOrdinaryTotal() == 0 || re.getGroupTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) re.getOrdinaryTotal() / (float) re.getGroupTotal())));
- re.setBranchRatio(re.getBranchTotal() == 0 || re.getGroupTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) re.getBranchTotal() / (float) re.getGroupTotal())));
- subAgencyList.forEach(sub -> {
- if (re.getAgencyId().equals(sub.getId())) {
- re.setAgencyName(sub.getAgencyName());
+ for (DimAgencyEntity sub : subAgencyList) {
+ SubAgencyGroupResultDTO dto = new SubAgencyGroupResultDTO();
+ dto.setAgencyId(sub.getId());
+ dto.setAgencyName(sub.getAgencyName());
+ for (SubAgencyGroupResultDTO u : list) {
+ if (sub.getId().equals(u.getAgencyId())) {
+ dto.setGroupTotal(u.getGroupTotal());
+ dto.setOrdinaryTotal(u.getOrdinaryTotal());
+ dto.setBranchTotal(u.getBranchTotal());
}
- });
- });
+ }
+ dto.setOrdinaryRatio(dto.getOrdinaryTotal() == 0 || dto.getGroupTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) dto.getOrdinaryTotal() / (float) dto.getGroupTotal())));
+ dto.setBranchRatio(dto.getBranchTotal() == 0 || dto.getGroupTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) dto.getBranchTotal() / (float) dto.getGroupTotal())));
+ resultList.add(dto);
+ }
//4.按要求排序并返回
Collections.sort(resultList, new Comparator() {
@@ -451,18 +468,24 @@ public class DataStatsServiceImpl implements DataStatsService {
List gridIds = gridList.stream().map(DimGridEntity::getId).collect(Collectors.toList());
//2.查询网格层级小组日统计数据,默认按群组总数降序
- resultList = dataStatsDao.getSubGridGroup(gridIds, formDTO.getDateId());
+ List list = dataStatsDao.getSubGridGroup(gridIds, formDTO.getDateId());
//3.封装数据并返回
- resultList.forEach(re -> {
- re.setOrdinaryRatio(re.getOrdinaryTotal() == 0 || re.getGroupTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) re.getOrdinaryTotal() / (float) re.getGroupTotal())));
- re.setBranchRatio(re.getBranchTotal() == 0 || re.getGroupTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) re.getBranchTotal() / (float) re.getGroupTotal())));
- gridList.forEach(sub -> {
- if (re.getGridId().equals(sub.getId())) {
- re.setGridName(sub.getGridName());
+ for (DimGridEntity gr : gridList) {
+ SubGridGroupResultDTO dto = new SubGridGroupResultDTO();
+ dto.setGridId(gr.getId());
+ dto.setGridName(gr.getGridName());
+ for (SubGridGroupResultDTO re : list) {
+ if (gr.getId().equals(re.getGridId())) {
+ dto.setGroupTotal(re.getGroupTotal());
+ dto.setOrdinaryTotal(re.getOrdinaryTotal());
+ dto.setBranchTotal(re.getBranchTotal());
}
- });
- });
+ }
+ dto.setOrdinaryRatio(dto.getOrdinaryTotal() == 0 || dto.getGroupTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) dto.getOrdinaryTotal() / (float) dto.getGroupTotal())));
+ dto.setBranchRatio(dto.getBranchTotal() == 0 || dto.getGroupTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) dto.getBranchTotal() / (float) dto.getGroupTotal())));
+ resultList.add(dto);
+ }
//4.按要求排序并返回
Collections.sort(resultList, new Comparator() {
@@ -518,15 +541,14 @@ public class DataStatsServiceImpl implements DataStatsService {
List topicShiftIssue = dataStatsDao.getSubAgencyTopicShiftIssue(agencyIds, formDTO.getDateId());
//查询直属下级组织热议中话题-机关日统计数据
List hotdiscuss = dataStatsDao.getSubAgencyTopicHotDiscuss(agencyIds, formDTO.getDateId());
- agencyIds.forEach(agencyId -> {
+ subAgencyList.forEach(sub -> {
SubAgencyTopicResultDTO resultDTO = new SubAgencyTopicResultDTO();
AtomicInteger topicTotal = new AtomicInteger(0);
AtomicInteger closedTotal = new AtomicInteger(0);
AtomicInteger shiftIssueTotal = new AtomicInteger(0);
AtomicInteger hotdiscussTotal = new AtomicInteger(0);
- AtomicReference agencyName = new AtomicReference<>("");
topic.forEach(t -> {
- if (t.getAgencyId().equals(agencyId)) {
+ if (t.getAgencyId().equals(sub.getId())) {
topicTotal.addAndGet(t.getTopicCount());
if (t.getTopicStatus().equals("closed")) {
closedTotal.set(t.getTopicCount());
@@ -534,23 +556,18 @@ public class DataStatsServiceImpl implements DataStatsService {
}
});
topicShiftIssue.forEach(t -> {
- if (t.getAgencyId().equals(agencyId)) {
+ if (t.getAgencyId().equals(sub.getId())) {
shiftIssueTotal.addAndGet(t.getShiftedIssueTotal());
}
});
hotdiscuss.forEach(t -> {
- if (t.getAgencyId().equals(agencyId)) {
+ if (t.getAgencyId().equals(sub.getId())) {
hotdiscussTotal.addAndGet(t.getTopicCount());
}
});
- subAgencyList.forEach(sub -> {
- if (agencyId.equals(sub.getId())) {
- agencyName.set(sub.getAgencyName());
- }
- });
- resultDTO.setAgencyId(agencyId);
- resultDTO.setAgencyName(agencyName.get());
+ resultDTO.setAgencyId(sub.getId());
+ resultDTO.setAgencyName(sub.getAgencyName());
resultDTO.setTopicTotal(topicTotal.get());
resultDTO.setDiscussingTotal(hotdiscussTotal.get());
resultDTO.setDiscussingRatio(resultDTO.getDiscussingTotal() == 0 || resultDTO.getTopicTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) resultDTO.getDiscussingTotal() / (float) resultDTO.getTopicTotal())));
@@ -618,15 +635,14 @@ public class DataStatsServiceImpl implements DataStatsService {
List topicShiftIssue = dataStatsDao.getSubGridTopicShiftIssue(gridIds, formDTO.getDateId());
//查询网格层级热议中话题-日统计数据
List hotdiscuss = dataStatsDao.getSubGridTopicHotDiscuss(gridIds, formDTO.getDateId());
- gridIds.forEach(gridId -> {
+ gridList.forEach(gr -> {
SubGridTopicResultDTO resultDTO = new SubGridTopicResultDTO();
AtomicInteger topicTotal = new AtomicInteger(0);
AtomicInteger closedTotal = new AtomicInteger(0);
AtomicInteger shiftIssueTotal = new AtomicInteger(0);
AtomicInteger hotdiscussTotal = new AtomicInteger(0);
- AtomicReference gridName = new AtomicReference<>("");
topic.forEach(t -> {
- if (t.getGridId().equals(gridId)) {
+ if (t.getGridId().equals(gr.getId())) {
topicTotal.addAndGet(t.getTopicCount());
if (t.getTopicStatus().equals("closed")) {
closedTotal.set(t.getTopicCount());
@@ -634,23 +650,18 @@ public class DataStatsServiceImpl implements DataStatsService {
}
});
topicShiftIssue.forEach(t -> {
- if (t.getGridId().equals(gridId)) {
+ if (t.getGridId().equals(gr.getId())) {
shiftIssueTotal.addAndGet(t.getShiftedIssueTotal());
}
});
hotdiscuss.forEach(t -> {
- if (t.getGridId().equals(gridId)) {
+ if (t.getGridId().equals(gr.getId())) {
hotdiscussTotal.addAndGet(t.getTopicCount());
}
});
- gridList.forEach(sub -> {
- if (gridId.equals(sub.getId())) {
- gridName.set(sub.getGridName());
- }
- });
- resultDTO.setGridId(gridId);
- resultDTO.setGridName(gridName.get());
+ resultDTO.setGridId(gr.getId());
+ resultDTO.setGridName(gr.getGridName());
resultDTO.setTopicTotal(topicTotal.get());
resultDTO.setDiscussingTotal(hotdiscussTotal.get());
resultDTO.setDiscussingRatio(resultDTO.getDiscussingTotal() == 0 || resultDTO.getTopicTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) resultDTO.getDiscussingTotal() / (float) resultDTO.getTopicTotal())));
@@ -711,19 +722,26 @@ public class DataStatsServiceImpl implements DataStatsService {
List agencyIds = subAgencyList.stream().map(DimAgencyEntity::getId).collect(Collectors.toList());
//2.查询直属下级组织议题日统计数据,默认按议题总数降序
- resultList = dataStatsDao.getSubAgencyIssue(agencyIds, formDTO.getDateId());
+ List list = dataStatsDao.getSubAgencyIssue(agencyIds, formDTO.getDateId());
//3.封装数据
- resultList.forEach(re -> {
- re.setVotingRatio(re.getVotingTotal() == 0 || re.getIssueTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) re.getVotingTotal() / (float) re.getIssueTotal())));
- re.setClosedIssueRatio(re.getClosedIssueTotal() == 0 || re.getIssueTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) re.getClosedIssueTotal() / (float) re.getIssueTotal())));
- re.setShiftProjectRatio(re.getShiftProjectTotal() == 0 || re.getIssueTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) re.getShiftProjectTotal() / (float) re.getIssueTotal())));
- subAgencyList.forEach(sub -> {
- if (re.getAgencyId().equals(sub.getId())) {
- re.setAgencyName(sub.getAgencyName());
+ for (DimAgencyEntity sub : subAgencyList) {
+ SubAgencyIssueResultDTO dto = new SubAgencyIssueResultDTO();
+ dto.setAgencyId(sub.getId());
+ dto.setAgencyName(sub.getAgencyName());
+ for (SubAgencyIssueResultDTO u : list) {
+ if (sub.getId().equals(u.getAgencyId())) {
+ dto.setIssueTotal(u.getIssueTotal());
+ dto.setVotingTotal(u.getVotingTotal());
+ dto.setClosedIssueTotal(u.getClosedIssueTotal());
+ dto.setShiftProjectTotal(u.getShiftProjectTotal());
}
- });
- });
+ }
+ dto.setVotingRatio(dto.getVotingTotal() == 0 || dto.getIssueTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) dto.getVotingTotal() / (float) dto.getIssueTotal())));
+ dto.setClosedIssueRatio(dto.getClosedIssueTotal() == 0 || dto.getIssueTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) dto.getClosedIssueTotal() / (float) dto.getIssueTotal())));
+ dto.setShiftProjectRatio(dto.getShiftProjectTotal() == 0 || dto.getIssueTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) dto.getShiftProjectTotal() / (float) dto.getIssueTotal())));
+ resultList.add(dto);
+ }
//4.按要求排序并返回
Collections.sort(resultList, new Comparator() {
@@ -774,19 +792,26 @@ public class DataStatsServiceImpl implements DataStatsService {
List gridIds = gridList.stream().map(DimGridEntity::getId).collect(Collectors.toList());
//2.查询网格层级议题日统计数据,默认按议题总数降序
- resultList = dataStatsDao.getSubGridIssue(gridIds, formDTO.getDateId());
+ List list = dataStatsDao.getSubGridIssue(gridIds, formDTO.getDateId());
//3.封装数据
- resultList.forEach(re -> {
- re.setVotingRatio(re.getVotingTotal() == 0 || re.getIssueTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) re.getVotingTotal() / (float) re.getIssueTotal())));
- re.setClosedIssueRatio(re.getClosedIssueTotal() == 0 || re.getIssueTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) re.getClosedIssueTotal() / (float) re.getIssueTotal())));
- re.setShiftProjectRatio(re.getShiftProjectTotal() == 0 || re.getIssueTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) re.getShiftProjectTotal() / (float) re.getIssueTotal())));
- gridList.forEach(sub -> {
- if (re.getGridId().equals(sub.getId())) {
- re.setGridName(sub.getGridName());
+ for (DimGridEntity gr : gridList) {
+ SubGridIssueResultDTO dto = new SubGridIssueResultDTO();
+ dto.setGridId(gr.getId());
+ dto.setGridName(gr.getGridName());
+ for (SubGridIssueResultDTO re : list) {
+ if (gr.getId().equals(re.getGridId())) {
+ dto.setIssueTotal(re.getIssueTotal());
+ dto.setVotingTotal(re.getVotingTotal());
+ dto.setClosedIssueTotal(re.getClosedIssueTotal());
+ dto.setShiftProjectTotal(re.getShiftProjectTotal());
}
- });
- });
+ }
+ dto.setVotingRatio(dto.getVotingTotal() == 0 || dto.getIssueTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) dto.getVotingTotal() / (float) dto.getIssueTotal())));
+ dto.setClosedIssueRatio(dto.getClosedIssueTotal() == 0 || dto.getIssueTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) dto.getClosedIssueTotal() / (float) dto.getIssueTotal())));
+ dto.setShiftProjectRatio(dto.getShiftProjectTotal() == 0 || dto.getIssueTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) dto.getShiftProjectTotal() / (float) dto.getIssueTotal())));
+ resultList.add(dto);
+ }
//4.按要求排序并返回
Collections.sort(resultList, new Comparator() {
@@ -837,18 +862,24 @@ public class DataStatsServiceImpl implements DataStatsService {
List agencyIds = subAgencyList.stream().map(DimAgencyEntity::getId).collect(Collectors.toList());
//2.查询直属下级组织项目日统计数据,默认按项目总数降序
- resultList = dataStatsDao.getSubAgencyProject(agencyIds, formDTO.getDateId());
+ List list = dataStatsDao.getSubAgencyProject(agencyIds, formDTO.getDateId());
//3.封装数据
- resultList.forEach(re -> {
- re.setPendingRatio(re.getPendingTotal() == 0 || re.getProjectTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) re.getPendingTotal() / (float) re.getProjectTotal())));
- re.setClosedProjectRatio(re.getClosedProjectTotal() == 0 || re.getProjectTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) re.getClosedProjectTotal() / (float) re.getProjectTotal())));
- subAgencyList.forEach(sub -> {
- if (re.getAgencyId().equals(sub.getId())) {
- re.setAgencyName(sub.getAgencyName());
+ for (DimAgencyEntity sub : subAgencyList) {
+ SubAgencyProjectResultDTO dto = new SubAgencyProjectResultDTO();
+ dto.setAgencyId(sub.getId());
+ dto.setAgencyName(sub.getAgencyName());
+ for (SubAgencyProjectResultDTO u : list) {
+ if (sub.getId().equals(u.getAgencyId())) {
+ dto.setProjectTotal(u.getProjectTotal());
+ dto.setPendingTotal(u.getPendingTotal());
+ dto.setClosedProjectTotal(u.getClosedProjectTotal());
}
- });
- });
+ }
+ dto.setPendingRatio(dto.getPendingTotal() == 0 || dto.getProjectTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) dto.getPendingTotal() / (float) dto.getProjectTotal())));
+ dto.setClosedProjectRatio(dto.getClosedProjectTotal() == 0 || dto.getProjectTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) dto.getClosedProjectTotal() / (float) dto.getProjectTotal())));
+ resultList.add(dto);
+ }
//4.按要求排序并返回
Collections.sort(resultList, new Comparator() {
@@ -897,18 +928,24 @@ public class DataStatsServiceImpl implements DataStatsService {
List gridIds = gridList.stream().map(DimGridEntity::getId).collect(Collectors.toList());
//2.查询网格层级项目日统计数据,默认按项目总数降序
- resultList = dataStatsDao.getSubGridProject(gridIds, formDTO.getDateId());
+ List list = dataStatsDao.getSubGridProject(gridIds, formDTO.getDateId());
//3.封装数据
- resultList.forEach(re -> {
- re.setPendingRatio(re.getPendingTotal() == 0 || re.getProjectTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) re.getPendingTotal() / (float) re.getProjectTotal())));
- re.setClosedProjectRatio(re.getClosedProjectTotal() == 0 || re.getProjectTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) re.getClosedProjectTotal() / (float) re.getProjectTotal())));
- gridList.forEach(sub -> {
- if (re.getGridId().equals(sub.getId())) {
- re.setGridName(sub.getGridName());
+ for (DimGridEntity gr : gridList) {
+ SubGridProjectResultDTO dto = new SubGridProjectResultDTO();
+ dto.setGridId(gr.getId());
+ dto.setGridName(gr.getGridName());
+ for (SubGridProjectResultDTO re : list) {
+ if (gr.getId().equals(re.getGridId())) {
+ dto.setProjectTotal(re.getProjectTotal());
+ dto.setPendingTotal(re.getPendingTotal());
+ dto.setClosedProjectTotal(re.getClosedProjectTotal());
}
- });
- });
+ }
+ dto.setPendingRatio(dto.getPendingTotal() == 0 || dto.getProjectTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) dto.getPendingTotal() / (float) dto.getProjectTotal())));
+ dto.setClosedProjectRatio(dto.getClosedProjectTotal() == 0 || dto.getProjectTotal() == 0 ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float) dto.getClosedProjectTotal() / (float) dto.getProjectTotal())));
+ resultList.add(dto);
+ }
//4.按要求排序并返回
Collections.sort(resultList, new Comparator() {
@@ -1014,4 +1051,228 @@ public class DataStatsServiceImpl implements DataStatsService {
return new ArrayList<>();
}
+ /**
+ * @Param formDTO
+ * @Description 治理实况-当前组织治理指数
+ * @author sun
+ */
+ @Override
+ public AgencyGovrnResultDTO agencyGovrn(AgencyGovrnFormDTO formDTO) {
+ AgencyGovrnResultDTO resultDTO = new AgencyGovrnResultDTO();
+ resultDTO.setAgencyId(formDTO.getAgencyId());
+ NumberFormat numberFormat = NumberFormat.getInstance();
+ numberFormat.setMaximumFractionDigits(NumConstant.THREE);
+
+ //入参有日期的则按具体时间执行,没有的则按当前时间前一天执行
+ if (StringUtils.isBlank(formDTO.getDateId())) {
+ Date yesterday = DateUtils.addDateDays(new Date(), -1);
+ SimpleDateFormat format = new SimpleDateFormat(DateUtils.DATE_PATTERN_YYYYMMDD);
+ formDTO.setDateId(format.format(yesterday));
+ }
+ //1.按日期查询当前组织事件治理指数
+ List agencyIds = new ArrayList<>();
+ agencyIds.add(formDTO.getAgencyId());
+ List list = dataStatsDao.getAgencyGovern(agencyIds, formDTO.getDateId());
+ if (list.size() > NumConstant.ZERO) {
+ resultDTO = list.get(NumConstant.ZERO);
+ }
+ return resultDTO;
+ }
+
+ /**
+ * @Param formDTO
+ * @Description 治理实况-组织直属下级治理指数列表
+ * @author sun
+ */
+ @Override
+ public List subAgencyGovrnList(AgencyGovrnFormDTO formDTO) {
+ List resultList = new ArrayList<>();
+ NumberFormat numberFormat = NumberFormat.getInstance();
+ numberFormat.setMaximumFractionDigits(NumConstant.THREE);
+
+ //入参有日期的则按具体时间执行,没有的则按当前时间前一天执行
+ if (StringUtils.isBlank(formDTO.getDateId())) {
+ Date yesterday = DateUtils.addDateDays(new Date(), -1);
+ SimpleDateFormat format = new SimpleDateFormat(DateUtils.DATE_PATTERN_YYYYMMDD);
+ formDTO.setDateId(format.format(yesterday));
+ }
+ //排序类型,默认按问题解决总数降序
+ if (StringUtils.isBlank(formDTO.getDateId())) {
+ formDTO.setType("problem");
+ }
+
+ //1.查询当前组织的直属下级组织信息【机关维度】
+ List subAgencyList = dataStatsDao.getSubAgencyList(formDTO.getAgencyId());
+ if (subAgencyList.size() < NumConstant.ONE) {
+ return resultList;
+ }
+ List agencyIds = subAgencyList.stream().map(DimAgencyEntity::getId).collect(Collectors.toList());
+
+ //2.按日期查询所有下级组织的事件治理指数
+ List list = dataStatsDao.getAgencyGovern(agencyIds, formDTO.getDateId());
+
+ //3.封装数据
+ for (DimAgencyEntity sub : subAgencyList) {
+ AgencyGovrnResultDTO dto = new AgencyGovrnResultDTO();
+ dto.setAgencyId(sub.getId());
+ dto.setAgencyName(sub.getAgencyName());
+ dto.setLevel(sub.getLevel());
+ for (AgencyGovrnResultDTO re : list) {
+ if (sub.getId().equals(re.getAgencyId())) {
+ dto.setProblemResolvedCount(re.getProblemResolvedCount());
+ dto.setGroupSelfGovernRatio(re.getGroupSelfGovernRatio());
+ dto.setGridSelfGovernRatio(re.getGridSelfGovernRatio());
+ dto.setCommunityResolvedRatio(re.getCommunityResolvedRatio());
+ dto.setStreetResolvedRatio(re.getStreetResolvedRatio());
+ dto.setDistrictDeptResolvedRatio(re.getDistrictDeptResolvedRatio());
+ }
+ }
+ resultList.add(dto);
+ }
+
+ //4.按要求排序并返回
+ Collections.sort(resultList, new Comparator() {
+ @Override
+ public int compare(AgencyGovrnResultDTO o1, AgencyGovrnResultDTO o2) {
+ if ("party".equals(formDTO.getType())) {
+ return o2.getGroupSelfGovernRatio().compareTo(o1.getGroupSelfGovernRatio());
+ } else if ("grid".equals(formDTO.getType())) {
+ return o2.getGridSelfGovernRatio().compareTo(o1.getGridSelfGovernRatio());
+ } else if ("community".equals(formDTO.getType())) {
+ return o2.getCommunityResolvedRatio().compareTo(o1.getCommunityResolvedRatio());
+ } else if ("department".equals(formDTO.getType())) {
+ return o2.getDistrictDeptResolvedRatio().compareTo(o1.getDistrictDeptResolvedRatio());
+ } else if ("street".equals(formDTO.getType())) {
+ return o2.getStreetResolvedRatio().compareTo(o1.getStreetResolvedRatio());
+ } else {
+ return o2.getProblemResolvedCount().compareTo(o1.getProblemResolvedCount());
+ }
+ }
+ });
+
+ return resultList;
+ }
+
+ /**
+ * @Param formDTO
+ * @Description 治理实况-当前网格治理指数
+ * @author sun
+ */
+ @Override
+ public GridGovrnResultDTO gridGovrn(GridGovrnFormDTO formDTO) {
+ GridGovrnResultDTO resultDTO = new GridGovrnResultDTO();
+ resultDTO.setGridId(formDTO.getGridId());
+ NumberFormat numberFormat = NumberFormat.getInstance();
+ numberFormat.setMaximumFractionDigits(NumConstant.THREE);
+
+ //入参有日期的则按具体时间执行,没有的则按当前时间前一天执行
+ if (StringUtils.isBlank(formDTO.getDateId())) {
+ Date yesterday = DateUtils.addDateDays(new Date(), -1);
+ SimpleDateFormat format = new SimpleDateFormat(DateUtils.DATE_PATTERN_YYYYMMDD);
+ formDTO.setDateId(format.format(yesterday));
+ }
+
+ //1.按日期查询网格事件治理指数
+ List gridIds = new ArrayList<>();
+ gridIds.add(formDTO.getGridId());
+ List list = dataStatsDao.getGridGovern(gridIds, formDTO.getDateId());
+ if (list.size() > NumConstant.ZERO) {
+ resultDTO = list.get(NumConstant.ZERO);
+ }
+ return resultDTO;
+ }
+
+ /**
+ * @Param formDTO
+ * @Description 治理实况-组织直属网格治理指数列表
+ * @author sun
+ */
+ @Override
+ public List subGridGovrnList(GridGovrnFormDTO formDTO) {
+ List resultList = new ArrayList<>();
+ NumberFormat numberFormat = NumberFormat.getInstance();
+ numberFormat.setMaximumFractionDigits(NumConstant.THREE);
+
+ //入参有日期的则按具体时间执行,没有的则按当前时间前一天执行
+ if (StringUtils.isBlank(formDTO.getDateId())) {
+ Date yesterday = DateUtils.addDateDays(new Date(), -1);
+ SimpleDateFormat format = new SimpleDateFormat(DateUtils.DATE_PATTERN_YYYYMMDD);
+ formDTO.setDateId(format.format(yesterday));
+ }
+ //排序类型,默认按问题解决总数降序
+ if (StringUtils.isBlank(formDTO.getDateId())) {
+ formDTO.setType("problem");
+ }
+
+ //1.查询组织直属网格列表【网格维度】
+ List gridList = dataStatsDao.getSubGridList(formDTO.getAgencyId());
+ if (gridList.size() < NumConstant.ONE) {
+ return resultList;
+ }
+ List gridIds = gridList.stream().map(DimGridEntity::getId).collect(Collectors.toList());
+
+ //2.按日期查找组织直属网格事件治理指数列表
+ List list = dataStatsDao.getGridGovern(gridIds, formDTO.getDateId());
+
+ //3.封装数据
+ for (DimGridEntity gr : gridList) {
+ GridGovrnResultDTO dto = new GridGovrnResultDTO();
+ dto.setGridId(gr.getId());
+ dto.setGridName(gr.getGridName());
+ for (GridGovrnResultDTO re : list) {
+ if (gr.getId().equals(re.getGridId())) {
+ dto.setProblemResolvedCount(re.getProblemResolvedCount());
+ dto.setGroupSelfGovernRatio(re.getGroupSelfGovernRatio());
+ dto.setGridSelfGovernRatio(re.getGridSelfGovernRatio());
+ }
+ }
+ resultList.add(dto);
+ }
+
+ //4.按要求排序并返回
+ Collections.sort(resultList, new Comparator() {
+ @Override
+ public int compare(GridGovrnResultDTO o1, GridGovrnResultDTO o2) {
+ if ("party".equals(formDTO.getType())) {
+ return o2.getGroupSelfGovernRatio().compareTo(o1.getGroupSelfGovernRatio());
+ } else if ("grid".equals(formDTO.getType())) {
+ return o2.getGridSelfGovernRatio().compareTo(o1.getGridSelfGovernRatio());
+ } else {
+ return o2.getProblemResolvedCount().compareTo(o1.getProblemResolvedCount());
+ }
+ }
+ });
+
+ return resultList;
+ }
+
+ /**
+ * @Param formDTO
+ * @Description 治理实况-组织/网格下响应解决满意自治率
+ * @author sun
+ */
+ @Override
+ public GovrnRatioResultDTO governRatio(GovrnRatioFormDTO formDTO) {
+ GovrnRatioResultDTO resultDTO = new GovrnRatioResultDTO();
+ resultDTO.setOrgId(formDTO.getOrgId());
+ resultDTO.setOrgType(formDTO.getOrgType());
+
+ //入参有日期的则按具体时间执行,没有的则按当前时间前一天执行
+ if (StringUtils.isBlank(formDTO.getDateId())) {
+ Date yesterday = DateUtils.addDateDays(new Date(), -1);
+ SimpleDateFormat format = new SimpleDateFormat(DateUtils.DATE_PATTERN_YYYYMMDD);
+ formDTO.setDateId(format.format(yesterday));
+ }
+
+ //1.按类型、日期查询治理指数下响应解决满意自治四个统计率
+ GovrnRatioResultDTO dto = indexService.governRatio(formDTO);
+ if (null != dto) {
+ resultDTO.setResponseRatio(dto.getResponseRatio());
+ resultDTO.setResolvedRatio(dto.getResolvedRatio());
+ resultDTO.setGovernRatio(dto.getGovernRatio());
+ resultDTO.setSatisfactionRatio(dto.getSatisfactionRatio());
+ }
+ return resultDTO;
+ }
+
}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/EvaluationIndexService.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/EvaluationIndexService.java
new file mode 100644
index 0000000000..909a3dc208
--- /dev/null
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/EvaluationIndexService.java
@@ -0,0 +1,18 @@
+package com.epmet.dataaggre.service.evaluationindex;
+
+import com.epmet.dataaggre.dto.datastats.form.GovrnRatioFormDTO;
+import com.epmet.dataaggre.dto.datastats.result.GovrnRatioResultDTO;
+
+/**
+ * @Author sun
+ * @Description 指标统计服务
+ */
+public interface EvaluationIndexService {
+
+ /**
+ * @Param formDTO
+ * @Description 治理实况-组织/网格下响应解决满意自治率
+ * @author sun
+ */
+ GovrnRatioResultDTO governRatio(GovrnRatioFormDTO formDTO);
+}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java
new file mode 100644
index 0000000000..bec7bafd90
--- /dev/null
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java
@@ -0,0 +1,40 @@
+package com.epmet.dataaggre.service.evaluationindex.impl;
+
+import com.epmet.commons.dynamic.datasource.annotation.DataSource;
+import com.epmet.commons.tools.utils.DateUtils;
+import com.epmet.dataaggre.constant.DataSourceConstant;
+import com.epmet.dataaggre.dao.datastats.DataStatsDao;
+import com.epmet.dataaggre.dao.evaluationindex.EvaluationIndexDao;
+import com.epmet.dataaggre.dto.datastats.form.GovrnRatioFormDTO;
+import com.epmet.dataaggre.dto.datastats.result.GovrnRatioResultDTO;
+import com.epmet.dataaggre.service.evaluationindex.EvaluationIndexService;
+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.text.SimpleDateFormat;
+import java.util.Date;
+
+/**
+ * @Author sun
+ * @Description 指标统计服务
+ */
+@Service
+@DataSource(DataSourceConstant.EVALUATION_INDEX)
+@Slf4j
+public class EvaluationIndexServiceImpl implements EvaluationIndexService {
+ @Autowired
+ private EvaluationIndexDao evaluationIndexDao;
+
+ /**
+ * @Param formDTO
+ * @Description 按类型、日期查询治理指数下响应解决满意自治四个统计率
+ * @author sun
+ */
+ @Override
+ public GovrnRatioResultDTO governRatio(GovrnRatioFormDTO formDTO) {
+ return evaluationIndexDao.getAgnecyOrGridGoverRatio(formDTO.getOrgId(),formDTO.getOrgType(),formDTO.getDateId());
+ }
+
+}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/bootstrap.yml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/bootstrap.yml
index cd8b7b8ef1..ab888fc91c 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/bootstrap.yml
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/bootstrap.yml
@@ -131,9 +131,14 @@ dynamic:
password: @datasource.druid.opercrm.password@
datastatistical:
driver-class-name: com.mysql.cj.jdbc.Driver
- url: @datasource.druid.opercrm.url@
- username: @datasource.druid.opercrm.username@
- password: @datasource.druid.opercrm.password@
+ url: @datasource.druid.stats.url@
+ username: @datasource.druid.stats.username@
+ password: @datasource.druid.stats.password@
+ evaluationIndex:
+ driver-class-name: com.mysql.cj.jdbc.Driver
+ url: @datasource.druid.evaluationIndex.url@
+ username: @datasource.druid.evaluationIndex.username@
+ password: @datasource.druid.evaluationIndex.password@
feign:
hystrix:
enabled: true
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml
index 1f1663bd49..7097ca36c5 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml
@@ -612,4 +612,43 @@
WHERE
ID = #{agencyId}
+
+
+
+
+
\ No newline at end of file
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml
new file mode 100644
index 0000000000..a0c2e0c245
--- /dev/null
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactOriginProjectMainDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactOriginProjectMainDailyDTO.java
index 9d1484b5f4..13e1e5fba7 100644
--- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactOriginProjectMainDailyDTO.java
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactOriginProjectMainDailyDTO.java
@@ -138,6 +138,11 @@ public class FactOriginProjectMainDailyDTO implements Serializable {
*/
private String isOverdue;
+ /**
+ * 是否满意 1:是
+ */
+ private Integer isSatisfied;
+
/**
* 办结组织Ids(:隔开,有可能是社区id可能是网格id,无需区分级别,在统计时模糊查询)
*/
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ProjectPointDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ProjectPointDTO.java
new file mode 100644
index 0000000000..abeeab8d89
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ProjectPointDTO.java
@@ -0,0 +1,17 @@
+package com.epmet.dto.project;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author zhaoqifeng
+ * @dscription
+ * @date 2021/5/21 10:53
+ */
+@Data
+public class ProjectPointDTO implements Serializable {
+ private static final long serialVersionUID = -592430619162380664L;
+ private String projectId;
+ private Integer point;
+}
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenGovernRankDataDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenGovernRankDataDailyDTO.java
new file mode 100644
index 0000000000..29d988da64
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenGovernRankDataDailyDTO.java
@@ -0,0 +1,132 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao.evaluationindex.extract;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.evaluationindex.extract.FactAgencyGovernDailyEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 组织的治理指数,按天统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-05-24
+ */
+@Mapper
+public interface FactAgencyGovernDailyDao extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactGridGovernDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactGridGovernDailyDao.java
new file mode 100644
index 0000000000..5d35359bc7
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactGridGovernDailyDao.java
@@ -0,0 +1,33 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service.evaluationindex.extract.todata;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.entity.evaluationindex.extract.FactAgencyGovernDailyEntity;
+
+/**
+ * 组织的治理指数,按天统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-05-24
+ */
+public interface FactAgencyGovernDailyService extends BaseService {
+ // 问题解决总数:当前组织下,话题关闭(已解决+无需解决)总数、议题关闭(已解决+无需解决)总数和项目结案(议题转为项目的结案数+项目立项结案数)总数之和
+ // 党群自治占比:当前组织下,所有小组内关闭(已解决+无需解决)的话题数与问题解决总数之比(未出小组:未转议题的)
+ // 网格自治占比:当前组织下,所有网格内结案项目数与问题解决总数之比(未出网格)
+ // 参考:fact_index_govrn_ablity_grid_monthly的SELF_SOLVE_PROJECT_COUNT计算
+ // 社区解决占比:当前组织下,由社区结案的项目数与问题解决总数之比
+ // 区直部门解决占比:当前组织下,由区级部门结案的项目数与问题解决总数之比
+ // 街道解决占比:当前组织下,由街道结案的项目数与问题解决总数之比
+ // 自下而上的项目解决:结案时操作人所代表的的处理部门(可以是网格、街道、组织)
+ // 自上而下的项目解决:向下吹哨,谁立项谁解决(后期在讨论哪样更合理)
+ //
+ // 究竟是谁解决!!:
+ // A社区→A街道→B社区(结案)——A街道解决(自下而上吹(饱含立项往上吹/从话题来的项目),看往上吹的最高层级)
+ // A社区→B社区→C社区(结案)——C社区解决(平级协助解决,看最后结案)
+ // A街道→A社区→B社区(结案)——A街道解决(自上而下吹,谁立项谁解决)
+ // 注:A社区→A街道→(退回)A社区→B社区(结案),A街道不算处理项目,仍是平级协助解决,看最后谁结案
+
+}
\ 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/FactGridGovernDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactGridGovernDailyService.java
new file mode 100644
index 0000000000..95185f2134
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactGridGovernDailyService.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service.evaluationindex.extract.todata.impl;
+
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.dao.evaluationindex.extract.FactAgencyGovernDailyDao;
+import com.epmet.entity.evaluationindex.extract.FactAgencyGovernDailyEntity;
+import com.epmet.service.evaluationindex.extract.todata.FactAgencyGovernDailyService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 组织的治理指数,按天统计
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-05-24
+ */
+@Service
+public class FactAgencyGovernDailyServiceImpl extends BaseServiceImpl implements FactAgencyGovernDailyService {
+
+
+
+}
\ 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/FactGridGovernDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactGridGovernDailyServiceImpl.java
new file mode 100644
index 0000000000..38b5a2d8a0
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactGridGovernDailyServiceImpl.java
@@ -0,0 +1,74 @@
+/**
+ * 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.
+ *