# 考勤管理模块

# 临时组班

# 获取临时组班单据列表

# 接口描述

用于获取临时组班单据列表

# 接口调用说明

  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: workgroupassign ......)
    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("workgroupassign");
        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": "workgroupassign",
        "size": 10,
        "stSearchDisplay": "临时组班",
        "values": [
            {
                "code": "111",
                "desc": "22",
                "startDate": "2018-07-10",
                "endDate": "2018-07-10",
                "workgroupassign.personInCharge.employee.code": "00006",
                "workgroupassign.workgroupid.workgroupset.desc__lang": "SDTEST01",
                "status": "Y",
                "iRev": 3,
                "lastModifyDate": "2018-07-10 18:52:25",
                "workgroupassign.lastModifyUid.simpleUser.desc__lang": "",
                "id": 8,
                "st_desc": "22",
                "st_id": 8,
                "st_code": "111"
            },
          {......}
        ]
    }
    

# 新增临时组班

# 接口描述

用于新增临时组班记录

# 接口调用说明

  1. 请求说明

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

    {
        "workgroupassign": {
            "values": [
                {
                    "code": "test001",
                    "desc": "测试临时班组",
                    "startDate": "2022-04-29",
                    "endDate": "2022-10-01",
                    "workgroupid": 12,
                    "personInCharge": 49
                }
            ]
        }
    }
    
  4. 返回示例

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

# 读取临时组班

# 接口描述

根据 ID 读取临时组班记录详情

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/read/workgroupassign
    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: workgroupassign
    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/workgroupassign";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("workgroupassign");
        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": {
            "workgroupassign": [
                {
                    "attachmentNo": 0,
                    "lastModifyUid": 4,
                    "code": "test001",
                    "useAccess": false,
                    "endDate": 1664553600000,
                    "expiredDate": -2209017600000,
                    "iRev": 1,
                    "sysJson": "",
                    "viewCode": "workgroupassign",
                    "beId": 0,
                    "workgroupid": 12,
                    "expired": false,
                    "printCount": 0,
                    "useAccessBl": false,
                    "id": 18,
                    "statusModifyDate": 1651216558000,
                    "locked": false,
                    "desc_en": "测试临时班组",
                    "lastModifyDate": 1651216558000,
                    "createUid": 4,
                    "personInCharge": 49,
                    "createDate": 1651216558000,
                    "desc_zh-CN": "",
                    "lastApproveUid": 4,
                    "expiredUid": 0,
                    "useAccessWl": false,
                    "i18nField": "{\"desc_en\": \"测试临时班组\"}",
                    "overridesEmpShift": true,
                    "desc_zh-TW": "",
                    "useAccessAutoCalc": false,
                    "startDate": 1651161600000,
                    "status": "Y",
                    "desc": "测试临时班组"
                }
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# 保存临时组班

# 接口描述

用于保存临时组班单

# 接口调用说明

  1. 请求说明

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

    {
        "workgroupassign": {
            "values": [
                {
                	"id": 18
                }
            ]
        },
        "workgroupassignt": {
            "values": [
                {
                	"empId": 50
                }
            ]
        }
    }
    
  4. 返回示例

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

# 删除临时组班

# 接口描述

用于删除指定 ID 的临时组班单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/delete/workgroupassign
    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: workgroupassign
    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/workgroupassign";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("workgroupassign");
        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: timeCardRec ......)
    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("timeCardRec");
        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": "timeCardRec",
        "size": 10,
        "stSearchDisplay": "刷卡数据",
        "values": [
            {
                "code": "00006MLTEST",
                "tcDate": "2020-03-20",
                "tcTime": "12:00:01",
                "timeCardRec.empId.employee.code": "00006",
                "timeCardRec.empId.employee.desc": "00006",
                "timeCardRec.empId.employee.dept.dept.desc__lang": "开发部",
                "timeCardRec.empId.employee.position.position.desc__lang": "D122",
                "status": "Y",
                "iRev": 1,
                "lastModifyDate": "2020-03-09 12:55:36",
                "timeCardRec.lastModifyUid.simpleUser.desc__lang": "admin-SC",
                "id": 12655,
                "st_desc": "00006MLTEST",
                "st_id": 12655,
                "st_code": "00006MLTEST"
            },
          {......}
        ]
    }
    

