From 9a6723378b3ed14f46fccc7b0592cef1d5cb1986 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Fri, 17 Jul 2026 14:48:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(accounting):=20billing.dspy=20=E2=80=94=20k?= =?UTF-8?q?eep=20page=20in=20ns=20for=20Tabular=20paging,=20extract=20Dict?= =?UTF-8?q?Object=20correctly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wwwroot/billing.dspy | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wwwroot/billing.dspy b/wwwroot/billing.dspy index e8dce7f..2d9b86f 100644 --- a/wwwroot/billing.dspy +++ b/wwwroot/billing.dspy @@ -12,6 +12,8 @@ ns = { 'orgid': userorgid, 'start_date': start_date, 'end_date': end_date, + 'page': int(params_kw.get('page', 1)), + 'rows': int(params_kw.get('rows', 60)), 'sort': 'acc_date desc' } @@ -48,8 +50,8 @@ where a.orgid = ${orgid}$ 'credit_sum': float(stats_recs[0].credit_sum) if stats_recs else 0 } result = { - 'total': len(rows), - 'rows': rows, + 'total': rows.total if not isinstance(rows, list) else len(rows), + 'rows': rows.rows if not isinstance(rows, list) else rows, 'stats': stats } return json.dumps(result, ensure_ascii=False, default=str)