From e5a4f0149e55aa82063e2a024a6263cc91f29bcf Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Sat, 19 Sep 2020 14:10:50 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E7=9B=B8=E5=85=B3=20?= =?UTF-8?q?=E5=85=9A=E5=BB=BA=E8=83=BD=E5=8A=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/PartyAbilityGridMonthlyFormDTO.java | 178 ++++++++++++++++++ .../result/CreateTopicCountResultDTO.java | 25 +++ .../result/GridUserCountResultDTO.java | 45 +++++ .../extract/FactOriginTopicMainDailyDao.java | 11 ++ .../FactIndexGovrnAblityGridMonthlyDao.java | 8 + .../FactIndexPartyAblityGridMonthlyDao.java | 18 ++ .../stats/user/FactRegUserGridMonthlyDao.java | 10 + .../FactOriginTopicMainDailyService.java | 11 ++ .../extract/impl/CalGridIndexServiceImpl.java | 58 +++++- .../FactOriginTopicMainDailyServiceImpl.java | 14 ++ .../user/FactRegUserGridMonthlyService.java | 10 + .../FactRegUserGridMonthlyServiceImpl.java | 13 ++ .../extract/FactOriginTopicMainDailyDao.xml | 15 ++ .../FactIndexGovrnAblityGridMonthlyDao.xml | 13 ++ .../FactIndexPartyAblityGridMonthlyDao.xml | 73 +++++++ .../stats/user/FactRegUserGridMonthlyDao.xml | 17 ++ 16 files changed, 514 insertions(+), 5 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/PartyAbilityGridMonthlyFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/CreateTopicCountResultDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridUserCountResultDTO.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/PartyAbilityGridMonthlyFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/PartyAbilityGridMonthlyFormDTO.java new file mode 100644 index 0000000000..de69be568b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/PartyAbilityGridMonthlyFormDTO.java @@ -0,0 +1,178 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.extract.form; + +import java.io.Serializable; +import java.util.Date; + +import com.epmet.commons.tools.constant.NumConstant; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 党建能力-网格相关事实表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-19 + */ +@Data +public class PartyAbilityGridMonthlyFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID 主键 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 机关Id + */ + private String agencyId; + + /** + * 网格Id + */ + private String gridId; + + /** + * 月维度Id:yyyyMM + */ + private String monthId; + + /** + * 季度Id yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4 + */ + private String quarterId; + + /** + * 年Idyyyy + */ + private String yearId; + + /** + * 网格群众用户数 + */ + private Integer userCount; + + /** + * 网格党员用户数 + */ + private Integer partyCount; + + /** + * 网格活跃群众用户数 + */ + private Integer activeUserCount; + + /** + * 网格活跃党员用户数 + */ + private Integer activePartyCount; + + /** + * 网格党员人均提出话题数 + */ + private Integer partyAvgTopicCount; + + /** + * 网格群众人均提出话题数 + */ + private Integer userAvgTopicCount; + + /** + * 网格党员人均提出的议题转项目数 + */ + private Integer partyAvgShiftProjectCount; + + /** + * 网格群众人均提出的议题转项目数 + */ + private Integer userAvgShiftProjectCount; + + /** + * 建群党员数(累计值) 去重 + */ + private Integer createGroupPartyCount; + + /** + * 网格发文数 + */ + private Integer publishArticleCount; + + /** + * 网格议题转项目率 + */ + private BigDecimal issueToProjectRatio; + + /** + * 组织三会一课次数 + */ + private Integer createThreeMeetsCount; + + /** + * 党员参加三会一课人次 + */ + private Integer joinThreeMeetsCount; + + /** + * 删除标识 0未删除;1已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 更新人 + */ + private String updatedBy; + + public PartyAbilityGridMonthlyFormDTO() { + this.userCount = NumConstant.ZERO; + this.partyCount = NumConstant.ZERO; + this.activeUserCount = NumConstant.ZERO; + this.activePartyCount = NumConstant.ZERO; + this.partyAvgTopicCount = NumConstant.ZERO; + this.userAvgTopicCount = NumConstant.ZERO; + this.partyAvgShiftProjectCount = NumConstant.ZERO; + this.userAvgShiftProjectCount = NumConstant.ZERO; + this.createGroupPartyCount = NumConstant.ZERO; + this.publishArticleCount = NumConstant.ZERO; + this.issueToProjectRatio = new BigDecimal(NumConstant.ZERO); + this.createThreeMeetsCount = NumConstant.ZERO; + this.joinThreeMeetsCount = NumConstant.ZERO; + this.delFlag = NumConstant.ZERO_STR; + this.revision = NumConstant.ZERO; + this.createdBy = "APP_USER"; + this.updatedBy = "APP_USER"; + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/CreateTopicCountResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/CreateTopicCountResultDTO.java new file mode 100644 index 0000000000..1aa548f014 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/CreateTopicCountResultDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.extract.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/9/19 1:55 下午 + */ +@Data +public class CreateTopicCountResultDTO implements Serializable { + + private static final long serialVersionUID = 500844515980125608L; + + /** + * 网格ID + */ + private String gridId; + + /** + * 网格 党员/群众 人均提出话题数 + */ + private Integer createTopicCount; +} 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 new file mode 100644 index 0000000000..aa2b5da005 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridUserCountResultDTO.java @@ -0,0 +1,45 @@ +package com.epmet.dto.extract.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/9/19 10:59 上午 + */ +@Data +public class GridUserCountResultDTO implements Serializable { + + private static final long serialVersionUID = -2912049598149499392L; + + /** + * 注册居民本月增量 + */ + private Integer userCount; + + /** + * 注册党员本月增量 + */ + private Integer partyCount; + + /** + * 网格ID + */ + private String gridId; + + /** + * 月份ID + */ + private String monthId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 年度ID + */ + private String yearId; +} 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 a91508e59f..8da1ea3774 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 @@ -18,6 +18,7 @@ package com.epmet.dao.evaluationindex.extract; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.extract.result.CreateTopicCountResultDTO; import com.epmet.entity.evaluationindex.extract.FactOriginTopicMainDailyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -64,4 +65,14 @@ public interface FactOriginTopicMainDailyDao extends BaseDao> selectPartyCreateTopicCount(@Param("customerId") String customerId, @Param("monthId") String monthId); + + /** + * @Description 查询网格 党员/群众 人均提出话题数 + * @param customerId + * @param monthId + * @param isParty + * @author zxc + * @date 2020/9/19 1:58 下午 + */ + List selectCreateTopicCount(@Param("customerId") String customerId, @Param("monthId") String monthId,@Param("isParty")Integer isParty); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java index 520ce244e2..16a916edae 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java @@ -19,6 +19,7 @@ package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.extract.form.GovernAbilityGridMonthlyFormDTO; +import com.epmet.dto.extract.form.PartyAbilityGridMonthlyFormDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; import com.epmet.dto.indexcollect.form.GridGovrnAbilityFormDTO; @@ -110,4 +111,11 @@ public interface FactIndexGovrnAblityGridMonthlyDao extends BaseDao selectAllGridInfo(String customerId); + /** + * @Description 查询全部网格信息 + * @param customerId + * @author zxc + * @date 2020/9/19 10:50 上午 + */ + List selectAllGridInfoToParty(String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.java index 6e2dbcaee5..387e01ec6f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.java @@ -18,6 +18,7 @@ package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.extract.form.PartyAbilityGridMonthlyFormDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; import com.epmet.dto.indexcollect.form.GridPartyAbilityFormDTO; @@ -97,4 +98,21 @@ public interface FactIndexPartyAblityGridMonthlyDao extends BaseDao lists); + + /** + * @Description 删除旧的党建能力记录 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/19 10:45 上午 + */ + void deleteOldPartyAbility(@Param("customerId")String customerId,@Param("monthId")String monthId); } 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 940609d9bc..479ecf5902 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 @@ -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.FactRegUserGridMonthlyDTO; import com.epmet.entity.stats.user.FactRegUserGridMonthlyEntity; import org.apache.ibatis.annotations.Mapper; @@ -38,4 +39,13 @@ public interface FactRegUserGridMonthlyDao extends BaseDao selectGridUserCount(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/evaluationindex/extract/FactOriginTopicMainDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactOriginTopicMainDailyService.java index cb30aa46e7..11440f0bd8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactOriginTopicMainDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactOriginTopicMainDailyService.java @@ -19,6 +19,7 @@ package com.epmet.service.evaluationindex.extract; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.dto.extract.form.ExtractFormDTO; +import com.epmet.dto.extract.result.CreateTopicCountResultDTO; import com.epmet.entity.evaluationindex.extract.FactOriginTopicMainDailyEntity; import java.util.List; @@ -50,4 +51,14 @@ public interface FactOriginTopicMainDailyService extends BaseService> selectPartyCreateTopicCount(String customerId, String monthId); + + /** + * @Description 查询网格 党员/群众 人均提出话题数 + * @param customerId + * @param monthId + * @param isParty + * @author zxc + * @date 2020/9/19 1:58 下午 + */ + List selectCreateTopicCount(String customerId, String monthId,Integer isParty); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java index b1f8d8833a..150217a7eb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java @@ -7,13 +7,13 @@ import com.epmet.constant.DataSourceConstant; import com.epmet.constant.ExtractConstant; import com.epmet.constant.ProjectEvaluateConstant; import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyDao; import com.epmet.dto.extract.form.GovernAbilityGridMonthlyFormDTO; import com.epmet.dto.extract.form.GridIssueCountResultDTO; +import com.epmet.dto.extract.form.PartyAbilityGridMonthlyFormDTO; import com.epmet.dto.extract.result.*; -import com.epmet.service.evaluationindex.extract.CalGridIndexService; -import com.epmet.service.evaluationindex.extract.FactOriginProjectLogDailyService; -import com.epmet.service.evaluationindex.extract.FactOriginProjectMainDailyService; -import com.epmet.service.evaluationindex.extract.IssueExtractService; +import com.epmet.service.evaluationindex.extract.*; +import com.epmet.service.stats.user.FactRegUserGridMonthlyService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -41,9 +41,15 @@ public class CalGridIndexServiceImpl implements CalGridIndexService { @Autowired private FactIndexGovrnAblityGridMonthlyDao governAbilityDao; @Autowired + private FactIndexPartyAblityGridMonthlyDao partyAbilityGridDao; + @Autowired private FactOriginProjectMainDailyService projectMainService; @Autowired private FactOriginProjectLogDailyService projectLogService; + @Autowired + private FactRegUserGridMonthlyService userGridMonthlyService; + @Autowired + private FactOriginTopicMainDailyService topicMainService; /** * @Description 计算网格指标党建能力 @@ -54,7 +60,49 @@ public class CalGridIndexServiceImpl implements CalGridIndexService { */ @Override public Boolean calGridIndexPartyAbility(String customerId, String monthId) { - return null; + List result = governAbilityDao.selectAllGridInfoToParty(customerId); + if (CollectionUtils.isEmpty(result)){ + throw new RenException("客户【"+customerId+"】未查出网格信息"); + } + // 网格群众用户数 , 网格党员用户数 + List gridUserCountList = userGridMonthlyService.selectGridUserCount(customerId, monthId); + // 网格党员人均提出话题数 + List partyCreateTopicCountList = topicMainService.selectCreateTopicCount(customerId, monthId, NumConstant.ONE); + // 网格群众人均提出话题数 + List massCreateTopicCountList = topicMainService.selectCreateTopicCount(customerId, monthId, NumConstant.ZERO); + + + + + result.forEach(r -> { + // 1. 网格群众用户数 , 网格党员用户数 + if (!CollectionUtils.isEmpty(gridUserCountList)){ + gridUserCountList.forEach(count -> { + if (r.getGridId().equals(count.getGridId())){ + BeanUtils.copyProperties(count,r); + } + }); + } + // 2. 网格党员人均提出话题数 + if (!CollectionUtils.isEmpty(partyCreateTopicCountList)){ + partyCreateTopicCountList.forEach(party -> { + if (r.getGridId().equals(party.getGridId())){ + r.setPartyAvgTopicCount(party.getCreateTopicCount()); + } + }); + } + // 3. 网格群众人均提出话题数 + if (!CollectionUtils.isEmpty(massCreateTopicCountList)){ + massCreateTopicCountList.forEach(mass -> { + if (r.getGridId().equals(mass.getGridId())){ + r.setUserAvgTopicCount(mass.getCreateTopicCount()); + } + }); + } + }); + + + return true; } /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginTopicMainDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginTopicMainDailyServiceImpl.java index 6925b94644..a61eab5a48 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginTopicMainDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginTopicMainDailyServiceImpl.java @@ -29,6 +29,7 @@ import com.epmet.constant.IndexCalConstant; import com.epmet.dao.evaluationindex.extract.FactOriginTopicLogDailyDao; import com.epmet.dao.evaluationindex.extract.FactOriginTopicMainDailyDao; import com.epmet.dto.extract.form.ExtractFormDTO; +import com.epmet.dto.extract.result.CreateTopicCountResultDTO; import com.epmet.dto.org.GridInfoDTO; import com.epmet.dto.topic.TopicOriginInfoDTO; import com.epmet.entity.evaluationindex.extract.FactOriginTopicLogDailyEntity; @@ -239,4 +240,17 @@ public class FactOriginTopicMainDailyServiceImpl extends BaseServiceImpl> selectPartyCreateTopicCount(String customerId, String monthId) { return baseDao.selectPartyCreateTopicCount(customerId,monthId); } + + /** + * @Description 查询网格 党员/群众 人均提出话题数 + * @param customerId + * @param monthId + * @param isParty + * @author zxc + * @date 2020/9/19 1:58 下午 + */ + @Override + public List selectCreateTopicCount(String customerId, String monthId,Integer isParty) { + return baseDao.selectCreateTopicCount(customerId, monthId, isParty); + } } \ 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 11c7dd2e12..860d383906 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 @@ -19,6 +19,7 @@ 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.FactRegUserGridMonthlyDTO; import com.epmet.entity.stats.user.FactRegUserGridMonthlyEntity; @@ -93,4 +94,13 @@ public interface FactRegUserGridMonthlyService extends BaseService selectGridUserCount(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/FactRegUserGridMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactRegUserGridMonthlyServiceImpl.java index 2054ea5909..8016f7f613 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 @@ -24,6 +24,7 @@ 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.FactRegUserGridMonthlyDao; +import com.epmet.dto.extract.result.GridUserCountResultDTO; import com.epmet.dto.stats.user.FactRegUserGridMonthlyDTO; import com.epmet.entity.stats.user.FactRegUserGridMonthlyEntity; import com.epmet.service.stats.user.FactRegUserGridMonthlyService; @@ -99,4 +100,16 @@ public class FactRegUserGridMonthlyServiceImpl extends BaseServiceImpl selectGridUserCount(String customerId, String monthId) { + return baseDao.selectGridUserCount(customerId, monthId); + } + } \ 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 453ba483b2..ef87296be2 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 @@ -78,4 +78,19 @@ GROUP BY T1.CREATE_TOPIC_USER_ID + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml index 5f4a53ed15..401bc5931a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml @@ -174,4 +174,17 @@ DEL_FLAG = 0 AND CUSTOMER_ID = #{customerId} + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml index 5f94b54fba..500f67dcc8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml @@ -193,4 +193,77 @@ AND m.CUSTOMER_ID =#{customerId} AND m.MONTH_ID =#{monthId} + + + + INSERT INTO fact_index_party_ablity_grid_monthly ( + ID, + CUSTOMER_ID, + AGENCY_ID, + GRID_ID, + MONTH_ID, + QUARTER_ID, + YEAR_ID, + USER_COUNT, + PARTY_COUNT, + ACTIVE_USER_COUNT, + ACTIVE_PARTY_COUNT, + PARTY_AVG_TOPIC_COUNT, + USER_AVG_TOPIC_COUNT, + PARTY_AVG_SHIFT_PROJECT_COUNT, + USER_AVG_SHIFT_PROJECT_COUNT, + CREATE_GROUP_PARTY_COUNT, + PUBLISH_ARTICLE_COUNT, + ISSUE_TO_PROJECT_RATIO, + CREATE_THREE_MEETS_COUNT, + JOIN_THREE_MEETS_COUNT, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) + VALUES + + ( + REPLACE ( UUID(), '-', '' ), + #{item.customerId}, + #{item.agencyId}, + #{item.gridId}, + #{item.monthId}, + #{item.quarterId}, + #{item.yearId}, + #{item.userCount}, + #{item.partyCount}, + #{item.activeUserCount}, + #{item.activePartyCount}, + #{item.partyAvgTopicCount}, + #{item.userAvgTopicCount}, + #{item.partyAvgShiftProjectCount}, + #{item.userAvgShiftProjectCount}, + #{item.createGroupPartyCount}, + #{item.publishArticleCount}, + #{item.issueToProjectRatio}, + #{item.createThreeMeetsCount}, + #{item.joinThreeMeetsCount}, + #{item.delFlag}, + #{item.revision}, + #{item.createdBy}, + NOW(), + #{item.updatedBy}, + NOW() + ) + + + + + + DELETE + FROM + fact_index_party_ablity_grid_monthly + WHERE + CUSTOMER_ID = #{customerId} + AND MONTH_ID = #{monthId} + 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 f5f66265fe..38ce9ab106 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 @@ -106,5 +106,22 @@ + + + \ No newline at end of file