# 人事管理模块

# 员工

# 获取员工单据列表

# 接口描述

用于获取员工单据列表

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/search/search
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    stSearch String (Query) Y Lookup Type. 可在 UDF Lookup 中找到。
    (Eg: employee ......)
    formatId long (Query) N Lookup Query 中的格式 ID
    (若未指定该参数,则使用默认格式)
    startRow int (Query) N 返回结果的开始行
    endRow int (Query) N 返回结果的结束行
    quickSearchStr String (Query) N 设定关键字查找数据
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&stSearch=").append("employee");
        paramStrBuilder.append("&startRow=").append(0);
        paramStrBuilder.append("&endRow=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "stSearch": "employee",
        "size": 10,
        "stSearchDisplay": "员工",
        "values": [
            {
                "code": "00006",
                "photoCode": "",
                "email": "hcm03@@xxx.xxx",
                "tel": "",
                "id": 49,
                "st_desc": "-00006",
                "st_id": 49,
                "st_code": "00006"
            },
          {......}
        ]
    }
    

# 新增员工

# 接口描述

用于新增员工记录

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/employee
    HTTP 请求方式 PUT
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: employee
    entity String (Body) Y JSON (可参考请求示例中的相关参数)
  3. 请求示例

    long recordId = 0;
    
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/employee";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("employee");
    
        HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString());
        put.addHeader("authorization", access_token);
        put.addHeader("client_id", ClientID);
    
        StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
        entity.setContentEncoding("UTF-8");
        put.setEntity(entity);
    
        res = client.execute(put);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            if (json != null) {
                recordId = json.getLongValue("recordId");
            }
    
            System.out.println(json);
        }
    
        put.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    

    其中 Entity 的 JSON 格式如下:

    {
        "employee": {
            "values": [
                {
                    "code": "test001",
                    "desc": "测试001",
                    "joinDate": "2022-04-20",
                    "birthday": "1998-10-01",
                    "dept": 3,
                    "position": 6
                }
            ]
        }
    }
    
  4. 返回示例

    {
        "recordId": 72524,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "下拉框的值设置不正确,不在可选项中(employee.sex)",
                "msgCode": "core_143008"
            }
        ],
        "status": false
    }
    

# 读取员工

# 接口描述

根据 ID 读取员工记录详情

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/read/employee
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: employee
    id long (Query) Y 员工单 ID,可参考获取员工单据列表返回的 ID
    iRev long (Query) N 版本号,用于读取历史记录 / 已删除的记录
  3. 请求示例

    JSONObject json = null;
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/employee";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("employee");
        paramStrBuilder.append("&id=").append(id);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "data": {
            "empuserinfo": [
                {
                    "hId": 72524,
                    "code": "test001",
                    "esspUser": true,
                    "iRev": 1,
                    "itemNo": "",
                    "userId": 0,
                    "i18nField": "{}",
                    "desc_zh-TW": "",
                    "id": 2463,
                    "desc_en": "测试001",
                    "loginBlock": false,
                    "desc": "测试001",
                    "desc_zh-CN": ""
                }
            ],
            "employee": [
                {......}
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# 保存员工

# 接口描述

用于保存员工单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/employee
    HTTP 请求方式 PUT
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: employee
    entity String (Body) Y JSON (可参考请求示例中的相关参数)
  3. 请求示例

    long recordId = 0;
    
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/employee";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("employee");
    
        HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString());
        put.addHeader("authorization", access_token);
        put.addHeader("client_id", ClientID);
    
        StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
        entity.setContentEncoding("UTF-8");
        put.setEntity(entity);
    
        res = client.execute(put);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            if (json != null) {
                recordId = json.getLongValue("recordId");
            }
    
            System.out.println(json);
        }
    
        put.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    

    其中 Entity 的 JSON 格式如下:

    {
        "employee": {
            "values": [
                {
                	"id": 72524,
                	"code": "test002",
                	"tel": "123456789",
                	"email": "123@qq.com",
                	"weibo": "testweibo",
                	"restCoutry": "中国",
                	"restProvince": "广东",
                	"restCity": "深圳"
                }
            ]
        }
    }
    
  4. 返回示例

    {
        "recordId": 72524,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "邮箱格式错误(employee.email)",
                "msgCode": "core_145017"
            }
        ],
        "status": false
    }
    

# 删除员工

# 接口描述

用于删除指定 ID 的员工单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/delete/employee
    HTTP 请求方式 DELETE
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: employee
    id long (Query) Y 员工单 ID,可参考获取员工单据列表返回的 ID
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/employee";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("employee");
        paramStrBuilder.append("&id=").append(id);
    
        HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString());
        delete.addHeader("authorization", access_token);
        delete.addHeader("client_id", ClientID);
    
        res = client.execute(delete);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        delete.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "messages": [],
        "status": true
    }
    
    {
        "messages": [
            {
                "msgDetail": "单据已被删除",
                "msgCode": "core_101017"
            }
        ],
        "status": false
    }
    

# 部门

# 获取部门单据列表

# 接口描述

用于获取部门单据列表

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/search/search
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    stSearch String (Query) Y Lookup Type. 可在 UDF Lookup 中找到。
    (Eg: dept ......)
    formatId long (Query) N Lookup Query 中的格式 ID
    (若未指定该参数,则使用默认格式)
    startRow int (Query) N 返回结果的开始行
    endRow int (Query) N 返回结果的结束行
    quickSearchStr String (Query) N 设定关键字查找数据
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&stSearch=").append("dept");
        paramStrBuilder.append("&startRow=").append(0);
        paramStrBuilder.append("&endRow=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "stSearch": "dept",
        "size": 10,
        "stSearchDisplay": "部门",
        "values": [
            {
                "code": "ACCT",
                "desc__lang": "会计部",
                "iRev": 33,
                "lastModifyDate": "2019-05-25 10:41:32",
                "dept.lastModifyUid.simpleUser.desc__lang": "admin-SC",
                "id": 1,
                "st_desc": "ACCT-会计部",
                "st_id": 1,
                "st_code": "ACCT"
            },
          {......}
        ]
    }
    

# 新增部门

# 接口描述

用于新增部门记录

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/dept
    HTTP 请求方式 PUT
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: dept
    entity String (Body) Y JSON (可参考请求示例中的相关参数)
  3. 请求示例

    long recordId = 0;
    
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/dept";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("dept");
    
        HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString());
        put.addHeader("authorization", access_token);
        put.addHeader("client_id", ClientID);
    
        StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
        entity.setContentEncoding("UTF-8");
        put.setEntity(entity);
    
        res = client.execute(put);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            if (json != null) {
                recordId = json.getLongValue("recordId");
            }
    
            System.out.println(json);
        }
    
        put.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    

    其中 Entity 的 JSON 格式如下:

    {
        "dept": {
            "values": [
                {
                    "code": "test001",
                    "desc": "测试部门",
                    "supDept": 1
                }
            ]
        }
    }
    
  4. 返回示例

    {
        "recordId": 5176,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "级别为1的部门必须为企业法人",
                "msgCode": "ch01_emp_dept_100008"
            },
            {
                "msgDetail": "编号重复(dept.code)",
                "msgCode": "core_101903"
            }
        ],
        "status": false
    }
    

# 读取部门

# 接口描述

根据 ID 读取部门记录详情

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/read/dept
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: dept
    id long (Query) Y 部门单 ID,可参考获取部门单据列表返回的 ID
    iRev long (Query) N 版本号,用于读取历史记录 / 已删除的记录
  3. 请求示例

    JSONObject json = null;
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/dept";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("dept");
        paramStrBuilder.append("&id=").append(id);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "data": {
            "dept": [
                {
                    "udfattri7": 0,
                    "addr2_en": "",
                    "noticePeriodEndAppDay": false,
                    "calDays1": 0,
                    "useAccess": false,
                    "udfattri4": 0,
                    "calDays2": 0,
                    "udfattri3": 0,
                    "contactPerson_zh-CN": "",
                    "udfattri2": 0,
                    "expiredDate": -2209017600000,
                    "udfattri1": 0,
                    "sysJson": "",
                    "viewCode": "dept",
                    "remark_zh-TW": "",
                    "acctNo": "",
                    "useAccessBl": false,
                    "tel": "",
                    "id": 5176,
                    "fax": "",
                    "seniorityDateId": 0,
                    "dissolved": false,
                    "lastModifyDate": 1650447205000,
                    "contactPerson_zh-TW": "",
                    "createUid": 4,
                    ......
                }
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# 保存部门

# 接口描述

用于保存部门单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/dept
    HTTP 请求方式 PUT
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: dept
    entity String (Body) Y JSON (可参考请求示例中的相关参数)
  3. 请求示例

    long recordId = 0;
    
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/dept";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("dept");
    
        HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString());
        put.addHeader("authorization", access_token);
        put.addHeader("client_id", ClientID);
    
        StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
        entity.setContentEncoding("UTF-8");
        put.setEntity(entity);
    
        res = client.execute(put);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            if (json != null) {
                recordId = json.getLongValue("recordId");
            }
    
            System.out.println(json);
        }
    
        put.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    

    其中 Entity 的 JSON 格式如下:

    {
        "dept": {
            "values": [
                {
                	"id": 5176,
                	"tel": "123456789",
                	"email": "123@qq.com",
                	"website": "www.test.edu.cn",
                	"addr": "中国广东深圳"
                }
            ]
        }
    }
    
  4. 返回示例

    {
        "recordId": 5176,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "邮箱格式错误(dept.email)",
                "msgCode": "core_145017"
            }
        ],
        "status": false
    }
    

# 删除部门

# 接口描述

用于删除指定 ID 的部门单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/delete/dept
    HTTP 请求方式 DELETE
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: dept
    id long (Query) Y 部门单 ID,可参考获取部门单据列表返回的 ID
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/dept";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("dept");
        paramStrBuilder.append("&id=").append(id);
    
        HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString());
        delete.addHeader("authorization", access_token);
        delete.addHeader("client_id", ClientID);
    
        res = client.execute(delete);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        delete.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "messages": [],
        "status": true
    }
    
    {
        "messages": [
            {
                "msgDetail": "单据已被删除",
                "msgCode": "core_101017"
            }
        ],
        "status": false
    }
    

# 职位

# 获取职位单据列表

# 接口描述