# 新增刷卡数据

# 接口描述

用于新增刷卡数据记录

# 接口调用说明

  1. 请求说明

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

    {
        "timecardrec": {
            "values": [
                {
                    "empId": 49,
                    "tcDate": "2022-05-05",
                    "tcTime": "09:01:09"
                }
            ]
        }
    }
    
  4. 返回示例

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

# 读取刷卡数据

# 接口描述

根据 ID 读取刷卡数据记录详情

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/read/timeCardRec
    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: timeCardRec
    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/timeCardRec";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("timeCardRec");
        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": {
            "timecardrec": [
                {
                    "empId": 70304,
                    "attachmentNo": 0,
                    "fileName": "CH01C10917A - sample excel.xlsx",
                    "lastModifyUid": 4,
                    "code": "T_211004114548276922",
                    "tcType": 8,
                    "useAccess": false,
                    "expiredDate": -2209017600000,
                    "iRev": 1,
                    "sysJson": "",
                    "viewCode": "",
                    "udfboolean": false,
                    "beId": 0,
                    "udfnumber": 0,
                    "tcTime": "15:28:21",
                    "expired": false,
                    "printCount": 0,
                    "useAccessBl": false,
                    "id": 12712,
                    "udfCalvinTest": "",
                    "statusModifyDate": 1633319148000,
                    "locked": false,
                    "lastModifyDate": 1633319148000,
                    "createUid": 4,
                    "createDate": 1633319148000,
                    "lastApproveUid": 0,
                    "expiredUid": 0,
                    "tcdsId": 0,
                    "useAccessWl": false,
                    "timeClockId": 0,
                    "schJobId": 3,
                    "tcDate": 1629302400000,
                    "useAccessAutoCalc": false,
                    "remarks": "",
                    "status": "Y"
                }
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# 保存刷卡数据

# 接口描述

用于保存刷卡数据单

# 接口调用说明

  1. 请求说明

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

    {
        "timecardrec": {
            "values": [
                {
                	"id": 12655,
                	"code": "00006MLTEST",
                	"tcTime": "09:00",
                	"timeClockId": 2
                }
            ]
        }
    }
    
  4. 返回示例

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

# 删除刷卡数据

# 接口描述

用于删除指定 ID 的刷卡数据单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/delete/timeCardRec
    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: timeCardRec
    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/timeCardRec";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("timeCardRec");
        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: emproster ......)
    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("emproster");
        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": "emproster",
        "size": 10,
        "stSearchDisplay": "员工排班",
        "values": [
            {
                "emproster.empId.employee.code": "Z00008",
                "dutydate": "2017-09-05",
                "iRev": 22,
                "lastModifyDate": "2021-04-14 14:05:03",
                "emproster.lastModifyUid.simpleUser.desc__lang": "admin-SC",
                "id": 14,
                "st_id": 14
            },
          {......}
        ]
    }
    

# 新增员工排班详细

# 接口描述

用于新增员工排班详细记录

# 接口调用说明

  1. 请求说明

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

    {
        "emproster": {
            "values": [
                {
                    "empId": 49,
                    "dutydate": "2022/05/05"
                }
            ]
        }
    }
    
  4. 返回示例

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

# 读取员工排班详细

# 接口描述

