update 担保数据新增过滤条件(录入时间)

This commit is contained in:
P3ngSaM 2022-06-13 14:33:47 +08:00
parent d6279f8410
commit b3bbab5db8
1 changed files with 8 additions and 5 deletions

13
tyc.py
View File

@ -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