Appearance
设备估值
面向工程机械(汽车起重机、塔式起重机、履带吊等)的二手残值估值。根据型号、出厂日期检索同型号 / 同类型二手成交与挂牌,输出残值参考(人民币元)。厂家未填时可由系统联网补全。
无法给出残值时 estimatedResidualValue 为 null,不会填 0。
接口
| 方法 | 路径 | 说明 |
|---|---|---|
POST | /api/open/v1/equipment-valuations | 创建并后台执行 |
GET | /api/open/v1/equipment-valuations/{taskId} | 查询详情 |
POST | /api/open/v1/equipment-valuations/stream | 创建并 SSE |
对话材料 OCR:POST /api/open/v1/chat-sessions/materials/ocr?assetType=EQUIPMENT,见 智能对话。
通用约定见 约定与通用响应。
请求体
Content-Type: application/json
| 字段 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
model | string | 是 | 设备型号。名称带括号时取括号内检索,如 某某牌ABC1234(QTZ80) → QTZ80 | STC200 |
manufactureDate | string | 是 | 出厂日期,仅 YYYY-MM | 2021-06 |
manufacturer | string | 否 | 厂家。不传则联网推断 | 徐工 |
manufacturerInferred | boolean | 否 | 厂家是否为系统推断。用户手填时应为 false | false |
equipmentConfig | string | 否 | 设备配置 / 技术参数摘要(OCR 其余字段可汇总于此) | 起重 20 吨 |
materialFileName | string | 否 | 铭牌 / 行驶证文件名 | 铭牌.jpg |
materialRef | string | 否 | OCR 返回的材料引用 | |
source | string | 否 | 对话闭环传 CHAT | CHAT |
chatSessionId | number | 否 | 对话会话 ID | 123 |
查询参数:callbackUrl(可选)。
创建示例
bash
curl -s -X POST "http://localhost:8080/api/open/v1/equipment-valuations?callbackUrl=https://your.example.com/hooks/asset-ai" \
-H "Content-Type: application/json" \
-H "X-Api-Key: aai_你的密钥" \
-d '{
"model": "STC200",
"manufactureDate": "2021-06",
"manufacturer": "徐工"
}'创建成功 data 示例:
json
{
"taskId": 456,
"valuationNo": "VAL-EQP-20260818-0001",
"assetType": "EQUIPMENT",
"status": "IN_PROGRESS",
"statusLabel": "估值中",
"statusUrl": "/api/open/v1/equipment-valuations/456",
"message": "任务已受理并开始执行。请轮询 statusUrl 直至 SUCCESS/FAILED,或等待 Webhook;流式请改用 POST .../stream。"
}查询:
bash
curl -s "http://localhost:8080/api/open/v1/equipment-valuations/456" \
-H "X-Api-Key: aai_你的密钥"流式(请求体与创建相同):
bash
curl -N -X POST "http://localhost:8080/api/open/v1/equipment-valuations/stream" \
-H "Content-Type: application/json" \
-H "Accept: text/event-stream" \
-H "X-Api-Key: aai_你的密钥" \
-d '{
"model": "STC200",
"manufactureDate": "2021-06",
"manufacturer": "徐工"
}'成功时 result
金额单位为人民币元。产品报告侧重残值与依据;开放 result 可能含内部计算字段。
| 字段 | 类型 | 说明 |
|---|---|---|
estimatedResidualValue | number | null | 预估残值(元)。无法估值时为 null |
confidence | number | 置信度 |
effectiveSampleCount | integer | 有效样本数 |
ageYears | integer | 机龄(年) |
unableReason | string | null | 无法估值时的原因说明 |
unableReasonCategory | string | null | 无法估值原因分类 |
searchSummary | string | 检索摘要 |
dataFiltering | string | 样本筛选说明 |
riskTips | string[] | 风险提示 |
sources | object[] | 成交 / 挂牌样本,见下表 |
references | object[] | 参考资料,见下表 |
reasoningSummary | string | 结论摘要 |
reasoningSteps | string[] | 推理步骤 |
generatedAt | string | 生成时间 |
sources[]:
| 字段 | 类型 | 说明 |
|---|---|---|
source | string | 来源名称 |
sampleTime | string | 样本时间 |
price | number | 价格(元) |
kind | string | 成交 / 挂牌等 |
url | string | 链接 |
references[]:
| 字段 | 类型 | 说明 |
|---|---|---|
source | string | 来源名;未知时可能为空 |
content | string | 摘要 |
publishDate | string | 发布日期 |
url | string | 链接 |
retrievedAt | string | 抓取时间 |
查询成功示例(字段会随任务变化):
json
{
"taskId": 456,
"valuationNo": "VAL-EQP-20260818-0001",
"assetType": "EQUIPMENT",
"status": "SUCCESS",
"statusLabel": "成功",
"errorMessage": null,
"result": {
"estimatedResidualValue": 680000,
"confidence": 0.72,
"effectiveSampleCount": 6,
"ageYears": 5,
"searchSummary": "检索同型号 STC200 二手成交与挂牌",
"riskTips": [],
"sources": [
{
"source": "某二手设备平台",
"sampleTime": "2026-05",
"price": 700000,
"kind": "挂牌",
"url": "https://example.com/item/1"
}
],
"reasoningSummary": "以同型号近期挂牌中枢为主要依据。"
},
"createdAt": "2026-08-18T09:00:00Z"
}SDK
ts
const detail = await client.equipment.valuate({
model: "STC200",
manufactureDate: "2021-06",
manufacturer: "徐工",
});
const residual = (detail.result as { estimatedResidualValue?: number | null } | null)
?.estimatedResidualValue;对话 OCR 后再估值:
ts
const ocr = await client.chat.ocrMaterial("EQUIPMENT", {
fileName: "铭牌.jpg",
data: nameplateBlob,
});
// ocr.ocrFields 常见键:model、manufactureDate、manufacturer、equipmentConfig
const turn = await client.chat.sendMessage(session.id, {
content: `已上传材料:${ocr.materialFileName}`,
materialRef: ocr.materialRef,
materialFileName: ocr.materialFileName,
ocrAssetType: "EQUIPMENT",
ocrFields: ocr.ocrFields,
});
if (turn.readyToValue && turn.input) {
await client.equipment.valuate({
model: String(turn.input.model),
manufactureDate: String(turn.input.manufactureDate),
manufacturer: turn.input.manufacturer ? String(turn.input.manufacturer) : undefined,
equipmentConfig: turn.input.equipmentConfig
? String(turn.input.equipmentConfig)
: undefined,
materialRef: ocr.materialRef,
materialFileName: ocr.materialFileName,
source: "CHAT",
chatSessionId: session.id,
});
}