chaofx

DRP - api
数据资源目录接口文档http://mcq99.com/index.php/archives/24/数据资源查询全局...
扫描右侧二维码阅读全文
24
2021/03

DRP - api

数据资源目录接口文档

http://mcq99.com/index.php/archives/24/

数据资源

查询全局行业分类

5大分类

  1. "INDUSTRY", "行业分类"
  2. "业务分类"作为行业分类子类业务,关联查询【BUSINESS-行业CODE】

    • BUSINESS-TL 铁路交通业务分类
    • BUSINESS-GL 公路交通业务分类
    • BUSINESS-SL 水路交通业务分类
    • BUSINESS-DL 道路交通业务分类
    • BUSINESS-CS 城市交通业务分类
    • BUSINESS-MH 明用航空业务分类
    • BUSINESS-YZ 邮政业务分类
    • BUSINESS-ZH 综合业务分类
    • BUSINESS-QT 其他业务分类
  3. "SUBJECT", "主题分类"
  4. "ENTITY", "管理对象分类"
  5. "CATEGORY", "信息类别分类"

查询全局行业分类【带类型过滤】

  • Url: /code
  • httpMethod: GET
  • RequestParam:
 type:"行业类型type"
 name:"行业名称"
  • return
[ {
            "code": "TL",
            "name": "铁路交通",
            "total": null,
            "hasCount": null
        },
        {
            "code": "Z05",
            "name": "铁路建设管理",
            "total": null,
            "hasCount": null
        },
....
....
]

查询业务类型的接口【用于行业类型的子查询】

  • Url: /code/business
  • httpMethod: GET
  • return
[
    {
        "type": "BUSINESS-GL",
        "name":"名字"
        "codeListDTO": [
            {
                "code": "Z04",
                "name": "公路建设管理",
            }
        ]
    },
    {
        "type": "BUSINESS-TL",
        "name":"名字"
        "codeListDTO": [
            {
                "code": "Z05",
                "name": "铁路建设管理",
            }
        ]
    }
]

img.png

查询列表信息资源和 查询全局行业分类

  • Url: /resourceEntity/title
  • httpMethod: GET
  • return
 "globalCodeDTOList":[{
            {
                "count":1,
                "total":2,           
                "type": "ENTITY",
                "codeListDTO": [
                    {
                        "code": "OA",
                        "name": "人员",
                        "total": 0,
                        "hasCount": 0
                    }
                ]
            },
          ....
          ....
}],

"total":"全域数据资源",
"hasCount":"已接入数据资源",
}

img_1.png

查询列表信息资源和 查询全局行业分类

  • Url: /resourceEntity
  • httpMethod: GET
  • RequestParam:
 name:"信息资源名称 或者 行业类型的名称"
 codeList:["分类代码值","分类代码值"]
 current:1
 pageSize:20
 
  • return
{
 "resourceEntityList":[{
  "id":"信息资源id"
  "name": "信息资源名称"
  "industry": "行业分类"
  "business":"业务分类"
  "subject":"主题分类"
  "entity":"管理对象分类"
  "category":"信息类别分"
  "according":"依据标准"
  "provider":"信息资源提供方"
  "attrCount":"属性值"
  "hasDataCount":"是否接入数据 显示绿色"
}]
...
...
,
"name":"参数"
"codeList":["TL","GL"]
"totalSize":"总条数"

新增信息资源

码表选行业

img_4.png

访问上面的/code

数据库列表

img_5.png

  • Url: /database
  • httpMethod: GET
  • return
[{
  "dataSourceKey": "数据库资源key" 
  "dataSourceName": "数据库名称" 
}
...
...
]
获取表格信息

img_6.png

  • Url: /database/tables
  • httpMethod: GET
  • RequestParam:
 dataSourceKey:"配置数据库的id"
  • return
[{
  "comments":"表描述"
  "databaseName":"数据源的名称"
  "databaseKey":"数据源的主键"
  "tableName":"表名称"
}
...
...
]

获取表格的字段信息
  • Url: /database/tableColumns
  • httpMethod: GET
  • RequestParam:
 dataSourceKey:"配置数据库的key"
 queryTableName:"表名"
  • return
[
{
  "tableName": "表名" 
  "columnName": "字段名称" 
  "dataType": "字段类型" 
  "dataLength": "长度" 
  "comments": "精度" 
  "nullable": "是否可空 Y N" 
}
{
  "tableName": "表名" 
  "columnName": "字段名称" 
  "dataType": "字段类型" 
  "dataLength": "长度" 
  "comments": "精度" 
  "nullable": "是否可空 Y N" 
}
...
...
]

新增资源信息
  • Url: /resourceEntity
  • httpMethod: POST
  • dataType: json
  • RequestBody:
 {
 "resourceEntity":{
      "code":"信息资源编码"
      "name": "信息资源名称"
      "industry": "行业分类"
      "business":"业务分类"
      "subject":"主题分类"
      "entity":"管理对象分类"
      "category":"信息类别分类"
      "format":"信息资源格式分类"
      "formatType":"信息资源格式类型"
      "otherFormatDescription":"其他类型资源格式描述"
      "sharingType":"共享类型"
      "sharingCondition":"共享条件"
      "sharingScope":"共享范围"
      "sharingMode":"共享方式"
      "isOpen":"是否向社会开放"
      "summary":"信息资源摘要"
      "according":"依据标准"
      "provider":"信息资源提供方"
      "providerDepartment":"提供方内部部门"
      "providerContact":"提供方联系人"
      "providerContactPhone":"提供方联系人电话"
      "systemSource":"来源系统"
 },
 "entityTableMap":
        [{
        "comments":"表描述"
        "databaseName":"数据源的名称"
        "databaseKey":"数据源的主键"
        "tableName":"表名称"
        
       }
       ...
       ...
    
    ]
    
}
 
  • return
{
true
}

判断资源名称是否重复的接口
  • Url: /resourceEntity/existName
  • httpMethod: GET
  • RequestParam:
 name:"资源名称"
  • return
[
  true 【or】 false
...
...
]

导出xlxs资源信息
  • Url: /resourceEntity/export
  • httpMethod: GET

查询信息资源信息

  • Url: /resourceEntity/info
  • httpMethod: GET
  • RequestParam:
 resourceEntityId:"资源id"
  • return
{
 "resourceEntity":{
      "id":"id"
      "code":"信息资源编码"
      "serial":"资源编码计数"
      "name": "信息资源名称"
      "industry": "行业分类"
      "business":"业务分类"
      "subject":"主题分类"
      "entity":"管理对象分类"
      "category":"信息类别分类"
      "format":"信息资源格式分类"
      "formatType":"信息资源格式类型"
      "otherFormatDescription":"其他类型资源格式描述"
      "sharingType":"共享类型"
      "sharingCondition":"共享条件"
      "sharingScope":"共享范围"
      "sharingMode":"共享方式"
      "isOpen":"是否向社会开放"
      "summary":"信息资源摘要"
      "according":"依据标准"
      "provider":"信息资源提供方"
      "providerDepartment":"提供方内部部门"
      "providerContact":"提供方联系人"
      "providerContactPhone":"提供方联系人电话"
      "systemSource":"来源系统"
       "createdBy":"创建人"
      "createdTime":"创建时间"
      "attrCount":"属性值"
      "hasDataCount":"是否接入数据 显示绿色"
 },
 "entityTableMap":
        [{
        "comments":"表描述"
        "databaseName":"数据源的名称"
        "databaseKey":"数据源的主键"
        "tableName":"表名称"
        
       }
       ...
       ...
    
    ]
}


更新

  • Url: /resourceEntity
  • httpMethod: PUT
  • dataType: json
  • RequestBody:
 {
 "resourceEntity":{
      "id":"id"
      "code":"信息资源编码"
      "name": "信息资源名称"
      "industry": "行业分类"
      "business":"业务分类"
      "subject":"主题分类"
      "entity":"管理对象分类"
      "category":"信息类别分类"
      "format":"信息资源格式分类"
      "formatType":"信息资源格式类型"
      "otherFormatDescription":"其他类型资源格式描述"
      "sharingType":"共享类型"
      "sharingCondition":"共享条件"
      "sharingScope":"共享范围"
      "sharingMode":"共享方式"
      "isOpen":"是否向社会开放"
      "summary":"信息资源摘要"
      "according":"依据标准"
      "provider":"信息资源提供方"
      "providerDepartment":"提供方内部部门"
      "providerContact":"提供方联系人"
      "providerContactPhone":"提供方联系人电话"
      "systemSource":"来源系统"
 },
 "entityTableMapDtoMap":{
    "dataSourceKey":{[
        "comments":"表描述"
        "databaseName":"数据源的名称"
        "tableName":"表名称"
    ]
    ...
    ...
    }
    "dataSourceKey"{
    ...
    }
 
 }
}
]
 
  • return
{
true
}

删除资源信息

  • Url: /resourceEntity
  • httpMethod: DELETE
  • RequestParam:
 resourceEntityId:"资源id"
  • return
{
  true
}

标准规范和知识库

列表

  • Url: /repository
  • httpMethod: GET
  • RequestParam:
 "current":分页页码
 "pageSize:20
 "name":"查询的规范名称"
 "type":"查询的类型 KNOWLEDGE:知识库 STANDARD:中台规范"
  • return
{
  "id":
  "name":"标准规范名称"
  "description":"标准规范描述"
  "category":"所属类别"
  "path":"保存路径"
  "type":"KNOWLEDGE:知识 , STANDARD:标准"
  
}

新增

  • Url: /repository
  • httpMethod: POST
  • dataType: json
  • RequestParam:
   "name":"标准规范名称"
  "description":"标准规范描述"
  "category":"所属类别"
  "type":"KNOWLEDGE:知识 , STANDARD:"标准"
  "fileName":"文件"
  
  • return
{
  true
  
}

删除

  • Url: /repository
  • httpMethod: DELETE
  • RequestParam:
   "id":"标准规范或者知识库的id"
  • return
{
  true
  
}
版权属于:本文为原创文章,版权归本博所有,转载请注明出处!。

如果文章 语句 文字 描述等有错误 只能请在座的各位多多包涵 博主说话没有切格瓦拉好听。

感谢您本次的阅读

Last modification:April 27th, 2021 at 06:56 pm
If you think my article is useful to you, please feel free to appreciate

Leave a Comment

隐藏