openydt-flow-park-access

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

openydt-flow-park-access — 车辆进出场作业流程 (SOP)

openydt-flow-park-access — Vehicle Entry/Exit Operation Process (SOP)

CRITICAL:开始前 MUST 先用 Read 工具读取
../openydt-shared/SKILL.md
,了解认证 / profile / 签名 / 状态码 / 限速 / 安全等通用约定。本技能只讲“怎么把一辆车按真实物理流程弄进 / 弄出车场”的编排,不复述各命令的参数表——具体入参出参见各域技能。
CRITICAL: You MUST use the Read tool to read
../openydt-shared/SKILL.md
before starting
to understand general conventions such as authentication / profile / signature / status code / rate limit / security. This skill only focuses on the orchestration of "how to move a vehicle into/out of the parking lot according to real physical processes" and does not repeat the parameter tables of each command — refer to the corresponding domain skills for specific input and output parameters.

何时用本技能(与域技能的分工)

When to Use This Skill (Division of Labor with Domain Skills)

  • 用本技能:要把一辆车端到端进场或出场、模拟真实进出场、跑通整条链路、不确定先调哪个命令、或某一步报错不知如何接续。
  • 用域技能(不要走本流程):只查一条记录 / 在场车 / 锁车 / 只想调用某个单命令 →
    [[openydt-record]]
    (停车记录域)、
    [[openydt-device]]
    (设备域)、
    [[openydt-billing]]
    (缴费域)。
安全前提:进出场涉及写操作(补录、抓拍、校正、缴费、盘点),仅在 test 环境演练;每个写命令先
--dry-run
预览签名请求,确认后再加
--yes
。详见 openydt-shared 的安全约定。
  • Use this skill: Need to complete end-to-end entry/exit of a vehicle, simulate real entry/exit, run through the entire link, unsure which command to call first, or encounter an error in a certain step and don't know how to proceed.
  • Use domain skills (do not use this process): Only query a single record / check on-site vehicles / lock vehicles / want to call a single command →
    [[openydt-record]]
    (parking record domain),
    [[openydt-device]]
    (device domain),
    [[openydt-billing]]
    (payment domain).
Security Premise: Entry/exit involves write operations (supplement, capture, correction, payment, inventory), only practice in the test environment; preview the signed request with
--dry-run
for each write command first, then add
--yes
after confirmation. See the security conventions in openydt-shared.

两个必须先理解的概念

Two Concepts Must Be Understood First

1. 进场的两条路本质不同:
(a) 补录进场(b) 抓拍进场(模拟真实物理流程)
命令
supplement-parking-record-in
channel-snap
→(车牌不对则)
correct-car-on-channel
性质强制进场,车一定进不保证进场
抓拍流水不产生抓拍记录产生(本就是模拟抓拍)
适用车已实际进场但平台漏报,需要补一条进场记录演练真实进场物理过程:抓拍 → 识别 → 校正
2. 通道放行模式(最反直觉的一点): 抓拍进场里
correct-car-on-channel
校正成功 ≠ 车一定进场。是否真正进场取决于该通道的放行模式——若通道设了「严禁临时车进场」,校正后车也不会进车场。这是设计如此:抓拍链路严格按真实物理放行逻辑模拟。所以校正后务必复核是否真的在场(见下),不要假定校正完就进场了。
1. The two entry paths are essentially different:
(a) Supplement Entry(b) Capture Entry (Simulate Real Physical Process)
Command
supplement-parking-record-in
channel-snap
→ (if license plate is incorrect)
correct-car-on-channel
NatureForced entry, vehicle will definitely enterEntry not guaranteed
Capture LogNo capture record generatedGenerated (it is simulating capture)
Applicable ScenarioVehicle has actually entered but the platform missed it, need to supplement an entry recordPractice real entry physical process: Capture → Recognition → Correction
2. Channel Release Mode (The Most Counterintuitive Point): In capture entry,
correct-car-on-channel
successful correction ≠ vehicle will definitely enter. Whether the vehicle actually enters depends on the release mode of the channel — if the channel is set to "Prohibit temporary vehicles from entering", the vehicle will not enter the parking lot even after correction. This is by design: The capture link strictly simulates real physical release logic. Therefore, must verify whether the vehicle is actually on-site after correction (see below), do not assume entry is completed after correction.

