创建任务场景(API名称:createTaskSceneTemplate)
功能介绍
创建任务场景,任务模式:任务下挂检查单。
相关API
接口名称 |
调用说明 |
---|---|
调用该接口获取到Token,再调用其他接口时,需要在请求消息头中添加“Authorization”,其值即为Token。 |
URL
请求方式 |
HTTPS地址 |
服务架构 |
消息体类型 |
---|---|---|---|
POST |
https://isdp+域名/openapi/v1/openTaskScene/createTaskSceneTemplate |
OpenAPI |
application/json |
请求头
KEY |
VALUE |
是否必填 |
描述 |
---|---|---|---|
Content-Type |
application/json |
是 |
无 |
Authorization |
bearer ${access_token} |
是 |
bearer +“ ”+5.2.1中获取的access_token的值 |
请求参数
参数 |
类型 |
是否必填 |
描述 |
---|---|---|---|
dataSource |
String |
是 |
创建来源标识。 |
submitterAccount |
String |
是 |
提交人账号。 |
taskSceneBaseFieldList |
Object |
是 |
基础字段。 |
taskSceneExtendFieldList |
Object |
否 |
扩展字段 |
subBaseFieldConfig |
List |
否 |
子任务场景基础字段(父子任务场景中使用) |
subTaskExtendFieldList |
List |
否 |
子任务场景扩展字段(父子任务场景中使用) |
sceneMode |
Integer |
否 |
任务场景模式。 1:简单任务 2:关联作业检查清单 3:任务启用工序 4:父子任务 |
sceneStatus |
Integer |
否 |
任务场景状态。0:草稿 1:可用 2:停用 |
operationFlag |
String |
是 |
是否是提交或者保存草稿。 Y:提交 N:保存草稿 |
taskSceneModeList |
Object |
是 |
任务场景配置模板信息。 |
headerInfo |
Object |
是 |
任务场景配置场景信息。 |
isApplyApprove |
Integer |
否 |
是否需要申请审批。0:否 1:是 |
reviewProcessId |
Long |
否 |
评审流ID。 |
reviewProcessName |
String |
否 |
评审流名称。 |
adminOrganizationCode |
String |
是 |
组织单元ID。 |
adminOrganizationName |
String |
是 |
组织单元名称。 |
signInConfig |
Integer |
否 |
是否启用打卡配置。1:启用 0:不启用 null:该场景没有引入打卡配置 |
参数 |
类型 |
是否必填 |
描述 |
---|---|---|---|
fieldName |
String |
是 |
字段名称。 |
fieldStatus |
Integer |
是 |
字段状态。
|
fieldIsNecessary |
Integer |
是 |
是否必填。
|
fieldCode |
String |
是 |
字段编码。 |
fieldOrder |
Integer |
是 |
字段排序序号。 |
fieldDefaultValue |
String |
否 |
基础字段默认值。 |
extraData1 |
String |
否 |
附加属性。 |
参数 |
类型 |
是否必填 |
描述 |
---|---|---|---|
fieldName |
String |
是 |
字段名称。 |
fieldStatus |
Integer |
是 |
字段状态。1:可用 2:停用 |
fieldCode |
String |
是 |
字段编码。 |
参数 |
类型 |
是否必填 |
描述 |
---|---|---|---|
fieldName |
String |
是 |
自定义字段名称。 |
fieldType |
Integer |
是 |
扩展字段类型。1:文本 2:枚举 3:多枚举 4:日期 5:时间 6:整数;7:小数;20:短文本 0:无意义,字段默认值。 |
fieldStatus |
Integer |
是 |
字段状态。 |
fieldCode |
String |
是 |
字段编码。 |
scopeList |
Object |
是 |
适用范围。1:标准任务 |
fieldOrder |
Integer |
是 |
字段排序序号,从0开始。 |
fieldValue |
String |
否 |
字段枚举值。 |
fieldDefaultValue |
String |
否 |
字段默认值。 |
fieldIsNecessary |
Integer |
否 |
是否必填。1:必填 2:其它 |
enumList |
Object |
否 |
枚举值列表。 |
sceneExtendEnumFieldList |
Object |
否 |
枚举值列表。 |
id |
Long |
是 |
主键ID(引入时)。 |
category |
Integer |
是 |
分属类别。1:任务 2:子任务 |
stage |
Integer |
否 |
任务场景扩展属性阶段 1:创建阶段 2:执行阶段 |
unitName |
String |
否 |
单位名称 |
参数 |
类型 |
是否必填 |
描述 |
---|---|---|---|
userId |
Long |
是 |
用户ID,执行人群组ID。 |
userName |
String |
是 |
用户名称。 |
userType |
Integer |
是 |
用户类型。
|
taskSceneModeList任务场景配置模板信息Object说明:
参数 |
类型 |
是否必填 |
描述 |
---|---|---|---|
collectionProcessType |
Integer |
否 |
审批流类型。
|
collectionReviewId |
Long |
否 |
采集评审流ID。 |
collectionReviewName |
String |
否 |
用户类型。
|
customCollectionReviewerList |
Object |
否 |
采集评审人列表。 |
isAppraisal |
Integer |
否 |
是否需要采集评审。
|
modeOrder |
Integer |
是 |
排序序号,从1开始。 |
sceneMode |
Integer |
否 |
任务场景模式。
|
sceneModeName |
String |
否 |
不汲及 子任务/工序名称 |
oldSceneModeName |
String |
否 |
不汲及 升级前子任务/工序名称 |
templateCode |
String |
否 |
模板编码。 |
templateId |
Long |
否 |
模板ID。 |
templateName |
String |
否 |
模板名称。 |
templateVersion |
String |
否 |
模板模板号。 |
templateType |
Integer |
否 |
模板类型。
|
templateModel |
Object |
否 |
创建新的模板,kcpList不为空则直接发布新的模板。 |
kcpList |
Object |
否 |
创建新的KCP列表信息。 |
subTaskExtendFieldList |
List |
否 |
创建父子任务场景,子任务扩展属性对象 |
参数 |
类型 |
是否必填 |
描述 |
---|---|---|---|
fieldCode |
String |
是 |
场景名称。 |
fieldDefaultValue |
String |
否 |
场景描述。 |
stage |
Integer |
否 |
子任务场景扩展属性阶段 1:创建阶段 2:执行阶段 |
其中templateModel、kcpList参数参照保存检查单模板KCP、ITEM信息接口。
参数 |
类型 |
是否必填 |
描述 |
---|---|---|---|
sceneName |
String |
是 |
场景名称。 |
sceneRemark |
String |
否 |
场景描述。 |
adminOrganizationCode |
String |
是 |
组织单元ID。 |
adminOrganizationName |
String |
是 |
组织单元名称。 |
category |
String |
否 |
领域场景。 |
id |
Long |
否 |
领域场景(任务类别ID)。 |
sceneType |
Integer |
否 |
场景创建类型。
|
响应参数
参数 |
类型 |
描述 |
---|---|---|
stateCode |
String |
响应编码。 |
errorMessage |
String |
错误信息。 |
result |
Object |
响应数据。 |
请求示例
{ "taskSceneFileList": [], "taskSceneBaseFieldList": [ { "itemId": "374104", "fieldName": "作业对象修11", "fieldStatus": 1, "itemAttr1": "2", "fieldCode": "location", "itemAttr3": "", "itemAttr2": "2", "itemAttr5": "", "itemAttr4": "", "fieldOrder": 1, "itemDesc": "ATTR1:状态(1-可用, 2-停用),ATTR2是否必填(1-必填, 2-不必填),ATTR3不可修改字段", "classifyCode": "QC_TASK_BASE_FIELD", "fieldIsNecessary": 1, "_RID": "row_1" }, { "itemId": "374072", "fieldName": "行政区域修改11", "fieldStatus": 1, "itemAttr1": "", "fieldCode": "administrativeDivision", "itemAttr3": "", "itemAttr2": "2", "itemAttr5": "", "itemAttr4": "", "fieldOrder": 2, "itemDesc": "ATTR1:状态(1-可用, 2-停用),ATTR2是否必填(1-必填, 2-不必填),ATTR3不可修改字段", "classifyCode": "QC_TASK_BASE_FIELD", "fieldIsNecessary": 1, "_RID": "row_2" }, { "itemId": "374073", "fieldName": "详细地址11", "fieldStatus": 2, "itemAttr1": "", "fieldCode": "address", "itemAttr3": "", "itemAttr2": "2", "itemAttr5": "", "itemAttr4": "", "fieldOrder": 3, "itemDesc": "ATTR1:状态(1-可用, 2-停用),ATTR2是否必填(1-必填, 2-不必填),ATTR3不可修改字段", "classifyCode": "QC_TASK_BASE_FIELD", "fieldIsNecessary": 2, "_RID": "row_3" }, { "itemId": "375297", "fieldName": "项目修改11", "fieldStatus": 2, "itemAttr1": "2", "fieldCode": "projectNo", "itemAttr3": "", "itemAttr2": "2", "itemAttr5": "", "itemAttr4": "", "fieldOrder": 4, "itemDesc": "ATTR1:状态(1-可用, 2-停用),ATTR2是否必填(1-必填, 2-不必填),ATTR3不可修改字段", "classifyCode": "QC_TASK_BASE_FIELD", "fieldIsNecessary": 2, "_RID": "row_4" }, { "itemId": "375298", "fieldName": "供应商1", "fieldStatus": 2, "itemAttr1": "2", "fieldCode": "supplier", "itemAttr3": "", "itemAttr2": "2", "itemAttr5": "", "itemAttr4": "", "fieldOrder": 5, "itemDesc": "ATTR1:状态(1-可用, 2-停用),ATTR2是否必填(1-必填, 2-不必填),ATTR3不可修改字段", "classifyCode": "QC_TASK_BASE_FIELD", "fieldIsNecessary": 2, "_RID": "row_5" }, { "itemId": "374074", "fieldName": "客户1", "fieldStatus": 2, "itemAttr1": "", "fieldCode": "customer", "itemAttr3": "", "itemAttr2": "2", "itemAttr5": "", "itemAttr4": "", "fieldOrder": 6, "itemDesc": "ATTR1:状态(1-可用, 2-停用),ATTR2是否必填(1-必填, 2-不必填),ATTR3不可修改字段", "classifyCode": "QC_TASK_BASE_FIELD", "fieldIsNecessary": 2, "_RID": "row_6" }, { "itemId": "374075", "fieldName": "标准作业时长1", "fieldStatus": 2, "itemAttr1": "", "fieldCode": "jobDuration", "itemAttr3": "", "itemAttr2": "2", "itemAttr5": "", "itemAttr4": "", "fieldOrder": 7, "itemDesc": "ATTR1:状态(1-可用, 2-停用),ATTR2是否必填(1-必填, 2-不必填),ATTR3不可修改字段", "classifyCode": "QC_TASK_BASE_FIELD", "fieldIsNecessary": 2, "_RID": "row_7" }, { "itemId": "374076", "fieldName": "工期1", "fieldStatus": 2, "itemAttr1": "", "fieldCode": "projectDuration", "itemAttr3": "", "itemAttr2": "2", "itemAttr5": "", "itemAttr4": "", "fieldOrder": 8, "itemDesc": "ATTR1:状态(1-可用, 2-停用),ATTR2是否必填(1-必填, 2-不必填),ATTR3不可修改字段", "classifyCode": "QC_TASK_BASE_FIELD", "fieldIsNecessary": 2, "_RID": "row_8" }, { "itemId": "375299", "fieldName": "计划开始时间1", "fieldStatus": 1, "itemAttr1": "2", "fieldCode": "planBeginDate", "itemAttr3": "", "itemAttr2": "2", "itemAttr5": "", "itemAttr4": "", "fieldOrder": 9, "itemDesc": "ATTR1:状态(1-可用, 2-停用),ATTR2是否必填(1-必填, 2-不必填),ATTR3不可修改字段", "classifyCode": "QC_TASK_BASE_FIELD", "fieldIsNecessary": 1, "_RID": "row_9" }, { "itemId": "375300", "fieldName": "计划完成时间1", "fieldStatus": 1, "itemAttr1": "2", "fieldCode": "planEndDate", "itemAttr3": "", "itemAttr2": "2", "itemAttr5": "", "itemAttr4": "", "fieldOrder": 10, "itemDesc": "ATTR1:状态(1-可用, 2-停用),ATTR2是否必填(1-必填, 2-不必填),ATTR3不可修改字段", "classifyCode": "QC_TASK_BASE_FIELD", "fieldIsNecessary": 1, "_RID": "row_10" }, { "itemId": "374077", "fieldName": "要求开始时间1", "fieldStatus": 2, "itemAttr1": "", "fieldCode": "requiredStartTime", "itemAttr3": "", "itemAttr2": "2", "itemAttr5": "", "itemAttr4": "", "fieldOrder": 11, "itemDesc": "ATTR1:状态(1-可用, 2-停用),ATTR2是否必填(1-必填, 2-不必填),ATTR3不可修改字段", "classifyCode": "QC_TASK_BASE_FIELD", "fieldIsNecessary": 2, "_RID": "row_11" }, { "itemId": "374078", "fieldName": "要求完成时间1", "fieldStatus": 2, "itemAttr1": "", "fieldCode": "requiredEndTime", "itemAttr3": "", "itemAttr2": "2", "itemAttr5": "", "itemAttr4": "", "fieldOrder": 12, "itemDesc": "ATTR1:状态(1-可用, 2-停用),ATTR2是否必填(1-必填, 2-不必填),ATTR3不可修改字段", "classifyCode": "QC_TASK_BASE_FIELD", "fieldIsNecessary": 2, "_RID": "row_12" }, { "itemId": "374079", "fieldName": "优先级1", "fieldStatus": 2, "itemAttr1": "", "fieldCode": "priority", "itemAttr3": "", "itemAttr2": "2", "itemAttr5": "", "itemAttr4": "", "fieldOrder": 13, "itemDesc": "ATTR1:状态(1-可用, 2-停用),ATTR2是否必填(1-必填, 2-不必填),ATTR3不可修改字段", "classifyCode": "QC_TASK_BASE_FIELD", "fieldIsNecessary": 2, "_RID": "row_13" }, { "itemId": "374038", "fieldName": "要求技能1", "fieldStatus": 2, "itemAttr1": "", "fieldCode": "skill", "itemAttr3": "", "itemAttr2": "2", "itemAttr5": "", "itemAttr4": "", "fieldOrder": 14, "itemDesc": "ATTR1:状态(1-可用, 2-停用),ATTR2是否必填(1-必填, 2-不必填),ATTR3不可修改字段", "classifyCode": "QC_TASK_BASE_FIELD", "fieldIsNecessary": 2, "_RID": "row_14" }, { "itemId": "374080", "fieldName": "调度模式1", "fieldStatus": 2, "itemAttr1": "", "fieldCode": "schedulingMode", "itemAttr3": "", "itemAttr2": "2", "itemAttr5": "", "itemAttr4": "", "fieldOrder": 15, "itemDesc": "ATTR1:状态(1-可用, 2-停用),ATTR2是否必填(1-必填, 2-不必填),ATTR3不可修改字段", "classifyCode": "QC_TASK_BASE_FIELD", "fieldIsNecessary": 2, "_RID": "row_15" }, { "itemId": "375305", "fieldName": "操作指导1", "fieldStatus": 2, "itemAttr1": "2", "fieldCode": "operationGuide", "itemAttr3": "fieldIsNecessary", "itemAttr2": "2", "itemAttr5": "", "itemAttr4": "", "fieldOrder": 16, "itemDesc": "ATTR1:状态(1-可用, 2-停用),ATTR2是否必填(1-必填, 2-不必填),ATTR3不可修改字段", "classifyCode": "QC_TASK_BASE_FIELD", "fieldIsNecessary": 2, "_RID": "row_16" }, { "itemId": "375304", "fieldName": "附件1", "fieldStatus": 2, "itemAttr1": "2", "fieldCode": "attachment", "itemAttr3": "", "itemAttr2": "2", "itemAttr5": "", "itemAttr4": "", "fieldOrder": 17, "itemDesc": "ATTR1:状态(1-可用, 2-停用),ATTR2是否必填(1-必填, 2-不必填),ATTR3不可修改字段", "classifyCode": "QC_TASK_BASE_FIELD", "fieldIsNecessary": 2, "_RID": "row_17" }, { "itemId": "375303", "fieldName": "关联问题1", "fieldStatus": 2, "itemAttr1": "2", "fieldCode": "associatedIssues", "itemAttr3": "", "itemAttr2": "2", "itemAttr5": "", "itemAttr4": "", "fieldOrder": 18, "itemDesc": "ATTR1:状态(1-可用, 2-停用),ATTR2是否必填(1-必填, 2-不必填),ATTR3不可修改字段", "classifyCode": "QC_TASK_BASE_FIELD", "fieldIsNecessary": 2, "_RID": "row_18" }, { "itemId": "375302", "fieldName": "任务描述12", "fieldStatus": 2, "itemAttr1": "2", "fieldCode": "taskDescription", "itemAttr3": "", "itemAttr2": "2", "itemAttr5": "", "itemAttr4": "", "fieldOrder": 19, "itemDesc": "ATTR1:状态(1-可用, 2-停用),ATTR2是否必填(1-必填, 2-不必填),ATTR3不可修改字段", "classifyCode": "QC_TASK_BASE_FIELD", "fieldIsNecessary": 2, "_RID": "row_19" }, { "itemId": "379610", "fieldName": "抄送人1", "fieldStatus": 2, "itemAttr1": "", "fieldCode": "ccPerson", "itemAttr3": "", "itemAttr2": "", "itemAttr5": "", "itemAttr4": "", "fieldOrder": 20, "itemDesc": "", "classifyCode": "QC_TASK_BASE_FIELD", "fieldIsNecessary": 2, "_RID": "row_20" }, { "itemId": "379746", "fieldName": "责任人1", "fieldStatus": 2, "itemAttr1": "", "fieldCode": "owner", "itemAttr3": "", "itemAttr2": "", "itemAttr5": "", "itemAttr4": "", "fieldOrder": 21, "itemDesc": "", "classifyCode": "QC_TASK_BASE_FIELD", "fieldIsNecessary": 2, "_RID": "row_21" }, { "fieldName": "执行人", "fieldStatus": 1, "fieldIsNecessary": 1, "fieldCode": "executor", "fieldOrder": 22, "fieldDefaultValue": [], "_RID": "row_22" }, { "itemId": "630405", "fieldName": "许可配置1", "fieldStatus": 2, "itemAttr1": "", "fieldCode": "licenseConfig", "itemAttr3": "", "itemAttr2": "2", "itemAttr5": "", "itemAttr4": "", "fieldOrder": 23, "itemDesc": "ATTR1:状态(1-可用, 2-停用),ATTR2是否必填(1-必填, 2-不必填),ATTR3不可修改字段", "classifyCode": "QC_TASK_BASE_FIELD", "fieldIsNecessary": 2 }, { "itemId": "375301", "fieldName": "审批流配置1", "fieldStatus": 2, "itemAttr1": "", "fieldCode": "reviewRuleConfig", "itemAttr3": "", "itemAttr2": "2", "itemAttr5": "", "itemAttr4": "", "fieldOrder": 24, "itemDesc": "ATTR1:状态(1-可用, 2-停用),ATTR2是否必填(1-必填, 2-不必填),ATTR3不可修改字段", "classifyCode": "QC_TASK_BASE_FIELD", "fieldIsNecessary": 2 }, { "itemId": "630406", "fieldName": "关联视频设备1", "fieldStatus": 2, "itemAttr1": "", "fieldCode": "associatingVideoDevice", "itemAttr3": "", "itemAttr2": "2", "itemAttr5": "", "itemAttr4": "", "fieldOrder": 25, "itemDesc": "ATTR1:状态(1-可用, 2-停用),ATTR2是否必填(1-必填, 2-不必填),ATTR3不可修改字段", "classifyCode": "QC_TASK_BASE_FIELD", "fieldIsNecessary": 2 }, { "itemId": "377320", "fieldName": "打卡配置1", "fieldStatus": 2, "itemAttr1": "", "fieldCode": "signInConfig", "itemAttr3": "", "itemAttr2": "", "itemAttr5": "", "itemAttr4": "", "fieldOrder": 26, "itemDesc": "ATTR1:状态(1-可用, 2-停用),ATTR2是否必填(1-必填, 2-不必填),ATTR3不可修改字段", "classifyCode": "QC_TASK_BASE_FIELD", "fieldIsNecessary": 2 } ], "taskSceneExtendFieldList": [ { "id": 2709, "category": 1, "parentExtendId": 0, "fieldName": "长文本有值", "fieldStatus": 1, "fieldIsNecessary": 1, "fieldOrder": 1, "fieldValue": "", "fieldDefaultValue": "12345678902345678901234567890123456789012123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012312345678901234567890123456789012345678901212345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890345678901456789034567890", "scopeList": [ 1, 2 ], "fieldCode": "UDF15", "fieldType": 1, "enumList": [], "_RID": "row_23", "sceneExtendEnumFieldList": [] } ], "sceneMode": 2, "taskSceneModeList": [ { "sceneMode": 2, "templateId": 263489, "templateCode": "QC2022XXXXXXXXXXXX", "templateVersion": "1.0", "templateName": "模板名称023", "templateType": 1, "isAppraisal": 1, "collectionReviewId": "", "collectionReviewName": "", "modeOrder": 1, "sceneModeName": "", "licenseSwitch": 0, "oldSceneModeName": "" } ], "reviewProcessName": "", "reviewProcessId": "", "isApplyApprove": null, "sceneLicense": null, "signInConfig": "1", "headerInfo": { "sceneName": "场景名称1111", "sceneRemark": "场景描述", "adminOrganizationCode": 830, "adminOrganizationName": "杨凌作业系统测试1", "coverId": "", "category": "1", "id": 3294 }, "sceneStatus": 1, "operationFlag": "Y" }
响应示例
{"stateCode":"0","errorMessage":null,"result":{"sceneId":103209}}