# 薪资管理模块

# 变动科目

# 获取变动科目单据列表

# 接口描述

用于获取变动科目单据列表

# 接口调用说明

  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: varpay ......)
    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("varpay");
        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": "varpay",
        "size": 10,
        "stSearchDisplay": "变动科目",
        "values": [
            {
                "code": "18051401",
                "desc__lang": "",
                "status": "Y",
                "iRev": 1,
                "lastModifyDate": "2018-05-14 17:27:12",
                "varpay.lastModifyUid.simpleUser.desc__lang": "",
                "id": 7,
                "st_desc": "18051401",
                "st_id": 7,
                "st_code": "18051401"
            },
          {......}
        ]
    }
    

# 新增变动科目

# 接口描述

用于新增变动科目记录

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/varpay
    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: varpay
    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/varpay";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("varpay");
    
        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 格式如下:

    {
        "mainvp": {
            "values": [
                {
                	"code": "test001",
                    "desc": "测试变动科目",
                    "vpcatId": 1
                }
            ]
        }
    }
    
  4. 返回示例

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

# 读取变动科目

# 接口描述

根据 ID 读取变动科目记录详情

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/read/varpay
    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: varpay
    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/varpay";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("varpay");
        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": {
            "mainvp": [
                {
                    "ir56macc": "nil",
                    "attachmentNo": 0,
                    "lastModifyUid": 4,
                    "code": "test001",
                    "useAccess": false,
                    "ddesc": "",
                    "expiredDate": -2209017600000,
                    "vpcatId": 3,
                    "iRev": 3,
                    "sysJson": "",
                    "payrollrela": "nil",
                    "viewCode": "varpay",
                    "beId": 0,
                    "ir56bacc": "nil",
                    "ir56Rent": "nil",
                    "expired": false,
                    "leaveType": 0,
                    "incomecate": "nil",
                    "printCount": 0,
                    "useAccessBl": false,
                    "printSequence": 1,
                    "id": 41,
                    "statusModifyDate": 1651908968000,
                    "locked": false,
                    "desc_en": "测试变动科目",
                    "lastModifyDate": 1651909228000,
                    "createUid": 4,
                    "forOneOffSpeAllow": false,
                    "createDate": 1651908968000,
                    "payScaleCat": "--",
                    "desc_zh-CN": "",
                    "lastApproveUid": 4,
                    "mandaitem": false,
                    "expiredUid": 0,
                    "useAccessWl": false,
                    "udfaac": 0,
                    "i18nField": "{\"desc_en\": \"测试变动科目\"}",
                    "desc_zh-TW": "",
                    "showzero": false,
                    "taxrela": "nil",
                    "ir56eacc": "nil",
                    "sysDefault": false,
                    "useAccessAutoCalc": false,
                    "status": "Y",
                    "desc": "测试变动科目"
                }
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# 保存变动科目

# 接口描述

用于保存变动科目单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/varpay
    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: varpay
    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/varpay";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("varpay");
    
        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 格式如下:

    {
        "mainvp": {
            "values": [
                {
                	"id": 41,
                	"code": "test001",
                	"vpcatId": 3
                }
            ]
        }
    }
    
  4. 返回示例

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

# 删除变动科目

# 接口描述

用于删除指定 ID 的变动科目单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/delete/varpay
    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: varpay
    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/varpay";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("varpay");
        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: fixpay ......)
    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("fixpay");
        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": "fixpay",
        "size": 10,
        "stSearchDisplay": "固定科目",
        "values": [
            {
                "code": "ADMIN_ACC",
                "desc__lang": "",
                "status": "Y",
                "iRev": 7,
                "lastModifyDate": "2017-12-01 10:06:34",
                "fixpay.lastModifyUid.simpleUser.desc__lang": "admin-SC",
                "id": 11,
                "st_desc": "(ADMIN_ACC)",
                "st_id": 11,
                "st_code": "ADMIN_ACC"
            },
          {......}
        ]
    }
    

# 新增固定科目

# 接口描述

用于新增固定科目记录

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/fixpay
    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: fixpay
    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/fixpay";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("fixpay");
    
        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 格式如下:

    {
        "mainfp": {
            "values": [
                {
                	"code": "test001",
                    "desc": "测试固定科目",
                    "fpcatId": 1
                }
            ]
        }
    }
    
  4. 返回示例

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

# 读取固定科目

# 接口描述

根据 ID 读取固定科目记录详情

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/read/fixpay
    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: fixpay
    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/fixpay";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("fixpay");
        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": {
            "mainfp": [
                {
                    "ir56macc": "nil",
                    "attachmentNo": 0,
                    "lastModifyUid": 4,
                    "code": "test001",
                    "useAccess": false,
                    "ddesc": "",
                    "expiredDate": -2209017600000,
                    "iRev": 1,
                    "sysJson": "",
                    "payrollrela": "nil",
                    "viewCode": "fixpay",
                    "calcdivide": false,
                    "beId": 0,
                    "ir56bacc": "nil",
                    "ir56Rent": "nil",
                    "expired": false,
                    "leaveType": 0,
                    "incomecate": "nil",
                    "printCount": 0,
                    "useAccessBl": false,
                    "printSequence": 1,
                    "id": 28,
                    "statusModifyDate": 1651909592000,
                    "locked": false,
                    "desc_en": "测试固定科目",
                    "lastModifyDate": 1651909592000,
                    "createUid": 4,
                    "forOneOffSpeAllow": false,
                    "createDate": 1651909592000,
                    "payScaleCat": "--",
                    "desc_zh-CN": "",
                    "period": "pay",
                    "lastApproveUid": 4,
                    "mandaitem": false,
                    "expiredUid": 0,
                    "useAccessWl": false,
                    "i18nField": "{\"desc_en\": \"测试固定科目\"}",
                    "desc_zh-TW": "",
                    "showzero": false,
                    "taxrela": "nil",
                    "fpcatId": 1,
                    "ir56eacc": "nil",
                    "useAccessAutoCalc": false,
                    "status": "Y",
                    "desc": "测试固定科目"
                }
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# 保存固定科目

# 接口描述

用于保存固定科目单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/fixpay
    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: fixpay
    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/fixpay";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("fixpay");
    
        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 格式如下:

    {
        "mainfp": {
            "values": [
                {
                	"id": 28,
                	"code": "test001",
                	"fpcatId": 3
                }
            ]
        }
    }
    
  4. 返回示例

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

# 删除固定科目

# 接口描述

用于删除指定 ID 的固定科目单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/delete/fixpay
    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: fixpay
    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/fixpay";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("fixpay");
        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: resultvalue ......)
    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("resultvalue");
        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": "resultvalue",
        "size": 10,
        "stSearchDisplay": "统计科目",
        "values": [
            {
                "code": "AA",
                "desc__lang": "AA",
                "status": "Y",
                "iRev": 3,
                "lastModifyDate": "2019-03-25 14:14:49",
                "resultvalue.lastModifyUid.simpleUser.desc__lang": "admin-SC",
                "id": 33,
                "st_desc": "AA",
                "st_id": 33,
                "st_code": "AA"
            },
          {......}
        ]
    }
    

