bugfix
This commit is contained in:
parent
438dd6042f
commit
e6862e1f57
@ -4,20 +4,20 @@
|
|||||||
"params": {
|
"params": {
|
||||||
"sortby": "name",
|
"sortby": "name",
|
||||||
"browserfields": {
|
"browserfields": {
|
||||||
"exclouded": ["id", "ppid"],
|
"exclouded": ["id", "pptid"],
|
||||||
"alters": {
|
"alters": {
|
||||||
"psid":{
|
"psid":{
|
||||||
"dataurl":"{{entire_url('../pi_get_all_specs.dspy')}}",
|
"dataurl":"{{entire_url('../pi_get_all_specs.dspy')}}",
|
||||||
"textField": "name",
|
"textField": "name",
|
||||||
"valueField": "id",
|
"valueField": "id",
|
||||||
"params": {
|
"params": {
|
||||||
"ppid":"{{params_kw.ppid}}"
|
"pptid":"{{params_kw.pptid}}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"editexclouded": [
|
"editexclouded": [
|
||||||
"id", "ppid"
|
"id", "pptid"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -50,14 +50,19 @@ where enabled_date >= ${biz_date}$
|
|||||||
return recs[0]
|
return recs[0]
|
||||||
return None
|
return None
|
||||||
|
|
||||||
async def get_pricing_specs_by_ppid(ppid):
|
async def get_pricing_specs_by_pptid(pptid):
|
||||||
env = ServerEnv()
|
env = ServerEnv()
|
||||||
dbname = env.get_module_dbname('pricing')
|
dbname = env.get_module_dbname('pricing')
|
||||||
db = DBPools()
|
db = DBPools()
|
||||||
async with db.sqlorContext(dbname) as sor:
|
async with db.sqlorContext(dbname) as sor:
|
||||||
pp = PricingProgram(ppid, sor)
|
sql = """select d.*
|
||||||
await pp.init()
|
from pricing_program_timing a, pricing_program b, pricing_type c, pricing_spec d
|
||||||
return await pp.get_specs()
|
where a.ppid = b.id
|
||||||
|
and b.ptid = c.id
|
||||||
|
and d.ptid = c.id
|
||||||
|
and a.id = ${pptid}$"""
|
||||||
|
recs = await sor.sqlExe(sql, {'pptid': pptid})
|
||||||
|
return recs
|
||||||
return []
|
return []
|
||||||
|
|
||||||
async def get_remote_pricing(sor, charge, data):
|
async def get_remote_pricing(sor, charge, data):
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
return await get_pricing_specs_by_ppid(params_kw.ppid)
|
return await get_pricing_specs_by_pptid(params_kw.pptid)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user