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
jinan
traffic-signal-platform
Commits
22014ac8
Commit
22014ac8
authored
Jan 03, 2023
by
hanbing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
方案管理-灯组配置-service层基础
parent
02901842
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
83 additions
and
8 deletions
+83
-8
CrossConfigController.java
...et/wanji/web/controller/scheme/CrossConfigController.java
+8
-6
LightsConfigController.java
...t/wanji/web/controller/scheme/LightsConfigController.java
+43
-0
SaveLaneInfoDTO.java
...vice/src/main/java/net/wanji/web/dto/SaveLaneInfoDTO.java
+0
-2
SaveLightsInfoDTO.java
...ce/src/main/java/net/wanji/web/dto/SaveLightsInfoDTO.java
+13
-0
LightsConfigService.java
...ava/net/wanji/web/service/scheme/LightsConfigService.java
+6
-0
LightsConfigServiceImpl.java
...anji/web/service/scheme/impl/LightsConfigServiceImpl.java
+13
-0
No files found.
signal-control-service/src/main/java/net/wanji/web/controller/scheme/CrossConfigController.java
View file @
22014ac8
...
...
@@ -23,10 +23,12 @@ import javax.ws.rs.core.MediaType;
@RequestMapping
(
"/crossConfig"
)
@RestController
public
class
CrossConfigController
{
private
final
CrossConfigServiceImpl
crossConfigServiceImpl
;
public
CrossConfigController
(
CrossConfigServiceImpl
crossConfigServiceImpl
)
{
this
.
crossConfigServiceImpl
=
crossConfigServiceImpl
;
private
final
CrossConfigServiceImpl
crossConfigService
;
public
CrossConfigController
(
CrossConfigServiceImpl
crossConfigService
)
{
this
.
crossConfigService
=
crossConfigService
;
}
@ApiOperation
(
value
=
"保存渠化配置"
,
notes
=
"保存渠化配置"
,
response
=
JsonViewObject
.
class
,
...
...
@@ -37,7 +39,7 @@ public class CrossConfigController {
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
JsonViewObject
.
class
),
})
public
JsonViewObject
saveLaneInfo
(
@RequestBody
SaveLaneInfoDTO
saveLaneInfoDTO
)
{
crossConfigService
Impl
.
saveLaneInfo
(
saveLaneInfoDTO
);
crossConfigService
.
saveLaneInfo
(
saveLaneInfoDTO
);
JsonViewObject
jsonViewObject
=
JsonViewObject
.
newInstance
();
return
jsonViewObject
.
success
();
...
...
@@ -48,10 +50,10 @@ public class CrossConfigController {
@PostMapping
(
value
=
"/listLaneInfo"
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
JsonViewObject
.
class
),
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
SaveLaneInfoDTO
.
class
),
})
public
JsonViewObject
listLaneInfo
(
@RequestBody
CrossIdDTO
crossIdDTO
)
{
SaveLaneInfoDTO
saveLaneInfoDTO
=
crossConfigService
Impl
.
listLaneInfo
(
crossIdDTO
);
SaveLaneInfoDTO
saveLaneInfoDTO
=
crossConfigService
.
listLaneInfo
(
crossIdDTO
);
JsonViewObject
jsonViewObject
=
JsonViewObject
.
newInstance
();
return
jsonViewObject
.
success
(
saveLaneInfoDTO
);
...
...
signal-control-service/src/main/java/net/wanji/web/controller/scheme/LightsConfigController.java
View file @
22014ac8
package
net
.
wanji
.
web
.
controller
.
scheme
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiResponse
;
import
io.swagger.annotations.ApiResponses
;
import
net.wanji.web.common.entity.JsonViewObject
;
import
net.wanji.web.dto.CrossIdDTO
;
import
net.wanji.web.dto.SaveLightsInfoDTO
;
import
net.wanji.web.service.scheme.impl.LightsConfigServiceImpl
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.ws.rs.core.MediaType
;
/**
* @author Kent HAN
* @date 2022/12/20 10:14
...
...
@@ -12,6 +23,38 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping
(
"/lightsConfig"
)
@RestController
public
class
LightsConfigController
{
private
final
LightsConfigServiceImpl
lightsConfigService
;
public
LightsConfigController
(
LightsConfigServiceImpl
lightsConfigService
)
{
this
.
lightsConfigService
=
lightsConfigService
;
}
@ApiOperation
(
value
=
"保存灯组配置"
,
notes
=
"保存灯组配置"
,
response
=
JsonViewObject
.
class
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
@PostMapping
(
value
=
"/saveLightsInfo"
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
JsonViewObject
.
class
),
})
public
JsonViewObject
saveLightsInfo
(
@RequestBody
SaveLightsInfoDTO
saveLightsInfoDTO
)
{
lightsConfigService
.
saveLightsInfo
(
saveLightsInfoDTO
);
JsonViewObject
jsonViewObject
=
JsonViewObject
.
newInstance
();
return
jsonViewObject
.
success
();
}
@ApiOperation
(
value
=
"灯组配置列表"
,
notes
=
"灯组配置列表"
,
response
=
JsonViewObject
.
class
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
@PostMapping
(
value
=
"/listLightsInfo"
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
SaveLightsInfoDTO
.
class
),
})
public
JsonViewObject
listLightsInfo
(
@RequestBody
CrossIdDTO
crossIdDTO
)
{
SaveLightsInfoDTO
saveLightsInfoDTO
=
lightsConfigService
.
listLightsInfo
(
crossIdDTO
);
JsonViewObject
jsonViewObject
=
JsonViewObject
.
newInstance
();
return
jsonViewObject
.
success
(
saveLightsInfoDTO
);
}
}
signal-control-service/src/main/java/net/wanji/web/dto/SaveLaneInfoDTO.java
View file @
22014ac8
...
...
@@ -7,8 +7,6 @@ import lombok.NoArgsConstructor;
import
java.util.List
;
/**
* 方案管理-路口配置-保存渠化配置输入参数
*
* @author Kent HAN
* @date 2022/12/20 10:17
*/
...
...
signal-control-service/src/main/java/net/wanji/web/dto/SaveLightsInfoDTO.java
0 → 100644
View file @
22014ac8
package
net
.
wanji
.
web
.
dto
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author Kent HAN
* @date 2023/1/3 10:22
*/
@NoArgsConstructor
@Data
public
class
SaveLightsInfoDTO
{
}
signal-control-service/src/main/java/net/wanji/web/service/scheme/LightsConfigService.java
View file @
22014ac8
package
net
.
wanji
.
web
.
service
.
scheme
;
import
net.wanji.web.dto.CrossIdDTO
;
import
net.wanji.web.dto.SaveLightsInfoDTO
;
/**
* @author Kent HAN
* @date 2023/1/3 9:59
*/
public
interface
LightsConfigService
{
void
saveLightsInfo
(
SaveLightsInfoDTO
saveLightsInfoDTO
);
SaveLightsInfoDTO
listLightsInfo
(
CrossIdDTO
crossIdDTO
);
}
signal-control-service/src/main/java/net/wanji/web/service/scheme/impl/LightsConfigServiceImpl.java
View file @
22014ac8
package
net
.
wanji
.
web
.
service
.
scheme
.
impl
;
import
net.wanji.web.dto.CrossIdDTO
;
import
net.wanji.web.dto.SaveLightsInfoDTO
;
import
net.wanji.web.service.scheme.LightsConfigService
;
import
org.springframework.stereotype.Service
;
/**
* @author Kent HAN
* @date 2023/1/3 10:00
*/
@Service
public
class
LightsConfigServiceImpl
implements
LightsConfigService
{
@Override
public
void
saveLightsInfo
(
SaveLightsInfoDTO
saveLightsInfoDTO
)
{
}
@Override
public
SaveLightsInfoDTO
listLightsInfo
(
CrossIdDTO
crossIdDTO
)
{
return
null
;
}
}
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