用于获取职位单据列表

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/search/search
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    stSearch String (Query) Y Lookup Type. 可在 UDF Lookup 中找到。
    (Eg: position ......)
    formatId long (Query) N Lookup Query 中的格式 ID
    (若未指定该参数,则使用默认格式)
    startRow int (Query) N 返回结果的开始行
    endRow int (Query) N 返回结果的结束行
    quickSearchStr String (Query) N 设定关键字查找数据
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&stSearch=").append("position");
        paramStrBuilder.append("&startRow=").append(0);
        paramStrBuilder.append("&endRow=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "stSearch": "position",
        "size": 10,
        "stSearchDisplay": "职位",
        "values": [
            {
                "code": "HR",
                "desc__lang": "人事部门-简体",
                "iRev": 9,
                "lastModifyDate": "2021-03-15 12:27:43",
                "position.lastModifyUid.simpleUser.desc__lang": "admin-SC",
                "id": 1,
                "st_desc": "人事部门-简体",
                "st_id": 1,
                "st_code": "HR"
            },
          {......}
        ]
    }
    

# 新增职位

# 接口描述

用于新增职位记录

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/position
    HTTP 请求方式 PUT
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: position
    entity String (Body) Y JSON (可参考请求示例中的相关参数)
  3. 请求示例

    long recordId = 0;
    
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/position";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("position");
    
        HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString());
        put.addHeader("authorization", access_token);
        put.addHeader("client_id", ClientID);
    
        StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
        entity.setContentEncoding("UTF-8");
        put.setEntity(entity);
    
        res = client.execute(put);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            if (json != null) {
                recordId = json.getLongValue("recordId");
            }
    
            System.out.println(json);
        }
    
        put.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    

    其中 Entity 的 JSON 格式如下:

    {
        "position": {
            "values": [
                {
                    "code": "test001",
                    "desc": "测试职位"
                }
            ]
        }
    }
    
  4. 返回示例

    {
        "recordId": 375,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "编号重复(position.code)",
                "msgCode": "core_101903"
            }
        ],
        "status": false
    }
    

# 读取职位

# 接口描述

根据 ID 读取职位记录详情

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/read/position
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: position
    id long (Query) Y 职位单 ID,可参考获取职位单据列表返回的 ID
    iRev long (Query) N 版本号,用于读取历史记录 / 已删除的记录
  3. 请求示例

    JSONObject json = null;
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/position";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("position");
        paramStrBuilder.append("&id=").append(id);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "data": {
            "position": [
                {
                    "udfattri8": 0,
                    "udfattri7": 0,
                    "udfattri6": 0,
                    "lastModifyUid": 4,
                    "udfattri5": 0,
                    "calDays1": 0,
                    "useAccess": false,
                    "udfattri4": 0,
                    "calDays2": 0,
                    "expiredDate": -2209017600000,
                    "sysJson": "",
                    "require_zh-TW": "",
                    "viewCode": "position",
                    "udfattri9": 0,
                    "beId": 0,
                    "passProba": 0,
                    "useAccessBl": false,
                    "id": 375,
                    "locked": false,
                    "lastModifyDate": 1650449401000,
                    "createUid": 4, 
                    ......
                }
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# 保存职位

# 接口描述

用于保存职位单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/position
    HTTP 请求方式 PUT
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: position
    entity String (Body) Y JSON (可参考请求示例中的相关参数)
  3. 请求示例

    long recordId = 0;
    
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/position";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("position");
    
        HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString());
        put.addHeader("authorization", access_token);
        put.addHeader("client_id", ClientID);
    
        StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
        entity.setContentEncoding("UTF-8");
        put.setEntity(entity);
    
        res = client.execute(put);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            if (json != null) {
                recordId = json.getLongValue("recordId");
            }
    
            System.out.println(json);
        }
    
        put.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    

    其中 Entity 的 JSON 格式如下:

    {
        "position": {
            "values": [
                {
                	"id": 375,
                	"positionTypeId": 2,
                	"probaPeriod": 6,
                	"probaPeriodCombo": "mth"
                }
            ]
        }
    }
    
  4. 返回示例

    {
        "recordId": 375,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "下拉框的值设置不正确,不在可选项中(position.probaPeriodCombo)",
                "msgCode": "core_143008"
            }
        ],
        "status": false
    }
    

# 删除职位

# 接口描述

用于删除指定 ID 的职位单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/delete/position
    HTTP 请求方式 DELETE
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: position
    id long (Query) Y 职位单 ID,可参考获取职位单据列表返回的 ID
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/position";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("position");
        paramStrBuilder.append("&id=").append(id);
    
        HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString());
        delete.addHeader("authorization", access_token);
        delete.addHeader("client_id", ClientID);
    
        res = client.execute(delete);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        delete.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "messages": [],
        "status": true
    }
    
    {
        "messages": [
            {
                "msgDetail": "单据已被删除",
                "msgCode": "core_101017"
            }
        ],
        "status": false
    }
    

# 虚拟组织

# 获取虚拟组织单据列表

# 接口描述

用于获取虚拟组织单据列表

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/search/search
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    stSearch String (Query) Y Lookup Type. 可在 UDF Lookup 中找到。
    (Eg: virDept ......)
    formatId long (Query) N Lookup Query 中的格式 ID
    (若未指定该参数,则使用默认格式)
    startRow int (Query) N 返回结果的开始行
    endRow int (Query) N 返回结果的结束行
    quickSearchStr String (Query) N 设定关键字查找数据
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&stSearch=").append("virDept");
        paramStrBuilder.append("&startRow=").append(0);
        paramStrBuilder.append("&endRow=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "stSearch": "virDept",
        "size": 10,
        "stSearchDisplay": "虚拟组织",
        "values": [
            {
                "code": "TT",
                "desc__lang": "",
                "iRev": 1,
                "lastModifyDate": "2016-11-16 09:51:09",
                "virdept.lastModifyUid.simpleUser.desc__lang": "",
                "id": 1,
                "st_desc": "TT",
                "st_id": 1,
                "st_code": "TT"
            },
          {......}
        ]
    }
    

# 新增虚拟组织

# 接口描述

用于新增虚拟组织记录

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/virDept
    HTTP 请求方式 PUT
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: virDept
    entity String (Body) Y JSON (可参考请求示例中的相关参数)
  3. 请求示例

    long recordId = 0;
    
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/virDept";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("virDept");
    
        HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString());
        put.addHeader("authorization", access_token);
        put.addHeader("client_id", ClientID);
    
        StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
        entity.setContentEncoding("UTF-8");
        put.setEntity(entity);
    
        res = client.execute(put);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            if (json != null) {
                recordId = json.getLongValue("recordId");
            }
    
            System.out.println(json);
        }
    
        put.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    

    其中 Entity 的 JSON 格式如下:

    {
        "virdept": {
            "values": [
                {
                    "code": "test001",
                    "desc": "测试虚拟组织"
                }
            ]
        }
    }
    
  4. 返回示例

    {
        "recordId": 30007,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "编号重复(virdept.code)",
                "msgCode": "core_101903"
            }
        ],
        "status": false
    }
    

# 读取虚拟组织

# 接口描述

根据 ID 读取虚拟组织记录详情

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/read/virDept
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: virDept
    id long (Query) Y 虚拟组织单 ID,可参考获取虚拟组织单据列表返回的 ID
    iRev long (Query) N 版本号,用于读取历史记录 / 已删除的记录
  3. 请求示例

    JSONObject json = null;
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/virDept";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("virDept");
        paramStrBuilder.append("&id=").append(id);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "data": {
            "virdept": [
                {
                    "attachmentNo": 0,
                    "lastModifyUid": 4,
                    "code": "test001",
                    "useAccess": false,
                    "expiredDate": -2209017600000,
                    "iRev": 1,
                    "sysJson": "",
                    "viewCode": "virDept",
                    "beId": 0,
                    "expired": false,
                    "printCount": 0,
                    "useAccessBl": false,
                    "id": 30007,
                    "statusModifyDate": 1650511711000,
                    "locked": false,
                    "desc_en": "测试虚拟组织",
                    "lastModifyDate": 1650511711000,
                    "createUid": 4,
                    "createDate": 1650511711000,
                    "desc_zh-CN": "",
                    "lastApproveUid": 0,
                    "udfpp": 0,
                    "expiredUid": 0,
                    "useAccessWl": false,
                    "supVirdept": 0,
                    "i18nField": "{\"desc_en\": \"测试虚拟组织\"}",
                    "desc_zh-TW": "",
                    "useAccessAutoCalc": false,
                    "status": "N",
                    "desc": "测试虚拟组织"
                }
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# 保存虚拟组织

# 接口描述

用于保存虚拟组织单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/virDept
    HTTP 请求方式 PUT
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: virDept
    entity String (Body) Y JSON (可参考请求示例中的相关参数)
  3. 请求示例

    long recordId = 0;
    
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/virDept";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("virDept");
    
        HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString());
        put.addHeader("authorization", access_token);
        put.addHeader("client_id", ClientID);
    
        StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
        entity.setContentEncoding("UTF-8");
        put.setEntity(entity);
    
        res = client.execute(put);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            if (json != null) {
                recordId = json.getLongValue("recordId");
            }
    
            System.out.println(json);
        }
    
        put.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    

    其中 Entity 的 JSON 格式如下:

    {
        "virdept": {
            "values": [
                {
                	"id": 30007,
                	"supVirDept": 92
                }
            ]
        },
        "virdeptmember": {
        	"values": [
        		{
        			"virposition": 4,
        			"userId": 2,
        			"startDate": "2022-04-21",
        			"endDate": "2022-02-21"
        		}]
        }
    }
    
  4. 返回示例

    {
        "recordId": 30007,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "失效日期早于生效日期(virdeptmember.endDate.1)",
                "msgCode": "core_101907"
            }
        ],
        "status": false
    }
    

# 删除虚拟组织

# 接口描述

用于删除指定 ID 的虚拟组织单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/delete/virDept
    HTTP 请求方式 DELETE
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: virDept
    id long (Query) Y 虚拟组织单 ID,可参考获取虚拟组织单据列表返回的 ID
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/virDept";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("virDept");
        paramStrBuilder.append("&id=").append(id);
    
        HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString());
        delete.addHeader("authorization", access_token);
        delete.addHeader("client_id", ClientID);
    
        res = client.execute(delete);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        delete.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "messages": [],
        "status": true
    }
    
    {
        "messages": [
            {
                "msgDetail": "单据已被删除",
                "msgCode": "core_101017"
            }
        ],
        "status": false
    }
    

