aiM18 Developer Center aiM18 Developer Center
DOC Home
  • Platform

    • Overview
    • Frontend Framework
    • Backend Framework
    • EBI Development
    • JSF Components
    • BPM Extension Interface
    • Telescope Extension Interface
    • Mobile App Setup
  • ERP

    • ERP EJB Interfaces
    • ERP XML Config Files
    • ERP Decorators (Frontend Interfaces)
  • Tutorial

    • Setup Development Environment
    • Sample App
  • Platform

    • Authentication
    • Common JSON Objects
    • Core Services
    • EBI Services
  • Enterprise Resource Planning
  • Human Capital Management
  • Business Process Management
  • Schedule Management
  • Document Management
  • Tutorial

    • Interacting with aiM18 via webservices
Tutorial
GitHub (opens new window)
DOC Home
  • Platform

    • Overview
    • Frontend Framework
    • Backend Framework
    • EBI Development
    • JSF Components
    • BPM Extension Interface
    • Telescope Extension Interface
    • Mobile App Setup
  • ERP

    • ERP EJB Interfaces
    • ERP XML Config Files
    • ERP Decorators (Frontend Interfaces)
  • Tutorial

    • Setup Development Environment
    • Sample App
  • Platform

    • Authentication
    • Common JSON Objects
    • Core Services
    • EBI Services
  • Enterprise Resource Planning
  • Human Capital Management
  • Business Process Management
  • Schedule Management
  • Document Management
  • Tutorial

    • Interacting with aiM18 via webservices
Tutorial
GitHub (opens new window)
  • base

    • Authentication
    • Common JSON Objects
    • Core Services
    • Enduser-driven Business Intelligence
    • Error Code Description
  • Business Process Management

    • Business Process Management
  • Schedule Management

    • Schedule Management
  • Document Management System

    • Document Management System
  • Enterprise Resource Planning

    • README for ERP
    • Master Data
    • Sales
    • Purchase
    • Stock
    • Consignment
    • Subcontract
    • Production
    • Retail
    • Retail Stored Value
    • Warehouse Management Solution
    • Retail and Third-Party Logistics
    • Trading and Finance
    • Accounting
    • Accounting EBI
  • Human Capital Management

    • README for HCM
    • Attendance Management
    • Hong Kong Labour Law Compliance
    • Leave Management
    • Organization And Personnel Management
    • Payroll Management
    • PRC Labour Law Compliance
    • Appraisal Management
    • Attendance
    • Casual Labour
    • Personnel
    • Leave
      • Leave Application
        • Fetch Leave Application List
        • Description
        • API Detail
        • Create Leave Application
        • Description
        • API Detail
        • Load Leave Application
        • Description
        • API Detail
        • Update Leave Application
        • Description
        • API Detail
        • Delete Leave Application
        • Description
        • API Detail
      • Leave Cancellation
        • Fetch Leave Cancellation List
        • Description
        • API Detail
        • Create Leave Cancellation
        • Description
        • API Detail
        • Load Leave Cancellation
        • Description
        • API Detail
        • Update Leave Cancellation
        • Description
        • API Detail
        • Delete Leave Cancellation
        • Description
        • API Detail
      • Employee Leave Info
        • Fetch Employee Leave Info List
        • Description
        • API Detail
        • Create Employee Leave Info
        • Create Employee
        • Load Employee Leave Info
        • Description
        • API Detail
        • Update Employee Leave Info
        • Description
        • API Detail
        • Delete Employee Leave Info
        • Delete Employee
      • Compensation Leave Entitlement Application
        • Fetch Compensation Leave Entitlement Application List
        • Description
        • API Detail
        • Create Compensation Leave Entitlement Application
        • Description
        • API Detail
        • Load Compensation Leave Entitlement Application
        • Description
        • API Detail
        • Update Compensation Leave Entitlement Application
        • Description
        • API Detail
        • Delete Compensation Leave Entitlement Application
        • Description
        • API Detail
      • Work Injury
        • Fetch Work Injury List
        • Description
        • API Detail
        • Create Work Injury
        • Description
        • API Detail
        • Load Work Injury
        • Description
        • API Detail
        • Update Work Injury
        • Description
        • API Detail
        • Delete Work Injury
        • Description
        • API Detail
      • Employee Holiday Info
        • Fetch Employee Holiday Info List
        • Description
        • API Detail
        • Create Employee Holiday Info
        • Create Employee
        • Load Employee Holiday Info
        • Description
        • API Detail
        • Update Employee Holiday Info
        • Description
        • API Detail
        • Delete Employee Holiday Info
        • Delete Employee
      • Rest Day Adjustment
        • Fetch Rest Day Adjustment List
        • Description
        • API Detail
        • Create Rest Day Adjustment
        • Description
        • API Detail
        • Load Rest Day Adjustment
        • Description
        • API Detail
        • Update Rest Day Adjustment
        • Description
        • API Detail
        • Delete Rest Day Adjustment
        • Description
        • API Detail
      • Load EBI data
        • Leave Application/ Cancellation Report
        • Description
        • API Detail
        • Employee Leave Info Listing
        • Description
        • API Detail
        • Compensation Leave Entitlement Application Listing
        • Description
        • API Detail
        • Work Injury Report
        • Description
        • API Detail
        • Detailed Leave Balance Report
        • Description
        • API Detail
        • Leave Balance Report
        • Description
        • API Detail
        • Leave Entitlement Report
        • Description
        • API Detail
        • Leave Circle Listing
        • Description
        • API Detail
        • Annual Leave Policy Repor
        • Description
        • API Detail
        • Multiple Profile Leave Setup Report
        • Description
        • API Detail
        • Leave Package Listing
        • Description
        • API Detail
        • Hong Kong Sickness Days Report
        • Description
        • API Detail
        • Holiday Balance Report
        • Description
        • API Detail
        • Rest Day Ledger
        • Description
        • API Detail
    • Medical Claim Management
    • Payroll
    • Recruitment
    • Training & Sponsorship
  • Web Services
  • Human Capital Management
Multiable
2024-02-29
目录

Leave

Version: 1.2 | Release Date: 30/01/2024

# Leave Application

# Fetch Leave Application List

# Description

Usage: Fetch Leave Application List

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/search/search
    HTTP Method GET
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    stSearch String (Query) Yes Lookup Type. You can find it in Lookup.
    (Eg: leaveapp ......)
    formatId long (Query) No Lookup Query ID, If not specified, the default format is used.
    startRow int (Query) No Resultset offset : start index
    endRow int (Query) No Resultset offset : end index
    quickSearchStr String (Query) No Quick search keyword
  3. Request Sample

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

    {
        "stSearch": "leaveapp",
        "size": 20,
        "stSearchDisplay": "Leave Application",
        "values": [
            {
                "leaveapp.empId.employee.code": "00006",
                "code": "00009",
                "st_code": "00009",
                "leaveapp.lastModifyUid.simpleUser.desc__lang": "admin-SC",
                "st_desc": "00009",
                "iRev": 2,
                "dateFrom": "2017-08-09",
                "leaveapp.empId.employee.dept.dept.desc__lang": "开发部",
                "st_id": 27,
                "leaveapp.entitleTypeId.entitletype.desc__lang": "",
                "dateTo": "2017-08-09",
                "leaveapp.empId.employee.desc__lang": "00006",
                "days": 1,
                "id": 27,
                "leaveapp.leaveTypeId.leavetype.desc__lang": "无薪假",
                "lastModifyDate": "2019-12-05 17:47:34",
                "leaveapp.empId.employee.position.position.desc__lang": "D122",
                "status": "N"
            },
            {......}
        ]        
    }
    

# Create Leave Application

# Description

Usage: Create Leave Application

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/root/api/save/leaveapp
    HTTP Method PUT
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    menuCode String (Query) Yes In Data Dictionary
    Eg: leaveapp
    entitYes String (Body) Yes JSON (Refer to Request Sample)
  3. Request Sample

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

    Entity JSON Format:

    {
        "leaveapp": {
            "values": [
                {
                    "empId": 72446,
                    "leaveTypeId": 33,
                    "dateFrom": "2022-03-23",
                    "dateTo": "2022-03-23"
                }
            ]
        },
        "leaveappt": {
            "values": [
                {
                    "leaveTypeId": 33,
                    "filingDate": "2022-03-23",
                    "period": "fullDay",
                    "startDate": "2022-03-23",
                    "startTime": "00:00",
                    "endDate": "2022-03-23",
                    "endTime": "23:00",
                    "days": 1.0
                }
            ]
        }
    }
    
  4. Request Sample

    {
        "recordId": 792,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "Leave periods cannot overlap with each other.",
                "msgCode": "ch01_leave_leaveapp_100007"
            }
        ],
        "status": false
    }
    

# Load Leave Application

# Description

Usage: Load Leave Application

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/root/api/read/leaveapp
    HTTP Method GET
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    menuCode String (Query) Yes In Data Dictionary
    Eg: leaveapp
    id long (Query) Yes Leave Application ID
    iRev long (Query) No Inner Version
  3. Request Sample

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

    {
        "data": {
            "leaveappt": [
                {
                    "cancel": false,
                    "hId": 792,
                    "period": "fullDay",
                    "filingDate": 1647964800000,
                    "endDate": 1647964800000,
                    "iRev": 1,
                    "itemNo": "     1",
                    "leaveCancelId": 0,
                    "udfeee": "",
                    "specifyDate": -2209017600000,
                    "days": 1.0,
                    "startTime": "00:00",
                    "id": 2323,
                    "leaveTypeId": 33,
                    "endTime": "23:00",
                    "cancelReason": "",
                    "grant": false,
                    "startDate": 1647964800000
                }
            ],
            "leaveapp": [
                {
                    "udfint": 0.0,
                    "attachmentNo": 0,
                    "empId": 72446,
                    "reason": "",
                    "lastModifyUid": 4,
                    "code": "LEA220937",
                    "exHold": "inc",
                    "useAccess": false,
                    "exHoldType": "",
                    "udfvvv": "",
                    "iRev": 1,
                    "sysJson": "{\"autoGenCode\":{\"snId\":24,\"code\":\"LEA220937\",\"sn\":\"937\"}}",
                    "udfdecimal": 0.0,
                    "viewCode": "leaveapp",
                    "autoGenFooter": 0,
                    "skipEmpMProfileCheck": 0,
                    "beId": 0,
                    "udfbbb": "",
                    "forceSkipCircle": 0,
                    "udfddd": "",
                    "skipLeaveCircleCheck": 0,
                    "printCount": 0,
                    "Breakdown": "<p>2022/03/23, Annual Leave-English, Full Day, 00:00 - 23:00, 1.0D</p>",
                    "useAccessBl": false,
                    "id": 792,
                    "statusModifyDate": 1648633062000,
                    "lastModifyDate": 1648633062000,
                    "createUid": 4,
                    "exSun": "inc",
                    "BreakdownSc": "<p>2022/03/23, AAL 1, 全日, 00:00 - 23:00, 1.0D</p>",
                    "createDate": 1648633062000,
                    "forceSkipOverApp": 0,
                    "lastApproveUid": 0,
                    "skipOverAppCheck": 0,
                    "udfggg": "",
                    "dateFrom": 1647964800000,
                    "useAccessWl": false,
                    "skipTotalDaysCheck": 0,
                    "udfaaa": "",
                    "exSat": "inc",
                    "udfccc": 0,
                    "entitleTypeId": 19,
                    "dateTo": 1647964800000,
                    "days": 1.0,
                    "leaveTypeId": 33,
                    "useAccessAutoCalc": false,
                    "status": "N",
                    "BreakdownTc": "<p>2022/03/23, Annual Leave-繁体, 全日, 00:00 - 23:00, 1.0D</p>"
                }
            ]
        },
        "messages": [],
        "status": true
    }
    
    {
        "data": {},
        "messages": [
            {
                "msgDetail": "No data is found, it may be deleted or not authorized for you to access",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# Update Leave Application

# Description

Usage: Update Leave Application

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/root/api/save/leaveapp
    HTTP Method PUT
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    menuCode String (Query) Yes In Data Dictionary
    Eg: leaveapp
    entitYes String (Body) Yes JSON (Refer to Request Sample)
  3. Request Sample

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

    Entity JSON Format:

    {
        "leaveapp": {
            "values": [
                {
                    "id": 792,
                    "empId": 72446,
                    "leaveTypeId": 33,
                    "dateFrom": "2022-03-24",
                    "dateTo": "2022-03-24"
                }
            ]
        },
        "leaveappt": {
            "values": [
                {
                    "leaveTypeId": 33,
                    "filingDate": "2022-03-24",
                    "period": "fullDay",
                    "startDate": "2022-03-24",
                    "startTime": "00:00",
                    "endDate": "2022-03-24",
                    "endTime": "23:00",
                    "days": 1.0
                }
            ]
        }
    }
    
  4. Request Sample

    {
        "recordId": 792,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "Leave periods cannot overlap with each other.",
                "msgCode": "ch01_leave_leaveapp_100007"
            }
        ],
        "status": false
    }
    

# Delete Leave Application

# Description

Usage: Delete Leave Application

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/root/api/delete/leaveapp
    HTTP Method DELETE
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    menuCode String (Query) Yes In Data Dictionary
    Eg: leaveapp
    id long (Query) Yes Leave Application ID
  3. Request Sample

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

    {
    	"messages": [],
    	"status": true
    }
    
    {
        "messages": [
            {
                "msgDetail": "The record was deleted",
                "msgCode": "core_101017"
            }
        ],
        "status": false
    }
    

# Leave Cancellation

# Fetch Leave Cancellation List

# Description

Usage: Fetch Leave Cancellation List

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/search/search
    HTTP Method GET
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    stSearch String (Query) Yes Lookup Type. You can find it in Lookup.
    (Eg: leavecancel ......)
    formatId long (Query) No Lookup Query ID, If not specified, the default format is used.
    startRow int (Query) No Resultset offset : start index
    endRow int (Query) No Resultset offset : end index
    quickSearchStr String (Query) No Quick search keyword
  3. Request Sample

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

    {
        "stSearch": "leavecancel",
        "size": 20,
        "stSearchDisplay": "Leave Cancellation",
        "values": [
            {
                "code": "17111701",
                "leavecancel.leaveAppId.leaveapp.code": "LA_1505267023370",
                "leavecancel.empId.employee.code": "17080801",
                "leavecancel.empId.employee.desc__lang": "17080801_zh",
                "leavecancel.empId.employee.dept.dept.desc__lang": "会计部",
                "leavecancel.empId.employee.position.position.desc__lang": "人事部门-简体",
                "status": "Y",
                "iRev": 7,
                "lastModifyDate": "2021-06-10 09:40:32",
                "leavecancel.lastModifyUid.simpleUser.desc__lang": "admin-SC",
                "id": 32,
                "st_desc": "17111701",
                "st_id": 32,
                "st_code": "17111701"
            },
          {......}
        ]
    }
    

# Create Leave Cancellation

# Description

Usage: Create Leave Cancellation

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/root/api/save/leavecancel
    HTTP Method PUT
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    menuCode String (Query) Yes In Data Dictionary
    Eg: leavecancel
    entitYes String (Body) Yes JSON (Refer to Request Sample)
  3. Request Sample

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

    Entity JSON Format:

    {
        "leavecancel": {
            "values": [
                {
                    "empId": 52,
                    "leaveAppId": 57
                }
            ]
        },
        "leavecancelt": {
            "values": [
                {
                    "leaveTypeId": 1,
                    "startDate": "2017-09-03",
                    "startTime": "00:00",
                    "endDate": "2017-09-03",
                    "endTime": "23:59",
                    "cancel":  "true"
                }
            ]
    
        }
    }
    
  4. Response Sample

    {
        "recordId": 110,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "Leave Cancellation record already exist",
                "msgCode": "ch01_leave_leavecancel_100001"
            }
        ],
        "status": false
    }
    

