新增许可(API名称:createWorkTicket)
功能介绍
该接口用于创建许可单。
相关API
接口名称 |
调用说明 |
---|---|
调用该接口获取到Token,再调用其他接口时,需要在请求消息头中添加“Authorization”,其值即为Token。 |
URL
请求方式 |
HTTPS地址 |
服务架构 |
消息体类型 |
---|---|---|---|
POST |
https://isdp+域名/openapi/v1/openSceneTask/createWorkTicket |
OpenAPI |
application/json |
请求头
KEY |
VALUE |
是否必填 |
描述 |
---|---|---|---|
Content-Type |
application/json |
是 |
无 |
Authorization |
bearer ${access_token} |
是 |
bearer +“ ”+5.2.1中获取的access_token的值 |
请求参数
参数 |
类型 |
是否必填 |
描述 |
---|---|---|---|
submitForReview |
String |
是 |
是否提交(Y-是;N-否)
说明:
此处是否提交不会更新许可的阶段状态,仅更新许可的草稿和发布两种状态。 |
baseWorkTicketModel |
Object |
是 |
许可基础数据 |
attributeWorkTicketList |
List |
否 |
拓展字段列表 |
baseWorkTicketModel入参:
参数 |
类型 |
是否必填 |
描述 |
---|---|---|---|
sceneId |
Long |
是 |
场景id |
sceneCode |
String |
否 |
场景编码 |
adminOrganization |
Long |
否 |
组织单元id |
adminOrganizationName |
String |
否 |
组织单元名称 |
ticketName |
String |
是 |
许可单名称 |
ticketCode |
String |
否 |
许可单编码,可按规则生成 |
beginTimestamp |
Long |
否 |
计划开始时间(时间戳) |
endTimestamp |
Long |
否 |
计划结束时间(时间戳) |
ticketRemark |
String |
否 |
许可单备注信息 |
workUserPICList |
List |
是 |
工作负责人列表 |
reviewRuleId |
Long |
否 |
审批流id |
reviewRuleName |
String |
否 |
审批流名称 |
reviewList |
List |
否 |
审批流列表 |
workUserPICList入参:
参数 |
类型 |
是否必填 |
描述 |
---|---|---|---|
userId |
Long |
否 |
用户id |
userName |
String |
否 |
用户名称 |
userType |
Int |
否 |
用户类型:1-个人;2-群组 |
reviewList入参:
参数 |
类型 |
是否必填 |
描述 |
---|---|---|---|
reviewerId |
Long |
否 |
审批人id |
reviewerName |
String |
否 |
审批人姓名 |
reviewLevel |
Int |
否 |
审批人层级 |
isOnlineReview |
Int |
否 |
是否抽样审批:0-否;1-是 |
attributeWorkTicketList入参:
参数 |
类型 |
是否必填 |
描述 |
---|---|---|---|
extendName |
String |
否 |
拓展属性名称 |
udfName |
String |
否 |
Udf名称 |
fieldOrder |
Int |
否 |
字段排序 |
extendType |
Int |
否 |
扩展字段类型(1:文本;2:枚举;3:多枚举;4:日期;5:时间) |
extendValue |
String |
否 |
拓展属性值 |
响应参数
参数 |
类型 |
描述 |
---|---|---|
stateCode |
int |
返回状态,0-正常;其他-异常 |
errorMessage |
String |
错误消息描述 |
result |
Object |
列表详细数据 |
result出参:
参数 |
类型 |
描述 |
---|---|---|
adminOrganizationName |
String |
组织单元名名称 |
ticketRemark |
String |
许可备注 |
deleteFlag |
Int |
删除标识:0-否;1-是 |
ticketPhaseCount |
Int |
许可阶段数量 |
sceneCode |
String |
场景编码 |
sceneId |
Long |
场景id |
ticketCurrentPhaseOrder |
Int |
当前阶段序号 |
licenseSysStatus |
Long |
系统阶段id |
ticketCode |
String |
许可编码 |
ticketCurrentPhaseId |
Long |
当前阶段id |
licenseBusiStatus |
Long |
许可业务状态id |
adminOrganization |
Long |
组织单元id |
ticketId |
Long |
许可id |
ticketName |
String |
许可名称 |
beginTimestamp |
Long |
计划开始时间戳 |
endTimestamp |
Long |
计划结束时间戳 |
assignedUserId |
Long |
执行人id |
assignedUserName |
String |
执行人姓名 |
ticketPhaseList |
List |
许可阶段列表 |
currentPhase |
Object |
当前阶段 |
attributeModelList |
List |
拓展属性列表 |
reviewRuleResult |
Object |
审批列表对象 |
ticketPhaseList、currentPhase出参:
参数 |
类型 |
描述 |
---|---|---|
checkBusiType |
Int |
检查单业务类型 |
checkOrderId |
Long |
检查单id |
checkOrderType |
Int |
工作票阶段生成的检查单类型(0:EHS;1:质量检查;2:巡检) |
isRejected |
Int |
是否已驳回(0-否;1-是) |
reviewSwitch |
Int |
是否启用审批开关(1-是 0-否) |
sceneInitialStatus |
Long |
初始状态 |
sceneSumbmitStatus |
Long |
提交状态 |
submitUserName |
String |
提交人姓名 |
templateCode |
String |
模板编码 |
templateId |
Long |
模板id |
ticketId |
Long |
许可id |
ticketPhaseCode |
String |
阶段编码 |
ticketPhaseId |
Long |
阶段id |
ticketPhaseName |
String |
阶段名称 |
ticketPhaseOrder |
Int |
阶段修好 |
ticketPhaseStatus |
Int |
许可单阶段状态(1-初始状态,待执行 2-阶段执行中(审批翻转)3-待评审 4-阶段完成) |
attributeModelList出参:
参数 |
类型 |
描述 |
---|---|---|
ticketId |
Long |
许可单主键id |
sceneTaskId |
Long |
任务ID,没有则为0 |
fieldOrder |
Int |
字段排序 |
extendName |
String |
拓展属性名称 |
extendType |
Int |
拓展属性类型 |
extendValue |
String |
拓展属性的值 |
fieldOrder |
Int |
拓展属性序号 |
udfName |
String |
Udf的名称 |
isNecessary |
Int |
是否必填:0-否;1-是 |
dataSource |
Int |
采集数来源(1:SYS 2:APP) |
reviewRuleResult出参:
参数 |
类型 |
描述 |
---|---|---|
reviewList |
List |
审批列表 |
reviewRuleId |
Long |
审批流id |
reviewList出参:
参数 |
类型 |
描述 |
---|---|---|
reviewerId |
Long |
审批人员id |
reviewerName |
String |
审批人姓名 |
reviewLevel |
Int |
审批层级 |
reviewerType |
Int |
审批人类型 |
revieweMode |
Int |
审批模式(0-单签,1-会签) |
请求示例
{ "ticketId": "", "baseWorkTicketModel": { "sceneId": 99124, "sceneCode": "周XX-0302", "adminOrganization": "830", "adminOrganizationName": "XX作业系统测试", "ticketName": "周XX-0302", "ticketCode": "", "beginTimestamp": "", "endTimestamp": 1647273599000, "ticketRemark": "任务描述", "workUserPICList": [ { "userId": 25773, "userName": "霍XX原lichao", "userType": 1 } ], "reviewList": [ { "reviewerId": 378817, "reviewerName": "周XX", "reviewLevel": 1, "isOnlineReview": 0, "reviewerType": "Admin", "id": 74758, "revieweMode": 0, "isEleSign": 0, "remark": "" }, { "reviewerId": 25804, "reviewerName": "刘XX", "reviewLevel": 2, "isOnlineReview": 0, "reviewerType": "Admin", "id": 74759, "revieweMode": 0, "isEleSign": 0, "remark": "" } ], "reviewRuleId": 35676, "reviewRuleName": "周XX-测试审批流", "processType": 0 }, "attributeWorkTicketList": [ { "id": "", "extendName": "文本", "udfName": "UDF1", "isNecessary": 1, "fieldOrder": 1, "extendType": 1, "extendValue": "文本" }, { "id": "", "extendName": "枚举必填", "udfName": "UDF2", "isNecessary": 1, "fieldOrder": 2, "extendType": 2, "extendValue": "222" }, { "id": "", "extendName": "多枚举", "udfName": "UDF3", "isNecessary": 1, "fieldOrder": 3, "extendType": 3, "extendValue": "aaa;bbb" } ], "submitForReview": "Y" }
响应示例
{ "stateCode": "0", "errorMessage": null, "result": { "sceneId": 99124, "sceneCode": "PS20220302113005046", "ticketName": "周XX-0302", "ticketCode": "SaasTenant886_20220314_031964", "adminOrganization": "830", "adminOrganizationName": "XX作业系统测试", "ticketRemark": "任务描述", "beginTimestamp": null, "endTimestamp": 1647273599000, "ticketPhaseCount": 3, "ticketCurrentPhaseOrder": 1, "deleteFlag": 0, "tenantId": 886, "createdBy": 390841, "createName": "zdrun-test", "creationDate": "2022-03-14T02:30:39.892+00:00", "creationTimestamp": 1647225039861, "lastUpdatedBy": 390841, "lastUpdateName": "zdrun-test", "lastUpdateDate": "2022-03-14T02:30:39.892+00:00", "lastUpdateTimestamp": 1647225039861, "entityName": "workTicket", "ticketId": 88671, "appName": "isdp-task-server", "affectedRows": 1, "assignedUserId": "25773", "assignedUserName": "霍XX原lichao", "attributeModelList": [ { "ticketId": 88671, "sceneTaskId": 0, "extendName": "文本", "extendType": 1, "extendValue": "文本", "udfName": "UDF1", "fieldOrder": 1, "isNecessary": 1, "dataSource": 1, "deleteFlag": 0, "tenantId": 886, "lastUpdateDate": "2022-03-14T02:30:39.953+00:00", "lastUpdateTimestamp": 1647225039925, "lastUpdatedBy": 390841, "lastUpdateName": "zdrun-test", "creationDate": "2022-03-14T02:30:39.953+00:00", "creationTimestamp": 1647225039925, "createdBy": 390841, "createName": "zdrun-test", "entityName": "TaskAttribute", "id": 324680, "appName": "isdp-task-server", "affectedRows": -2 }, { "ticketId": 88671, "sceneTaskId": 0, "extendName": "枚举必填", "extendType": 2, "extendValue": "222", "udfName": "UDF2", "fieldOrder": 2, "isNecessary": 1, "dataSource": 1, "deleteFlag": 0, "tenantId": 886, "lastUpdateDate": "2022-03-14T02:30:39.954+00:00", "lastUpdateTimestamp": 1647225039925, "lastUpdatedBy": 390841, "lastUpdateName": "zdrun-test", "creationDate": "2022-03-14T02:30:39.954+00:00", "creationTimestamp": 1647225039925, "createdBy": 390841, "createName": "zdrun-test", "entityName": "TaskAttribute", "id": 324681, "appName": "isdp-task-server", "affectedRows": -2 }, { "ticketId": 88671, "sceneTaskId": 0, "extendName": "多枚举", "extendType": 3, "extendValue": "aaa;bbb", "udfName": "UDF3", "fieldOrder": 3, "isNecessary": 1, "dataSource": 1, "deleteFlag": 0, "tenantId": 886, "lastUpdateDate": "2022-03-14T02:30:39.954+00:00", "lastUpdateTimestamp": 1647225039925, "lastUpdatedBy": 390841, "lastUpdateName": "zdrun-test", "creationDate": "2022-03-14T02:30:39.954+00:00", "creationTimestamp": 1647225039925, "createdBy": 390841, "createName": "zdrun-test", "entityName": "TaskAttribute", "id": 324682, "appName": "isdp-task-server", "affectedRows": -2 } ], "ticketPhaseList": [ { "ticketId": 88671, "ticketPhaseName": "阶段1", "ticketPhaseOrder": 1, "ticketPhaseStatus": 1, "isRejected": 0, "templateCode": "QC2022XXXXXXXXXXXXX", "templateId": 221760, "reviewSwitch": 1, "reviewRuleId": 35676, "sceneInitialStatus": 1084, "sceneReviewStatus": 1170, "sceneSumbmitStatus": 1085, "ticketPhaseCode": "50412", "deleteFlag": 0, "tenantId": 886, "createdBy": 390841, "createName": "zdrun-test", "creationDate": "2022-03-14T02:30:39.980+00:00", "creationTimestamp": 1647225039959, "lastUpdatedBy": 390841, "lastUpdateName": "zdrun-test", "lastUpdateDate": "2022-03-14T02:30:39.980+00:00", "lastUpdateTimestamp": 1647225039959, "initialSystemStatusCode": "1", "initialStatus": 1084, "entityName": "workTicketPhase", "ticketPhaseId": 239405, "appName": "isdp-task-server", "affectedRows": 1, "checkOrderId": 5762624, "checkOrderType": 1, "checkBusiType": "许可01" }, { "ticketId": 88671, "ticketPhaseName": "阶段2", "ticketPhaseOrder": 2, "ticketPhaseStatus": 1, "isRejected": 0, "templateCode": "QC2022XXXXXXXXXXXXX", "templateId": 221760, "reviewSwitch": 0, "reviewRuleId": null, "sceneInitialStatus": 1170, "sceneReviewStatus": null, "sceneSumbmitStatus": 1086, "ticketPhaseCode": "50413", "deleteFlag": 0, "tenantId": 886, "createdBy": 390841, "createName": "zdrun-test", "creationDate": "2022-03-14T02:30:39.980+00:00", "creationTimestamp": 1647225039959, "lastUpdatedBy": 390841, "lastUpdateName": "zdrun-test", "lastUpdateDate": "2022-03-14T02:30:39.980+00:00", "lastUpdateTimestamp": 1647225039959, "initialSystemStatusCode": "1", "initialStatus": 1170, "entityName": "workTicketPhase", "ticketPhaseId": 239406, "appName": "isdp-task-server", "affectedRows": -2, "checkOrderId": 5762625, "checkOrderType": 1, "checkBusiType": "许可01" }, { "ticketId": 88671, "ticketPhaseName": "阶段3", "ticketPhaseOrder": 3, "ticketPhaseStatus": 1, "isRejected": 0, "templateCode": "QC2022XXXXXXXXXXXXX", "templateId": 221760, "reviewSwitch": 0, "reviewRuleId": null, "sceneInitialStatus": 1086, "sceneReviewStatus": null, "sceneSumbmitStatus": 1088, "ticketPhaseCode": "50414", "deleteFlag": 0, "tenantId": 886, "createdBy": 390841, "createName": "zdrun-test", "creationDate": "2022-03-14T02:30:39.980+00:00", "creationTimestamp": 1647225039959, "lastUpdatedBy": 390841, "lastUpdateName": "zdrun-test", "lastUpdateDate": "2022-03-14T02:30:39.980+00:00", "lastUpdateTimestamp": 1647225039959, "initialSystemStatusCode": "2", "initialStatus": 1086, "entityName": "workTicketPhase", "ticketPhaseId": 239407, "appName": "isdp-task-server", "affectedRows": -2, "checkOrderId": 5762626, "checkOrderType": 1, "checkBusiType": "许可01" } ], "currentPhase": { "ticketId": 88671, "ticketPhaseName": "阶段1", "ticketPhaseOrder": 1, "ticketPhaseStatus": 1, "isRejected": 0, "templateCode": "QC2022XXXXXXXXXXXXX", "templateId": 221760, "reviewSwitch": 1, "reviewRuleId": 35676, "sceneInitialStatus": 1084, "sceneReviewStatus": 1170, "sceneSumbmitStatus": 1085, "ticketPhaseCode": "50412", "deleteFlag": 0, "tenantId": 886, "createdBy": 390841, "createName": "zdrun-test", "creationDate": "2022-03-14T02:30:39.980+00:00", "creationTimestamp": 1647225039959, "lastUpdatedBy": 390841, "lastUpdateName": "zdrun-test", "lastUpdateDate": "2022-03-14T02:30:39.980+00:00", "lastUpdateTimestamp": 1647225039959, "initialSystemStatusCode": "1", "initialStatus": 1084, "entityName": "workTicketPhase", "ticketPhaseId": 239405, "appName": "isdp-task-server", "affectedRows": 1, "checkOrderId": 5762624, "checkOrderType": 1, "checkBusiType": "许可01" }, "ticketCurrentPhaseId": 239405, "licenseSysStatus": "1", "licenseBusiStatus": 1084, "reviewRuleResult": { "reviewList": [ { "reviewerId": 378817, "reviewerName": "周??", "reviewLevel": 1, "reviewerType": "Admin", "revieweMode": 0, "isEleSign": 0, "remark": "", "isOnlineReview": 0, "deleteFlag": null }, { "reviewerId": 25804, "reviewerName": "刘XX", "reviewLevel": 2, "reviewerType": "Admin", "revieweMode": 0, "isEleSign": 0, "remark": "", "isOnlineReview": 0, "deleteFlag": null } ], "reviewRuleId": 35676 } } }
状态码
状态码请参见状态码。
错误码
错误码请参见错误码。