# 编制设定

# 获取编制设定单据列表

# 接口描述

用于获取编制设定单据列表

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/search/search
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    stSearch String (Query) Y Lookup Type. 可在 UDF Lookup 中找到。
    (Eg: headcountRecord ......)
    formatId long (Query) N Lookup Query 中的格式 ID
    (若未指定该参数,则使用默认格式)
    startRow int (Query) N 返回结果的开始行
    endRow int (Query) N 返回结果的结束行
    quickSearchStr String (Query) N 设定关键字查找数据
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&stSearch=").append("headcountRecord");
        paramStrBuilder.append("&startRow=").append(0);
        paramStrBuilder.append("&endRow=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "stSearch": "headcountRecord",
        "size": 10,
        "stSearchDisplay": "编制设定",
        "values": [
            {
                "code": "1403",
                "status": "Y",
                "iRev": 3,
                "lastModifyDate": "2018-02-07 14:40:50",
                "headcountRecord.lastModifyUid.simpleUser.desc__lang": "admin-SC",
                "id": 56,
                "st_desc": "1403",
                "st_id": 56,
                "st_code": "1403"
            },
          {......}
        ]
    }
    

# 新增编制设定

# 接口描述

用于新增编制设定记录

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/headcountRecord
    HTTP 请求方式 PUT
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: headcountRecord
    entity String (Body) Y JSON (可参考请求示例中的相关参数)
  3. 请求示例

    long recordId = 0;
    
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/headcountRecord";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("headcountRecord");
    
        HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString());
        put.addHeader("authorization", access_token);
        put.addHeader("client_id", ClientID);
    
        StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
        entity.setContentEncoding("UTF-8");
        put.setEntity(entity);
    
        res = client.execute(put);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            if (json != null) {
                recordId = json.getLongValue("recordId");
            }
    
            System.out.println(json);
        }
    
        put.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    

    其中 Entity 的 JSON 格式如下:

    {
        "headcountrecord": {
            "values": [
                {
                    "code": "test001",
                    "headcountType": 9
                }
            ]
        }
    }
    
  4. 返回示例

    {
        "recordId": 79,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "编号重复(headcountrecord.code)",
                "msgCode": "core_101903"
            }
        ],
        "status": false
    }
    

# 读取编制设定

# 接口描述

根据 ID 读取编制设定记录详情

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/read/headcountRecord
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: headcountRecord
    id long (Query) Y 编制设定单 ID,可参考获取编制设定单据列表返回的 ID
    iRev long (Query) N 版本号,用于读取历史记录 / 已删除的记录
  3. 请求示例

    JSONObject json = null;
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/headcountRecord";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("headcountRecord");
        paramStrBuilder.append("&id=").append(id);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "data": {
            "headcountrecord": [
                {
                    "headcountIdPrefix": "",
                    "attachmentNo": 0,
                    "lastModifyUid": 4,
                    "code": "test001",
                    "lastApproveUid": 4,
                    "useAccess": false,
                    "postStartAt": "1",
                    "iRev": 1,
                    "sysJson": "",
                    "viewCode": "headcountRecord",
                    "useAccessWl": false,
                    "beId": 0,
                    "headcountType": 9,
                    "printCount": 0,
                    "useAccessBl": false,
                    "id": 79,
                    "statusModifyDate": 1650522454000,
                    "skipHCPlanCheck": 0,
                    "lastModifyDate": 1650522454000,
                    "useAccessAutoCalc": false,
                    "createUid": 4,
                    "createDate": 1650522454000,
                    "status": "Y",
                    "headcountIdPostfix": 1
                }
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# 保存编制设定

# 接口描述

用于保存编制设定单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/headcountRecord
    HTTP 请求方式 PUT
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: headcountRecord
    entity String (Body) Y JSON (可参考请求示例中的相关参数)
  3. 请求示例

    long recordId = 0;
    
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/headcountRecord";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("headcountRecord");
    
        HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString());
        put.addHeader("authorization", access_token);
        put.addHeader("client_id", ClientID);
    
        StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
        entity.setContentEncoding("UTF-8");
        put.setEntity(entity);
    
        res = client.execute(put);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            if (json != null) {
                recordId = json.getLongValue("recordId");
            }
    
            System.out.println(json);
        }
    
        put.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    

    其中 Entity 的 JSON 格式如下:

    {
        "headcountrecord": {
            "values": [
                {
                	"id": 79
                }
            ]
        },
        "headcountrecordt": {
        	"values": [
        		{
        			"headcountId": "202204",
        			"dept": 1,
        			"position": 1,
        			"startDate": "2022-04-21"
        		}]
        }
    }
    
  4. 返回示例

    {
        "recordId": 79,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "失效日期不能早于生效日期(headcountrecordt.endDate.1)",
                "msgCode": "core_101011"
            }
        ],
        "status": false
    }
    

# 删除编制设定

# 接口描述

用于删除指定 ID 的编制设定单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/delete/headcountRecord
    HTTP 请求方式 DELETE
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: headcountRecord
    id long (Query) Y 编制设定单 ID,可参考获取编制设定单据列表返回的 ID
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/headcountRecord";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("headcountRecord");
        paramStrBuilder.append("&id=").append(id);
    
        HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString());
        delete.addHeader("authorization", access_token);
        delete.addHeader("client_id", ClientID);
    
        res = client.execute(delete);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        delete.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "messages": [],
        "status": true
    }
    
    {
        "messages": [
            {
                "msgDetail": "单据已被删除",
                "msgCode": "core_101017"
            }
        ],
        "status": false
    }
    

# 员工更改日志

# 获取员工更改日志单据列表

# 接口描述

用于获取员工更改日志单据列表

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/search/search
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    stSearch String (Query) Y Lookup Type. 可在 UDF Lookup 中找到。
    (Eg: empChgNote ......)
    formatId long (Query) N Lookup Query 中的格式 ID
    (若未指定该参数,则使用默认格式)
    startRow int (Query) N 返回结果的开始行
    endRow int (Query) N 返回结果的结束行
    quickSearchStr String (Query) N 设定关键字查找数据
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&stSearch=").append("empChgNote");
        paramStrBuilder.append("&startRow=").append(0);
        paramStrBuilder.append("&endRow=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "stSearch": "empChgNote",
        "size": 10,
        "stSearchDisplay": "员工更改日志",
        "values": [
            {
                "code": "00004001",
                "effDate": "2017-07-01",
                "empChgNote.empId.employee.code": "00004",
                "empChgNote.empId.employee.desc": "123413weibo122",
                "empChgNote.empId.employee.dept.dept.desc__lang": "人事部门-简体",
                "empChgNote.empId.employee.position.position.desc__lang": "美工-SC",
                "isHistData": false,
                "isRun": true,
                "status": "Y",
                "iRev": 4,
                "lastModifyDate": "2018-02-10 10:35:27",
                "empChgNote.lastModifyUid.simpleUser.desc__lang": "BT_SC",
                "id": 136,
                "st_desc": "00004001",
                "st_id": 136,
                "st_code": "00004001"
            },
          {......}
        ]
    }
    

# 新增员工更改日志

# 接口描述

用于新增员工更改日志记录

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/empChgNote
    HTTP 请求方式 PUT
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: empChgNote
    entity String (Body) Y JSON (可参考请求示例中的相关参数)
  3. 请求示例

    long recordId = 0;
    
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/empChgNote";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("empChgNote");
    
        HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString());
        put.addHeader("authorization", access_token);
        put.addHeader("client_id", ClientID);
    
        StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
        entity.setContentEncoding("UTF-8");
        put.setEntity(entity);
    
        res = client.execute(put);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            if (json != null) {
                recordId = json.getLongValue("recordId");
            }
    
            System.out.println(json);
        }
    
        put.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    

    其中 Entity 的 JSON 格式如下:

    {
        "empchgnote": {
            "values": [
                {
                    "code": "20220421",
                    "empId": 49,
                    "effDate": "2022-04-21"
                }
            ]
        }
    }
    
  4. 返回示例

    {
        "recordId": 566,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "以下员工有重复的未批核员工更改日志",
                "msgCode": "ch01_emp_empChgNote_100010"
            },
            {
                "msgDetail": "编号重复(empchgnote.code)",
                "msgCode": "core_101903"
            }
        ],
        "status": false
    }
    

# 读取员工更改日志

# 接口描述

根据 ID 读取员工更改日志记录详情

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/read/empChgNote
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: empChgNote
    id long (Query) Y 员工更改日志单 ID,可参考获取员工更改日志单据列表返回的 ID
    iRev long (Query) N 版本号,用于读取历史记录 / 已删除的记录
  3. 请求示例

    JSONObject json = null;
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/empChgNote";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("empChgNote");
        paramStrBuilder.append("&id=").append(id);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "data": {
            "empchgnote": [
                {
                    "udfappdate": -2209017600000,
                    "attachmentNo": 0,
                    "empId": 49,
                    "udfdeptIdStr": "",
                    "runDate": -2209017600000,
                    "lastModifyUid": 4,
                    "code": "20220421",
                    "checkReCalcMPFJson": "",
                    "useAccess": false,
                    "skipECNReCalcMPFConHldCheck": 0,
                    "iRev": 1,
                    "sysJson": "",
                    "viewCode": "empChgNote",
                    "skipECNProbaNeedCheck": 0,
                    "caseSummary": "",
                    "beId": 0,
                    "effDate": 1650470400000,
                    "isHistData": false,
                    "skipECNBackdateRecChgSameFieldCheck": 0,
                    "udfdeptId": 0,
                    "printCount": 0,
                    "useAccessBl": false,
                    "id": 566,
                    "caseSummaryTC": "",
                    "udfposIdStr": "",
                    "statusModifyDate": 1650524749000,
                    "isProbaNeeded": false,
                    "lastModifyDate": 1650524749000,
                    "createUid": 4,
                    "createDate": 1650524749000,
                    "isUpdateEmpMPF": false,
                    "lastApproveUid": 0,
                    "useAccessWl": false,
                    "errorMsg": "",
                    "caseSummarySC": "",
                    "isRun": false,
                    "useAccessAutoCalc": false,
                    "udfposId": 0,
                    "status": "N"
                }
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# 保存员工更改日志

# 接口描述

用于保存员工更改日志单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/empChgNote
    HTTP 请求方式 PUT
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: empChgNote
    entity String (Body) Y JSON (可参考请求示例中的相关参数)
  3. 请求示例

    long recordId = 0;
    
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/empChgNote";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("empChgNote");
    
        HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString());
        put.addHeader("authorization", access_token);
        put.addHeader("client_id", ClientID);
    
        StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
        entity.setContentEncoding("UTF-8");
        put.setEntity(entity);
    
        res = client.execute(put);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            if (json != null) {
                recordId = json.getLongValue("recordId");
            }
    
            System.out.println(json);
        }
    
        put.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    

    其中 Entity 的 JSON 格式如下:

    {
        "empchgnote": {
            "values": [
                {
                	"id": 375,
                	"isProbaNeeded": true,
                	"code": "20220421"
                }
            ]
        },
        "employee": {
        	"values": [
        		{
        			"dept": 1,
        			"position": 7
        		}]
        }
    }
    
  4. 返回示例

    {
        "recordId": 375,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "编号重复(empchgnote.code)",
                "msgCode": "core_101903"
            }
        ],
        "status": false
    }
    

