Merge branch 'ps' into 'master'

update 清洗报告数据优化

See merge request root/etl_tfse!3
This commit is contained in:
FECR-IBD 2022-03-10 09:04:16 +00:00
commit ecfcbb8542
1 changed files with 4 additions and 1 deletions

View File

@ -336,7 +336,10 @@ def calculate_tuple(param1, param2, param3, param4):
amount += item['amount'] amount += item['amount']
except TypeError: except TypeError:
amount += 0 amount += 0
concentration = round(amount / param3 * 100, 2) try:
concentration = round(amount / param3 * 100, 2)
except ZeroDivisionError:
concentration = 0
if concentration > 60: if concentration > 60:
result['concentration'] = '' result['concentration'] = ''
elif concentration > 40: elif concentration > 40: