From d2171ce68cba87b4d35c6d8789ba72137715b960 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 27 Dec 2021 10:44:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E7=8E=AF=E5=A2=83=20?= =?UTF-8?q?=E6=9A=82=E6=97=B6=E5=8E=BB=E6=8E=89=20=E5=B8=82=E5=8C=97?= =?UTF-8?q?=E5=AE=A2=E6=88=B7id=20=E7=9A=84=E6=8C=87=E6=A0=87=E5=8E=9F?= =?UTF-8?q?=E5=A7=8B=E6=95=B0=E6=8D=AE=E6=8A=BD=E5=8F=96=E5=8F=8A=20?= =?UTF-8?q?=E5=B8=82=E5=8C=97=E7=9A=84=E6=8C=87=E6=A0=87=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=EF=BC=88=E5=B8=82=E5=8C=97=E5=8F=AA=E6=94=AF=E6=8C=81=20?= =?UTF-8?q?=E4=BB=96=E4=BB=AC=E8=87=AA=E5=B7=B1=E8=B0=83=E7=94=A8=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/constant/CustomerIdConstant.java | 15 +++++++++++++++ .../impl/IndexOriginExtractServiceImpl.java | 3 +++ .../toscreen/impl/ScreenExtractServiceImpl.java | 6 ++++++ .../indexcal/impl/IndexCalculateServiceImpl.java | 3 --- 4 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/CustomerIdConstant.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/CustomerIdConstant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/CustomerIdConstant.java new file mode 100644 index 0000000000..9860f9d1ad --- /dev/null +++ b/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"; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java index 6bc96d1006..a30c0e3169 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java +++ b/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; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java index d84301a75b..83d52891dc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java +++ b/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(() -> { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java index 5694fbaef0..3fd804ec7a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java +++ b/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) {