进场流程

Entry Process

先判断用哪条路:只是要让记录里有这辆车(强制) → (a) 补录;要演练真实抓拍识别校正过程 → (b) 抓拍。
First determine which path to use: Just want the record to include this vehicle (forced) → (a) Supplement; Want to practice real capture, recognition and correction process → (b) Capture.

(a) 补录进场(强制,车必进)

(a) Supplement Entry (Forced, Vehicle Will Definitely Enter)

  1. (可选)
    openydt parking check-channel-exist-car
    确认通道当前是否已有车,避免重复补录。
  2. openydt parking supplement-parking-record-in --yes
    :传
    parkCode
    carCode
    enterTime
    channelCode
    carCodeType
    carCodeColor
    parkOrArea
    。响应返回新生成的
    parkingCode
    recordType
    /
    enterCarType
    未传时 CLI 会按平台文档默认值自动补
    1
    ,无需手填。
  3. 完成。补录是强制进场,记录立即生效。参数细节见
    [[openydt-record]]
  1. (Optional)
    openydt parking check-channel-exist-car
    to confirm whether there is already a vehicle in the current channel to avoid duplicate supplements.
  2. openydt parking supplement-parking-record-in --yes
    : Pass
    parkCode
    ,
    carCode
    ,
    enterTime
    ,
    channelCode
    ,
    carCodeType
    ,
    carCodeColor
    ,
    parkOrArea
    . The response returns the newly generated
    parkingCode
    .
    If
    recordType
    /
    enterCarType
    are not passed, the CLI will automatically fill them with the default value
    1
    according to the platform documentation, no need to fill manually.
  3. Completed. Supplement entry is forced entry, and the record takes effect immediately. For parameter details, see
    [[openydt-record]]
    .

(b) 抓拍进场(模拟真实物理流程,不保证进场)

(b) Capture Entry (Simulate Real Physical Process, Entry Not Guaranteed)

  1. 抓拍
    openydt device channel-snap --yes
    (传
    parkCode
    channelCode
    ),在进场通道触发一次抓拍。
    前提:该通道有抓拍设备;否则返回
    resultCode=908 找不到设备
    ,换有设备的通道。
  2. 判断车牌:看抓拍出的车牌是否就是目标车牌。
    • 是目标车牌 → 进入第 3 步前的放行判断。
    • 不是 → 校正
      openydt parking correct-car-on-channel --yes
      (传
      parkCode
      channelCode
      newCarNo
      =目标车牌、
      correctTime
      )。
      若报「会话已过期」,说明该通道当前没有可校正的抓拍会话,需先成功
      channel-snap
      再校正。
  3. 复核是否真的进场(关键):用
    openydt parking get-park-on-site-car
    (传
    parkCodeList
    +
    enterTimeFrom
    /
    enterTimeTo
    时间范围必填)查在场车。
    • 在场 → 进场成功。
    • 不在场 → 多半是该通道放行模式禁止临时车进场所致,校正不会让它进场;改用 (a) 补录,或换放行模式允许的通道。
  1. Capture:
    openydt device channel-snap --yes
    (pass
    parkCode
    ,
    channelCode
    ) to trigger a capture at the entry channel.
    Prerequisite: The channel has a capture device; otherwise, it returns
    resultCode=908 Device not found
    , switch to a channel with a device.
  2. Check License Plate: See if the captured license plate is the target license plate.
    • If it is the target license plate → Proceed to the release judgment before Step 3.
    • If not → Correction:
      openydt parking correct-car-on-channel --yes
      (pass
      parkCode
      ,
      channelCode
      ,
      newCarNo
      =target license plate,
      correctTime
      ).
      If it reports "Session expired", it means there is no capture session available for correction on the current channel, you need to successfully execute
      channel-snap
      first
      before correction.
  3. Verify Whether the Vehicle Actually Entered (Critical): Use
    openydt parking get-park-on-site-car
    (pass
    parkCodeList
    +
    enterTimeFrom
    /
    enterTimeTo
    , time range is required) to check on-site vehicles.
    • On-site → Entry successful.
    • Not on-site → Most likely because the channel release mode prohibits temporary vehicles from entering, correction will not allow it to enter; switch to (a) Supplement entry, or switch to a channel with allowed release mode.

