Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dwsproject
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dws
dwsproject
Commits
03fb64df
Commit
03fb64df
authored
Oct 30, 2025
by
malihua
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.rokedata.com/dws/dwsproject
into mlh_jzjx_project
parents
5d9134d7
f6c884f2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
+9
-1
tht_project/controllers/big_screen.py
+9
-1
No files found.
tht_project/controllers/big_screen.py
View file @
03fb64df
...
...
@@ -176,6 +176,7 @@ class ResMesBigScreen(http.Controller):
jsonrequest
=
http
.
request
.
jsonrequest
domain
=
[]
abnormal_alarm_id
=
jsonrequest
.
get
(
'abnormal_alarm_id'
,
False
)
plant_id
=
http
.
request
.
jsonrequest
.
get
(
'plant_id'
)
#车间ID参数
#表单id
if
abnormal_alarm_id
:
domain
.
append
((
'id'
,
'='
,
abnormal_alarm_id
))
...
...
@@ -183,6 +184,9 @@ class ResMesBigScreen(http.Controller):
#异常类型id
if
abnormal_id
:
domain
.
append
((
'abnormal_id'
,
'='
,
abnormal_id
))
# 车间 id
if
plant_id
:
domain
.
append
((
'equipment_id.plant_id'
,
'='
,
plant_id
))
page_size
=
int
(
http
.
request
.
jsonrequest
.
get
(
'page_size'
,
20
))
page_no
=
int
(
http
.
request
.
jsonrequest
.
get
(
'page_no'
,
1
))
abnormal_alarm_ids
=
http
.
request
.
env
(
user
=
SUPERUSER_ID
)[
'roke.abnormal.alarm'
]
.
search
(
domain
,
limit
=
page_size
,
offset
=
(
page_no
-
1
)
*
page_size
,
order
=
"originating_time desc"
)
...
...
@@ -212,7 +216,11 @@ class ResMesBigScreen(http.Controller):
try
:
url
=
"https://dws-platform.xbg.rokeris.com/dev-api/public/device_efficiency/series_utilization_rate_top_5"
date
=
fields
.
Date
.
today
()
.
strftime
(
"
%
Y-
%
m-
%
d"
)
eq_ids
=
http
.
request
.
env
[
"roke.mes.equipment"
]
.
sudo
()
.
search
([(
'code'
,
"!="
,
''
)])
plant_id
=
http
.
request
.
jsonrequest
.
get
(
'plant_id'
)
#车间ID参数
domain
=
[(
'code'
,
"!="
,
''
)]
if
plant_id
:
domain
.
append
((
'plant_id'
,
'='
,
plant_id
))
eq_ids
=
http
.
request
.
env
[
"roke.mes.equipment"
]
.
sudo
()
.
search
(
domain
)
query_data
=
[{
"device_name"
:
eq_id
.
name
,
"device_code"
:
eq_id
.
code
}
for
eq_id
in
eq_ids
]
res
=
requests
.
post
(
url
,
data
=
json
.
dumps
({
"device_code_list"
:
query_data
,
...
...
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