feat(pl): 实现合同产品用证与额度结转以支持购买证和运输证全流程管理。
This commit is contained in:
1 parent
cb0344498a
commit
fb866c7fa7
104 files changed
+10187
-3833
No files matched your search
@@ -354,30 +354,16 @@ def smoke_pl(token: str) -> None:
|
||||
f"计划列表 ok pending={len(rows)} vehicles={len(vlist)} drivers={len(dlist)}(写操作条件不足已跳过)",
|
||||
)
|
||||
|
||||
# S8 证书:列表 + hazard ready 接口可达
|
||||
st, plans2 = req("GET", "/transport/plan/", token=token, params={"page": 1, "pageSize": 5, "followStatus": "processing"})
|
||||
pdata2 = plans2.get("data") if isinstance(plans2, dict) and isinstance(plans2.get("data"), dict) else plans2
|
||||
rows2 = pdata2.get("list") or pdata2.get("rows") or [] if isinstance(pdata2, dict) else []
|
||||
if not rows2:
|
||||
record("S8", True, "进行中计划空态;购买证写操作跳过(列表接口 ok)")
|
||||
# S8 新用证与后补资料只读入口;旧齐备写接口必须明确退役。
|
||||
st, quota = req("GET", "/transport/quota-certs/plans", token=token, params={"page": 1, "pageSize": 5})
|
||||
if st == 200:
|
||||
record("S8", True, "计划用证状态列表可读;预占/核销由隔离测试验证")
|
||||
else:
|
||||
pid = rows2[0].get("id")
|
||||
st2, detail = req("GET", f"/transport/plan/{pid}", token=token)
|
||||
products = []
|
||||
if isinstance(detail, dict):
|
||||
products = detail.get("products") or (detail.get("data") or {}).get("products") or []
|
||||
if products:
|
||||
# 不上传真实文件,只测齐备标记(可逆)
|
||||
ready = bool(detail.get("hazardCertReady") if "hazardCertReady" in detail else (detail.get("data") or {}).get("hazardCertReady"))
|
||||
st3, _ = req("PATCH", f"/transport/plan/{pid}/hazard-cert-ready", token=token, data={"ready": True})
|
||||
# 恢复
|
||||
req("PATCH", f"/transport/plan/{pid}/hazard-cert-ready", token=token, data={"ready": ready})
|
||||
if st3 < 400:
|
||||
record("S8", True, f"计划详情+证书齐备接口 ok plan={pid}(拍照上传需 UI/multipart)")
|
||||
else:
|
||||
record("S8", True, f"计划详情 ok;齐备接口 http={st3}")
|
||||
else:
|
||||
record("S8", True, f"计划详情 ok 无产品明细 plan={pid}")
|
||||
record("S8", False, f"计划用证列表 http={st},核对新业务权限")
|
||||
st2, _ = req("PATCH", "/transport/plan/retired-probe/hazard-cert-ready", token=token, data={"ready": True})
|
||||
record("S8-retired", st2 == 410, f"旧齐备入口 http={st2},预期410且无状态修改")
|
||||
st3, _ = req("GET", "/transport/legal-use-documents", token=token, params={"status": "pending"})
|
||||
record("S8-documents", st3 == 200, f"后补合法证明列表 http={st3}")
|
||||
|
||||
# S9 运费结算列表 + 用户选项
|
||||
st, freight = req("GET", "/transport/freight/", token=token, params={"page": 1, "pageSize": 5, "tab": "bills"})
|
||||
|
||||
Reference in new issue
Block a user