gonglilong
2024-09-13 0cf306a80a8f189a2a664cf447cc0fbef5684bf8
skjcmanager/skjcmanager-service/skjcmanager-system/src/main/java/cn/gistack/system/controller/DeptController.java
@@ -48,6 +48,7 @@
import springfox.documentation.annotations.ApiIgnore;
import javax.validation.Valid;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -210,12 +211,18 @@
   @ApiOperation(value = "获取单位树形结构", notes = "获取单位树形结构")
   public R<Map<String,List<DeptVO>>> getDwByParentId(String precinct) {
      Map<String,List<DeptVO>> map=new HashMap<>();
      List<DeptVO> tree1 = deptService.treeByParentIdNew("1821370772215062530",precinct);
      List<DeptVO> tree2 = deptService.treeByParentIdNew("1821370871330660353",precinct);
      List<DeptVO> tree3 = deptService.treeByParentIdNew("1806175841028685826",precinct);
      map.put("one",tree1);
      map.put("two",tree2);
      map.put("three",tree3);
      if(precinct==null||precinct.equals("")){
         map.put("one",new ArrayList<>());
         map.put("two",new ArrayList<>());
         map.put("three",new ArrayList<>());
      }else {
         List<DeptVO> tree1 = deptService.treeByParentIdNew("1821370772215062530", precinct);
         List<DeptVO> tree2 = deptService.treeByParentIdNew("1821370871330660353", precinct);
         List<DeptVO> tree3 = deptService.treeByParentIdNew("1806175841028685826", precinct);
         map.put("one", tree1);
         map.put("two", tree2);
         map.put("three", tree3);
      }
      return R.data(map);
   }
}