Giter Club home page Giter Club logo

k3cloud's Introduction

Songe/k3cloud

A PHP SDK for KingDee

Install

Continue to improve

Via Composer

$ composer require songe/k3cloud

Usage (API)

<?php

//实例化SDK 实例化同时完成登录
$config = [
    'auth_type' => 3,//授权类型:1用户名+密码;2 第三方授权应用ID+应用密钥;3签名;
    'host_url' => 'http||https://xxxxxxxxxxxxxxxxx/k3cloud/', //金蝶授权请求地址
    'acct_id' => 'xxxxxxxxxx', //账户ID
    'username' => 'xxxxxxxxxx', // 用户名(授权类型为1时必须)
    'password' => 'xxxxxxxxxx', // 密码(授权类型为1时必须)
    'appid' => 'xxxxxxxxxx', // 应用ID(授权类型为2或3时必须)
    'appsecret' => 'xxxxxxxxxx', // 应用Secret(授权类型为2或3时必须)
    'lcid' => 2052, // 账套语系,默认2052
    // 文件日志配置(每日生成一个文件日志)
    'log' => [
        'name' => 'k3cloud', //日志文件名称
        'path' => '', //日志路径
    ],
    //数据库日志
    'mysql_log' => [
        'host' => '127.0.0.1',
        'port' => '3306',
        'database' => '',
        'username' => 'root',
        'password' => '',
        'table' => '',
    ],
];
$server = new \Songe\K3cloud\K3CloudApiSdk($config);

//返回值格式 可不传 默认string 所有接口通用
$format = 'string';
//单据查询
$executeBillQueryParams = [
    // 业务对象表单Id 例如物料 BD_MATERIAL 【必填】
    'FormId' => 'BD_MATERIAL',
    // 需查询的字段key集合,字符串类型,格式:'key1, key2, ...'【必填】
    //注(查询单据体内码,需加单据体Key和下划线,如:FEntryKey_FEntryId)
    'FieldKeys' => 'FName,FModifierId',
    //过滤条件【非必录】
    'FilterString' => [],
    //排序字段【非必录】
    'OrderString' => '',
    //返回总行数,整型【非必录】
    'TopRowCount' => 0,
    //开始行索引,整型【非必录】
    'StartRow' => 0,
    //最大行数,整型,不能超过2000【非必录】
    'Limit' => 0,
    //子系统标识ID【非必录】
    'SubSystemId' => '',
];
$server->executeBillQuery($billQueryParams, $format);

//元数据查询
$queryBusinessInfoParams = [
    // 业务对象表单Id 例如物料 BD_MATERIAL 【必填】
    'FormId' => 'BD_MATERIAL', 
];
$server->queryBusinessInfo($queryBusinessInfoParams)


//详情查询
$formId = 'BD_MATERIAL'; //业务对象表单Id 例如物料 BD_MATERIAL 【必填】
$viewParams = [
    //创建者组织内码,字符串类型【非必录】
    'CreateOrgId' => 0,
    //单据编码,字符串类型【使用编码时必录】
    'Number' => '', 
    //表单内码【使用内码时必录】
    'Id' => '', 
];
$server->view($formId, $viewParams);

k3cloud's People

Contributors

best-yang avatar peng1202 avatar tokoyi avatar son9e avatar gforliubh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.