Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
L
laravelzh
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
冯超鹏
laravelzh
Commits
0c6beacb
Commit
0c6beacb
authored
Dec 16, 2020
by
冯超鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tcp 模块
parent
90d56336
Pipeline
#204
canceled with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
AlarmOrderController.php
app/Http/Controllers/AlarmOrderController.php
+3
-2
ZehongTcpController.php
app/Http/Controllers/Auth/ZehongTcpController.php
+1
-2
No files found.
app/Http/Controllers/AlarmOrderController.php
View file @
0c6beacb
...
...
@@ -23,7 +23,8 @@ class AlarmOrderController extends Controller
$limit
=
20
;
$offset
=
$limit
*
(
$request
->
input
(
'page'
)
-
1
);
if
(
$request
->
input
(
'isuser'
)
==
'user'
){
$isuser
=
[
'u.id'
,
'='
,
Auth
::
id
()];
$where
=
[];
$where
[]
=
[
'u.id'
,
'='
,
Auth
::
id
()];
}
$orders
=
AlarmOrder
::
selectRaw
(
'
FROM_UNIXTIME(r.starttime) AS start_time,
...
...
@@ -39,7 +40,7 @@ class AlarmOrderController extends Controller
->
leftjoin
(
'users AS u'
,
'alarm_order.user_id'
,
'='
,
'u.id'
)
->
leftjoin
(
'status AS s'
,
's.id'
,
'='
,
'alarm_order.reportpolice_id'
)
->
offset
(
$offset
)
->
where
(
$
isuser
)
->
where
(
$
where
)
->
limit
(
$limit
)
->
get
()
->
toArray
();
return
$this
->
jsonSuccessData
(
$orders
);
...
...
app/Http/Controllers/Auth/ZehongTcpController.php
View file @
0c6beacb
...
...
@@ -39,7 +39,6 @@ class ZehongTcpController extends Controller
if
(
$totcp
==
"暂无设备"
){
return
$totcp
;
}
$totcpdata
=
$totcp
[
'devicenum'
]
.
$totcp
[
'device_control'
]
.
$devicechongqi
.
$devicezijian
;
$crcdata
=
$this
->
getPrc
(
$totcpdata
);
return
$totcpdata
.
$crcdata
;
...
...
@@ -87,7 +86,7 @@ class ZehongTcpController extends Controller
if
(
$data
!=
[]){
$datainfo
=
DB
::
table
(
'device'
)
->
where
(
'devicenum'
,
'='
,
$data
[
'id'
])
->
update
([
'nd'
=>
intval
(
$data
[
'np'
]),
'devicepolice'
=>
$data
[
'status'
]
==
0
?
'1'
:
$data
[
'status'
],
'update_time'
=>
time
()]);
->
update
([
'nd'
=>
intval
(
$data
[
'np'
]),
'devicepolice'
=>
$data
[
'status'
]
==
0
?
'1'
:
$data
[
'status'
],
'update_time'
=>
time
()
,
'shutoff_status'
=>
$data
[
'famen'
]
]);
$todata
=
DB
::
table
(
'device'
)
->
where
(
'devicenum'
,
'='
,
$data
[
'id'
])
->
select
(
'devicenum'
,
'nd'
,
'device_control'
,
'devicepolice'
)
...
...
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