“djh”
2 天以前 8c91afa9c1bbe5fae9d88cfd1e7243c376af69fe
multi-system/src/main/java/com/gkhy/exam/system/service/impl/ExStudentServiceImpl.java
@@ -126,18 +126,18 @@
        if(!checkIdNoUnique(student)){
            throw new ApiException("身份证号已存在");
        }
        if(currentUser.getUserType().equals(UserTypeEnum.COMPANY_USER.getCode())){
            if(student.getCreateId()==null){
                throw new ApiException("部门id为空");
            }
        }else if(currentUser.getUserType().equals(UserTypeEnum.DEPART_USER.getCode())){
            student.setCreateId(currentUser.getId());
        }else{//当前用户为车间级用户
            if(currentUser.getParentId()==null){
                throw new ApiException("当前用户部门id为空");
            }
            student.setCreateId(currentUser.getParentId());
        }
//        if(currentUser.getUserType().equals(UserTypeEnum.COMPANY_USER.getCode())){
////            if(student.getCreateId()==null){
////                throw new ApiException("部门id为空");
////            }
//        }else if(currentUser.getUserType().equals(UserTypeEnum.DEPART_USER.getCode())){
//            student.setCreateId(currentUser.getId());
//        }else{//当前用户为车间级用户
//            if(currentUser.getParentId()==null){
//                throw new ApiException("当前用户部门id为空");
//            }
//            student.setCreateId(currentUser.getParentId());
//        }
        student.setPassword(SecurityUtils.encryptPassword(Base64.decodeStr(student.getPassword())));
        int row=baseMapper.insert(student);
        if(row<0){