- src/doc/ 拆分为 src/core/extraction/, matching/, validation/(核心业务逻辑) - src/bot/ 重命名为 src/infra/browser/(浏览器自动化基础设施) - fill_consumable_doc.py → src/infra/documents/consumable.py - 新增 Agent 调度模块:coordinator.py, events.py, session.py,重构 orchestrator.py - 更新 AGENTS.md、README.md 及所有子目录 README
135 lines
6.6 KiB
JSON
135 lines
6.6 KiB
JSON
{
|
|
"version": "1.0",
|
|
"custom_checks": {
|
|
"is_valid_date": "检查日期格式是否为 YYYY-MM-DD",
|
|
"is_positive_number": "检查是否为正数(整数或浮点数)",
|
|
"is_positive_integer": "检查是否为正整数"
|
|
},
|
|
"travel": {
|
|
"description": "差旅报销校验规则",
|
|
"fields": [
|
|
{
|
|
"path": ["basic_info", "travel_purpose"],
|
|
"required": true,
|
|
"check_empty": true,
|
|
"description": "出差事由"
|
|
},
|
|
{
|
|
"path": ["basic_info", "travel_location"],
|
|
"required": true,
|
|
"check_empty": true,
|
|
"description": "出差地点"
|
|
},
|
|
{
|
|
"path": ["basic_info", "start_date"],
|
|
"required": true,
|
|
"check_empty": true,
|
|
"custom_check": "is_valid_date",
|
|
"description": "出差开始日期"
|
|
},
|
|
{
|
|
"path": ["basic_info", "end_date"],
|
|
"required": true,
|
|
"check_empty": true,
|
|
"custom_check": "is_valid_date",
|
|
"description": "出差结束日期"
|
|
}
|
|
],
|
|
"arrays": [
|
|
{
|
|
"path": ["reimbursement_details", "transport_fee"],
|
|
"min_items": 1,
|
|
"description": "交通费用明细",
|
|
"element_fields": [
|
|
{"path": ["vehicle_type"], "required": true, "check_empty": true, "description": "交通工具类型"},
|
|
{"path": ["start_date"], "required": true, "check_empty": true, "custom_check": "is_valid_date", "description": "出发日期"},
|
|
{"path": ["end_date"], "required": true, "check_empty": true, "custom_check": "is_valid_date", "description": "到达日期"},
|
|
{"path": ["departure_place"], "required": true, "check_empty": true, "description": "出发地"},
|
|
{"path": ["arrival_place"], "required": true, "check_empty": true, "description": "目的地"},
|
|
{"path": ["amount"], "required": true, "check_empty": true, "custom_check": "is_positive_number", "description": "金额"},
|
|
{"path": ["bill_count"], "required": true, "check_empty": true, "custom_check": "is_positive_integer", "description": "票据张数"},
|
|
{"path": ["remark"], "required": true, "check_empty": false, "description": "备注说明"}
|
|
]
|
|
},
|
|
{
|
|
"path": ["payment_methods"],
|
|
"min_items": 1,
|
|
"description": "支付方式记录",
|
|
"element_fields": [
|
|
{"path": ["card_date"], "required": true, "check_empty": true, "custom_check": "is_valid_date", "description": "刷卡日期"},
|
|
{"path": ["card_amount"], "required": true, "check_empty": true, "custom_check": "is_positive_number", "description": "支付金额"},
|
|
{"path": ["merchant"], "required": true, "check_empty": true, "description": "商户名称"},
|
|
{"path": ["remark"], "required": true, "check_empty": false, "description": "备注"}
|
|
]
|
|
},
|
|
{
|
|
"path": ["subsidy_list"],
|
|
"min_items": 1,
|
|
"description": "补助清单",
|
|
"element_fields": [
|
|
{"path": ["person_id"], "required": true, "check_empty": true, "description": "人员工号"},
|
|
{"path": ["person_name"], "required": true, "check_empty": true, "description": "人员姓名"},
|
|
{"path": ["start_date"], "required": true, "check_empty": true, "custom_check": "is_valid_date", "description": "补助开始日期"},
|
|
{"path": ["end_date"], "required": true, "check_empty": true, "custom_check": "is_valid_date", "description": "补助结束日期"},
|
|
{"path": ["days"], "required": true, "check_empty": true, "custom_check": "is_positive_integer", "description": "补助天数"}
|
|
]
|
|
},
|
|
{
|
|
"path": ["attachments"],
|
|
"min_items": 0,
|
|
"description": "附件列表",
|
|
"element_fields": [
|
|
{"path": ["filename"], "required": true, "check_empty": true, "description": "文件名"},
|
|
{"path": ["attachment_type"], "required": true, "check_empty": true, "description": "附件类型"}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"normal": {
|
|
"description": "普通报销校验规则",
|
|
"fields": [
|
|
{
|
|
"path": ["basic_info", "reimbursement_description"],
|
|
"required": true,
|
|
"check_empty": true,
|
|
"description": "报销事由"
|
|
},
|
|
{
|
|
"path": ["reimbursement_details", "total_invoices"],
|
|
"required": true,
|
|
"check_empty": true,
|
|
"custom_check": "is_positive_integer",
|
|
"description": "发票总数"
|
|
},
|
|
{
|
|
"path": ["reimbursement_details", "total_amount"],
|
|
"required": true,
|
|
"check_empty": true,
|
|
"custom_check": "is_positive_number",
|
|
"description": "总金额"
|
|
}
|
|
],
|
|
"arrays": [
|
|
{
|
|
"path": ["payment_methods"],
|
|
"min_items": 1,
|
|
"description": "支付方式记录",
|
|
"element_fields": [
|
|
{"path": ["card_date"], "required": true, "check_empty": true, "custom_check": "is_valid_date", "description": "刷卡日期"},
|
|
{"path": ["card_amount"], "required": true, "check_empty": true, "custom_check": "is_positive_number", "description": "支付金额"},
|
|
{"path": ["merchant"], "required": true, "check_empty": true, "description": "商户名称"},
|
|
{"path": ["remark"], "required": true, "check_empty": false, "description": "备注"}
|
|
]
|
|
},
|
|
{
|
|
"path": ["attachments"],
|
|
"min_items": 0,
|
|
"description": "附件列表",
|
|
"element_fields": [
|
|
{"path": ["filename"], "required": true, "check_empty": true, "description": "文件名"},
|
|
{"path": ["attachment_type"], "required": true, "check_empty": true, "description": "附件类型"}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
} |