原创 获取有成报销连接器信息及请求写入方案配置指南

发布时间:
更新时间:
浏览次数:786
评论数:0

获取有成报销连接器信息和配置开发方案,以下是具体步骤:

建立连接器

  1. 登录有成报销:使用管理员权限账号,如果是钉钉授权账户,需要从钉钉进入。

  2. 获取appkeyappSecret:在系统管理-开发者中心中获取这两个参数。如下图所示:

获取appkey和appSecret

  1. 配置连接器参数:
    • host固定为https://www.h3yun.com/OpenApi/Invoke
    • enginecode填入appKey
    • enginesecret填入appSecret

如下图所示:

配置连接器参数

配置请求适配器

  1. 设置请求适配器:

    \Adapter\Ycbg\YcbgQueryAdapter
  2. 获取单据code:调用接口/reimburse/base/getTemplateList.rjson,查询请求单据列表所需字段。以下是请求调度者源数据,进行一次性查询,并保留原始返回参数,后续配置过程中需要用到。

{
    "api": "/reimburse/base/getTemplateList.rjson",
    "type": "RESTful",
    "effect": "QUERY",
    "method": "POST",
    "number": "templateName",
    "id": "templateCode",
    "name": "id",
    "idCheck": true,
    "request": [],
    "otherRequest": [],
    "response": [
        {
            "field": "code",
            "label": "code",
            "value": "",
            "type": "string",
            "describe": "_autoFillResponse",
            "formModel": {"enable": false},
            "physicalModel": {"enable": false},
            "tableModel": {"enable": false},
            "id": "codeRYSmj",
            "title": "code-code",
            "key": "codeRYSmj"
        },
        {
            "field": "configureObject",
            "label": "configureObject",
            "type": "object",
            "value": "",
            "describe": "_autoFillResponse",
            "id": "configureObject4J88x",
            "formModel": {"enable": false},
            "physicalModel": {"enable": false},
            "tableModel": {"enable": false},
            "children": [
                {
                    "field": "valueRule",
                    "label": "valueRule",
                    "type": "string",
                    "value": "",
                    "id": "configureObjectVwpjM",
                    "formModel": {"enable": false},
                    "physicalModel": {"enable": false},
                    "tableModel": {"enable": false},
                    "describe": "_autoFillResponse",
                    "title": "valueRule-valueRule",
                    "key": "configureObjectVwpjM"
                },
                {
                    "field": "editable",
                    "label": "editable",
                    "type": "string",
                    "value": "",
                    "id": "configureObjecthO9Et",
                    "formModel": {"enable": false},
                    "physicalModel": {"enable": false},
                    "tableModel": {"enable": false},
                    "describe": "_autoFillResponse",
                    "title": "editable-editable",
                    "key": "configureObjecthO9Et"
                },
                {
                    "field": "textType",
                    "label": "textType",
                    "type": "string",
                    "value": "",
                    "id": "configureObjectjyUFP",
                    "formModel": {"enable": false},
                    "physicalModel": {"enable": false},
                    "tableModel": {"enable": false},
                    "describe": "_autoFillResponse",
                    "title": "textType-textType",
                    "key": "configureObjectjyUFP"
                },
                {
                    "field": "optional",
                    "label": "optional",
                    "type": "string",
                    "value": "",
                    "id":