预览服务组排班。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求头
该接口使用公共请求头,无特殊请求头。请参见公共请求参数文档。
请求语法
POST /services/group/scheduling/preview HTTP/1.1
请求参数
名称 | 类型 | 位置 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|---|
Object | Body | 否 | A short description of struct |
||
serviceGroupId | Long | Body | 是 | 55555 | 服务组ID |
schedulingWay | String | Body | 是 | FAST | 排班方式 FAST 快速排班 FINE 精细排班 |
fastScheduling | Object | Body | 否 | 快速排班 |
|
singleDuration | Integer | Body | 否 | 12 | 每人排班时长 |
dutyPlan | String | Body | 否 | FAST_CHOICE | FAST_CHOICE |
singleDurationUnit | String | Body | 否 | DAY | DAY |
schedulingUsers | Array | Body | 否 | 快速轮班用户 |
|
schedulingUserId | Long | Body | 否 | 122222 | 轮班用户ID |
schedulingOrder | Integer | Body | 否 | 1 | 排班顺序 |
fineScheduling | Object | Body | 否 | 精细排班 |
|
period | Integer | Body | 否 | 2 | 循环周期 |
periodUnit | String | Body | 否 | DAY | 循环周期单位 HOUR 小时 DAY 天 |
shiftType | String | Body | 否 | MORNING_NIGHT | 班次类型 MORNING_NIGHT 早晚班 MORNING_NOON_NIGHT 早中晚班 CUSTOM 自定义 |
schedulingFineShifts | Array | Body | 否 | 精细排班班次人员信息 |
|
schedulingStartTime | String | Body | 否 | 2020-08-13 | 排班开始时间 |
schedulingEndTime | String | Body | 否 | 2020-10-13 | 排班结束时间 |
schedulingOrder | Long | Body | 否 | 1 | 排班顺序 |
shiftName | String | Body | 否 | 早班 | 班次名称 |
clientToken | String | Body | 否 | C4BE3837-1A13-413B-A225-2C88188E8A43 | 幂等号 |
endTime | String | Body | 否 | 2021-09-01 00:00:00 | 预览值班开始时间 |
startTime | String | Body | 否 | 2021-11-01 00:00:00 | 预览值班结束时间 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
requestId | String | xxxxxxxxx | Id of the request |
data | Map | 服务组日期 |
示例
请求示例
POST /services/group/scheduling/preview HTTP/1.1
Host:gemp.aliyuncs.com
Content-Type:application/json
{
"serviceGroupId" : 55555,
"schedulingWay" : "FAST",
"fastScheduling" : {
"singleDuration" : 12,
"dutyPlan" : "FAST_CHOICE",
"singleDurationUnit" : "DAY",
"schedulingUsers" : [ {
"schedulingUserId" : 122222,
"schedulingOrder" : 1
} ]
},
"fineScheduling" : {
"period" : 2,
"periodUnit" : "DAY",
"shiftType" : "MORNING_NIGHT",
"schedulingFineShifts" : [ {
"schedulingStartTime" : "2020-08-13",
"schedulingEndTime" : "2020-10-13",
"schedulingOrder" : 1,
"shiftName" : "早班"
} ]
},
"clientToken" : "C4BE3837-1A13-413B-A225-2C88188E8A43",
"endTime" : "2021-09-01 00:00:00",
"startTime" : "2021-11-01 00:00:00"
}
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<GetServiceGroupSchedulingPreviewResponse>
<requestId>xxxxxxxxx</requestId>
</GetServiceGroupSchedulingPreviewResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"requestId" : "gdgsdgsggsdg",
"data" : {
"2021-08-24" : [ {
"schedulingDate" : "2021-08-24",
"schedulingStartTime" : "2021-08-24 09:00:00",
"schedulingEndTime" : "2021-08-24 11:00:00",
"schedulingUserId" : 64,
"schedulingUserName" : "wy",
"schedulingOrder" : 1
}, {
"schedulingDate" : "2021-08-24",
"schedulingStartTime" : "2021-08-24 11:00:00",
"schedulingEndTime" : "2021-08-24 24:00:00",
"schedulingUserId" : 110000001,
"schedulingUserName" : "lj",
"schedulingOrder" : 2
} ],
"2021-08-25" : [ {
"schedulingDate" : "2021-08-25",
"schedulingStartTime" : "2021-08-25 00:00:00",
"schedulingEndTime" : "2021-08-25 09:00:00",
"schedulingUserId" : 110000001,
"schedulingUserName" : "lj",
"schedulingOrder" : 2
} ]
}
}
返回示例补充说明
{
"endTime": "2021-10-01 00:00:00",
"startTime": "2021-08-01 00:00:00",
"serviceGroupId": "160000010",
"schedulingWay": "FINE",
"fineScheduling": {
"id": 13,
"period": 1,
"periodUnit": "DAY",
"shiftType": "MORNING_NIGHT",
"schedulingFineShifts": [
{
"schedulingStartTime": "09:00:00",
"schedulingEndTime": "11:00:00",
"schedulingOrder": 1,
"cycleOrder": 1,
"schedulingUserId": 64,
"schedulingUserName": "wy",
"shiftName": "早班",
"skipOneDay": false
},
{
"schedulingStartTime": "11:00:00",
"schedulingEndTime": "09:00:00",
"schedulingOrder": 2,
"cycleOrder": 1,
"schedulingUserId": 110000001,
"schedulingUserName": "lj",
"shiftName": "中班",
"skipOneDay": true
}
]
}
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | InvalidParameter | The specified parameter is not valid. %s | 参数非法 |
访问错误中心查看更多错误码。
访问错误中心查看更多错误码。