# 删除员工更改日志

# 接口描述

用于删除指定 ID 的员工更改日志单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/delete/empChgNote
    HTTP 请求方式 DELETE
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: empChgNote
    id long (Query) Y 员工更改日志单 ID,可参考获取员工更改日志单据列表返回的 ID
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/empChgNote";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("empChgNote");
        paramStrBuilder.append("&id=").append(id);
    
        HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString());
        delete.addHeader("authorization", access_token);
        delete.addHeader("client_id", ClientID);
    
        res = client.execute(delete);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        delete.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "messages": [],
        "status": true
    }
    
    {
        "messages": [
            {
                "msgDetail": "单据已被删除",
                "msgCode": "core_101017"
            }
        ],
        "status": false
    }
    

# 试用期记录

# 获取试用期记录单据列表

# 接口描述

用于获取试用期记录单据列表

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/search/search
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    stSearch String (Query) Y Lookup Type. 可在 UDF Lookup 中找到。
    (Eg: probaLog ......)
    formatId long (Query) N Lookup Query 中的格式 ID
    (若未指定该参数,则使用默认格式)
    startRow int (Query) N 返回结果的开始行
    endRow int (Query) N 返回结果的结束行
    quickSearchStr String (Query) N 设定关键字查找数据
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&stSearch=").append("probaLog");
        paramStrBuilder.append("&startRow=").append(0);
        paramStrBuilder.append("&endRow=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "stSearch": "probaLog",
        "size": 10,
        "stSearchDisplay": "试用期记录",
        "values": [
            {
                "code": "PL170001",
                "probaLog.empId.employee.code": "BTEST010",
                "probaLog.empId.employee.desc": "BTEST010",
                "probaLog.empId.employee.dept.dept.desc__lang": "1455-EN",
                "probaLog.empId.employee.position.position.desc__lang": "美工-SC",
                "probaStatus": "close",
                "startDate": "2017-02-07",
                "endDate": "1899-12-31",
                "status": "Y",
                "iRev": 2,
                "lastModifyDate": "2017-08-17 12:18:26",
                "probaLog.lastModifyUid.simpleUser.desc__lang": "BT_SC",
                "id": 257,
                "st_desc": "PL170001",
                "st_id": 257,
                "st_code": "PL170001"
            },
          {......}
        ]
    }
    

# 新增试用期记录

# 新增员工

# 读取试用期记录

# 接口描述

根据 ID 读取试用期记录记录详情

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/read/probaLog
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: probaLog
    id long (Query) Y 试用期记录单 ID,可参考获取试用期记录单据列表返回的 ID
    iRev long (Query) N 版本号,用于读取历史记录 / 已删除的记录
  3. 请求示例

    JSONObject json = null;
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/probaLog";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("probaLog");
        paramStrBuilder.append("&id=").append(id);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "data": {
            "probalog": [
                {
                    "attachmentNo": 0,
                    "empId": 70584,
                    "probaType": "onBoardProba",
                    "lastModifyUid": 10,
                    "code": "PL170001",
                    "useAccess": false,
                    "endDate": -2209104000000,
                    "iRev": 2,
                    "remark": "Automatically generated by new join employee record",
                    "sysJson": "",
                    "refRecordClose": "PR170021",
                    "viewCode": "probaLog",
                    "udfprobaresult": 0,
                    "beId": 0,
                    "printCount": 0,
                    "useAccessBl": false,
                    "details": "",
                    "id": 257,
                    "statusModifyDate": 1502943506000,
                    "lastModifyDate": 1502943506000,
                    "createUid": 10,
                    "createDate": 1502943506000,
                    "lastApproveUid": 0,
                    "useAccessWl": false,
                    "probaStatus": "close",
                    "useAccessAutoCalc": false,
                    "startDate": 1486396800000,
                    "refRecordCreate": "BTEST10",
                    "status": "Y"
                }
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# 保存试用期记录

# 接口描述

用于保存试用期记录单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/probaLog
    HTTP 请求方式 PUT
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: probaLog
    entity String (Body) Y JSON (可参考请求示例中的相关参数)
  3. 请求示例

    long recordId = 0;
    
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/probaLog";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("probaLog");
    
        HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString());
        put.addHeader("authorization", access_token);
        put.addHeader("client_id", ClientID);
    
        StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
        entity.setContentEncoding("UTF-8");
        put.setEntity(entity);
    
        res = client.execute(put);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            if (json != null) {
                recordId = json.getLongValue("recordId");
            }
    
            System.out.println(json);
        }
    
        put.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    

    其中 Entity 的 JSON 格式如下:

    {
        "probalog": {
            "values": [
                {
                	"id": 257,
                	"udfprobaresult": 13,
                	"remark": "Automatically generated by new join employee record"
                }
            ]
        }
    }
    
  4. 返回示例

    {
        "recordId": 257,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "结束日期必须迟于开始日期(probalog.endDate.1)",
                "msgCode": "ch01_emp_employee_100018"
            }
        ],
        "status": false
    }
    

# 删除试用期记录

# 删除员工

# 试用期结果

# 获取试用期结果单据列表

# 接口描述

用于获取试用期结果单据列表

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/search/search
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    stSearch String (Query) Y Lookup Type. 可在 UDF Lookup 中找到。
    (Eg: probaResult ......)
    formatId long (Query) N Lookup Query 中的格式 ID
    (若未指定该参数,则使用默认格式)
    startRow int (Query) N 返回结果的开始行
    endRow int (Query) N 返回结果的结束行
    quickSearchStr String (Query) N 设定关键字查找数据
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&stSearch=").append("probaResult");
        paramStrBuilder.append("&startRow=").append(0);
        paramStrBuilder.append("&endRow=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "stSearch": "probaResult",
        "size": 10,
        "stSearchDisplay": "试用期结果",
        "values": [
            {
                "code": "AA002",
                "probaResult.empId.employee.code": "AA002",
                "probaResult.empId.employee.desc": "AA002",
                "probaResult.empId.employee.dept.dept.desc__lang": "1455-EN",
                "probaResult.empId.employee.position.position.desc__lang": "",
                "status": "Y",
                "iRev": 7,
                "lastModifyDate": "2020-04-21 18:42:51",
                "probaResult.lastModifyUid.simpleUser.desc__lang": "admin-SC",
                "id": 13,
                "st_desc": "AA002",
                "st_id": 13,
                "st_code": "AA002"
            },
          {......}
        ]
    }
    

# 新增试用期结果

# 接口描述

用于新增试用期结果记录

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/probaResult
    HTTP 请求方式 PUT
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: probaResult
    entity String (Body) Y JSON (可参考请求示例中的相关参数)
  3. 请求示例

    long recordId = 0;
    
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/probaResult";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("probaResult");
    
        HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString());
        put.addHeader("authorization", access_token);
        put.addHeader("client_id", ClientID);
    
        StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
        entity.setContentEncoding("UTF-8");
        put.setEntity(entity);
    
        res = client.execute(put);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            if (json != null) {
                recordId = json.getLongValue("recordId");
            }
    
            System.out.println(json);
        }
    
        put.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    

    其中 Entity 的 JSON 格式如下:

    {
        "probaresult": {
            "values": [
                {
                    "code": "test001",
                    "probaLogId": 296
                }
            ]
        }
    }
    
  4. 返回示例

    {
        "recordId": 236,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "编号重复(probaresult.code)",
                "msgCode": "core_101903"
            }
        ],
        "status": false
    }
    

# 读取试用期结果

# 接口描述

根据 ID 读取试用期结果记录详情

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/read/probaResult
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: probaResult
    id long (Query) Y 试用期结果单 ID,可参考获取试用期结果单据列表返回的 ID
    iRev long (Query) N 版本号,用于读取历史记录 / 已删除的记录
  3. 请求示例

    JSONObject json = null;
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/probaResult";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("probaResult");
        paramStrBuilder.append("&id=").append(id);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "data": {
            "probaresult": [
                {
                    "attachmentNo": 0,
                    "empId": 70982,
                    "reason": "",
                    "lastModifyUid": 4,
                    "code": "test001",
                    "lastApproveUid": 0,
                    "useAccess": false,
                    "iRev": 1,
                    "sysJson": "",
                    "viewCode": "probaResult",
                    "useAccessWl": false,
                    "beId": 0,
                    "result": "pass",
                    "newEndDate": -2209017600000,
                    "printCount": 0,
                    "useAccessBl": false,
                    "probaLogId": 296,
                    "id": 236,
                    "statusModifyDate": 1650528443000,
                    "lastModifyDate": 1650528443000,
                    "useAccessAutoCalc": false,
                    "createUid": 4,
                    "createDate": 1650528443000,
                    "status": "N"
                }
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# 保存试用期结果

# 接口描述

用于保存试用期结果单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/probaResult
    HTTP 请求方式 PUT
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: probaResult
    entity String (Body) Y JSON (可参考请求示例中的相关参数)
  3. 请求示例

    long recordId = 0;
    
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/probaResult";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("probaResult");
    
        HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString());
        put.addHeader("authorization", access_token);
        put.addHeader("client_id", ClientID);
    
        StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
        entity.setContentEncoding("UTF-8");
        put.setEntity(entity);
    
        res = client.execute(put);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            if (json != null) {
                recordId = json.getLongValue("recordId");
            }
    
            System.out.println(json);
        }
    
        put.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    

    其中 Entity 的 JSON 格式如下:

    {
        "probaresult": {
            "values": [
                {
                	"id": 157,
                	"result": "extendProba",
                	"newEndDate": "2022-04-21"
                }
            ]
        }
    }
    
  4. 返回示例

    {
        "recordId": 157,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "<新结束日期>必须为空(probaresult.newEndDate.1)",
                "msgCode": "ch01_emp_probaResult_100003"
            }
        ],
        "status": false
    }
    

