Files
orc-order-v2/config/suppliers_config.json
T
houhuan e4d62df7e3 feat: 益选 OCR 订单处理系统初始提交
- 智能供应商识别(蓉城易购/烟草/杨碧月/通用)
- 百度 OCR 表格识别集成
- 规则引擎(列映射/数据清洗/单位转换/规格推断)
- 条码映射管理与云端同步(Gitea REST API)
- 云端同步支持:条码映射、供应商配置、商品资料、采购模板
- 拖拽一键处理(图片→OCR→Excel→合并)
- 191 个单元测试
- 移除无用的模板管理功能
- 清理 IDE 产物目录

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 19:51:13 +08:00

238 lines
5.4 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"suppliers": [
{
"name": "蓉城易购",
"description": "蓉城易购供应商订单处理",
"filename_patterns": [
"*蓉城*",
"*rongcheng*",
"*易*"
],
"content_indicators": [
"蓉城易购",
"商品编码",
"订货数量"
],
"column_mapping": {
"商品条码(小条码)": "barcode",
"商品名称": "name",
"规格": "specification",
"订购数量(小单位)": "quantity",
"单位": "unit",
"单价(小单位)": "unit_price",
"优惠后金额(小单位)": "total_price",
"备注": "category",
"行号": "supplier"
},
"cleaning_rules": [
{
"type": "remove_rows",
"condition": "订货数量 == 0 or 订货数量.isna()"
},
{
"type": "fill_na",
"columns": [
"unit_price"
],
"value": 0
}
],
"calculations": [
{
"type": "multiply",
"source_column": "quantity",
"target_column": "quantity",
"factor": 1
}
],
"output_suffix": "_蓉城易购_银豹采购单",
"header_row": 2,
"rules": [
{
"type": "split_quantity_unit",
"source": "订购数量(小单位)"
},
{
"type": "extract_spec_from_name",
"source": "商品名称"
},
{
"type": "normalize_unit",
"target": "unit",
"map": {
"箱": "件",
"提": "件",
"盒": "件"
}
},
{
"type": "compute_quantity_from_total"
},
{
"type": "mark_gift"
},
{
"type": "fill_missing",
"fills": {
"unit": "瓶"
}
}
],
"output_templates": [
"templates/银豹-采购单模板.xls"
],
"current_template_index": 0
},
{
"name": "通用食品供应商",
"description": "通用食品类供应商订单",
"filename_patterns": [
"*食品*",
"*配送*",
"*供货*"
],
"content_indicators": [
"产品条码",
"订购量",
"进货价"
],
"column_mapping": {
"产品条码": "barcode",
"产品名称": "name",
"订购量": "quantity",
"进货价": "unit_price"
},
"cleaning_rules": [
{
"type": "convert_type",
"columns": [
"unit_price"
],
"target_type": "float"
},
{
"type": "fill_na",
"columns": [
"barcode",
"name",
"quantity"
],
"value": 0
}
],
"output_suffix": "_食品供应商_银豹采购单",
"rules": [
{
"type": "split_quantity_unit",
"source": "订购量"
},
{
"type": "extract_spec_from_name",
"source": "产品名称"
},
{
"type": "normalize_unit",
"target": "unit",
"map": {
"箱": "件",
"提": "件",
"盒": "件"
}
},
{
"type": "compute_quantity_from_total"
},
{
"type": "mark_gift"
},
{
"type": "fill_missing",
"fills": {
"unit": "瓶"
}
}
],
"output_templates": [
"templates/银豹-采购单模板.xls"
],
"current_template_index": 0
},
{
"name": "农夫山泉",
"description": "",
"filename_patterns": [],
"content_indicators": [],
"column_mapping": {
"条形码": "barcode",
"商品名称": "name",
"销售价": "unit_price",
"订单金额": "total_price",
"Unnamed: 0": "supplier",
"备注": "brand"
},
"header_row": 0,
"rules": [
{
"type": "split_quantity_unit",
"source": "订单数量"
},
{
"type": "extract_spec_from_name",
"source": "name"
},
{
"type": "normalize_unit",
"target": "unit",
"map": {
"箱": "件",
"提": "件",
"盒": "件"
}
},
{
"type": "compute_quantity_from_total"
},
{
"type": "mark_gift"
},
{
"type": "fill_missing",
"fills": {
"unit": "瓶"
}
}
],
"dictionary": {
"ignore_words": [
"白膜",
"彩膜",
"赠品"
],
"unit_synonyms": {
"箱": "件",
"提": "件",
"盒": "件",
"瓶": "瓶"
},
"pack_multipliers": {
"件": 24,
"箱": 24,
"提": 12,
"盒": 10
},
"name_patterns": [
"(\\d+(?:\\.\\d+)?)(ml|mL|ML|l|L|升|毫升)[*×xX](\\d+)",
"(\\d+)[*×xX](\\d+)瓶",
"(\\d{2,3}).*?(\\d{1,3})"
],
"default_unit": "瓶",
"default_package_quantity": 1
},
"output_templates": [
"templates/银豹-采购单模板.xls"
],
"current_template_index": 0
}
]
}