Commit 3fc19e59249dc2d9936b3493bdead136ec9f8cb9
1 parent
e91e8035
升级erpsdk
Showing
10 changed files
with
45 additions
and
63 deletions
fw-valhalla-rpc/src/main/java/cn/fw/valhalla/rpc/ehr/EhrRpcService.java
@@ -6,6 +6,7 @@ import cn.fw.ehr.sdk.api.result.StaffInfo; | @@ -6,6 +6,7 @@ import cn.fw.ehr.sdk.api.result.StaffInfo; | ||
6 | import cn.fw.valhalla.common.utils.StringUtils; | 6 | import cn.fw.valhalla.common.utils.StringUtils; |
7 | import cn.fw.valhalla.rpc.AbsBaseRpcService; | 7 | import cn.fw.valhalla.rpc.AbsBaseRpcService; |
8 | import cn.fw.valhalla.rpc.ehr.dto.StaffInfoDTO; | 8 | import cn.fw.valhalla.rpc.ehr.dto.StaffInfoDTO; |
9 | +import cn.fw.valhalla.rpc.erp.dto.UserInfoDTO; | ||
9 | import com.alibaba.fastjson.JSONObject; | 10 | import com.alibaba.fastjson.JSONObject; |
10 | import lombok.extern.slf4j.Slf4j; | 11 | import lombok.extern.slf4j.Slf4j; |
11 | import org.springframework.beans.BeanUtils; | 12 | import org.springframework.beans.BeanUtils; |
@@ -61,6 +62,26 @@ public class EhrRpcService extends AbsBaseRpcService { | @@ -61,6 +62,26 @@ public class EhrRpcService extends AbsBaseRpcService { | ||
61 | return null; | 62 | return null; |
62 | } | 63 | } |
63 | 64 | ||
65 | + /** | ||
66 | + * 查询人员信息 | ||
67 | + * @param userId | ||
68 | + * @return | ||
69 | + */ | ||
70 | + @Nullable | ||
71 | + public UserInfoDTO user(final Long userId) { | ||
72 | + StaffInfoDTO staffInfoDTO = queryStaffInfo(userId); | ||
73 | + if (Objects.isNull(staffInfoDTO)) { | ||
74 | + return null; | ||
75 | + } | ||
76 | + UserInfoDTO userInfoDTO = new UserInfoDTO(); | ||
77 | + userInfoDTO.setId(staffInfoDTO.getId()); | ||
78 | + userInfoDTO.setUserName(staffInfoDTO.getName()); | ||
79 | + userInfoDTO.setHeadImg(staffInfoDTO.getAvatar()); | ||
80 | + userInfoDTO.setMobile(staffInfoDTO.getMobile()); | ||
81 | + return userInfoDTO; | ||
82 | + | ||
83 | + } | ||
84 | + | ||
64 | @Nullable | 85 | @Nullable |
65 | public StaffInfoDTO queryStaffInfoByMobile(final String mobile) { | 86 | public StaffInfoDTO queryStaffInfoByMobile(final String mobile) { |
66 | if (StringUtils.isEmpty(mobile)) { | 87 | if (StringUtils.isEmpty(mobile)) { |
fw-valhalla-rpc/src/main/java/cn/fw/valhalla/rpc/erp/UserService.java
1 | package cn.fw.valhalla.rpc.erp; | 1 | package cn.fw.valhalla.rpc.erp; |
2 | 2 | ||
3 | import cn.fw.data.base.domain.common.Message; | 3 | import cn.fw.data.base.domain.common.Message; |
4 | -import cn.fw.erp.sdk.api.UserApi; | ||
5 | import cn.fw.erp.sdk.api.UserRoleApi; | 4 | import cn.fw.erp.sdk.api.UserRoleApi; |
6 | -import cn.fw.erp.sdk.api.result.UserBaseInfo; | ||
7 | import cn.fw.erp.sdk.api.result.UserRoleDataRange; | 5 | import cn.fw.erp.sdk.api.result.UserRoleDataRange; |
8 | import cn.fw.erp.sdk.api.result.UserRoleInfo; | 6 | import cn.fw.erp.sdk.api.result.UserRoleInfo; |
9 | -import cn.fw.valhalla.common.utils.StringUtils; | ||
10 | import cn.fw.valhalla.rpc.AbsBaseRpcService; | 7 | import cn.fw.valhalla.rpc.AbsBaseRpcService; |
11 | import cn.fw.valhalla.rpc.erp.dto.PostUserDTO; | 8 | import cn.fw.valhalla.rpc.erp.dto.PostUserDTO; |
12 | -import cn.fw.valhalla.rpc.erp.dto.UserInfoDTO; | ||
13 | import cn.fw.valhalla.rpc.erp.dto.UserRoleDataRangeDTO; | 9 | import cn.fw.valhalla.rpc.erp.dto.UserRoleDataRangeDTO; |
14 | import com.alibaba.fastjson.JSONObject; | 10 | import com.alibaba.fastjson.JSONObject; |
15 | import lombok.Getter; | 11 | import lombok.Getter; |
@@ -27,8 +23,6 @@ import java.util.List; | @@ -27,8 +23,6 @@ import java.util.List; | ||
27 | import java.util.Objects; | 23 | import java.util.Objects; |
28 | import java.util.concurrent.TimeUnit; | 24 | import java.util.concurrent.TimeUnit; |
29 | 25 | ||
30 | -import static org.apache.commons.lang3.Validate.isTrue; | ||
31 | - | ||
32 | /** | 26 | /** |
33 | * 用户服务 | 27 | * 用户服务 |
34 | * <p> | 28 | * <p> |
@@ -41,10 +35,6 @@ import static org.apache.commons.lang3.Validate.isTrue; | @@ -41,10 +35,6 @@ import static org.apache.commons.lang3.Validate.isTrue; | ||
41 | @RequiredArgsConstructor | 35 | @RequiredArgsConstructor |
42 | public class UserService extends AbsBaseRpcService { | 36 | public class UserService extends AbsBaseRpcService { |
43 | /** | 37 | /** |
44 | - * 用户服务 | ||
45 | - */ | ||
46 | - private final UserApi userApi; | ||
47 | - /** | ||
48 | * 岗位用户服务 | 38 | * 岗位用户服务 |
49 | */ | 39 | */ |
50 | private final UserRoleApi userRoleApi; | 40 | private final UserRoleApi userRoleApi; |
@@ -53,41 +43,6 @@ public class UserService extends AbsBaseRpcService { | @@ -53,41 +43,6 @@ public class UserService extends AbsBaseRpcService { | ||
53 | @Getter | 43 | @Getter |
54 | private String keyPrefix; | 44 | private String keyPrefix; |
55 | 45 | ||
56 | - /** | ||
57 | - * 根据用户ID获取用户信息 | ||
58 | - * | ||
59 | - * @param userId 用户ID | ||
60 | - * @return 用户信息 | ||
61 | - */ | ||
62 | - public UserInfoDTO user(final Long userId) { | ||
63 | - if (Objects.isNull(userId)) { | ||
64 | - return null; | ||
65 | - } | ||
66 | - String key = generateKey(userId); | ||
67 | - String json = getFromCache(key); | ||
68 | - if (StringUtils.isValid(json)) { | ||
69 | - return JSONObject.parseObject(json, UserInfoDTO.class); | ||
70 | - } | ||
71 | - try { | ||
72 | - final Message<UserBaseInfo> msg = userApi.queryUserBaseInfo(userId); | ||
73 | - isTrue(msg.isSuccess(), String.format("调用ERP[根据用户ID[%s]获取用户信息]系统失败", msg.getResult())); | ||
74 | - final UserBaseInfo userBaseInfo = msg.getData(); | ||
75 | - if (!msg.isSuccess() || Objects.isNull(msg.getData())) { | ||
76 | - return null; | ||
77 | - } | ||
78 | - UserInfoDTO userInfoDTO = new UserInfoDTO(); | ||
79 | - userInfoDTO.setId(userBaseInfo.getUserId()); | ||
80 | - userInfoDTO.setUserName(userBaseInfo.getUserName()); | ||
81 | - userInfoDTO.setHeadImg(userBaseInfo.getHeadImg()); | ||
82 | - userInfoDTO.setMobile(msg.getData().getMobile()); | ||
83 | - setToCache(key, JSONObject.toJSONString(userInfoDTO), 60); | ||
84 | - return userInfoDTO; | ||
85 | - } catch (Exception e) { | ||
86 | - log.info("调用ERP[根据用户ID[{}]获取用户信息]系统失败", userId, e); | ||
87 | - } | ||
88 | - return null; | ||
89 | - } | ||
90 | - | ||
91 | 46 | ||
92 | /** | 47 | /** |
93 | * 获取某个流程角色的权限范围 | 48 | * 获取某个流程角色的权限范围 |
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/CustomerRetentionRatioBizService.java
@@ -8,6 +8,8 @@ import cn.fw.valhalla.domain.db.follow.FollowTask; | @@ -8,6 +8,8 @@ import cn.fw.valhalla.domain.db.follow.FollowTask; | ||
8 | import cn.fw.valhalla.domain.db.pool.StammkundePool; | 8 | import cn.fw.valhalla.domain.db.pool.StammkundePool; |
9 | import cn.fw.valhalla.domain.db.report.CustomerRetentionRatio; | 9 | import cn.fw.valhalla.domain.db.report.CustomerRetentionRatio; |
10 | import cn.fw.valhalla.domain.enums.*; | 10 | import cn.fw.valhalla.domain.enums.*; |
11 | +import cn.fw.valhalla.rpc.ehr.EhrRpcService; | ||
12 | +import cn.fw.valhalla.rpc.ehr.dto.StaffInfoDTO; | ||
11 | import cn.fw.valhalla.rpc.erp.UserService; | 13 | import cn.fw.valhalla.rpc.erp.UserService; |
12 | import cn.fw.valhalla.rpc.erp.dto.PostUserDTO; | 14 | import cn.fw.valhalla.rpc.erp.dto.PostUserDTO; |
13 | import cn.fw.valhalla.rpc.erp.dto.UserInfoDTO; | 15 | import cn.fw.valhalla.rpc.erp.dto.UserInfoDTO; |
@@ -43,6 +45,7 @@ import java.util.stream.Stream; | @@ -43,6 +45,7 @@ import java.util.stream.Stream; | ||
43 | public class CustomerRetentionRatioBizService { | 45 | public class CustomerRetentionRatioBizService { |
44 | private final OopService oopService; | 46 | private final OopService oopService; |
45 | private final UserService userService; | 47 | private final UserService userService; |
48 | + private final EhrRpcService ehrRpcService; | ||
46 | private final CustomerRetentionRatioService customerRetentionRatioService; | 49 | private final CustomerRetentionRatioService customerRetentionRatioService; |
47 | private final StammkundePoolService stammkundePoolService; | 50 | private final StammkundePoolService stammkundePoolService; |
48 | private final FollowTaskService followTaskService; | 51 | private final FollowTaskService followTaskService; |
@@ -99,8 +102,8 @@ public class CustomerRetentionRatioBizService { | @@ -99,8 +102,8 @@ public class CustomerRetentionRatioBizService { | ||
99 | Long adviserId = pool.getAdviserId(); | 102 | Long adviserId = pool.getAdviserId(); |
100 | String adviserName = pool.getAdviserName(); | 103 | String adviserName = pool.getAdviserName(); |
101 | if (StringUtils.isEmpty(adviserName)) { | 104 | if (StringUtils.isEmpty(adviserName)) { |
102 | - UserInfoDTO user = userService.user(adviserId); | ||
103 | - adviserName = Objects.nonNull(user) ? user.getUserName() : adviserName; | 105 | + StaffInfoDTO staffInfoDTO = ehrRpcService.queryStaffInfo(adviserId); |
106 | + adviserName = Objects.nonNull(staffInfoDTO) ? staffInfoDTO.getName() : adviserName; | ||
104 | } | 107 | } |
105 | set.add(new UserInfo(adviserId, adviserName)); | 108 | set.add(new UserInfo(adviserId, adviserName)); |
106 | } | 109 | } |
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/LeaveNeedDoBizService.java
@@ -430,7 +430,7 @@ public class LeaveNeedDoBizService { | @@ -430,7 +430,7 @@ public class LeaveNeedDoBizService { | ||
430 | .eq(LeaveNeedDo::getDone, Boolean.FALSE) | 430 | .eq(LeaveNeedDo::getDone, Boolean.FALSE) |
431 | ); | 431 | ); |
432 | BV.isTrue(count == 0, () -> "已存在待分配记录,请勿重复添加"); | 432 | BV.isTrue(count == 0, () -> "已存在待分配记录,请勿重复添加"); |
433 | - UserInfoDTO user = userService.user(userId); | 433 | + UserInfoDTO user = ehrRpcService.user(userId); |
434 | BV.notNull(user, () -> "用户不存在"); | 434 | BV.notNull(user, () -> "用户不存在"); |
435 | boolean bool = customerService.count(Wrappers.<Customer>lambdaQuery() | 435 | boolean bool = customerService.count(Wrappers.<Customer>lambdaQuery() |
436 | .eq(Customer::getAdviserId, userId) | 436 | .eq(Customer::getAdviserId, userId) |
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/ReachLogBizService.java
@@ -3,7 +3,7 @@ package cn.fw.valhalla.service.bus; | @@ -3,7 +3,7 @@ package cn.fw.valhalla.service.bus; | ||
3 | import cn.fw.valhalla.common.utils.DateUtil; | 3 | import cn.fw.valhalla.common.utils.DateUtil; |
4 | import cn.fw.valhalla.domain.db.customer.Customer; | 4 | import cn.fw.valhalla.domain.db.customer.Customer; |
5 | import cn.fw.valhalla.domain.db.customer.CustomerReachLog; | 5 | import cn.fw.valhalla.domain.db.customer.CustomerReachLog; |
6 | -import cn.fw.valhalla.rpc.erp.UserService; | 6 | +import cn.fw.valhalla.rpc.ehr.EhrRpcService; |
7 | import cn.fw.valhalla.rpc.erp.dto.UserInfoDTO; | 7 | import cn.fw.valhalla.rpc.erp.dto.UserInfoDTO; |
8 | import cn.fw.valhalla.sdk.param.ReachLogReq; | 8 | import cn.fw.valhalla.sdk.param.ReachLogReq; |
9 | import cn.fw.valhalla.service.data.CustomerReachLogService; | 9 | import cn.fw.valhalla.service.data.CustomerReachLogService; |
@@ -30,7 +30,7 @@ import java.util.Objects; | @@ -30,7 +30,7 @@ import java.util.Objects; | ||
30 | public class ReachLogBizService { | 30 | public class ReachLogBizService { |
31 | private final CustomerService customerService; | 31 | private final CustomerService customerService; |
32 | private final CustomerReachLogService customerReachLogService; | 32 | private final CustomerReachLogService customerReachLogService; |
33 | - private final UserService userService; | 33 | + private final EhrRpcService ehrRpcService; |
34 | 34 | ||
35 | @Transactional(rollbackFor = Exception.class) | 35 | @Transactional(rollbackFor = Exception.class) |
36 | public void saveReachLog(ReachLogReq reachLogReq) { | 36 | public void saveReachLog(ReachLogReq reachLogReq) { |
@@ -46,7 +46,7 @@ public class ReachLogBizService { | @@ -46,7 +46,7 @@ public class ReachLogBizService { | ||
46 | BeanUtils.copyProperties(reachLogReq, reachLog); | 46 | BeanUtils.copyProperties(reachLogReq, reachLog); |
47 | reachLog.setFrameNo(customer.getFrameNo()); | 47 | reachLog.setFrameNo(customer.getFrameNo()); |
48 | reachLog.setAdviserId(customer.getAdviserId()); | 48 | reachLog.setAdviserId(customer.getAdviserId()); |
49 | - UserInfoDTO user = userService.user(customer.getAdviserId()); | 49 | + UserInfoDTO user = ehrRpcService.user(customer.getAdviserId()); |
50 | if (Objects.nonNull(user)) { | 50 | if (Objects.nonNull(user)) { |
51 | reachLog.setAdviserId(user.getId()); | 51 | reachLog.setAdviserId(user.getId()); |
52 | reachLog.setAdviserName(user.getUserName()); | 52 | reachLog.setAdviserName(user.getUserName()); |
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/cust/AbstractCustomerService.java
@@ -14,6 +14,7 @@ import cn.fw.valhalla.domain.enums.StammkundeSourcesEnum; | @@ -14,6 +14,7 @@ import cn.fw.valhalla.domain.enums.StammkundeSourcesEnum; | ||
14 | import cn.fw.valhalla.domain.enums.StammkundeStatusEnum; | 14 | import cn.fw.valhalla.domain.enums.StammkundeStatusEnum; |
15 | import cn.fw.valhalla.rpc.angel.InsurerRpcService; | 15 | import cn.fw.valhalla.rpc.angel.InsurerRpcService; |
16 | import cn.fw.valhalla.rpc.angel.dto.InsuranceDTO; | 16 | import cn.fw.valhalla.rpc.angel.dto.InsuranceDTO; |
17 | +import cn.fw.valhalla.rpc.ehr.EhrRpcService; | ||
17 | import cn.fw.valhalla.rpc.erp.UserService; | 18 | import cn.fw.valhalla.rpc.erp.UserService; |
18 | import cn.fw.valhalla.rpc.erp.dto.UserInfoDTO; | 19 | import cn.fw.valhalla.rpc.erp.dto.UserInfoDTO; |
19 | import cn.fw.valhalla.rpc.erp.dto.UserRoleDataRangeDTO; | 20 | import cn.fw.valhalla.rpc.erp.dto.UserRoleDataRangeDTO; |
@@ -47,6 +48,8 @@ public abstract class AbstractCustomerService { | @@ -47,6 +48,8 @@ public abstract class AbstractCustomerService { | ||
47 | @Autowired | 48 | @Autowired |
48 | protected UserService userService; | 49 | protected UserService userService; |
49 | @Autowired | 50 | @Autowired |
51 | + protected EhrRpcService ehrRpcService; | ||
52 | + @Autowired | ||
50 | protected OopService oopService; | 53 | protected OopService oopService; |
51 | @Autowired | 54 | @Autowired |
52 | protected CustomerService customerService; | 55 | protected CustomerService customerService; |
@@ -130,7 +133,7 @@ public abstract class AbstractCustomerService { | @@ -130,7 +133,7 @@ public abstract class AbstractCustomerService { | ||
130 | dto.setArrivalTime(customer.getArrivalTime()); | 133 | dto.setArrivalTime(customer.getArrivalTime()); |
131 | dto.setAdviserId(customer.getAdviserId()); | 134 | dto.setAdviserId(customer.getAdviserId()); |
132 | dto.setArrivalCount(customer.getArrivalCount()); | 135 | dto.setArrivalCount(customer.getArrivalCount()); |
133 | - UserInfoDTO user = userService.user(customer.getAdviserId()); | 136 | + UserInfoDTO user = ehrRpcService.user(customer.getAdviserId()); |
134 | if (Objects.nonNull(user)) { | 137 | if (Objects.nonNull(user)) { |
135 | dto.setAdviserName(user.getUserName()); | 138 | dto.setAdviserName(user.getUserName()); |
136 | } | 139 | } |
@@ -281,7 +284,7 @@ public abstract class AbstractCustomerService { | @@ -281,7 +284,7 @@ public abstract class AbstractCustomerService { | ||
281 | StammkundePool stammkundePool = createSimpleInfo(customer); | 284 | StammkundePool stammkundePool = createSimpleInfo(customer); |
282 | if (Objects.nonNull(userId)) { | 285 | if (Objects.nonNull(userId)) { |
283 | stammkundePool.setAdviserId(userId); | 286 | stammkundePool.setAdviserId(userId); |
284 | - UserInfoDTO user = userService.user(userId); | 287 | + UserInfoDTO user = ehrRpcService.user(userId); |
285 | if (Objects.nonNull(user)) { | 288 | if (Objects.nonNull(user)) { |
286 | stammkundePool.setAdviserName(user.getUserName()); | 289 | stammkundePool.setAdviserName(user.getUserName()); |
287 | } | 290 | } |
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/cust/CustomerBizService.java
@@ -364,7 +364,7 @@ public class CustomerBizService extends AbstractCustomerService { | @@ -364,7 +364,7 @@ public class CustomerBizService extends AbstractCustomerService { | ||
364 | * @return | 364 | * @return |
365 | */ | 365 | */ |
366 | public ReceptionResultDto queryReceivable(Long userId, String plateNo) { | 366 | public ReceptionResultDto queryReceivable(Long userId, String plateNo) { |
367 | - UserInfoDTO userInfo = userService.user(userId); | 367 | + UserInfoDTO userInfo = ehrRpcService.user(userId); |
368 | if (Objects.isNull(userInfo)) { | 368 | if (Objects.isNull(userInfo)) { |
369 | return new ReceptionResultDto(false, "非服务顾问无法接待"); | 369 | return new ReceptionResultDto(false, "非服务顾问无法接待"); |
370 | } | 370 | } |
@@ -677,7 +677,7 @@ public class CustomerBizService extends AbstractCustomerService { | @@ -677,7 +677,7 @@ public class CustomerBizService extends AbstractCustomerService { | ||
677 | } | 677 | } |
678 | CustomerDetailDto dto = CustomerDetailDto.with(memberVehicle); | 678 | CustomerDetailDto dto = CustomerDetailDto.with(memberVehicle); |
679 | dto.setAdviserId(customers.get(0).getAdviserId()); | 679 | dto.setAdviserId(customers.get(0).getAdviserId()); |
680 | - UserInfoDTO user = userService.user(customers.get(0).getAdviserId()); | 680 | + UserInfoDTO user = ehrRpcService.user(customers.get(0).getAdviserId()); |
681 | if (Objects.nonNull(user)) { | 681 | if (Objects.nonNull(user)) { |
682 | dto.setAdviserName(user.getUserName()); | 682 | dto.setAdviserName(user.getUserName()); |
683 | } | 683 | } |
@@ -703,7 +703,7 @@ public class CustomerBizService extends AbstractCustomerService { | @@ -703,7 +703,7 @@ public class CustomerBizService extends AbstractCustomerService { | ||
703 | } | 703 | } |
704 | CustomerDetailDto dto = CustomerDetailDto.with(memberVehicle); | 704 | CustomerDetailDto dto = CustomerDetailDto.with(memberVehicle); |
705 | dto.setAdviserId(customers.get(0).getAdviserId()); | 705 | dto.setAdviserId(customers.get(0).getAdviserId()); |
706 | - UserInfoDTO user = userService.user(customers.get(0).getAdviserId()); | 706 | + UserInfoDTO user = ehrRpcService.user(customers.get(0).getAdviserId()); |
707 | if (Objects.nonNull(user)) { | 707 | if (Objects.nonNull(user)) { |
708 | dto.setAdviserName(user.getUserName()); | 708 | dto.setAdviserName(user.getUserName()); |
709 | } | 709 | } |
@@ -847,7 +847,7 @@ public class CustomerBizService extends AbstractCustomerService { | @@ -847,7 +847,7 @@ public class CustomerBizService extends AbstractCustomerService { | ||
847 | .map(CarArchiveVO::with) | 847 | .map(CarArchiveVO::with) |
848 | .filter(Objects::nonNull) | 848 | .filter(Objects::nonNull) |
849 | .peek(vo -> { | 849 | .peek(vo -> { |
850 | - UserInfoDTO dto = userService.user(vo.getAdviserId()); | 850 | + UserInfoDTO dto = ehrRpcService.user(vo.getAdviserId()); |
851 | if (Objects.nonNull(dto)) { | 851 | if (Objects.nonNull(dto)) { |
852 | vo.setAdviserName(dto.getUserName()); | 852 | vo.setAdviserName(dto.getUserName()); |
853 | } | 853 | } |
@@ -999,7 +999,7 @@ public class CustomerBizService extends AbstractCustomerService { | @@ -999,7 +999,7 @@ public class CustomerBizService extends AbstractCustomerService { | ||
999 | private List<BasicsCustomerDTO> fromCustomer(String keyword, Long groupId) { | 999 | private List<BasicsCustomerDTO> fromCustomer(String keyword, Long groupId) { |
1000 | List<BasicsCustomerDTO> list = customerService.queryByKeyword(keyword, groupId); | 1000 | List<BasicsCustomerDTO> list = customerService.queryByKeyword(keyword, groupId); |
1001 | for (BasicsCustomerDTO dto : list) { | 1001 | for (BasicsCustomerDTO dto : list) { |
1002 | - UserInfoDTO user = userService.user(dto.getAdviserId()); | 1002 | + UserInfoDTO user = ehrRpcService.user(dto.getAdviserId()); |
1003 | if (Objects.nonNull(user)) { | 1003 | if (Objects.nonNull(user)) { |
1004 | dto.setAdviserName(user.getUserName()); | 1004 | dto.setAdviserName(user.getUserName()); |
1005 | } | 1005 | } |
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/cust/CustomerChangeBizService.java
@@ -465,7 +465,7 @@ public class CustomerChangeBizService extends AbstractCustomerService { | @@ -465,7 +465,7 @@ public class CustomerChangeBizService extends AbstractCustomerService { | ||
465 | stammkundeDto.setCustomerId(customer.getId()); | 465 | stammkundeDto.setCustomerId(customer.getId()); |
466 | stammkundeDto.setReason(reasonEnum); | 466 | stammkundeDto.setReason(reasonEnum); |
467 | stammkundeDto.setShopId(customer.getShopId()); | 467 | stammkundeDto.setShopId(customer.getShopId()); |
468 | - UserInfoDTO user = userService.user(adviserId); | 468 | + UserInfoDTO user = ehrRpcService.user(adviserId); |
469 | stammkundeDto.setNewUserId(adviserId); | 469 | stammkundeDto.setNewUserId(adviserId); |
470 | if (Objects.nonNull(user)) { | 470 | if (Objects.nonNull(user)) { |
471 | stammkundeDto.setNewUserName(user.getUserName()); | 471 | stammkundeDto.setNewUserName(user.getUserName()); |
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/cust/PickUpCustomerService.java
@@ -113,7 +113,7 @@ public class PickUpCustomerService extends AbstractCustomerService { | @@ -113,7 +113,7 @@ public class PickUpCustomerService extends AbstractCustomerService { | ||
113 | boolean canReception = true; | 113 | boolean canReception = true; |
114 | ShopDTO shop = Optional.ofNullable(queryDealId(userId, RoleCode.FWGW)).orElse(new ShopDTO()); | 114 | ShopDTO shop = Optional.ofNullable(queryDealId(userId, RoleCode.FWGW)).orElse(new ShopDTO()); |
115 | if (Objects.nonNull(customer.getShopId()) && customer.getShopId().equals(shop.getId()) && Objects.nonNull(customer.getAdviserId())) { | 115 | if (Objects.nonNull(customer.getShopId()) && customer.getShopId().equals(shop.getId()) && Objects.nonNull(customer.getAdviserId())) { |
116 | - UserInfoDTO user = userService.user(customer.getAdviserId()); | 116 | + UserInfoDTO user = ehrRpcService.user(customer.getAdviserId()); |
117 | String userName = Optional.ofNullable(user).map(UserInfoDTO::getUserName).orElse(""); | 117 | String userName = Optional.ofNullable(user).map(UserInfoDTO::getUserName).orElse(""); |
118 | detailVO.setAdviserName(userName); | 118 | detailVO.setAdviserName(userName); |
119 | } | 119 | } |
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/follow/PoolBizService.java
@@ -10,7 +10,7 @@ import cn.fw.valhalla.domain.enums.*; | @@ -10,7 +10,7 @@ import cn.fw.valhalla.domain.enums.*; | ||
10 | import cn.fw.valhalla.domain.query.*; | 10 | import cn.fw.valhalla.domain.query.*; |
11 | import cn.fw.valhalla.domain.vo.AppPageVO; | 11 | import cn.fw.valhalla.domain.vo.AppPageVO; |
12 | import cn.fw.valhalla.domain.vo.pool.*; | 12 | import cn.fw.valhalla.domain.vo.pool.*; |
13 | -import cn.fw.valhalla.rpc.erp.UserService; | 13 | +import cn.fw.valhalla.rpc.ehr.EhrRpcService; |
14 | import cn.fw.valhalla.rpc.erp.dto.UserInfoDTO; | 14 | import cn.fw.valhalla.rpc.erp.dto.UserInfoDTO; |
15 | import cn.fw.valhalla.rpc.oop.OopService; | 15 | import cn.fw.valhalla.rpc.oop.OopService; |
16 | import cn.fw.valhalla.rpc.oop.dto.ShopDTO; | 16 | import cn.fw.valhalla.rpc.oop.dto.ShopDTO; |
@@ -43,7 +43,7 @@ public class PoolBizService { | @@ -43,7 +43,7 @@ public class PoolBizService { | ||
43 | private final StammkundePoolService stammkundePoolService; | 43 | private final StammkundePoolService stammkundePoolService; |
44 | private final PublicCluePoolService publicCluePoolService; | 44 | private final PublicCluePoolService publicCluePoolService; |
45 | private final OopService oopService; | 45 | private final OopService oopService; |
46 | - private final UserService userService; | 46 | + private final EhrRpcService ehrRpcService; |
47 | private final AffiliationRecordService affiliationRecordService; | 47 | private final AffiliationRecordService affiliationRecordService; |
48 | private final OrderRpcService orderRpcService; | 48 | private final OrderRpcService orderRpcService; |
49 | private final ClueTaskService clueTaskService; | 49 | private final ClueTaskService clueTaskService; |
@@ -240,7 +240,7 @@ public class PoolBizService { | @@ -240,7 +240,7 @@ public class PoolBizService { | ||
240 | BeanUtils.copyProperties(poolDTO, vo); | 240 | BeanUtils.copyProperties(poolDTO, vo); |
241 | vo.setFollower(poolDTO.getFollowUserName()); | 241 | vo.setFollower(poolDTO.getFollowUserName()); |
242 | if (StringUtils.isEmpty(poolDTO.getFollowUserName()) && Objects.nonNull(poolDTO.getUserId())) { | 242 | if (StringUtils.isEmpty(poolDTO.getFollowUserName()) && Objects.nonNull(poolDTO.getUserId())) { |
243 | - UserInfoDTO user = userService.user(poolDTO.getUserId()); | 243 | + UserInfoDTO user = ehrRpcService.user(poolDTO.getUserId()); |
244 | if (Objects.nonNull(user)) { | 244 | if (Objects.nonNull(user)) { |
245 | vo.setFollower(user.getUserName()); | 245 | vo.setFollower(user.getUserName()); |
246 | } | 246 | } |