# 新增统计科目

# 接口描述

用于新增统计科目记录

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/resultvalue
    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: resultvalue
    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/resultvalue";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("resultvalue");
    
        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 格式如下:

    {
        "mainrv": {
            "values": [
                {
                	"code": "test001",
                    "desc": "测试统计科目",
                    "rvcatId": 1
                }
            ]
        }
    }
    
  4. 返回示例

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

# 读取统计科目

# 接口描述

根据 ID 读取统计科目记录详情

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/read/resultvalue
    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: resultvalue
    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/resultvalue";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("resultvalue");
        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": {
            "mainrv": [
                {
                    "ir56macc": "nil",
                    "lastModifyUid": 4,
                    "useAccess": false,
                    "expiredDate": -2209017600000,
                    "sysJson": "",
                    "viewCode": "resultvalue",
                    "beId": 0,
                    "ir56bacc": "nil",
                    "ir56Rent": "nil",
                    "calcOrder": "bmpf",
                    "leaveType": 0,
                    "useAccessBl": false,
                    "printSequence": 1,
                    "id": 74,
                    "locked": false,
                    "lastModifyDate": 1651909763000,
                    "createUid": 4,
                    "forOneOffSpeAllow": false,
                    "payScaleCat": "--",
                    "lastApproveUid": 4,
                    "expiredUid": 0,
                    "transfer": false,
                    "i18nField": "{\"desc_en\": \"测试统计科目\"}",
                    "desc_zh-TW": "",
                    "casualPayRela": "nil",
                    "taxrela": "nil",
                    "status": "Y",
                    "desc": "测试统计科目",
                    "attachmentNo": 0,
                    "code": "test001",
                    "ddesc": "",
                    "iRev": 1,
                    "payrollrela": "nil",
                    "rvcatId": 1,
                    "expired": false,
                    "incomecate": "nil",
                    "printCount": 0,
                    "statusModifyDate": 1651909763000,
                    "desc_en": "测试统计科目",
                    "createDate": 1651909763000,
                    "desc_zh-CN": "",
                    "lspAcType": "nil",
                    "mandaitem": false,
                    "useAccessWl": false,
                    "needCostAmor": false,
                    "showzero": false,
                    "ir56eacc": "nil",
                    "sysDefault": false,
                    "useAccessAutoCalc": false
                }
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# 保存统计科目

# 接口描述

用于保存统计科目单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/resultvalue
    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: resultvalue
    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/resultvalue";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("resultvalue");
    
        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 格式如下:

    {
        "mainrv": {
            "values": [
                {
                	"id": 74,
                	"code": "test001",
                	"rvcatId": 3
                }
            ]
        }
    }
    
  4. 返回示例

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

# 删除统计科目

# 接口描述

用于删除指定 ID 的统计科目单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/delete/resultvalue
    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: resultvalue
    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/resultvalue";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("resultvalue");
        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: insurAcc ......)
    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("insurAcc");
        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": "insurAcc",
        "size": 10,
        "stSearchDisplay": "保险科目",
        "values": [
            {
                "code": "IA001",
                "desc__lang": "Insurance Account",
                "status": "Y",
                "iRev": 7,
                "lastModifyDate": "2020-02-21 16:11:43",
                "insurAcc.lastModifyUid.simpleUser.desc__lang": "admin-SC",
                "id": 55,
                "st_desc": "Insurance Account",
                "st_id": 55,
                "st_code": "IA001"
            },
          {......}
        ]
    }
    

# 新增保险科目

# 接口描述

用于新增保险科目记录

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/insurAcc
    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: insurAcc
    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/insurAcc";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("insurAcc");
    
        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 格式如下:

    {
        "insuracc": {
            "values": [
                {
                	"code": "test001",
                    "desc": "测试保险科目",
                    "insurAccCat": 3
                }
            ]
        }
    }
    
  4. 返回示例

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

# 读取保险科目

# 接口描述

根据 ID 读取保险科目记录详情

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/read/insurAcc
    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: insurAcc
    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/insurAcc";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("insurAcc");
        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": {
            "insuracc": [
                {
                    "attachmentNo": 0,
                    "lastModifyUid": 4,
                    "code": "test002",
                    "useAccess": false,
                    "ddesc": "",
                    "expiredDate": -2209017600000,
                    "iRev": 1,
                    "sysJson": "",
                    "payrollrela": "nil",
                    "viewCode": "insurAcc",
                    "insurPayer": "emp",
                    "beId": 0,
                    "expired": false,
                    "insurAccCat": 3,
                    "incomecate": "nil",
                    "printCount": 0,
                    "useAccessBl": false,
                    "printSequence": 1,
                    "id": 78,
                    "statusModifyDate": 1652250429000,
                    "locked": false,
                    "desc_en": "测试保险科目",
                    "lastModifyDate": 1652250429000,
                    "createUid": 4,
                    "createDate": 1652250429000,
                    "desc_zh-CN": "",
                    "lastApproveUid": 4,
                    "mandaitem": false,
                    "expiredUid": 0,
                    "useAccessWl": false,
                    "i18nField": "{\"desc_en\": \"测试保险科目\"}",
                    "desc_zh-TW": "",
                    "showzero": false,
                    "useAccessAutoCalc": false,
                    "status": "Y",
                    "desc": "测试保险科目"
                }
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# 保存保险科目

# 接口描述

用于保存保险科目单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/insurAcc
    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: insurAcc
    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/insurAcc";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("insurAcc");
    
        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 格式如下:

    {
        "insuracc": {
            "values": [
                {
                	"id": 78,
                	"code": "test001",
                	"insurAccCat": 3
                }
            ]
        }
    }
    
  4. 返回示例

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

# 删除保险科目

# 接口描述

用于删除指定 ID 的保险科目单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/delete/insurAcc
    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: insurAcc
    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/insurAcc";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("insurAcc");
        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: myClaim ......)
    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("myClaim");
        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": "myClaim",
        "size": 10,
        "stSearchDisplay": "报销记录",
        "values": [
            {
                "code": "18060501",
                "myClaim.empId.employee.code": "18040801",
                "myClaim.empId.employee.desc": "18040801_en",
                "iRev": 3,
                "lastModifyDate": "2018-06-05 15:25:07",
                "myClaim.lastModifyUid.simpleUser.desc__lang": "",
                "id": 75,
                "st_desc": "18060501",
                "st_id": 75,
                "st_code": "18060501"
            },
          {......}
        ]
    }
    

