PUT /rest/orgwise/3/department/{id}
接口说明
修改部门的名称、类型、编号、简介、负责人和默认经办人信息。可以一次性修改上述一条或多条信息属性。信息修改会产生变更记录。
媒体类型
application/json
路径参数
参数 | 说明 | 必须 |
---|---|---|
id | 部门的ID或NO.,部门唯一标识 | 必须 |
请求样例
{ "name": "开发二部", "type": "DEPARTMENT", "no": "D3", "description": "", "leader": "username", "assignee": "username" }
请求样例
{ "name": "开发二部" }
请求BODY详情
参数 | 类型 | 描述 | 必填 |
---|---|---|---|
name | string | 部门名称 | 非必填 |
type | string | 组织类型。如果部门是TOP级别,则默认为”COMPANY“,否则默认为”DEPARTMENT“。可用的类型有 | 非必填 |
no | string | 部门编号 | 非必填 |
description | string | 描述 | 非必填 |
leader | string | 部门负责人,Jira用户的用户名 | 非必填 |
assignee | string | 部门经办人,Jira用户的用户名 | 非必填 |
返回示例
{ "code": 0, "msg": "Success", "data": { "id": 171, "no": "D172", "name": "234", "type": "SUB_DEPARTMENT", "parent": 159, "leader": { "id": 1, "gender": "UNKNOWN", "memo": "", "jiraUser": { "userKey": "JIRAUSER10000", "avatar": "http://localhost:8080/jira/secure/useravatar?size=xsmall&avatarId=10341", "userName": "admin", "displayName": "admin", "emailAddress": "mulin.liu@shdsd.com", "isActive": true }, "mainDepartment": { "id": 30, "no": "D30", "name": "湖南农业有限公司", "type": "COMPANY", "createTime": "2021-04-22 14:39:58" }, "departments": [ { "id": 30, "no": "D30", "name": "湖南农业有限公司", "type": "COMPANY", "createTime": "2021-04-22 14:39:58" }, { "id": 147, "no": "D162", "name": "通知方案公司", "type": "COMPANY", "createTime": "2021-11-18 13:30:36" }, { "id": 148, "no": "D165", "name": "试用公司", "type": "COMPANY", "createTime": "2022-02-11 17:30:37" } ], "createTime": "2021-03-30 11:04:11.0" }, "assignee": { "id": 1, "gender": "UNKNOWN", "memo": "", "jiraUser": { "userKey": "JIRAUSER10000", "avatar": "http://localhost:8080/jira/secure/useravatar?size=xsmall&avatarId=10341", "userName": "admin", "displayName": "admin", "emailAddress": "mulin.liu@shdsd.com", "isActive": true }, "mainDepartment": { "id": 30, "no": "D30", "name": "湖南农业有限公司", "type": "COMPANY", "createTime": "2021-04-22 14:39:58" }, "departments": [ { "id": 30, "no": "D30", "name": "湖南农业有限公司", "type": "COMPANY", "createTime": "2021-04-22 14:39:58" }, { "id": 147, "no": "D162", "name": "通知方案公司", "type": "COMPANY", "createTime": "2021-11-18 13:30:36" }, { "id": 148, "no": "D165", "name": "试用公司", "type": "COMPANY", "createTime": "2022-02-11 17:30:37" } ], "createTime": "2021-03-30 11:04:11.0" }, "parentDepartment": { "id": 159, "no": "D166", "name": "销售部", "type": "SUB_DEPARTMENT", "createTime": "2022-02-14 15:19:27", "parent": 148 }, "rootDepartmentId": 148, "createTime": "2022-02-20 17:53:29.0" } }