lidongdong
2022-10-24 0eb8d22f0e8d004b1e721cdd24b8e663bc80b6a2
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)
            {