根据 ID 读取员工排班详细记录详情

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/read/emproster
    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: emproster
    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/emproster";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("emproster");
        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": {
            "emprostershift": [
                {
                    "shiftId": 7,
                    "hId": 100,
                    "hours": 8,
                    "busUnit": 1,
                    "color": "#e6f41b",
                    "udfTime": "",
                    "iRev": 1,
                    "itemNo": "",
                    "workSite": 5,
                    "udfdate": -2209017600000,
                    "udftrip": "",
                    "i18nField": "{\"desc_en\": \"MLTEST班别说明\"}",
                    "udffield": "",
                    "desc_zh-TW": "",
                    "overwriteLogPt": false,
                    "id": 105,
                    "desc_en": "MLTEST班别说明",
                    "desc": "MLTEST班别说明",
                    "desc_zh-CN": ""
                }
            ],
            "emproster": [
                {
                    "attachmentNo": 0,
                    "empId": 14645,
                    "lastModifyUid": 4,
                    "lastApproveUid": 0,
                    "iRev": 1,
                    "sysJson": "",
                    "viewCode": "",
                    "beId": 0,
                    "dayType": "nil",
                    "printCount": 0,
                    "id": 100,
                    "statusModifyDate": 1511333049000,
                    "dutydate": 1509552000000,
                    "lastModifyDate": 1511333049000,
                    "createUid": 4,
                    "createDate": 1511333049000,
                    "status": "Y",
                    "holidayId": 0
                }
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# 保存员工排班详细

# 接口描述

用于保存员工排班详细单

# 接口调用说明

  1. 请求说明

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

    {
        "emproster": {
            "values": [
                {
                	"id": 14
                }
            ]
        },
        "emprostershift": {
            "values": [
                {
                	"shiftId": 6,
                	"hours": 7.5,
                	"recognSetId": 2
                }
            ]
        }
    }
    
  4. 返回示例

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

# 删除员工排班详细

# 接口描述

用于删除指定 ID 的员工排班详细单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/delete/emproster
    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: emproster
    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/emproster";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("emproster");
        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: wkgproster ......)
    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("wkgproster");
        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": "wkgproster",
        "size": 10,
        "stSearchDisplay": "ch01_att.wkgpRoster",
        "values": [
            {
                "wkgproster.workgroupid.workgroupset.code": "T2",
                "dutydate": "2017-09-14",
                "iRev": 4,
                "lastModifyDate": "2017-09-13 14:45:21",
                "wkgproster.lastModifyUid.simpleUser.desc__lang": "admin-SC",
                "id": 9,
                "st_id": 9
            },
          {......}
        ]
    }
    

# 新增班组排班详细

# 接口描述

用于新增班组排班详细记录

# 接口调用说明

  1. 请求说明

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

    {
        "wkgproster": {
            "values": [
                {
                    "workgroupid": 8,
                    "dutydate": "2022/05/05"
                }
            ]
        }
    }
    
  4. 返回示例

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

# 读取班组排班详细

# 接口描述

根据 ID 读取班组排班详细记录详情

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/read/wkgproster
    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: wkgproster
    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/wkgproster";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("wkgproster");
        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": {
            "wkgprostershift": [
                {
                    "shiftId": 6,
                    "hId": 81,
                    "hours": 8,
                    "busUnit": 1,
                    "color": "#2c80f7",
                    "udfTime": "",
                    "iRev": 2,
                    "itemNo": "",
                    "workSite": 5,
                    "udfdate": -2209017600000,
                    "udftrip": "",
                    "i18nField": "{\"desc_en\": \"AAA班别说明\"}",
                    "udffield": "",
                    "desc_zh-TW": "",
                    "overwriteLogPt": false,
                    "id": 98,
                    "desc_en": "AAA班别说明",
                    "desc": "AAA班别说明",
                    "desc_zh-CN": ""
                }
            ],
            "wkgproster": [
                {
                    "attachmentNo": 0,
                    "lastModifyUid": 71,
                    "lastApproveUid": 0,
                    "iRev": 2,
                    "sysJson": "",
                    "viewCode": "wkgprostermod",
                    "beId": 0,
                    "dayType": "nil",
                    "workgroupid": 10,
                    "printCount": 0,
                    "id": 81,
                    "statusModifyDate": 1523155914000,
                    "dutydate": 1524499200000,
                    "lastModifyDate": 1523155935000,
                    "createUid": 71,
                    "createDate": 1523155914000,
                    "status": "Y",
                    "holidayId": 0
                }
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# 保存班组排班详细

# 接口描述

用于保存班组排班详细单

# 接口调用说明

  1. 请求说明

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

    {
        "wkgproster": {
            "values": [
                {
                	"id": 81
                }
            ]
        },
        "wkgprostershift": {
            "values": [
                {
                	"shiftId": 6,
                	"hours": 7.5,
                	"recognSetId": 2
                }
            ]
        }
    }
    
  4. 返回示例

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

# 删除班组排班详细

# 接口描述

用于删除指定 ID 的班组排班详细单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/delete/wkgproster
    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: wkgproster
    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/wkgproster";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("wkgproster");
        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: otApp ......)
    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("otApp");
        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": "otApp",
        "size": 10,
        "stSearchDisplay": "加班申请记录",
        "values": [
            {
                "code": "2020-08-11",
                "filingDate": "2020-08-11",
                "otApp.empId.employee.code": "D11111",
                "otApp.empId.employee.desc": "DT006",
                "otApp.empId.employee.dept.dept.desc__lang": "1455-EN",
                "otApp.empId.employee.position.position.desc__lang": "出勤员_cn",
                "status": "Y",
                "iRev": 5,
                "lastModifyDate": "2021-12-16 12:26:53",
                "otApp.lastModifyUid.simpleUser.desc__lang": "admin-SC",
                "id": 125,
                "st_desc": "2020-08-11",
                "st_id": 125,
                "st_code": "2020-08-11"
            },
          {......}
        ]
    }
    

