{
"timestamp": "时间戳",
"type": "order",
"data": {
"userId": "1 // oms用户id",
"erpNo": "123123",
"warehouseCode": "xxx",// WMS仓库编号
"status": "Shipped",
"skuList": [{
"sku": "2309-1Bei",// sku
"total": 26,// 库存总数
"locked": 0,// 已锁数量
"available": 26,// 可用数量
"nonGood": 0,// 不良品数量
"totalChange": -1// 库存变动数量
}]
}
}
{
"timestamp": "时间戳",
"type": "storage",
"data": {
"userId": "24 // oms用户id",
"erpNo": "Lucky1704360185 // ERP单号",
"warehouseCode": "xxx",// 仓库编号
"putawayNo": "P11240104100153 // 入库单号",
"finishTime": "2024-01-04T09:23:26.729",
"status": "null // 单据完成是的话是Finish",
"skuList": [
{
"skuCode": "BUG_more898 // ERP的商品GTIN码",
"sku": "BUG_more898 // sku",
"num": 10,
"badNum": 0,
"thisTimeNum": 10
},
{
"skuCode": "BUG_more899",
"sku": "BUG_more899",
"num": "5 // 良品数量",
"badNum": "0 // 次品数量",
"thisTimeNum": "5 //本次上架数量"
}
]
}
}
{
"timestamp": "时间戳",
"type": "return",
"finishTime": "完成时间",
"data": {
"userId": "1 //oms用户id",
"erpNo": "ERP单号",
"warehouseCode": "xxx",// 仓库编号
"status": "FINISH",
"skuList": [
{
"sku": "sku",
"num": "1 // 良品数量",
"badNum": "0 // 次品数量"
}
]
}
}
{
"timestamp": "时间戳",
"type": "orderIntercept",
"data": {
"userId": "1 // oms用户id",
"erpNo": "123123",
"status": "success"
}
}
{
"timestamp": 时间戳,
"type": "inventoryCount",
"data": {
"warehouseCode": "xxx",// 仓库编号
"documentNo": "xx",// 盘点单号
"userId": 1, // oms用户id
"finishTime": "2025-02-07T08:07:56.908",// 完成时间
"skuList": [{
"sku": "2309-1Bei",// sku
"total": 26,// 库存总数
"locked": 0,// 已锁数量
"available": 26,// 可用数量
"nonGood": 0,// 不良品数量
"totalChange": -1,// 库存变动数量
"lockedChange": null,// 已锁变动数量
"availableChange": null,// 可用变动数量
"nonGoodChange": null// 次品变动数量
}]
}
}
{
"timestamp": 时间戳,
"type": "adjust",
"data": {
"warehouseCode": "01",// 仓库编号
"documentNo": "ADSE02620",// 调整单号
"userId": 1,// oms用户id
"finishTime": "2025-02-07T09:10:03.951",// 完成时间
"skuList": [{
"sku": "819-Dark GL",// sku
"total": 1,// 库存总数
"locked": 0,// 已锁数量
"available": 1,// 可用数量
"nonGood": 0,// 不良品数量
"totalChange": 1,// 库存变动数量
"lockedChange": null,// 已锁变动数量
"availableChange": null,// 可用变动数量
"nonGoodChange": null // 次品变动数量
}]
}
}
{
"timestamp": 时间戳,
"type": "move",
"data": {
"warehouseCode": "A",// 仓库编号
"documentNo": "MOL703",// 移货单号
"userId": 3256,// oms用户id
"finishTime": "2025-02-06T03:59:21.009",// 完成时间
"finishTime": "2025-02-07T09:10:03.951",// 完成时间
"skuList": [{
"sku": "819-Dark GL",// sku
"total": 1,// 库存总数
"locked": 0,// 已锁数量
"available": 1,// 可用数量
"nonGood": 0,// 不良品数量
"totalChange": 1,// 库存变动数量
"lockedChange": null,// 已锁变动数量
"availableChange": null,// 可用变动数量
"nonGoodChange": null // 次品变动数量
}]
}
}
{
"timestamp": 时间戳,
"type": "orderCreate",
"data": {
"warehouseCode": "YK",// 仓库编号
"documentNo": "BSZ1AF0608",// erp单号
"userId": 3256,// oms用户id
"finishTime": "2025-02-06T03:59:21.009",// 完成时间
"finishTime": "2025-02-07T09:10:03.951",// 完成时间
"skuList": [{
"sku": "819-Dark GL",// sku
"total": 1,// 库存总数
"locked": 0,// 已锁数量
"available": 1,// 可用数量
"nonGood": 0,// 不良品数量
"totalChange": 1,// 库存变动数量
"lockedChange": null,// 已锁变动数量
"availableChange": null,// 可用变动数量
"nonGoodChange": null // 次品变动数量
}]
}
}
{
"timestamp": 时间戳,
"type": "orderCancel",
"data": {
"warehouseCode": "YK",// 仓库编号
"documentNo": "BSZ1AF0608",// erp单号
"userId": 3256,// oms用户id
"finishTime": "2025-02-06T03:59:21.009",// 完成时间
"finishTime": "2025-02-07T09:10:03.951",// 完成时间
"skuList": [{
"sku": "819-Dark GL",// sku
"total": 1,// 库存总数
"locked": 0,// 已锁数量
"available": 1,// 可用数量
"nonGood": 0,// 不良品数量
"totalChange": 1,// 库存变动数量
"lockedChange": null,// 已锁变动数量
"availableChange": null,// 可用变动数量
"nonGoodChange": null // 次品变动数量
}]
}
}
{
"timestamp": 时间戳,
"type": "convert",
"data": {
"warehouseCode": "A",// 仓库编号
"documentNo": "MOL703",// 库存转换单号
"userId": 3256,// oms用户id
"finishTime": "2025-02-06T03:59:21.009",// 完成时间
"finishTime": "2025-02-07T09:10:03.951",// 完成时间
"skuList": [{
"sku": "819-Dark GL",// sku
"total": 1,// 库存总数
"locked": 0,// 已锁数量
"available": 1,// 可用数量
"nonGood": 0,// 不良品数量
"totalChange": 1,// 库存变动数量
"lockedChange": null,// 已锁变动数量
"availableChange": null,// 可用变动数量
"nonGoodChange": null // 次品变动数量
}]
}
}
{
"code": "0是正确,其他异常",
"msg": ""
}
Map<String, Object> signMap = Maps.newHashMap();
signMap.put("data", "数据");
signMap.put("clientSecret", "客户端密码");
String sign = Md5Utils.md5Hex(JSONUtil.objectToJson(signMap));
public static String sign(String key, String data) {
return hmacsha256(key, data);
}
public static String hmacsha256(String key, String data) {
try {
Mac hmac = Mac.getInstance("HmacSHA256");
SecretKeySpec secret_key = new SecretKeySpec(
key.getBytes(StandardCharsets.UTF_8),
"HmacSHA256");
hmac.init(secret_key);
return new String(Hex.encodeHex(hmac.doFinal(data.getBytes(StandardCharsets.UTF_8))));
} catch (Exception e) {
throw new RuntimeException(e);
}
}
public static void main(String[] args) {
Map<String, Object> params = new HashMap<>();
params.put("url","/api/order/get");
params.put("method","post");
params.put("accessToken","1b56814f081c432cb82751be145261d3");
params.put("clientId","fe73489a9b5948dbafd07e7b28d6e268");
params.put("timestamp","1692889556000");
params.put("nonce","14");
params.put("userId","8");
String data = params.entrySet().stream().map(e -> e.getKey() + "=" + e.getValue()).sorted().collect(Collectors.joining("&"));
// HmacSHA256签名
String genSign = Signature.sign("4a506ccaf37e400bac4a42d2dc5f600a", data);
System.out.println(data);
System.out.println(genSign);
}
}
https://test.jfwms.com/api/order/get
clientId:fe73489a9b5948dbafd07e7b28d6e268
accessToken:1b56814f081c432cb82751be145261d3
timestamp:1692889556000
nonce:14
sign:9bc08ba7552c5dfea4efab6bda78a4a9738010913f2403bd93f09c6bf974b939
userId:8
{"erpNo":"123"}
{
"code": 50017,
"message": "The order was not found in the warehouse!",
"data": null,
"requestId": "7bb5ddef9aed415a88163e5d39b41691"
}