# 新增报销记录

# 接口描述

用于新增报销记录记录

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/myClaim
    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: myClaim
    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/myClaim";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("myClaim");
    
        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 格式如下:

    {
        "myclaim": {
            "values": [
                {
                	"code": "test001",
                    "empId": 49
                }
            ]
        },
        "myclaimt": {
        	"values": [
        		{
        			"claimTypeId": 1,
        			"currency": 2,
        			"paymentDate": "2022-05-11"
        		}
        	]
        }
    }
    
  4. 返回示例

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

# 读取报销记录

# 接口描述

根据 ID 读取报销记录记录详情

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/read/myClaim
    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: myClaim
    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/myClaim";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("myClaim");
        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": {
            "myclaimt": [
                {
                    "date": -2209017600000,
                    "hId": 168,
                    "amount": 0,
                    "claimTypeId": 1,
                    "iRev": 1,
                    "currency": 2,
                    "id": 220,
                    "itemNo": "",
                    "paymentDate": 1652198400000,
                    "desc": ""
                }
            ],
            "myclaim": [
                {
                    "empId": 49,
                    "attachmentNo": 0,
                    "lastModifyUid": 4,
                    "code": "test001",
                    "useAccess": false,
                    "expiredDate": -2209017600000,
                    "iRev": 1,
                    "sysJson": "",
                    "viewCode": "myClaim",
                    "beId": 0,
                    "expired": false,
                    "printCount": 0,
                    "useAccessBl": false,
                    "id": 168,
                    "statusModifyDate": 1652251160000,
                    "locked": false,
                    "lastModifyDate": 1652251160000,
                    "createUid": 4,
                    "createDate": 1652251160000,
                    "lastApproveUid": 0,
                    "expiredUid": 0,
                    "useAccessWl": false,
                    "udftextml": "",
                    "udfvarpay": "",
                    "useAccessAutoCalc": false,
                    "remarks": "",
                    "status": "N"
                }
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# 保存报销记录

# 接口描述

用于保存报销记录单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/myClaim
    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: myClaim
    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/myClaim";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("myClaim");
    
        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 格式如下:

    {
        "myclaim": {
            "values": [
                {
                	"id": 78,
                	"code": "test001"
                }
            ]
        }
    }
    
  4. 返回示例

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

# 删除报销记录

# 接口描述

用于删除指定 ID 的报销记录单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/delete/myClaim
    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: myClaim
    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/myClaim";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("myClaim");
        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: empPayrollInfo ......)
    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("empPayrollInfo");
        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": "empPayrollInfo",
        "size": 10,
        "stSearchDisplay": "员工薪资资料",
        "values": [
            {
                "code": "00002",
                "empPayrollInfo.empId.employee.desc": "00002",
                "empPayrollInfo.empId.employee.dept.dept.desc__lang": "SZO",
                "empPayrollInfo.empId.employee.position.position.desc__lang": "人事部门-简体",
                "iRev": 10,
                "lastModifyDate": "2020-06-23 12:20:50",
                "empPayrollInfo.lastModifyUid.simpleUser.desc__lang": "admin-SC",
                "id": 33518,
                "st_desc": "00002",
                "st_id": 33518,
                "st_code": "00002"
            },
          {......}
        ]
    }
    

# 新增员工薪资资料

新增员工

# 读取员工薪资资料

# 接口描述

根据 ID 读取员工薪资资料记录详情

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/read/empPayrollInfo
    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: empPayrollInfo
    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/empPayrollInfo";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("empPayrollInfo");
        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": {
            "emppacc": [
                {
                    "cur": 1,
                    "udfmltime": "",
                    "allowPtFrom": 0,
                    "udfmlcombo": "",
                    "obsolete": false,
                    "udfmltest": "",
                    "allowPct": 0,
                    "iRev": 2,
                    "itemNo": "",
                    "notPublishToEssp": false,
                    "isAllow": false,
                    "fixPayId": 3,
                    "payUpReasonId": 2,
                    "effDate": 1546272000000,
                    "salaryPt": 0,
                    "udfmlboolean": false,
                    "disabled": false,
                    "id": 453,
                    "udfmldate": -2209017600000,
                    "subFooterRemark": "",
                    "payScaleId": 0,
                    "hId": 168,
                    "amount": 1577,
                    "allowPtTo": 0,
                    "footerRemark": "",
                    "allowPtDiff": 0,
                    "payScaleFooterKey": 0,
                    "amtByPayScale": false,
                    "udfmlnum": 0,
                    "udfmlquery": 0
                }
            ],
            "emppayrollinfo": [
                {......}
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# 保存员工薪资资料

# 接口描述

用于保存员工薪资资料单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/empPayrollInfo
    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: empPayrollInfo
    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/empPayrollInfo";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("empPayrollInfo");
    
        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 格式如下:

    {
        "emppayrollinfo": {
            "values": [
                {
                	"id": 7
                }
            ]
        },
        "empaacc": {
        	"values": [
        		{
        			"varPayId": 1,
        			"cur": 2,
        			"effDate": "2022-05-11"
        		}]
        }
    }
    
  4. 返回示例

    {
        "recordId": 7,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "存在无效数据(empaacc.cur.1)",
                "msgCode": "core_143009"
            }
        ],
        "status": false
    }
    

# 删除员工薪资资料

删除员工

# 员工 IR56 相关资料

# 获取员工 IR56 相关资料单据列表

# 接口描述

用于获取员工 IR56 相关资料单据列表