# 新增加班申请记录

# 接口描述

用于新增加班申请记录记录

# 接口调用说明

  1. 请求说明

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

    {
        "otapp": {
            "values": [
                {
                	"code": "testOtApp",
                    "empId": 49,
                    "startDate": "2022-05-05",
                    "endDate": "2022-05-05",
                    "startTime": "16:00",
                    "endTime": "18:00",
                    "filingDate": "2022-05-05",
                    "otMins": 120.00
                }
            ]
        }
    }
    
  4. 返回示例

    {
        "recordId": 136,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "输入的加班记录时间重叠",
                "msgCode": "ch01_att_otApp_100002"
            }
        ],
        "status": false
    }
    

# 读取加班申请记录

# 接口描述

根据 ID 读取加班申请记录记录详情

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/read/otApp
    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: otApp
    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/otApp";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("otApp");
        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": {
            "otapp": [
                {
                    "attachmentNo": 0,
                    "empId": 14657,
                    "reason": "",
                    "lastModifyUid": 109,
                    "code": "OT004",
                    "useAccess": false,
                    "udfmlmul_en": "",
                    "filingDate": 1504627200000,
                    "endDate": 1504627200000,
                    "iRev": 6,
                    "sysJson": "",
                    "viewCode": "otApp",
                    "beId": 0,
                    "udfmlmul_zh-TW": "",
                    "otTypeId": 0,
                    "otMins": 120,
                    "printCount": 0,
                    "useAccessBl": false,
                    "startTime": "18:00",
                    "id": 12,
                    "statusModifyDate": 1542073872000,
                    "udfmldate": -2209017600000,
                    "lastModifyDate": 1542073872000,
                    "createUid": 109,
                    "createDate": 1505354614000,
                    "udfmltext": "",
                    "lastApproveUid": 109,
                    "udfTotalHours": 0,
                    "udfmlnum": 0,
                    "useAccessWl": false,
                    "i18nField": "",
                    "udfmlmul": "",
                    "udfmlmul_zh-CN": "",
                    "endTime": "20:00",
                    "useAccessAutoCalc": false,
                    "startDate": 1504627200000,
                    "status": "R"
                }
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# 保存加班申请记录

# 接口描述

用于保存加班申请记录单

# 接口调用说明

  1. 请求说明

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

    {
        "otapp": {
            "values": [
                {
                	"id": 135,
                	"startDate": "2022-05-06",
                	"endDate": "2022-05-07"
                }
            ]
        }
    }
    
  4. 返回示例

    {
        "recordId": 135,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "开始日期+开始时间必须早于结束日期+结束时间",
                "msgCode": "ch01_att_otApp_100001"
            }
        ],
        "status": false
    }
    

# 删除加班申请记录

# 接口描述

