diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalCpcIndexServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalCpcIndexServiceImpl.java index d7cf968388..4c930bec8a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalCpcIndexServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalCpcIndexServiceImpl.java @@ -2,6 +2,7 @@ package com.epmet.service.evaluationindex.extract.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; import com.epmet.dao.evaluationindex.extract.FactOriginGroupMainDailyDao; @@ -62,6 +63,8 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService { log.info("dim_customer_partymember do not any records"); return; } + String quarterId= DateUtils.getQuarterId(monthId); + String yearId=DateUtils.getYearId(monthId); //2、删除之前统计过的 deleteFactIndexPartyAblityCpcMonthly(customerId, monthId); @@ -89,6 +92,9 @@ public class CalCpcIndexServiceImpl implements CalCpcIndexService { //3、计算实际值,更新 for (FactIndexPartyAblityCpcMonthlyEntity indexPartyAblityCpcEntity : indexPartyAblityCpcList) { + indexPartyAblityCpcEntity.setMonthId(monthId); + indexPartyAblityCpcEntity.setQuarterId(quarterId); + indexPartyAblityCpcEntity.setYearId(yearId); //1、党员提出话题数 if (createTopicCountMap.containsKey(indexPartyAblityCpcEntity.getUserId())) { indexPartyAblityCpcEntity.setCreateTopicCount(createTopicCountMap.get(indexPartyAblityCpcEntity.getUserId())); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimCustomerPartymemberDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimCustomerPartymemberDao.xml index 04b111bef6..b8465ad316 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimCustomerPartymemberDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimCustomerPartymemberDao.xml @@ -68,11 +68,9 @@ dcp.GRID_ID, dcp.AGENCY_ID, dcp.PARENT_ID, - dcp.DATE_ID, - dcp.WEEK_ID, - dcp.MONTH_ID, - dcp.QUARTER_ID, - dcp.YEAR_ID, + null as MONTH_ID, + null as QUARTER_ID, + null as YEAR_ID, dcp.USER_ID, 0 as CREATE_TOPIC_COUNT, 0 as JOIN_TOPIC_COUNT,