diff --git a/src/com/engine/organization/service/impl/ManagerDetachServiceImpl.java b/src/com/engine/organization/service/impl/ManagerDetachServiceImpl.java index 69e7740d..8a6669d2 100644 --- a/src/com/engine/organization/service/impl/ManagerDetachServiceImpl.java +++ b/src/com/engine/organization/service/impl/ManagerDetachServiceImpl.java @@ -1,5 +1,6 @@ package com.engine.organization.service.impl; +import cn.hutool.core.collection.CollectionUtil; import com.api.browser.bean.BrowserBean; import com.api.browser.bean.SearchConditionGroup; import com.api.browser.bean.SearchConditionItem; @@ -252,9 +253,12 @@ public class ManagerDetachServiceImpl extends Service implements ManagerDetachSe HrmCommonService hrmCommonService = new HrmCommonServiceImpl(); List roleIds = new ArrayList<>(Arrays.asList(hrmCommonService.getRoleIds(uId).split(","))); List integerList = roleIds.stream() + .filter(s -> !s.trim().isEmpty()) .map(Integer::parseInt) .collect(Collectors.toList()); - detachListById.addAll(MapperProxyFactory.getProxy(ManagerDetachMapper.class).selectDetachListByManager(integerList)); + if (!CollectionUtil.isEmpty(integerList)) { + detachListById.addAll(MapperProxyFactory.getProxy(ManagerDetachMapper.class).selectDetachListByManager(integerList)); + } for (ManagerDetachPO managerDetachPO : detachListById) { List ids = Stream.of(managerDetachPO.getJclRolelevel().split(",")).map(Integer::parseInt).collect(Collectors.toList()); if (CollectionUtils.isNotEmpty(ids)) {