# Load Leave Cancellation

# Description

Usage: Load Leave Cancellation

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/root/api/read/leavecancel
    HTTP Method GET
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    menuCode String (Query) Yes In Data Dictionary
    Eg: leavecancel
    id long (Query) Yes Leave Cancellation ID
    iRev long (Query) No Inner Version
  3. Request Sample

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

    {
        "data": {
            "leavecancelt": [
                {
                    "hId": 110,
                    "period": "fullDay",
                    "filingDate": 1504368000000,
                    "endDate": 1504368000000,
                    "leaveAppTId": 135,
                    "iRev": 1,
                    "itemNo": "     1",
                    "specifyDate": 1504368000000,
                    "days": 1,
                    "startTime": "00:00",
                    "id": 258,
                    "leaveTypeId": 1,
                    "endTime": "23:59",
                    "cancelReason": "",
                    "startDate": 1504368000000
                }
            ]
        },
        "messages": [],
        "status": true
    }
    

# Update Leave Cancellation

# Description

Usage: Update Leave Cancellation

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/root/api/save/leavecancel
    HTTP Method PUT
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    menuCode String (Query) Yes In Data Dictionary
    Eg: leavecancel
    entitYes String (Body) Yes JSON (Refer to Request Sample)
  3. Request Sample

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

    Entity JSON Format:

    {
        "leavecancel": {
            "values": [
                {
                	"id": 111,
                    "empId": 52,
                    "leaveAppId": 59
                }
            ]
        },
        "leavecancelt": {
            "values": [
                {
                	"leaveTypeId": 1,
                	"startDate": "2017-09-03",
                	"startTime": "00:00",
                	"endDate": "2017-09-03",
                	"endTime": "23:59",
                    "cancel":  "true",
                    "cancelReason": "the reason of leaveCancel"
                }
            ]
            
        }
    }
    
  4. Response Sample

    {
        "recordId": 111,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "Leave Application Detail not found(leavecancelt.startDate.1,leavecancelt.startTime.1,leavecancelt.endDate.1,leavecancelt.endTime.1,leavecancelt.leaveTypeId.1)",
                "msgCode": "ch01_leave_leavecancel_100004"
            }
        ],
        "status": false
    }
    

# Delete Leave Cancellation

# Description

Usage: Delete Leave Cancellation

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/root/api/delete/leavecancel
    HTTP Method DELETE
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    menuCode String (Query) Yes In Data Dictionary
    Eg: leavecancel
    id long (Query) Yes Leave Cancellation ID
  3. Request Sample

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

    {
        "messages": [],
        "status": true
    }
    
    {
        "messages": [
            {
                "msgDetail": "The record was deleted",
                "msgCode": "core_101017"
            }
        ],
        "status": false
    }
    

# Employee Leave Info

# Fetch Employee Leave Info List

# Description

Usage: Fetch Employee Leave Info List

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/search/search
    HTTP Method GET
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    stSearch String (Query) Yes Lookup Type. You can find it in Lookup.
    (Eg: empleaveEntInfo ......)
    formatId long (Query) No Lookup Query ID, If not specified, the default format is used.
    startRow int (Query) No Resultset offset : start index
    endRow int (Query) No Resultset offset : end index
    quickSearchStr String (Query) No Quick search keyword
  3. Request Sample

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

    {
        "stSearch": "empleaveEntInfo",
        "size": 20,
        "stSearchDisplay": "Employee Leave Info",
        "values": [
            {
                "code": "00002",
                "empleaveEntInfo.empId.employee.desc__lang": "00002",
                "empleaveEntInfo.empId.employee.dept.dept.desc__lang": "SZO",
                "empleaveEntInfo.empId.employee.position.position.desc__lang": "人事部门-简体",
                "iRev": 1,
                "lastModifyDate": "2019-01-10 15:45:13",
                "empleaveEntInfo.lastModifyUid.simpleUser.desc__lang": "admin-SC",
                "id": 93368,
                "st_desc": "00002",
                "st_id": 93368,
                "st_code": "00002"
            },
          {......}
        ]
    }
    

# Create Employee Leave Info

# Create Employee

# Load Employee Leave Info

# Description

Usage: Load Employee Leave Info

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/root/api/read/empleaveEntInfo
    HTTP Method GET
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    menuCode String (Query) Yes In Data Dictionary
    Eg: empleaveEntInfo
    id long (Query) Yes Employee Leave Info ID
    iRev long (Query) No Inner Version
  3. Request Sample

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

    {
        "data": {
            "empleavempsetup": [
                {
                    "hId": 0,
                    "leaveEntId": 1,
                    "entMasterId": 71010,
                    "iRev": 0,
                    "id": 0,
                    "itemNo": ""
                },
              {......}
            ]
        },
        "messages": [],
        "status": true
    }
    

# Update Employee Leave Info

# Description

Usage: Update Employee Leave Info

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/root/api/save/empleaveEntInfo
    HTTP Method PUT
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    menuCode String (Query) Yes In Data Dictionary
    Eg: empleaveEntInfo
    entitYes String (Body) Yes JSON (Refer to Request Sample)
  3. Request Sample

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

    Entity JSON Format:

    {
        "empleaveinfo": {
            "values": [
                {
                    "id": 59824
                }
    
            ]
        },
        "empleaveent": {
            "values": [
                {
                    "leaveEntId": 7,
                    "entday": 5.0000,
                    "effDate": "2022-04-01",
                    "expDate": "2022-12-31"
                }
            ]
    
        }
    }
    
  4. Response Sample

    {
        "recordId": 59824,
        "messages": [],
        "status": true
    }
    

# Delete Employee Leave Info

# Delete Employee

# Compensation Leave Entitlement Application

# Fetch Compensation Leave Entitlement Application List

# Description

Usage: Fetch Compensation Leave Entitlement Application List

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/search/search
    HTTP Method GET
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    stSearch String (Query) Yes Lookup Type. You can find it in Lookup.
    (Eg: compleaveent ......)
    formatId long (Query) No Lookup Query ID, If not specified, the default format is used.
    startRow int (Query) No Resultset offset : start index
    endRow int (Query) No Resultset offset : end index
    quickSearchStr String (Query) No Quick search keyword
  3. Request Sample

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

    {
        "stSearch": "compleaveent",
        "size": 10,
        "stSearchDisplay": "Compensation Leave Entitlement Application",
        "values": [
            {
                "code": "CLE01",
                "filingDate": "2020-05-08",
                "compleaveent.empId.employee.code": "CTEST01",
                "compleaveent.empId.employee.desc__lang": "Calvin Test One-SC",
                "compleaveent.empId.employee.dept.dept.desc__lang": "TESTHR",
                "compleaveent.empId.employee.position.position.desc__lang": "",
                "status": "Y",
                "iRev": 2,
                "lastModifyDate": "2021-02-26 15:00:21",
                "compleaveent.lastModifyUid.simpleUser.desc__lang": "admin-SC",
                "id": 1,
                "st_desc": "CLE01",
                "st_id": 1,
                "st_code": "CLE01"
            },
          {......}
        ]
    }
    

# Create Compensation Leave Entitlement Application

# Description

Usage: Create Compensation Leave Entitlement Application

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/root/api/save/compleaveent
    HTTP Method PUT
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    menuCode String (Query) Yes In Data Dictionary
    Eg: compleaveent
    entitYes String (Body) Yes JSON (Refer to Request Sample)
  3. Request Sample

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

    Entity JSON Format:

    {
        "compleaveent": {
            "values": [
                {
                    "code": "0001",
                    "empId": 51,
                    "compleavesetup": 1,
                    "filingDate": "2022-04-07",
                    "startDate": "2022-04-07",
                    "endDate": "2022-04-07",
                    "startTime": "00:00",
                    "endTime": "23:59",
                    "amount": 1.0000
                }
            ]
    
        }
    }
    
  4. Response Sample

    {
        "recordId": 11,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "Same Code found",
                "msgCode": "core_101903"
            }
        ],
        "status": false
    }
    

# Load Compensation Leave Entitlement Application

# Description

Usage: Load Compensation Leave Entitlement Application

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/root/api/read/compleaveent
    HTTP Method GET
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    menuCode String (Query) Yes In Data Dictionary
    Eg: compleaveent
    id long (Query) Yes Compensation Leave Entitlement Application ID
    iRev long (Query) No Inner Version
  3. Request Sample

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

    {
        "data": {
            "compleaveent": [
                {
                    "cancel": false,
                    "attachmentNo": 0,
                    "empId": 51,
                    "reason": "",
                    "canceledOn": -2209017600000,
                    "lastModifyUid": 4,
                    "code": "0001",
                    "useAccess": false,
                    "filingDate": 1649260800000,
                    "endDate": 1649260800000,
                    "canceledBy": 0,
                    "iRev": 2,
                    "sysJson": "",
                    "viewCode": "compleaveent",
                    "beId": 0,
                    "printCount": 0,
                    "useAccessBl": false,
                    "startTime": "00:00",
                    "id": 11,
                    "statusModifyDate": 1649313221000,
                    "cancelReason": "",
                    "lastModifyDate": 1649313582000,
                    "createUid": 4,
                    "createDate": 1649313221000,
                    "amount": 1,
                    "lastApproveUid": 0,
                    "compleavesetup": 1,
                    "useAccessWl": false,
                    "endTime": "23:59",
                    "useAccessAutoCalc": false,
                    "startDate": 1649260800000,
                    "status": "N"
                }
            ]
        },
        "messages": [],
        "status": true
    }
    

# Update Compensation Leave Entitlement Application

# Description

Usage: Update Compensation Leave Entitlement Application

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/root/api/save/compleaveent
    HTTP Method PUT
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    menuCode String (Query) Yes In Data Dictionary
    Eg: compleaveent
    entitYes String (Body) Yes JSON (Refer to Request Sample)
  3. Request Sample

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

    Entity JSON Format:

    {
        "compleaveent": {
            "values": [
                {
                	"id": 12,
                	"code": "0001",
                    "empId": 51,
                    "compleavesetup": 1,
                    "filingDate": "2022-04-07",
                    "startDate": "2022-04-07",
                    "endDate": "2022-04-07",
                    "startTime": "00:00",
                    "endTime": "23:59",
                    "amount": 24.000
                }
            ]
        
        }
    }
    
  4. Response Sample

    {
        "recordId": 12,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "Compensation Leave Entitlement accumulated balance cannot exceed 5 days. (Setup = CLS01)",
                "msgCode": "ch01_compleave_compleaveent_100004"
            }
        ],
        "status": false
    }
    

# Delete Compensation Leave Entitlement Application

# Description

Usage: Delete Compensation Leave Entitlement Application

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/root/api/delete/compleaveent
    HTTP Method DELETE
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    menuCode String (Query) Yes In Data Dictionary
    Eg: compleaveent
    id long (Query) Yes Compensation Leave Entitlement Application ID
  3. Request Sample

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

    {
        "messages": [],
        "status": true
    }
    
    {
        "messages": [
            {
                "msgDetail": "The record was deleted",
                "msgCode": "core_101017"
            }
        ],
        "status": false
    }
    

# Work Injury

# Fetch Work Injury List

# Description

Usage: Fetch Work Injury List

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/search/search
    HTTP Method GET
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    stSearch String (Query) Yes Lookup Type. You can find it in Lookup.
    (Eg: workInjuryCase ......)
    formatId long (Query) No Lookup Query ID, If not specified, the default format is used.
    startRow int (Query) No Resultset offset : start index
    endRow int (Query) No Resultset offset : end index
    quickSearchStr String (Query) No Quick search keyword
  3. Request Sample

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

    {
        "stSearch": "workInjuryCase",
        "size": 5,
        "stSearchDisplay": "Work Injury",
        "values": [
            {
                "code": "S1",
                "accDate": "2021-11-10",
                "workInjuryCase.empId.employee.code": "SZ0001",
                "workInjuryCase.empId.employee.desc__lang": "封易-简体",
                "workInjuryCase.empId.employee.dept.dept.desc__lang": "MLTEST",
                "workInjuryCase.empId.employee.position.position.desc__lang": "D",
                "status": "Y",
                "iRev": 20,
                "lastModifyDate": "2021-12-07 12:49:54",
                "workInjuryCase.lastModifyUid.simpleUser.desc__lang": "何建(SZ0001)",
                "id": 7,
                "st_desc": "S1",
                "st_id": 7,
                "st_code": "S1"
            },
          {......}
        ]
    }
    

# Create Work Injury

# Description

Usage: Create Work Injury

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/root/api/save/workInjuryCase
    HTTP Method PUT
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    menuCode String (Query) Yes In Data Dictionary
    Eg: workInjuryCase
    entitYes String (Body) Yes JSON (Refer to Request Sample)
  3. Request Sample

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

    Entity JSON Format:

    {
        "workinjurycase": {
            "values": [
                {
                    "empId": 49,
                    "accDate": "2022-04-11",
                    "accReasonId": 1
                }
            ]
        }
    }
    
  4. Response Sample

    {
        "recordId": 15,
        "messages": [],
        "status": true
    }
    

# Load Work Injury

# Description

Usage: Load Work Injury

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/root/api/read/workInjuryCase
    HTTP Method GET
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    menuCode String (Query) Yes In Data Dictionary
    Eg: workInjuryCase
    id long (Query) Yes Work Injury ID
    iRev long (Query) No Inner Version
  3. Request Sample

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

    {
        "data": {
            "workinjurycompen": [
                {
                    "hId": 7,
                    "insurComClaim": 200,
                    "iRev": 20,
                    "remark": "",
                    "id": 17,
                    "itemNo": "     1",
                    "compenType": "perPayment"
                },
              {....}
            ],
           [....],
           "workinjurycase": [
                {
                    "attachmentNo": 0,
                    "empId": 14657,
                    "lastModifyUid": 109,
                    "code": "S1",
                    "useAccess": false,
                    "relaClients": true,
                    "closeBy": 0,
                    "iRev": 20,
                    "remark": "<p>DFASDFAS</p>",
                    "sysJson": "",
                    "viewCode": "workInjuryCase",
                    "beId": 0,
                    "closeOn": -2209017600000,
                    "reactBy": 109,
                    "printCount": 0,
                    "useAccessBl": false,
                    "id": 7,
                    "reactOn": 1638806400000,
                    "statusModifyDate": 1637308830000,
                    "lastModifyDate": 1638852594000,
                    "createUid": 4,
                    "createDate": 1637308815000,
                    "lastApproveUid": 4,
                    "accReasonId": 2,
                    "useAccessWl": false,
                    "accDate": 1636473600000,
                    "reactCase": true,
                    "reactReason": "",
                    "docInsurDate": -2209017600000,
                    "useAccessAutoCalc": false,
                    "closeCase": false,
                    "status": "Y"
                }
        },
        "messages": [],
        "status": true
    }
    

# Update Work Injury

# Description

Usage: Update Work Injury

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/root/api/save/workInjuryCase
    HTTP Method PUT
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    menuCode String (Query) Yes In Data Dictionary
    Eg: workInjuryCase
    entitYes String (Body) Yes JSON (Refer to Request Sample)
  3. Request Sample

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

    Entity JSON Format:

    {
        "workinjurycase": {
            "values": [
                {
                    "id": 7
                }
            ]
        },
        "workinjurycasemthearn": {
            "values": [
                {
                    "effDate": "2022-04-11",
                    "repMthEarn": "5000.0000"
                }
            ]
    
        }
    }
    
  4. Response Sample

    {
        "recordId": 7,
        "messages": [],
        "status": true
    }
    

# Delete Work Injury

# Description

Usage: Delete Work Injury

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/root/api/delete/workInjuryCase
    HTTP Method DELETE
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    menuCode String (Query) Yes In Data Dictionary
    Eg: workInjuryCase
    id long (Query) Yes Work Injury ID
  3. Request Sample

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

    {
        "messages": [],
        "status": true
    }
    
    {
        "messages": [
            {
                "msgDetail": "The record was deleted",
                "msgCode": "core_101017"
            }
        ],
        "status": false
    }
    

# Employee Holiday Info

# Fetch Employee Holiday Info List

# Description

Usage: Fetch Employee Holiday Info List

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/search/search
    HTTP Method GET
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    stSearch String (Query) Yes Lookup Type. You can find it in Lookup.
    (Eg: empHolidayEntitleInfo ......)
    formatId long (Query) No Lookup Query ID, If not specified, the default format is used.
    startRow int (Query) No Resultset offset : start index
    endRow int (Query) No Resultset offset : end index
    quickSearchStr String (Query) No Quick search keyword
  3. Request Sample

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

    {
        "stSearch": "empHolidayEntitleInfo",
        "size": 20,
        "stSearchDisplay": "Employee Holiday Info",
        "values": [
            {
                "code": "",
                "empHolidayEntitleInfo.empId.employee.desc__lang": "999",
                "empHolidayEntitleInfo.empId.employee.dept.dept.desc__lang": "1456",
                "empHolidayEntitleInfo.empId.employee.position.position.desc__lang": "人事部门-简体",
                "iRev": 1,
                "lastModifyDate": "2017-09-21 09:27:11",
                "empHolidayEntitleInfo.lastModifyUid.simpleUser.desc__lang": "",
                "id": 33095,
                "st_desc": "",
                "st_id": 33095,
                "st_code": ""
            },
          {......}
        ]
    }
    

# Create Employee Holiday Info

# Create Employee

# Load Employee Holiday Info

# Description

Usage: Load Employee Holiday Info

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/root/api/read/empHolidayEntitleInfo
    HTTP Method GET
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    menuCode String (Query) Yes In Data Dictionary
    Eg: empHolidayEntitleInfo
    id long (Query) Yes Employee Holiday Info ID
    iRev long (Query) No Inner Version
  3. Request Sample

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

    {
        "data": {
            "empholidayinfo": [
                {
                    "attachmentNo": 0,
                    "empId": 71010,
                    "lastModifyUid": 4,
                    "code": "00002",
                    "lastApproveUid": 0,
                    "useAccess": false,
                    "udfholnum": 0,
                    "iRev": 1,
                    "sysJson": "",
                    "viewCode": "empHolidayEntitleInfo",
                    "useAccessWl": false,
                    "beId": 0,
                    "printCount": 0,
                    "useAccessBl": false,
                    "id": 33460,
                    "statusModifyDate": 1547106313000,
                    "lastModifyDate": 1547106313000,
                    "useAccessAutoCalc": false,
                    "createUid": 4,
                    "createDate": 1547106313000,
                    "status": "Y"
                }
            ],
            "empholidayyear": [
                {
                    "hId": 33460,
                    "year": 2018,
                    "iRev": 1,
                    "id": 33383,
                    "itemNo": ""
                }
            ]
        },
        "messages": [],
        "status": true
    }
    

# Update Employee Holiday Info

# Description

Usage: Update Employee Holiday Info

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/root/api/save/empHolidayEntitleInfo
    HTTP Method PUT
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    menuCode String (Query) Yes In Data Dictionary
    Eg: empHolidayEntitleInfo
    entitYes String (Body) Yes JSON (Refer to Request Sample)
  3. Request Sample

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

    Entity JSON Format:

    {
        "empholidayinfo": {
            "values": [
                {
                    "id": 33460
                }
            ]
        },
        "empholidayyear": {
            "values": [
                {
                    "year": "2022"
                }
            ]
    
        }
    }
    
  4. Response Sample

    {
        "recordId": 33460,
        "messages": [],
        "status": true
    }	
    

# Delete Employee Holiday Info

# Delete Employee

# Rest Day Adjustment

# Fetch Rest Day Adjustment List

# Description

Usage: Fetch Rest Day Adjustment List

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/search/search
    HTTP Method GET
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    stSearch String (Query) Yes Lookup Type. You can find it in Lookup.
    (Eg: rDAdj ......)
    formatId long (Query) No Lookup Query ID, If not specified, the default format is used.
    startRow int (Query) No Resultset offset : start index
    endRow int (Query) No Resultset offset : end index
    quickSearchStr String (Query) No Quick search keyword
  3. Request Sample

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

    {
        "stSearch": "rDAdj",
        "size": 5,
        "stSearchDisplay": "Rest Day Adjustment",
        "values": [
            {
                "code": "00005",
                "effDate": "2017-08-27",
                "rDAdj.empId.employee.code": "00005",
                "rDAdj.empId.employee.desc__lang": "00004copy",
                "rDAdj.empId.employee.dept.dept.desc__lang": "T01-1-1",
                "rDAdj.empId.employee.position.position.desc__lang": "美工-SC",
                "status": "Y",
                "iRev": 2,
                "lastModifyDate": "2017-09-29 19:51:35",
                "rDAdj.lastModifyUid.simpleUser.desc__lang": "",
                "id": 2,
                "st_desc": "00005",
                "st_id": 2,
                "st_code": "00005"
            },
          {......}
        ]
    }
    

# Create Rest Day Adjustment

# Description

Usage: Create Rest Day Adjustment

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/root/api/save/rDAdj
    HTTP Method PUT
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    menuCode String (Query) Yes In Data Dictionary
    Eg: rDAdj
    entitYes String (Body) Yes JSON (Refer to Request Sample)
  3. Request Sample

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

    Entity JSON Format:

    {
        "rdadj": {
            "values": [
                {
                    "code": "001",
                    "empId": 49,
                    "effDate": "2022-04-12",
                    "entDays": 5.0000
                }
            ]
        }
    }
    
  4. Response Sample

    {
        "recordId": 7,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "Same Code found(rdadj.code)",
                "msgCode": "core_101903"
            }
        ],
        "status": false
    }
    

