请假管理
# 请假
# 获取请假单据列表
# 接口描述
用于获取请假单据列表
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/search/search HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID stSearch String
(Query)Y Lookup Type. 可在 UDF Lookup 中找到。
(Eg:leaveapp
......)formatId long
(Query)N Lookup Query 中的格式 ID
(若未指定该参数,则使用默认格式)startRow int
(Query)N 返回结果的开始行 endRow int
(Query)N 返回结果的结束行 quickSearchStr String
(Query)N 设定关键字查找数据 请求示例
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("leaveapp"); paramStrBuilder.append("&beId=").append(0L); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(20); 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(); } }
返回示例
{ "stSearch": "leaveapp", "size": 20, "stSearchDisplay": "请假", "values": [ { "leaveapp.empId.employee.code": "00006", "code": "00009", "st_code": "00009", "leaveapp.lastModifyUid.simpleUser.desc__lang": "admin-SC", "st_desc": "00009", "iRev": 2, "dateFrom": "2017-08-09", "leaveapp.empId.employee.dept.dept.desc__lang": "开发部", "st_id": 27, "leaveapp.entitleTypeId.entitletype.desc__lang": "", "dateTo": "2017-08-09", "leaveapp.empId.employee.desc__lang": "00006", "days": 1, "id": 27, "leaveapp.leaveTypeId.leavetype.desc__lang": "无薪假", "lastModifyDate": "2019-12-05 17:47:34", "leaveapp.empId.employee.position.position.desc__lang": "D122", "status": "N" }, {......} ] }
# 新增请假
# 接口描述
用于新增请假记录
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/save/leaveapp HTTP 请求方式 PUT 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:leaveapp
entity String
(Body)Y JSON (可参考请求示例中的相关参数) 请求示例
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/leaveapp"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("leaveapp"); 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 格式如下:
{ "leaveapp": { "values": [ { "empId": 72446, "leaveTypeId": 33, "dateFrom": "2022-03-23", "dateTo": "2022-03-23" } ] }, "leaveappt": { "values": [ { "leaveTypeId": 33, "filingDate": "2022-03-23", "period": "fullDay", "startDate": "2022-03-23", "startTime": "00:00", "endDate": "2022-03-23", "endTime": "23:00", "days": 1.0 } ] } }
返回示例
{ "recordId": 792, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "假勤期不能重叠。", "msgCode": "ch01_leave_leaveapp_100007" } ], "status": false }
# 读取请假
# 接口描述
根据 ID 读取请假记录详情
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/read/leaveapp HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:leaveapp
id long
(Query)Y 请假单 ID,可参考获取请假单据列表返回的 ID iRev long
(Query)N 版本号,用于读取历史记录 / 已删除的记录 请求示例
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/leaveapp"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("leaveapp"); 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(); } }
返回示例
{ "data": { "leaveappt": [ { "cancel": false, "hId": 792, "period": "fullDay", "filingDate": 1647964800000, "endDate": 1647964800000, "iRev": 1, "itemNo": " 1", "leaveCancelId": 0, "udfeee": "", "specifyDate": -2209017600000, "days": 1.0, "startTime": "00:00", "id": 2323, "leaveTypeId": 33, "endTime": "23:00", "cancelReason": "", "grant": false, "startDate": 1647964800000 } ], "leaveapp": [ { "udfint": 0.0, "attachmentNo": 0, "empId": 72446, "reason": "", "lastModifyUid": 4, "code": "LEA220937", "exHold": "inc", "useAccess": false, "exHoldType": "", "udfvvv": "", "iRev": 1, "sysJson": "{\"autoGenCode\":{\"snId\":24,\"code\":\"LEA220937\",\"sn\":\"937\"}}", "udfdecimal": 0.0, "viewCode": "leaveapp", "autoGenFooter": 0, "skipEmpMProfileCheck": 0, "beId": 0, "udfbbb": "", "forceSkipCircle": 0, "udfddd": "", "skipLeaveCircleCheck": 0, "printCount": 0, "Breakdown": "<p>2022/03/23, Annual Leave-English, Full Day, 00:00 - 23:00, 1.0D</p>", "useAccessBl": false, "id": 792, "statusModifyDate": 1648633062000, "lastModifyDate": 1648633062000, "createUid": 4, "exSun": "inc", "BreakdownSc": "<p>2022/03/23, AAL 1, 全日, 00:00 - 23:00, 1.0D</p>", "createDate": 1648633062000, "forceSkipOverApp": 0, "lastApproveUid": 0, "skipOverAppCheck": 0, "udfggg": "", "dateFrom": 1647964800000, "useAccessWl": false, "skipTotalDaysCheck": 0, "udfaaa": "", "exSat": "inc", "udfccc": 0, "entitleTypeId": 19, "dateTo": 1647964800000, "days": 1.0, "leaveTypeId": 33, "useAccessAutoCalc": false, "status": "N", "BreakdownTc": "<p>2022/03/23, Annual Leave-繁体, 全日, 00:00 - 23:00, 1.0D</p>" } ] }, "messages": [], "status": true }
{ "data": {}, "messages": [ { "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限", "msgCode": "core_141019" } ], "status": false }
# 保存请假
# 接口描述
用于保存请假单
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/save/leaveapp HTTP 请求方式 PUT 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:leaveapp
entity String
(Body)Y JSON (可参考请求示例中的相关参数) 请求示例
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/leaveapp"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("leaveapp"); 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 格式如下:
{ "leaveapp": { "values": [ { "id": 792, "empId": 72446, "leaveTypeId": 33, "dateFrom": "2022-03-24", "dateTo": "2022-03-24" } ] }, "leaveappt": { "values": [ { "leaveTypeId": 33, "filingDate": "2022-03-24", "period": "fullDay", "startDate": "2022-03-24", "startTime": "00:00", "endDate": "2022-03-24", "endTime": "23:00", "days": 1.0 } ] } }
返回示例
{ "recordId": 792, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "假勤期不能重叠。", "msgCode": "ch01_leave_leaveapp_100007" } ], "status": false }
# 删除请假
# 接口描述
用于删除指定 ID 的请假单
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/delete/leaveapp HTTP 请求方式 DELETE 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:leaveapp
id long
(Query)Y 请假单 ID,可参考获取请假单据列表返回的 ID 请求示例
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/leaveapp"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("leaveapp"); 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(); } }
返回示例
{ "messages": [], "status": true }
{ "messages": [ { "msgDetail": "单据已被删除", "msgCode": "core_101017" } ], "status": false }
# 销假
# 获取销假单据列表
# 接口描述
用于获取销假单据列表
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/search/search HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID stSearch String
(Query)Y Lookup Type. 可在 UDF Lookup 中找到。
(Eg:leavecancel
......)formatId long
(Query)N Lookup Query 中的格式 ID
(若未指定该参数,则使用默认格式)startRow int
(Query)N 返回结果的开始行 endRow int
(Query)N 返回结果的结束行 quickSearchStr String
(Query)N 设定关键字查找数据 请求示例
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("leavecancel"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(20); 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(); } }
返回示例
{ "stSearch": "leavecancel", "size": 20, "stSearchDisplay": "销假", "values": [ { "code": "17111701", "leavecancel.leaveAppId.leaveapp.code": "LA_1505267023370", "leavecancel.empId.employee.code": "17080801", "leavecancel.empId.employee.desc__lang": "17080801_zh", "leavecancel.empId.employee.dept.dept.desc__lang": "会计部", "leavecancel.empId.employee.position.position.desc__lang": "人事部门-简体", "status": "Y", "iRev": 7, "lastModifyDate": "2021-06-10 09:40:32", "leavecancel.lastModifyUid.simpleUser.desc__lang": "admin-SC", "id": 32, "st_desc": "17111701", "st_id": 32, "st_code": "17111701" }, {......} ] }
# 新增销假
# 接口描述
用于新增销假记录
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/save/leavecancel HTTP 请求方式 PUT 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:leavecancel
entity String
(Body)Y JSON (可参考请求示例中的相关参数) 请求示例
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/leavecancel"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("leavecancel"); 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 格式如下:
{ "leavecancel": { "values": [ { "empId": 52, "leaveAppId": 57 } ] }, "leavecancelt": { "values": [ { "leaveTypeId": 1, "startDate": "2017-09-03", "startTime": "00:00", "endDate": "2017-09-03", "endTime": "23:59", "cancel": "true" } ] } }
返回示例
{ "recordId": 110, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "销假记录已存在", "msgCode": "ch01_leave_leavecancel_100001" } ], "status": false }
# 读取销假
# 接口描述
根据 ID 读取销假记录详情
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/read/leavecancel HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:leavecancel
id long
(Query)Y 销假单 ID,可参考获取销假单据列表返回的 ID iRev long
(Query)N 版本号,用于读取历史记录 / 已删除的记录 请求示例
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/leavecancel"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("leavecancel"); 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(); } }
返回示例
{ "data": { "leavecancelt": [ { "hId": 110, "period": "fullDay", "filingDate": 1504368000000, "endDate": 1504368000000, "leaveAppTId": 135, "iRev": 1, "itemNo": " 1", "specifyDate": 1504368000000, "days": 1, "startTime": "00:00", "id": 258, "leaveTypeId": 1, "endTime": "23:59", "cancelReason": "", "startDate": 1504368000000 } ] }, "messages": [], "status": true }
# 保存销假
# 接口描述
用于保存销假单
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/save/leavecancel HTTP 请求方式 PUT 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:leavecancel
entity String
(Body)Y JSON (可参考请求示例中的相关参数) 请求示例
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/leavecancel"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("leavecancel"); 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 格式如下:
{ "leavecancel": { "values": [ { "id": 111, "empId": 52, "leaveAppId": 59 } ] }, "leavecancelt": { "values": [ { "leaveTypeId": 1, "startDate": "2017-09-03", "startTime": "00:00", "endDate": "2017-09-03", "endTime": "23:59", "cancel": "true", "cancelReason": "the reason of leaveCancel" } ] } }
返回示例
{ "recordId": 111, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "找不到请假明细资料(leavecancelt.startDate.1,leavecancelt.startTime.1,leavecancelt.endDate.1,leavecancelt.endTime.1,leavecancelt.leaveTypeId.1)", "msgCode": "ch01_leave_leavecancel_100004" } ], "status": false }
# 删除销假
# 接口描述
用于删除指定 ID 的销假单
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/delete/leavecancel HTTP 请求方式 DELETE 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:leavecancel
id long
(Query)Y 销假单 ID,可参考获取销假单据列表返回的 ID 请求示例
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/leavecancel"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("leavecancel"); 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(); } }
返回示例
{ "messages": [], "status": true }
{ "messages": [ { "msgDetail": "单据已被删除", "msgCode": "core_101017" } ], "status": false }
# 员工假勤资料
# 获取员工假勤资料单据列表
# 接口描述
用于获取员工假勤资料单据列表
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/search/search HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID stSearch String
(Query)Y Lookup Type. 可在 UDF Lookup 中找到。
(Eg:empleaveEntInfo
......)formatId long
(Query)N Lookup Query 中的格式 ID
(若未指定该参数,则使用默认格式)startRow int
(Query)N 返回结果的开始行 endRow int
(Query)N 返回结果的结束行 quickSearchStr String
(Query)N 设定关键字查找数据 请求示例
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("empleaveEntInfo"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(20); 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(); } }
返回示例
{ "stSearch": "empleaveEntInfo", "size": 20, "stSearchDisplay": "员工假勤资料", "values": [ { "code": "00002", "empleaveEntInfo.empId.employee.desc__lang": "00002", "empleaveEntInfo.empId.employee.dept.dept.desc__lang": "SZO", "empleaveEntInfo.empId.employee.position.position.desc__lang": "人事部门-简体", "iRev": 1, "lastModifyDate": "2019-01-10 15:45:13", "empleaveEntInfo.lastModifyUid.simpleUser.desc__lang": "admin-SC", "id": 93368, "st_desc": "00002", "st_id": 93368, "st_code": "00002" }, {......} ] }
# 新增员工假勤资料
# 新增员工
# 读取员工假勤资料
# 接口描述
根据 ID 读取员工假勤资料记录详情
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/read/empleaveEntInfo HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:empleaveEntInfo
id long
(Query)Y 员工假勤资料单 ID,可参考获取员工假勤资料单据列表返回的 ID iRev long
(Query)N 版本号,用于读取历史记录 / 已删除的记录 请求示例
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/empleaveEntInfo"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("empleaveEntInfo"); 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(); } }
返回示例
{ "data": { "empleavempsetup": [ { "hId": 0, "leaveEntId": 1, "entMasterId": 71010, "iRev": 0, "id": 0, "itemNo": "" }, {......} ] }, "messages": [], "status": true }
# 保存员工假勤资料
# 接口描述
用于保存员工假勤资料单
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/save/empleaveEntInfo HTTP 请求方式 PUT 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:empleaveEntInfo
entity String
(Body)Y JSON (可参考请求示例中的相关参数) 请求示例
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/empleaveEntInfo"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("empleaveEntInfo"); 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 格式如下:
{ "empleaveinfo": { "values": [ { "id": 59824 } ] }, "empleaveent": { "values": [ { "leaveEntId": 7, "entday": 5.0000, "effDate": "2022-04-01", "expDate": "2022-12-31" } ] } }
返回示例
{ "recordId": 59824, "messages": [], "status": true }
# 删除员工假勤资料
# 删除员工
# 补假配假申请
# 获取补假配假申请单据列表
# 接口描述
用于获取补假配假申请单据列表
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/search/search HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID stSearch String
(Query)Y Lookup Type. 可在 UDF Lookup 中找到。
(Eg:compleaveent
......)formatId long
(Query)N Lookup Query 中的格式 ID
(若未指定该参数,则使用默认格式)startRow int
(Query)N 返回结果的开始行 endRow int
(Query)N 返回结果的结束行 quickSearchStr String
(Query)N 设定关键字查找数据 请求示例
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("compleaveent"); 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(); } }
返回示例
{ "stSearch": "compleaveent", "size": 10, "stSearchDisplay": "补假配假申请", "values": [ { "code": "CLE01", "filingDate": "2020-05-08", "compleaveent.empId.employee.code": "CTEST01", "compleaveent.empId.employee.desc__lang": "Calvin Test One-SC", "compleaveent.empId.employee.dept.dept.desc__lang": "TESTHR", "compleaveent.empId.employee.position.position.desc__lang": "", "status": "Y", "iRev": 2, "lastModifyDate": "2021-02-26 15:00:21", "compleaveent.lastModifyUid.simpleUser.desc__lang": "admin-SC", "id": 1, "st_desc": "CLE01", "st_id": 1, "st_code": "CLE01" }, {......} ] }
# 新增补假配假申请
# 接口描述
用于新增补假配假申请记录
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/save/compleaveent HTTP 请求方式 PUT 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:compleaveent
entity String
(Body)Y JSON (可参考请求示例中的相关参数) 请求示例
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/compleaveent"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("compleaveent"); 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 格式如下:
{ "compleaveent": { "values": [ { "code": "0001", "empId": 51, "compleavesetup": 1, "filingDate": "2022-04-07", "startDate": "2022-04-07", "endDate": "2022-04-07", "startTime": "00:00", "endTime": "23:59", "amount": 1.0000 } ] } }
返回示例
{ "recordId": 11, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "编号重复", "msgCode": "core_101903" } ], "status": false }
# 读取补假配假申请
# 接口描述
根据 ID 读取补假配假申请记录详情
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/read/compleaveent HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:compleaveent
id long
(Query)Y 补假配假申请单 ID,可参考获取补假配假申请单据列表返回的 ID iRev long
(Query)N 版本号,用于读取历史记录 / 已删除的记录 请求示例
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/compleaveent"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("compleaveent"); 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(); } }
返回示例
{ "data": { "compleaveent": [ { "cancel": false, "attachmentNo": 0, "empId": 51, "reason": "", "canceledOn": -2209017600000, "lastModifyUid": 4, "code": "0001", "useAccess": false, "filingDate": 1649260800000, "endDate": 1649260800000, "canceledBy": 0, "iRev": 2, "sysJson": "", "viewCode": "compleaveent", "beId": 0, "printCount": 0, "useAccessBl": false, "startTime": "00:00", "id": 11, "statusModifyDate": 1649313221000, "cancelReason": "", "lastModifyDate": 1649313582000, "createUid": 4, "createDate": 1649313221000, "amount": 1, "lastApproveUid": 0, "compleavesetup": 1, "useAccessWl": false, "endTime": "23:59", "useAccessAutoCalc": false, "startDate": 1649260800000, "status": "N" } ] }, "messages": [], "status": true }
# 保存补假配假申请
# 接口描述
用于保存补假配假申请单
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/save/compleaveent HTTP 请求方式 PUT 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:compleaveent
entity String
(Body)Y JSON (可参考请求示例中的相关参数) 请求示例
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/compleaveent"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("compleaveent"); 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 格式如下:
{ "compleaveent": { "values": [ { "id": 12, "code": "0001", "empId": 51, "compleavesetup": 1, "filingDate": "2022-04-07", "startDate": "2022-04-07", "endDate": "2022-04-07", "startTime": "00:00", "endTime": "23:59", "amount": 24.000 } ] } }
返回示例
{ "recordId": 12, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "补假配假的累积结余不能超过5天。(配置 = CLS01)", "msgCode": "ch01_compleave_compleaveent_100004" } ], "status": false }
# 删除补假配假申请
# 接口描述
用于删除指定 ID 的补假配假申请单
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/delete/compleaveent HTTP 请求方式 DELETE 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:compleaveent
id long
(Query)Y 补假配假申请单 ID,可参考获取补假配假申请单据列表返回的 ID 请求示例
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/compleaveent"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("compleaveent"); 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(); } }
返回示例
{ "messages": [], "status": true }
{ "messages": [ { "msgDetail": "单据已被删除", "msgCode": "core_101017" } ], "status": false }
# 工伤
# 获取工伤单据列表
# 接口描述
用于获取工伤单据列表
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/search/search HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID stSearch String
(Query)Y Lookup Type. 可在 UDF Lookup 中找到。
(Eg:workInjuryCase
......)formatId long
(Query)N Lookup Query 中的格式 ID
(若未指定该参数,则使用默认格式)startRow int
(Query)N 返回结果的开始行 endRow int
(Query)N 返回结果的结束行 quickSearchStr String
(Query)N 设定关键字查找数据 请求示例
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("workInjuryCase"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(20); 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(); } }
返回示例
{ "stSearch": "workInjuryCase", "size": 5, "stSearchDisplay": "工伤", "values": [ { "code": "S1", "accDate": "2021-11-10", "workInjuryCase.empId.employee.code": "SZ0001", "workInjuryCase.empId.employee.desc__lang": "封易-简体", "workInjuryCase.empId.employee.dept.dept.desc__lang": "MLTEST", "workInjuryCase.empId.employee.position.position.desc__lang": "D", "status": "Y", "iRev": 20, "lastModifyDate": "2021-12-07 12:49:54", "workInjuryCase.lastModifyUid.simpleUser.desc__lang": "何建(SZ0001)", "id": 7, "st_desc": "S1", "st_id": 7, "st_code": "S1" }, {......} ] }
# 新增工伤
# 接口描述
用于新增工伤记录
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/save/workInjuryCase HTTP 请求方式 PUT 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:workInjuryCase
entity String
(Body)Y JSON (可参考请求示例中的相关参数) 请求示例
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/workInjuryCase"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("workInjuryCase"); 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 格式如下:
{ "workinjurycase": { "values": [ { "empId": 49, "accDate": "2022-04-11", "accReasonId": 1 } ] } }
返回示例
{ "recordId": 15, "messages": [], "status": true }
# 读取工伤
# 接口描述
根据 ID 读取工伤记录详情
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/read/workInjuryCase HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:workInjuryCase
id long
(Query)Y 工伤单 ID,可参考获取工伤单据列表返回的 ID iRev long
(Query)N 版本号,用于读取历史记录 / 已删除的记录 请求示例
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/workInjuryCase"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("workInjuryCase"); 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(); } }
返回示例
{ "data": { "workinjurycompen": [ { "hId": 7, "insurComClaim": 200, "iRev": 20, "remark": "", "id": 17, "itemNo": " 1", "compenType": "perPayment" }, {....} ], [....], "workinjurycase": [ { "attachmentNo": 0, "empId": 14657, "lastModifyUid": 109, "code": "S1", "useAccess": false, "relaClients": true, "closeBy": 0, "iRev": 20, "remark": "<p>DFASDFAS</p>", "sysJson": "", "viewCode": "workInjuryCase", "beId": 0, "closeOn": -2209017600000, "reactBy": 109, "printCount": 0, "useAccessBl": false, "id": 7, "reactOn": 1638806400000, "statusModifyDate": 1637308830000, "lastModifyDate": 1638852594000, "createUid": 4, "createDate": 1637308815000, "lastApproveUid": 4, "accReasonId": 2, "useAccessWl": false, "accDate": 1636473600000, "reactCase": true, "reactReason": "", "docInsurDate": -2209017600000, "useAccessAutoCalc": false, "closeCase": false, "status": "Y" } }, "messages": [], "status": true }
# 保存工伤
# 接口描述
用于保存工伤单
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/save/workInjuryCase HTTP 请求方式 PUT 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:workInjuryCase
entity String
(Body)Y JSON (可参考请求示例中的相关参数) 请求示例
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/workInjuryCase"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("workInjuryCase"); 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 格式如下:
{ "workinjurycase": { "values": [ { "id": 7 } ] }, "workinjurycasemthearn": { "values": [ { "effDate": "2022-04-11", "repMthEarn": "5000.0000" } ] } }
返回示例
{ "recordId": 7, "messages": [], "status": true }
# 删除工伤
# 接口描述
用于删除指定 ID 的工伤单
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/delete/workInjuryCase HTTP 请求方式 DELETE 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:workInjuryCase
id long
(Query)Y 工伤单 ID,可参考获取工伤单据列表返回的 ID 请求示例
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/workInjuryCase"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("workInjuryCase"); 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(); } }
返回示例
{ "messages": [], "status": true }
{ "messages": [ { "msgDetail": "单据已被删除", "msgCode": "core_101017" } ], "status": false }
# 员工法定假日分配资料
# 获取员工法定假日分配资料单据列表
# 接口描述
用于获取员工法定假日分配资料单据列表
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/search/search HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID stSearch String
(Query)Y Lookup Type. 可在 UDF Lookup 中找到。
(Eg:empHolidayEntitleInfo
......)formatId long
(Query)N Lookup Query 中的格式 ID
(若未指定该参数,则使用默认格式)startRow int
(Query)N 返回结果的开始行 endRow int
(Query)N 返回结果的结束行 quickSearchStr String
(Query)N 设定关键字查找数据 请求示例
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("empHolidayEntitleInfo"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(20); 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(); } }
返回示例
{ "stSearch": "empHolidayEntitleInfo", "size": 20, "stSearchDisplay": "员工法定假日分配资料", "values": [ { "code": "", "empHolidayEntitleInfo.empId.employee.desc__lang": "999", "empHolidayEntitleInfo.empId.employee.dept.dept.desc__lang": "1456", "empHolidayEntitleInfo.empId.employee.position.position.desc__lang": "人事部门-简体", "iRev": 1, "lastModifyDate": "2017-09-21 09:27:11", "empHolidayEntitleInfo.lastModifyUid.simpleUser.desc__lang": "", "id": 33095, "st_desc": "", "st_id": 33095, "st_code": "" }, {......} ] }
# 新增员工法定假日分配资料
# 新增员工
# 读取员工法定假日分配资料
# 接口描述
根据 ID 读取员工法定假日分配资料记录详情
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/read/empHolidayEntitleInfo HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:empHolidayEntitleInfo
id long
(Query)Y 员工法定假日分配资料单 ID,可参考获取员工法定假日分配资料单据列表返回的 ID iRev long
(Query)N 版本号,用于读取历史记录 / 已删除的记录 请求示例
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/empHolidayEntitleInfo"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("empHolidayEntitleInfo"); 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(); } }
返回示例
{ "data": { "empholidayinfo": [ { "attachmentNo": 0, "empId": 71010, "lastModifyUid": 4, "code": "00002", "lastApproveUid": 0, "useAccess": false, "udfholnum": 0, "iRev": 1, "sysJson": "", "viewCode": "empHolidayEntitleInfo", "useAccessWl": false, "beId": 0, "printCount": 0, "useAccessBl": false, "id": 33460, "statusModifyDate": 1547106313000, "lastModifyDate": 1547106313000, "useAccessAutoCalc": false, "createUid": 4, "createDate": 1547106313000, "status": "Y" } ], "empholidayyear": [ { "hId": 33460, "year": 2018, "iRev": 1, "id": 33383, "itemNo": "" } ] }, "messages": [], "status": true }
# 保存员工法定假日分配资料
# 接口描述
用于保存员工法定假日分配资料单
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/save/empHolidayEntitleInfo HTTP 请求方式 PUT 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:empHolidayEntitleInfo
entity String
(Body)Y JSON (可参考请求示例中的相关参数) 请求示例
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/empHolidayEntitleInfo"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("empHolidayEntitleInfo"); 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 格式如下:
{ "empholidayinfo": { "values": [ { "id": 33460 } ] }, "empholidayyear": { "values": [ { "year": "2022" } ] } }
返回示例
{ "recordId": 33460, "messages": [], "status": true }
# 删除员工法定假日分配资料
# 删除员工
# 手工调整休息日分配
# 获取手工调整休息日分配单据列表
# 接口描述
用于获取手工调整休息日分配单据列表
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/search/search HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID stSearch String
(Query)Y Lookup Type. 可在 UDF Lookup 中找到。
(Eg:rDAdj
......)formatId long
(Query)N Lookup Query 中的格式 ID
(若未指定该参数,则使用默认格式)startRow int
(Query)N 返回结果的开始行 endRow int
(Query)N 返回结果的结束行 quickSearchStr String
(Query)N 设定关键字查找数据 请求示例
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("rDAdj"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(20); 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(); } }
返回示例
{ "stSearch": "rDAdj", "size": 5, "stSearchDisplay": "手工调整休息日分配", "values": [ { "code": "00005", "effDate": "2017-08-27", "rDAdj.empId.employee.code": "00005", "rDAdj.empId.employee.desc__lang": "00004copy", "rDAdj.empId.employee.dept.dept.desc__lang": "T01-1-1", "rDAdj.empId.employee.position.position.desc__lang": "美工-SC", "status": "Y", "iRev": 2, "lastModifyDate": "2017-09-29 19:51:35", "rDAdj.lastModifyUid.simpleUser.desc__lang": "", "id": 2, "st_desc": "00005", "st_id": 2, "st_code": "00005" }, {......} ] }
# 新增手工调整休息日分配
# 接口描述
用于新增手工调整休息日分配记录
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/save/rDAdj HTTP 请求方式 PUT 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:rDAdj
entity String
(Body)Y JSON (可参考请求示例中的相关参数) 请求示例
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/rDAdj"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("rDAdj"); 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 格式如下:
{ "rdadj": { "values": [ { "code": "001", "empId": 49, "effDate": "2022-04-12", "entDays": 5.0000 } ] } }
返回示例
{ "recordId": 7, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "编号重复(rdadj.code)", "msgCode": "core_101903" } ], "status": false }
# 读取手工调整休息日分配
# 接口描述
根据 ID 读取手工调整休息日分配记录详情
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/read/rDAdj HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:rDAdj
id long
(Query)Y 手工调整休息日分配单 ID,可参考获取手工调整休息日分配单据列表返回的 ID iRev long
(Query)N 版本号,用于读取历史记录 / 已删除的记录 请求示例
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/rDAdj"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("rDAdj"); 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(); } }
返回示例
{ "data": { "rdadj": [ { "attachmentNo": 0, "empId": 49, "lastModifyUid": 4, "code": "001", "useAccess": false, "iRev": 1, "sysJson": "", "viewCode": "rDAdj", "beId": 0, "effDate": 1649692800000, "printCount": 0, "useAccessBl": false, "id": 7, "statusModifyDate": 1649728953000, "lastModifyDate": 1649728953000, "createUid": 4, "entdays": 0, "createDate": 1649728953000, "lastApproveUid": 4, "skipDateCheck": 0, "useAccessWl": false, "rDAdjTypeId": 0, "useAccessAutoCalc": false, "remarks": "", "status": "Y" } ] }, "messages": [], "status": true }
# 保存手工调整休息日分配
# 接口描述
用于保存手工调整休息日分配单
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/save/rDAdj HTTP 请求方式 PUT 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:rDAdj
entity String
(Body)Y JSON (可参考请求示例中的相关参数) 请求示例
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/rDAdj"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("rDAdj"); 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 格式如下:
{ "rdadj": { "values": [ { "id": 7, "entDays": 10.0000, "remarks": "test" } ] } }
返回示例
{ "recordId": 7, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限", "msgCode": "core_141019" } ], "status": false }
# 删除手工调整休息日分配
# 接口描述
用于删除指定 ID 的手工调整休息日分配单
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/delete/rDAdj HTTP 请求方式 DELETE 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:rDAdj
id long
(Query)Y 手工调整休息日分配单 ID,可参考获取手工调整休息日分配单据列表返回的 ID 请求示例
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/rDAdj"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("rDAdj"); 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(); } }
返回示例
{ "messages": [], "status": true }
{ "messages": [ { "msgDetail": "单据已被删除", "msgCode": "core_101017" } ], "status": false }
# 读取 EBI 数据
# 请假 / 销假分析报告
# 接口描述
用于按照指定 EBI 格式读取 [请假 / 销假分析报告] EBI,并返回数据
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID formatId long
(Query)Y 通过 EBI 接口获得 offset int
(Query)N 返回结果的开始行 rows int
(Query)N 返回结果行数 请求示例
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(); } }
返回示例
{ "size": 10, "rows": [ { "employee_A_code": "EMP001", "aiM18ReservedCol_dataIndex": 1, "leaveApp_A_empId": "1682", "leaveCacnel_B_days": "0.0000", "leaveApp_A_days": "1.0000", "employee_A_id": "1682", "leaveApp_A_empId_code": "EMP001" }, ...... ] }
# 员工假勤资料列表
# 接口描述
用于按照指定 EBI 格式读取 [员工假勤资料列表] EBI,并返回数据
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID formatId long
(Query)Y 通过 EBI 接口获得 offset int
(Query)N 返回结果的开始行 rows int
(Query)N 返回结果行数 请求示例
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(); } }
返回示例
{ "size": 10, "rows": [ { "T2_A_joinDate": "2017/02/06", "T2_A_givenName__lang": "", "T2_B_code": "APPPPPPPPPPPPPPPPPPP", "aiM18ReservedCol_dataIndex": 1, "T1_A_id": "26758", "T2_C_positionTypeId_desc__lang": "Position Type 1", "T2_A_employStatus": "在职", "T2_A_id": "49", "T2_B_id": "3", "T1_A_holiday": "排除", "T2_A_code": "00006", "T1_A_code": "00006" }, ...... ] }
# 补假配假申请列表
# 接口描述
用于按照指定 EBI 格式读取 [补假配假申请列表] EBI,并返回数据
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID formatId long
(Query)Y 通过 EBI 接口获得 offset int
(Query)N 返回结果的开始行 rows int
(Query)N 返回结果行数 请求示例
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(); } }
返回示例
{ "size": 10, "rows": [ { "CLE_CLE_empId": "70304", "CLE_CLE_endDate": "2020/05/08", "CLE_CLE_startDate": "2020/05/08", "aiM18ReservedCol_dataIndex": 1, "CLE_CLE_code": "CLE01", "CLE_CLE_empId_desc__lang": "Calvin Test One-SC", "CLE_CLE_amount": "2.9979", "E_B_desc__lang": "TESTHR", "CLE_CLE_id": "1", "CLE_CLE_empId_code": "CTEST01" }, ...... ] }
# 工伤列表
# 接口描述
用于按照指定 EBI 格式读取 [工伤列表] EBI,并返回数据
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID formatId long
(Query)Y 通过 EBI 接口获得 offset int
(Query)N 返回结果的开始行 rows int
(Query)N 返回结果行数 请求示例
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(); } }
返回示例
{ "size": 5, "rows": [ { "T2_C_id": "357", "T2_B_code": "MLTEST", "T1_A_accReasonId": "2", "aiM18ReservedCol_dataIndex": 1, "T2_A_desc__lang": "封易-简体", "T2_A_id": "14657", "T2_B_id": "5164", "T1_A_accDate": "2021/11/10", "T2_C_code": "D", "T1_A_id": "7", "T1_A_accReasonId_code": "BB", "T1_A_code": "S1", "T2_A_code": "SZ0001" }, ...... ] }
# 详细假勤结余分析报告
# 接口描述
用于按照指定 EBI 格式读取 [详细假勤结余分析报告] EBI,并返回数据
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID formatId long
(Query)Y 通过 EBI 接口获得 offset int
(Query)N 返回结果的开始行 rows int
(Query)N 返回结果行数 请求示例
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(); } }
返回示例
{ "size": 3, "rows": [ { "MAIN_e_desc": "年假-简体", "MAIN_leaveEnt": "3.0000", "MAIN_appDays": "0.0000", "MAIN_balAppDays": "3.0000", "aiM18ReservedCol_dataIndex": 1, "MAIN_dateFrom": "2017/02/02", "MAIN_apvDays": "0.0000", "MAIN_balApvDays": "3.0000", "MAIN_dateTo": "2017/05/01" }, { "MAIN_e_desc": "年假-简体", "MAIN_leaveEnt": "1.0000", "MAIN_appDays": "0.0000", "MAIN_balAppDays": "1.0000", "aiM18ReservedCol_dataIndex": 2, "MAIN_dateFrom": "2017/05/02", "MAIN_apvDays": "0.0000", "MAIN_balApvDays": "1.0000", "MAIN_dateTo": "2017/06/30" }, { "MAIN_e_desc": "年假-简体", "MAIN_leaveEnt": "3.0000", "MAIN_appDays": "0.0000", "MAIN_balAppDays": "3.0000", "aiM18ReservedCol_dataIndex": 3, "MAIN_dateFrom": "2017/07/01", "MAIN_apvDays": "0.0000", "MAIN_balApvDays": "3.0000", "MAIN_dateTo": "2017/11/01" } ] }
# 假勤结余分析报告
# 接口描述
用于按照指定 EBI 格式读取 [假勤结余分析报告] EBI,并返回数据
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID formatId long
(Query)Y 通过 EBI 接口获得 offset int
(Query)N 返回结果的开始行 rows int
(Query)N 返回结果行数 请求示例
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(); } }
返回示例
{ "size": 9, "rows": [ { "MAIN_e_desc": "Hong Kong Annual Leave-简体", "MAIN_appDaysExpiry": "13.0000", "MAIN_leaveEnt": "0.0000", "MAIN_balAppDaysFuture": "-13.0000", "aiM18ReservedCol_dataIndex": 1, "MAIN_apvDays": "7.0000", "MAIN_balAppDaysExpiry": "-13.0000", "MAIN_leaveEntExpiry": "0.0000", "MAIN_balApvDays": "-7.0000" }, {......} ] }
# 假勤分配分析报告
# 接口描述
用于按照指定 EBI 格式读取 [假勤分配分析报告] EBI,并返回数据
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID formatId long
(Query)Y 通过 EBI 接口获得 offset int
(Query)N 返回结果的开始行 rows int
(Query)N 返回结果行数 请求示例
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(); } }
返回示例
{ "size": 10, "rows": [ { "T2_A_EntperiodUnit": "自定义", "T2_A_entday": "3.3000", "employee_A_code": "CTEST01", "T2_A_effDate": "2016/01/01", "aiM18ReservedCol_dataIndex": 1, "T2_A_expDate": "2016/12/31", "T2_A_remarks": "", "T2_A_Entperiod": "1", "T1_A_id": "7", "employee_A_id": "70304", "T2_A_leaveEntId_desc__lang": "年假-简体", "T1_A_code": "AL" }, {......} ] }
# 假勤圈列表
# 接口描述
用于按照指定 EBI 格式读取 [假勤圈列表] EBI,并返回数据
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID formatId long
(Query)Y 通过 EBI 接口获得 offset int
(Query)N 返回结果的开始行 rows int
(Query)N 返回结果行数 请求示例
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(); } }
返回示例
{ "size": 2, "rows": [ { "T2_B_code": "17042601", "T2_A_effDate": "2021/01/01", "aiM18ReservedCol_dataIndex": 1, "T2_A_leavecirclecheck": "所有假勤类型", "T2_A_expDate": "9999/12/31", "T1_A_id": "72512", "T2_B_maxLeavePercent": "10.0000", "T2_B_minOndutyNo": "1", "T2_B_id": "6", "T2_B_maxLeaveNo": "10", "T1_A_code": "SZ00010001" }, {......} ] }
# 年假配假政策分析报告
# 接口描述
用于按照指定 EBI 格式读取 [年假配假政策分析报告] EBI,并返回数据
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID formatId long
(Query)Y 通过 EBI 接口获得 offset int
(Query)N 返回结果的开始行 rows int
(Query)N 返回结果行数 请求示例
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(); } }
返回示例
{ "size": 10, "rows": [ { "MAIN_effDate": "2010/01/01", "T1_B_entdays": "0.1000", "T1_A_desc": "est", "T1_B_yrofservice": "0", "T3_A_id": "1", "aiM18ReservedCol_dataIndex": 1, "T1_A_id": "1", "T1_A_code": "test", "T3_A_code": "G1" }, {......} ] }
# 兼任员工假勤设定报告
# 接口描述
用于按照指定 EBI 格式读取 [兼任员工假勤设定报告] EBI,并返回数据
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID formatId long
(Query)Y 通过 EBI 接口获得 offset int
(Query)N 返回结果的开始行 rows int
(Query)N 返回结果行数 请求示例
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(); } }
返回示例
{ "size": 10, "rows": [ { "aiM18ReservedCol_dataIndex": 1, "T1_A_id": "52", "T4_A_id": "52", "T1_A_code": "00005", "T4_A_code": "00005", "MAIN_code": "00005" }, {......} ] }
# 假勤配套列表
# 接口描述
用于按照指定 EBI 格式读取 [假勤配套列表] EBI,并返回数据
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID formatId long
(Query)Y 通过 EBI 接口获得 offset int
(Query)N 返回结果的开始行 rows int
(Query)N 返回结果行数 请求示例
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(); } }
返回示例
{ "size": 10, "rows": [ { "leavePackage_A_id": "2", "leavePackage_A_code": "test1-rename", "aiM18ReservedCol_dataIndex": 1, "MAIN_leaveEntDesc": "Birthday Leave", "MAIN_amto": "06:30:ss", "MAIN_amfrom": "00:00", "MAIN_fulldayfrom": "02:20:ss", "MAIN_fulldayto": "00:00", "leavePackage_A_desc__lang": "test", "T2_A_id": "0", "T2_A_code": "" }, {......} ] }
# 香港法定病假分配报告
# 接口描述
用于按照指定 EBI 格式读取 [香港法定病假分配报告] EBI,并返回数据
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID formatId long
(Query)Y 通过 EBI 接口获得 offset int
(Query)N 返回结果的开始行 rows int
(Query)N 返回结果行数 请求示例
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(); } }
返回示例
{ "size": 10, "rows": [ { "MAIN_ent1": "2.0000", "MAIN_bal2": "0.0000", "MAIN_ent2": "0.0000", "MAIN_bal1": "2.0000", "aiM18ReservedCol_dataIndex": 1, "MAIN_date": "2018/02/01", "T1_A_id": "72149", "MAIN_leaveAppStatus": "", "T2_A_id": "0", "T2_B_days": "0.0000", "T1_A_code": "JTHK001", "T2_A_code": "" }, {......} ] }
# 假日结余分析报告
# 接口描述
用于按照指定 EBI 格式读取 [假日结余分析报告] EBI,并返回数据
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID formatId long
(Query)Y 通过 EBI 接口获得 offset int
(Query)N 返回结果的开始行 rows int
(Query)N 返回结果行数 请求示例
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(); } }
返回示例
{ "size": 10, "rows": [ { "MAIN_dutyDate": "2017/10/01", "MAIN_date1": "2017/01/01", "aiM18ReservedCol_dataIndex": 1, "MAIN_effBal": "0", "T2_A_id": "2", "MAIN_holcalCode": "SH", "MAIN_groBal": "0", "MAIN_year": "2017", "MAIN_dayAfter": "60", "T1_A_id": "70324", "MAIN_isPaid": "否", "MAIN_daybefore": "60", "T1_A_code": "17071901", "T2_A_code": "A", "T3_A_code": "NY" }, {......} ] }
# 休息日结余报告
# 接口描述
用于按照指定 EBI 格式读取 [休息日结余报告] EBI,并返回数据
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID formatId long
(Query)Y 通过 EBI 接口获得 offset int
(Query)N 返回结果的开始行 rows int
(Query)N 返回结果行数 请求示例
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(); } }
返回示例
{ "size": 7, "rows": [ { "MAIN_rdBal": "-2.0000", "MAIN_joinDate": "2017/02/06", "T1_holidayCategoryCode": "", "MAIN_rdUsed": "0.0000", "aiM18ReservedCol_dataIndex": 1, "T1_A_holidayCategoryId": "0", "T1_A_id": "49", "MAIN_balDesc": "开始结余", "MAIN_rdDate": "", "T1_A_code": "00006", "MAIN_rdEarned": "0.0000" }, {......} ] }