Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
R
rentos
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
accounting
rentos
Commits
fcf3187c
Commit
fcf3187c
authored
Oct 15, 2026
by
wenwen.tang
😕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs(memory): 记录「项目合约」29 份线上导入完成(35 行 / 92.3MB / 零冗余)与导入踩过的两个坑
parent
d54f0e09
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
4 deletions
+26
-4
2026-10-15.md
.workbuddy/memory/2026-10-15.md
+17
-3
MEMORY.md
.workbuddy/memory/MEMORY.md
+9
-1
No files found.
.workbuddy/memory/2026-10-15.md
View file @
fcf3187c
...
@@ -79,9 +79,23 @@
...
@@ -79,9 +79,23 @@
看着像部署失败 →
**已改成登录失败时打印明确提示并跳过**
(不再抛栈;未改任何密码)
看着像部署失败 →
**已改成登录失败时打印明确提示并跳过**
(不再抛栈;未改任何密码)
-
HTTP 层功能验证改用「容器内直接调模块」完成;完整 HTTP/UI 链路已在沙箱(runner / ui_verify12)跑过
-
HTTP 层功能验证改用「容器内直接调模块」完成;完整 HTTP/UI 链路已在沙箱(runner / ui_verify12)跑过
## 线上批量导入(巴特菲选择「导到线上」)
1.
29 份合同 SFTP 传到
`/opt/rentos/uploads/项目合约`
(93MB,8 秒)
2.
容器内先干跑 → 与本地一致:29 文件 → 35 单元,零未匹配、零歧义
3.
`--apply`
首跑:
**33 处成功、1 份被拒**
—— 1101、1115 室那份扫描件
**21.8MB**
撞上 20MB 上限
→ 把上限提到
**40MB**
(40MB base64 后 53MB 仍 < server
`MAX_BODY=64MB`
),提交
`53b2389`
并重新部署
4.
补导那一份(临时目录走
`--dir`
)→ 1101/1115 挂上
5.
发现
**重复存储**
:脚本原先每个单元都 save 一次,多单元合同被存了多份(35 份 / 127MB)
→ 改为按文件名缓存 meta、同一份只落盘一次(提交
`d54f0e0`
),重新部署
6.
线上重置(清空 35 行 AL + 删 35 份文件,
`update_cells`
有备份)→ 重跑导入
**最终线上状态**
:有合同
**35 行**
· 索引/磁盘
**29 份**
·
**92.3MB**
(与源体积一致,零冗余)·
**失效关联 0**
· 未挂合同 50 行(空置或本来没合同)。
共用同一份的 6 组:307室/603室 · 601A室/702室 · 132车位/227车位 · 124车位/155车位 ·
1101室/1115室 · 501室/502室。
源副本挪到
`/opt/rentos/contracts-src/项目合约`
(93MB)留档,
`uploads/`
清空。
## 待办
## 待办
-
**29 份合同要不要真导入**
(本地 / 线上)——工具已就绪,干跑零误判,等巴特菲发话
-
线上 admin 密码当前值(问巴特菲;他选择「保持现状,不做 HTTP 抽查」)
(线上导入还需把文件传到服务器 + 在容器内跑
`import_contracts.py --apply`
)
-
线上 admin 密码当前值(问巴特菲;拿到后可恢复 HTTP 层自动抽查)
-
9 月电费批次错计(10 行 ¥167,947.41 / 少计 601B ¥299.67 / 出租方错记精锐)仍未处置
-
9 月电费批次错计(10 行 ¥167,947.41 / 少计 601B ¥299.67 / 出租方错记精锐)仍未处置
-
`ui_verify11`
里「保存修改」按钮的断言需同步改写(10-14 删了该按钮)
-
`ui_verify11`
里「保存修改」按钮的断言需同步改写(10-14 删了该按钮)
.workbuddy/memory/MEMORY.md
View file @
fcf3187c
...
@@ -73,7 +73,8 @@
...
@@ -73,7 +73,8 @@
一格可挂多份(租赁合同 + 补充协议 + 车位合同)。
一格可挂多份(租赁合同 + 补充协议 + 车位合同)。
-
单元格值 = 紧凑 JSON
`[{"id","name"}]`
;本体在
`data/contracts/{id}.{ext}`
+
`index.json`
-
单元格值 = 紧凑 JSON
`[{"id","name"}]`
;本体在
`data/contracts/{id}.{ext}`
+
`index.json`
-
`rentos/contracts.py`
:save/find/path_of/list_all/remove/parse/dump/describe;
-
`rentos/contracts.py`
:save/find/path_of/list_all/remove/parse/dump/describe;
白名单 pdf/doc/docx/xls/xlsx/png/jpg/gif/webp/bmp,单份
**≤ 20MB**
;id=uuid4 hex,
`clean_id`
挡路径穿越
白名单 pdf/doc/docx/xls/xlsx/png/jpg/gif/webp/bmp,单份
**≤ 40MB**
;id=uuid4 hex,
`clean_id`
挡路径穿越
-
⚠️ 上限 40MB 不是随手定的:扫描件合同能到 21.8MB,而 40MB base64 后 53MB 仍 < server
`MAX_BODY=64MB`
-
接口:
`POST|GET /api/contracts`
·
`GET /api/contracts/{id}`
(内联预览;
`?dl=1`
下载;支持
`?token=`
)·
-
接口:
`POST|GET /api/contracts`
·
`GET /api/contracts/{id}`
(内联预览;
`?dl=1`
下载;支持
`?token=`
)·
`DELETE /api/contracts/{id}`
——
**增删仅管理员**
(访客可查阅、不能增删)
`DELETE /api/contracts/{id}`
——
**增删仅管理员**
(访客可查阅、不能增删)
-
前端:
`td.files`
渲染按钮(
`📎 N 份`
/ 编辑态
`+ 合同`
)→
`openFilesDlg()`
浮层;
-
前端:
`td.files`
渲染按钮(
`📎 N 份`
/ 编辑态
`+ 合同`
)→
`openFilesDlg()`
浮层;
...
@@ -84,6 +85,13 @@
...
@@ -84,6 +85,13 @@
-
批量导入:
`tools/import_contracts.py`
(默认干跑,
`--apply`
写入,
`--replace`
覆盖);
-
批量导入:
`tools/import_contracts.py`
(默认干跑,
`--apply`
写入,
`--replace`
覆盖);
解析文件名
**开头**
的单元号串(
`1101、1115`
/
`124.155号`
/
`132&227车位`
/
`501-502室`
/
`601A&702`
),
解析文件名
**开头**
的单元号串(
`1101、1115`
/
`124.155号`
/
`132&227车位`
/
`501-502室`
/
`601A&702`
),
再按台账实际存在的
`n室`
/
`n车位`
定夺;
`项目合约/`
(93MB)
**不入库**
再按台账实际存在的
`n室`
/
`n车位`
定夺;
`项目合约/`
(93MB)
**不入库**
-
⚠️
**同一份文件只落盘一次**
(按文件名缓存 meta),多单元挂同一个 id —— 否则 29 份会膨胀成 35 份
-
**已导入(2026-10-15 · 线上)**
:29 份 →
**35 个单元**
,落盘
**29 份 / 92.3MB**
、无失效关联;
6 组共用同一份:307/603 · 601A/702 · 132/227车位 · 124/155车位 · 1101/1115 · 501/502
-
线上跑法:文件放
`/opt/rentos/uploads/项目合约`
(挂载进容器 =
`/app/uploads/...`
),
再
`docker exec rentos python /app/tools/import_contracts.py --dir /app/uploads/项目合约 --apply`
(脚本
`--dir`
传绝对路径即可,
`os.path.join`
会丢弃 ROOT)
-
源副本留服务器
`/opt/rentos/contracts-src/项目合约`
(93MB),
`uploads/`
已清空
## 房租车位费出单
## 房租车位费出单
链路:
`rent_parser.py`
→
`rent_render.py`
(→
`notice_pdf`
)→
`service.ingest_rent`
→ 批次
链路:
`rent_parser.py`
→
`rent_render.py`
(→
`notice_pdf`
)→
`service.ingest_rent`
→ 批次
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment