token: ********************{
"equip_id": 8, // 对应设备的id
"plan_type": "maintenance", // 计划类型:inspection-巡检,maintenance-保养, 见字典`equip_plan_type`
"plan_list": [
{
"id": 0, // 该计划的id, 添加的时候默认为0
"job_id": 4, // 岗位id
"cycle_type": "day", // 计划周期类型
"cycle_value": 1, // 每n周期执行一次,比如每2天执行一次,每两周执行一次
"plan_items": [
{
"item_title": "保养计划项目标题",
"item_content": "保养计划内容",
},
],
"task_duration": 10 // 任务执行时长, 秒
},
{
"id": 0, // 该计划的id, 添加的时候默认为0
"job_id": 4, // 岗位id
"cycle_type": "day", // 计划周期类型
"cycle_value": 1, // 每n周期执行一次,比如每2天执行一次,每两周执行一次
"plan_items": [
{
"item_title": "保养计划项目标题",
"item_content": "保养计划内容",
},
],
"task_duration": 10 // 任务执行时长, 秒
},
]
}curl --location 'https://safe.fetribe.cn/adminapi/v2.equip.equipPlan/batchAddOrUpdate' \
--header 'token: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"equip_id": 8, // 对应设备的id
"plan_type": "maintenance", // 计划类型:inspection-巡检,maintenance-保养, 见字典`equip_plan_type`
"plan_list": [
{
"id": 0, // 该计划的id, 添加的时候默认为0
"job_id": 4, // 岗位id
"cycle_type": "day", // 计划周期类型
"cycle_value": 1, // 每n周期执行一次,比如每2天执行一次,每两周执行一次
"plan_items": [
{
"item_title": "保养计划项目标题",
"item_content": "保养计划内容",
},
],
"task_duration": 10 // 任务执行时长, 秒
},
{
"id": 0, // 该计划的id, 添加的时候默认为0
"job_id": 4, // 岗位id
"cycle_type": "day", // 计划周期类型
"cycle_value": 1, // 每n周期执行一次,比如每2天执行一次,每两周执行一次
"plan_items": [
{
"item_title": "保养计划项目标题",
"item_content": "保养计划内容",
},
],
"task_duration": 10 // 任务执行时长, 秒
},
]
}'{
"code": 1,
"show": 1,
"msg": "添加成功",
"data": []
}