fix(accounting): billing.dspy — remove 'page' from ns to prevent sor.sqlExe auto-paging return DictObject
This commit is contained in:
parent
31c348878a
commit
4ef0808004
@ -12,8 +12,6 @@ ns = {
|
|||||||
'orgid': userorgid,
|
'orgid': userorgid,
|
||||||
'start_date': start_date,
|
'start_date': start_date,
|
||||||
'end_date': end_date,
|
'end_date': end_date,
|
||||||
'page': int(params_kw.get('page', 1)),
|
|
||||||
'rows': int(params_kw.get('rows', 30)),
|
|
||||||
'sort': 'acc_date desc'
|
'sort': 'acc_date desc'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,11 +25,7 @@ where a.orgid = ${orgid}$
|
|||||||
and d.acc_date >= ${start_date}$
|
and d.acc_date >= ${start_date}$
|
||||||
and d.acc_date <= ${end_date}$"""
|
and d.acc_date <= ${end_date}$"""
|
||||||
rows = await sor.sqlExe(sql, ns)
|
rows = await sor.sqlExe(sql, ns)
|
||||||
if not isinstance(rows, list):
|
|
||||||
rows = list(rows) if rows else []
|
|
||||||
debug(f'billing rows type={type(rows).__name__}, len={len(rows)}')
|
|
||||||
|
|
||||||
# 统计数据 — 独立 ns 避免被 sqlor 修改
|
|
||||||
stats_ns = {
|
stats_ns = {
|
||||||
'orgid': userorgid,
|
'orgid': userorgid,
|
||||||
'start_date': start_date,
|
'start_date': start_date,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user