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
d76600b3
Commit
d76600b3
authored
May 15, 2023
by
wang.wenrong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备管理复用cid逻辑
parent
e95ec161
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
hardware_pds.py
unify_api/modules/product_info/procedures/hardware_pds.py
+2
-2
No files found.
unify_api/modules/product_info/procedures/hardware_pds.py
View file @
d76600b3
...
@@ -231,7 +231,7 @@ async def hardware_statistics(company_id):
...
@@ -231,7 +231,7 @@ async def hardware_statistics(company_id):
async
with
MysqlUtil
()
as
conn
:
async
with
MysqlUtil
()
as
conn
:
inline_sql
=
"select count(*) as inline_count from inline where "
\
inline_sql
=
"select count(*) as inline_count from inline where "
\
"cid
_belongedto
=
%
s"
"cid =
%
s"
inline_count_map
=
await
conn
.
fetchone
(
sql
=
inline_sql
,
inline_count_map
=
await
conn
.
fetchone
(
sql
=
inline_sql
,
args
=
(
company_id
,))
args
=
(
company_id
,))
inline_count
=
inline_count_map
[
"inline_count"
]
inline_count
=
inline_count_map
[
"inline_count"
]
...
@@ -245,7 +245,7 @@ async def hardware_statistics(company_id):
...
@@ -245,7 +245,7 @@ async def hardware_statistics(company_id):
datetime
.
fromtimestamp
(
create_time_timestamp
),
"
%
Y-
%
m-
%
d
%
H:
%
M"
)
datetime
.
fromtimestamp
(
create_time_timestamp
),
"
%
Y-
%
m-
%
d
%
H:
%
M"
)
# power_capacity供电容量字段计算错误,改为inline表的tc_runtime字段相加
# power_capacity供电容量字段计算错误,改为inline表的tc_runtime字段相加
async
with
MysqlUtil
()
as
conn
:
async
with
MysqlUtil
()
as
conn
:
capacity_sql
=
"select tc_runtime from inline where cid
_belongedto
=
%
s"
capacity_sql
=
"select tc_runtime from inline where cid =
%
s"
capacity_list
=
await
conn
.
fetchall
(
sql
=
capacity_sql
,
capacity_list
=
await
conn
.
fetchall
(
sql
=
capacity_sql
,
args
=
(
company_id
,))
args
=
(
company_id
,))
power_capacity
=
0
power_capacity
=
0
...
...
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