Browse Source

生产环境 暂时去掉 市北客户id 的指标原始数据抽取及 市北的指标计算(市北只支持 他们自己调用计算)

dev_shibei_match
jianjun 4 years ago
parent
commit
d2171ce68c
  1. 15
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/CustomerIdConstant.java
  2. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java
  3. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java
  4. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java

15
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/CustomerIdConstant.java

@ -0,0 +1,15 @@
package com.epmet.commons.tools.constant;
/**
* desc:
*
* @author: LiuJanJun
* @date: 2021/12/27 10:22 上午
* @version: 1.0
*/
public interface CustomerIdConstant {
/**
* 市北生产-客户ID
*/
String SHI_BEI_CUSTOMER_ID = "b09527201c4409e19d1dbc5e3c3429a1";
}

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java

@ -1,6 +1,7 @@
package com.epmet.service.evaluationindex.extract.dataToIndex.impl;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.constant.CustomerIdConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.extract.form.ExtractIndexFormDTO;
@ -67,6 +68,8 @@ public class IndexOriginExtractServiceImpl implements IndexOriginExtractService
log.error("indexOriginExtractAll 获取客户Id为空");
return;
}
//去除 市北客户id的抽取
customerIds.remove(CustomerIdConstant.SHI_BEI_CUSTOMER_ID);
}
String finalMonthId = monthId;

6
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java

@ -1,6 +1,7 @@
package com.epmet.service.evaluationindex.extract.toscreen.impl;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.constant.CustomerIdConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.distributedlock.DistributedLock;
@ -460,6 +461,11 @@ public class ScreenExtractServiceImpl implements ScreenExtractService {
} catch (Exception e) {
log.error("项目(事件)数量分析按组织_按月统计失败,参数为{}" + JSON.toJSONString(formDTO), e);
}
//去除 市北客户id的抽取
if (CustomerIdConstant.SHI_BEI_CUSTOMER_ID.equals(customerId)){
log.info("===== extractMonthly method end not contains shi bei:{}======", customerId);
return;
}
//此方法保持在最后即可 计算指标分数 todo 优化 手动创建线程池 控制任务数量
ExecutorService pool = Executors.newSingleThreadExecutor();
pool.submit(() -> {

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java

@ -15,7 +15,6 @@ import com.epmet.dto.indexcal.IndexStatisticsFormDTO;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
import com.epmet.redis.IndexCalRedis;
import com.epmet.service.crm.CustomerRelationService;
import com.epmet.service.evaluationindex.extract.dataToIndex.IndexOriginExtractService;
import com.epmet.service.evaluationindex.indexcal.*;
import com.epmet.service.evaluationindex.indexcoll.FactIndexCollectService;
import com.epmet.util.DimIdGenerator;
@ -59,8 +58,6 @@ public class IndexCalculateServiceImpl implements IndexCalculateService {
private ScreenCustomerAgencyDao screenCustomerAgencyDao;
@Autowired
private CustomerRelationService customerRelationService;
@Autowired
private IndexOriginExtractService indexOriginExtractService;
@Override
public Boolean indexCalculate(CalculateCommonFormDTO formDTO) {

Loading…
Cancel
Save