# 接口调用说明

  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: empIR56Info ......)
    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("empIR56Info");
        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": "empIR56Info",
        "size": 9,
        "stSearchDisplay": "员工IR56相关资料",
        "values": [
            {
                "code": "BT2017102501",
                "empIR56Info.empId.employee.code": "BTEST001",
                "empIR56Info.empId.employee.desc": "迈克尔.乔丹",
                "effDate": "2017-01-01",
                "iRev": 5,
                "lastModifyDate": "2019-01-28 09:48:24",
                "empIR56Info.lastModifyUid.simpleUser.desc__lang": "BT_SC",
                "id": 2,
                "st_desc": "BT2017102501",
                "st_id": 2,
                "st_code": "BT2017102501"
            },
          {......}
        ]
    }
    

# 新增员工 IR56 相关资料

# 接口描述

用于新增员工 IR56 相关资料记录

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/empIR56Info
    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: empIR56Info
    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/empIR56Info";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("empIR56Info");
    
        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 格式如下:

    {
        "empir56info": {
            "values": [
                {
                	"code": "test001",
                    "empId": 49,
                    "effDate": "2022-05-11"
                }
            ]
        }
    }
    
  4. 返回示例

    {
        "recordId": 10,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "已存在该生效日期,不能保存!(empir56info.effDate)",
                "msgCode": "ch01_hklaw_empIR56Info_100001"
            },
            {
                "msgDetail": "编号重复(empir56info.code)",
                "msgCode": "core_101903"
            }
        ],
        "status": false
    }
    

# 读取员工 IR56 相关资料

# 接口描述

根据 ID 读取员工 IR56 相关资料记录详情

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/read/empIR56Info
    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: empIR56Info
    id long (Query) Y 员工 IR56 相关资料单 ID,可参考获取员工 IR56 相关资料单据列表返回的 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/empIR56Info";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("empIR56Info");
        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": {
            "empir56info": [
                {
                    "returnHK": false,
                    "reason": "",
                    "estAmt": 0,
                    "lastModifyUid": 4,
                    "useAccess": false,
                    "sysJson": "",
                    "viewCode": "empIR56Info",
                    "rentPaidEr1": 0,
                    "beId": 0,
                    "naturePayAfterTerm": "NP",
                    "effDate": 1462464000000,
                    "rentPaidToEr1": 0,
                    "rentPaidToEr2": 0,
                    "departOtherReason": "",
                    "useAccessBl": false,
                    "id": 9,
                    "anyMoneyHeld": false,
                    "lastModifyDate": 1633336030000,
                    "createUid": 4,
                    "overseaCo": "",
                    "overseaAdd": "",
                    "withheldAmt": 0,
                    "prinEr": "",
                    "rentRefundEmp2": 0,
                    "rentRefundEmp1": 0,
                    "lastApproveUid": 4,
                    "placeProByEr": false,
                    "grantDate": -2209017600000,
                    ......
                }
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# 保存员工 IR56 相关资料

# 接口描述

用于保存员工 IR56 相关资料单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/empIR56Info
    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: empIR56Info
    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/empIR56Info";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("empIR56Info");
    
        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 格式如下:

    {
        "empir56info": {
            "values": [
                {
                	"id": 10,
                	"code": "test001",
                	"empId": 12,
                	"effDate": "2022-05-12"
                }
            ]
        }
    }
    
  4. 返回示例

    {
        "recordId": 10,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "已批核记录的<员工>无法更改(empir56info.empId)",
                "msgCode": "ch01_hklaw_empIR56Info_100002"
            },
            {
                "msgDetail": "存在无效数据(empir56info.empId)",
                "msgCode": "core_143009"
            }
        ],
        "status": false
    }
    

# 删除员工 IR56 相关资料

# 接口描述

用于删除指定 ID 的员工 IR56 相关资料单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/delete/empIR56Info
    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: empIR56Info
    id long (Query) Y 员工 IR56 相关资料单 ID,可参考获取员工 IR56 相关资料单据列表返回的 ID
  3. 请求示例

    CloseableHttpClient client = HttpClientBuilder.create().build();
    CloseableHttpResponse res = null;
    try {
    
        String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/empIR56Info";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("empIR56Info");
        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: salAdj ......)
    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("salAdj");
        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": "salAdj",
        "size": 8,
        "stSearchDisplay": "薪资调整",
        "values": [
            {
                "code": "AA",
                "desc": "AA",
                "adjType": "annualPayInc",
                "status": "Y",
                "iRev": 1,
                "lastModifyDate": "2020-12-03 12:46:34",
                "salAdj.lastModifyUid.simpleUser.desc__lang": "admin-SC",
                "id": 14,
                "st_desc": "AA",
                "st_id": 14,
                "st_code": "AA"
            },
          {......}
        ]
    }
    

# 新增薪资调整

# 接口描述

用于新增薪资调整记录

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/salAdj
    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: salAdj
    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/salAdj";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("salAdj");
    
        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 格式如下:

    {
        "saladj": {
            "values": [
                {
                	"code": "test001",
                    "desc": "description",
                    "pic": 71010
                }
            ]
        },
        "saladjt": {
        	"values": [
        		{
        			"empId": 49
        		}
        	]
        }
    }
    
  4. 返回示例

    {
        "recordId": 16,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "薪酬调整说明不能重复使用,请更正。",
                "msgCode": "ch01_payscale_salAdj_100002"
            },
            {
                "msgDetail": "编号重复(saladj.code)",
                "msgCode": "core_101903"
            }
        ],
        "status": false
    }
    

# 读取薪资调整

# 接口描述

