bugfix
This commit is contained in:
parent
50b9dddbdd
commit
e0885481c8
@ -3,7 +3,7 @@ import yaml
|
||||
from ahserver.serverenv import ServerEnv
|
||||
from ahserver.filestorage import FileStorage
|
||||
from sqlor.dbpools import DBPools, get_sor_context
|
||||
from appPublic.log import debug, exception
|
||||
from appPublic.log import debug, exception, info
|
||||
from appPublic.timeUtils import curDateString
|
||||
from appPublic.dictObject import DictObject
|
||||
from .write_pattern import write_pattern_xlsx, load_xlsx_pricing
|
||||
@ -164,8 +164,8 @@ def check_value(field, spec_value, data_value):
|
||||
return x
|
||||
|
||||
def data_mapping(ns, name, v):
|
||||
if 'mappings' in ns.keys():
|
||||
mappings = ns['mappings'].get(name)
|
||||
if f'{name}_mappings' in ns.keys():
|
||||
mappings = ns[f'{name}_mappings'].get(name)
|
||||
if mappings:
|
||||
return mappings.get(v, v)
|
||||
return v
|
||||
@ -437,6 +437,8 @@ order by b.enabled_date desc"""
|
||||
np.data = config_data
|
||||
np.amount = eval(formula, config_data)
|
||||
ret_items.append(np)
|
||||
else:
|
||||
info(f'{config_data=}, {P=} mismatched')
|
||||
if len(ret_items) == 0:
|
||||
e = f'{config_data=}{yamlstr=}没有找到合适的定价'
|
||||
exception(e)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user