f7aa4a8d062ff1ee1bff2259588d9f4d89105147
- 管理员/公司两类角色:PBKDF2 密码散列、随机初始密码、首次改密、 停用、重置密码与吊销会话。 - 会话只存令牌摘要,8 小时绝对过期;登录失败同 (账号,IP) 限流。 - 公司账号服务端绑定唯一公司;读取/上传/导出/主数据/审核接口逐项 服务端授权,跨公司访问返回 404 而非 403。 - 审计日志记录登录、改密、上传、导出、建公司、建/停/启用户。 - 决策记录见 docs/decisions/003-auth.md。
往来台账
当前版本包含银行流水表头识别内核,以及相互独立的总账管理端和公司业务端原型。
How recognition works
- Scan the first 50 rows of every worksheet.
- Normalize whitespace and full-width characters in candidate headers.
- Match required header aliases against known bank template signatures.
- Map columns by header name, independent of their order.
- Normalize transaction dates, income, expense, balance, counterparty, and reference fields.
- Reject unknown or ambiguous templates instead of guessing.
The original Excel file is never modified.
Run
python -m pip install -r requirements.txt
$env:PYTHONPATH = "src"
python -m bank_importer.cli "流水模板"
python -m unittest discover -s tests -v
python server.py
访问地址:
- 登录入口:
http://127.0.0.1:4173/ - 总账管理端:
http://127.0.0.1:4173/admin.html - 公司业务端:
http://127.0.0.1:4173/company.html
公司端上传会把所选工作簿提交到本地 /api/parse,与 CLI 使用同一个确定性表头解析器。当前前端是交互原型,公司、账号、期初、提醒和导入确认仅保存在当前浏览器页面中,尚未接入数据库和正式身份认证。
The CLI prints batch summaries only. It does not print sensitive transaction details.
Languages
Python
60.7%
JavaScript
17.4%
HTML
17.1%
CSS
4.8%