用于删除指定 ID 的加班申请记录单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/delete/otApp
    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: otApp
    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/otApp";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("otApp");
        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: workAttSum ......)
    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("workAttSum");
        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": "workAttSum",
        "size": 10,
        "stSearchDisplay": "考勤汇总",
        "values": [
            {
                "code": "17111501",
                "dateFrom": "2017-10-06",
                "dateTo": "2017-10-06",
                "workAttSum.empId.employee.code": "17111001",
                "status": "Y",
                "iRev": 13,
                "lastModifyDate": "2018-07-10 12:25:51",
                "workAttSum.lastModifyUid.simpleUser.desc__lang": "admin-SC",
                "id": 16,
                "st_desc": "17111501",
                "st_id": 16,
                "st_code": "17111501"
            },
          {......}
        ]
    }
    

# 新增考勤汇总

# 接口描述

用于新增考勤汇总记录

# 接口调用说明

  1. 请求说明

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

    {
        "workattsum": {
            "values": [
                {
                	"code": "testworkAttSum",
                    "desc": "desctest",
                    "dateFrom": "2022-05-05",
                    "dateTo": "2022-05-05",
                    "empId": 49
                }
            ]
        }
    }
    
  4. 返回示例

    {
        "recordId": 124,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "错误的日期,日期由不能晚于日期至",
                "msgCode": "ch01_emp_workAttSum_100002"
            },
            {
                "msgDetail": "编号重复(workattsum.code)",
                "msgCode": "core_101903"
            }
        ],
        "status": false
    }
    

# 读取考勤汇总

# 接口描述

根据 ID 读取考勤汇总记录详情

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/read/workAttSum
    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: workAttSum
    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/workAttSum";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("workAttSum");
        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": {
            "workattsum": [
                {
                    "attachmentNo": 0,
                    "tDate": -2209017600000,
                    "empId": 49,
                    "lastModifyUid": 4,
                    "code": "testworkAttSum",
                    "useAccess": false,
                    "udfmmtest": "",
                    "iRev": 1,
                    "sysJson": "",
                    "udfmmtest_zh-TW": "",
                    "viewCode": "workAttSum",
                    "beId": 0,
                    "printCount": 0,
                    "useAccessBl": false,
                    "otToLeaveId": 0,
                    "id": 124,
                    "statusModifyDate": 1651743247000,
                    "desc_en": "desctest",
                    "lastModifyDate": 1651743247000,
                    "createUid": 4,
                    "createDate": 1651743247000,
                    "desc_zh-CN": "",
                    "costAmortEffDate": -2209017600000,
                    "lastApproveUid": 4,
                    "otlMonthDay": "",
                    "groupResultBy": "day",
                    "dateFrom": 1651680000000,
                    "useAccessWl": false,
                    "udfmmtest_zh-CN": "",
                    "i18nField": "{\"desc_en\": \"desctest\", \"udfmmtest_en\": \"\"}",
                    "desc_zh-TW": "",
                    "dateTo": 1651680000000,
                    "udfmmtest_en": "",
                    "useAccessAutoCalc": false,
                    "status": "Y",
                    "desc": "desctest"
                }
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# 保存考勤汇总

# 接口描述

用于保存考勤汇总单

# 接口调用说明

  1. 请求说明

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

    {
        "workattsum": {
            "values": [
                {
                	"id": 124
                }
            ]
        },
        "workattsumt": {
            "values": [
                {
                	"empId": 49,
                	"date": "2022-05-05"
                }
            ]
        }
    }
    
  4. 返回示例

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

# 删除考勤汇总

# 接口描述

用于删除指定 ID 的考勤汇总单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/delete/workAttSum
    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: workAttSum
    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/workAttSum";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("workAttSum");
        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: otToLeave ......)
    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("otToLeave");
        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": "otToLeave",
        "size": 10,
        "stSearchDisplay": "加班转调休",
        "values": [
            {
                "code": "17092201",
                "dateFrom": "2017-09-03",
                "dateTo": "2017-09-04",
                "otToLeave.pic.employee.code": "17080801",
                "status": "Y",
                "iRev": 9,
                "lastModifyDate": "2018-10-09 10:52:16",
                "otToLeave.lastModifyUid.simpleUser.desc__lang": "BT_SC",
                "id": 2,
                "st_desc": "17092201",
                "st_id": 2,
                "st_code": "17092201"
            },
          {......}
        ]
    }
    

# 新增加班转调休

# 接口描述

用于新增加班转调休记录

# 接口调用说明

  1. 请求说明

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

    {
        "ottoleave": {
            "values": [
                {
                	"code": "testotToLeave",
                    "dateFrom": "2022-05-05",
                    "dateTo": "2022-05-05",
                    "pic": 49,
                    "entitleTypeId": 2
                }
            ]
        }
    }
    
  4. 返回示例

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

# 读取加班转调休

# 接口描述

根据 ID 读取加班转调休记录详情

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/read/otToLeave
    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: otToLeave
    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/otToLeave";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("otToLeave");
        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": {
            "ottoleave": [
                {
                    "attachmentNo": 0,
                    "lastModifyUid": 4,
                    "code": "testotToLeave",
                    "useAccess": false,
                    "otToLeaveFormula": "",
                    "iRev": 1,
                    "sysJson": "",
                    "pic": 49,
                    "entEffPeriod": "fixedPeriod",
                    "viewCode": "otToLeave",
                    "otlSettingId": 0,
                    "dateTo1": -2209017600000,
                    "beId": 0,
                    "printCount": 0,
                    "useAccessBl": false,
                    "id": 27,
                    "statusModifyDate": 1651805688000,
                    "lastModifyDate": 1651805688000,
                    "createUid": 4,
                    "createDate": 1651805688000,
                    "lastApproveUid": 0,
                    "empFilter": "",
                    "afterOtNum": 1,
                    "dateFrom": 1651680000000,
                    "useAccessWl": false,
                    "otResultGroupBy": "day",
                    "dateFrom1": -2209017600000,
                    "otFilingDate": -2209017600000,
                    "otlStatus": "open",
                    "afterOtCombo": "month",
                    "entitleTypeId": 2,
                    "dateTo": 1651680000000,
                    "useAccessAutoCalc": false,
                    "status": "N"
                }
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# 保存加班转调休

# 接口描述

用于保存加班转调休单

# 接口调用说明

  1. 请求说明

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

    {
        "ottoleave": {
            "values": [
                {
                	"id": 27,
                	"startDate": "2022-05-06",
                	"endDate": "2022-05-07"
                }
            ]
        }
    }
    
  4. 返回示例

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

# 删除加班转调休

# 接口描述

用于删除指定 ID 的加班转调休单

# 接口调用说明

  1. 请求说明

    URL http://[server]/jsf/rfws/root/api/delete/otToLeave
    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: otToLeave
    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/otToLeave";
    
        StringBuilder paramStrBuilder = new StringBuilder();
        paramStrBuilder.append("&menuCode=").append("otToLeave");
        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": 1,
        "rows": [
            {
                "E_A_code": "SZ0001",
                "MAIN_dutyDate": "2018/05/01",
                "MAIN_shiftDesc": "手动排班白班(修改后)",
                "MAIN_attResult": "加班时间-简体",
                "M18ReservedCol_dataIndex": 1,
                "MAIN_shiftSource": "员工排班",
                "MAIN_otToLeaveNo": "",
                "MAIN_workGroupDesc": "",
                "MAIN_attRegula": "加班-班后第二卡",
                "MAIN_workAttSumNo": "",
                "E_A_id": "14657"
            }
        ]
    }
    

    ATTRESULT_EBI

# 简要考勤结果报告

# 接口描述

用于按照指定 EBI 格式读取 [简要考勤结果报告] EBI,并返回数据

# 接口调用说明

  1. 请求说明

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

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

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

    {
        "size": 4,
        "rows": [
            {
                "MAIN_dutyDate": "2018/05/01",
                "M18ReservedCol_dataIndex": 1,
                "MAIN_code": "SZ0002"
            },
            {
                "MAIN_dutyDate": "2018/05/02",
                "M18ReservedCol_dataIndex": 2,
                "MAIN_code": "SZ0002"
            },
            {
                "MAIN_dutyDate": "2018/05/03",
                "M18ReservedCol_dataIndex": 3,
                "MAIN_code": "SZ0002"
            },
            {
                "MAIN_dutyDate": "2018/05/04",
                "M18ReservedCol_dataIndex": 4,
                "MAIN_code": "SZ0002"
            }
        ]
    }
    

    BRIEFATTRESULT_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": [
            {
                "E_A_code": "SZ0001",
                "MAIN_shiftCode": "MATCHOT",
                "MAIN_dutyDate": "2021/01/16",
                "MAIN_ar_NOCARD": "0",
                "M18ReservedCol_dataIndex": 1,
                "MAIN_logPoint2": "2021/01/16 17:00:00",
                "MAIN_ar_NOCAR02": "0",
                "MAIN_logPoint1": "2021/01/16 00:00:00",
                "MAIN_actLogPoint2": "2021/01/16 21:00:00",
                "MAIN_actLogPoint1": "",
                "E_A_id": "14657",
                "MAIN_ar_MLNOCARD": "0.0"
            },
            ......
        ]
    }
    

    DETAILATTREP_EBI

# 考勤汇总报告

# 接口描述

用于按照指定 EBI 格式读取 [考勤汇总报告] EBI,并返回数据

# 接口调用说明

  1. 请求说明

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

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

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

    {
        "size": 4,
        "rows": [
            {
                "M18ReservedCol_dataIndex": 1,
                "T1_A_id": "14657",
                "MAIN_udfAttRus6": "0",
                "MAIN_udfAttRus5": "12",
                "MAIN_udfAttRus4": "10",
                "T1_A_code": "SZ0001"
            },
            ......
        ]
    }
    

    ATTSUMMARY_EBI

# 刷卡报告

# 接口描述

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

# 接口调用说明

  1. 请求说明

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

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

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

    {
        "size": 10,
        "rows": [
            {
                "T_T_remarks": "",
                "T_T_tcType": "手工补卡",
                "MF_A_id": "70303",
                "T_T_tcDate": "2017/07/12",
                "M18ReservedCol_dataIndex": 1,
                "T_T_tcTime": "08:00:00",
                "MF_A_code": "17062201"
            },
            ......
        ]
    }
    

    TIMECARDREC_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_leaveEntTo": "",
                "M18ReservedCol_dataIndex": 1,
                "T1_A_id": "14657",
                "MAIN_otResultGroupBy": "日",
                "MAIN_leaveEntFrom": "",
                "MAIN_otTakenDate": "2017/09/01",
                "MAIN_adjEntDay": "0.0000",
                "MAIN_code": "TT",
                "T1_A_code": "SZ0001"
            },
            ......
        ]
    }
    

    OTTOLEAVE_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": [
            {
                "M18ReservedCol_dataIndex": 1,
                "MAIN_hol": "N",
                "MAIN_tcDate": "2021/03/25",
                "MAIN_shift": "N",
                "MAIN_rest": "N",
                "T1_A_id": "70304",
                "MAIN_tcTime": "00:01:00",
                "MAIN_lea": "N",
                "T1_A_code": "CTEST01",
                "MAIN_code": "T_210325174050346146"
            },
            ......
        ]
    }
    

    UNEXP_TIMECARD_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_attRegulaTypeDesc": "缺勤",
                "MAIN_A_code": "aa",
                "MAIN_A_id": "4",
                "MAIN_F_id": "5",
                "MAIN_E_id": "2",
                "M18ReservedCol_dataIndex": 1,
                "MAIN_F_code": "NOCAR02",
                "MAIN_E_code": "NOCAR01",
                "MAIN_A_desc__lang": "aa班别说明"
            },
            ......
        ]
    }
    

    SHIFTREGULA_EBI

# 班别及刷卡时间列表

# 接口描述

用于按照指定 EBI 格式读取 [班别及刷卡时间列表] EBI,并返回数据

