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-22 10:59:39 +08:00
2026-01-27 15:50:23 +08:00
2026-05-26 11:28:26 +08:00
2026-01-26 13:47:53 +08:00
2026-04-28 16:46:12 +08:00
2026-01-27 15:50:23 +08:00
2026-03-19 09:49:21 +08:00
2026-01-27 15:50:23 +08:00
2026-03-19 09:49:21 +08:00
2026-05-26 11:28:26 +08:00
2026-05-12 15:17:42 +08:00
2026-02-02 15:06:20 +08:00
2026-03-19 09:49:21 +08:00
2026-04-02 10:31:53 +08:00