47 lines
2.4 KiB
Markdown
47 lines
2.4 KiB
Markdown
## ADDED Requirements
|
|
|
|
### Requirement: Admin Card Asset Gateway IMEI Contract
|
|
|
|
The admin asset information integration SHALL accept and preserve `gateway_card_imei` for card assets, using the asset detail response as the primary source and the realtime-status response only as a fallback.
|
|
|
|
#### Scenario: Card asset detail preserves gateway_card_imei from resolve
|
|
|
|
- **GIVEN** 用户正在查看后台“资产信息”中的卡资产详情
|
|
- **AND** `GET /api/admin/assets/resolve/:identifier` 返回了有效 `gateway_card_imei`
|
|
- **WHEN** 前端解析卡资产详情响应
|
|
- **THEN** 页面状态 MUST 保留该 `gateway_card_imei`
|
|
- **AND** 后续展示 MUST 优先使用该详情值
|
|
|
|
#### Scenario: Card asset detail falls back to realtime-status when resolve lacks gateway_card_imei
|
|
|
|
- **GIVEN** 用户正在查看后台“资产信息”中的卡资产详情
|
|
- **AND** `GET /api/admin/assets/resolve/:identifier` 未返回有效 `gateway_card_imei`
|
|
- **AND** `GET /api/admin/assets/:identifier/realtime-status` 返回了有效 `gateway_card_imei`
|
|
- **WHEN** 前端合并实时状态到当前卡资产详情状态
|
|
- **THEN** 页面状态 MUST 使用 realtime-status 返回的 `gateway_card_imei` 作为回退值
|
|
|
|
### Requirement: Admin Card Asset Gateway IMEI Display
|
|
|
|
The admin asset information view SHALL display `gateway_card_imei` as `IMEI` only within the card asset `卡信息` section.
|
|
|
|
#### Scenario: Show gateway_card_imei in card information
|
|
|
|
- **GIVEN** 用户正在查看后台“资产信息”中的卡资产详情
|
|
- **AND** 当前卡资产详情状态中存在有效 `gateway_card_imei`
|
|
- **WHEN** 页面渲染“卡信息”区域
|
|
- **THEN** 页面 MUST 提供 `IMEI` 展示项
|
|
- **AND** 展示内容 MUST 与当前状态中的 `gateway_card_imei` 保持一致
|
|
|
|
#### Scenario: Show placeholder when no gateway_card_imei is available
|
|
|
|
- **GIVEN** 用户正在查看后台“资产信息”中的卡资产详情
|
|
- **AND** `GET /api/admin/assets/resolve/:identifier` 与 `GET /api/admin/assets/:identifier/realtime-status` 都未返回有效 `gateway_card_imei`
|
|
- **WHEN** 页面渲染“卡信息”区域中的 `IMEI`
|
|
- **THEN** 页面 MUST 显示 `-`
|
|
|
|
#### Scenario: Device asset detail does not render gateway_card_imei
|
|
|
|
- **GIVEN** 用户正在查看后台“资产信息”中的设备资产详情
|
|
- **WHEN** 页面渲染设备基础信息区域
|
|
- **THEN** 页面 MUST NOT 因 `gateway_card_imei` 新增 `IMEI` 展示项
|