webapi调用
一、查询即时库存内容
client = K3CloudApiClient("https://xxx.ik3cloud.com/K3Cloud/");
loginResult = client.ValidateLogin("账套id","用户名","密码",2052);
resultType = JObject.Parse(loginResult)["LoginResultType"] #.Value<int>();
para={
"FormId": "STK_Inventory",
"FieldKeys": "FStockOrgId",
"FilterString": [],
"OrderString": "",
"TopRowCount": 0,
"StartRow": 0,
"Limit": 2000,
"SubSystemId": ""
}
jsonString = JsonConvert.SerializeObject(para); #将json格式的对象转换为json字符串
#登录结果类型等于1,代表登录成功
if resultType == 1:
#raise Exception("登陆成功")
#client.ExecuteBillQuery(para)
json= client.ExecuteBillQuery(jsonString);
i=0
for js in json:
m=js[i]
i=i+1