...
|
...
|
@@ -3,6 +3,9 @@ package k3cloud |
|
|
import (
|
|
|
"errors"
|
|
|
"io"
|
|
|
"time"
|
|
|
|
|
|
"github.com/google/uuid"
|
|
|
)
|
|
|
|
|
|
//初始化默认的客户端
|
...
|
...
|
@@ -41,7 +44,14 @@ func (c *Client) Login(acctID string, username string, password string, lcid ... |
|
|
if len(lcid) > 0 {
|
|
|
lcidTemp = lcid[0]
|
|
|
}
|
|
|
param := []interface{}{acctID, username, password, lcidTemp}
|
|
|
param := RequestValidateUser{
|
|
|
Format: 1,
|
|
|
Useragent: "ApiClient",
|
|
|
Rid: uuid.NewString(),
|
|
|
Timestamp: time.Now().Format("2006-01-02"),
|
|
|
V: "1.0",
|
|
|
Parameters: []interface{}{acctID, username, password, lcidTemp},
|
|
|
}
|
|
|
resp, err := c.PostRequest(api, param)
|
|
|
if err != nil {
|
|
|
return nil, err
|
...
|
...
|
@@ -64,8 +74,7 @@ func (c *Client) Login(acctID string, username string, password string, lcid ... |
|
|
// ExecuteBillQuery 单据查询
|
|
|
func (c *Client) ExecuteBillQuery(param RequestExecuteBillQuery) (*BillQueryResult, error) {
|
|
|
api := "/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.ExecuteBillQuery.common.kdsvc"
|
|
|
paramFomat := []interface{}{param}
|
|
|
resp, err := c.PostRequest(api, paramFomat)
|
|
|
resp, err := c.PostRequest(api, param)
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|
...
|
...
|
@@ -75,11 +84,6 @@ func (c *Client) ExecuteBillQuery(param RequestExecuteBillQuery) (*BillQueryResu |
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
|
queryResult := newBillQueryResult(dataByte, param.FieldKeys)
|
|
|
queryResult := newBillQueryResult(dataByte, param.Data.FieldKeys)
|
|
|
return queryResult, queryResult.Error()
|
|
|
} |
|
|
|
|
|
//QueryGroupInfo 分组信息查询
|
|
|
func (c *Client) QueryGroupInfo() {
|
|
|
|
|
|
} |
...
|
...
|
|