update 担保数据新增过滤条件(录入时间)
This commit is contained in:
parent
d6279f8410
commit
b3bbab5db8
13
tyc.py
13
tyc.py
|
@ -426,11 +426,14 @@ def get_risk_info(param1, param2, param3, param4):
|
|||
{'企业名称': param3},
|
||||
[param2, '录入时间']
|
||||
)
|
||||
target_date = datetime.datetime.strptime(record['录入时间'], "%Y-%m-%d %H:%M:%S")
|
||||
current_date = datetime.datetime.now()
|
||||
minus = current_date - target_date
|
||||
if minus.days <= param4:
|
||||
return True
|
||||
if record:
|
||||
target_date = datetime.datetime.strptime(record['录入时间'], "%Y-%m-%d %H:%M:%S")
|
||||
current_date = datetime.datetime.now()
|
||||
minus = current_date - target_date
|
||||
if minus.days <= param4:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
else:
|
||||
return False
|
||||
|
||||
|
|
Loading…
Reference in New Issue