金蝶帮助文档
HttpClient httpClient = new HttpClient();
httpClient.Url = "http://192.168.66.60/k3cloud/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.ExecuteBillQuery.common.kdsvc";
List<object> Parameters = new List<object>();
//Json字串
string data = "{\"FormId\":\"PUR_PurchaseOrder\",\"TopRowCount\":0,\"Limit\":10,\"StartRow\":0,\"FilterString\":\"FMaterialId.FNumber='HG_TEST'\",\"OrderString\":\"FID ASC\",\"FieldKeys\":\"FID,FSupplierId,FMaterialId,FMaterialId.FNumber,FMaterialName\"}";
Parameters.Add(data);
httpClient.Content = JsonConvert.SerializeObject(Parameters);
var result = httpClient.AsyncRequest();
金蝶内调试结果
此主题相关图片如下:2.png
有返回数据,返回格式是
[[615685,615685,"杜敬涛","13858305057","塑件仓库",true,"否"]]
狐表里这个结果如何输出?
此主题相关图片如下:1.png
代码
Dim client As new Kingdee.BOS.WebApi.Client.K3CloudApiClient("http://192.168.1.235/k3cloud/")
Dim loginResult = client.ValidateLogin("60b69d07649920","赵东旭","123456",2052)
Dim resultType As Integer = JObject.Parse(loginResult)("LoginResultType").Tostring
Dim jo As New JObject
jo("FormId") = "BD_NEWSTAFF"
jo("FieldKeys") = "FSTAFFID,FMASTERID,FName,FPMobile,FDept.FName,FIsFirstPost,FForbidStatus.FCaption"
Dim ja1 As New Jarray '定义数组
Dim jo1 As new JObject
jo1("Left") = "("
jo1("FieldName") = "FPMobile"
jo1("Compare") = "="
jo1("Value") = "13858305057"
jo1("Right") = ")"
jo1("Logic") = "AND"
Dim jo2 As new JObject
jo2("Left") = "("
jo2("FieldName") = "FForbidStatus"
jo2("Compare") = "StatusEqualto"
jo2("Value") = "A"
jo2("Right") = ")"
jo2("Logic") = "AND"
ja1.Add(jo1)
ja1.Add(jo2)
jo("FilterString") = ja1
'Output.Show(jo.Tostring)
If resultType = 1 Then
Dim csjg As String = client.ExecuteBillQuery(CompressJson(jo)).Tostring
Output.Show(csjg)
End If