文 档 中 心 / Document Center
搜索 管理中心
壹川接口文档V3
添加新部门到指定组织
更新时间:2018-04-13 13:28:34   更新人员:叶洋   文档状态:完成 #98    测试接口
摘要
添加新部门到指定组织
  1. 接口基本信息
    接口名称:添加一个新部门
    请求方法:POST
    接口地址:department
    登录验证:是
  2. 请求参数
    参数名 参数 数据类型 是否必须 示例值 说明
    otype 所属组织类型 int 是
    linkid 所属组织id string 是
    name 部门名称 string 是
    description 部门描述 string 否
    pid 上级部门id int 否 默认为0
    tag 部门标识 string 是
  3. 响应数据参数
    参数名 参数 数据类型 示例值 说明
    id 部门id int
    otype 归属组织类别 int 组织类型1系统平台2商户3机构4网点
    linkid 对应组织id string
    pid 上级部门 int
    status 部门状态 int 部门状态,1正常0禁用
    builtin 系统标准 string 系统标准,禁止删除
    create_time 创建时间 string
    create_by{} 创建人信息 object
    ├ uid ├ 创建人uid string
    ├ code ├ 创建人编码 string
    ├ username ├ 创建人用户名 string
    ├ nickname ├ 创建人昵称 string
    └ realname └ 创建人真实姓名 string
    update_time 更新时间 string
    update_by{} 更新人信息 object
    ├ uid ├ 更新人uid string
    ├ code ├ 更新人代码 string
    ├ username ├ 更新人用户名 string
    ├ nickname ├ 更新人昵称 string
    └ realname └ 更新人真实姓名 string
    name 部门名称 string
    description 描述 string
    orginfo{} 对应组织信息 object
    ├ ***_id ├ 对应组织id string 如果是系统则为sys_id,机构为com_id,网点为net_id
    ├ code ├ 组织代码 string
    ├ name ├ 对应组织名称 string
    ├ contacts ├ 对应组织联系人 string
    ├ mobile ├ 组织联系人手机 string
    ├ email ├ 组织邮箱 string
    └ otype_name └ 组织类型标记 string
  4. 请求示例
    请求例子:
     
    apirq('department', {
        method: "post",
        data: {
            "dp_type": 4,
            "dp_id": "1e23852bfc7ec92a",
            "name": "最后一个测试部门",
            "description": "tebbbb"
        }
    }) 
    
    返回数据结果:
     
    {
        "code": 0,
        "msg": "数据添加成功!",
        "time": "1523597197",
        "data": {
            "id": 62,
            "dp_type": 4,
            "dp_id": "1e23852bfc7ec92a",
            "pid": 0,
            "status": 1,
            "bandel": 0,
            "create_time": "2018-04-13 13:26:37",
            "create_by": {
                "uid": "0000000000000001",
                "code": "U1000000",
                "username": "administrator",
                "nickname": "超级管理员",
                "realname": "超级管理员"
            },
            "update_time": "2018-04-13 13:26:37",
            "update_by": {
                "uid": "0000000000000001",
                "code": "U1000000",
                "username": "administrator",
                "nickname": "超级管理员",
                "realname": "超级管理员"
            },
            "name": "最后一个测试部门",
            "description": "tebbbb",
            "orginfo": {
                "net_id": "1e23852bfc7ec92a",
                "code": "N69046",
                "com_id": "dc332415f1c87f9b",
                "join_type": 1,
                "status": 0,
                "unloading": 1,
                "create_time": "2018-04-13 11:27:50",
                "create_by": {
                    "uid": "0000000000000001",
                    "code": "U1000000",
                    "username": "administrator",
                    "nickname": "超级管理员",
                    "realname": "超级管理员"
                },
                "update_time": "2018-04-13 11:44:44",
                "update_by": {
                    "uid": "0000000000000001",
                    "code": "U1000000",
                    "username": "administrator",
                    "nickname": "超级管理员",
                    "realname": "超级管理员"
                },
                "delete_time": null,
                "runin_time": "-",
                "runout_time": "-",
                "country_id": 1,
                "province_id": 1,
                "city_id": 2,
                "district_id": 3,
                "street_id": 0,
                "lng": "30.123000",
                "lat": "40.155230",
                "joining_fee": "0.00",
                "name": "测试一个网s点222",
                "initials": "csygws",
                "english_name": "testanet",
                "address": "四川一个城",
                "contacts": "刘长明",
                "mobile": "13212345678",
                "tel": "",
                "fax": "",
                "email": "",
                "cover": "",
                "picture_list": "",
                "img_business_license": "",
                "img_transport_license": "",
                "img_corporation_idcard": "",
                "description": "",
                "remark": "",
                "cominfo": {
                    "com_id": "dc332415f1c87f9b",
                    "code": "C38086",
                    "name": "杨天天",
                    "address": "北京市海淀区学院路37号北京航空航天大学",
                    "contacts": "1321456789",
                    "mobile": "要小李"
                },
                "otype_name": "网点"
            }
        }
    } 
    
本书创建于 2018-03-30 12:03:13 ?如有疑问,请联系技术人员