Commit 8e48eb1b authored by 张鹏程's avatar 张鹏程

修改bug

1. el 表达式 对对于异常值的判断
parent 580063f5
This diff is collapsed.
......@@ -139,7 +139,6 @@ class Mapping():
exec("{} = '{}'".format(k, v['value']))
else:
exec('{} = {}'.format(k, round(v['value']),6))
if k in result_key:
result_key.remove(k)
result_key_t = result_key
......@@ -157,15 +156,15 @@ class Mapping():
if istrue:
isEl = True
for el in _result[key]['featrueELL']:
if el != -9999999 and el != '-9999999' and el != '数据不存在':
if eval(el) != -9999999 and eval(el) != '-9999999' and eval(el) != '数据不存在':
isEl = True
else:
isEl = False
if isEl:
try :
_result[key]['value'] = round(eval(_result[key]['featrueEL']),6)
except:
_result[key]['value'] = '数据不存在'
except ZeroDivisionError as z:
_result[key]['value'] = 0
else:
_result[key]['value'] = -9999999
exec('{} = {}'.format(key, round(_result[key]['value']),6))
......
......@@ -36,7 +36,7 @@ def apps():
(URL.url_calc_features, Calc_Features_Handler.CalcFeatures),
(URL.url_complex_order, ComplexOrder_Handler.ComplexOrder),
(URL.url_loanPostFeatures, LoanPostFeatures_Handler.loanPostFeatures),
],debug = True)
])
if __name__ == "__main__":
......@@ -52,7 +52,7 @@ if __name__ == "__main__":
IOLoop.instance().start()
#
# #
# from tornado.options import define, options
# define("port", default=23010, help="run on the given port ", type=int)
# define("log_path", default='/tmp', help="log path ", type=str)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment