Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

状态
colourYellow
title
请求类型
PUT

请求地址

/rest/orgwise/2/department/{id}

接口说明

修改部门的名称、类型、编号、简介、负责人和默认经办人信息。可以一次性修改上述一条或多条信息属性。信息修改会产生变更记录。

媒体类型

application/json

路径参数

参数

说明

必须

id

部门的id,部门唯一标识部门的ID或NO.,部门唯一标识

必须

请求样例

...

代码块
{
  "name":

...

 "开发二部",

...


  "type":

...

 "

...

DEPARTMENT",

...


  "no":

...

 "D3",

...


  "description":

...

 "",

...


  "leader":

...

 "username",

...


  "assignee":

...

 "username"
}

请求样例

...

返回示例

...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

...

代码块
{
  "name": "开发二部"
}

请求BODY详情

参数

类型

描述

必填

namestring

部门名称

非必填
typestring

组织类型。如果部门是TOP级别,则默认为”COMPANY“,否则默认为”DEPARTMENT“。可用的类型有
COMPANY, SUB_COMPANY, BRANCH_COMPANY, BLOC, DEPARTMENT, SUB_DEPARTMENT

非必填
nostring部门编号非必填
descriptionstring描述非必填
leaderstring部门负责人,Jira用户的用户名非必填
assigneestring部门经办人,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"

...


    }
}