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
afdca7dd
Commit
afdca7dd
authored
Jan 17, 2023
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化信号控制参数校验
parent
373f2a42
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
SignalServiceController.java
...ava/net/wanji/web/controller/SignalServiceController.java
+3
-6
ControlCommandController.java
...va/net/wanji/utc/controller/ControlCommandController.java
+3
-3
ControlCommandStrategyServiceImpl.java
...rvice/control/impl/ControlCommandStrategyServiceImpl.java
+4
-1
No files found.
signal-control-service/src/main/java/net/wanji/web/controller/SignalServiceController.java
View file @
afdca7dd
...
@@ -8,10 +8,7 @@ import net.wanji.feign.service.UtcFeignClients;
...
@@ -8,10 +8,7 @@ import net.wanji.feign.service.UtcFeignClients;
import
net.wanji.web.common.util.StringUtils
;
import
net.wanji.web.common.util.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Objects
;
import
java.util.Objects
;
...
@@ -102,9 +99,9 @@ public class SignalServiceController {
...
@@ -102,9 +99,9 @@ public class SignalServiceController {
@ApiOperation
(
value
=
"恢复时间表-恢复路口时间表执行"
,
notes
=
"恢复时间表-恢复路口时间表执行"
)
@ApiOperation
(
value
=
"恢复时间表-恢复路口时间表执行"
,
notes
=
"恢复时间表-恢复路口时间表执行"
)
@PostMapping
(
"/recoverSchedule"
)
@PostMapping
(
"/recoverSchedule"
)
public
JsonViewObject
recoverSchedule
(
@Request
Body
String
code
)
throws
Exception
{
public
JsonViewObject
recoverSchedule
(
@Request
Param
String
code
)
throws
Exception
{
JsonViewObject
jsonViewObject
=
JsonViewObject
.
newInstance
();
JsonViewObject
jsonViewObject
=
JsonViewObject
.
newInstance
();
if
(
StringUtils
.
is
NotEmpty
(
code
))
{
if
(
StringUtils
.
is
Blank
(
code
))
{
return
jsonViewObject
.
fail
(
"路口编号不能为空"
);
return
jsonViewObject
.
fail
(
"路口编号不能为空"
);
}
}
jsonViewObject
=
utcFeignClients
.
recoverSchedule
(
code
);
jsonViewObject
=
utcFeignClients
.
recoverSchedule
(
code
);
...
...
signal-utc-service/src/main/java/net/wanji/utc/controller/ControlCommandController.java
View file @
afdca7dd
...
@@ -50,7 +50,7 @@ public class ControlCommandController {
...
@@ -50,7 +50,7 @@ public class ControlCommandController {
*/
*/
@ApiOperation
(
value
=
"计划下发-计划信息、时段信息"
,
notes
=
"计划下发-计划信息、时段信息"
)
@ApiOperation
(
value
=
"计划下发-计划信息、时段信息"
,
notes
=
"计划下发-计划信息、时段信息"
)
@PostMapping
(
"/planSend"
)
@PostMapping
(
"/planSend"
)
public
JsonViewObject
planSend
(
@RequestBody
PlanSendVO
planSendVO
)
throws
Exception
{
public
JsonViewObject
planSend
(
@RequestBody
@Validated
PlanSendVO
planSendVO
)
throws
Exception
{
return
controlCommandStrategyService
.
planSendStrategy
(
planSendVO
);
return
controlCommandStrategyService
.
planSendStrategy
(
planSendVO
);
}
}
...
@@ -63,7 +63,7 @@ public class ControlCommandController {
...
@@ -63,7 +63,7 @@ public class ControlCommandController {
*/
*/
@ApiOperation
(
value
=
"时间表下发-时间表信息"
,
notes
=
"时间表下发-时间表信息"
)
@ApiOperation
(
value
=
"时间表下发-时间表信息"
,
notes
=
"时间表下发-时间表信息"
)
@PostMapping
(
"/scheduleSend"
)
@PostMapping
(
"/scheduleSend"
)
public
JsonViewObject
scheduleSend
(
@RequestBody
ScheduleSendVO
scheduleSendVO
)
throws
Exception
{
public
JsonViewObject
scheduleSend
(
@RequestBody
@Validated
ScheduleSendVO
scheduleSendVO
)
throws
Exception
{
return
controlCommandStrategyService
.
scheduleSendStrategy
(
scheduleSendVO
);
return
controlCommandStrategyService
.
scheduleSendStrategy
(
scheduleSendVO
);
}
}
...
@@ -75,7 +75,7 @@ public class ControlCommandController {
...
@@ -75,7 +75,7 @@ public class ControlCommandController {
*/
*/
@ApiOperation
(
value
=
"相位配时下发-(下发相位参数)"
,
notes
=
"相位配时下发-(下发相位参数)"
)
@ApiOperation
(
value
=
"相位配时下发-(下发相位参数)"
,
notes
=
"相位配时下发-(下发相位参数)"
)
@PostMapping
(
"/phaseTimingSend"
)
@PostMapping
(
"/phaseTimingSend"
)
public
JsonViewObject
phaseTimingSend
(
@RequestBody
PhaseTimingSendVO
phaseTimingSendVO
)
throws
Exception
{
public
JsonViewObject
phaseTimingSend
(
@RequestBody
@Validated
PhaseTimingSendVO
phaseTimingSendVO
)
throws
Exception
{
return
controlCommandStrategyService
.
phaseTimingSendStrategy
(
phaseTimingSendVO
);
return
controlCommandStrategyService
.
phaseTimingSendStrategy
(
phaseTimingSendVO
);
}
}
...
...
signal-utc-service/src/main/java/net/wanji/utc/service/control/impl/ControlCommandStrategyServiceImpl.java
View file @
afdca7dd
...
@@ -245,7 +245,10 @@ public class ControlCommandStrategyServiceImpl implements ControlCommandStrategy
...
@@ -245,7 +245,10 @@ public class ControlCommandStrategyServiceImpl implements ControlCommandStrategy
@Override
@Override
public
JsonViewObject
recoverScheduleStrategy
(
String
crossId
)
throws
Exception
{
public
JsonViewObject
recoverScheduleStrategy
(
String
crossId
)
throws
Exception
{
JsonViewObject
jsonViewObject
;
JsonViewObject
jsonViewObject
=
JsonViewObject
.
newInstance
();
if
(
StringUtils
.
isBlank
(
crossId
))
{
return
jsonViewObject
.
fail
(
"路口编号不能为空"
);
}
String
manufacturerIdCode
=
getManufacturerCodeByCrossId
(
crossId
);
String
manufacturerIdCode
=
getManufacturerCodeByCrossId
(
crossId
);
if
(
StringUtils
.
equals
(
BasicEnum
.
ManufacturerEnum
.
HK
.
getCode
(),
manufacturerIdCode
))
{
if
(
StringUtils
.
equals
(
BasicEnum
.
ManufacturerEnum
.
HK
.
getCode
(),
manufacturerIdCode
))
{
jsonViewObject
=
hkControlCommandService
.
recoverSchedule
(
crossId
);
jsonViewObject
=
hkControlCommandService
.
recoverSchedule
(
crossId
);
...
...
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