|
@@ -1,13 +1,15 @@
|
|
|
package com.ims.eval.service.impl;
|
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
-import com.ims.common.utils.StringUtils;
|
|
|
-import com.ims.eval.entity.OrganizationEvaluationRule;
|
|
|
import com.ims.eval.entity.OrganizationStructure;
|
|
|
import com.ims.eval.dao.OrganizationStructureMapper;
|
|
|
+import com.ims.eval.entity.custom.Menu;
|
|
|
+import com.ims.eval.feign.RemoteServiceBuilder;
|
|
|
import com.ims.eval.service.IOrganizationStructureService;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
@@ -29,6 +31,11 @@ public class OrganizationStructureServiceImpl extends ServiceImpl<OrganizationSt
|
|
|
|
|
|
private static String type = null;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private RemoteServiceBuilder remoteServiceBuilder;
|
|
|
+
|
|
|
+ private List<OrganizationStructure> list = new ArrayList<>();
|
|
|
+
|
|
|
@Override
|
|
|
public List<OrganizationStructure> getTree(String id, Integer num, String type1) {
|
|
|
|
|
@@ -36,9 +43,20 @@ public class OrganizationStructureServiceImpl extends ServiceImpl<OrganizationSt
|
|
|
type = type1;
|
|
|
}
|
|
|
|
|
|
+ if(null != list && list.size()>0){
|
|
|
+ return list;
|
|
|
+ }
|
|
|
QueryWrapper<OrganizationStructure> qw = new QueryWrapper<>();
|
|
|
|
|
|
- List<OrganizationStructure> list = baseMapper.selectList(qw);
|
|
|
+// List<OrganizationStructure> list = baseMapper.selectList(qw);
|
|
|
+
|
|
|
+// http://10.65.79.83:86/ims-iam-ext/sys/sysOrg/allDataNoControl
|
|
|
+ JSONArray arr = remoteServiceBuilder.getGatewayUrl().allDataNoControl();
|
|
|
+ if (null == arr) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ List<OrganizationStructure> list = arr.toJavaList(OrganizationStructure.class);
|
|
|
List<OrganizationStructure> tr = convert(list, id, num);
|
|
|
return tr;
|
|
|
}
|