heheng
2025-12-18 75c3a26dde3a88c957af13ffbd4bab168e3cfebf
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;
@@ -46,8 +44,10 @@
    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("请勿选择本部门成员");
        if (user.getDeptId()!=null){
            if (user.getDeptId().equals(exStudent.getDeptId())){
                throw new ApiException("请勿选择本部门成员");
            }
        }
        person.setCreateBy(SecurityUtils.getUsername());
        person.setCreateTime(LocalDateTime.now());