# Load Rest Day Adjustment

# Description

Usage: Load Rest Day Adjustment

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/root/api/read/rDAdj
    HTTP Method GET
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    menuCode String (Query) Yes In Data Dictionary
    Eg: rDAdj
    id long (Query) Yes Rest Day Adjustment ID
    iRev long (Query) No Inner Version
  3. Request Sample

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

    {
        "data": {
            "rdadj": [
                {
                    "attachmentNo": 0,
                    "empId": 49,
                    "lastModifyUid": 4,
                    "code": "001",
                    "useAccess": false,
                    "iRev": 1,
                    "sysJson": "",
                    "viewCode": "rDAdj",
                    "beId": 0,
                    "effDate": 1649692800000,
                    "printCount": 0,
                    "useAccessBl": false,
                    "id": 7,
                    "statusModifyDate": 1649728953000,
                    "lastModifyDate": 1649728953000,
                    "createUid": 4,
                    "entdays": 0,
                    "createDate": 1649728953000,
                    "lastApproveUid": 4,
                    "skipDateCheck": 0,
                    "useAccessWl": false,
                    "rDAdjTypeId": 0,
                    "useAccessAutoCalc": false,
                    "remarks": "",
                    "status": "Y"
                }
            ]
        },
        "messages": [],
        "status": true
    }
    

# Update Rest Day Adjustment

# Description

Usage: Update Rest Day Adjustment

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/root/api/save/rDAdj
    HTTP Method PUT
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    menuCode String (Query) Yes In Data Dictionary
    Eg: rDAdj
    entitYes String (Body) Yes JSON (Refer to Request Sample)
  3. Request Sample

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

    Entity JSON Format:

    {
        "rdadj": {
            "values": [
                {
                    "id": 7,
                    "entDays": 10.0000,
                    "remarks": "test"
                }
            ]
        }
    }
    
  4. Response Sample

    {
        "recordId": 7,
        "messages": [],
        "status": true
    }
    
    {
        "recordId": 0,
        "messages": [
            {
                "msgDetail": "No data is found, it may be deleted or not authorized for you to access",
                "msgCode": "core_141019"
            }
        ],
        "status": false
    }
    

# Delete Rest Day Adjustment

# Description

Usage: Delete Rest Day Adjustment

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/root/api/delete/rDAdj
    HTTP Method DELETE
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    menuCode String (Query) Yes In Data Dictionary
    Eg: rDAdj
    id long (Query) Yes Rest Day Adjustment ID
  3. Request Sample

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

    {
        "messages": [],
        "status": true
    }
    
    {
        "messages": [
            {
                "msgDetail": "The record was deleted",
                "msgCode": "core_101017"
            }
        ],
        "status": false
    }
    

# Load EBI data

# Leave Application/ Cancellation Report

# Description

Usage: Run EBI [Leave Application/ Cancellation Report], return EBI data

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP Method GET
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    formatId long (Query) Yes Format ID fetched from another API
    offset int (Query) No Resultset offset : start index
    rows int (Query) No Resultset offset : end index
  3. Request Sample

    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. Request Sample

    {
        "size": 10,
        "rows": [
            {
                "employee_A_code": "EMP001",
                "aiM18ReservedCol_dataIndex": 1,
                "leaveApp_A_empId": "1682",
                "leaveCacnel_B_days": "0.0000",
                "leaveApp_A_days": "1.0000",
                "employee_A_id": "1682",
                "leaveApp_A_empId_code": "EMP001"
            },
            ......
        ]
    }
    

# Employee Leave Info Listing

# Description

Usage: Run EBI [Employee Leave Info Listing], return EBI data

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP Method GET
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    formatId long (Query) Yes Format ID fetched from another API
    offset int (Query) No Resultset offset : start index
    rows int (Query) No Resultset offset : end index
  3. Request Sample

    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. Response Sample

    {
        "size": 10,
        "rows": [
            {
                 "T2_A_joinDate": "2017/02/06",
                "T2_A_givenName__lang": "",
                "T2_B_code": "APPPPPPPPPPPPPPPPPPP",
                "aiM18ReservedCol_dataIndex": 1,
                "T1_A_id": "26758",
                "T2_C_positionTypeId_desc__lang": "Position Type 1",
                "T2_A_employStatus": "在职",
                "T2_A_id": "49",
                "T2_B_id": "3",
                "T1_A_holiday": "排除",
                "T2_A_code": "00006",
                "T1_A_code": "00006"
            },
            ......
        ]
    }
    

    EMPLEAVEINFO_EBI

# Compensation Leave Entitlement Application Listing

# Description

Usage: Run EBI [Compensation Leave Entitlement Application Listing], return EBI data

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP Method GET
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    formatId long (Query) Yes Format ID fetched from another API
    offset int (Query) No Resultset offset : start index
    rows int (Query) No Resultset offset : end index
  3. Request Sample

    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. Response Sample

    {
        "size": 10,
        "rows": [
            {
                "CLE_CLE_empId": "70304",
                "CLE_CLE_endDate": "2020/05/08",
                "CLE_CLE_startDate": "2020/05/08",
                "aiM18ReservedCol_dataIndex": 1,
                "CLE_CLE_code": "CLE01",
                "CLE_CLE_empId_desc__lang": "Calvin Test One-SC",
                "CLE_CLE_amount": "2.9979",
                "E_B_desc__lang": "TESTHR",
                "CLE_CLE_id": "1",
                "CLE_CLE_empId_code": "CTEST01"
            },
            ......
        ]
    }
    

    COMPLEAVEENT_EBI

# Work Injury Report

# Description

Usage: Run EBI [Work Injury Report], return EBI data

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP Method GET
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    formatId long (Query) Yes Format ID fetched from another API
    offset int (Query) No Resultset offset : start index
    rows int (Query) No Resultset offset : end index
  3. Request Sample

    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. Response Sample

    {
        "size": 5,
        "rows": [
            {
                "T2_C_id": "357",
                "T2_B_code": "MLTEST",
                "T1_A_accReasonId": "2",
                "aiM18ReservedCol_dataIndex": 1,
                "T2_A_desc__lang": "封易-简体",
                "T2_A_id": "14657",
                "T2_B_id": "5164",
                "T1_A_accDate": "2021/11/10",
                "T2_C_code": "D",
                "T1_A_id": "7",
                "T1_A_accReasonId_code": "BB",
                "T1_A_code": "S1",
                "T2_A_code": "SZ0001"
            },
            ......
        ]
    }
    

    WORKINJURY_EBI

# Detailed Leave Balance Report

# Description

Usage: Run EBI [Detailed Leave Balance Report], return EBI data

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP Method GET
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    formatId long (Query) Yes Format ID fetched from another API
    offset int (Query) No Resultset offset : start index
    rows int (Query) No Resultset offset : end index
  3. Request Sample

    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. Response Sample

    {
        "size": 3,
        "rows": [
            {
                "MAIN_e_desc": "年假-简体",
                "MAIN_leaveEnt": "3.0000",
                "MAIN_appDays": "0.0000",
                "MAIN_balAppDays": "3.0000",
                "aiM18ReservedCol_dataIndex": 1,
                "MAIN_dateFrom": "2017/02/02",
                "MAIN_apvDays": "0.0000",
                "MAIN_balApvDays": "3.0000",
                "MAIN_dateTo": "2017/05/01"
            },
            {
                "MAIN_e_desc": "年假-简体",
                "MAIN_leaveEnt": "1.0000",
                "MAIN_appDays": "0.0000",
                "MAIN_balAppDays": "1.0000",
                "aiM18ReservedCol_dataIndex": 2,
                "MAIN_dateFrom": "2017/05/02",
                "MAIN_apvDays": "0.0000",
                "MAIN_balApvDays": "1.0000",
                "MAIN_dateTo": "2017/06/30"
            },
            {
                "MAIN_e_desc": "年假-简体",
                "MAIN_leaveEnt": "3.0000",
                "MAIN_appDays": "0.0000",
                "MAIN_balAppDays": "3.0000",
                "aiM18ReservedCol_dataIndex": 3,
                "MAIN_dateFrom": "2017/07/01",
                "MAIN_apvDays": "0.0000",
                "MAIN_balApvDays": "3.0000",
                "MAIN_dateTo": "2017/11/01"
            }
        ]
    }
    

    DETAILLEAVEBAL_EBI

# Leave Balance Report

# Description

Usage: Run EBI [Leave Balance Report], return EBI data

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP Method GET
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    formatId long (Query) Yes Format ID fetched from another API
    offset int (Query) No Resultset offset : start index
    rows int (Query) No Resultset offset : end index
  3. Request Sample

    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. Response Sample

    {
        "size": 9,
        "rows": [
            {
                "MAIN_e_desc": "Hong Kong Annual Leave-简体",
                "MAIN_appDaysExpiry": "13.0000",
                "MAIN_leaveEnt": "0.0000",
                "MAIN_balAppDaysFuture": "-13.0000",
                "aiM18ReservedCol_dataIndex": 1,
                "MAIN_apvDays": "7.0000",
                "MAIN_balAppDaysExpiry": "-13.0000",
                "MAIN_leaveEntExpiry": "0.0000",
                "MAIN_balApvDays": "-7.0000"
            },
          {......}
        ]
    }
    

    LEAVEBAL_EBI

# Leave Entitlement Report

# Description

Usage: Run EBI [Leave Entitlement Report], return EBI data

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP Method GET
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    formatId long (Query) Yes Format ID fetched from another API
    offset int (Query) No Resultset offset : start index
    rows int (Query) No Resultset offset : end index
  3. Request Sample

    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. Response Sample

    {
        "size": 10,
        "rows": [
            {
                "T2_A_EntperiodUnit": "自定义",
                "T2_A_entday": "3.3000",
                "employee_A_code": "CTEST01",
                "T2_A_effDate": "2016/01/01",
                "aiM18ReservedCol_dataIndex": 1,
                "T2_A_expDate": "2016/12/31",
                "T2_A_remarks": "",
                "T2_A_Entperiod": "1",
                "T1_A_id": "7",
                "employee_A_id": "70304",
                "T2_A_leaveEntId_desc__lang": "年假-简体",
                "T1_A_code": "AL"
            },
          {......}
        ]
    }
    

    EMPLEAVEENT_EBI

# Leave Circle Listing

# Description

