测试API URL POST http://qa.higo-express.cn/wms/api/v1/stocksinfo/queryFYStocksinfo.do
正式API URL POST http://oms.higo-express.cn/wms/api/v1/stocksinfo/queryFYStocksinfo.do
调用方式:模拟表单提交,json,userKey,userValue参数,其中 json参数的值为标准JSON格式的字符串,注意转义json相关字符,具体字段含义参考字段要求
输入参数
json:"明细信息",
userKey: "MRYX-TEST",
userValue: "MRYX123456"
json参数示例
{
"temperatureType": 1,
"warehouseno": "A001",
"pager":{
"currentPage":1,
"pageSize": 10
}
}
json参数字段说明
字段 | 中文描述 | 类型 | 长度 | 是否必填 | 示例值 |
---|---|---|---|---|---|
temperatureType | 温区类型 | String | N | xxx,xxx,xxx | |
warehouseno | 仓库 | String | 64 | Y | A001 |
pager | 分页 | Object | N | 如果不传pager对象 默认为currentPage = 1,pageSize= 10 |
API返回示例
{
"data":[
{
"goodsno":"000000000000889010",
"goodsname":"HG黑狗商品889010",
"unit":"件",
"qit":49,
"orderQit":8
},
...
],
"list":[],
"code":"success",
"msg":"",
"pager":{
"pageSize":10,
"totoalResults":21,
"currentPage":1,
"totalPages":3,
"offset":0,
"limit":10
},
"fail":false
}
返回结果字段说明
字段 | 中文描述 |
---|---|
data | 商品信息 |
list | 保留字段,可以忽略 |
code | 成功,失败标志,failed/success |
msg | 错误说明 |
fail | 标识成功失败 |
goodsno | 商品信息 |
goodsname | 商品名称 |
unit | 单位 |
qit | 生成出库单的可支配数量 |
orderQit | 应出未出数量(冰河系统销售订单未处理汇总数量) |
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/queryFYStocksinfo.do";
List<BasicNameValuePair> postParams = new ArrayList<BasicNameValuePair>();
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);
}
网友评论