班表管理
管理員工班表資料,包括:班表資料查詢。
emp_worktime = {
"CO_ID": number, //公司_ID
"EMP_ID": number, //員工_ID
"WORK_DATE":date, //應出勤日期
"WORK_DATE_SEQ": number, //應出勤日期_分段
"IS_EMPTY_WORKTIME": number, //當日是否未排班
"IS_EMPTY_CALENDAR": number, //當日是否未設定行事曆
"WORK_DATE_WEEK": number, //應出勤日期_星期
"SHIFT_TYPE": number, //員工班別屬性
"SHIFT_ID": number, //員工班別_ID
"CALENDAR_BASIC_ID": number, //員工行事曆_ID
"CALENDAR_LEAVE_ID": number, //員工行事曆類別_ID
"WORK_LABEL_IDS": string, //班別標籤
"IS_LEAVE_OVERTIME": number, //行事曆可否加班
"WORKDAY_STIME":date, //班別曆日區間-起
"WORKDAY_ETIME":date, //班別曆日區間-迄
"CLOCK_FIRST_TIME":date, //班別最早有效刷卡時間起
"CLOCK_LAST_TIME":date, //班別最晚有效刷卡時間迄
"WORKTIME_START":date, //上班時間起
"WORKTIME_END":date, //上班時間迄
"WORK_HOURS": number, //班別時數
"REAL_HOURS": number, //當日班別時數時數
"PAY_TYPE": string, //加班支領方式
},
Authorizations
Body
CO_IDintegerRequired
公司ID
WORK_SDATEstring | dateRequired
出勤日期起
WORK_EDATEstring | dateRequired
出勤日期迄
EMP_IDintegerRequired
員工ID
Responses
200
成功
```
{
code: 200,
data: [emp_worktime, emp_worktime, ...]
}
```
401
認證失敗 (請更新 accessToken 再試一次)
403
權限不足
440
參數錯誤 (請檢查 parameters 或 request body 的欄位、格式是否完整及正確)
500
系統異常 `{ code: 500, msg: string }`
post
POST /api/am/emp_worktime HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 79
{
"CO_ID": 13,
"WORK_SDATE": "2021/01/01",
"WORK_EDATE": "2021/12/31",
"EMP_ID": 33389
}
No content
使用說明: 依 Max 時段排班範本格式產生 excel 後,打這個 API
Authorizations
Body
CO_IDintegerRequired
公司ID
START_DATEstringRequired
班表日期起
END_DATEstringRequired
班表日期迄
attachmentstring · binaryRequired
multipart request 的 field name 必須是 'attachment'
Responses
200
成功
```
{
code: integer, msg: string, commitResult?: object,
fails?: [
{
"empNo": string, //員工編號
"empName": string, //中文姓名
"workDate": string, //日期
"caleName": string, //行事曆別
"error": string, //錯誤資訊
"swork0": string, //班別1開始時間
"ework0": string, //班別1結束時間
"lab0_0": string, //班別1標籤
...
}, ...
],
}
```
401
認證失敗 (請更新 accessToken 再試一次)
403
權限不足
440
參數錯誤 (請檢查 parameters 或 request body 的欄位、格式是否完整及正確)
450
MulterError `{ code: 450, msg?: string }`
490
{ code: integer, msg: string }
500
系統異常 `{ code: 500, msg: string }`
post
POST /api/am/section/import HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: multipart/form-data
Accept: */*
Content-Length: 71
{
"CO_ID": 1,
"START_DATE": "text",
"END_DATE": "text",
"attachment": "binary"
}
No content