Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
traffic-signal-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
signal
traffic-signal-platform
Commits
bd6de449
Commit
bd6de449
authored
Apr 03, 2023
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[update] 控制模式列表优化
parent
17f0378c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
FeignProxyServiceImpl.java
...ava/net/wanji/web/service/impl/FeignProxyServiceImpl.java
+10
-2
SignalStatusTask.java
...ce/src/main/java/net/wanji/web/task/SignalStatusTask.java
+5
-4
No files found.
signal-control-service/src/main/java/net/wanji/web/service/impl/FeignProxyServiceImpl.java
View file @
bd6de449
...
@@ -84,21 +84,29 @@ public class FeignProxyServiceImpl implements FeignProxyService {
...
@@ -84,21 +84,29 @@ public class FeignProxyServiceImpl implements FeignProxyService {
if
(
Objects
.
isNull
(
jsonViewObject
)
||
jsonViewObject
.
getCode
()
!=
200
)
{
if
(
Objects
.
isNull
(
jsonViewObject
)
||
jsonViewObject
.
getCode
()
!=
200
)
{
return
jsonViewObject
.
fail
(
"全红黄闪灯态控制UTC服务调用异常"
);
return
jsonViewObject
.
fail
(
"全红黄闪灯态控制UTC服务调用异常"
);
}
}
insertControlHist
(
commandVO
.
getCrossCode
(),
controlType
+
1
,
Constants
.
ProcessService
.
ADMIN_ID
);
Integer
isnertControl
=
null
;
if
(
Objects
.
equals
(
0
,
commandVO
.
getCommand
()))
{
isnertControl
=
1
;
}
else
{
isnertControl
=
controlType
+
1
;
}
insertControlHist
(
commandVO
.
getCrossCode
(),
isnertControl
,
Constants
.
ProcessService
.
ADMIN_ID
);
return
jsonViewObject
.
success
(
resultMessage
.
concat
(
"控制成功"
));
return
jsonViewObject
.
success
(
resultMessage
.
concat
(
"控制成功"
));
}
}
@Override
@Override
public
JsonViewObject
stepControl
(
StepControlVO
stepControlVO
)
{
public
JsonViewObject
stepControl
(
StepControlVO
stepControlVO
)
{
String
resultMessage
=
"步进控制成功"
;
String
resultMessage
=
"步进控制成功"
;
Integer
control
=
7
;
if
(
stepControlVO
.
getCommand
()
==
0
)
{
if
(
stepControlVO
.
getCommand
()
==
0
)
{
control
=
1
;
resultMessage
=
"步进控制恢复成功"
;
resultMessage
=
"步进控制恢复成功"
;
}
}
JsonViewObject
jsonViewObject
=
utcFeignClients
.
stepControl
(
stepControlVO
.
getCode
(),
stepControlVO
.
getCommand
(),
stepControlVO
.
getStepNum
());
JsonViewObject
jsonViewObject
=
utcFeignClients
.
stepControl
(
stepControlVO
.
getCode
(),
stepControlVO
.
getCommand
(),
stepControlVO
.
getStepNum
());
if
(
Objects
.
isNull
(
jsonViewObject
)
||
jsonViewObject
.
getCode
()
!=
200
)
{
if
(
Objects
.
isNull
(
jsonViewObject
)
||
jsonViewObject
.
getCode
()
!=
200
)
{
return
jsonViewObject
.
fail
(
"步进控制-步进控制/恢复UTC服务调用异常"
);
return
jsonViewObject
.
fail
(
"步进控制-步进控制/恢复UTC服务调用异常"
);
}
}
insertControlHist
(
stepControlVO
.
getCode
(),
7
,
Constants
.
ProcessService
.
ADMIN_ID
);
insertControlHist
(
stepControlVO
.
getCode
(),
control
,
Constants
.
ProcessService
.
ADMIN_ID
);
return
jsonViewObject
.
success
(
resultMessage
);
return
jsonViewObject
.
success
(
resultMessage
);
}
}
...
...
signal-control-service/src/main/java/net/wanji/web/task/SignalStatusTask.java
View file @
bd6de449
...
@@ -64,6 +64,9 @@ public class SignalStatusTask {
...
@@ -64,6 +64,9 @@ public class SignalStatusTask {
}
}
Integer
currentSignalStatus
=
signalStatusVO
.
getStatus
()
==
null
?
0
:
signalStatusVO
.
getStatus
();
Integer
currentSignalStatus
=
signalStatusVO
.
getStatus
()
==
null
?
0
:
signalStatusVO
.
getStatus
();
Integer
currentFaultType
=
signalStatusVO
.
getFaultType
()
==
null
?
0
:
signalStatusVO
.
getFaultType
();
Integer
currentFaultType
=
signalStatusVO
.
getFaultType
()
==
null
?
0
:
signalStatusVO
.
getFaultType
();
if
(
currentSignalStatus
==
1
&&
!
Objects
.
equals
(
0
,
currentFaultType
))
{
currentSignalStatus
=
2
;
}
// 更新数据库状态
// 更新数据库状态
LambdaQueryWrapper
<
TDeviceStatusInfo
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
TDeviceStatusInfo
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
...
@@ -72,9 +75,7 @@ public class SignalStatusTask {
...
@@ -72,9 +75,7 @@ public class SignalStatusTask {
TDeviceStatusInfo
tDeviceStatusInfo
=
tDeviceStatusMapper
.
selectOne
(
lambdaQueryWrapper
);
TDeviceStatusInfo
tDeviceStatusInfo
=
tDeviceStatusMapper
.
selectOne
(
lambdaQueryWrapper
);
if
(
Objects
.
nonNull
(
tDeviceStatusInfo
))
{
if
(
Objects
.
nonNull
(
tDeviceStatusInfo
))
{
if
(
isExucuteUpdate
(
currentSignalStatus
,
currentFaultType
,
tDeviceStatusInfo
))
{
if
(
isExucuteUpdate
(
currentSignalStatus
,
currentFaultType
,
tDeviceStatusInfo
))
{
if
(
currentSignalStatus
==
1
&&
!
Objects
.
equals
(
0
,
currentFaultType
))
{
currentSignalStatus
=
2
;
}
tDeviceStatusInfo
.
setFaultType
(
currentFaultType
);
tDeviceStatusInfo
.
setFaultType
(
currentFaultType
);
tDeviceStatusInfo
.
setGmtCreate
(
new
Date
());
// 实时数据,创建和修改时间一致
tDeviceStatusInfo
.
setGmtCreate
(
new
Date
());
// 实时数据,创建和修改时间一致
tDeviceStatusMapper
.
updateById
(
tDeviceStatusInfo
);
tDeviceStatusMapper
.
updateById
(
tDeviceStatusInfo
);
...
@@ -85,8 +86,8 @@ public class SignalStatusTask {
...
@@ -85,8 +86,8 @@ public class SignalStatusTask {
deviceStatusInfo
.
setCode
(
crossId
);
deviceStatusInfo
.
setCode
(
crossId
);
deviceStatusInfo
.
setName
(
name
);
deviceStatusInfo
.
setName
(
name
);
deviceStatusInfo
.
setType
(
1
);
deviceStatusInfo
.
setType
(
1
);
deviceStatusInfo
.
setStatus
(
currentSignalStatus
);
deviceStatusInfo
.
setFaultType
(
currentFaultType
);
deviceStatusInfo
.
setFaultType
(
currentFaultType
);
deviceStatusInfo
.
setStatus
(
currentSignalStatus
);
deviceStatusInfo
.
setGmtCreate
(
new
Date
());
deviceStatusInfo
.
setGmtCreate
(
new
Date
());
deviceStatusInfo
.
setId
(
null
);
deviceStatusInfo
.
setId
(
null
);
tDeviceStatusMapper
.
insert
(
deviceStatusInfo
);
tDeviceStatusMapper
.
insert
(
deviceStatusInfo
);
...
...
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