Browse Source

党员相关-党建能力计算V0.4 修改monthId,yearId,quarterId

dev_shibei_match
yinzuomei 5 years ago
parent
commit
c3d3ef6693
  1. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalCpcIndexServiceImpl.java
  2. 8
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimCustomerPartymemberDao.xml

6
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()));

8
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,

Loading…
Cancel
Save