From fafdd541995d0f094692eeebd744caf6e246fb2e Mon Sep 17 00:00:00 2001
From: heheng <475597332@qq.com>
Date: 星期二, 30 九月 2025 17:22:49 +0800
Subject: [PATCH] 修改修复问题

---
 multi-system/src/main/java/com/gkhy/exam/system/service/impl/InternalAuditCheckServiceImpl.java |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/multi-system/src/main/java/com/gkhy/exam/system/service/impl/InternalAuditCheckServiceImpl.java b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/InternalAuditCheckServiceImpl.java
index 09aa831..4f90ff0 100644
--- a/multi-system/src/main/java/com/gkhy/exam/system/service/impl/InternalAuditCheckServiceImpl.java
+++ b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/InternalAuditCheckServiceImpl.java
@@ -6,6 +6,7 @@
 import com.gkhy.exam.common.api.CommonPage;
 import com.gkhy.exam.common.api.CommonResult;
 import com.gkhy.exam.common.domain.entity.SysDept;
+import com.gkhy.exam.common.exception.ApiException;
 import com.gkhy.exam.common.utils.PageUtils;
 import com.gkhy.exam.common.utils.SecurityUtils;
 import com.gkhy.exam.system.domain.InternalAuditCheck;
@@ -24,6 +25,7 @@
 
 import java.time.LocalDateTime;
 import java.util.List;
+import java.util.Set;
 import java.util.stream.Collectors;
 
 /**
@@ -65,7 +67,7 @@
             if (ObjectUtil.isNotEmpty(internalAuditCheck.getInternalAuditCheckPeople())){
                 batchInsert(internalAuditCheck.getInternalAuditCheckPeople(),internalAuditCheck1.getId());
             }
-
+            return CommonResult.success();
         }
         return CommonResult.failed();
     }
@@ -98,10 +100,10 @@
         if (update > 0) {
             List<InternalAuditCheckPerson> internalAuditCheckPeople = internalAuditCheck.getInternalAuditCheckPeople();
             if (ObjectUtil.isNotEmpty(internalAuditCheckPeople)){
-                List<Long> collect = internalAuditCheckPeople.stream().map(InternalAuditCheckPerson::getAuditUserId)
-                        .collect(Collectors.toList());
+                Set<Long> collect = internalAuditCheckPeople.stream().map(InternalAuditCheckPerson::getAuditUserId)
+                        .collect(Collectors.toSet());
                 if (collect.size() != internalAuditCheckPeople.size()){
-                    throw new RuntimeException("选择的受审人员重复");
+                    throw new ApiException("受审人员重复");
                 }
                 LambdaQueryWrapper<InternalAuditCheckPerson> queryWrapper = new LambdaQueryWrapper<>();
                 queryWrapper.eq(InternalAuditCheckPerson::getAuditId, internalAuditCheck.getId());
@@ -196,6 +198,6 @@
         List<InternalAuditCheckPerson> internalAuditCheckPeople = internalAuditCheckPersonMapper.selectList(queryWrapper);
         internalAuditCheckVo.setInternalAuditCheckPeople(internalAuditCheckPeople);
 
-        return CommonResult.success(internalAuditCheck);
+        return CommonResult.success(internalAuditCheckVo);
     }
 }

--
Gitblit v1.9.2