“djh”
2026-02-03 9fa1e9aa80718718c2991b5fb32db0dd50ef1248
multi-system/src/main/java/com/gkhy/exam/system/service/impl/InternalAuditPersonServiceImpl.java
@@ -11,8 +11,6 @@
import com.gkhy.exam.system.domain.InternalAuditPerson;
import com.gkhy.exam.system.mapper.ExStudentMapper;
import com.gkhy.exam.system.mapper.InternalAuditPersonMapper;
import com.gkhy.exam.system.mapper.SysDeptMapper;
import com.gkhy.exam.system.mapper.SysUserMapper;
import com.gkhy.exam.system.service.InternalAuditPersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -44,11 +42,13 @@
    @Override
    public CommonResult insertPerson(InternalAuditPerson person) {
        SysUser user = SecurityUtils.getLoginUser().getUser();
        ExStudent exStudent = exStudentMapper.selectStudentById(Long.valueOf(person.getPersonId()));
        if (user.getDeptId().equals(exStudent.getDeptId())){
            throw new ApiException("请勿选择本部门成员");
        }
//        SysUser user = SecurityUtils.getLoginUser().getUser();
//        ExStudent exStudent = exStudentMapper.selectStudentById(Long.valueOf(person.getPersonId()));
//        if (user.getDeptId()!=null){
//            if (user.getDeptId().equals(exStudent.getDeptId())){
//                throw new ApiException("请勿选择本部门成员");
//            }
//        }
        person.setCreateBy(SecurityUtils.getUsername());
        person.setCreateTime(LocalDateTime.now());
        personMapper.insert(person);