根据 ID 读取薪资调整记录详情

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/read/salAdj
    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: salAdj
    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/salAdj";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("salAdj");
        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": {
            "saladjt": [
                {
                    "salPt": 6,
                    "empId": 10197,
                    "aiSusPeriodFrom": -2209017600000,
                    "totalAllowAmt": 0,
                    "minPt": 5,
                    "amt": 0.01,
                    "iRev": 1,
                    "itemNo": "     1",
                    "salAmt": 0,
                    "oneOffSalary": 0,
                    "rank": 1,
                    "id": 11,
                    "incPercent": 100,
                    "hId": 15,
                    "totalSalaryAmt": 0,
                    "maxPt": 14,
                    "barPt": -1,
                    "newSalAmt": 0,
                    "oneOffAllow": 0,
                    "increDay": 0,
                    "updateByIncDate": false,
                    "aiSusPeriodTo": -2209017600000,
                    "increYear": 0,
                    "omitPt": "12.0,13.0",
                    "payScale": 2,
                    "newPt": 9,
                    "incExtPt": 3,
                    "remarks": "",
                    "increMth": 0
                }
            ],
            "saladj": [
                {......}
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# 保存薪资调整

# 接口描述

用于保存薪资调整单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/salAdj
    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: salAdj
    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/salAdj";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("salAdj");
    
        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 格式如下:

    {
        "saladj": {
            "values": [
                {
                	"id": 16,
                	"code": "test001",
                    "desc": "description",
                    "adjType": "sal",
                    "effDate": "2022-05-11"
                }
            ]
        }
    }
    
  4. 返回示例

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

# 删除薪资调整

# 接口描述

用于删除指定 ID 的薪资调整单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/delete/salAdj
    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: salAdj
    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/salAdj";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("salAdj");
        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: payCalcSet ......)
    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("payCalcSet");
        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": "payCalcSet",
        "size": 10,
        "stSearchDisplay": "薪资计算",
        "values": [
            {
                "code": "1000_201812-02",
                "desc": "1000_201812",
                "filingYear": 2019,
                "filingMth": 1,
                "payCalcStatus": "calcConfirm",
                "payCalcSet.pic.employee.code": "SZ0001",
                "status": "Y",
                "iRev": 28,
                "lastModifyDate": "2022-01-06 12:12:09",
                "payCalcSet.lastModifyUid.simpleUser.desc__lang": "admin-SC",
                "id": 290,
                "st_desc": "1000_201812",
                "st_id": 290,
                "st_code": "1000_201812-02"
            },
          {......}
        ]
    }
    

# 新增薪资计算

# 接口描述

用于新增薪资计算记录

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/payCalcSet
    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: payCalcSet
    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/payCalcSet";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("payCalcSet");
    
        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 格式如下:

    {
        "paycalcset": {
            "values": [
                {
                	"code": "test001",
                    "desc": "description",
                    "payPeriodStart": "2022-05-01",
                    "payPeriodEnd": "2022-05-31",
                    "attPeriodStart": "2022-05-01",
                    "attPeriodEnd": "2022-05-31",
                    "filingYear": 2022,
                    "pic": 49,
                    "cur": 1
                }
            ]
        }
    }
    
  4. 返回示例

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

# 读取薪资计算

# 接口描述

根据 ID 读取薪资计算记录详情

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/read/payCalcSet
    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: payCalcSet
    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/payCalcSet";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("payCalcSet");
        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": {
            "paycalcsett": [
                {
                    "empId": 14979,
                    "hId": 524,
                    "payCalcRemark": "",
                    "paySlipRemark": "",
                    "iRev": 2,
                    "itemNo": "     1",
                    "dept": 2255,
                    "payrollFormula": 0,
                    "beId": 0,
                    "insur": 0,
                    "salaryTax": 0,
                    "finalPay": false,
                    "id": 94705,
                    "position": 48,
                    "isCalc": false
                },
                {......}
            ],
            "paycalcset": [
                {......}
            ],
            "paycalcsetemphistinfo": [
                {
                    "empId": 14979,
                    "mpfAdjustedDate": -2209017600000,
                    "hId": 524,
                    "mpfTrusteeId": 0,
                    "deptId": 2255,
                    "iRev": 2,
                    "itemNo": "",
                    "mpfTypeId": 0,
                    "mpfAdjustedBy": 0,
                    "beId": 2028,
                    "memberNo": "",
                    "positionId": 48,
                    "mpfFirstDate": -2209017600000,
                    "mpfEffDate": -2209017600000,
                    "mpfAdjusted": false,
                    "id": 108583
                },
                {......}
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# 保存薪资计算

# 接口描述

用于保存薪资计算单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/payCalcSet
    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: payCalcSet
    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/payCalcSet";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("payCalcSet");
    
        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 格式如下:

    {
        "paycalcset": {
            "values": [
                {
                	"id": 525,
                	"code": "test001",
                    "desc": "description",
                    "filingYear": "year",
                    "calcDate": "2022-05-11"
                }
            ]
        },
        "paycalcsett": {
            "values": [
                {
                	"empId": 49
                }
            ]
        }
    }
    
  4. 返回示例

    {
        "recordId": 525,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "错误的数字格式(paycalcset.filingYear)",
                "msgCode": "core_143006"
            },
            {
                "msgDetail": "必填项为空(paycalcset.filingYear)",
                "msgCode": "core_101905"
            }
        ],
        "status": false
    }
    

# 删除薪资计算

# 接口描述

用于删除指定 ID 的薪资计算单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/delete/payCalcSet
    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: payCalcSet
    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/payCalcSet";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("payCalcSet");
        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: backPay ......)
    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("backPay");
        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": "backPay",
        "size": 10,
        "stSearchDisplay": "工资积欠",
        "values": [
            {
                "code": "1000_201812",
                "desc": "1000_201812",
                "backPayStatus": "setConfirm",
                "backPay.pic.employee.code": "SZ0001",
                "status": "Y",
                "iRev": 2,
                "lastModifyDate": "2021-04-06 18:13:48",
                "backPay.lastModifyUid.simpleUser.desc__lang": "admin-SC",
                "id": 82,
                "st_desc": "1000_201812",
                "st_id": 82,
                "st_code": "1000_201812"
            },
          {......}
        ]
    }
    

# 新增工资积欠

# 接口描述

用于新增工资积欠记录

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/backPay
    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: backPay
    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/backPay";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("backPay");
    
        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 格式如下:

    {
        "backpay": {
            "values": [
                {
                	"code": "test001",
                    "desc": "description",
                    "pic": 49
                }
            ]
        }
    }
    
  4. 返回示例

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

# 读取工资积欠

# 接口描述

