Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
U
unify_api2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chaonan
unify_api2
Commits
70e2c2d1
Commit
70e2c2d1
authored
Sep 07, 2022
by
peng.xiaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页获取指数信息bug修复 能耗None设置为0计算
parent
4754c324
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
carbon_reduce_service.py
...i/modules/carbon_neutral/service/carbon_reduce_service.py
+1
-1
count_info_service.py
unify_api/modules/home_page/service/count_info_service.py
+2
-2
No files found.
unify_api/modules/carbon_neutral/service/carbon_reduce_service.py
View file @
70e2c2d1
...
@@ -103,7 +103,7 @@ async def carbon_emission_index_service(cid, start, end):
...
@@ -103,7 +103,7 @@ async def carbon_emission_index_service(cid, start, end):
# 3. 碳排指数
# 3. 碳排指数
# 3.1 能耗偏差
# 3.1 能耗偏差
if
energy_standard
:
if
energy_standard
:
deviation
=
(
energy_standard
-
conversion_year
)
/
energy_standard
deviation
=
(
energy_standard
-
conversion_year
)
/
energy_standard
if
conversion_year
else
1
# 3.2 碳排指数
# 3.2 碳排指数
c_index
=
carbon_index
(
deviation
)
c_index
=
carbon_index
(
deviation
)
# 4. 达标情况
# 4. 达标情况
...
...
unify_api/modules/home_page/service/count_info_service.py
View file @
70e2c2d1
...
@@ -23,7 +23,7 @@ from unify_api.modules.home_page.procedures.count_info_pds import other_info, \
...
@@ -23,7 +23,7 @@ from unify_api.modules.home_page.procedures.count_info_pds import other_info, \
electric_use_info
,
cid_alarm_importance_count
,
\
electric_use_info
,
cid_alarm_importance_count
,
\
alarm_importance_count_total
,
power_factor
,
current_load
,
\
alarm_importance_count_total
,
power_factor
,
current_load
,
\
get_company_charge_price
,
health_status_res
,
carbon_status_res_web
,
\
get_company_charge_price
,
health_status_res
,
carbon_status_res_web
,
\
optimization_count_info
,
economic_index_desc
optimization_count_info
,
economic_index_desc
,
electric_use_info_new15
from
unify_api.modules.home_page.procedures.count_info_proxy_pds
import
\
from
unify_api.modules.home_page.procedures.count_info_proxy_pds
import
\
alarm_percentage_count
,
alarm_safe_power
alarm_percentage_count
,
alarm_safe_power
from
unify_api.modules.tsp_water.dao.drop_dust_dao
import
\
from
unify_api.modules.tsp_water.dao.drop_dust_dao
import
\
...
@@ -421,7 +421,7 @@ async def all_index_info_service(cid):
...
@@ -421,7 +421,7 @@ async def all_index_info_service(cid):
health_index
=
round
(
health_index
)
health_index
=
round
(
health_index
)
health_status
=
health_status_res
(
health_index
,
"web"
)
health_status
=
health_status_res
(
health_index
,
"web"
)
# 2. 安全指数
# 2. 安全指数
elec_info
=
await
electric_use_info
(
cid
)
elec_info
=
await
electric_use_info
_new15
(
cid
)
safety_index
=
elec_info
.
electric_use_score
safety_index
=
elec_info
.
electric_use_score
safety_status
=
safety_ratio_res
(
safety_index
,
"web"
)
safety_status
=
safety_ratio_res
(
safety_index
,
"web"
)
# 3. 碳排指数
# 3. 碳排指数
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment