---
title: "7.1 导出xmind自定义数据源"
docId: "380469802705092608"
source: "https://weapp.eteams.cn/build/techdoc/wdoc/index.html#/public/repository/91f5067f-775e-48f4-93a2-ce84ca0b9c2e/doc/380469802705092608"
---
- 二开标识
  
  ```text
   
  HRM_XMIND_DATA_FILTER_001
  
  ```
- 入参说明（Map<String, Object>，从request中获取 params）
  
  | 参数 | 类型 | 说明 |
  | --- | --- | --- |
  | key | string | 固定提供：param |
  | value | bean | 对应的参数信息 |
- param参数说明

| 参数 | 类型 | 说明 |
| --- | --- | --- |
| virtualId | String | 维度id，行政维度为1 |
| personnelStatus | String | 人员状态 |

- 返回参数说明（com.weaver.loom.context.domain.WeaHookResponse#setResult）
  
    - 必须提供HashMap，其中需要提供params作为key；value 也是一个hashmap；OA会根据params的内容按照入参支持的key覆盖到标准入参里面，然后进行查询
- 示例
  
  ```java
  public WeaHookResponse handle(WeaHookRequest request, WeaHookResponse response, AppInfo appInfo) throws Exception {
          //入参，修改入参并不会影响到埋点的原始数据
          Map<String, Object> param = request.getParams();
  
          //创建Sheet数据
          List<Sheet> sheets = new ArrayList<>();
          Sheet allDataSheet = new Sheet().setId("1").setTitle("组织架构");
          Sheet orgDataSheet = new Sheet().setId("2").setTitle("组织详情");
          sheets.add(allDataSheet);
          sheets.add(orgDataSheet);
  
          //创建Sheet1数据
          Node sheetData1 = new Node().setId(1L).setName("测试").setType("department");
          allDataSheet.setNode(sheetData1);
          sheetData1.setChildren(Arrays.asList(
                  new Node().setId(2L).setName("测试1").setType("department").setChildren(Arrays.asList(
                          new Node().setId(21L).setName("测试11").setType("department").setBgColor("#F1F1F1"),
                          new Node().setId(22L).setName("测试12").setType("department"),
                          new Node().setId(23L).setName("测试13").setType("department"),
                          new Node().setId(24L).setName("测试14").setType("department")
                  )),
                  new Node().setId(3L).setName("测试2").setType("department").setChildren(Arrays.asList(
                          new Node().setId(31L).setName("测试21").setType("department").setRemark("超编：1\n编制数：10"),
                          new Node().setId(32L).setName("测试22").setType("department"),
                          new Node().setId(33L).setName("测试23").setType("department"),
                          new Node().setId(34L).setName("测试24").setType("department")
                  )),
                  new Node().setId(4L).setName("测试3").setType("department").setChildren(Arrays.asList(
                          new Node().setId(41L).setName("测试31").setType("department"),
                          new Node().setId(42L).setName("测试32").setType("department"),
                          new Node().setId(43L).setName("测试33").setType("department"),
                          new Node().setId(44L).setName("测试34").setType("department")
                  )),
                  new Node().setId(5L).setName("测试4").setType("department").setChildren(Arrays.asList(
                          new Node().setId(51L).setName("测试41").setType("department"),
                          new Node().setId(52L).setName("测试42").setType("department"),
                          new Node().setId(53L).setName("测试43").setType("department"),
                          new Node().setId(54L).setName("测试44").setType("department")
                  ))
          ));
  
          //创建Sheet1数据
          Node sheetData2 = new Node().setId(1L).setName("测试").setType("department");
          orgDataSheet.setNode(sheetData2);
          sheetData2.setChildren(Arrays.asList(
                  new Node().setId(2L).setName("测试1").setType("department").setChildren(Arrays.asList(
                          new Node().setId(21L).setName("测试11").setType("department"),
                          new Node().setId(22L).setName("测试12").setType("department"),
                          new Node().setId(23L).setName("测试13").setType("department"),
                          new Node().setId(24L).setName("测试14").setType("department")
                  )),
                  new Node().setId(3L).setName("测试2").setType("department").setChildren(Arrays.asList(
                          new Node().setId(31L).setName("测试21").setType("department").setRemark("超编：1\n编制数：10"),
                          new Node().setId(32L).setName("测试22").setType("department"),
                          new Node().setId(33L).setName("测试23").setType("department"),
                          new Node().setId(34L).setName("测试24").setType("department")
                  ))
          ));
  
          Map<String, Object> result = ImmutableMapUtil.of("data", sheets);
  
          //设置出参
          response.setResult(result);
          return response;
      }
  ```