根据 ID 读取工资积欠记录详情

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/read/backPay
    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: backPay
    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/backPay";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("backPay");
        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": {
            "backpay": [
                {
                    "attachmentNo": 0,
                    "lastModifyUid": 4,
                    "code": "test001",
                    "useAccess": false,
                    "backPayStatus": "open",
                    "iRev": 1,
                    "sysJson": "",
                    "pic": 49,
                    "viewCode": "backPay",
                    "notPublishToEssp": false,
                    "beId": 0,
                    "isConfirm": false,
                    "paymentId": 0,
                    "printCount": 0,
                    "useAccessBl": false,
                    "id": 90,
                    "statusModifyDate": 1652260630000,
                    "lastModifyDate": 1652260630000,
                    "createUid": 4,
                    "createDate": 1652260630000,
                    "lastApproveUid": 4,
                    "useAccessWl": false,
                    "paymentDate": -2209017600000,
                    "useAccessAutoCalc": false,
                    "remarks": "",
                    "status": "Y",
                    "desc": "description"
                }
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# 保存工资积欠

# 接口描述

用于保存工资积欠单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/backPay
    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: backPay
    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/backPay";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("backPay");
    
        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 格式如下:

    {
        "backpay": {
            "values": [
                {
                	"id": 90
                }
            ]
        },
        "backpayt": {
            "values": [
                {
                	"payCalcSetId": 478
                }
            ]
        }
    }
    
  4. 返回示例

    {
        "recordId": 90,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "存在无效数据(backpayt.payCalcSetId.1)",
                "msgCode": "core_143009"
            }
        ],
        "status": false
    }
    

# 删除工资积欠

# 接口描述

用于删除指定 ID 的工资积欠单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/delete/backPay
    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: backPay
    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/backPay";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("backPay");
        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: payment ......)
    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("payment");
        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": "payment",
        "size": 10,
        "stSearchDisplay": "付款单",
        "values": [
            {
                "code": "1",
                "desc": "2",
                "paymentDate": "2018-06-01",
                "paymentStatus": "transfer",
                "payment.pic.employee.code": "CTEST01",
                "status": "Y",
                "iRev": 20,
                "lastModifyDate": "2019-06-06 17:12:26",
                "payment.lastModifyUid.simpleUser.desc__lang": "",
                "id": 14,
                "st_desc": "2",
                "st_id": 14,
                "st_code": "1"
            },
          {......}
        ]
    }
    

# 新增付款单

# 接口描述

用于新增付款单记录

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/payment
    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: payment
    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/payment";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("payment");
    
        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 格式如下:

    {
        "payment": {
            "values": [
                {
                	"code": "test001",
                    "desc": "description",
                    "paymentDate": "2022-05-11",
                    "pic": 49
                }
            ]
        }
    }
    
  4. 返回示例

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

# 读取付款单

# 接口描述

根据 ID 读取付款单记录详情

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/read/payment
    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: payment
    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/payment";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("payment");
        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": {
            "paymentemp": [
                {
                    "empId": 14657,
                    "cur": 6,
                    "hId": 100,
                    "payCalcSetId": 447,
                    "backPayId": 0,
                    "amt": 89000,
                    "iRev": 5,
                    "itemNo": "",
                    "bankAcc": "SZ0001",
                    "beId": 5164,
                    "reference": "",
                    "bank": 2,
                    "payMethod": "autopay",
                    "tranDate": -2209017600000,
                    "id": 1524,
                    "remarks": ""
                },
                {
                    "empId": 14649,
                    "cur": 6,
                    "hId": 100,
                    "payCalcSetId": 447,
                    "backPayId": 0,
                    "amt": 89000,
                    "iRev": 5,
                    "itemNo": "",
                    "bankAcc": "SZ0002",
                    "beId": 2028,
                    "reference": "",
                    "bank": 2,
                    "payMethod": "autopay",
                    "tranDate": -2209017600000,
                    "id": 1525,
                    "remarks": ""
                }
            ],
            "paymentt": [
                {
                    "hId": 100,
                    "payCalcSetId": 447,
                    "backPayId": 0,
                    "iRev": 5,
                    "id": 137,
                    "itemNo": "     1",
                    "payCode": "MLSZ0002-2010",
                    "remarks": "",
                    "backpay": false
                }
            ],
            "payment": [
                {......}
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# 保存付款单

# 接口描述

用于保存付款单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/payment
    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: payment
    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/payment";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("payment");
    
        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 格式如下:

    {
        "payment": {
            "values": [
                {
                	"id": 100
                }
            ]
        },
        "paymentt": {
            "values": [
                {
                	"payCode": 1
                }
            ]
        }
    }
    
  4. 返回示例

    {
        "recordId": 100,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "空值异常",
                "msgCode": "core_130001"
            }
        ],
        "status": false
    }
    

# 删除付款单

# 接口描述

用于删除指定 ID 的付款单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/delete/payment
    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: payment
    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/payment";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("payment");
        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: insur ......)
    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("insur");
        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": "insur",
        "size": 10,
        "stSearchDisplay": "保险资料",
        "values": [
            {
                "code": "INSUR00001",
                "desc__lang": "北京 - 本地城镇",
                "status": "Y",
                "iRev": 2,
                "lastModifyDate": "2017-06-15 15:55:12",
                "insur.lastModifyUid.simpleUser.desc__lang": "",
                "id": 3,
                "st_desc": "北京 - 本地城镇",
                "st_id": 3,
                "st_code": "INSUR00001"
            },
          {......}
        ]
    }
    

# 新增保险资料

# 接口描述

用于新增保险资料记录

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/insur
    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: insur
    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/insur";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("insur");
    
        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 格式如下:

    {
        "insur": {
            "values": [
                {
                	"code": "test001",
                    "desc": "保险资料"
                }
            ]
        }
    }
    
  4. 返回示例

    {
        "recordId": 135,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "<保险地区> + <保险身份> +<生效日期>不能重复使用, 请更正(insur.insurDistrict,insur.insurIdentity,insur.effDate)",
                "msgCode": "ch01_insur_insur_100002"
            },
            {
                "msgDetail": "编号重复(insur.code)",
                "msgCode": "core_101903"
            }
        ],
        "status": false
    }
    

# 读取保险资料

# 接口描述

