Merge branch 'ps' into 'master'
update 清洗报告数据优化 See merge request root/etl_tfse!3
This commit is contained in:
commit
ecfcbb8542
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue