|
|
@@ -4,7 +4,6 @@ import cn.hutool.core.util.ObjectUtil;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.dubbo.config.annotation.DubboReference;
|
|
|
-import org.dromara.backstage.api.RemoteCardService;
|
|
|
import org.dromara.backstage.api.RemoteUserAccountService;
|
|
|
import org.dromara.backstage.api.domain.vo.RemoteCardVo;
|
|
|
import org.dromara.backstage.api.domain.vo.RemoteUserAccountVo;
|
|
|
@@ -39,7 +38,6 @@ public class EmployeeBusiness {
|
|
|
@DubboReference
|
|
|
private final RemoteDeptService remoteDeptService;
|
|
|
@DubboReference
|
|
|
- private final RemoteCardService remoteCardService;
|
|
|
|
|
|
|
|
|
public ReturnResult getEmployeeVoByNumb(String userNumb) {
|
|
|
@@ -64,10 +62,13 @@ public class EmployeeBusiness {
|
|
|
departmentVo.setParentDepartmentID(remoteDeptVo.getParentId().toString());
|
|
|
departmentVo.setDepartmentName(remoteDeptVo.getDeptName());
|
|
|
|
|
|
- // RemoteCardVo remoteCardVo = remoteCardService.queryMainCardByUserId(userAccountVo.getUserId());
|
|
|
- log.info("userNumb:{},userId:{}", userAccountVo.getUserNumb(), userAccountVo.getUserId());
|
|
|
String userId = String.valueOf(userAccountVo.getUserId());
|
|
|
- RemoteCardVo remoteCardVo = JsonUtils.parseObject(RedisUtils.getCacheMapValue(CacheNames.PT_USER_CARD_USER_ID, userId).toString(), RemoteCardVo.class);
|
|
|
+ Object objCard = RedisUtils.getCacheMapValue(CacheNames.PT_USER_CARD_USER_ID, userId);
|
|
|
+ if (objCard == null) {
|
|
|
+ log.info("无人员卡片信息,userNumb:{},userId:{}", userAccountVo.getUserNumb(), userAccountVo.getUserId());
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ RemoteCardVo remoteCardVo = JsonUtils.parseObject(objCard.toString(), RemoteCardVo.class);
|
|
|
UserCardVo userCardVo = new UserCardVo();
|
|
|
Long cardNo = 0L;
|
|
|
if (ObjectUtil.isNotEmpty(remoteCardVo)) {
|