# 删除试用期结果

# 接口描述

用于删除指定 ID 的试用期结果单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/delete/probaResult
    HTTP 请求方式 DELETE
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: probaResult
    id long (Query) Y 试用期结果单 ID,可参考获取试用期结果单据列表返回的 ID
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/probaResult";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("probaResult");
        paramStrBuilder.append("&id=").append(id);
    
        HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString());
        delete.addHeader("authorization", access_token);
        delete.addHeader("client_id", ClientID);
    
        res = client.execute(delete);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        delete.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "messages": [],
        "status": true
    }
    
    {
        "messages": [
            {
                "msgDetail": "只可删除最新记录(probaresult.code.1)",
                "msgCode": "core_101013"
            }
        ],
        "status": false
    }
    

# 封锁名单

# 获取封锁名单单据列表

# 接口描述

用于获取封锁名单单据列表

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/search/search
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    stSearch String (Query) Y Lookup Type. 可在 UDF Lookup 中找到。
    (Eg: blacklist ......)
    formatId long (Query) N Lookup Query 中的格式 ID
    (若未指定该参数,则使用默认格式)
    startRow int (Query) N 返回结果的开始行
    endRow int (Query) N 返回结果的结束行
    quickSearchStr String (Query) N 设定关键字查找数据
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&stSearch=").append("blacklist");
        paramStrBuilder.append("&startRow=").append(0);
        paramStrBuilder.append("&endRow=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "stSearch": "blacklist",
        "size": 10,
        "stSearchDisplay": "封锁名单",
        "values": [
            {
                "code": "17062901",
                "blacklist.empId.employee.code": "",
                "blacklist.empId.employee.desc": "",
                "blacklist.empId.employee.dept.dept.desc__lang": "",
                "blacklist.empId.employee.position.position.desc__lang": "",
                "isReleased": false,
                "releasedDate": "1900-01-01",
                "status": "Y",
                "iRev": 4,
                "lastModifyDate": "2017-12-21 09:24:12",
                "blacklist.lastModifyUid.simpleUser.desc__lang": "",
                "id": 35,
                "st_desc": "17062901",
                "st_id": 35,
                "st_code": "17062901"
            },
          {......}
        ]
    }
    

# 新增封锁名单

# 接口描述

用于新增封锁名单记录

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/blacklist
    HTTP 请求方式 PUT
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: blacklist
    entity String (Body) Y JSON (可参考请求示例中的相关参数)
  3. 请求示例

    long recordId = 0;
    
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/blacklist";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("blacklist");
    
        HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString());
        put.addHeader("authorization", access_token);
        put.addHeader("client_id", ClientID);
    
        StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
        entity.setContentEncoding("UTF-8");
        put.setEntity(entity);
    
        res = client.execute(put);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            if (json != null) {
                recordId = json.getLongValue("recordId");
            }
    
            System.out.println(json);
        }
    
        put.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    

    其中 Entity 的 JSON 格式如下:

    {
        "blacklist": {
            "values": [
                {
                    "code": "test001",
                    "idTypeId": 31,
                    "idNo": "12345"
                }
            ]
        }
    }
    
  4. 返回示例

    {
        "recordId": 49,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "编号重复(blacklist.code)",
                "msgCode": "core_101903"
            }
        ],
        "status": false
    }
    

# 读取封锁名单

# 接口描述

根据 ID 读取封锁名单记录详情

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/read/blacklist
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: blacklist
    id long (Query) Y 封锁名单单 ID,可参考获取封锁名单单据列表返回的 ID
    iRev long (Query) N 版本号,用于读取历史记录 / 已删除的记录
  3. 请求示例

    JSONObject json = null;
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/blacklist";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("blacklist");
        paramStrBuilder.append("&id=").append(id);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "data": {
            "blacklist": [
                {
                    "releasedDate": -2209017600000,
                    "attachmentNo": 0,
                    "empId": 70248,
                    "udfattri29": 0,
                    "lastModifyUid": 4,
                    "code": "20200619",
                    "useAccess": false,
                    "udfattri2": 0,
                    "blacklistTypeId": 0,
                    "udfattri23": 0,
                    "udfattri24": 0,
                    "empName_en": "17060601",
                    "iRev": 1,
                    "remark": "",
                    "udfattri21": 0,
                    "sysJson": "",
                    "udfattri22": 0,
                    "udfattri27": 0,
                    "viewCode": "blacklist",
                    "idNo": "17060601",
                    "udfattri28": 0,
                    "udfattri25": 0,
                    "idTypeId": 31,
                    "udfattri26": 0,
                    "beId": 0,
                    "photoCode": "",
                    "empName": "简体",
                    "printCount": 0,
                    "useAccessBl": false,
                    "id": 47,
                    "statusModifyDate": 1592539552000,
                    "isReleased": false,
                    "empName_zh-TW": "繁体",
                    "lastModifyDate": 1592539552000,
                    "createUid": 4,
                    "createDate": 1592539552000,
                    "lastApproveUid": 4,
                    "releasedBy": 0,
                    "useAccessWl": false,
                    "i18nField": "{\"empName_en\": \"17060601\", \"empName_zh-CN\": \"简体\", \"empName_zh-TW\": \"繁体\"}",
                    "empName_zh-CN": "简体",
                    "blacklistReasonId": 0,
                    "useAccessAutoCalc": false,
                    "status": "Y"
                }
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# 保存封锁名单

# 接口描述

用于保存封锁名单单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/blacklist
    HTTP 请求方式 PUT
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: blacklist
    entity String (Body) Y JSON (可参考请求示例中的相关参数)
  3. 请求示例

    long recordId = 0;
    
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/blacklist";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("blacklist");
    
        HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString());
        put.addHeader("authorization", access_token);
        put.addHeader("client_id", ClientID);
    
        StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
        entity.setContentEncoding("UTF-8");
        put.setEntity(entity);
    
        res = client.execute(put);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            if (json != null) {
                recordId = json.getLongValue("recordId");
            }
    
            System.out.println(json);
        }
    
        put.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    

    其中 Entity 的 JSON 格式如下:

    {
        "blacklist": {
            "values": [
                {
                	"id": 49,
                	"empId": 51
                }
            ]
        }
    }
    
  4. 返回示例

    {
        "recordId": 49,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "必填项为空(blacklist.idTypeId,blacklist.idNo)",
                "msgCode": "core_101905"
            }
        ],
        "status": false
    }
    

# 删除封锁名单

# 接口描述

用于删除指定 ID 的封锁名单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/delete/blacklist
    HTTP 请求方式 DELETE
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: blacklist
    id long (Query) Y 封锁名单单 ID,可参考获取封锁名单单据列表返回的 ID
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/blacklist";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("blacklist");
        paramStrBuilder.append("&id=").append(id);
    
        HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString());
        delete.addHeader("authorization", access_token);
        delete.addHeader("client_id", ClientID);
    
        res = client.execute(delete);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        delete.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "messages": [],
        "status": true
    }
    
    {
        "messages": [
            {
                "msgDetail": "单据已被删除",
                "msgCode": "core_101017"
            }
        ],
        "status": false
    }
    

# 停薪留职

# 获取停薪留职单据列表

# 接口描述

用于获取停薪留职单据列表

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/search/search
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    stSearch String (Query) Y Lookup Type. 可在 UDF Lookup 中找到。
    (Eg: jobSuspension ......)
    formatId long (Query) N Lookup Query 中的格式 ID
    (若未指定该参数,则使用默认格式)
    startRow int (Query) N 返回结果的开始行
    endRow int (Query) N 返回结果的结束行
    quickSearchStr String (Query) N 设定关键字查找数据
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&stSearch=").append("jobSuspension");
        paramStrBuilder.append("&startRow=").append(0);
        paramStrBuilder.append("&endRow=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "stSearch": "jobSuspension",
        "size": 10,
        "stSearchDisplay": "停薪留职",
        "values": [
            {
                "code": "17120402",
                "effDate": "2017-01-01",
                "jobSuspension.empId.employee.code": "17120401",
                "jobSuspension.empId.employee.desc": "17120401",
                "jobSuspension.empId.employee.dept.dept.desc__lang": "出勤部门_cn",
                "jobSuspension.empId.employee.position.position.desc__lang": "出勤员_cn",
                "end": true,
                "status": "Y",
                "iRev": 10,
                "lastModifyDate": "2019-10-10 11:41:34",
                "jobSuspension.lastModifyUid.simpleUser.desc__lang": "admin-SC",
                "id": 16,
                "st_desc": "17120402",
                "st_id": 16,
                "st_code": "17120402"
            },
          {......}
        ]
    }
    

# 新增停薪留职

# 接口描述

用于新增停薪留职记录

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/jobSuspension
    HTTP 请求方式 PUT
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: jobSuspension
    entity String (Body) Y JSON (可参考请求示例中的相关参数)
  3. 请求示例

    long recordId = 0;
    
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/jobSuspension";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("jobSuspension");
    
        HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString());
        put.addHeader("authorization", access_token);
        put.addHeader("client_id", ClientID);
    
        StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
        entity.setContentEncoding("UTF-8");
        put.setEntity(entity);
    
        res = client.execute(put);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            if (json != null) {
                recordId = json.getLongValue("recordId");
            }
    
            System.out.println(json);
        }
    
        put.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    

    其中 Entity 的 JSON 格式如下:

    {
        "jobsuspension": {
            "values": [
                {
                    "code": "test001",
                    "effDate": "2022-04-22",
                    "empId": 49
                }
            ]
        }
    }
    
  4. 返回示例

    {
        "recordId": 54,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "停薪留职记录与以下记录重叠。",
                "msgCode": "ch01_emp_jobSuspension_100005"
            },
            {
                "msgDetail": "编号重复(jobsuspension.code)",
                "msgCode": "core_101903"
            }
        ],
        "status": false
    }
    

# 读取停薪留职

# 接口描述