Usage: Run EBI [Leave Circle Listing], return EBI data

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP Method GET
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    formatId long (Query) Yes Format ID fetched from another API
    offset int (Query) No Resultset offset : start index
    rows int (Query) No Resultset offset : end index
  3. Request Sample

    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. Response Sample

    {
        "size": 2,
        "rows": [
            {
                "T2_B_code": "17042601",
                "T2_A_effDate": "2021/01/01",
                "aiM18ReservedCol_dataIndex": 1,
                "T2_A_leavecirclecheck": "All Leave Types",
                "T2_A_expDate": "9999/12/31",
                "T1_A_id": "72512",
                "T2_B_maxLeavePercent": "10.0000",
                "T2_B_minOndutyNo": "1",
                "T2_B_id": "6",
                "T2_B_maxLeaveNo": "10",
                "T1_A_code": "SZ00010001"
            },
          {......}
        ]
    }
    

    EMPLEAVECIRCLE_EBI

# Annual Leave Policy Repor

# Description

Usage: Run EBI [Annual Leave Policy Repor], return EBI data

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP Method GET
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    formatId long (Query) Yes Format ID fetched from another API
    offset int (Query) No Resultset offset : start index
    rows int (Query) No Resultset offset : end index
  3. Request Sample

    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. Response Sample

    {
        "size": 10,
        "rows": [
            {
                "MAIN_effDate": "2010/01/01",
                "T1_B_entdays": "0.1000",
                "T1_A_desc": "est",
                "T1_B_yrofservice": "0",
                "T3_A_id": "1",
                "aiM18ReservedCol_dataIndex": 1,
                "T1_A_id": "1",
                "T1_A_code": "test",
                "T3_A_code": "G1"
            },
          {......}
        ]
    }
    

    LEAVEPOLICY_EBI

# Multiple Profile Leave Setup Report

# Description

Usage: Run EBI [Multiple Profile Leave Setup Report], return EBI data

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP Method GET
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    formatId long (Query) Yes Format ID fetched from another API
    offset int (Query) No Resultset offset : start index
    rows int (Query) No Resultset offset : end index
  3. Request Sample

    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. Response Sample

    {
        "size": 10,
        "rows": [
            {
                "aiM18ReservedCol_dataIndex": 1,
                "T1_A_id": "52",
                "T4_A_id": "52",
                "T1_A_code": "00005",
                "T4_A_code": "00005",
                "MAIN_code": "00005"
            },
          {......}
        ]
    }
    

    EMPMPLEAVE_EBI

# Leave Package Listing

# Description

Usage: Run EBI [Leave Package Listing], return EBI data

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP Method GET
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    formatId long (Query) Yes Format ID fetched from another API
    offset int (Query) No Resultset offset : start index
    rows int (Query) No Resultset offset : end index
  3. Request Sample

    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. Response Sample

    {
        "size": 10,
        "rows": [
            {
                "leavePackage_A_id": "2",
                "leavePackage_A_code": "test1-rename",
                "aiM18ReservedCol_dataIndex": 1,
                "MAIN_leaveEntDesc": "Birthday Leave",
                "MAIN_amto": "06:30:ss",
                "MAIN_amfrom": "00:00",
                "MAIN_fulldayfrom": "02:20:ss",
                "MAIN_fulldayto": "00:00",
                "leavePackage_A_desc__lang": "test",
                "T2_A_id": "0",
                "T2_A_code": ""
            },
          {......}
        ]
    }
    

    LEAVEPACKAGE_EBI

# Hong Kong Sickness Days Report

# Description

Usage: Run EBI [Hong Kong Sickness Days Report], return EBI data

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP Method GET
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    formatId long (Query) Yes Format ID fetched from another API
    offset int (Query) No Resultset offset : start index
    rows int (Query) No Resultset offset : end index
  3. Request Sample

    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. Response Sample

    {
        "size": 10,
        "rows": [
            {
                "MAIN_ent1": "2.0000",
                "MAIN_bal2": "0.0000",
                "MAIN_ent2": "0.0000",
                "MAIN_bal1": "2.0000",
                "aiM18ReservedCol_dataIndex": 1,
                "MAIN_date": "2018/02/01",
                "T1_A_id": "72149",
                "MAIN_leaveAppStatus": "",
                "T2_A_id": "0",
                "T2_B_days": "0.0000",
                "T1_A_code": "JTHK001",
                "T2_A_code": ""
            },
          {......}
        ]
    }
    

    HKSLREP_EBI

# Holiday Balance Report

# Description

Usage: Run EBI [Holiday Balance Report], return EBI data

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP Method GET
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    formatId long (Query) Yes Format ID fetched from another API
    offset int (Query) No Resultset offset : start index
    rows int (Query) No Resultset offset : end index
  3. Request Sample

    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. Response Sample

    {
        "size": 10,
        "rows": [
            {
                "MAIN_dutyDate": "2017/10/01",
                "MAIN_date1": "2017/01/01",
                "aiM18ReservedCol_dataIndex": 1,
                "MAIN_effBal": "0",
                "T2_A_id": "2",
                "MAIN_holcalCode": "SH",
                "MAIN_groBal": "0",
                "MAIN_year": "2017",
                "MAIN_dayAfter": "60",
                "T1_A_id": "70324",
                "MAIN_isPaid": "No",
                "MAIN_daybefore": "60",
                "T1_A_code": "17071901",
                "T2_A_code": "A",
                "T3_A_code": "NY"
            },
          {......}
        ]
    }
    

    HOLIDAYENT_EBI

# Rest Day Ledger

# Description

Usage: Run EBI [Rest Day Ledger], return EBI data

# API Detail

  1. Request URL

    URL http://[server]/jsf/rfws/ebiWidget/loadReport
    HTTP Method GET
    Encode UTF-8
  2. URL Parameters

    Parameter Type Required Remarks
    authorization String (Header) Yes Access Token obtained via Oauth2
    client_id String (Header) Yes Client ID from [OAuth Applications], generated by the aiM18
    formatId long (Query) Yes Format ID fetched from another API
    offset int (Query) No Resultset offset : start index
    rows int (Query) No Resultset offset : end index
  3. Request Sample

    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. Response Sample

    {
        "size": 7,
        "rows": [
            {
                "MAIN_rdBal": "-2.0000",
                "MAIN_joinDate": "2017/02/06",
                "T1_holidayCategoryCode": "",
                "MAIN_rdUsed": "0.0000",
                "aiM18ReservedCol_dataIndex": 1,
                "T1_A_holidayCategoryId": "0",
                "T1_A_id": "49",
                "MAIN_balDesc": "开始结余",
                "MAIN_rdDate": "",
                "T1_A_code": "00006",
                "MAIN_rdEarned": "0.0000"
            },
          {......}
        ]
    }
    

    RDLEDGER_EBI

Last Updated: 2025/05/13, 07:58:58
Personnel
Medical Claim Management

← Personnel Medical Claim Management→

Theme by Vdoing | Copyright © 1990-2025 Multiable | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式