From dce1aecd5bbddae3751d1e400f863c0579165678 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Tue, 25 Jul 2023 16:06:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=93=E5=AE=B6=E5=B1=A5?= =?UTF-8?q?=E8=81=8C=E6=84=8F=E5=90=91=E5=9C=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/expert/manage/ExpertMetaApplyManage.java | 22 ++++------- .../expert/service/impl/ExpertInfoServiceImpl.java | 45 +++++----------------- 2 files changed, 17 insertions(+), 50 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertMetaApplyManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertMetaApplyManage.java index db37cc7..d4975d0 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertMetaApplyManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertMetaApplyManage.java @@ -142,7 +142,7 @@ public class ExpertMetaApplyManage { Long userId = LoginUserUtil.getUserId(); // 校验专家管理员区域权限,是否可以审核当前专家申请 -// permissionCheckHelper.operationPermissionsCheck(userId, expertMetaApply.getUserId()); + // permissionCheckHelper.operationPermissionsCheck(userId, expertMetaApply.getUserId()); String applyStatus = expertMetaApply.getApplyStatus(); if (!ExpertApplyStatusEnum.PENDING_REVIEW.getKey().equals(applyStatus)) { throw BizException.wrap("apply is already processed"); @@ -158,18 +158,12 @@ public class ExpertMetaApplyManage { // 专家入库时,需要先审核专家入库,入库成功后,再履职意向审核,如果履职意向跟专家层级是同一层级的,就直接同意不需要审核 if (applyResult) { Long expertUserId = expertMetaApply.getUserId(); - ExpertRegionInfo expertRegionInfo = expertUserInfoHelper.getExpertRegionInfo(expertUserId); - Integer regionLevel = expertRegionInfo.getRegionLevel(); - String regionCode = expertRegionInfo.getRegionCode(); - - List expertJoinApplyList = iMetaApplyService.list(Wrappers.lambdaQuery(ExpertMetaApply.class) + List joinApplyList = 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)); - BizUtils.notEmpty(expertJoinApplyList, list -> list.forEach(r -> { + .eq(ExpertMetaApply::getDisplayEnable, BoolDisplayEnum.N.name())); + BizUtils.notEmpty(joinApplyList, list -> list.forEach(r -> { MetaApplyResultRequest resultRequest = new MetaApplyResultRequest(); resultRequest.setApplyId(r.getId()); resultRequest.setApplyResult(true); @@ -181,12 +175,12 @@ public class ExpertMetaApplyManage { break; // 专家出库 case EXPERT_DELIVERY: -// ExpertDeliveryDealCmd expertDeliveryDealCmd = buildExpertDeliveryDealCmd(req, expertMetaApply.getUserId()); -// expertInfoService.expertDeliveryDeal(expertDeliveryDealCmd); + // ExpertDeliveryDealCmd expertDeliveryDealCmd = buildExpertDeliveryDealCmd(req, expertMetaApply.getUserId()); + // expertInfoService.expertDeliveryDeal(expertDeliveryDealCmd); break; // 长期请假 case LONG_TERM_LEAVE: -// leaveManage.leaveAuditCallback(req.getApplyResult(), applyId); + // leaveManage.leaveAuditCallback(req.getApplyResult(), applyId); break; // 专家信息审核 case EXPERT_INFO_MODIFY: @@ -206,7 +200,7 @@ public class ExpertMetaApplyManage { Long expertUserId = expertMetaApply.getUserId(); String auditOpinion = req.getAuditOpinion(); // 发送审核结果短信 -// sendApplyResultNotify(applyType, applyResult, auditOpinion, expertUserId); + // sendApplyResultNotify(applyType, applyResult, auditOpinion, expertUserId); // 更新申请结果 expertMetaApply.setApproverUserId(userId); String adminUserName = userInfoHelper.getUserName(userId); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertInfoServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertInfoServiceImpl.java index 2ec31c5..b3e1b80 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertInfoServiceImpl.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertInfoServiceImpl.java @@ -341,23 +341,23 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { .eq(ExpertIntentionWorkRegion::getRegionLevel, expertRegionLevel); ExpertIntentionWorkRegion one = iExpertIntentionWorkRegionService.getOne(query); 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; case EXPERT_INTENTION_LEAVE: { // 删除履职意向地 - LambdaUpdateWrapper expertIntentionWorkRegionQuery = Wrappers.lambdaUpdate(ExpertIntentionWorkRegion.class) + LambdaUpdateWrapper query = Wrappers.lambdaUpdate(ExpertIntentionWorkRegion.class) .eq(ExpertIntentionWorkRegion::getUserId, expertUserId) .eq(ExpertIntentionWorkRegion::getRegionCode, expertRegionCode) .eq(ExpertIntentionWorkRegion::getRegionLevel, expertRegionLevel); - iExpertIntentionWorkRegionService.remove(expertIntentionWorkRegionQuery); + iExpertIntentionWorkRegionService.remove(query); } break; default: @@ -395,36 +395,9 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { List saveExpertDictionaryList = buildSaveExpertDictionaryList(expertUserId, expertType); iExpertDictionaryService.saveBatch(saveExpertDictionaryList); } - - // 修改履职意向申请状态 - LambdaUpdateWrapper 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 { 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 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); }