分页查询库存总数API_V1.0.md

测试API URL POST http://qa.higo-express.cn/wms/api/v1/stocksinfo/queryFYStocksinfoCount.do
正式API URL POST http://oms.higo-express.cn/wms/api/v1/stocksinfo/queryFYStocksinfoCount.do

调用方式:模拟表单提交,json,userKey,userValue参数,其中 json参数的值为标准JSON格式的字符串,注意转义json相关字符,具体字段含义参考字段要求

输入参数

   json:"明细信息",
   userKey: "MRYX-TEST",
   userValue: "MRYX123456"

json参数示例

{
"temperatureType": 1, 
"warehouseno": "A001"
}

json参数字段说明

字段 中文描述 类型 长度 是否必填 示例值
temperatureType 温区类型 String N xxx,xxx,xxx
warehouseno 仓库 String 64 Y A001

API返回示例

{
    "data":30,
    "list":[

    ],
    "code":"success",
    "msg":"",
    "fail":false
}

返回结果字段说明

字段 中文描述
data 总数
list 保留字段,可以忽略
code 成功,失败标志,failed/success
msg 错误说明
fail 标识成功失败

JAVA示例代码

 @Test
  public void testQueryWQStockinfo() {
    WMSPublicStocksinfoQuery infoQuery = new WMSPublicStocksinfoQuery();
    infoQuery.setWarehouseno("A001");
    infoQuery.setTemperatureType(1);
    MySQLPager pager = new MySQLPager();
    pager.setCurrentPage(1);
    pager.setPageSize(10);
    infoQuery.setPager(pager);
                  
    String url = "http://dev.higo-express.cn/wms/api/v1/stocksinfo/queryFYStocksinfoCount.do";
    List postParams = new ArrayList();
    postParams.add(new BasicNameValuePair("json", JacksonUtils.writeValue(infoQuery)));
    postParams.add(new BasicNameValuePair("userKey", "xxx"));
    postParams.add(new BasicNameValuePair("userValue", "xxx"));

    BingHeHttpPostRequest bingHeHttpPostRequest = new BingHeHttpPostRequest();
    bingHeHttpPostRequest.setRequestUrl(url);
    bingHeHttpPostRequest.setPostParams(postParams);
    bingHeHttpPostRequest.setContenttype(MediaType.APPLICATION_FORM_URLENCODED_VALUE);
    String re = BingHeHttpClientWrapper.sendHttpPost(bingHeHttpPostRequest);
    HigoLogUtils.debug(re);
  }

你可能感兴趣的:(分页查询库存总数API_V1.0.md)