出场流程

Exit Process

主路是「出口抓拍 → 校正 → 查费 →(按需)缴费」,常规走不通时用盘点离场兜底。
  1. 出口抓拍
    openydt device channel-snap --yes
    parkCode
    channelCode
    =出口通道)。
    前提:该出口有抓拍设备,且通常需是进场通道配对的出口;否则
    channel-snap
    908
    、随后的校正报「会话已过期」。无设备 / 非配对出口走不通时,跳到下面的「兜底:盘点离场」。
  2. 校正通道车辆
    openydt parking correct-car-on-channel --yes
    ,把待出车校正为目标车牌(
    newCarNo
    +
    correctTime
    )。
  3. 查费(确认环节)
    openydt trade get-park-fee
    (传
    carCode
    +
    parkCode
    )。
    • 看响应
      data.shouldPayValue
      单位:元
      1
      即 1.00 元,不是 1 分)确认是否欠费 / 应缴多少。
    • 同时取
      parkingCode
      chargeDate
      otherAttr.chargeBillToken
      /
      chargeBillNumber
      ,供下一步缴费回传。
    查费后 10 分钟内须完成缴费,令牌/账单否则失效。
  4. 缴费(可选,先问后做)
    • 先询问用户「是否需要缴费?用什么支付方式?」——缴费是真实写操作,不要默默执行。
    • 支付方式默认建议「现金」或由用户指定
      paymentMode
      /
      payOrigin
      的具体码见在线附录
      /Api/appendixData
      (catalog 未内置枚举)。
    • 确认后:
      openydt trade pay-park-fee --yes
      ,回传第 3 步取到的
      parkingCode
      chargeDate
      actPayCharge
      (≤
      shouldPayValue
      ,单位元)、
      payOrigin
      paymentMode
      、唯一
      billCode
      ,以及
      --body
      里的
      otherAtrr
      。完整缴费机制(带券、对账、billCode 唯一性)见
      [[openydt-billing]]
兜底:盘点离场 —— 当常规抓拍出场走不通(出口无抓拍设备 / 非配对出口)时,用
openydt parking inventory-car --yes
parkCode
enterTimeEnd
carNo
/
carNos
/
parkingCodes
remark
)作为补充手段把车盘点离场。查盘点记录用
openydt parking get-inventory-record
。命令细节见
[[openydt-record]]
The main path is "Exit Capture → Correction → Fee Inquiry → (Optional) Payment", use inventory exit as a fallback when the normal path is not feasible.
  1. Exit Capture:
    openydt device channel-snap --yes
    (
    parkCode
    ,
    channelCode
    =exit channel).
    Prerequisite: The exit has a capture device, and it usually needs to be the paired exit of the entry channel; otherwise,
    channel-snap
    returns
    908
    and subsequent correction reports "Session expired". If no device / non-paired exit makes it unfeasible, skip to "Fallback: Inventory Exit" below.
  2. Correct Channel Vehicle:
    openydt parking correct-car-on-channel --yes
    , correct the vehicle to be exited to the target license plate (
    newCarNo
    +
    correctTime
    ).
  3. Fee Inquiry (Confirmation Step):
    openydt trade get-park-fee
    (pass
    carCode
    +
    parkCode
    ).
    • Check
      data.shouldPayValue
      in the response (Unit: Yuan,
      1
      means 1.00 Yuan, not 1 cent) to confirm whether there is arrears / the amount to be paid.
    • At the same time, obtain
      parkingCode
      ,
      chargeDate
      ,
      otherAttr.chargeBillToken
      /
      chargeBillNumber
      for the next payment step.
    Payment must be completed within 10 minutes after fee inquiry, otherwise the token/bill will expire.
  4. Payment (Optional, Ask First Then Execute):
    • First ask the user "Do you need to pay? What payment method to use?" — Payment is a real write operation, do not execute it silently.
    • Default recommended payment method is "Cash" or specified by the user; specific codes for
      paymentMode
      /
      payOrigin
      can be found in the online appendix
      /Api/appendixData
      (enumerations are not built into the catalog).
    • After confirmation:
      openydt trade pay-park-fee --yes
      , pass
      parkingCode
      ,
      chargeDate
      ,
      actPayCharge
      (≤
      shouldPayValue
      , unit: Yuan),
      payOrigin
      ,
      paymentMode
      , unique
      billCode
      obtained in Step 3, and
      otherAtrr
      in
      --body
      . For complete payment mechanism (with coupons, reconciliation, billCode uniqueness), see
      [[openydt-billing]]
      .
