|
|
@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollectionUtil; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.ningdatech.basic.exception.BizException; |
|
|
|
import com.ningdatech.basic.model.GenericResult; |
|
|
|
import com.ningdatech.basic.model.PageVo; |
|
|
|
import com.ningdatech.pmapi.common.enumeration.BoolDisplayEnum; |
|
|
|
import com.ningdatech.pmapi.common.helper.RegionLimitHelper; |
|
|
@@ -25,9 +26,11 @@ import com.ningdatech.pmapi.expert.model.dto.ExpertAdminExpertManageListDTO; |
|
|
|
import com.ningdatech.pmapi.expert.model.query.ExpertDictionaryQuery; |
|
|
|
import com.ningdatech.pmapi.expert.model.query.ExpertTagQuery; |
|
|
|
import com.ningdatech.pmapi.expert.model.req.AdminExpertBasicInfoModifyRequest; |
|
|
|
import com.ningdatech.pmapi.expert.model.req.GetZzdInfoRequest; |
|
|
|
import com.ningdatech.pmapi.expert.model.req.MetaApplyResultRequest; |
|
|
|
import com.ningdatech.pmapi.expert.model.vo.ExpertAdminExpertManageListVO; |
|
|
|
import com.ningdatech.pmapi.expert.model.vo.ExpertBasicInfoModifyResultVO; |
|
|
|
import com.ningdatech.pmapi.expert.model.vo.ZzdInfoByMobileVO; |
|
|
|
import com.ningdatech.pmapi.expert.service.ExpertAdminManageService; |
|
|
|
import com.ningdatech.pmapi.expert.service.ExpertInfoService; |
|
|
|
import com.ningdatech.pmapi.expert.service.IExpertMetaApplyService; |
|
|
@@ -35,7 +38,13 @@ import com.ningdatech.pmapi.meta.constant.DictExpertInfoTypeEnum; |
|
|
|
import com.ningdatech.pmapi.meta.constant.ExpertTagEnum; |
|
|
|
import com.ningdatech.pmapi.meta.model.bo.RegionContainsBO; |
|
|
|
import com.ningdatech.pmapi.user.util.LoginUserUtil; |
|
|
|
import com.ningdatech.zwdd.client.ZwddClient; |
|
|
|
import com.ningdatech.zwdd.model.dto.DingInfoByMobileDTO; |
|
|
|
import com.ningdatech.zwdd.model.dto.DingOrgInfoDTO; |
|
|
|
import com.ningdatech.zwdd.model.dto.EmployeeInfoDTO; |
|
|
|
import com.ningdatech.zwdd.model.dto.EmployeePositionsDTO; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
|
@@ -60,6 +69,7 @@ public class ExpertAdminManage { |
|
|
|
private final ExpertMetaApplyManage expertMetaApplyManage; |
|
|
|
private final ExpertAdminManageService expertAdminManageService; |
|
|
|
private final ExpertAdminExpertManageAssembler expertAdminExpertManageAssembler; |
|
|
|
private final ZwddClient zwddClient; |
|
|
|
|
|
|
|
/** |
|
|
|
* 专家管理员使用 专家库列表查询 |
|
|
@@ -218,4 +228,37 @@ public class ExpertAdminManage { |
|
|
|
} |
|
|
|
return new ExpertBasicInfoModifyResultVO(false); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public ZzdInfoByMobileVO getZzdInfo(GetZzdInfoRequest request) { |
|
|
|
ZzdInfoByMobileVO zzdInfoByMobileVO = new ZzdInfoByMobileVO(); |
|
|
|
String phoneNo = request.getPhoneNo(); |
|
|
|
zzdInfoByMobileVO.setPhoneNo(phoneNo); |
|
|
|
|
|
|
|
GenericResult<DingInfoByMobileDTO> dingInfoByMobile = zwddClient.getDingInfoByMobile(phoneNo); |
|
|
|
DingInfoByMobileDTO dingInfo = dingInfoByMobile.getData(); |
|
|
|
if (Objects.nonNull(dingInfo) && StringUtils.isNotBlank(dingInfo.getEmployeeCode())) { |
|
|
|
zzdInfoByMobileVO.setIsDingUser(true); |
|
|
|
String employeeCode = dingInfo.getEmployeeCode(); |
|
|
|
GenericResult<List<EmployeePositionsDTO>> listGenericResult = zwddClient.listEmployeePositionsByEmployeeCode(employeeCode); |
|
|
|
List<EmployeePositionsDTO> employeePositionsDTOS = listGenericResult.getData(); |
|
|
|
if (CollectionUtils.isNotEmpty(employeePositionsDTOS)) { |
|
|
|
EmployeePositionsDTO employeePositionsDTO = employeePositionsDTOS.get(0); |
|
|
|
String organizationCode = employeePositionsDTO.getOrganizationCode(); |
|
|
|
GenericResult<DingOrgInfoDTO> dingOrgInfoDTOGenericResult = zwddClient.getOrganizationByCode(organizationCode); |
|
|
|
DingOrgInfoDTO organizationByCode = dingOrgInfoDTOGenericResult.getData(); |
|
|
|
String organizationName = organizationByCode.getOrganizationName(); |
|
|
|
zzdInfoByMobileVO.setCompanyName(organizationName); |
|
|
|
} |
|
|
|
GenericResult<EmployeeInfoDTO> infoDTOGenericResult = zwddClient.getEmployeeByCode(employeeCode); |
|
|
|
EmployeeInfoDTO employeeInfoDTO = infoDTOGenericResult.getData(); |
|
|
|
if (Objects.nonNull(employeeInfoDTO)) { |
|
|
|
String employeeName = employeeInfoDTO.getEmployeeName(); |
|
|
|
zzdInfoByMobileVO.setName(employeeName); |
|
|
|
} |
|
|
|
} else { |
|
|
|
zzdInfoByMobileVO.setIsDingUser(false); |
|
|
|
} |
|
|
|
return zzdInfoByMobileVO; |
|
|
|
} |
|
|
|
} |