@@ -142,7 +142,7 @@ public class ExpertMetaApplyManage { | |||||
Long userId = LoginUserUtil.getUserId(); | Long userId = LoginUserUtil.getUserId(); | ||||
// 校验专家管理员区域权限,是否可以审核当前专家申请 | // 校验专家管理员区域权限,是否可以审核当前专家申请 | ||||
// permissionCheckHelper.operationPermissionsCheck(userId, expertMetaApply.getUserId()); | |||||
// permissionCheckHelper.operationPermissionsCheck(userId, expertMetaApply.getUserId()); | |||||
String applyStatus = expertMetaApply.getApplyStatus(); | String applyStatus = expertMetaApply.getApplyStatus(); | ||||
if (!ExpertApplyStatusEnum.PENDING_REVIEW.getKey().equals(applyStatus)) { | if (!ExpertApplyStatusEnum.PENDING_REVIEW.getKey().equals(applyStatus)) { | ||||
throw BizException.wrap("apply is already processed"); | throw BizException.wrap("apply is already processed"); | ||||
@@ -158,18 +158,12 @@ public class ExpertMetaApplyManage { | |||||
// 专家入库时,需要先审核专家入库,入库成功后,再履职意向审核,如果履职意向跟专家层级是同一层级的,就直接同意不需要审核 | // 专家入库时,需要先审核专家入库,入库成功后,再履职意向审核,如果履职意向跟专家层级是同一层级的,就直接同意不需要审核 | ||||
if (applyResult) { | if (applyResult) { | ||||
Long expertUserId = expertMetaApply.getUserId(); | Long expertUserId = expertMetaApply.getUserId(); | ||||
ExpertRegionInfo expertRegionInfo = expertUserInfoHelper.getExpertRegionInfo(expertUserId); | |||||
Integer regionLevel = expertRegionInfo.getRegionLevel(); | |||||
String regionCode = expertRegionInfo.getRegionCode(); | |||||
List<ExpertMetaApply> expertJoinApplyList = iMetaApplyService.list(Wrappers.lambdaQuery(ExpertMetaApply.class) | |||||
List<ExpertMetaApply> joinApplyList = iMetaApplyService.list(Wrappers.lambdaQuery(ExpertMetaApply.class) | |||||
.eq(ExpertMetaApply::getUserId, expertUserId) | .eq(ExpertMetaApply::getUserId, expertUserId) | ||||
.eq(ExpertMetaApply::getApplyStatus, ExpertApplyStatusEnum.PENDING_REVIEW.getKey()) | .eq(ExpertMetaApply::getApplyStatus, ExpertApplyStatusEnum.PENDING_REVIEW.getKey()) | ||||
.eq(ExpertMetaApply::getApplyType, ExpertApplyTypeEnum.EXPERT_INTENTION_JOIN.getKey()) | .eq(ExpertMetaApply::getApplyType, ExpertApplyTypeEnum.EXPERT_INTENTION_JOIN.getKey()) | ||||
.eq(ExpertMetaApply::getDisplayEnable, BoolDisplayEnum.Y.name()) | |||||
.eq(ExpertMetaApply::getRegionLevel, regionLevel) | |||||
.eq(ExpertMetaApply::getRegionCode, regionCode)); | |||||
BizUtils.notEmpty(expertJoinApplyList, list -> list.forEach(r -> { | |||||
.eq(ExpertMetaApply::getDisplayEnable, BoolDisplayEnum.N.name())); | |||||
BizUtils.notEmpty(joinApplyList, list -> list.forEach(r -> { | |||||
MetaApplyResultRequest resultRequest = new MetaApplyResultRequest(); | MetaApplyResultRequest resultRequest = new MetaApplyResultRequest(); | ||||
resultRequest.setApplyId(r.getId()); | resultRequest.setApplyId(r.getId()); | ||||
resultRequest.setApplyResult(true); | resultRequest.setApplyResult(true); | ||||
@@ -181,12 +175,12 @@ public class ExpertMetaApplyManage { | |||||
break; | break; | ||||
// 专家出库 | // 专家出库 | ||||
case EXPERT_DELIVERY: | case EXPERT_DELIVERY: | ||||
// ExpertDeliveryDealCmd expertDeliveryDealCmd = buildExpertDeliveryDealCmd(req, expertMetaApply.getUserId()); | |||||
// expertInfoService.expertDeliveryDeal(expertDeliveryDealCmd); | |||||
// ExpertDeliveryDealCmd expertDeliveryDealCmd = buildExpertDeliveryDealCmd(req, expertMetaApply.getUserId()); | |||||
// expertInfoService.expertDeliveryDeal(expertDeliveryDealCmd); | |||||
break; | break; | ||||
// 长期请假 | // 长期请假 | ||||
case LONG_TERM_LEAVE: | case LONG_TERM_LEAVE: | ||||
// leaveManage.leaveAuditCallback(req.getApplyResult(), applyId); | |||||
// leaveManage.leaveAuditCallback(req.getApplyResult(), applyId); | |||||
break; | break; | ||||
// 专家信息审核 | // 专家信息审核 | ||||
case EXPERT_INFO_MODIFY: | case EXPERT_INFO_MODIFY: | ||||
@@ -206,7 +200,7 @@ public class ExpertMetaApplyManage { | |||||
Long expertUserId = expertMetaApply.getUserId(); | Long expertUserId = expertMetaApply.getUserId(); | ||||
String auditOpinion = req.getAuditOpinion(); | String auditOpinion = req.getAuditOpinion(); | ||||
// 发送审核结果短信 | // 发送审核结果短信 | ||||
// sendApplyResultNotify(applyType, applyResult, auditOpinion, expertUserId); | |||||
// sendApplyResultNotify(applyType, applyResult, auditOpinion, expertUserId); | |||||
// 更新申请结果 | // 更新申请结果 | ||||
expertMetaApply.setApproverUserId(userId); | expertMetaApply.setApproverUserId(userId); | ||||
String adminUserName = userInfoHelper.getUserName(userId); | String adminUserName = userInfoHelper.getUserName(userId); | ||||
@@ -341,23 +341,23 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { | |||||
.eq(ExpertIntentionWorkRegion::getRegionLevel, expertRegionLevel); | .eq(ExpertIntentionWorkRegion::getRegionLevel, expertRegionLevel); | ||||
ExpertIntentionWorkRegion one = iExpertIntentionWorkRegionService.getOne(query); | ExpertIntentionWorkRegion one = iExpertIntentionWorkRegionService.getOne(query); | ||||
if (Objects.isNull(one)) { | if (Objects.isNull(one)) { | ||||
ExpertIntentionWorkRegion expertIntentionWorkRegion = new ExpertIntentionWorkRegion(); | |||||
expertIntentionWorkRegion.setCreateOn(LocalDateTime.now()); | |||||
expertIntentionWorkRegion.setUpdateOn(LocalDateTime.now()); | |||||
expertIntentionWorkRegion.setRegionCode(expertRegionCode); | |||||
expertIntentionWorkRegion.setRegionLevel(expertRegionLevel); | |||||
expertIntentionWorkRegion.setUserId(expertUserId); | |||||
iExpertIntentionWorkRegionService.save(expertIntentionWorkRegion); | |||||
ExpertIntentionWorkRegion intentionWorkRegion = new ExpertIntentionWorkRegion(); | |||||
intentionWorkRegion.setCreateOn(LocalDateTime.now()); | |||||
intentionWorkRegion.setUpdateOn(LocalDateTime.now()); | |||||
intentionWorkRegion.setRegionCode(expertRegionCode); | |||||
intentionWorkRegion.setRegionLevel(expertRegionLevel); | |||||
intentionWorkRegion.setUserId(expertUserId); | |||||
iExpertIntentionWorkRegionService.save(intentionWorkRegion); | |||||
} | } | ||||
} | } | ||||
break; | break; | ||||
case EXPERT_INTENTION_LEAVE: { | case EXPERT_INTENTION_LEAVE: { | ||||
// 删除履职意向地 | // 删除履职意向地 | ||||
LambdaUpdateWrapper<ExpertIntentionWorkRegion> expertIntentionWorkRegionQuery = Wrappers.lambdaUpdate(ExpertIntentionWorkRegion.class) | |||||
LambdaUpdateWrapper<ExpertIntentionWorkRegion> query = Wrappers.lambdaUpdate(ExpertIntentionWorkRegion.class) | |||||
.eq(ExpertIntentionWorkRegion::getUserId, expertUserId) | .eq(ExpertIntentionWorkRegion::getUserId, expertUserId) | ||||
.eq(ExpertIntentionWorkRegion::getRegionCode, expertRegionCode) | .eq(ExpertIntentionWorkRegion::getRegionCode, expertRegionCode) | ||||
.eq(ExpertIntentionWorkRegion::getRegionLevel, expertRegionLevel); | .eq(ExpertIntentionWorkRegion::getRegionLevel, expertRegionLevel); | ||||
iExpertIntentionWorkRegionService.remove(expertIntentionWorkRegionQuery); | |||||
iExpertIntentionWorkRegionService.remove(query); | |||||
} | } | ||||
break; | break; | ||||
default: | default: | ||||
@@ -395,36 +395,9 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { | |||||
List<ExpertDictionary> saveExpertDictionaryList = buildSaveExpertDictionaryList(expertUserId, expertType); | List<ExpertDictionary> saveExpertDictionaryList = buildSaveExpertDictionaryList(expertUserId, expertType); | ||||
iExpertDictionaryService.saveBatch(saveExpertDictionaryList); | iExpertDictionaryService.saveBatch(saveExpertDictionaryList); | ||||
} | } | ||||
// 修改履职意向申请状态 | |||||
LambdaUpdateWrapper<ExpertMetaApply> set = Wrappers.lambdaUpdate(ExpertMetaApply.class).eq(ExpertMetaApply::getUserId, expertUserId) | |||||
.eq(ExpertMetaApply::getApplyType, ExpertApplyTypeEnum.EXPERT_INTENTION_JOIN.getKey()) | |||||
.eq(ExpertMetaApply::getApplyStatus, ExpertApplyStatusEnum.PENDING_REVIEW.getKey()) | |||||
.eq(ExpertMetaApply::getDisplayEnable, BoolDisplayEnum.N.name()) | |||||
.set(ExpertMetaApply::getDisplayEnable, BoolDisplayEnum.Y.name()); | |||||
iExpertMetaApplyService.update(set); | |||||
} else { | } else { | ||||
expertUserFullInfo.setUserInfoStep(ExpertUserInfoStepEnum.INFORMATION_TO_BE_SUBMITTED.getKey()); | expertUserFullInfo.setUserInfoStep(ExpertUserInfoStepEnum.INFORMATION_TO_BE_SUBMITTED.getKey()); | ||||
} | } | ||||
if (applyResult) { | |||||
// 补充专家 专家角色 TODO | |||||
// SysRole sysRole = roleService.getOne(Wrappers.lambdaQuery(SysRole.class) | |||||
// .eq(SysRole::getCode, SysRoleEnum.EXPERT.getKey())); | |||||
// if (Objects.nonNull(sysRole)) { | |||||
// Long roleId = sysRole.getRoleId(); | |||||
// LambdaQueryWrapper<SysUsersRoles> eq = Wrappers.lambdaQuery(SysUsersRoles.class) | |||||
// .eq(SysUsersRoles::getUserId, expertUserFullInfo.getUserId()) | |||||
// .eq(SysUsersRoles::getRoleId, sysRole.getRoleId()); | |||||
// SysUsersRoles one = userRoleService.getOne(eq); | |||||
// if (Objects.isNull(one)) { | |||||
// SysUsersRoles sysUsersRolesSaveRecord = new SysUsersRoles(); | |||||
// sysUsersRolesSaveRecord.setUserId(expertUserFullInfo.getUserId()); | |||||
// sysUsersRolesSaveRecord.setRoleId(roleId); | |||||
// userRoleService.saveAndReloadRoleListForToken(Collections.singletonList(sysUsersRolesSaveRecord), false); | |||||
// } | |||||
// } | |||||
} | |||||
iExpertUserFullInfoService.saveOrUpdate(expertUserFullInfo); | iExpertUserFullInfoService.saveOrUpdate(expertUserFullInfo); | ||||
} | } | ||||