diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java index 4be6144bc2..27a471f2d4 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java @@ -7,6 +7,7 @@ import com.epmet.dto.extract.form.ExtractIndexFormDTO; import com.epmet.dto.extract.form.ExtractOriginFormDTO; import com.epmet.dto.extract.form.ExtractScreenFormDTO; import com.epmet.dto.group.form.GroupStatsFormDTO; +import com.epmet.dto.screen.form.InitCustomerIndexForm; import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO; import com.epmet.feign.impl.DataStatisticalOpenFeignClientFallBack; import org.springframework.cloud.openfeign.FeignClient; @@ -227,4 +228,12 @@ public interface DataStatisticalOpenFeignClient { **/ @PostMapping("/data/stats/screenextract/extractmonthlyall") Result extractMonthlyAll(ExtractScreenFormDTO extractScreenFormDTO); + + /** + * @Description 新客户初始化评价指标 权重 + * @author sun + */ + @PostMapping(value = "/data/stats/indexdict/initCustomerIndex") + Result initCustomerIndex(@RequestBody InitCustomerIndexForm formDTO); + } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java index 0f09dc88b9..88574dbd8d 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java @@ -8,6 +8,7 @@ import com.epmet.dto.extract.form.ExtractIndexFormDTO; import com.epmet.dto.extract.form.ExtractOriginFormDTO; import com.epmet.dto.extract.form.ExtractScreenFormDTO; import com.epmet.dto.group.form.GroupStatsFormDTO; +import com.epmet.dto.screen.form.InitCustomerIndexForm; import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO; import com.epmet.feign.DataStatisticalOpenFeignClient; import org.springframework.stereotype.Component; @@ -224,4 +225,9 @@ public class DataStatisticalOpenFeignClientFallBack implements DataStatisticalOp public Result extractMonthlyAll(ExtractScreenFormDTO extractScreenFormDTO) { return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "screenExtractMonthly", extractScreenFormDTO); } + + @Override + public Result initCustomerIndex(InitCustomerIndexForm formDTO) { + return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "initCustomerIndex", formDTO); + } } diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/EpmetPointOpenFeignClient.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/EpmetPointOpenFeignClient.java index d5b9edd6c6..63ffc6a3c0 100644 --- a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/EpmetPointOpenFeignClient.java +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/EpmetPointOpenFeignClient.java @@ -2,6 +2,7 @@ package com.epmet.feign; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.InitPointRuleResultDTO; import com.epmet.dto.form.CommonUserFormDTO; import com.epmet.dto.result.ResiPointDetailResultDTO; import com.epmet.feign.fallback.EpmetPointOpenFeignClientFallback; @@ -26,4 +27,11 @@ public interface EpmetPointOpenFeignClient { **/ @PostMapping("/point/resi/point/mypoint") Result myPoint(CommonUserFormDTO param); + + /** + * @Description 新客户初始化积分规则 + * @author sun + **/ + @PostMapping("/point/opback/initpointrule") + Result initPointRule(); } diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/fallback/EpmetPointOpenFeignClientFallback.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/fallback/EpmetPointOpenFeignClientFallback.java index 7d5cda718f..ab0688e134 100644 --- a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/fallback/EpmetPointOpenFeignClientFallback.java +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/fallback/EpmetPointOpenFeignClientFallback.java @@ -3,6 +3,7 @@ package com.epmet.feign.fallback; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.InitPointRuleResultDTO; import com.epmet.dto.form.CommonUserFormDTO; import com.epmet.dto.result.ResiPointDetailResultDTO; import com.epmet.feign.EpmetPointOpenFeignClient; @@ -20,4 +21,9 @@ public class EpmetPointOpenFeignClientFallback implements EpmetPointOpenFeignCli public Result myPoint(CommonUserFormDTO param) { return ModuleUtils.feignConError(ServiceConstant.EPMET_POINT_SERVER, "myPoint",param); } + + @Override + public Result initPointRule() { + return ModuleUtils.feignConError(ServiceConstant.EPMET_POINT_SERVER, "initPointRule"); + } } diff --git a/epmet-module/oper-crm/oper-crm-server/pom.xml b/epmet-module/oper-crm/oper-crm-server/pom.xml index 610cdd9734..cc8a8b2112 100644 --- a/epmet-module/oper-crm/oper-crm-server/pom.xml +++ b/epmet-module/oper-crm/oper-crm-server/pom.xml @@ -99,6 +99,18 @@ epmet-commons-rocketmq 2.0.0 + + com.epmet + epmet-point-client + 2.0.0 + compile + + + com.epmet + data-statistical-client + 2.0.0 + compile + diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java index f1c5896f0e..5fc79407eb 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java @@ -40,6 +40,7 @@ import com.epmet.dao.CustomerDao; import com.epmet.dto.*; import com.epmet.dto.form.*; import com.epmet.dto.result.*; +import com.epmet.dto.screen.form.InitCustomerIndexForm; import com.epmet.entity.CustomerEntity; import com.epmet.feign.*; import com.epmet.redis.CustomerRedis; @@ -85,6 +86,10 @@ public class CustomerServiceImpl extends BaseServiceImpl page(Map params) { @@ -550,6 +555,22 @@ public class CustomerServiceImpl extends BaseServiceImpl resultPoint = epmetPointOpenFeignClient.initPointRule(); + if (!resultPoint.success()) { + throw new RenException(resultPoint.getCode(), resultPoint.getInternalMsg()); + } + + //9.新客户初始化评价指标 权重 + InitCustomerIndexForm indexForm = new InitCustomerIndexForm(); + indexForm.setCustomerId(formDTO.getCustomerId()); + Result resultData = dataStatisticalOpenFeignClient.initCustomerIndex(indexForm); + if (!resultData.success()) { + throw new RenException(resultData.getCode(), resultData.getInternalMsg()); + } + //2021.1.25 end + } private InitCustomerMQMsg.InitCustomerStaff constructStaffInfo4CustomerInit(String agencyId, PaUserDTO paUser) {