Przeglądaj źródła

修改专家履职意向地

tags/24080901
WendyYang 1 rok temu
rodzic
commit
dce1aecd5b
2 zmienionych plików z 17 dodań i 50 usunięć
  1. +8
    -14
      pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertMetaApplyManage.java
  2. +9
    -36
      pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertInfoServiceImpl.java

+ 8
- 14
pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertMetaApplyManage.java Wyświetl plik

@@ -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<ExpertMetaApply> expertJoinApplyList = iMetaApplyService.list(Wrappers.lambdaQuery(ExpertMetaApply.class)
List<ExpertMetaApply> 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);


+ 9
- 36
pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertInfoServiceImpl.java Wyświetl plik

@@ -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<ExpertIntentionWorkRegion> expertIntentionWorkRegionQuery = Wrappers.lambdaUpdate(ExpertIntentionWorkRegion.class)
LambdaUpdateWrapper<ExpertIntentionWorkRegion> 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<ExpertDictionary> saveExpertDictionaryList = buildSaveExpertDictionaryList(expertUserId, expertType);
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 {
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);
}



Ładowanie…
Anuluj
Zapisz