feat: 智能导入——BOT自动识别报表类型/列名/期间/匹配KPI,无需手动映射
前端: 简化上传界面,自动模式(importExcelSmart) 后端: 新增/import-excel-smart端点,自动检测: - 列名: 科目/编码→kpi_code, 本期金额→value, 期间→period - 文件名: 提取期间(2026-06)和报表类型(利润表/现金流量表/资产负债表) - KPI匹配: 编码精确→别名→中文名模糊匹配
This commit is contained in:
@@ -67,6 +67,11 @@ export const dataApi = {
|
||||
form.append('file', file)
|
||||
return api.post(`/data/import-excel${qs ? '?' + qs : ''}`, form)
|
||||
},
|
||||
importExcelSmart: (file: File) => {
|
||||
const form = new FormData()
|
||||
form.append('file', file)
|
||||
return api.post('/data/import-excel-smart', form, { timeout: 60000 })
|
||||
},
|
||||
listSources: () => api.get('/data/sources'),
|
||||
createSource: (data: any) => api.post('/data/sources', data),
|
||||
updateSource: (id: number, data: any) => api.put(`/data/sources/${id}`, data),
|
||||
|
||||
Reference in New Issue
Block a user