From c26e227abe288476c11b0a8b7875045e71efa14c Mon Sep 17 00:00:00 2001
From: “djh” <“3298565835@qq.com”>
Date: Thu, 30 Apr 2026 17:30:00 +0800
Subject: [PATCH] 新增修改
---
multi-system/src/main/java/com/gkhy/exam/system/service/impl/InternalAuditEvaluateServiceImpl.java | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/service/impl/InternalAuditEvaluateServiceImpl.java b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/InternalAuditEvaluateServiceImpl.java
index 3c54ebf..af9f008 100644
--- a/multi-system/src/main/java/com/gkhy/exam/system/service/impl/InternalAuditEvaluateServiceImpl.java
+++ b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/InternalAuditEvaluateServiceImpl.java
@@ -4,6 +4,7 @@
import com.gkhy.exam.common.api.CommonPage;
import com.gkhy.exam.common.api.CommonResult;
import com.gkhy.exam.common.domain.entity.SysUser;
+import com.gkhy.exam.common.enums.UserTypeEnum;
import com.gkhy.exam.common.exception.ApiException;
import com.gkhy.exam.common.utils.PageUtils;
import com.gkhy.exam.common.utils.SecurityUtils;
@@ -11,7 +12,6 @@
import com.gkhy.exam.system.domain.InternalAuditEvaluate;
import com.gkhy.exam.system.mapper.ExStudentMapper;
import com.gkhy.exam.system.mapper.InternalAuditEvaluateMapper;
-import com.gkhy.exam.system.mapper.SysUserMapper;
import com.gkhy.exam.system.service.InternalAuditEvaluateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -45,13 +45,15 @@
@Override
public CommonResult insertEvaluate(InternalAuditEvaluate evaluate) {
SysUser user = SecurityUtils.getLoginUser().getUser();
- if (!user.getUserType().equals(0)&&!user.getUserType().equals(1)){
+ if (!user.getUserType().equals(UserTypeEnum.SYSTEM_USER.getCode())&&!user.getUserType().equals(UserTypeEnum.COMPANY_USER.getCode())&&!user.getUserType().equals(UserTypeEnum.COMPANY_ADMIN.getCode())){
throw new ApiException("普通用户无法添加相关数据");
}
- ExStudent exStudent = exStudentMapper.selectStudentById(Long.valueOf(evaluate.getPersonId()));
- if (user.getDeptId().equals(exStudent.getDeptId())){
- throw new ApiException("请勿选择本部门成员");
- }
+// ExStudent exStudent = exStudentMapper.selectStudentById(Long.valueOf(evaluate.getPersonId()));
+// if ( user.getDeptId()!=null){
+// if ( user.getDeptId().equals(exStudent.getDeptId())) {
+// throw new ApiException("请勿选择本部门成员");
+// }
+// }
evaluate.setCreateBy(SecurityUtils.getUsername());
evaluate.setCreateTime(LocalDateTime.now());
evaluateMapper.insert(evaluate);
--
Gitblit v1.9.2