17 lines
570 B
Plaintext
17 lines
570 B
Plaintext
async def getbill(ns):
|
|
"""查询账单"""
|
|
db = DBPools()
|
|
async with db.sqlorContext('kboss') as sor:
|
|
if ns:
|
|
ns['del_flg'] = '0'
|
|
ns['sort'] = 'create_at'
|
|
ns['order'] = 'desc'
|
|
reacs = await sor.R('bill',ns)
|
|
for i in reacs['rows']:
|
|
ns = {'id':i['customerid'],'del_fig':'0'}
|
|
customer = await sor.R('organization', ns)
|
|
i['orgname'] = customer[0]['orgname']
|
|
return {'status': True, 'data': reacs}
|
|
|
|
ret = await getbill(params_kw)
|
|
return ret |