# 接口调用说明

  1. 请求说明

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

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

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

    {
        "size": 10,
        "rows": [
            {
                "T2_A_reqLogPoint": "21:00",
                "T3_A_id": "1",
                "M18ReservedCol_dataIndex": 1,
                "T1_A_id": "4",
                "T3_A_minRange": "60",
                "T3_A_maxRange": "60",
                "T2_A_reqLogPointDesc": "",
                "T1_A_code": "aa",
                "T3_A_code": "LOG1"
            },
            ......
        ]
    }
    

    SHIFTSET_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_dutyDate": "2022/05/01",
                "T1_workGroupCode": "",
                "MAIN_shifts": "",
                "MAIN_holiday": "否",
                "M18ReservedCol_dataIndex": 1,
                "T1_A_workGroupId": "0",
                "MAIN_shiftSource": "--",
                "MAIN_restDay": "否",
                "T1_A_id": "49",
                "MAIN_leaveApps": "",
                "T1_A_code": "00006"
            },
            ......
        ]
    }
    

    ROSTERLIST_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_startTime": "00:00",
                "T1_A_endDate": "2017/08/01",
                "M18ReservedCol_dataIndex": 1,
                "T1_A_startDate": "2017/08/01",
                "T1_A_id": "1",
                "T1_A_otMins": "1,439.00",
                "T1_A_endTime": "23:59",
                "T2_A_id": "70593",
                "T2_A_code": "17082103",
                "T1_A_code": "BBB"
            },
            ......
        ]
    }
    

    OTAPP_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": 1,
        "rows": [
            {
                "MAIN_dutyDate": "2021/09/07",
                "MAIN_shiftSourceDesc": "员工排班",
                "MAIN_shiftDesc": "临时班组白班",
                "MAIN_logPoint4": "2021-09-07 18:00:00",
                "M18ReservedCol_dataIndex": 1,
                "MAIN_logPoint2": "2021-09-07 13:00:00",
                "MAIN_logPoint3": "2021-09-07 14:00:00",
                "MAIN_totalLeaveDays": "0.5000",
                "MAIN_dayTypeDesc": "工作日",
                "MAIN_workGroupDesc": "",
                "MAIN_leaveApp": "NPL 2021-09-07 09:00 - 2021-09-07 13:00 Y",
                "T1_A_id": "14657",
                "MAIN_logPoint1": "2021-09-07 13:00:00",
                "T1_A_code": "SZ0001"
            }
        ]
    }
    

    DAILYATTLOG_EBI

# 详细考勤汇总报告

# 接口描述

用于按照指定 EBI 格式读取 [详细考勤汇总报告] EBI,并返回数据

# 接口调用说明

  1. 请求说明

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

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

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

    {
        "size": 5,
        "rows": [
            {
                "MAIN_filingDate": "2022/02/28",
                "M18ReservedCol_dataIndex": 1,
                "T1_A_id": "14657",
                "T1_A_code": "SZ0001",
                "MAIN_ar_udfAttRus6": "0",
                "MAIN_la_AL1": "0.0000"
            },
            ......
        ]
    }
    

    DETAILATTSUM_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": "00006",
                "TCR_T_tcType": "手工补卡",
                "TCR_T_id": "12724",
                "MAIN_action": "创建",
                "TCR_T_tcTime": "09:01:09",
                "M18ReservedCol_dataIndex": 1,
                "TCR_T_code": "202205057882_MISC",
                "E_A_id": "49",
                "TCR_T_tcDate": "2022/05/05"
            },
            ......
        ]
    }
    

    TIMECARDLOG_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": [
            {
                "E_A_code": "SZ0001",
                "MAIN_newDesc": "0",
                "M18ReservedCol_dataIndex": 1,
                "MAIN_newShiftCode": "",
                "MAIN_newHours": "0.00",
                "MAIN_newShiftId": "0",
                "MAIN_newWorkSiteCode": "",
                "MAIN_newWorkSite": "0",
                "E_A_id": "14657",
                "MAIN_sType": "shiftSet",
                "MAIN_wType": "worksite"
            },
            ......
        ]
    }
    

    ROSTERLOG_EBI