From c55e68271ee7246e177fbbbc840ea126efa3c7dc Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Tue, 2 Apr 2024 10:38:42 +0800 Subject: [PATCH] =?UTF-8?q?#=E9=9B=86=E4=B8=AD=E7=9B=91=E6=8E=A7=E5=91=8A?= =?UTF-8?q?=E8=AD=A6=E5=A4=84=E7=90=86=E6=9C=BA=E6=9E=84=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alert/service/impl/AlarmHandleServiceImpl.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/AlarmHandleServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/AlarmHandleServiceImpl.java index 9daebb3..1569853 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/AlarmHandleServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/AlarmHandleServiceImpl.java @@ -22,13 +22,11 @@ import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.DateUtil; -import org.springblade.system.entity.Dept; import org.springblade.system.feign.ISysClient; import org.springblade.system.user.entity.User; import org.springblade.system.user.feign.IUserClient; import org.springframework.stereotype.Service; -import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.stream.Collectors; @@ -134,15 +132,11 @@ public class AlarmHandleServiceImpl extends BaseServiceImpl handleUser() { - R> result = sysClient.getDeptByCurrentUser(); - if(!result.isSuccess() || CollectionUtil.isEmpty(result.getData())){ + R> users = userClient.userList(AuthUtil.getTenantId(), Long.valueOf(AuthUtil.getDeptId())); + if(!users.isSuccess() || CollectionUtil.isEmpty(users.getData())){ throw new ServiceException("查询告警处理人失败!"); } - List users = new ArrayList<>(); - result.getData().forEach(dept->{ - users.addAll(userClient.userListByDeptAndChildrenWithAuth(dept.getId()).getData()); - }); - return users.stream().distinct().collect(Collectors.toList()); + return users.getData().stream().distinct().collect(Collectors.toList()); } /**