根据 ID 读取保险资料记录详情

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/read/insur
    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: insur
    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/insur";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("insur");
        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": {
            "insur": [
                {
                    "attachmentNo": 0,
                    "lastModifyUid": 4,
                    "code": "test001",
                    "useAccess": false,
                    "expiredDate": -2209017600000,
                    "iRev": 1,
                    "sysJson": "",
                    "viewCode": "insur",
                    "beId": 0,
                    "effDate": -2209017600000,
                    "expired": false,
                    "insurDistrict": 0,
                    "printCount": 0,
                    "useAccessBl": false,
                    "id": 135,
                    "statusModifyDate": 1652263652000,
                    "locked": false,
                    "desc_en": "保险资料",
                    "lastModifyDate": 1652263652000,
                    "createUid": 4,
                    "createDate": 1652263652000,
                    "desc_zh-CN": "",
                    "lastApproveUid": 4,
                    "udflevel": "",
                    "expiredUid": 0,
                    "useAccessWl": false,
                    "insurIdentity": 0,
                    "i18nField": "{\"desc_en\": \"保险资料\"}",
                    "desc_zh-TW": "",
                    "useAccessAutoCalc": false,
                    "status": "Y",
                    "desc": "保险资料"
                }
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# 保存保险资料

# 接口描述

用于保存保险资料单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/save/insur
    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: insur
    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/insur";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("insur");
    
        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 格式如下:

    {
        "insur": {
            "values": [
                {
                	"id": 135,
                	"effDate": "2022-05-11",
                	"insurDistrict": 2
                }
            ]
        },
        "insurt": {
            "values": [
                {
                	"insurAcc": 41
                }
            ]
        }
    }
    
  4. 返回示例

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

# 删除保险资料

# 接口描述

用于删除指定 ID 的保险资料单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/delete/insur
    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: insur
    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/insur";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("insur");
        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": [
            {
                "E_A_code": "SZ0003",
                "M18ReservedCol_dataIndex": 1,
                "VP_C_code": "F1",
                "VP_A_effDate": "2017/01/01",
                "VP_C_id": "3",
                "MAIN_latest": "否",
                "E_A_id": "14668",
                "MAIN_isCurEffect": "否"
            }
        ]
    }
    

    EMPFIXPAY_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": [
            {
                "E_A_code": "BTEST001",
                "M18ReservedCol_dataIndex": 1,
                "VP_A_effDate": "1901/01/01",
                "VP_C_code": "VP001",
                "VP_B_sym": "A货币",
                "VP_A_amount": "677.0000",
                "VP_C_id": "1",
                "E_A_id": "10127"
            }
        ]
    }
    

    EMPVARPAY_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": [
            {
                "E_A_code": "CTESTHK01",
                "PCR_C_id": "478",
                "PCR_C_code": "CTESTHK2022",
                "MAIN_cur": "HKD",
                "M18ReservedCol_dataIndex": 1,
                "E_A_id": "72474",
                "MAIN_amt": "29,400.00"
            }
        ]
    }
    

    PAYRESULTVAL_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_B_code": "PAYPAR2",
                "T3_B_id": "1",
                "M18ReservedCol_dataIndex": 1,
                "T1_A_id": "70363",
                "T3_A_effDate": "2017/03/01",
                "MAIN_isCurEffect": "否",
                "T1_A_code": "17080801"
            }
        ]
    }
    

    EMPPAYPARA_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": [
            {
                "E_A_code": "SZ0001",
                "MAIN_PAYROLLX_cur": "HKD",
                "P_C_code": "MLT001",
                "M18ReservedCol_dataIndex": 1,
                "P_C_filingYear": "2017",
                "P_C_id": "2",
                "P_C_filingMth": "7月",
                "MAIN_PAYROLLX_desc": "",
                "E_A_id": "14657",
                "MAIN_PAYROLLX_amt": "35,000.00",
                "MAIN_PAYROLLX_repCurAmt": "0.00"
            }
        ]
    }
    

    PAYWAREHOUSE_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_amt_cur": "0.00",
                "M18ReservedCol_dataIndex": 1,
                "MAIN_calcDate": "2018/03/22"
            }
        ]
    }
    

    FINALPAY_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/01/01",
                "MAIN_residue": "是",
                "M18ReservedCol_dataIndex": 1,
                "MAIN_absCeil": "0.00",
                "MAIN_udfresult29": "0.00",
                "T1_A_id": "10127",
                "T2_A_id": "0",
                "T1_A_code": "BTEST001",
                "T2_A_code": ""
            }
        ]
    }
    

    EMPCOSTAMOR_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": "2310",
                "T1_A_desc": "CHAN Siu Ming(Tom)",
                "M18ReservedCol_dataIndex": 1,
                "T2_C_filingYear": "2020",
                "T2_C_accountDate": "2020年10月31日",
                "T2_C_irDate": "2020年10月31日",
                "MAIN_deptDesc": "MKT",
                "T4_A_ceilType": "No",
                "T2_C_code": "PLTEST0438",
                "T1_A_id": "16013",
                "T2_C_filingMth": "OCT",
                "MAIN_percent": "0.00",
                "T1_A_code": "000453"
            }
        ]
    }
    

    PAYROLLAMOR_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": 8,
        "rows": [
            {
                "T1_A_cur_desc__lang": "HKD",
                "M18ReservedCol_dataIndex": 1,
                "T2_A_createDate": "2017/10/07 10:41:41",
                "T1_A_amt": "5,000.0000",
                "MAIN_amtWithRate": "0.0000",
                "T2_A_id": "3",
                "T2_A_code": "T1"
            }
        ]
    }
    

    SALARYPACKAGE_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": [
            {
                "T2_A_itemNo": "",
                "T1_A_effDate": "2017/06/01",
                "T2_A_pParaId": "0",
                "M18ReservedCol_dataIndex": 1,
                "T1_A_insurJoinDate": "",
                "T1_A_id": "3",
                "T2_A_pParaId_code": "",
                "T2_A_pParaId_desc__lang": "",
                "T1_A_code": "T1"
            }
        ]
    }
    

    SALARYPACKPARA_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_isSalRev": "否",
                "MAIN_variance": "0.00",
                "MAIN_currentYear": "2022",
                "M18ReservedCol_dataIndex": 1,
                "MAIN_isProbaPass": "否",
                "T1_A_id": "72474",
                "MAIN_isResign": "否",
                "MAIN_currentMth": "5",
                "MAIN_currentMthAmt": "0.00",
                "MAIN_reason": "其他",
                "T1_A_code": "CTESTHK01"
            }
        ]
    }
    

    MONTHPAYRECON_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_cur_desc__lang": "",
                "T1_A_insurSusDate": "",
                "M18ReservedCol_dataIndex": 1,
                "T1_A_insurJoinDate": "",
                "T1_A_bankAcc": "",
                "T1_A_insurNo": "",
                "T2_A_id": "49",
                "T2_A_code": "00006"
            }
        ]
    }
    

    EMPPAYINFOLIST_EBI

