Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MyEMS
MyEMS能源管理系统
提交
78c03924
M
MyEMS能源管理系统
项目概览
MyEMS
/
MyEMS能源管理系统
通知
46
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
MyEMS能源管理系统
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
78c03924
编写于
2月 06, 2024
作者:
U
unknown
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
resolved PEP warning in myems-api
上级
f58582db
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
20 addition
and
15 deletion
+20
-15
myems-api/core/distributionsystem.py
myems-api/core/distributionsystem.py
+1
-1
myems-api/core/meter.py
myems-api/core/meter.py
+1
-1
myems-api/reports/combinedequipmentbatch.py
myems-api/reports/combinedequipmentbatch.py
+2
-1
myems-api/reports/dashboard.py
myems-api/reports/dashboard.py
+12
-10
myems-api/reports/equipmentbatch.py
myems-api/reports/equipmentbatch.py
+2
-1
myems-api/reports/shopfloorbatch.py
myems-api/reports/shopfloorbatch.py
+2
-1
未找到文件。
myems-api/core/distributionsystem.py
浏览文件 @
78c03924
...
...
@@ -490,4 +490,4 @@ class DistributionSystemClone:
cnx
.
close
()
resp
.
status
=
falcon
.
HTTP_201
resp
.
location
=
'/distributionsystems/'
+
str
(
new_id
)
\ No newline at end of file
resp
.
location
=
'/distributionsystems/'
+
str
(
new_id
)
myems-api/core/meter.py
浏览文件 @
78c03924
...
...
@@ -1716,4 +1716,4 @@ class MeterClone:
cnx
.
close
()
resp
.
status
=
falcon
.
HTTP_201
resp
.
location
=
'/meters/'
+
str
(
new_id
)
\ No newline at end of file
resp
.
location
=
'/meters/'
+
str
(
new_id
)
myems-api/reports/combinedequipmentbatch.py
浏览文件 @
78c03924
...
...
@@ -145,7 +145,8 @@ class Reporting:
for
node
in
LevelOrderIter
(
node_dict
[
space_id
]):
space_dict
[
node
.
id
]
=
node
.
name
cursor_system_db
.
execute
(
" SELECT ce.id, ce.name AS combined_equipment_name, ce.uuid AS combined_equipment_uuid, s.name AS space_name, "
cursor_system_db
.
execute
(
" SELECT ce.id, ce.name AS combined_equipment_name, "
"ce.uuid AS combined_equipment_uuid, s.name AS space_name, "
" cc.name AS cost_center_name, ce.description "
" FROM tbl_spaces s, tbl_spaces_combined_equipments sce, "
" tbl_combined_equipments ce, tbl_cost_centers cc "
...
...
myems-api/reports/dashboard.py
浏览文件 @
78c03924
...
...
@@ -313,10 +313,10 @@ class Reporting:
sensor_dict
[
row
[
0
]][
'point_id_list'
]
=
list
()
if
sensor_id_list
is
not
None
and
len
(
sensor_id_list
)
>
0
:
cursor_system
.
execute
(
" SELECT sp.sensor_id, p.id, p.name, p.units "
" FROM tbl_sensors_points sp, tbl_points p "
" WHERE sp.sensor_id in ({}) "
" AND sp.point_id = p.id "
" ORDER BY p.id "
.
format
(
','
.
join
(
"{0}"
.
format
(
x
)
for
x
in
sensor_id_list
)))
" FROM tbl_sensors_points sp, tbl_points p "
" WHERE sp.sensor_id in ({}) "
" AND sp.point_id = p.id "
" ORDER BY p.id "
.
format
(
','
.
join
(
"{0}"
.
format
(
x
)
for
x
in
sensor_id_list
)))
rows_sensor_points
=
cursor_system
.
fetchall
()
if
rows_sensor_points
is
not
None
and
len
(
rows_sensor_points
)
>
0
:
for
row
in
rows_sensor_points
:
...
...
@@ -328,18 +328,20 @@ class Reporting:
for
key
in
sensor_dict
:
if
sensor_dict
[
key
][
'point_id_list'
]
is
not
None
and
len
(
sensor_dict
[
key
][
'point_id_list'
])
>
0
:
cursor_historical
.
execute
(
" SELECT point_id, actual_value "
" FROM tbl_analog_value_latest "
" WHERE point_id in ({}) "
" ORDER BY point_id "
.
format
(
','
.
join
(
"{0}"
.
format
(
x
)
for
x
in
sensor_dict
[
key
][
'point_id_list'
])))
" FROM tbl_analog_value_latest "
" WHERE point_id in ({}) "
" ORDER BY point_id "
.
format
(
','
.
join
(
"{0}"
.
format
(
x
)
for
x
in
sensor_dict
[
key
][
'point_id_list'
])))
rows_analog_values
=
cursor_historical
.
fetchall
()
if
rows_analog_values
is
not
None
and
len
(
rows_analog_values
)
>
0
:
for
row
in
rows_analog_values
:
point_data_dict
[
row
[
0
]]
=
row
[
1
]
cursor_historical
.
execute
(
" SELECT point_id, actual_value "
" FROM tbl_digital_value_latest "
" WHERE point_id in ({}) "
" ORDER BY point_id "
.
format
(
','
.
join
(
"{0}"
.
format
(
x
)
for
x
in
sensor_dict
[
key
][
'point_id_list'
])))
" FROM tbl_digital_value_latest "
" WHERE point_id in ({}) "
" ORDER BY point_id "
.
format
(
','
.
join
(
"{0}"
.
format
(
x
)
for
x
in
sensor_dict
[
key
][
'point_id_list'
])))
rows_digital_values
=
cursor_historical
.
fetchall
()
if
rows_digital_values
is
not
None
and
len
(
rows_digital_values
)
>
0
:
for
row
in
rows_digital_values
:
...
...
myems-api/reports/equipmentbatch.py
浏览文件 @
78c03924
...
...
@@ -146,7 +146,8 @@ class Reporting:
for
node
in
LevelOrderIter
(
node_dict
[
space_id
]):
space_dict
[
node
.
id
]
=
node
.
name
cursor_system_db
.
execute
(
" SELECT e.id, e.name AS equipment_name, e.uuid AS equipment_uuid, s.name AS space_name, "
cursor_system_db
.
execute
(
" SELECT e.id, e.name AS equipment_name, "
"e.uuid AS equipment_uuid, s.name AS space_name, "
" cc.name AS cost_center_name, e.description "
" FROM tbl_spaces s, tbl_spaces_equipments se, "
" tbl_equipments e, tbl_cost_centers cc "
...
...
myems-api/reports/shopfloorbatch.py
浏览文件 @
78c03924
...
...
@@ -146,7 +146,8 @@ class Reporting:
for
node
in
LevelOrderIter
(
node_dict
[
space_id
]):
space_dict
[
node
.
id
]
=
node
.
name
cursor_system_db
.
execute
(
" SELECT shopfloor.id, shopfloor.name AS shopfloor_name, shopfloor.uuid AS shopfloor_uuid, s.name AS space_name, "
cursor_system_db
.
execute
(
" SELECT shopfloor.id, shopfloor.name AS shopfloor_name, "
"shopfloor.uuid AS shopfloor_uuid, s.name AS space_name, "
" cc.name AS cost_center_name, shopfloor.description "
" FROM tbl_spaces s, tbl_spaces_shopfloors ss,"
" tbl_shopfloors shopfloor, tbl_cost_centers cc "
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录