update bug
This commit is contained in:
parent
652cc034cb
commit
cce319cb3d
|
@ -154,12 +154,14 @@ def environment_energy(param):
|
|||
total.append(round(year_param['公司当年消耗的天然气(立方米)'] * 38.9310, 2))
|
||||
total.append(round(year_param['公司当年消耗的煤气(立方米)'] * 17.0000, 2))
|
||||
total.append(round(year_param['公司当年消耗的电(千瓦时)'] * 11.8400, 2))
|
||||
# 每年能耗
|
||||
|
||||
amount = sum(total)
|
||||
res = dict()
|
||||
res['amount'] = round(amount, 2)
|
||||
# 每年每万元收入能耗
|
||||
res['money_amount'] = round(amount / income, 2)
|
||||
res['amount'] = amount
|
||||
num = 2
|
||||
while round(amount / income, num) == 0.0:
|
||||
num += 1
|
||||
res['money_amount'] = round(amount / income, num + 1)
|
||||
return res
|
||||
|
||||
def calculate_three_year_data():
|
||||
|
@ -255,12 +257,13 @@ def environment_standard_coal(param):
|
|||
total.append(round(year_param['公司当年消耗的天然气(立方米)'] * 1.3300, 2))
|
||||
total.append(round(year_param['公司当年消耗的煤气(立方米)'] * 0.5700, 2))
|
||||
total.append(round(year_param['公司当年消耗的电(千瓦时)'] * 0.4040, 2))
|
||||
# 每年排放总量
|
||||
amount = sum(total)
|
||||
res = dict()
|
||||
res['amount'] = amount
|
||||
# 每年每万元收入二氧化碳排放量
|
||||
res['money_amount'] = round(amount / income, 2)
|
||||
num = 2
|
||||
while round(amount / income, num) == 0.0:
|
||||
num += 1
|
||||
res['money_amount'] = round(amount / income, num + 1)
|
||||
return res
|
||||
|
||||
def calculate_three_year_data():
|
||||
|
|
Loading…
Reference in New Issue