From c3d3ef66935c7d269f2a5db9beb8e584eb2ac62e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 21 Sep 2020 09:55:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=9A=E5=91=98=E7=9B=B8=E5=85=B3-=E5=85=9A?= =?UTF-8?q?=E5=BB=BA=E8=83=BD=E5=8A=9B=E8=AE=A1=E7=AE=97V0.4=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9monthId,yearId,quarterId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/impl/CalCpcIndexServiceImpl.java | 6 ++++++ .../resources/mapper/stats/DimCustomerPartymemberDao.xml | 8 +++----- 2 files changed, 9 insertions(+), 5 deletions(-) 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,