gonglilong
2024-09-13 f75ce953a7e430917d72e5b086f08b131f2949dd
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.HashMap;
import java.util.List;
import java.util.Map;
@@ -137,7 +138,7 @@
   @GetMapping("/lazy-tree")
   @ApiOperationSupport(order = 5)
   @ApiOperation(value = "懒加载树形结构", notes = "树形结构")
   public R<List<DeptVO>> lazyTree(String tenantId, Long parentId, BladeUser bladeUser) {
   public R<List<DeptVO>> lazyTree(String tenantId, String parentId, BladeUser bladeUser) {
      List<DeptVO> tree = deptService.lazyTree(Func.toStrWithEmpty(tenantId, bladeUser.getTenantId()), parentId);
      return R.data(tree);
   }
@@ -204,5 +205,17 @@
      return R.data(number);
   }
   @GetMapping("/getDwByParentId")
   @ApiOperationSupport(order = 10)
   @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);
      return R.data(map);
   }
}