Files
testForNiuKe/context.md
T
2026-10-02 21:48:08 +08:00

39 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
BASE=http://localhost:8000
curl -X POST $BASE/system/reset
# 1 建包裹(COD,金客户寄出,目标派送网点 A)
curl -X POST $BASE/parcels -H 'Content-Type: application/json' -d '{
"id":"P1","sender":"CUS_GOLD","receiver":"CUS_SILVER",
"category":"易碎","declared_value":10000,"priority":"加急",
"is_cod":true,"cod_amount":5000,"deliv_target":"ST_DELIV_A",
"address":" 北京市 朝阳区 "
}'
# 2 揽收
curl -X POST $BASE/parcels/P1/pickup -d '{}' -H 'Content-Type: application/json'
curl $BASE/waybills # 取运单 id(假设 W_P1)
# 3 分拣(易碎必须 A 区)
curl -X POST $BASE/parcels/P1/sort -d '{"zone":"A"}' -H 'Content-Type: application/json'
# 4 推进两站:ST_HUB→ST_TRANS→ST_DELIV_A
curl -X POST $BASE/parcels/P1/advance
curl -X POST $BASE/parcels/P1/advance
# 5 派单
curl -X POST $BASE/parcels/P1/assign-courier
# 6 派送
curl -X POST $BASE/parcels/P1/deliver
# 7 签收(COD 收款)
curl -X POST $BASE/parcels/P1/sign
# 8 COD 对账 + 回款
curl -X POST $BASE/cod/COD_P1/reconcile
curl -X POST $BASE/cod/COD_P1/settle
# 9 核对:包裹已签收 / 运单已完成 / 寄件人余额 = 5000(只应一次)
curl $BASE/parcels/P1
curl $BASE/customers/CUS_GOLD