Fallback: Inventory Exit — When the normal capture exit path is not feasible (no capture device at exit / non-paired exit), use
openydt parking inventory-car --yes
(
parkCode
,
enterTimeEnd
,
carNo
/
carNos
/
parkingCodes
,
remark
) as a supplementary method to inventory the vehicle out. Use
openydt parking get-inventory-record
to check inventory records. For command details, see
[[openydt-record]]
.

跨命令硬约束与失败速查

Cross-Command Hard Constraints and Quick Troubleshooting

现象 / 约束含义处理
channel-snap
resultCode=908 找不到设备
该通道没有抓拍设备换有抓拍设备的通道
correct-car-on-channel
报「会话已过期」
通道当前无可校正的抓拍会话先成功
channel-snap
再校正
抓拍进场校正后车不在场通道放行模式禁止临时车进场改补录进场,或换放行模式允许的通道
出场抓拍走不通出口无设备 / 非进场配对出口改用盘点离场
inventory-car
兜底
金额理解
shouldPayValue
/
actPayCharge
等单位是
别把
1
当 1 分
查费令牌查费后 10 分钟内须缴费超时重新查费
Phenomenon / ConstraintMeaningHandling
channel-snap
returns
resultCode=908 Device not found
The channel has no capture deviceSwitch to a channel with a capture device
correct-car-on-channel
reports "Session expired"
No capture session available for correction on the channelSuccessfully execute
channel-snap
first then correct
Vehicle not on-site after correction in capture entryChannel release mode prohibits temporary vehicles from enteringSwitch to supplement entry, or switch to a channel with allowed release mode
Capture exit path not feasibleNo device at exit / non-paired entry exitUse fallback
inventory-car
for exit
Amount Understanding
shouldPayValue
/
actPayCharge
are in Yuan
Do not treat
1
as 1 cent
Fee Inquiry TokenPayment must be completed within 10 minutes after fee inquiryRe-inquire fee if timed out

命令归属(参数见各域技能)

Command Attribution (See Domain Skills for Parameters)

  • 进场补录 / 校正 / 在场复核 / 盘点 →
    [[openydt-record]]
  • 抓拍
    channel-snap
    [[openydt-device]]
  • 查费
    get-park-fee
    / 缴费
    pay-park-fee
    [[openydt-billing]]
进出场是跨域流程;单条命令的入参、出参、枚举值一律以上述域技能为准,本技能只负责把它们按正确顺序和约束串起来。
  • Entry supplement / correction / on-site verification / inventory →
    [[openydt-record]]
  • Capture
    channel-snap
    [[openydt-device]]
  • Fee inquiry
    get-park-fee
    / Payment
    pay-park-fee
    [[openydt-billing]]
Entry/exit is a cross-domain process; input parameters, output parameters, and enumeration values of single commands are all subject to the above domain skills, this skill only connects them in the correct order and constraints.",