根据 ID 读取停薪留职记录详情

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/read/jobSuspension
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: jobSuspension
    id long (Query) Y 停薪留职单 ID,可参考获取停薪留职单据列表返回的 ID
    iRev long (Query) N 版本号,用于读取历史记录 / 已删除的记录
  3. 请求示例

    JSONObject json = null;
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/jobSuspension";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("jobSuspension");
        paramStrBuilder.append("&id=").append(id);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "data": {
            "jobsuspension": [
                {
                    "attachmentNo": 0,
                    "empId": 10081,
                    "lastModifyUid": 4,
                    "code": "D5",
                    "jobSuspensionType": 0,
                    "useAccess": false,
                    "endDate": 1573142400000,
                    "iRev": 3,
                    "sysJson": "",
                    "udfaskif": false,
                    "viewCode": "jobSuspension",
                    "beId": 0,
                    "effDate": 1551369600000,
                    "printCount": 0,
                    "useAccessBl": false,
                    "end": false,
                    "id": 45,
                    "statusModifyDate": 1591266079000,
                    "lastModifyDate": 1591266079000,
                    "createUid": 4,
                    "affectSeniority": false,
                    "createDate": 1591266072000,
                    "jobSuspensionIntention": 0,
                    "lastApproveUid": 4,
                    "useAccessWl": false,
                    "allowPayCalc": false,
                    "lockAccount": false,
                    "replacement": 10081,
                    "useAccessAutoCalc": false,
                    "remarks": "",
                    "status": "Y"
                }
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# 保存停薪留职

# 接口描述

用于保存停薪留职单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/jobSuspension
    HTTP 请求方式 PUT
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: jobSuspension
    entity String (Body) Y JSON (可参考请求示例中的相关参数)
  3. 请求示例

    long recordId = 0;
    
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/jobSuspension";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("jobSuspension");
    
        HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString());
        put.addHeader("authorization", access_token);
        put.addHeader("client_id", ClientID);
    
        StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
        entity.setContentEncoding("UTF-8");
        put.setEntity(entity);
    
        res = client.execute(put);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            if (json != null) {
                recordId = json.getLongValue("recordId");
            }
    
            System.out.println(json);
        }
    
        put.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    

    其中 Entity 的 JSON 格式如下:

    {
        "jobsuspension": {
            "values": [
                {
                	"id": 54,
                	"jobSuspensionType": 1,
                	"endDate": "2022-04-21"
                }
            ]
        }
    }
    
  4. 返回示例

    {
        "recordId": 54,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "完结日期不能早于生效日期",
                "msgCode": "core_101011"
            }
        ],
        "status": false
    }
    

# 删除停薪留职

# 接口描述

用于删除指定 ID 的停薪留职单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/delete/jobSuspension
    HTTP 请求方式 DELETE
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: jobSuspension
    id long (Query) Y 停薪留职单 ID,可参考获取停薪留职单据列表返回的 ID
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/jobSuspension";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("jobSuspension");
        paramStrBuilder.append("&id=").append(id);
    
        HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString());
        delete.addHeader("authorization", access_token);
        delete.addHeader("client_id", ClientID);
    
        res = client.execute(delete);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        delete.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "messages": [],
        "status": true
    }
    
    {
        "messages": [
            {
                "msgDetail": "单据已被删除",
                "msgCode": "core_101017"
            }
        ],
        "status": false
    }
    

# 离职

# 获取离职单据列表

# 接口描述

用于获取离职单据列表

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/search/search
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    stSearch String (Query) Y Lookup Type. 可在 UDF Lookup 中找到。
    (Eg: termination ......)
    formatId long (Query) N Lookup Query 中的格式 ID
    (若未指定该参数,则使用默认格式)
    startRow int (Query) N 返回结果的开始行
    endRow int (Query) N 返回结果的结束行
    quickSearchStr String (Query) N 设定关键字查找数据
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&stSearch=").append("termination");
        paramStrBuilder.append("&startRow=").append(0);
        paramStrBuilder.append("&endRow=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "stSearch": "termination",
        "size": 10,
        "stSearchDisplay": "离职",
        "values": [
            {
                "code": "17060601",
                "effDate": "2017-08-01",
                "termination.empId.employee.code": "17060601",
                "termination.empId.employee.desc": "简体",
                "termination.empId.employee.dept.dept.desc__lang": "出勤部门_cn",
                "termination.empId.employee.position.position.desc__lang": "出勤员_cn",
                "status": "Y",
                "iRev": 24,
                "lastModifyDate": "2020-06-23 16:39:16",
                "termination.lastModifyUid.simpleUser.desc__lang": "admin-SC",
                "id": 52,
                "st_desc": "17060601702482017-08-01",
                "st_id": 52,
                "st_code": "17060601"
            },
          {......}
        ]
    }
    

# 新增离职

# 接口描述

用于新增离职记录

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/termination
    HTTP 请求方式 PUT
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: termination
    entity String (Body) Y JSON (可参考请求示例中的相关参数)
  3. 请求示例

    long recordId = 0;
    
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/termination";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("termination");
    
        HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString());
        put.addHeader("authorization", access_token);
        put.addHeader("client_id", ClientID);
    
        StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
        entity.setContentEncoding("UTF-8");
        put.setEntity(entity);
    
        res = client.execute(put);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            if (json != null) {
                recordId = json.getLongValue("recordId");
            }
    
            System.out.println(json);
        }
    
        put.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    

    其中 Entity 的 JSON 格式如下:

    {
        "termination": {
            "values": [
                {
                    "code": "test001",
                    "effDate": "2022-04-22",
                    "empId": 49,
                    "applyDate": "2022-04-22",
                    "reqEffDate": "2022-05-01"
                }
            ]
        }
    }
    
  4. 返回示例

    {
        "recordId": 489,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "该员工已存在离职记录",
                "msgCode": "ch01_emp_termination_100004"
            },
            {
                "msgDetail": "编号重复(termination.code)",
                "msgCode": "core_101903"
            }
        ],
        "status": false
    }
    

# 读取离职

# 接口描述

根据 ID 读取离职记录详情

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/read/termination
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: termination
    id long (Query) Y 离职单 ID,可参考获取离职单据列表返回的 ID
    iRev long (Query) N 版本号,用于读取历史记录 / 已删除的记录
  3. 请求示例

    JSONObject json = null;
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/termination";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("termination");
        paramStrBuilder.append("&id=").append(id);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "data": {
            "termination": [
                {
                    "reason": 0,
                    "lastModifyUid": 4,
                    "useAccess": false,
                    "sysJson": "",
                    "type": 0,
                    "viewCode": "termination",
                    "actNoticeUnit": "days",
                    "payer": "nil",
                    "udfctest": "",
                    "beId": 0,
                    "noticeReqUnit": "days",
                    "updateEmployment": 0,
                    "effDate": 1650556800000,
                    "empTurnoverTypeId": 0,
                    "autoinbl": false,
                    "useAccessBl": false,
                    "id": 489,
                    "lastModifyDate": 1650599678000,
                    "createUid": 4,
                    "terminaLetter": "",
                    "lastApproveUid": 4,
                    ......
                }
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# 保存离职

# 接口描述

用于保存离职单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/termination
    HTTP 请求方式 PUT
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: termination
    entity String (Body) Y JSON (可参考请求示例中的相关参数)
  3. 请求示例

    long recordId = 0;
    
    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/termination";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("termination");
    
        HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString());
        put.addHeader("authorization", access_token);
        put.addHeader("client_id", ClientID);
    
        StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
        entity.setContentEncoding("UTF-8");
        put.setEntity(entity);
    
        res = client.execute(put);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            if (json != null) {
                recordId = json.getLongValue("recordId");
            }
    
            System.out.println(json);
        }
    
        put.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    

    其中 Entity 的 JSON 格式如下:

    {
        "termination": {
            "values": [
                {
                	"id": 489,
                	"empId": 1,
                	"reqEffDate": "2022-04-21"
                }
            ]
        }
    }
    
  4. 返回示例

    {
        "recordId": 489,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "存在无效数据(termination.empId)",
                "msgCode": "core_143009"
            }
        ],
        "status": false
    }
    

# 删除离职

# 接口描述

用于删除指定 ID 的离职单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/delete/termination
    HTTP 请求方式 DELETE
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    menuCode String (Query) Y 可在 Data Dictionary 中找到
    Eg: termination
    id long (Query) Y 离职单 ID,可参考获取离职单据列表返回的 ID
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/termination";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("termination");
        paramStrBuilder.append("&id=").append(id);
    
        HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString());
        delete.addHeader("authorization", access_token);
        delete.addHeader("client_id", ClientID);
    
        res = client.execute(delete);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        delete.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "messages": [],
        "status": true
    }
    
    {
        "messages": [
            {
                "msgDetail": "单据已被删除",
                "msgCode": "core_101017"
            }
        ],
        "status": false
    }
    

# 读取 EBI 数据

# 员工列表

# 接口描述

用于按照指定 EBI 格式读取 [员工列表] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 10,
        "rows": [
            {
                "T1_A_employStatus": "在职",
                "T1_C_desc__lang": "D122",
                "M18ReservedCol_dataIndex": 1,
                "T1_A_terminateDate": "",
                "T1_B_desc__lang": "开发部",
                "T1_A_id": "49",
                "T1_A_joinDate": "2017/02/06",
                "T1_A_code": "00006"
            },
            ......
        ]
    }
    

    EMPLOYEE_EBI

# 部门列表

# 接口描述

用于按照指定 EBI 格式读取 [部门列表] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 10,
        "rows": [
            {
                "T1_A_deptBeId": "2",
                "M18ReservedCol_dataIndex": 1,
                "T1_A_deptBeId_code": "SZO",
                "T1_A_id": "1",
                "T1_A_supDept_desc__lang": "SZO",
                "T1_A_email": "",
                "T1_A_desc__lang": "会计部",
                "T1_A_supDept_code": "SZO",
                "T1_A_supDept": "2",
                "T1_A_code": "ACCT"
            },
            ......
        ]
    }
    

    DEPT_EBI

# 部门负责人列表

# 接口描述

用于按照指定 EBI 格式读取 [部门负责人列表] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 10,
        "rows": [
            {
                "T3_A_id": "8",
                "MAIN_endDate": "9999/12/31",
                "M18ReservedCol_dataIndex": 1,
                "T1_A_id": "1",
                "MAIN_inCharge": "否",
                "MAIN_startDate": "",
                "T2_A_id": "2",
                "T1_A_code": "ACCT",
                "T2_A_code": "2",
                "T3_A_code": "SD"
            },
            ......
        ]
    }
    

    DEPTPIC_EBI

