From b892b3d8c2a536b6c2f5f9b9e67e195779037665 Mon Sep 17 00:00:00 2001
From: lidongdong <1459917685@qq.com>
Date: 星期二, 15 十一月 2022 14:17:11 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/huacheng_test' into huacheng_test
---
flower_city/src/main/java/com/dg/core/service/impl/OrganizationChartImpl.java | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/flower_city/src/main/java/com/dg/core/service/impl/OrganizationChartImpl.java b/flower_city/src/main/java/com/dg/core/service/impl/OrganizationChartImpl.java
index 02b9f5e..a4b8ad2 100644
--- a/flower_city/src/main/java/com/dg/core/service/impl/OrganizationChartImpl.java
+++ b/flower_city/src/main/java/com/dg/core/service/impl/OrganizationChartImpl.java
@@ -6,6 +6,7 @@
import com.dg.core.db.gen.entity.OrganizationChartEntity;
import com.dg.core.db.gen.mapper.OrganizationChartMapper;
import com.dg.core.service.IOrganizationChartService;
+import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
@@ -19,11 +20,18 @@
@Override
public List<OrganizationChartEntity> selectConfigList(String parentId,String grade,List<String> ids)
{
- List<OrganizationChartEntity> ocList=baseMapper.selectConfigList("","1",ids);
+ List<OrganizationChartEntity> ocList=baseMapper.selectConfigList(parentId,"1",ids);
+
+ if(ocList==null || ocList.size()<1)
+ {
+ List<String> id=new ArrayList<>();
+ id.add(parentId);
+ ocList=baseMapper.selectConfigList(null,null,id);
+ }
for (OrganizationChartEntity entity:ocList)
{
- entity.setChild(baseMapper.selectConfigList(entity.getId()+"","",ids));
+ entity.setChild(baseMapper.selectConfigList(entity.getId()+"","",null));
if (entity.getChild()!=null)
{
--
Gitblit v1.7.1