|
|
@@ -10,6 +10,7 @@ import com.ningdatech.basic.exception.BizException; |
|
|
|
import com.ningdatech.basic.model.PageVo; |
|
|
|
import com.ningdatech.basic.util.CollUtils; |
|
|
|
import com.ningdatech.pmapi.common.enumeration.BoolDisplayEnum; |
|
|
|
import com.ningdatech.pmapi.common.helper.RegionCacheHelper; |
|
|
|
import com.ningdatech.pmapi.common.helper.RegionLimitHelper; |
|
|
|
import com.ningdatech.pmapi.common.helper.UserInfoHelper; |
|
|
|
import com.ningdatech.pmapi.common.util.BizUtils; |
|
|
@@ -35,11 +36,13 @@ import com.ningdatech.pmapi.expert.service.IExpertMetaApplyService; |
|
|
|
import com.ningdatech.pmapi.expert.service.IExpertUserFullInfoService; |
|
|
|
import com.ningdatech.pmapi.meta.constant.DictExpertInfoTypeEnum; |
|
|
|
import com.ningdatech.pmapi.meta.helper.DictionaryCache; |
|
|
|
import com.ningdatech.pmapi.meta.helper.ExpertUserInfoHelper; |
|
|
|
import com.ningdatech.pmapi.meta.model.ExpertRegionInfo; |
|
|
|
import com.ningdatech.pmapi.meta.model.bo.RegionContainsBO; |
|
|
|
import com.ningdatech.pmapi.meta.model.dto.DictionaryDTO; |
|
|
|
import com.ningdatech.pmapi.meta.model.entity.ExpertDictionary; |
|
|
|
import com.ningdatech.pmapi.meta.service.IExpertDictionaryService; |
|
|
|
import com.ningdatech.pmapi.sys.model.dto.RegionDTO; |
|
|
|
import com.ningdatech.pmapi.user.util.LoginUserUtil; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
@@ -66,6 +69,7 @@ public class ExpertMetaApplyManage { |
|
|
|
private final IExpertDictionaryService expertDictionaryService; |
|
|
|
|
|
|
|
// private final IExpertAdminManageService ExpertAdminManageService; |
|
|
|
private final RegionCacheHelper regionCacheHelper; |
|
|
|
private final IExpertUserFullInfoService userFullInfoService; |
|
|
|
private final DictionaryCache dictionaryCache; |
|
|
|
|
|
|
@@ -75,6 +79,8 @@ public class ExpertMetaApplyManage { |
|
|
|
|
|
|
|
private final RegionLimitHelper regionLimitHelper; |
|
|
|
|
|
|
|
private final ExpertUserInfoHelper expertUserInfoHelper; |
|
|
|
|
|
|
|
|
|
|
|
public PageVo<ExpertApplyMetaVO> metaApplyListQuery(MetaApplyListQuery req) { |
|
|
|
Long expertAdminUserId = LoginUserUtil.getUserId(); |
|
|
@@ -130,17 +136,17 @@ public class ExpertMetaApplyManage { |
|
|
|
// 专家入库时,需要先审核专家入库,入库成功后,再履职意向审核,如果履职意向跟专家层级是同一层级的,就直接同意不需要审核 |
|
|
|
if (applyResult) { |
|
|
|
Long expertUserId = expertMetaApply.getUserId(); |
|
|
|
// ExpertRegionInfo expertRegionInfo = expertUserInfoHelper.getExpertRegionInfo(expertUserId); |
|
|
|
// Integer regionLevel = expertRegionInfo.getRegionLevel(); |
|
|
|
// String regionCode = expertRegionInfo.getRegionCode(); |
|
|
|
ExpertRegionInfo expertRegionInfo = expertUserInfoHelper.getExpertRegionInfo(expertUserId); |
|
|
|
Integer regionLevel = expertRegionInfo.getRegionLevel(); |
|
|
|
String regionCode = expertRegionInfo.getRegionCode(); |
|
|
|
|
|
|
|
List<ExpertMetaApply> expertJoinApplyList = iMetaApplyService.list(Wrappers.lambdaQuery(ExpertMetaApply.class) |
|
|
|
.eq(ExpertMetaApply::getUserId, expertUserId) |
|
|
|
.eq(ExpertMetaApply::getApplyStatus, ExpertApplyStatusEnum.PENDING_REVIEW.getKey()) |
|
|
|
.eq(ExpertMetaApply::getApplyType, ExpertApplyTypeEnum.EXPERT_INTENTION_JOIN.getKey()) |
|
|
|
.eq(ExpertMetaApply::getDisplayEnable, BoolDisplayEnum.Y.name())); |
|
|
|
// .eq(ExpertMetaApply::getRegionLevel, regionLevel) |
|
|
|
// .eq(ExpertMetaApply::getRegionCode, regionCode)); |
|
|
|
.eq(ExpertMetaApply::getDisplayEnable, BoolDisplayEnum.Y.name()) |
|
|
|
.eq(ExpertMetaApply::getRegionLevel, regionLevel) |
|
|
|
.eq(ExpertMetaApply::getRegionCode, regionCode)); |
|
|
|
BizUtils.notEmpty(expertJoinApplyList, list -> list.forEach(r -> { |
|
|
|
MetaApplyResultRequest resultRequest = new MetaApplyResultRequest(); |
|
|
|
resultRequest.setApplyId(r.getId()); |
|
|
@@ -425,11 +431,11 @@ public class ExpertMetaApplyManage { |
|
|
|
} |
|
|
|
expertApplyMetaVO.setName(expertUserFullInfo.getExpertName()); |
|
|
|
|
|
|
|
// RegionDTO regionDTO = regionCache.getByCodeAndLevel(expertUserFullInfo.getRegionCode(), expertUserFullInfo.getRegionLevel()); |
|
|
|
RegionDTO regionDTO = regionCacheHelper.getByCodeAndLevel(expertUserFullInfo.getRegionCode(), expertUserFullInfo.getRegionLevel()); |
|
|
|
ExpertRegionInfo expertRegionInfo = new ExpertRegionInfo(); |
|
|
|
expertRegionInfo.setRegionCode(expertUserFullInfo.getRegionCode()); |
|
|
|
expertRegionInfo.setRegionLevel(expertUserFullInfo.getRegionLevel()); |
|
|
|
// expertRegionInfo.setRegionName(regionDTO.getRegionName()); |
|
|
|
expertRegionInfo.setRegionName(regionDTO.getRegionName()); |
|
|
|
expertApplyMetaVO.setExpertRegionInfo(expertRegionInfo); |
|
|
|
|
|
|
|
List<ExpertDictionary> expertDictionaryList = expertDictionaryListMap.get(userId); |
|
|
|