diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridGroupUserCountResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridGroupUserCountResultDTO.java index 72723e1987..c3275dc075 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridGroupUserCountResultDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridGroupUserCountResultDTO.java @@ -20,7 +20,7 @@ public class GridGroupUserCountResultDTO implements Serializable { */ private String customerId; - private String gridId; + private String orgId; private Integer memberCount; /** diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridUserCountResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridUserCountResultDTO.java index 0203708448..efe3b0747e 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridUserCountResultDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridUserCountResultDTO.java @@ -28,4 +28,9 @@ public class GridUserCountResultDTO implements Serializable { * 网格ID */ private String gridId; + + /** + * 用户总数 + */ + private Integer regTotal; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/IssueVoteUserCountResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/IssueVoteUserCountResultDTO.java index 405ab7b3a8..e26bd0ec2a 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/IssueVoteUserCountResultDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/IssueVoteUserCountResultDTO.java @@ -15,8 +15,7 @@ public class IssueVoteUserCountResultDTO implements Serializable { private static final long serialVersionUID = -4729061928990808187L; - private String gridId; - private String issueId; + private String orgId; private Integer voteCount; private Integer issueCount; /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java index ff2c4558c5..eac79f016a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java @@ -62,4 +62,6 @@ public interface ProjectConstant { * 下级 */ String XIA_JI = "xiaji"; + String GRID_ID = "GRID_ID"; + String AGENCY_ID = "AGENCY_ID"; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenExtractDailyController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenExtractDailyController.java index 34e8c7ccde..4d05009ec8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenExtractDailyController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenExtractDailyController.java @@ -32,4 +32,16 @@ public class ScreenExtractDailyController { return new Result(); } + /** + * @param extractOriginFormDTO + * @Description 抽取数据到大屏【月】 + * @author zxc + * @date 2020/9/24 10:15 上午 + */ + @PostMapping("extractmonthlyyall") + public Result screenExtractMonthly(@RequestBody ExtractOriginFormDTO extractOriginFormDTO) { + screenExtractService.extractDailyAll(extractOriginFormDTO); + 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 5107262311..f1ad597f68 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 @@ -153,9 +153,10 @@ public interface FactOriginGroupMainDailyDao extends BaseDao * @author LiuJanJun * @date 2020/9/27 2:31 下午 */ - List selectDistinctGroupMemberCount(@Param("customerId") String customerId); + List selectDistinctGroupMemberCount(@Param("customerId") String customerId, @Param("groupField") String groupField); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueLogDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueLogDailyDao.java index 793926e513..9dd9089d97 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueLogDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueLogDailyDao.java @@ -85,11 +85,11 @@ public interface FactOriginIssueLogDailyDao extends BaseDao * @author LiuJanJun * @date 2020/9/27 1:58 下午 */ - List getVoteCount(@Param("customerId") String customerId, @Param("monthId") String monthId); + List getVoteCount(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("groupField") String groupField); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactIssueAgencyMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactIssueAgencyMonthlyDao.java index 6f9933bf1a..1e686cc690 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactIssueAgencyMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactIssueAgencyMonthlyDao.java @@ -42,14 +42,26 @@ public interface FactIssueAgencyMonthlyDao extends BaseDao */ List selectAgencyMonthlyInc(@Param("customerId") String customerId, @Param("monthId") String monthId); - /** - * 删除 - * @author zhaoqifeng - * @date 2020/6/23 14:02 - * @param customerId - * @param monthId - * @return void - */ - void deleteByCustomerId(@Param("customerId") String customerId, @Param("monthId") String monthId); + /** + * 删除 + * + * @param customerId + * @param monthId + * @return void + * @author zhaoqifeng + * @date 2020/6/23 14:02 + */ + void deleteByCustomerId(@Param("customerId") String customerId, @Param("monthId") String monthId); + + /** + * desc: 获取各机关某月议题增量和议题总数 + * + * @param customerId + * @param monthId + * @return java.util.List + * @author LiuJanJun + * @date 2020/9/27 3:33 下午 + */ + List getIssueIncCountAndTotalByMonthId(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/dao/stats/user/FactRegUserAgencyMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactRegUserAgencyMonthlyDao.java index e59f48e8c5..bf0b951134 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 @@ -18,6 +18,7 @@ package com.epmet.dao.stats.user; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.extract.result.GridUserCountResultDTO; import com.epmet.dto.stats.user.FactRegUserAgencyMonthlyDTO; import com.epmet.entity.stats.user.FactRegUserAgencyMonthlyEntity; import org.apache.ibatis.annotations.Mapper; @@ -36,5 +37,7 @@ public interface FactRegUserAgencyMonthlyDao extends BaseDao list); - void deleteByParams(@Param("monthId")String monthId,@Param("customerId")String customerId); + void deleteByParams(@Param("monthId") String monthId, @Param("customerId") String customerId); + + List selectAgencyUserCount(@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 c14364b799..b603d56d02 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 @@ -78,9 +78,10 @@ public interface FactOriginGroupMainDailyService extends BaseService * @author LiuJanJun * @date 2020/9/27 2:24 下午 */ - List selectDistinctGroupMemberCount(String customerId); + List selectDistinctGroupMemberCount(String customerId, String groupField); } \ 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/FactOriginIssueLogDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginIssueLogDailyService.java index a5de0ab804..591ff23f55 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginIssueLogDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginIssueLogDailyService.java @@ -59,9 +59,10 @@ public interface FactOriginIssueLogDailyService extends BaseService * @author LiuJanJun * @date 2020/9/27 1:58 下午 */ - List getVoteCount(String customerId, String monthId); + List getVoteCount(String customerId, String monthId, String groupField); } \ 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 f0b5cd53f0..b19ea0df4a 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 @@ -116,8 +116,8 @@ public class FactOriginGroupMainDailyServiceImpl extends BaseServiceImpl selectDistinctGroupMemberCount(String customerId) { - return baseDao.selectDistinctGroupMemberCount(customerId); + public List selectDistinctGroupMemberCount(String customerId, String groupField) { + return baseDao.selectDistinctGroupMemberCount(customerId, groupField); } } \ 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/FactOriginIssueLogDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginIssueLogDailyServiceImpl.java index 923ac3f2ff..b41f762bf4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginIssueLogDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginIssueLogDailyServiceImpl.java @@ -97,7 +97,7 @@ public class FactOriginIssueLogDailyServiceImpl extends BaseServiceImpl getVoteCount(String customerId, String monthId) { - return baseDao.getVoteCount(customerId, monthId); + public List getVoteCount(String customerId, String monthId, String groupField) { + return baseDao.getVoteCount(customerId, monthId, groupField); } } \ 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/ScreenExtractService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/ScreenExtractService.java index f61b933bf4..7b5ee20155 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/ScreenExtractService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/ScreenExtractService.java @@ -16,4 +16,12 @@ public interface ScreenExtractService { */ void extractDailyAll(ExtractOriginFormDTO extractOriginFormDTO); + /** + * @param extractOriginFormDTO + * @Description 抽取数据到大屏【月】 + * @author zxc + * @date 2020/9/24 10:15 上午 + */ + void extractMonthlyAll(ExtractOriginFormDTO extractOriginFormDTO); + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java index 2f2d5f1e4a..68f4886f8f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java @@ -6,6 +6,7 @@ import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.OrgTypeConstant; +import com.epmet.constant.ProjectConstant; import com.epmet.dto.extract.form.ExtractScreenFormDTO; import com.epmet.dto.extract.result.GridGroupUserCountResultDTO; import com.epmet.dto.extract.result.GridUserCountResultDTO; @@ -13,25 +14,28 @@ import com.epmet.dto.extract.result.IssueVoteUserCountResultDTO; import com.epmet.entity.evaluationindex.screen.ScreenUserJoinEntity; import com.epmet.entity.stats.DimAgencyEntity; import com.epmet.entity.stats.DimGridEntity; +import com.epmet.entity.stats.FactIssueAgencyMonthlyEntity; import com.epmet.entity.stats.FactIssueGridMonthlyEntity; import com.epmet.service.evaluationindex.extract.todata.FactOriginGroupMainDailyService; import com.epmet.service.evaluationindex.extract.todata.FactOriginIssueLogDailyService; import com.epmet.service.evaluationindex.extract.toscreen.PublicPartExtractService; +import com.epmet.service.evaluationindex.screen.ScreenUserJoinService; import com.epmet.service.stats.DimAgencyService; import com.epmet.service.stats.DimGridService; +import com.epmet.service.stats.FactIssueAgencyMonthlyService; import com.epmet.service.stats.FactIssueGridMonthlyService; +import com.epmet.service.stats.user.FactRegUserAgencyMonthlyService; import com.epmet.service.stats.user.FactRegUserGridMonthlyService; import com.epmet.util.DimIdGenerator; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; import java.math.BigDecimal; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; /** @@ -53,9 +57,15 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService { @Autowired private FactRegUserGridMonthlyService factRegUserGridMonthlyService; @Autowired + private FactIssueAgencyMonthlyService factIssueAgencyMonthlyService; + @Autowired + private FactRegUserAgencyMonthlyService factRegUserAgencyMonthlyService; + @Autowired private FactOriginIssueLogDailyService factOriginIssueLogDailyService; @Autowired private FactOriginGroupMainDailyService factOriginGroupMainDailyService; + @Autowired + private ScreenUserJoinService screenUserJoinService; /** @@ -64,9 +74,7 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService { * 总参与:统计周期内议题表决(虽然可以评价 但是只有表决的人可以评价 所以按表决人数算)的人数 * 百人人均议题:统计周期内总的议题数/(注册用户数/100) * 百人平均参与度:每个议题的实际参与数/应参与数 的平均值:(每个议题的实际参与数/应参与数)的和)/被表决的议题数 来源 获取issue_vote_statistical_daily中 monthId的数据 - *

- *

- *

+ * * 不考虑市北:人均议题:统计周期内议题总数/发过议题的人数 参与度:各个行为(表决)的总数/发生行为的人数 * * @return java.lang.Boolean @@ -94,7 +102,7 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService { Map insertMap = new HashMap<>(); orgList.forEach(org -> buildUserJoinEntity(formDTO, org, insertMap)); //获取议题月份增量 - List issueTotal = factIssueGridMonthlyService.getIssueCount(formDTO.getCustomerId(), formDTO.getMonthId()); + List issueTotal = factIssueGridMonthlyService.getIssueIncCountAndTotalByMonthId(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(issueTotal)) { log.error("抽取【公众参与-人均议题】,获取议题增量为空"); return; @@ -111,28 +119,28 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService { entity.setJoinTotal(issue.getIssueIncr()); GridUserCountResultDTO user = userCountMap.get(gridId); //百人人均议题:统计周期内总的议题数/(注册用户数/100) - BigDecimal avgIssueCount = new BigDecimal(issue.getIssueIncr()).divide(new BigDecimal(user.getUserCount()).divide(new BigDecimal(NumConstant.ONE_HUNDRED))); + BigDecimal avgIssueCount = new BigDecimal(issue.getIssueIncr()).divide(new BigDecimal(user.getRegTotal()).divide(new BigDecimal(NumConstant.ONE_HUNDRED))); entity.setAvgIssue(avgIssueCount); }); //获取该月 表决的人数 - List voteCountList = factOriginIssueLogDailyService.getVoteCount(formDTO.getCustomerId(), formDTO.getMonthId()); + List voteCountList = factOriginIssueLogDailyService.getVoteCount(formDTO.getCustomerId(), formDTO.getMonthId(), ProjectConstant.GRID_ID); Map gridMemberCount = new HashMap<>(); if (!CollectionUtils.isEmpty(issueTotal)) { //获取每个网格的应表决人数 - List memberCountList = factOriginGroupMainDailyService.selectDistinctGroupMemberCount(formDTO.getCustomerId()); + List memberCountList = factOriginGroupMainDailyService.selectDistinctGroupMemberCount(formDTO.getCustomerId(), ProjectConstant.AGENCY_ID); if (CollectionUtils.isEmpty(memberCountList)) { log.error("抽取【公众参与-人均议题】,获取应表决人数为空"); return; } - gridMemberCount = memberCountList.stream().collect(Collectors.toMap(GridGroupUserCountResultDTO::getGridId, o -> o.getMemberCount())); + gridMemberCount = memberCountList.stream().collect(Collectors.toMap(GridGroupUserCountResultDTO::getOrgId, o -> o.getMemberCount())); } //百人平均参与度:每个议题的实际参与数/应参与数 的平均值:(每个议题的实际参与数/应参与数)的和)/被表决的议题数 //遍历实际参与人数 - Map> voteMap = voteCountList.stream().collect(Collectors.groupingBy(IssueVoteUserCountResultDTO::getGridId)); + Map> voteMap = voteCountList.stream().collect(Collectors.groupingBy(IssueVoteUserCountResultDTO::getOrgId)); for (Map.Entry> entry : voteMap.entrySet()) { String gridId = entry.getKey(); ScreenUserJoinEntity entity = insertMap.get(gridId); @@ -148,6 +156,7 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService { } entity.setAvgJoin(bigDecimal.divide(votedByIssueCount).multiply(new BigDecimal(NumConstant.ONE_HUNDRED))); } + screenUserJoinService.deleteAndInsertBatch(formDTO, new ArrayList<>(insertMap.values())); } private void extractAgencyUserJoin(ExtractScreenFormDTO formDTO) { @@ -158,10 +167,63 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService { } //构建组织数据 Map insertMap = new HashMap<>(); - orgList.forEach(org -> { - buildUserJoinEntity(formDTO, org, insertMap); + orgList.forEach(org -> buildUserJoinEntity(formDTO, org, insertMap)); + List issueTotal = factIssueAgencyMonthlyService.getIssueIncCountAndTotalByMonthId(formDTO.getCustomerId(), formDTO.getMonthId()); + + List userCountList = factRegUserAgencyMonthlyService.selectAgencyUserCount(formDTO.getCustomerId(), formDTO.getMonthId()); + if (CollectionUtils.isEmpty(issueTotal)) { + log.error("抽取【公众参与-人均议题】,获取注册用户数为空"); + return; + } + Map userCountMap = userCountList.stream().collect(Collectors.toMap(GridUserCountResultDTO::getGridId, o -> o)); + Set agencyIdSet = new HashSet<>(); + issueTotal.forEach(issue -> { + String agencyId = issue.getAgencyId(); + agencyIdSet.add(agencyId); + ScreenUserJoinEntity entity = insertMap.get(agencyId); + entity.setJoinTotal(issue.getIssueIncr()); + GridUserCountResultDTO user = userCountMap.get(agencyId); + //百人人均议题:统计周期内总的议题数/(注册用户数/100) + BigDecimal avgIssueCount = new BigDecimal(issue.getIssueIncr()).divide(new BigDecimal(user.getRegTotal()).divide(new BigDecimal(NumConstant.ONE_HUNDRED))); + entity.setAvgIssue(avgIssueCount); + }); + + List> partition = ListUtils.partition(new ArrayList<>(agencyIdSet), NumConstant.THIRTY); + partition.forEach(list -> { + //获取该月 表决的人数 + List voteCountList = factOriginIssueLogDailyService.getVoteCount(formDTO.getCustomerId(), formDTO.getMonthId(), ProjectConstant.AGENCY_ID); + Map orgMemberCount = new HashMap<>(); + if (!CollectionUtils.isEmpty(issueTotal)) { + //获取每个网格的应表决人数 + List memberCountList = factOriginGroupMainDailyService.selectDistinctGroupMemberCount(formDTO.getCustomerId(), ProjectConstant.AGENCY_ID); + if (CollectionUtils.isEmpty(memberCountList)) { + log.error("抽取【公众参与-人均议题】,获取应表决人数为空"); + return; + } + orgMemberCount = memberCountList.stream().collect(Collectors.toMap(GridGroupUserCountResultDTO::getOrgId, o -> o.getMemberCount())); + } + + //百人平均参与度:每个议题的实际参与数/应参与数 的平均值:(每个议题的实际参与数/应参与数)的和)/被表决的议题数 + + //遍历实际参与人数 + Map> voteMap = voteCountList.stream().collect(Collectors.groupingBy(IssueVoteUserCountResultDTO::getOrgId)); + for (Map.Entry> entry : voteMap.entrySet()) { + String orgId = entry.getKey(); + ScreenUserJoinEntity entity = insertMap.get(orgId); + List issueList = entry.getValue(); + BigDecimal bigDecimal = new BigDecimal(0); + BigDecimal votedByIssueCount = new BigDecimal(issueList.get(0).getIssueCount()); + for (IssueVoteUserCountResultDTO vote : issueList) { + Integer memberCount = orgMemberCount.get(orgId); + if (memberCount == null) { + memberCount = 0; + } + bigDecimal = bigDecimal.add(new BigDecimal(vote.getVoteCount() / memberCount)); + } + entity.setAvgJoin(bigDecimal.divide(votedByIssueCount).multiply(new BigDecimal(NumConstant.ONE_HUNDRED))); + } }); - List issueTotal = factIssueGridMonthlyService.getIssueCount(formDTO.getCustomerId(), formDTO.getMonthId()); + screenUserJoinService.deleteAndInsertBatch(formDTO, new ArrayList<>(insertMap.values())); } private void buildUserJoinEntity(ExtractScreenFormDTO formDTO, Object org, Map result) { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java index 9c8b73e49e..7853b0c69b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java @@ -3,8 +3,10 @@ package com.epmet.service.evaluationindex.extract.toscreen.impl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.dto.extract.form.ExtractOriginFormDTO; +import com.epmet.dto.extract.form.ExtractScreenFormDTO; import com.epmet.service.evaluationindex.extract.toscreen.PartyBaseInfoService; import com.epmet.service.evaluationindex.extract.toscreen.PioneerDataExtractService; +import com.epmet.service.evaluationindex.extract.toscreen.PublicPartExtractService; import com.epmet.service.evaluationindex.extract.toscreen.ScreenExtractService; import com.epmet.service.stats.DimCustomerService; import lombok.extern.slf4j.Slf4j; @@ -31,6 +33,8 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { private PartyBaseInfoService partyBaseInfoService; @Autowired private PioneerDataExtractService pioneerDataExtractService; + @Autowired + private PublicPartExtractService publicPartExtractService; /** * @param extractOriginFormDTO @@ -66,17 +70,59 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { } + @Override + public void extractMonthlyAll(ExtractOriginFormDTO formDTO) { + + List customerIds = new ArrayList<>(); + if (StringUtils.isNotBlank(formDTO.getCustomerId())) { + customerIds.add(formDTO.getCustomerId()); + } else { + int pageNo = NumConstant.ONE; + int pageSize = NumConstant.ONE_HUNDRED; + customerIds = dimCustomerService.selectCustomerIdPage(pageNo, pageSize); + } + if (!CollectionUtils.isEmpty(customerIds)) { + customerIds.forEach(customerId -> { + if (StringUtils.isNotBlank(formDTO.getStartDate()) && StringUtils.isNotBlank(formDTO.getEndDate())) { + List daysBetween = DateUtils.getDaysBetween(formDTO.getStartDate(), formDTO.getEndDate()); + daysBetween.forEach(dateId -> { + extractMonthly(customerId, dateId); + }); + } else if (StringUtils.isNotBlank(formDTO.getDateId())) { + extractMonthly(customerId, formDTO.getDateId()); + } else { + String dateId = LocalDate.now().minusDays(NumConstant.ONE).toString().replace("-", ""); + extractMonthly(customerId, dateId); + } + }); + } + + } + /** - * @Description 按天计算 * @param customerId * @param dateId + * @Description 按天计算 * @author zxc * @date 2020/9/24 10:16 上午 */ - public void extractDaily(String customerId,String dateId){ + public void extractDaily(String customerId, String dateId) { // partyBaseInfoService.statsPartyMemberBaseInfoToScreen(customerId,dateId); - pioneerDataExtractService.extractGridPioneerData(customerId,dateId); - pioneerDataExtractService.extractCommunityPioneerData(customerId,dateId); - pioneerDataExtractService.extractExceptCommunityPioneerData(customerId,dateId); + pioneerDataExtractService.extractGridPioneerData(customerId, dateId); + pioneerDataExtractService.extractCommunityPioneerData(customerId, dateId); + pioneerDataExtractService.extractExceptCommunityPioneerData(customerId, dateId); + } + + /** + * @Description 按月计算 + * @author zxc + * @date 2020/9/24 10:16 上午 + */ + public void extractMonthly(String customerId, String monthId) { + ExtractScreenFormDTO formDTO = new ExtractScreenFormDTO(); + formDTO.setCustomerId(customerId); + formDTO.setMonthId(monthId); + + publicPartExtractService.extractTotalDataMonthly(formDTO); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenUserJoinService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenUserJoinService.java index 902aea5d43..0a42c758a4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenUserJoinService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenUserJoinService.java @@ -19,8 +19,11 @@ package com.epmet.service.evaluationindex.screen; import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.extract.form.ExtractScreenFormDTO; import com.epmet.entity.evaluationindex.screen.ScreenUserJoinEntity; +import java.util.List; + /** * 基层治理-公众参与 * @@ -28,4 +31,14 @@ import com.epmet.entity.evaluationindex.screen.ScreenUserJoinEntity; * @since v1.0.0 2020-09-22 */ public interface ScreenUserJoinService extends BaseService { + /** + * desc: 删除并插入某月的数据 + * + * @param formDTO + * @param list + * @return java.lang.Boolean + * @author LiuJanJun + * @date 2020/9/27 4:40 下午 + */ + Boolean deleteAndInsertBatch(ExtractScreenFormDTO formDTO, List list); } \ 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/ScreenUserJoinServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenUserJoinServiceImpl.java index f2bbb8b628..c6ca536993 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenUserJoinServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenUserJoinServiceImpl.java @@ -18,11 +18,27 @@ 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.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.CompareConstant; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.screen.ScreenUserJoinDao; +import com.epmet.dto.extract.form.ExtractScreenFormDTO; import com.epmet.entity.evaluationindex.screen.ScreenUserJoinEntity; import com.epmet.service.evaluationindex.screen.ScreenUserJoinService; +import com.epmet.util.DimIdGenerator; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; /** * 基层治理-公众参与 @@ -30,8 +46,149 @@ import org.springframework.stereotype.Service; * @author generator generator@elink-cn.com * @since v1.0.0 2020-09-22 */ +@Slf4j @Service public class ScreenUserJoinServiceImpl extends BaseServiceImpl implements ScreenUserJoinService { + @Override + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) + @Transactional(rollbackFor = Exception.class) + public Boolean deleteAndInsertBatch(ExtractScreenFormDTO formDTO, List list) { + if (formDTO == null || StringUtils.isBlank(formDTO.getCustomerId()) || StringUtils.isBlank(formDTO.getMonthId()) || CollectionUtils.isEmpty(list)) { + log.error("deleteAndInsertBatch param is error"); + return false; + } + int deleteNum; + do { + deleteNum = baseDao.deleteUserJoin(formDTO.getCustomerId(), formDTO.getMonthId()); + } while (deleteNum != NumConstant.ZERO); + + + String[] orgIds = new String[list.size()]; + for (int i = NumConstant.ZERO; i < list.size(); i++) { + orgIds[i] = list.get(i).getOrgId(); + } + DimIdGenerator.DimIdBean dimIdBean = DimIdGenerator.getDimIdBean(DateUtils.addDateMonths(DateUtils.stringToDate(formDTO.getMonthId(), DateUtils.DATE_PATTERN_YYYYMM), -1)); + // 获取上个月的基本数据 + List lastMonthJoinList = baseDao.selectLastMonthScreenUserJoinList(formDTO.getCustomerId(), + dimIdBean.getYearId(), + dimIdBean.getMonthId(), + orgIds); + + // 定义本月待添加数据的集合 + List curMonthJoinEntityList = new ArrayList<>(); + // 增加率计算 + if (null != lastMonthJoinList && lastMonthJoinList.size() > NumConstant.ZERO) { + // 存在上个月的数据 (本月-上月)/上月 *100 + for (int i = NumConstant.ZERO; i < list.size(); i++) { + for (int j = NumConstant.ZERO; j < lastMonthJoinList.size(); j++) { + if (list.get(i).getOrgId().equals(lastMonthJoinList.get(j).getOrgId())) { + ScreenUserJoinEntity entity = ConvertUtils.sourceToTarget(list.get(i), ScreenUserJoinEntity.class); + entity.setJoinTotalUpRate(this.calculateGrowthRateNumber(lastMonthJoinList.get(i).getJoinTotal(), list.get(j).getJoinTotal())); + entity.setJoinTotalUpFlag(this.calculateGrowthRateFlag(lastMonthJoinList.get(i).getJoinTotal(), list.get(j).getJoinTotal())); + entity.setAvgIssueUpRate(this.calculateGrowthRateNumber(lastMonthJoinList.get(i).getAvgIssue(), list.get(j).getAvgIssue())); + entity.setAvgIssueUpFlag(this.calculateGrowthRateFlag(lastMonthJoinList.get(i).getAvgIssue(), list.get(j).getAvgIssue())); + entity.setAgvgJoinUpRate(this.calculateGrowthRateNumber(lastMonthJoinList.get(i).getAvgJoin(), list.get(j).getAvgJoin())); + entity.setAgvgJoinUpFlag(this.calculateGrowthRateFlag(lastMonthJoinList.get(i).getAvgJoin(), list.get(j).getAvgJoin())); + curMonthJoinEntityList.add(entity); + } + } + } + } else { + // 计算增长率后的 待新增数据 + BigDecimal zero = new BigDecimal(NumConstant.ZERO); + // 不存在上个月的数据 + for (int i = NumConstant.ZERO; i < list.size(); i++) { + ScreenUserJoinEntity entity = ConvertUtils.sourceToTarget(list.get(i), ScreenUserJoinEntity.class); + entity.setJoinTotalUpRate(zero); + entity.setJoinTotalUpFlag(""); + entity.setAvgIssueUpRate(zero); + entity.setAvgIssueUpFlag(""); + entity.setAgvgJoinUpRate(zero); + entity.setAgvgJoinUpFlag(""); + curMonthJoinEntityList.add(entity); + } + } + + this.insertBatch(list, NumConstant.ONE_HUNDRED); + return true; + } + + + /** + * 计算 本月数值 相较于 上月数值,的增长率 + * + * @param old 上月数值 + * @param now 本月数值 + * @return java.math.BigDecimal + * @Author zhangyong + * @Date 15:38 2020-08-21 + **/ + private BigDecimal calculateGrowthRateNumber(Integer old, Integer now) { + if (NumConstant.ZERO == old) { + return new BigDecimal(now * NumConstant.ONE_HUNDRED); + } + BigDecimal bignum1 = new BigDecimal((now - old) * NumConstant.ONE_HUNDRED); + BigDecimal bignum2 = bignum1.divide(new BigDecimal(old), 2, BigDecimal.ROUND_HALF_UP); + return bignum2; + } + + /** + * 计算 本月数值 相较于 上月数值,的增长率 + * + * @param old 上月数值 + * @param now 本月数值 + * @return java.math.BigDecimal + * @Author zhangyong + * @Date 15:38 2020-08-21 + **/ + private BigDecimal calculateGrowthRateNumber(BigDecimal old, BigDecimal now) { + BigDecimal oneHundred = new BigDecimal(NumConstant.ONE_HUNDRED); + if (old.compareTo(new BigDecimal(NumConstant.ZERO)) == NumConstant.ZERO) { + return now.multiply(oneHundred); + } + BigDecimal bignum1 = now.subtract(old).multiply(oneHundred); + BigDecimal bignum2 = bignum1.divide(old, 2, BigDecimal.ROUND_HALF_UP); + return bignum2; + } + + + /** + * 计算 本月数值 相较于 上月数值,的增长率, 得出标识 + * + * @param old 上月数值 + * @param now 本月数值 + * @return java.util.String + * @Author zhangyong + * @Date 15:38 2020-08-21 + **/ + private String calculateGrowthRateFlag(Integer old, Integer now) { + if (old > now) { + return CompareConstant.DECR_STR; + } else if (old < now) { + return CompareConstant.INCR_STR; + } else { + return CompareConstant.EQ_STR; + } + } + + /** + * 计算 本月数值 相较于 上月数值,的增长率, 得出标识 + * + * @param old 上月数值 + * @param now 本月数值 + * @return java.util.String + * @Author zhangyong + * @Date 15:38 2020-08-21 + **/ + private String calculateGrowthRateFlag(BigDecimal old, BigDecimal now) { + if (old.compareTo(now) == 1) { + return CompareConstant.DECR_STR; + } else if (old.compareTo(now) == -1) { + return CompareConstant.INCR_STR; + } else { + return CompareConstant.EQ_STR; + } + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactIssueAgencyMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactIssueAgencyMonthlyService.java index b388e8ee58..944f38884b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactIssueAgencyMonthlyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactIssueAgencyMonthlyService.java @@ -115,10 +115,22 @@ public interface FactIssueAgencyMonthlyService extends BaseService list); + + /** + * desc: 获取某月议题总数 + * + * @param customerId + * @param monthId + * @return java.util.List + * @author LiuJanJun + * @date 2020/9/27 3:30 下午 + */ + List getIssueIncCountAndTotalByMonthId(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/FactIssueGridMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactIssueGridMonthlyService.java index 736a6e348c..494823db73 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactIssueGridMonthlyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactIssueGridMonthlyService.java @@ -79,5 +79,5 @@ public interface FactIssueGridMonthlyService extends BaseService getIssueCount(String customerId, String monthId); + List getIssueIncCountAndTotalByMonthId(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/impl/FactIssueAgencyMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueAgencyMonthlyServiceImpl.java index 2c3b7d46af..915bee4837 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueAgencyMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueAgencyMonthlyServiceImpl.java @@ -117,4 +117,9 @@ public class FactIssueAgencyMonthlyServiceImpl extends BaseServiceImpl getIssueIncCountAndTotalByMonthId(String customerId, String monthId) { + return baseDao.getIssueIncCountAndTotalByMonthId(customerId, monthId); + } + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueGridMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueGridMonthlyServiceImpl.java index c002e0e3ca..23ade86942 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueGridMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueGridMonthlyServiceImpl.java @@ -74,7 +74,7 @@ public class FactIssueGridMonthlyServiceImpl extends BaseServiceImpl getIssueCount(String customerId, String monthId) { + public List getIssueIncCountAndTotalByMonthId(String customerId, String monthId) { return baseDao.getIssueCount(customerId, monthId); } 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 6f5f7c4963..bdce57807a 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 @@ -19,10 +19,10 @@ package com.epmet.service.stats.user; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.extract.result.GridUserCountResultDTO; import com.epmet.dto.stats.user.FactRegUserAgencyMonthlyDTO; import com.epmet.entity.stats.user.FactRegUserAgencyMonthlyEntity; - import java.util.List; import java.util.Map; @@ -93,4 +93,15 @@ public interface FactRegUserAgencyMonthlyService extends BaseService + * @author LiuJanJun + * @date 2020/9/27 3:45 下午 + */ + List selectAgencyUserCount(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 55925a2b81..315609b3bb 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 @@ -20,15 +20,15 @@ package com.epmet.service.stats.user.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.dao.stats.user.FactRegUserAgencyMonthlyDao; +import com.epmet.dto.extract.result.GridUserCountResultDTO; import com.epmet.dto.stats.user.FactRegUserAgencyMonthlyDTO; import com.epmet.entity.stats.user.FactRegUserAgencyMonthlyEntity; import com.epmet.service.stats.user.FactRegUserAgencyMonthlyService; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -99,4 +99,9 @@ public class FactRegUserAgencyMonthlyServiceImpl extends BaseServiceImpl selectAgencyUserCount(String customerId, String monthId) { + return baseDao.selectAgencyUserCount(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 2680ca1605..8b326f3aa3 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 @@ -268,8 +268,8 @@ \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueLogDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueLogDailyDao.xml index 1d549be8cc..d006bce552 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueLogDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginIssueLogDailyDao.xml @@ -95,6 +95,23 @@ + + + + - - - - \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactIssueAgencyMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactIssueAgencyMonthlyDao.xml index 45f53d10cc..2aab89ada4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactIssueAgencyMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactIssueAgencyMonthlyDao.xml @@ -71,4 +71,13 @@ da.ID + \ No newline at end of file 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 aa8548ff1c..d81d385479 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 @@ -102,4 +102,17 @@ + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/user/FactRegUserGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/user/FactRegUserGridMonthlyDao.xml index 42e736c90c..c0efb0dc5e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/user/FactRegUserGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/user/FactRegUserGridMonthlyDao.xml @@ -111,7 +111,8 @@ SELECT REG_INCR, PARTYMEMBER_INCR, - GRID_ID + GRID_ID, + REG_TOTAL FROM fact_reg_user_grid_monthly WHERE