转户单
字段可选
M:must 必填
O:optional 选填
C: conditional 某些条件下必选
搜索转户单
接口名
/business/transfer
Method
GET
请求
start_date M datetime 开始查询日期
end_date M datetime 结束查询日期
date_type M string 查询日期类型('operate_date'或'create_time')
offset O int 分页缩进,默认0
limit O int 分页每页数量,默认10
status O int 转户单状态(1:待提交;2:待审核;3:审核通过;4:审核未通过;5:已冲销)
query_data O string 查询内容,支持客户ID(K001或者1)和转户单号(ZH001)
响应
code M int 返回码,0表示成功,其他表示错误
msg M string 错误信息
data M string 返回json数据
[
{
"status" M 转户单状态码(1:待提交;2:待审核;3:审核通过;4:审核未通过;5:已冲销)
"old_customer_cellphone" M 转出客户手机号
"old_customer_name" M 转出客户名
"create_time" M 'YYYY-MM-DD' 转户单创建时间
"id" M 转户单ID
"operate_date" M 'YYYY-MM-DD' 转户时间
"old_customer_id" M 转出客户ID
"transfer_count" M 转户件数
"new_customer_cellphone" M 转入客户手机号
"new_customer_name" M 转入客户名
"new_customer_id" M 转入客户ID
}
]
示例
request
http://localhost:8888/business/transfer?start_date=2016-08-04&end_date=2016-09-21&date_type=create_time&offset=0&limit=10&query_data=K001
response
{
"code": 0,
"pagination": {
"count": 1,
"limit": 10,
"offset": 0
},
"data": [
{
"operate_date": "",
"create_time": "2016-09-28",
"new_customer_id": "K00084",
"old_customer_id": "K00085",
"status": 1,
"new_customer_name": "北京客户001",
"transfer_count": 0,
"old_customer_name": "北京客户002",
"new_customer_cellphone": "12312312312",
"id": "ZH00037",
"old_customer_cellphone": "12312312311"
}
],
"msg": "ok"
}
转户单明细
接口名
/business/transfer/detail
Method
GET
请求
id M string 转户单ID
响应
code M int 返回码,0表示成功,其他表示错误
msg M string 错误信息
data M string 返回json数据
"operate_date" M YYYY-MM-DD 转户日期
"old_customer_cellphone" string M 转出客户电话
"id" M 转户单ID
"details": [ M list 转户商品详情
{
"name" M string 商品名
"old_batch_id" M string 转出批次号
"new_batch_id" M string 转入批次号
"pallet_count" M int 板数
"transfer_count" M int 转户数
"origin_count" M int 原库存件数
"after_count" M int 剩余库存件数
"tail_pallet_count" M int 尾板数
"count_per_pallet" M int 每板件数
"ware_type" M int 仓库库存类别(1:公库;2:私库)
"contract_id" M string 合同ID
"goods_category_1_name" M string 一级商品分类名
"goods_category_2_name" M string 二级商品分类名
"goods_category_3_name" M string 品类名
"old_ware_category_4_name" M string 转出通道名
"old_ware_category_3_name" M string 转出库位名
"old_ware_category_2_name" M string 转出库区名
"old_ware_category_1_name" M string 转出仓库名
"new_ware_category_4_id" M string 转入通道ID
"new_ware_category_3_id" M string 转入库位ID
"new_ware_category_2_id" M string 转入库区ID
"new_ware_category_1_id" M string 转入仓库ID
"new_ware_category_4_name" M string 转入通道名
"new_ware_category_3_name" M string 转入库位名
"new_ware_category_2_name" M string 转入库区名
"new_ware_category_1_name" M string 转入仓库名
"unit_weight" M int 件重(kg)
}
]
"status" M int 转户单状态
"old_customer_id" M 转出客户ID
"old_customer_name" M string 转出客户名
"new_customer_cellphone" string M 转入客户电话
"new_customer_id" M 转入客户ID
"new_customer_name" M string 转入客户名
"can_create_task" M bool 是否可以发送转户任务
示例
request
http://teststation.guanmai.cn:8888/business/transfer/detail?id=ZH00123
response
{
"data": {
"new_customer_id": "K00085",
"details": [{
"origin_count": 333,
"new_ware_category_1_id": "WA000970",
"goods_category_1_name": "冻品",
"transfer_count": 1,
"new_ware_category_4_id": "WD000973",
"old_ware_category_3_name": "123",
"name": "333",
"old_ware_category_4_name": "111",
"old_batch_id": "100007-3",
"new_ware_category_4_name": "111",
"contract_id": "HT00111",
"old_ware_category_2_name": "123",
"new_ware_category_2_name": "123",
"tail_pallet_count": 1,
"new_batch_id": "100007-3Z1",
"old_ware_category_1_name": "23321",
"new_ware_category_3_name": "123",
"new_ware_category_1_name": "23321",
"new_ware_category_2_id": "WB000971",
"pallet_count": 1,
"goods_category_2_name": "冻羊肉",
"new_ware_category_3_id": "WC000972",
"count_per_pallet": 33,
"unit_weight": 33.0,
"ware_type": 1,
"goods_category_3_name": "内蒙古"
}],
"old_customer_id": "K00084",
"can_create_task": true,
"new_customer_name": "北京客户002",
"new_customer_cellphone": "12312312311",
"old_customer_name": "北京客户001",
"status": 3,
"id": "ZH00034",
"old_customer_cellphone": "12312312312",
"operate_date": "2016-09-28"
},
"code": 0,
"msg": "ok"
}
创建转户单
接口名
/business/transfer/create
Method
POST
请求
old_customer_id M string 转出客户ID(K001)
new_customer_id M string 转入客户ID(K002)
响应
code M int 返回码,0表示成功,其他表示错误
msg M string 错误信息
data M string 返回转户单ID
示例
request
http://teststation.guanmai.cn:8888/business/transfer/create
form-data
old_customer_id:K001
new_customer_id:K002
response
{
"data": "ZH0001",
"code": 0,
"msg": "ok"
}
提交转户单
接口名
/business/transfer/submit
Method
POST
请求
id M string 转户单号
operate_date M datetime 转户日期
details M list 批次信息
transfer_count M int 转户数
old_batch_id M string 转出批次号
ware_category_4_id M string 转入通道ID
contract_id M string 转入合同ID
响应
code M int 返回码,0表示成功,其他表示错误
msg M string 错误信息
data M string 空
示例
request
127.0.0.1:8888/business/transfer/submit
form-data
id: ZH00001
operate_date: 2016-08-05
details:[{"old_batch_id":"1-1","transfer_count":100,"ware_category_4_id":"WD205","contract_id":"HT000001"}]
additional_task_details:[{"fee_id":"1","real_count":100,"follower_id":20,"remark":"WD205"}]
response
{
"msg": "ok",
"code": 0,
"data": ""
}
拒绝转户单
接口名
/business/transfer/reject
Method
POST
请求
id M string 转户单号
响应
code M int 返回码,0表示成功,其他表示错误
msg M string 错误信息
data M string 空
示例
request
127.0.0.1:8888/business/transfer/reject
form-data
id: ZH000001
response
{
"msg": "ok",
"code": 0,
"data": null
}
通过转户单
接口名
/business/transfer/adopt
Method
POST
请求
id M string 转户单号
响应
code M int 返回码,0表示成功,其他表示错误
msg M string 错误信息
data M string 空
示例
request
127.0.0.1:8888/business/transfer/adopt
form-data
id: ZH000001
response
{
"msg": "ok",
"code": 0,
"data": null
}
冲销转户单
接口名
/business/transfer/delete
Method
POST
请求
id M string 转户单号
响应
code M int 返回码,0表示成功,其他表示错误
msg M string 错误信息
data M string 空
示例
request
127.0.0.1:8888/business/transfer/delete
form-data
id: ZH000001
response
{
"msg": "ok",
"code": 0,
"data": null
}
转户单基础信息
接口名
/business/transfer/base_info
Method
GET
请求
无
响应
code M int 返回码,0表示成功,其他表示错误
msg M string 错误信息
data M string 基础信息
示例
request
127.0.0.1:8888/business/transfer/base_info
response
{
"data": {
"ware_type": {
"SHARE": 1,
"PRIVATE": 2
},
"status": {
"VERIFYING": 2,
"WAIT_FOR_SUBMIT": 1,
"FAIL": 4,
"DELETED": 5,
"PASSED": 3
}
},
"code": 0,
"msg": "ok"
}