DXC
1450e6c1de
fix(借还记录列表): 按 borrow_no 单号维度分页 + 修 SQLAlchemy Row 适配错误
- 分页基准从明细行改为单号:21 项单号不再被拆到 3 页
- 步骤 1a 构造 GROUP BY borrow_no 的 subquery(sort_key + status 聚合)
- 步骤 2 主查询 SELECT order_subq.c.borrow_no 一列,避免触发 PG GROUP BY 严格模式 (f405)
- 步骤 3 用 page_borrow_nos 拉明细,保留前端 groupMap 期望的 items 形态
- pagination.items 用 isinstance + hasattr(_mapping) 兜底提取纯字符串(修 psycopg2 can't adapt type 'Row')
- service 加 try-except,路由层识别 500 透传 traceback
- status 过滤改为单号聚合(borrowed=至少一条未还,returned=全部归还)
2026-06-16 14:53:42 +08:00
..
2026-06-16 14:53:42 +08:00
2026-05-25 11:11:10 +08:00
2026-06-12 14:08:19 +08:00
2026-02-09 11:29:37 +08:00
2026-06-16 14:53:42 +08:00
2026-06-12 15:04:57 +08:00
2026-05-21 14:09:57 +08:00
2026-05-18 16:16:50 +08:00