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()); } /**