xiaoyi
2 天以前 f83950d292a8933390b3b4b516f90f21a9946c68
yudao-module-hrm/src/main/java/cn/iocoder/yudao/module/hrm/service/approval/HrmTransferApplicationServiceImpl.java
@@ -41,6 +41,8 @@
import java.util.stream.Collectors;
import java.util.stream.Stream;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet;
import static cn.iocoder.yudao.module.hrm.enums.ErrorCodeConstants.*;
@@ -108,7 +110,7 @@
    }
    private Long getCurrentUserId() {
        return 1L;
        return SecurityFrameworkUtils.getLoginUserId();
    }
    private String generateUniqueNo() {
@@ -182,8 +184,8 @@
    }
    private void fillDeptNames(HrmTransferApplicationRespVO respVO, HrmTransferApplicationDO application) {
        Set<Long> deptIds = Set.of(application.getCurrentDeptId(), application.getTargetDeptId())
                .stream().filter(Objects::nonNull).collect(Collectors.toSet());
        Set<Long> deptIds = Stream.of(application.getCurrentDeptId(), application.getTargetDeptId())
                .filter(Objects::nonNull).collect(Collectors.toSet());
        Map<Long, DeptRespDTO> deptMap = deptApi.getDeptMap(deptIds);
        if (application.getCurrentDeptId() != null && deptMap.containsKey(application.getCurrentDeptId())) {
            respVO.setCurrentDeptName(deptMap.get(application.getCurrentDeptId()).getName());
@@ -194,8 +196,8 @@
    }
    private void fillPostNames(HrmTransferApplicationRespVO respVO, HrmTransferApplicationDO application) {
        Set<Long> postIds = Set.of(application.getCurrentPostId(), application.getTargetPostId())
                .stream().filter(Objects::nonNull).collect(Collectors.toSet());
        Set<Long> postIds = Stream.of(application.getCurrentPostId(), application.getTargetPostId())
                .filter(Objects::nonNull).collect(Collectors.toSet());
        Map<Long, PostRespDTO> postMap = postApi.getPostMap(postIds);
        if (application.getCurrentPostId() != null && postMap.containsKey(application.getCurrentPostId())) {
            respVO.setCurrentPostName(postMap.get(application.getCurrentPostId()).getName());