# 职位列表

# 接口描述

用于按照指定 EBI 格式读取 [职位列表] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 10,
        "rows": [
            {
                "T1_A_require__lang": "简体-<br>工作细心<br>每周汇报工作进度",
                "T1_A_positionTypeId_code": "",
                "T1_A_probaPeriodCombo": "月",
                "M18ReservedCol_dataIndex": 1,
                "T1_A_id": "1",
                "T1_A_desc__lang": "人事部门-简体",
                "T1_A_probaPeriod": "3",
                "T1_A_positionTypeId": "0",
                "T1_A_code": "HR"
            },
            ......
        ]
    }
    

    POSITION_EBI

# 计划编制分析报告

# 接口描述

用于按照指定 EBI 格式读取 [计划编制分析报告] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 10,
        "rows": [
            {
                "MAIN_udfHCrace_code": "0",
                "MAIN_endDate": "9999/12/31",
                "M18ReservedCol_dataIndex": 1,
                "T1_A_id": "4",
                "MAIN_startDate": "2014/01/01",
                "MAIN_headcountId": "A2",
                "MAIN_code": "S001",
                "T1_A_code": "T001"
            },
            ......
        ]
    }
    

    HEADCOUNT_EBI

# 编制变迁分析报告

# 接口描述

用于按照指定 EBI 格式读取 [编制变迁分析报告] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 10,
        "rows": [
            {
                "MAIN_empHcHeadcount": "0.5000",
                "T1_A_desc": "0002",
                "T2_A_desc": "AAA的说明",
                "MAIN_endDate": "9999年12月31日",
                "M18ReservedCol_dataIndex": 1,
                "MAIN_empHcStartDate": "2020年01月01日",
                "MAIN_startDate": "2017年03月27日",
                "MAIN_headcountId": "SC0101",
                "T1_C_desc": "00005",
                "T1_B_desc": "00001",
                "MAIN_headcount": "0.5000",
                "T4_A_desc": "SC01说明",
                "T1_A_id": "2982",
                "MAIN_empHcEndDate": "9999年12月31日",
                "T3_A_desc": "Social Worker 01 SC",
                "T1_A_code": "0002"
            },
            ......
        ]
    }
    

    HC_MOVEMENT_EBI

# 编制履行报告

# 接口描述

用于按照指定 EBI 格式读取 [编制履行报告] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 10,
        "rows": [
            {
                "MAIN_empHcHeadcount": "0.0000",
                "T1_A_desc": "",
                "T2_A_desc": "AAA的说明",
                "MAIN_endDate": "9999年12月31日",
                "M18ReservedCol_dataIndex": 1,
                "MAIN_headcount": "1.0000",
                "T1_A_id": "0",
                "T3_A_desc": "Social Worker 01 SC",
                "MAIN_startDate": "2017年03月27日",
                "MAIN_headcountId": "SC0102",
                "T1_A_code": ""
            },
            ......
        ]
    }
    

    HC_FULFILLMENT_EBI

# 虚拟组织负责人列表

# 接口描述

用于按照指定 EBI 格式读取 [虚拟组织负责人列表] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 5,
        "rows": [
            {
                "T2_A_employeeId_code": "A001",
                "T2_A_employeeId_desc__lang": "A001 S",
                "T2_A_employeeId": "10184",
                "T3_A_id": "2",
                "MAIN_endDate": "9999/12/31",
                "M18ReservedCol_dataIndex": 1,
                "T1_A_id": "5",
                "T3_A_desc__lang": "",
                "T2_A_id": "72",
                "T3_A_code": "V03",
                "T1_A_code": "TA",
                "T2_A_code": "A001"
            },
            ......
        ]
    }
    

    VIRDEPTPIC_EBI

# 虚拟组织成员列表

# 接口描述

用于按照指定 EBI 格式读取 [虚拟组织成员列表] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 10,
        "rows": [
            {
                "T1_A_employeeId_desc__lang": "A001 S",
                "T3_A_id": "2",
                "M18ReservedCol_dataIndex": 1,
                "T1_A_employeeId": "10184",
                "T1_A_id": "72",
                "MAIN_startDate": "",
                "T3_A_desc__lang": "",
                "T2_A_id": "4",
                "T3_A_code": "V03",
                "T2_A_code": "Consultant",
                "T1_A_code": "A001",
                "T1_A_employeeId_code": "A001"
            },
            ......
        ]
    }
    

    VIRDEPTMEM_EBI

# 组织架构分析报告

# 接口描述

用于按照指定 EBI 格式读取 [组织架构分析报告] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 10,
        "rows": [
            {
                "T2_A_effDate": "2017/06/05",
                "MAIN_subCode": "",
                "M18ReservedCol_dataIndex": 1,
                "MAIN_subDesc": "",
                "T1_A_id": "2",
                "T2_A_currentEff": "否",
                "T2_A_id": "50",
                "T2_A_code": "YTEST1",
                "T2_A_effType": "立即生效",
                "T1_A_code": "SZO",
                "MAIN_level": "1"
            },
            ......
        ]
    }
    

    ORGCHART_EBI

# 员工负责人列表

# 接口描述

用于按照指定 EBI 格式读取 [员工负责人列表] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 10,
        "rows": [
            {
                "T_A_code": "T032201",
                "T_A_id": "10004",
                "T1_A_endDate": "",
                "T1_A_inCharge": "否",
                "M18ReservedCol_dataIndex": 1,
                "T1_C_code": "SD",
                "T1_A_startDate": "",
                "T1_B_id": "2",
                "T1_C_id": "8",
                "T1_B_code": "2"
            },
            ......
        ]
    }
    

    EMPLOYEEPIC_EBI

# 员工学历分析报告

# 接口描述

用于按照指定 EBI 格式读取 [员工学历分析报告] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 10,
        "rows": [
            {
                "T2_A_dateFromYear": "1900",
                "T2_C_desc": "EDU01",
                "M18ReservedCol_dataIndex": 1,
                "T2_A_dateToYear": "1900",
                "T1_A_id": "10006",
                "T2_A_isHighestEducation": "是",
                "T2_A_majorSubject": "fdfd",
                "T1_A_code": "DT004"
            },
            ......
        ]
    }
    

    EMPEDU_EBI

# 员工资源分配列表

# 接口描述

用于按照指定 EBI 格式读取 [员工资源分配列表] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 10,
        "rows": [
            {
                "T2_B_code": "Phone",
                "M18ReservedCol_dataIndex": 1,
                "T2_returnUnit": "",
                "T2_A_assetUnit": "个",
                "T1_A_id": "49",
                "T2_returnQty": "0.0",
                "T2_B_id": "4",
                "T1_A_code": "00006",
                "T2_A_assetQty": "2.00"
            },
            ......
        ]
    }
    

    EMPASSET_EBI

# 员工执照分析报告

# 接口描述

用于按照指定 EBI 格式读取 [员工执照分析报告] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 10,
        "rows": [
            {
                "L_B_id": "1",
                "MF_A_id": "51",
                "L_A_effDateTo": "2017/02/02",
                "L_A_licenseNo": "testaa",
                "L_A_hId": "51",
                "M18ReservedCol_dataIndex": 1,
                "L_A_isNewWorkingVisa": "否",
                "MF_A_code": "00004",
                "L_B_code": "aa",
                "L_A_effDateFrom": "2017/01/01"
            },
            ......
        ]
    }
    

    EMPLICENSE_EBI

# 员工健康报告

# 接口描述

用于按照指定 EBI 格式读取 [员工健康报告] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 10,
        "rows": [
            {
                "T2_A_remark": "",
                "T2_A_mcdate": "2017/07/10",
                "M18ReservedCol_dataIndex": 1,
                "T1_A_id": "70295",
                "T2_A_result": "",
                "T1_A_code": "17062102_2"
            },
            ......
        ]
    }
    

    EMPHEALTH_EBI

# 员工语言能力报告

# 接口描述

用于按照指定 EBI 格式读取 [员工语言能力报告] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 9,
        "rows": [
            {
                "T2_A_remark": "<p><img src=\"/jsf/imageServlet?thumbnail=true&amp;code=cl425O30479169750O15\" style=\"width: 256px;\"><b>TEST</b></p>",
                "T2_A_certificate__lang": "",
                "M18ReservedCol_dataIndex": 1,
                "T1_A_id": "51",
                "T2_A_expiryDate": "2019/01/01",
                "T2_A_result": "raa",
                "T1_A_code": "00004"
            },
            ......
        ]
    }
    

    EMPLANGPRO_EBI

# 员工工作经验报告

# 接口描述

用于按照指定 EBI 格式读取 [员工工作经验报告] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 10,
        "rows": [
            {
                "T2_A_dateFromYear": "2009",
                "T2_A_yearOfExp": "1.08",
                "T2_C_desc": "",
                "M18ReservedCol_dataIndex": 1,
                "T2_A_annualIncome": "0.00",
                "T2_B_desc": "",
                "T2_A_dateToYear": "2010",
                "T1_A_id": "70248",
                "T1_A_code": "17060601"
            },
            ......
        ]
    }
    

    EMPWORK_EBI

# 员工专业资格报告

# 接口描述

用于按照指定 EBI 格式读取 [员工专业资格报告] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 10,
        "rows": [
            {
                "T2_A_itemNo": "     1",
                "T2_A_remark": "",
                "T2_A_acdate": "2017/01/01",
                "T2_C_desc": "Qualification Type Description (QUALITYPE001)",
                "M18ReservedCol_dataIndex": 1,
                "T1_A_id": "51",
                "T2_A_certi": "testcer",
                "T1_A_code": "00004"
            },
            ......
        ]
    }
    

    EMPPROQUALI_EBI

# 员工IT技能报告

# 接口描述

用于按照指定 EBI 格式读取 [员工IT技能报告] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 10,
        "rows": [
            {
                "T2_A_itemNo": "     1",
                "M18ReservedCol_dataIndex": 1,
                "T1_A_id": "51",
                "T2_A_expiryDate": "2089/12/05",
                "T2_A_issuingAuthority": "iss",
                "T2_A_certificate": "cer",
                "T1_A_code": "00004"
            },
            ......
        ]
    }
    

    EMPITSKILLS_EBI

# 员工合同资料报告

# 接口描述