# 员工 IR56 相关资料报告

# 接口描述

用于按照指定 EBI 格式读取 [员工 IR56 相关资料报告] 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": [
            {
                "E_A_code": "SZ0001",
                "EI_A_prinEr": "ddddddddddddddddf",
                "EI_A_reason": "",
                "M18ReservedCol_dataIndex": 1,
                "EI_A_code": "aaaff",
                "E_A_id": "14657",
                "EI_A_id": "1",
                "MAIN_isCurEffect": "是"
            }
        ]
    }
    

    EMPIR56INFO_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": [
            {
                "e_A_id": "70775",
                "empf_A_effDate": "2017/11/20",
                "empf_A_mpfEffDate": "",
                "M18ReservedCol_dataIndex": 1,
                "empf_B_code": "",
                "empf_C_id": "0",
                "empf_B_id": "0",
                "empf_C_code": "",
                "e_A_code": "2018032011"
            }
        ]
    }
    

    EMPMPFINFO_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": 7,
        "rows": [
            {
                "E_A_code": "00004",
                "MAIN_paccId": "21",
                "MAIN_cur": "RMB",
                "MAIN_calcConfirm_status": "否",
                "MAIN_amt_cur": "0.00",
                "M18ReservedCol_dataIndex": 1,
                "MAIN_calcDate": "2017/08/31",
                "E_A_id": "51",
                "MAIN_amt": "0.00"
            }
        ]
    }
    

    PAYRESULTVAL_MPF_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": 2,
        "rows": [
            {
                "BP_E_code": "",
                "M18ReservedCol_dataIndex": 1,
                "MAIN_EEVCX_amt": "0.00",
                "E_A_id": "72339",
                "MAIN_EEMCX_amt": "750.00",
                "BP_E_mpfDate": "",
                "E_A_code": "BTEST38",
                "P_C_mpfDate": "2019/08/31",
                "P_C_code": "BT_PC20190801",
                "P_C_id": "351",
                "BP_E_id": "0",
                "BP_D_code": "",
                "BP_D_id": "0",
                "MAIN_MCRELINCX_amt": "15,000.00"
            }
        ]
    }
    

    PAYWAREHOUSE_MPF_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": [
            {
                "E_A_code": "BTEST009",
                "MAIN_amt_cur": "0.00",
                "MAIN_pay_transferConfirm_status": "否",
                "M18ReservedCol_dataIndex": 1,
                "TERM_A_applyDate": "2019/01/16",
                "MAIN_calcDate": "2018/03/22",
                "E_A_id": "70362",
                "MAIN_source": "薪资计算",
                "MAIN_mpfGenStatus": "否"
            }
        ]
    }
    

    FINALPAY_MPF_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_insurIdentity_desc__lang": "本地城镇",
                "T2_A_insurWithDrawDate": "",
                "M18ReservedCol_dataIndex": 1,
                "T3_A_insurDistrict_desc__lang": "北京",
                "T2_A_insurJoinDate": "2017/11/01",
                "T3_A_desc__lang": "北京 - 本地城镇",
                "T2_A_insurSusDate": "",
                "T4_A_desc__lang": "住房公积金-自提-简体",
                "T3_A_id": "3",
                "T1_A_id": "51",
                "T3_A_effDate": "",
                "T4_A_id": "47",
                "T1_A_code": "00004",
                "T3_A_code": "INSUR00001",
                "T4_A_code": "IACAT0201"
            }
        ]
    }
    

    EMPINSUR_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": 2,
        "rows": [
            {
                "E_A_code": "00004",
                "I_A_insurDistrict_desc__lang": "",
                "P_C_code": "MLT001",
                "M18ReservedCol_dataIndex": 1,
                "P_C_filingYear": "2017",
                "P_C_filingMth": "7月",
                "P_C_id": "2",
                "I_A_insurIdentity_desc__lang": "",
                "E_A_id": "51",
                "MAIN_ir_IACAT0102": "0.00",
                "MAIN_ir_IACAT0101": "0.00"
            }
        ]
    }
    

    INSSUMREP_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_hId": "3",
                "T1_B_effDate": "2021/04/01",
                "M18ReservedCol_dataIndex": 1,
                "T1_C_code": "CTEST01X",
                "T1_A_amt": "12,880.00",
                "T1_C_id": "3",
                "T1_C_cur_desc__lang": "HKD",
                "T1_A_salaryPt": "0.00"
            }
        ]
    }
    

    PAYSCALE_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_minPt": "0.00",
                "MAIN_effDate": "2021/04/01",
                "MAIN_barPt": "-1.00",
                "M18ReservedCol_dataIndex": 1,
                "T1_A_id": "2",
                "T1_A_code": "R1",
                "MAIN_code": "CTEST01X",
                "MAIN_maxPt": "6.00"
            }
        ]
    }
    

    RANK_DETAIL_EBI

# 薪资数据仓库 (NGO)

# 接口描述

用于按照指定 EBI 格式读取 [薪资数据仓库 (NGO)] 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": [
            {
                "E_A_code": "00005",
                "EPI_A_insurJoinDate": "2017/01/01",
                "M18ReservedCol_dataIndex": 1,
                "EPI_A_houseFundAcc": "asdf",
                "BP_D_desc": "",
                "BP_B_salaryTax_code": "",
                "BP_B_salaryTax": "0",
                "E_A_id": "52",
                "BP_D_code": "",
                "BP_D_id": "0"
            }
        ]
    }
    

    PAYWAREHOUSE_NGO_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": [
            {
                "E_A_code": "BTEST004",
                "ERC_A_maxPt": "14.00",
                "M18ReservedCol_dataIndex": 1,
                "ERC_A_barPt": "-1.00",
                "ERC_A_effDate": "2015/06/01",
                "E_A_id": "10197",
                "ERC_D_desc": "",
                "ERC_B_code": "BMPS",
                "ERC_B_id": "2"
            }
        ]
    }
    

    EMPRANKCODE_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_B_amount": "0.00",
                "M18ReservedCol_dataIndex": 1,
                "T1_A_id": "42",
                "T1_A_lastModifyDate": "2018/09/14 09:47:02",
                "T2_A_id": "10183",
                "T2_A_code": "A003",
                "T1_A_code": "AACC_1506337424035"
            }
        ]
    }
    

    CLAIM_EBI