bugfix
This commit is contained in:
parent
e9cb3979a5
commit
b9d02d2fc6
@ -50,10 +50,13 @@ where enabled_date >= ${biz_date}$
|
|||||||
return recs[0]
|
return recs[0]
|
||||||
return None
|
return None
|
||||||
|
|
||||||
async def sor_get_program_items(sor, ppid):
|
async def sor_get_program_items(sor, ppid, biz_date):
|
||||||
sql = """select b.* from pricing_program_timing a, pricing_item b
|
sql = """select b.* from pricing_program_timing a, pricing_item b
|
||||||
where b.pptid = a.id
|
where b.pptid = a.id
|
||||||
and a.ppid = ${ppid}$"""
|
and a.ppid = ${ppid}$
|
||||||
|
and a.enabled_date <= ${biz_date}$
|
||||||
|
and a.expired_date > ${biz_date}$
|
||||||
|
"""
|
||||||
recs = await sor.sqlExe(sql, {'ppid': ppid})
|
recs = await sor.sqlExe(sql, {'ppid': ppid})
|
||||||
return recs
|
return recs
|
||||||
|
|
||||||
@ -89,7 +92,7 @@ async def pricing_program_charging(sor, pricing_program_id, data):
|
|||||||
if not data.get('biz_date'):
|
if not data.get('biz_date'):
|
||||||
biz_date = await env.get_business_date(self.sor)
|
biz_date = await env.get_business_date(self.sor)
|
||||||
data['biz_date'] = biz_date
|
data['biz_date'] = biz_date
|
||||||
pp_items = await pp.get_items(biz_date=data['biz_date'])
|
pp_items = await sor_get_program_items(pricing_program_id, data['biz_date'])
|
||||||
charges = []
|
charges = []
|
||||||
for item in pp_items:
|
for item in pp_items:
|
||||||
charge = item.copy()
|
charge = item.copy()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user