网站建设及维护流程图,泰州模板自助建站,中国机械加工网18易5下2拉i,烟台正规网站建设1. 需求描述PLM系统中的物料#xff0c;BOM同步到金蝶云星空系统中时#xff0c;构造的json数据中#xff0c;一些基础资料字段需要传递编码#xff0c;而不是名称。 本接口提供获取所有基础资料的编码、名称#xff0c;可作为PLM系统中的对照关系。2. 接口定义2.1 请求地…1. 需求描述PLM系统中的物料BOM同步到金蝶云星空系统中时构造的json数据中一些基础资料字段需要传递编码而不是名称。 本接口提供获取所有基础资料的编码、名称可作为PLM系统中的对照关系。2. 接口定义2.1 请求地址2.2 请求参数参数列表参数含义备注FormId基础资料formId字符串类型(必录)详见下表FieldKeys需查询的字段key集合字符串类型格式key1,key2,...(必录)例如FNumber,FName, //FNumber为编码FName为名称FilterString过滤条件字符串类型(非必录)FDocumentStatusC, //已审核的基础资料OrderString排序字段字符串类型(非必录)FNumber, 表示按编码升序排序TopRowCount返回总行数整型(非必录)StartRow开始行索引整型(非必录)Limit最大行数整型不能超过2000(非必录)基础资料formId计量单位BD_UNIT仓库BD_STOCK部门(生产车间)BD_Department存货类别BD_MATERIALCATEGORY税率BD_TaxRate制造策略PLN_MANUFACTUREPOLICY参数格式{FormId: 基础资料formId, //基础资料的formIdFieldKeys: FNumber,FName, //FNumber为编码FName为名称FilterString: FDocumentStatusC, //已审核的基础资料OrderString: ,TopRowCount: 0,StartRow: 0,Limit: 0}2.3 返回值参数列表参数含义备注resultjson数组格式为[[FValue1,FValue2],[FValue1,FValue2]]result 说明[[FValue1, FValue2],[FValue1, FValue2],]若 FieldKeys: FNumber,FName, //FNumber为编码FName为名称则 FValue1 对应FNumber, FValue2 对应FName3. 代码示例3.1 登录金蝶云星空string appId 应用Id;string appSecret 应用密钥;string dbId帐套Id;string useName用户名;HttpClient httpClient new HttpClient();httpClient.Url http://10.11.0.37/k3cloud/Kingdee.BOS.WebApi.ServicesStub.AuthService.LoginByAppSecret.common.kdsvc;List Parameters new List();Parameters.Add(dbId);//帐套IdParameters.Add(useName);//用户名Parameters.Add(appId);Parameters.Add(appSecret);Parameters.Add(2052);httpClient.Content JsonConvert.SerializeObject(Parameters);JObject responseJObject.Parse(httpClient.AsyncRequest());var iResult response[LoginResultType].Value();if (iResult 1){//todo:登录成功处理业务}else{//失败信息string message response[Message].ToString();}3.2 以查询计量单位为例HttpClient httpClient new HttpClient();httpClient.Url http://10.11.0.37/k3cloud/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.ExecuteBillQuery.common.kdsvc;var dataObj new{FormId BD_UNIT,//计量单位formIdFieldKeys FNumber,FName,//需查询的字段key集合字符串类型格式key1,key2,...(必录)FilterString FDocumentStatusC,//获取已经审核的基础资料OrderString ,//排序TopRowCount 0,StartRow 0,Limit 0};List parameters new List();parameters.Add(dataObj);var data JsonConvert.SerializeObject(parameters);httpClient.Content data;var result httpClient.AsyncRequest();return result;