diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/OrgStatisticsResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/OrgStatisticsResultDTO.java index ad170c5b96..d7fca3b15d 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/OrgStatisticsResultDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/OrgStatisticsResultDTO.java @@ -3,6 +3,7 @@ package com.epmet.dto.extract.result; import lombok.Data; import java.io.Serializable; +import java.math.BigDecimal; /** * @author zhaoqifeng @@ -17,5 +18,5 @@ public class OrgStatisticsResultDTO implements Serializable { private String orgId; private Integer count; private Integer sum; - private String ratio; + private BigDecimal ratio; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index 708bc70d60..ea3cdfbc53 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -105,6 +105,8 @@ public class DemoController { private ScreenCentralZoneDataAbsorptionService screenCentralZoneDataAbsorptionService; @Autowired private GovernRankDataExtractService governRankDataExtractService; + @Autowired + private OrgRankExtractService orgRankExtractService; @GetMapping("testAlarm") public void testAlarm() { @@ -699,5 +701,12 @@ public class DemoController { return new Result(); } + @PostMapping("orgRank") + public Result orgRank(@RequestBody CustomerIdAndDateIdFormDTO formDTO){ + orgRankExtractService.extractGridData(formDTO.getCustomerId(), formDTO.getDateId()); + orgRankExtractService.extractCommunityData(formDTO.getCustomerId(), formDTO.getDateId()); + orgRankExtractService.extractStreetData(formDTO.getCustomerId(), formDTO.getDateId()); + return new Result(); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java index f1ad597f68..e5e603a40f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java @@ -18,6 +18,9 @@ package com.epmet.dao.evaluationindex.extract; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO; +import com.epmet.dto.extract.result.OrgStatisticsResultDTO; +import com.epmet.dto.extract.result.PartyCreateGroupCountResultDTO; import com.epmet.dto.extract.FactOriginGroupMainDailyDTO; import com.epmet.dto.extract.form.GridHeartedFormDTO; import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO; @@ -159,4 +162,25 @@ public interface FactOriginGroupMainDailyDao extends BaseDao selectDistinctGroupMemberCount(@Param("customerId") String customerId, @Param("groupField") String groupField); + + /** + * 获取网格内小组数量 + * @author zhaoqifeng + * @date 2020/9/27 14:37 + * @param customerId + * @param monthId + * @return java.util.List + */ + List selectGridGroupCount(@Param("customerId") String customerId, @Param("monthId") String monthId); + /** + * 获取组织内网格数量 + * @author zhaoqifeng + * @date 2020/9/27 14:37 + * @param customerId + * @param monthId + * @param level + * @return java.util.List + */ + List selectOrgGroupCount(@Param("customerId") String customerId, @Param("monthId") String monthId, + @Param("level") String level); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueMainDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueMainDailyDao.java index 79a1487328..794b9f091a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueMainDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueMainDailyDao.java @@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.extract.form.GridIssueCountResultDTO; import com.epmet.dto.extract.form.IssueMainDailyFormDTO; import com.epmet.dto.extract.result.GridProjectCountResultDTO; +import com.epmet.dto.extract.result.OrgStatisticsResultDTO; import com.epmet.dto.extract.result.ShiftProjectCountResultDTO; import com.epmet.entity.evaluationindex.extract.FactOriginIssueMainDailyEntity; import org.apache.ibatis.annotations.Mapper; @@ -183,4 +184,26 @@ public interface FactOriginIssueMainDailyDao extends BaseDao + */ + List selectGridIssueCount(@Param("customerId") String customerId, @Param("monthId") String monthId); + + /** + * 组织内议题总数 + * @author zhaoqifeng + * @date 2020/9/27 14:59 + * @param customerId + * @param monthId + * @param level + * @return java.util.List + */ + List selectOrgIssueCount(@Param("customerId") String customerId, @Param("monthId") String monthId, + @Param("level") String level); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectLogDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectLogDailyDao.java index 422c9f83ea..63e54d4354 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectLogDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectLogDailyDao.java @@ -136,4 +136,26 @@ public interface FactOriginProjectLogDailyDao extends BaseDao */ List selectOrgResponse(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("level")String level); + + /** + * 网格满意率 + * @author zhaoqifeng + * @date 2020/9/27 15:52 + * @param customerId + * @param monthId + * @return java.util.List + */ + List selectGridSatisfaction(@Param("customerId") String customerId, @Param("monthId") String monthId); + + /** + * 组织满意率 + * @author zhaoqifeng + * @date 2020/9/27 15:52 + * @param customerId + * @param monthId + * @param level + * @return java.util.List + */ + List selectOrgSatisfaction(@Param("customerId") String customerId, @Param("monthId") String monthId, + @Param("level")String level); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java index 01bf423d48..300d1d61ba 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java @@ -84,7 +84,6 @@ public interface FactOriginProjectMainDailyDao extends BaseDao> @@ -169,4 +168,27 @@ public interface FactOriginProjectMainDailyDao extends BaseDao */ List getGridResolveProject(@Param("customerId") String customerId, @Param("monthId")String monthId); + + + /** + * 网格解决项目数 + * @author zhaoqifeng + * @date 2020/9/25 15:16 + * @param customerId + * @param monthId + * @return java.util.List + */ + List getGridProjectCount(@Param("customerId") String customerId, @Param("monthId")String monthId); + + /** + * 组织解决项目数 + * @author zhaoqifeng + * @date 2020/9/25 15:16 + * @param customerId + * @param monthId + * @param level + * @return java.util.List + */ + List getOrgProjectCount(@Param("customerId") String customerId, @Param("monthId")String monthId, + @Param("level") String level); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginTopicMainDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginTopicMainDailyDao.java index 9a514557e7..547d713e90 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginTopicMainDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginTopicMainDailyDao.java @@ -19,6 +19,7 @@ package com.epmet.dao.evaluationindex.extract; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.extract.result.CreateTopicCountResultDTO; +import com.epmet.dto.extract.result.OrgStatisticsResultDTO; import com.epmet.entity.evaluationindex.extract.FactOriginTopicMainDailyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -116,4 +117,26 @@ public interface FactOriginTopicMainDailyDao extends BaseDao + */ + List selectGridTopicCount(@Param("customerId") String customerId, @Param("monthId") String monthId); + + /** + * 组织内话题总数 + * @author zhaoqifeng + * @date 2020/9/27 14:59 + * @param customerId + * @param monthId + * @param level + * @return java.util.List + */ + List selectOrgTopicCount(@Param("customerId") String customerId, @Param("monthId") String monthId, + @Param("level") String level); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenOrgRankDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenOrgRankDataDao.java index a49376a255..1b2e69b96b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenOrgRankDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenOrgRankDataDao.java @@ -56,4 +56,38 @@ public interface ScreenOrgRankDataDao extends BaseDao { * @Date 10:52 2020-08-18 **/ void batchInsertOrgRankData(@Param("list") List list, @Param("customerId")String customerId); + + /** + * 初始化组织数据 + * @author zhaoqifeng + * @date 2020/9/27 10:14 + * @param customerId + * @param level + * @return java.util.List + */ + List initAgencyDataList(@Param("customerId") String customerId, @Param("level") String level); + + /** + * 初始化网格数据 + * @author zhaoqifeng + * @date 2020/9/27 10:14 + * @param customerId + * @return java.util.List + */ + List initGridDataList(@Param("customerId") String customerId); + + /** + * 删除旧数据 + * @author zhaoqifeng + * @date 2020/9/27 10:27 + * @param customerId + * @param orgType + * @param monthId + * @param deleteSize + * @param orgIds + * @return java.lang.Integer + */ + Integer deleteRankData(@Param("customerId") String customerId, @Param("orgType") String orgType, @Param("monthId") String monthId, + @Param("deleteSize") Integer deleteSize, + @Param("orgIds")List orgIds); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactRegUserAgencyMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactRegUserAgencyMonthlyDao.java index bf0b951134..5df37b7ff5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactRegUserAgencyMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactRegUserAgencyMonthlyDao.java @@ -40,4 +40,17 @@ public interface FactRegUserAgencyMonthlyDao extends BaseDao selectAgencyUserCount(@Param("customerId") String customerId, @Param("monthId") String monthId); + + /** + * 查询机关下各用户数量 + * @author zhaoqifeng + * @date 2020/9/27 16:39 + * @param customerId + * @param monthId + * @param level + * @return java.util.List + */ + List selectOrgUserCountByCustomer(@Param("customerId") String customerId, @Param("monthId") String monthId, + @Param("level") String level); + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactRegUserGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactRegUserGridMonthlyDao.java index 479ecf5902..744f9ffd0a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactRegUserGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactRegUserGridMonthlyDao.java @@ -48,4 +48,14 @@ public interface FactRegUserGridMonthlyDao extends BaseDao selectGridUserCount(String customerId, String monthId); + /** + * 查询网格下各用户数量 + * @author zhaoqifeng + * @date 2020/9/27 13:59 + * @param customerId + * @param monthId + * @return java.util.List + */ + List selectGridUserCountByCustomer(@Param("customerId") String customerId, @Param("monthId") String monthId); + } \ 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/FactOriginGroupMainDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginGroupMainDailyService.java index b603d56d02..f6fc9f2dc6 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 @@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.dto.extract.FactOriginGroupMainDailyDTO; import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO; import com.epmet.dto.extract.result.GridGroupUserCountResultDTO; +import com.epmet.dto.extract.result.OrgStatisticsResultDTO; import com.epmet.dto.group.result.ExtractGroupMemberActionRecordResultDTO; import com.epmet.entity.evaluationindex.extract.FactOriginGroupMainDailyEntity; @@ -84,4 +85,25 @@ public interface FactOriginGroupMainDailyService extends BaseService selectDistinctGroupMemberCount(String customerId, String groupField); + + /** + * 获取网格内小组数量 + * @author zhaoqifeng + * @date 2020/9/27 14:35 + * @param customerId + * @param monthId + * @return java.util.List + */ + List getGridGroupCount(String customerId, String monthId); + + /** + * 获取组织内小组数量 + * @author zhaoqifeng + * @date 2020/9/27 14:35 + * @param customerId + * @param monthId + * @param level + * @return java.util.List + */ + List getOrgGroupCount(String customerId, String monthId, String level); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginIssueMainDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginIssueMainDailyService.java index 8afc53cd16..de2ac6f8c7 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 @@ -18,8 +18,11 @@ package com.epmet.service.evaluationindex.extract.todata; import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.extract.result.OrgStatisticsResultDTO; import com.epmet.entity.evaluationindex.extract.FactOriginIssueMainDailyEntity; +import java.util.List; + /** * 议题主表 * @@ -86,4 +89,25 @@ public interface FactOriginIssueMainDailyService extends BaseService + */ + List getGridIssueCount(String customerId, String monthId); + + /** + * 组织内议题数 + * @author zhaoqifeng + * @date 2020/9/27 15:11 + * @param customerId + * @param monthId + * @param level + * @return java.util.List + */ + List getOrgIssueCount(String customerId, String monthId, String level); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectLogDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectLogDailyService.java index f95de230b7..b3c8c8958e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectLogDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectLogDailyService.java @@ -218,4 +218,25 @@ public interface FactOriginProjectLogDailyService extends BaseService getOrgResponse(String customerId, String monthId, String level); + /** + * 网格满意率 + * @author zhaoqifeng + * @date 2020/9/27 16:06 + * @param customerId + * @param monthId + * @return java.util.List + */ + List getGridSatisfaction(String customerId, String monthId); + + /** + * 组织满意率 + * @author zhaoqifeng + * @date 2020/9/27 16:06 + * @param customerId + * @param monthId + * @param level + * @return java.util.List + */ + List getOrgSatisfaction(String customerId, String monthId, String level); + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java index bc061d6064..86404e1bde 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 @@ -216,4 +216,25 @@ public interface FactOriginProjectMainDailyService extends BaseService */ List getGridResolveProject(String customerId, String monthId); + + /** + * 网格项目数 + * @author zhaoqifeng + * @date 2020/9/27 15:18 + * @param customerId + * @param monthId + * @return java.util.List + */ + List getGridProjectCount(String customerId, String monthId); + + /** + * 组织项目数 + * @author zhaoqifeng + * @date 2020/9/27 15:19 + * @param customerId + * @param monthId + * @param level + * @return java.util.List + */ + List getOrgProjectCount(String customerId, String monthId, String level); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginTopicMainDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginTopicMainDailyService.java index d217e4d3eb..e059614d26 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginTopicMainDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginTopicMainDailyService.java @@ -20,6 +20,7 @@ package com.epmet.service.evaluationindex.extract.todata; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.dto.extract.form.ExtractOriginFormDTO; import com.epmet.dto.extract.result.CreateTopicCountResultDTO; +import com.epmet.dto.extract.result.OrgStatisticsResultDTO; import com.epmet.entity.evaluationindex.extract.FactOriginTopicMainDailyEntity; import java.util.List; @@ -90,4 +91,25 @@ public interface FactOriginTopicMainDailyService extends BaseService + */ + List getGridTopicCount(String customerId, String monthId); + + /** + * 组织内话题数 + * @author zhaoqifeng + * @date 2020/9/27 15:05 + * @param customerId + * @param monthId + * @param level + * @return java.util.List + */ + List getOrgTopicCount(String customerId, String monthId, String level); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMainDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMainDailyServiceImpl.java index b19ea0df4a..4c5afda59a 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,6 +21,7 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.dao.evaluationindex.extract.FactOriginGroupMainDailyDao; import com.epmet.dto.extract.FactOriginGroupMainDailyDTO; import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO; +import com.epmet.dto.extract.result.OrgStatisticsResultDTO; import com.epmet.dto.extract.result.GridGroupUserCountResultDTO; import com.epmet.dto.group.result.ExtractGroupMemberActionRecordResultDTO; import com.epmet.entity.evaluationindex.extract.FactOriginGroupMainDailyEntity; @@ -120,4 +121,14 @@ public class FactOriginGroupMainDailyServiceImpl extends BaseServiceImpl getGridGroupCount(String customerId, String monthId) { + return baseDao.selectGridGroupCount(customerId, monthId); + } + + @Override + public List getOrgGroupCount(String customerId, String monthId, String level) { + return baseDao.selectOrgGroupCount(customerId, monthId, level); + } + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginIssueMainDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginIssueMainDailyServiceImpl.java index c67d2d8151..0eac851c63 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 @@ -21,11 +21,14 @@ import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.extract.FactOriginIssueMainDailyDao; +import com.epmet.dto.extract.result.OrgStatisticsResultDTO; import com.epmet.entity.evaluationindex.extract.FactOriginIssueMainDailyEntity; import com.epmet.service.evaluationindex.extract.todata.FactOriginIssueMainDailyService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; +import java.util.List; + /** * 议题主表 * @@ -114,4 +117,14 @@ public class FactOriginIssueMainDailyServiceImpl extends BaseServiceImpl getGridIssueCount(String customerId, String monthId) { + return baseDao.selectGridIssueCount(customerId, monthId); + } + + @Override + public List getOrgIssueCount(String customerId, String monthId, String level) { + return baseDao.selectOrgIssueCount(customerId, monthId, level); + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java index f966247b6e..070770a414 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java @@ -277,5 +277,15 @@ public class FactOriginProjectLogDailyServiceImpl extends BaseServiceImpl getGridSatisfaction(String customerId, String monthId) { + return baseDao.selectGridSatisfaction(customerId, monthId); + } + + @Override + public List getOrgSatisfaction(String customerId, String monthId, String level) { + return baseDao.selectOrgSatisfaction(customerId, monthId, level); + } + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java index 6e8c7124e8..d735b59fba 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 @@ -213,4 +213,14 @@ public class FactOriginProjectMainDailyServiceImpl extends BaseServiceImpl getGridResolveProject(String customerId, String monthId) { return baseDao.getGridResolveProject(customerId, monthId); } + + @Override + public List getGridProjectCount(String customerId, String monthId) { + return baseDao.getGridProjectCount(customerId, monthId); + } + + @Override + public List getOrgProjectCount(String customerId, String monthId, String level) { + return baseDao.getOrgProjectCount(customerId, monthId, level); + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginTopicMainDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginTopicMainDailyServiceImpl.java index e55104f01c..e281b9518a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginTopicMainDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginTopicMainDailyServiceImpl.java @@ -30,6 +30,7 @@ import com.epmet.dao.evaluationindex.extract.FactOriginTopicLogDailyDao; import com.epmet.dao.evaluationindex.extract.FactOriginTopicMainDailyDao; import com.epmet.dto.extract.form.ExtractOriginFormDTO; import com.epmet.dto.extract.result.CreateTopicCountResultDTO; +import com.epmet.dto.extract.result.OrgStatisticsResultDTO; import com.epmet.dto.org.GridInfoDTO; import com.epmet.dto.topic.TopicOriginInfoDTO; import com.epmet.entity.evaluationindex.extract.FactOriginTopicLogDailyEntity; @@ -313,4 +314,14 @@ public class FactOriginTopicMainDailyServiceImpl extends BaseServiceImpl getGridTopicCount(String customerId, String monthId) { + return baseDao.selectGridTopicCount(customerId, monthId); + } + + @Override + public List getOrgTopicCount(String customerId, String monthId, String level) { + return baseDao.selectOrgTopicCount(customerId, monthId, level); + } + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/OrgRankExtractService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/OrgRankExtractService.java new file mode 100644 index 0000000000..9afc2593e4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/OrgRankExtractService.java @@ -0,0 +1,41 @@ +package com.epmet.service.evaluationindex.extract.toscreen; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/9/27 9:37 + */ +public interface OrgRankExtractService { + /** + * 网格先进排行 + * + * @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/impl/GovernRankDataExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/GovernRankDataExtractServiceImpl.java index 05f90029d5..502a20a32f 100644 --- 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 @@ -50,38 +50,57 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe if (CollectionUtils.isEmpty(list)) { return; } + BigDecimal hundred = new BigDecimal(NumConstant.ONE_HUNDRED); list.forEach(entity -> { entity.setYearId(monthId.substring(NumConstant.ZERO, NumConstant.FOUR)); entity.setMonthId(monthId); }); + //满意率 满意和非常满意占比 + List satisfactionList = factOriginProjectLogDailyService.getGridSatisfaction(customerId, monthId); + if (!CollectionUtils.isEmpty(satisfactionList)) { + list.forEach(entity -> satisfactionList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> { + if (dto.getSum() != NumConstant.ZERO) { + BigDecimal sum = new BigDecimal(dto.getSum()); + BigDecimal count = new BigDecimal(dto.getCount()); + entity.setSatisfactionRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); + } + })); + } + //自治率 List gridList = factIndexGovrnAblityGridMonthlyService.getGridByCustomer(customerId, monthId); - list.forEach(entity -> gridList.stream().filter(gridAbility -> entity.getOrgId().equals(gridAbility.getGridId())).forEach(grid -> { - - BigDecimal resolveCount = new BigDecimal(grid.getResolveProjectCount()); - //自治率 - BigDecimal selfCount = new BigDecimal(grid.getSelfSolveProjectCount()); - if(grid.getResolveProjectCount()!= NumConstant.ZERO) { - entity.setGovernRatio(selfCount.divide(resolveCount, NumConstant.SIX, RoundingMode.HALF_UP)); - } - //满意率 - entity.setSatisfactionRatio(grid.getSatisfactionRatio()); - })); + if (!CollectionUtils.isEmpty(gridList)) { + list.forEach(entity -> gridList.stream().filter(gridAbility -> entity.getOrgId().equals(gridAbility.getGridId())).forEach(grid -> { + BigDecimal resolveCount = new BigDecimal(grid.getResolveProjectCount()); + BigDecimal selfCount = new BigDecimal(grid.getSelfSolveProjectCount()); + if (grid.getResolveProjectCount() != NumConstant.ZERO) { + entity.setGovernRatio(selfCount.multiply(hundred).divide(resolveCount, NumConstant.SIX, RoundingMode.HALF_UP)); + } + })); + } //响应率 响应次数/流转到网格的次数 List responseList = factOriginProjectLogDailyService.getGridResponse(customerId, monthId); - list.forEach(entity -> responseList.stream().filter(response -> entity.getOrgId().equals(response.getOrgId())).forEach(dto -> { - BigDecimal sum = new BigDecimal(dto.getSum()); - BigDecimal count = new BigDecimal(dto.getCount()); - entity.setResponseRatio(count.divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); - })); + if (!CollectionUtils.isEmpty(responseList)) { + list.forEach(entity -> responseList.stream().filter(response -> entity.getOrgId().equals(response.getOrgId())).forEach(dto -> { + if (dto.getSum() != NumConstant.ZERO) { + BigDecimal sum = new BigDecimal(dto.getSum()); + BigDecimal count = new BigDecimal(dto.getCount()); + entity.setResponseRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); + } + })); + } //解决率 已解决项目数/办结项目数 List resolveList = factOriginProjectMainDailyService.getGridResolveProject(customerId, monthId); - list.forEach(entity -> resolveList.stream().filter(resolve -> entity.getOrgId().equals(resolve.getOrgId())).forEach(dto -> { - BigDecimal sum = new BigDecimal(dto.getSum()); - BigDecimal count = new BigDecimal(dto.getCount()); - entity.setResolvedRatio(count.divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); - })); + if (!CollectionUtils.isEmpty(resolveList)) { + list.forEach(entity -> resolveList.stream().filter(resolve -> entity.getOrgId().equals(resolve.getOrgId())).forEach(dto -> { + if (dto.getSum() != NumConstant.ZERO) { + BigDecimal sum = new BigDecimal(dto.getSum()); + BigDecimal count = new BigDecimal(dto.getCount()); + entity.setResolvedRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); + } + })); + } screenGovernRankDataService.delAndSaveRankData(customerId, OrgTypeConstant.GRID, monthId, IndexCalConstant.DELETE_SIZE, list); } @@ -92,39 +111,58 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe if (CollectionUtils.isEmpty(list)) { return; } + BigDecimal hundred = new BigDecimal(NumConstant.ONE_HUNDRED); list.forEach(entity -> { entity.setYearId(monthId.substring(NumConstant.ZERO, NumConstant.FOUR)); entity.setMonthId(monthId); }); - List orgList = factIndexGovrnAblityOrgMonthlyService.getOrgByCustomer(customerId, monthId, - OrgTypeConstant.COMMUNITY); - list.forEach(entity -> orgList.stream().filter(orgAbility -> entity.getOrgId().equals(orgAbility.getAgencyId())).forEach(org -> { - //满意率 - entity.setSatisfactionRatio(org.getSatisfactionRatio()); - })); + + //满意率 满意和非常满意占比 + List satisfactionList = factOriginProjectLogDailyService.getOrgSatisfaction(customerId, monthId, OrgTypeConstant.COMMUNITY); + if (!CollectionUtils.isEmpty(satisfactionList)) { + list.forEach(entity -> satisfactionList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> { + if (dto.getSum() != NumConstant.ZERO) { + BigDecimal sum = new BigDecimal(dto.getSum()); + BigDecimal count = new BigDecimal(dto.getCount()); + entity.setSatisfactionRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); + } + })); + } //响应率 响应次数/流转到网格的次数 List responseList = factOriginProjectLogDailyService.getOrgResponse(customerId, monthId, OrgTypeConstant.COMMUNITY); - list.forEach(entity -> responseList.stream().filter(response -> entity.getOrgId().equals(response.getAgencyId())).forEach(dto -> { - BigDecimal sum = new BigDecimal(dto.getSum()); - BigDecimal count = new BigDecimal(dto.getCount()); - entity.setResponseRatio(count.divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); - })); + if (!CollectionUtils.isEmpty(responseList)) { + list.forEach(entity -> responseList.stream().filter(response -> entity.getOrgId().equals(response.getAgencyId())).forEach(dto -> { + if (dto.getSum() != NumConstant.ZERO) { + BigDecimal sum = new BigDecimal(dto.getSum()); + BigDecimal count = new BigDecimal(dto.getCount()); + entity.setResponseRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); + } + })); + } //自制率 自治项目数/办结项目数 List selfList = factOriginProjectMainDailyService.getSelfProject(customerId, monthId, OrgTypeConstant.COMMUNITY); - list.forEach(entity -> selfList.stream().filter(self -> entity.getOrgId().equals(self.getAgencyId())).forEach(dto -> { - BigDecimal sum = new BigDecimal(dto.getSum()); - BigDecimal count = new BigDecimal(dto.getCount()); - entity.setGovernRatio(count.divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); - })); + if (!CollectionUtils.isEmpty(selfList)) { + list.forEach(entity -> selfList.stream().filter(self -> entity.getOrgId().equals(self.getAgencyId())).forEach(dto -> { + if (dto.getSum() != NumConstant.ZERO) { + BigDecimal sum = new BigDecimal(dto.getSum()); + BigDecimal count = new BigDecimal(dto.getCount()); + entity.setGovernRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); + } + })); + } //解决率 已解决项目数/办结项目数 List resolveList = factOriginProjectMainDailyService.getResolveProject(customerId, monthId, OrgTypeConstant.COMMUNITY); - list.forEach(entity -> resolveList.stream().filter(resolve -> entity.getOrgId().equals(resolve.getAgencyId())).forEach(dto -> { - BigDecimal sum = new BigDecimal(dto.getSum()); - BigDecimal count = new BigDecimal(dto.getCount()); - entity.setResolvedRatio(count.divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); - })); + if (!CollectionUtils.isEmpty(resolveList)) { + list.forEach(entity -> resolveList.stream().filter(resolve -> entity.getOrgId().equals(resolve.getAgencyId())).forEach(dto -> { + if (dto.getSum() != NumConstant.ZERO) { + BigDecimal sum = new BigDecimal(dto.getSum()); + BigDecimal count = new BigDecimal(dto.getCount()); + entity.setResolvedRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); + } + })); + } screenGovernRankDataService.delAndSaveRankData(customerId, OrgTypeConstant.AGENCY, monthId, IndexCalConstant.DELETE_SIZE, list); } @@ -134,39 +172,57 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe if (CollectionUtils.isEmpty(list)) { return; } + BigDecimal hundred = new BigDecimal(NumConstant.ONE_HUNDRED); list.forEach(entity -> { entity.setYearId(monthId.substring(NumConstant.ZERO, NumConstant.FOUR)); entity.setMonthId(monthId); }); - List orgList = factIndexGovrnAblityOrgMonthlyService.getOrgByCustomer(customerId, monthId, - OrgTypeConstant.STREET); - list.forEach(entity -> orgList.stream().filter(orgAbility -> entity.getOrgId().equals(orgAbility.getAgencyId())).forEach(org -> { - //满意率 - entity.setSatisfactionRatio(org.getSatisfactionRatio()); - })); + //满意率 满意和非常满意占比 + List satisfactionList = factOriginProjectLogDailyService.getOrgSatisfaction(customerId, monthId, OrgTypeConstant.STREET); + if (!CollectionUtils.isEmpty(satisfactionList)) { + list.forEach(entity -> satisfactionList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> { + if (dto.getSum() != NumConstant.ZERO) { + BigDecimal sum = new BigDecimal(dto.getSum()); + BigDecimal count = new BigDecimal(dto.getCount()); + entity.setSatisfactionRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); + } + })); + } //响应率 响应次数/流转到网格的次数 List responseList = factOriginProjectLogDailyService.getOrgResponse(customerId, monthId, OrgTypeConstant.STREET); - list.forEach(entity -> responseList.stream().filter(response -> entity.getOrgId().equals(response.getAgencyId())).forEach(dto -> { - BigDecimal sum = new BigDecimal(dto.getSum()); - BigDecimal count = new BigDecimal(dto.getCount()); - entity.setResponseRatio(count.divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); - })); + if (!CollectionUtils.isEmpty(responseList)) { + list.forEach(entity -> responseList.stream().filter(response -> entity.getOrgId().equals(response.getAgencyId())).forEach(dto -> { + if (dto.getSum() != NumConstant.ZERO) { + BigDecimal sum = new BigDecimal(dto.getSum()); + BigDecimal count = new BigDecimal(dto.getCount()); + entity.setResponseRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); + } + })); + } //自制率 自治项目数/办结项目数 List selfList = factOriginProjectMainDailyService.getSelfProject(customerId, monthId, OrgTypeConstant.STREET); - list.forEach(entity -> selfList.stream().filter(self -> entity.getOrgId().equals(self.getAgencyId())).forEach(dto -> { - BigDecimal sum = new BigDecimal(dto.getSum()); - BigDecimal count = new BigDecimal(dto.getCount()); - entity.setGovernRatio(count.divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); - })); + if (!CollectionUtils.isEmpty(selfList)) { + list.forEach(entity -> selfList.stream().filter(self -> entity.getOrgId().equals(self.getAgencyId())).forEach(dto -> { + if (dto.getSum() != NumConstant.ZERO) { + BigDecimal sum = new BigDecimal(dto.getSum()); + BigDecimal count = new BigDecimal(dto.getCount()); + entity.setGovernRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); + } + })); + } //解决率 已解决项目数/办结项目数 List resolveList = factOriginProjectMainDailyService.getResolveProject(customerId, monthId, OrgTypeConstant.STREET); - list.forEach(entity -> resolveList.stream().filter(resolve -> entity.getOrgId().equals(resolve.getAgencyId())).forEach(dto -> { - BigDecimal sum = new BigDecimal(dto.getSum()); - BigDecimal count = new BigDecimal(dto.getCount()); - entity.setResolvedRatio(count.divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); - })); + if (!CollectionUtils.isEmpty(resolveList)) { + list.forEach(entity -> resolveList.stream().filter(resolve -> entity.getOrgId().equals(resolve.getAgencyId())).forEach(dto -> { + if (dto.getSum() != NumConstant.ZERO) { + BigDecimal sum = new BigDecimal(dto.getSum()); + BigDecimal count = new BigDecimal(dto.getCount()); + entity.setResolvedRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); + } + })); + } screenGovernRankDataService.delAndSaveRankData(customerId, OrgTypeConstant.AGENCY, monthId, IndexCalConstant.DELETE_SIZE, list); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/OrgRankExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/OrgRankExtractServiceImpl.java new file mode 100644 index 0000000000..904ee9d57a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/OrgRankExtractServiceImpl.java @@ -0,0 +1,260 @@ +package com.epmet.service.evaluationindex.extract.toscreen.impl; + +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.constant.OrgTypeConstant; +import com.epmet.dto.extract.result.OrgStatisticsResultDTO; +import com.epmet.dto.stats.user.FactRegUserAgencyMonthlyDTO; +import com.epmet.dto.stats.user.FactRegUserGridMonthlyDTO; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyEntity; +import com.epmet.entity.evaluationindex.screen.ScreenOrgRankDataEntity; +import com.epmet.service.evaluationindex.extract.todata.*; +import com.epmet.service.evaluationindex.extract.toscreen.OrgRankExtractService; +import com.epmet.service.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyService; +import com.epmet.service.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyService; +import com.epmet.service.evaluationindex.screen.ScreenOrgRankDataService; +import com.epmet.service.stats.user.FactRegUserAgencyMonthlyService; +import com.epmet.service.stats.user.FactRegUserGridMonthlyService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.util.List; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/9/27 9:37 + */ +@Service +@Slf4j +public class OrgRankExtractServiceImpl implements OrgRankExtractService { + @Autowired + private ScreenOrgRankDataService screenOrgRankDataService; + @Autowired + private FactRegUserGridMonthlyService factRegUserGridMonthlyService; + @Autowired + private FactOriginGroupMainDailyService factOriginGroupMainDailyService; + @Autowired + private FactOriginTopicMainDailyService factOriginTopicMainDailyService; + @Autowired + private FactOriginIssueMainDailyService factOriginIssueMainDailyService; + @Autowired + private FactOriginProjectMainDailyService factOriginProjectMainDailyService; + @Autowired + private FactIndexGovrnAblityGridMonthlyService factIndexGovrnAblityGridMonthlyService; + @Autowired + private FactOriginProjectLogDailyService factOriginProjectLogDailyService; + @Autowired + private FactRegUserAgencyMonthlyService factRegUserAgencyMonthlyService; + @Autowired + private FactIndexGovrnAblityOrgMonthlyService factIndexGovrnAblityOrgMonthlyService; + + @Override + public void extractGridData(String customerId, String monthId) { + List list = screenOrgRankDataService.initList(customerId, OrgTypeConstant.GRID, null); + if (CollectionUtils.isEmpty(list)) { + return; + } + BigDecimal hundred = new BigDecimal(NumConstant.ONE_HUNDRED); + list.forEach(entity -> { + entity.setYearId(monthId.substring(NumConstant.ZERO, NumConstant.FOUR)); + entity.setMonthId(monthId); + }); + //党员数 + List partyMemberList = factRegUserGridMonthlyService.getGridUserCountByCustomer(customerId, monthId); + if (!CollectionUtils.isEmpty(partyMemberList)) { + list.forEach(entity -> partyMemberList.stream().filter(item -> item.getGridId().equals(entity.getOrgId())).forEach(dto -> { + entity.setPartyTotal(dto.getPartymemberTotal()); + })); + } + //小组数 + List groupList = factOriginGroupMainDailyService.getGridGroupCount(customerId, monthId); + if (!CollectionUtils.isEmpty(groupList)) { + list.forEach(entity -> groupList.stream().filter(item -> item.getOrgId().equals(entity.getOrgId())).forEach(dto -> { + entity.setGroupTotal(dto.getCount()); + })); + } + //话题数 + List topicList = factOriginTopicMainDailyService.getGridTopicCount(customerId, monthId); + if (!CollectionUtils.isEmpty(topicList)) { + list.forEach(entity -> topicList.stream().filter(item -> item.getOrgId().equals(entity.getOrgId())).forEach(dto -> { + entity.setTopicTotal(dto.getCount()); + })); + } + //议题数 + List issueList = factOriginIssueMainDailyService.getGridIssueCount(customerId, monthId); + if (!CollectionUtils.isEmpty(issueList)) { + list.forEach(entity -> issueList.stream().filter(item -> item.getOrgId().equals(entity.getOrgId())).forEach(dto -> { + entity.setIssueTotal(dto.getCount()); + })); + } + //项目数 + List projectList = factOriginProjectMainDailyService.getGridProjectCount(customerId, monthId); + if (!CollectionUtils.isEmpty(projectList)) { + list.forEach(entity -> projectList.stream().filter(item -> item.getOrgId().equals(entity.getOrgId())).forEach(dto -> { + entity.setProjectTotal(dto.getCount()); + })); + } + //结案率 结案数/项目数 + List abilityList = factIndexGovrnAblityGridMonthlyService.getGridByCustomer(customerId, monthId); + if (!CollectionUtils.isEmpty(abilityList)) { + list.forEach(entity -> abilityList.stream().filter(item -> item.getGridId().equals(entity.getOrgId())).forEach(dto -> { + if (dto.getProjectTotal() != NumConstant.ZERO) { + BigDecimal total = new BigDecimal(dto.getProjectTotal()); + BigDecimal closed = new BigDecimal(dto.getResolveProjectCount()); + entity.setCloseProjectRatio(closed.multiply(hundred).divide(total, NumConstant.SIX, RoundingMode.HALF_UP)); + } + + })); + } + //满意率 满意和非常满意占比 + List satisfactionList = factOriginProjectLogDailyService.getGridSatisfaction(customerId, monthId); + if (!CollectionUtils.isEmpty(satisfactionList)) { + list.forEach(entity -> satisfactionList.stream().filter(item -> item.getOrgId().equals(entity.getOrgId())).forEach(dto -> { + if (dto.getSum() != NumConstant.ZERO) { + BigDecimal sum = new BigDecimal(dto.getSum()); + BigDecimal count = new BigDecimal(dto.getCount()); + entity.setSatisfactionRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); + } + })); + } + } + + @Override + public void extractCommunityData(String customerId, String monthId) { + List list = screenOrgRankDataService.initList(customerId, OrgTypeConstant.AGENCY, OrgTypeConstant.COMMUNITY); + if (CollectionUtils.isEmpty(list)) { + return; + } + BigDecimal hundred = new BigDecimal(NumConstant.ONE_HUNDRED); + list.forEach(entity -> { + entity.setYearId(monthId.substring(NumConstant.ZERO, NumConstant.FOUR)); + entity.setMonthId(monthId); + }); + //党员数 + List partyMemberList = factRegUserAgencyMonthlyService.getOrgUserCountByCustomer(customerId, monthId, + OrgTypeConstant.COMMUNITY); + if (!CollectionUtils.isEmpty(partyMemberList)) { + list.forEach(entity -> partyMemberList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> { + entity.setPartyTotal(dto.getPartymemberTotal()); + })); + } + //小组数 + List groupList = factOriginGroupMainDailyService.getOrgGroupCount(customerId, monthId, OrgTypeConstant.COMMUNITY); + if (!CollectionUtils.isEmpty(groupList)) { + list.forEach(entity -> groupList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> { + entity.setGroupTotal(dto.getCount()); + })); + } + //话题数 + List topicList = factOriginTopicMainDailyService.getOrgTopicCount(customerId, monthId, OrgTypeConstant.COMMUNITY); + if (!CollectionUtils.isEmpty(topicList)) { + list.forEach(entity -> topicList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> { + entity.setTopicTotal(dto.getCount()); + })); + } + //议题数 + List issueList = factOriginIssueMainDailyService.getOrgIssueCount(customerId, monthId, OrgTypeConstant.COMMUNITY); + if (!CollectionUtils.isEmpty(issueList)) { + list.forEach(entity -> issueList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> { + entity.setIssueTotal(dto.getCount()); + })); + } + //项目数 + List projectList = factOriginProjectMainDailyService.getOrgProjectCount(customerId, monthId, OrgTypeConstant.COMMUNITY); + if (!CollectionUtils.isEmpty(projectList)) { + list.forEach(entity -> projectList.stream().filter(item -> item.getOrgId().equals(entity.getOrgId())).forEach(dto -> { + entity.setProjectTotal(dto.getCount()); + })); + } + //结案率 结案数/项目数 + List abilityList = factIndexGovrnAblityOrgMonthlyService.getOrgByCustomer(customerId, monthId, OrgTypeConstant.COMMUNITY); + if (!CollectionUtils.isEmpty(abilityList)) { + list.forEach(entity -> abilityList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> { + entity.setCloseProjectRatio(dto.getClosedProjectRatio()); + })); + } + //满意率 满意和非常满意占比 + List satisfactionList = factOriginProjectLogDailyService.getOrgSatisfaction(customerId, monthId, OrgTypeConstant.COMMUNITY); + if (!CollectionUtils.isEmpty(satisfactionList)) { + list.forEach(entity -> satisfactionList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> { + if (dto.getSum() != NumConstant.ZERO) { + BigDecimal sum = new BigDecimal(dto.getSum()); + BigDecimal count = new BigDecimal(dto.getCount()); + entity.setSatisfactionRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); + } + })); + } + } + + @Override + public void extractStreetData(String customerId, String monthId) { + List list = screenOrgRankDataService.initList(customerId, OrgTypeConstant.AGENCY, OrgTypeConstant.STREET); + if (CollectionUtils.isEmpty(list)) { + return; + } + BigDecimal hundred = new BigDecimal(NumConstant.ONE_HUNDRED); + list.forEach(entity -> { + entity.setYearId(monthId.substring(NumConstant.ZERO, NumConstant.FOUR)); + entity.setMonthId(monthId); + }); + //党员数 + List partyMemberList = factRegUserAgencyMonthlyService.getOrgUserCountByCustomer(customerId, monthId, + OrgTypeConstant.COMMUNITY); + if (!CollectionUtils.isEmpty(partyMemberList)) { + list.forEach(entity -> partyMemberList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> { + entity.setPartyTotal(dto.getPartymemberTotal()); + })); + } + //小组数 + List groupList = factOriginGroupMainDailyService.getOrgGroupCount(customerId, monthId, OrgTypeConstant.STREET); + if (!CollectionUtils.isEmpty(groupList)) { + list.forEach(entity -> groupList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> { + entity.setGroupTotal(dto.getCount()); + })); + } + //话题数 + List topicList = factOriginTopicMainDailyService.getOrgTopicCount(customerId, monthId, OrgTypeConstant.STREET); + if (!CollectionUtils.isEmpty(topicList)) { + list.forEach(entity -> topicList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> { + entity.setTopicTotal(dto.getCount()); + })); + } + //议题数 + List issueList = factOriginIssueMainDailyService.getOrgIssueCount(customerId, monthId, OrgTypeConstant.STREET); + if (!CollectionUtils.isEmpty(issueList)) { + list.forEach(entity -> issueList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> { + entity.setIssueTotal(dto.getCount()); + })); + } + //项目数 + List projectList = factOriginProjectMainDailyService.getOrgProjectCount(customerId, monthId, OrgTypeConstant.STREET); + if (!CollectionUtils.isEmpty(projectList)) { + list.forEach(entity -> projectList.stream().filter(item -> item.getOrgId().equals(entity.getOrgId())).forEach(dto -> { + entity.setProjectTotal(dto.getCount()); + })); + } + //结案率 结案数/项目数 + List abilityList = factIndexGovrnAblityOrgMonthlyService.getOrgByCustomer(customerId, monthId, OrgTypeConstant.STREET); + if (!CollectionUtils.isEmpty(abilityList)) { + list.forEach(entity -> abilityList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> { + entity.setCloseProjectRatio(dto.getClosedProjectRatio()); + })); + } + //满意率 满意和非常满意占比 + List satisfactionList = factOriginProjectLogDailyService.getOrgSatisfaction(customerId, monthId, OrgTypeConstant.STREET); + if (!CollectionUtils.isEmpty(satisfactionList)) { + list.forEach(entity -> satisfactionList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> { + if (dto.getSum() != NumConstant.ZERO) { + BigDecimal sum = new BigDecimal(dto.getSum()); + BigDecimal count = new BigDecimal(dto.getCount()); + entity.setSatisfactionRatio(count.multiply(hundred).divide(sum, NumConstant.SIX, RoundingMode.HALF_UP)); + } + })); + } + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenOrgRankDataService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenOrgRankDataService.java index 3cbb16706f..a6b4ab661c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenOrgRankDataService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenOrgRankDataService.java @@ -20,6 +20,8 @@ package com.epmet.service.evaluationindex.screen; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.entity.evaluationindex.screen.ScreenOrgRankDataEntity; +import java.util.List; + /** * 党建引领-组织先进排行榜 * @@ -27,4 +29,31 @@ import com.epmet.entity.evaluationindex.screen.ScreenOrgRankDataEntity; * @since v1.0.0 2020-09-22 */ public interface ScreenOrgRankDataService extends BaseService { + + /** + * 构造screen_govern_rank_data 初始数据,先赋值为0 + * + * @param customerId + * @param orgType + * @param agencyLevel + * @return java.util.List + * @author zhaoqifeng + * @date 2020/9/24 14:41 + */ + List initList(String customerId, String orgType, String agencyLevel); + + /** + * 保存抽取结果 + * + * @param customerId + * @param orgType + * @param monthId + * @param deleteSize + * @param entityList + * @return void + * @author zhaoqifeng + * @date 2020/9/25 10:32 + */ + void delAndSaveRankData(String customerId, String orgType, String monthId, Integer deleteSize, List entityList); + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenOrgRankDataServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenOrgRankDataServiceImpl.java index ece8381e98..ce164aa136 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenOrgRankDataServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenOrgRankDataServiceImpl.java @@ -18,12 +18,21 @@ package com.epmet.service.evaluationindex.screen.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.constant.DataSourceConstant; +import com.epmet.constant.OrgTypeConstant; import com.epmet.dao.evaluationindex.screen.ScreenOrgRankDataDao; import com.epmet.entity.evaluationindex.screen.ScreenOrgRankDataEntity; import com.epmet.service.evaluationindex.screen.ScreenOrgRankDataService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; import org.springframework.stereotype.Service; +import java.util.ArrayList; +import java.util.List; + /** * 党建引领-组织先进排行榜 * @@ -31,7 +40,45 @@ import org.springframework.stereotype.Service; * @since v1.0.0 2020-09-22 */ @Service +@Slf4j public class ScreenOrgRankDataServiceImpl extends BaseServiceImpl implements ScreenOrgRankDataService { + @Override + @DataSource(DataSourceConstant.STATS) + public List initList(String customerId, String orgType, String agencyLevel) { + List list = new ArrayList<>(); + switch (orgType) { + case OrgTypeConstant.AGENCY: + log.info("组织级别统计"); + list = baseDao.initAgencyDataList(customerId, agencyLevel); + break; + case OrgTypeConstant.GRID: + log.info("网格级别统计"); + list = baseDao.initGridDataList(customerId); + break; + default: + log.info("部门级别统计"); + break; + } + return list; + } + + @Override + @DataSource(DataSourceConstant.EVALUATION_INDEX) + public void delAndSaveRankData(String customerId, String orgType, String monthId, Integer deleteSize, List entityList) { + if (CollectionUtils.isEmpty(entityList)) { + return; + } + List orgIds = new ArrayList<>(); + for (ScreenOrgRankDataEntity entity : entityList) { + orgIds.add(entity.getOrgId()); + } + int deleteNum; + do { + deleteNum = baseDao.deleteRankData(customerId, orgType, monthId, deleteSize, orgIds); + } while (deleteNum != NumConstant.ZERO); + + insertBatch(entityList); + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactRegUserAgencyMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactRegUserAgencyMonthlyService.java index bdce57807a..7875beea3f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactRegUserAgencyMonthlyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactRegUserAgencyMonthlyService.java @@ -104,4 +104,16 @@ public interface FactRegUserAgencyMonthlyService extends BaseService selectAgencyUserCount(String customerId, String monthId); + + /** + * 查询机关下各用户数量 + * + * @author zhaoqifeng + * @date 2020/9/27 14:02 + * @param customerId + * @param monthId + * @param level + * @return java.util.List + */ + List getOrgUserCountByCustomer(String customerId, String monthId, String level); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactRegUserGridMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactRegUserGridMonthlyService.java index 860d383906..7917a3c001 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactRegUserGridMonthlyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactRegUserGridMonthlyService.java @@ -103,4 +103,15 @@ public interface FactRegUserGridMonthlyService extends BaseService selectGridUserCount(String customerId,String monthId); + + /** + * 查询网格下各用户数量 + * + * @author zhaoqifeng + * @date 2020/9/27 14:02 + * @param customerId + * @param monthId + * @return java.util.List + */ + List getGridUserCountByCustomer(String customerId, String monthId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactRegUserAgencyMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactRegUserAgencyMonthlyServiceImpl.java index 315609b3bb..b1bc32ea7c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactRegUserAgencyMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactRegUserAgencyMonthlyServiceImpl.java @@ -104,4 +104,9 @@ public class FactRegUserAgencyMonthlyServiceImpl extends BaseServiceImpl getOrgUserCountByCustomer(String customerId, String monthId, String level) { + return baseDao.selectOrgUserCountByCustomer(customerId, monthId, level); + } + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactRegUserGridMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactRegUserGridMonthlyServiceImpl.java index 8016f7f613..b859133325 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactRegUserGridMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactRegUserGridMonthlyServiceImpl.java @@ -112,4 +112,9 @@ public class FactRegUserGridMonthlyServiceImpl extends BaseServiceImpl getGridUserCountByCustomer(String customerId, String monthId) { + return baseDao.selectGridUserCountByCustomer(customerId, monthId); + } + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml index 8b326f3aa3..7898e849a9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml @@ -279,4 +279,30 @@ AND CUSTOMER_ID = #{customerId} GROUP by ${groupField,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueMainDailyDao.xml index 75762c410c..b1085f5058 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueMainDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueMainDailyDao.xml @@ -267,4 +267,28 @@ AND t1.CUSTOMER_ID = #{customerId} and t1.PIDS LIKE CONCAT(#{agencyPath},'%') + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml index 38fa735f61..f9c0d6d56b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml @@ -252,4 +252,72 @@ GROUP BY f.AGENCY_ID ) b ON a.AGENCY_ID = b.AGENCY_ID + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml index 5b9c58b5ea..53e896dc7c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml @@ -282,4 +282,28 @@ fm.GRID_ID) b ON a.GRID_ID = b.GRID_ID + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml index 4e6dd8a925..40b67c3951 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml @@ -153,4 +153,28 @@ AND m.CUSTOMER_ID = #{customerId} AND m.PIDS LIKE CONCAT(#{agencyPath},'%') + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml index dfdf6c3b59..3a4250d1ad 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml @@ -120,7 +120,8 @@ AGENCY_ID, MONTH_ID, YEAR_ID, - SATISFACTION_RATIO + SATISFACTION_RATIO, + CLOSED_PROJECT_RATIO FROM fact_index_govrn_ablity_org_monthly WHERE diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenOrgRankDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenOrgRankDataDao.xml index 2cf5f7dc33..95b8e20845 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenOrgRankDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenOrgRankDataDao.xml @@ -8,6 +8,63 @@ where CUSTOMER_ID = #{customerId} AND MONTH_ID = #{monthId} limit 1000; + + delete from screen_org_rank_data + where CUSTOMER_ID = #{customerId} + AND MONTH_ID = #{monthId} + + and ORG_TYPE=#{orgType} + + + and + ( + + ORG_ID = #{orgId} + + ) + + limit #{deleteSize} + + + insert into screen_org_rank_data diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/user/FactRegUserAgencyMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/user/FactRegUserAgencyMonthlyDao.xml index d81d385479..d5e65f289d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/user/FactRegUserAgencyMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/user/FactRegUserAgencyMonthlyDao.xml @@ -101,6 +101,19 @@ AND CUSTOMER_ID = #{customerId} + + \ No newline at end of file