用于按照指定 EBI 格式读取 [员工合同资料报告] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 10,
        "rows": [
            {
                "T2_A_itemNo": "     1",
                "M18ReservedCol_dataIndex": 1,
                "T2_A_endDate": "2018/04/11",
                "T1_A_id": "10006",
                "T2_A_startDate": "2017/04/12",
                "T2_A_contractNo": "001",
                "T2_A_duration": "12",
                "T2_A_amt": "0.00",
                "T1_A_code": "DT004"
            },
            ......
        ]
    }
    

    EMPCONTRACT_EBI

# 员工家庭报告

# 接口描述

用于按照指定 EBI 格式读取 [员工家庭报告] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 10,
        "rows": [
            {
                "T2_A_name": "Tracy",
                "T2_A_company": "",
                "M18ReservedCol_dataIndex": 1,
                "T2_A_email": "",
                "T1_A_id": "52",
                "T2_B_desc__lang": "",
                "T2_A_tel": "",
                "T2_A_telarea": "",
                "T1_A_code": "00005"
            },
            ......
        ]
    }
    

    EMPFAMILY_EBI

# 封锁名单列表

# 接口描述

用于按照指定 EBI 格式读取 [封锁名单列表] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 10,
        "rows": [
            {
                "M18ReservedCol_dataIndex": 1,
                "T1_A_empId": "0",
                "T1_A_idTypeId": "32",
                "T1_A_idNo": "1111111",
                "T1_A_empId_desc__lang": "",
                "T1_A_id": "8",
                "T1_A_empId_code": "",
                "T1_A_idTypeId_code": "CR01",
                "T1_A_code": "BL0002"
            },
            ......
        ]
    }
    

    BLACKLIST_EBI

# 停薪留职分析报告

# 接口描述

用于按照指定 EBI 格式读取 [停薪留职分析报告] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 10,
        "rows": [
            {
                "T2_C_id": "161",
                "T1_A_effDate": "2019/09/01",
                "T1_A_endDate": "2019/09/10",
                "M18ReservedCol_dataIndex": 1,
                "T1_A_empId": "15010",
                "T2_C_code": "PT0139",
                "T1_A_empId_desc__lang": "肖华",
                "T1_A_id": "13",
                "T1_A_empId_code": "SZ0013",
                "T1_A_code": "SZ113"
            },
            ......
        ]
    }
    

    JOBSUSPENSION_EBI

# 离职分析报告

# 接口描述

用于按照指定 EBI 格式读取 [离职分析报告] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 10,
        "rows": [
            {
                "T1_A_effDate": "2017/08/01",
                "M18ReservedCol_dataIndex": 1,
                "T1_A_empId": "70248",
                "T1_A_empId_desc__lang": "简体",
                "T1_A_id": "52",
                "T1_A_empId_code": "17060601",
                "T1_A_actNoticeLenght": "0.75",
                "T1_A_noticeReqLenght": "10",
                "T1_A_code": "17060601"
            },
            ......
        ]
    }
    

    TERMINATION_EBI

# 重新入职分析报告

# 接口描述

用于按照指定 EBI 格式读取 [重新入职分析报告] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 10,
        "rows": [
            {
                "T1_A_employStatus": "在职",
                "M18ReservedCol_dataIndex": 1,
                "T1_A_id": "52",
                "T1_A_reEmployment": "否",
                "T1_A_joinDate": "2017/01/01",
                "T1_A_fileNo": "00004",
                "T1_A_code": "00005"
            },
            ......
        ]
    }
    

    REEMPLOY_EBI

# 员工更改日志报告

# 接口描述

用于按照指定 EBI 格式读取 [员工更改日志报告] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 3,
        "rows": [
            {
                "MAIN_caseSummarySC": "字段名称: 员工固定科目; 原值 - 金额: , 新值 - 金额: 100",
                "MAIN_fixPayDesc": "(ADMIN_ACC)",
                "M18ReservedCol_dataIndex": 1,
                "MAIN_pParaDesc": "",
                "MAIN_fixPayCode": "ADMIN_ACC",
                "MAIN_pParaCode": "",
                "MAIN_payItemEffDate": "2021/07/22",
                "MAIN_effDate": "2021/07/22",
                "MAIN_caseSummary": "Field Name: Employee Fixed Pay; Old Value - Amount: , New Value - Amount: 100",
                "MAIN_newValueDesc": "100",
                "T1_A_id": "14657",
                "MAIN_fieldNameDesc": "员工固定科目",
                "MAIN_caseSummaryTC": "欄位名稱: 員工固定項; 原值 - 金額: , 新值 - 金額: 100",
                "T1_A_code": "SZ0001",
                "MAIN_oldValueDesc": "",
                "MAIN_code": "SZ00010722
            },
            ......
        ]
    }
    

    EMPCHGNOTE_EBI

# 员工资料改动报告

# 接口描述

用于按照指定 EBI 格式读取 [员工资料改动报告] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 10,
        "rows": [
            {
                "MAIN_effDate": "2017/02/06",
                "MAIN_F1": "0.0",
                "M18ReservedCol_dataIndex": 1,
                "T1_A_id": "49",
                "MAIN_histEmployStatus": "在职",
                "T1_A_code": "00006"
            },
            ......
        ]
    }
    

    EMPHIST_EBI

# 员工流失率报告

# 接口描述

用于按照指定 EBI 格式读取 [员工流失率报告] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 10,
        "rows": [
            {
                "MAIN_turnoverRateDept": "0.00",
                "MAIN_udfEmpTo1": "0",
                "M18ReservedCol_dataIndex": 1,
                "MAIN_avgHeadcount": "0.00",
                "MAIN_filingYear": "2018",
                "T2_A_id": "10",
                "MAIN_turnoverRateBe": "0.00",
                "MAIN_filingQuarter": "0",
                "MAIN_inNum": "0",
                "MAIN_outNum": "0",
                "MAIN_newJoinNum": "0",
                "MAIN_postHeadcount": "0",
                "T1_A_id": "2",
                "MAIN_turnoverRate": "0.00",
                "MAIN_turnoverRatePosition": "0.00",
                "MAIN_udfEmpTo2": "0",
                "MAIN_filingMth": "0",
                "T1_A_code": "SZO",
                "T2_A_code": "TEST2",
                "MAIN_preHeadcount": "0"
            },
            ......
        ]
    }
    

    EMPTURNOVER_EBI

# 员工历史资料列表

# 接口描述

用于按照指定 EBI 格式读取 [员工历史资料列表] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 4,
        "rows": [
            {
                "T1_A_employStatus": "在职",
                "T1_A_desc": "00006",
                "M18ReservedCol_dataIndex": 1,
                "T1_A_id": "49",
                "T1_A_email": "hcm03@xxx.xxx",
                "T1_B_id": "3",
                "T1_B_code": "APPPPPPPPPPPPPPPPPPP",
                "T1_showMobile": "",
                "T1_A_code": "00006"
            },
            ......
        ]
    }
    

    EMPSNAPSHOT_EBI

# 员工紧急联系人列表

# 接口描述

用于按照指定 EBI 格式读取 [员工紧急联系人列表] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 10,
        "rows": [
            {
                "T2_A_remark": "",
                "M18ReservedCol_dataIndex": 1,
                "T2_A_contactPerson__lang": "",
                "T2_A_email": "",
                "T1_A_id": "10128",
                "T2_A_tel": "",
                "T2_A_telarea": "",
                "T1_A_code": "testing13"
            },
            ......
        ]
    }
    

    EMPCONTACT_EBI

# 工时详情(418)

# 接口描述

用于按照指定 EBI 格式读取 [工时详情(418)] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 1,
        "rows": [
            {
                "MAIN_workHourDay_1_W1": "0.00",
                "MAIN_workHourDay_2_W1": "0.00",
                "M18ReservedCol_dataIndex": 1,
                "MAIN_workHourDay_6_W1": "0.00",
                "T1_A_id": "14657",
                "MAIN_workHourDay_7_W1": "0.00",
                "MAIN_workHourWeek__W1": "0.00",
                "MAIN_workHourDay_4_W1": "0.00",
                "MAIN_workHourDay_5_W1": "0.00",
                "MAIN_workHourDay_3_W1": "0.00",
                "T1_A_code": "SZ0001"
            }
        ]
    }
    

    EMPWORKHOUR_EBI

# 试用期报告

# 接口描述

用于按照指定 EBI 格式读取 [试用期报告] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 10,
        "rows": [
            {
                "T1_A_result": "不通过",
                "M18ReservedCol_dataIndex": 1,
                "T2_A_empId_code": "BTEST001",
                "T2_A_probaStatus": "关闭",
                "T1_A_id": "187",
                "T2_A_empId": "10127",
                "T1_A_code": "PR_20180810180400001"
            },
            ......
        ]
    }
    

    PROBALIST_EBI

# 员工薪酬调整明细报告

# 接口描述

用于按照指定 EBI 格式读取 [员工薪酬调整明细报告] EBI,并返回数据

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP 请求方式 GET
    编码类型 UTF-8
  2. URL 参数

    参数 类型 必填 说明
    authorization String (Header) Y 通过 OAuth 获取的 Access Token
    client_id String (Header) Y M18 授权应用列表中的 Client ID
    formatId long (Query) Y 通过 EBI 接口获得
    offset int (Query) N 返回结果的开始行
    rows int (Query) N 返回结果行数
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&formatId=").append(formatId);
        paramStrBuilder.append("&offset=").append(0);
        paramStrBuilder.append("&rows=").append(10);
    
        HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString());
        get.addHeader("authorization", access_token);
        get.addHeader("client_id", ClientID);
        res = client.execute(get);
        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
    
            System.out.println(json);
        }
    
        get.releaseConnection();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        try {
            if (res != null) {
                res.close();
            }
            if (client != null) {
                client.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
  4. 返回示例

    {
        "size": 6,
        "rows": [
            {
                "MAIN_maxPtMth": "--",
                "MAIN_incExtPt": "1",
                "MAIN_effDate": "2019/03/29",
                "M18ReservedCol_dataIndex": 1,
                "MAIN_increYear": "2019",
                "MAIN_reachMaxPt": "否",
                "MAIN_increMth": "3月",
                "T1_A_id": "70304",
                "MAIN_maxPtYear": "0",
                "T1_A_code": "CTEST01"
            },
            ......
        ]
    }
    

    EMPSALADJ_EBI