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
37714a0e
Commit
37714a0e
authored
Nov 05, 2024
by
zhouleilei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
海信-延长相位配置feign
parent
48ba9243
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
49 additions
and
0 deletions
+49
-0
ControlCommandController.java
...va/net/wanji/utc/controller/ControlCommandController.java
+11
-0
StaticInfoController.java
...n/java/net/wanji/utc/controller/StaticInfoController.java
+3
-0
ControlCommandService.java
.../net/wanji/utc/service/control/ControlCommandService.java
+2
-0
ControlCommandStrategyService.java
...ji/utc/service/control/ControlCommandStrategyService.java
+4
-0
ControlCommandStrategyServiceImpl.java
...rvice/control/impl/ControlCommandStrategyServiceImpl.java
+12
-0
HKControlCommandServiceImpl.java
...utc/service/control/impl/HKControlCommandServiceImpl.java
+6
-0
WanJiControlCommandServiceImpl.java
.../service/control/impl/WanJiControlCommandServiceImpl.java
+11
-0
No files found.
signal-utc-service/src/main/java/net/wanji/utc/controller/ControlCommandController.java
View file @
37714a0e
...
...
@@ -8,6 +8,7 @@ import lombok.extern.slf4j.Slf4j;
import
net.wanji.common.annotation.aspect.AspectLog
;
import
net.wanji.common.enums.BaseEnum
;
import
net.wanji.common.framework.rest.JsonViewObject
;
import
net.wanji.databus.dto.ExtendPhaseDTO
;
import
net.wanji.databus.vo.TempSchemeSendVO
;
import
net.wanji.databus.po.SaveToUtcPO
;
import
net.wanji.databus.vo.*
;
...
...
@@ -233,4 +234,14 @@ public class ControlCommandController {
}
/**
* 海信-延长相位
*/
@AspectLog
(
description
=
"海信-延长相位"
,
operationType
=
BaseEnum
.
OperationTypeEnum
.
UPDATE
)
@ApiOperation
(
value
=
"海信-延长相位"
,
notes
=
"海信-延长相位"
)
@PostMapping
(
"/extendPhase"
)
public
JsonViewObject
extendPhase
(
@RequestBody
@Validated
ExtendPhaseDTO
extendPhase
)
throws
Exception
{
return
controlCommandStrategyService
.
extendPhase
(
extendPhase
);
}
}
signal-utc-service/src/main/java/net/wanji/utc/controller/StaticInfoController.java
View file @
37714a0e
...
...
@@ -115,6 +115,7 @@ public class StaticInfoController {
@AspectLog
(
description
=
"查询信号机时间"
,
operationType
=
BaseEnum
.
OperationTypeEnum
.
QUERY
)
@PostMapping
(
value
=
"/signalTime"
,
produces
=
MediaType
.
APPLICATION_JSON
)
@ApiOperation
(
value
=
"查询信号机时间"
,
notes
=
"查询信号机时间"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
CrossSchedulesPO
.
class
)
})
...
...
@@ -127,11 +128,13 @@ public class StaticInfoController {
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
CrossSchedulesPO
.
class
)
})
@ApiOperation
(
value
=
"获取当前运行方案号"
,
notes
=
"获取当前运行方案号"
)
public
JsonViewObject
crossSchemeNo
(
@RequestParam
String
crossId
)
throws
Exception
{
return
staticInfoService
.
crossSchemeNo
(
crossId
);
}
@AspectLog
(
description
=
"方案环图请求"
,
operationType
=
BaseEnum
.
OperationTypeEnum
.
QUERY
)
@PostMapping
(
value
=
"/crossSchemeRings"
,
produces
=
MediaType
.
APPLICATION_JSON
)
@ApiOperation
(
value
=
"方案环图请求"
,
notes
=
"方案环图请求"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
CrossSchedulesPO
.
class
)
})
...
...
signal-utc-service/src/main/java/net/wanji/utc/service/control/ControlCommandService.java
View file @
37714a0e
package
net
.
wanji
.
utc
.
service
.
control
;
import
net.wanji.common.framework.rest.JsonViewObject
;
import
net.wanji.databus.dto.ExtendPhaseDTO
;
import
net.wanji.databus.vo.TempSchemeSendVO
;
import
net.wanji.databus.vo.*
;
import
net.wanji.utc.po.hk.request.DelBaseConfigPO
;
...
...
@@ -100,4 +101,5 @@ public interface ControlCommandService {
JsonViewObject
timing
(
String
crossCode
,
Date
date
)
throws
Exception
;
JsonViewObject
tempScheme
(
String
crossCode
,
Integer
schemeNo
)
throws
Exception
;
JsonViewObject
tempSchemeDetail
(
TempSchemeSendVO
tempSchemeSendVO
)
throws
Exception
;
JsonViewObject
extendPhase
(
ExtendPhaseDTO
extendPhase
)
throws
Exception
;
}
signal-utc-service/src/main/java/net/wanji/utc/service/control/ControlCommandStrategyService.java
View file @
37714a0e
package
net
.
wanji
.
utc
.
service
.
control
;
import
net.wanji.common.framework.rest.JsonViewObject
;
import
net.wanji.databus.dto.ExtendPhaseDTO
;
import
net.wanji.databus.vo.TempSchemeSendVO
;
import
net.wanji.databus.po.SaveToUtcPO
;
import
net.wanji.databus.vo.*
;
...
...
@@ -98,7 +99,10 @@ public interface ControlCommandStrategyService {
JsonViewObject
timing
(
String
crossCode
,
Date
date
)
throws
Exception
;
JsonViewObject
tempScheme
(
String
crossCode
,
Integer
schemeNo
)
throws
Exception
;
JsonViewObject
tempSchemeDetail
(
TempSchemeSendVO
tempSchemeSendVO
)
throws
Exception
;
JsonViewObject
saveToUtc
(
SaveToUtcPO
saveToUtcPO
)
throws
Exception
;
JsonViewObject
extendPhase
(
ExtendPhaseDTO
extendPhase
)
throws
Exception
;
}
signal-utc-service/src/main/java/net/wanji/utc/service/control/impl/ControlCommandStrategyServiceImpl.java
View file @
37714a0e
...
...
@@ -3,6 +3,7 @@ package net.wanji.utc.service.control.impl;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
net.wanji.common.framework.rest.JsonViewObject
;
import
net.wanji.databus.dto.ExtendPhaseDTO
;
import
net.wanji.databus.vo.TempSchemeSendVO
;
import
net.wanji.databus.dao.entity.*
;
import
net.wanji.databus.dao.mapper.*
;
...
...
@@ -441,4 +442,15 @@ public class ControlCommandStrategyServiceImpl implements ControlCommandStrategy
crossSchemePhaseTimeCountCache
.
run
();
return
JsonViewObject
.
newInstance
().
success
(
"数据下发到Utc数据库成功,并刷新缓存"
);
}
@Override
public
JsonViewObject
extendPhase
(
ExtendPhaseDTO
extendPhase
)
throws
Exception
{
String
manufacturerCode
=
crossInfoCache
.
getManufacturerCodeByCrossId
(
extendPhase
.
getCrossId
());
JsonViewObject
jsonViewObject
=
JsonViewObject
.
newInstance
();
if
(
StringUtils
.
equals
(
BasicEnum
.
ManufacturerEnum
.
HK
.
getCode
(),
manufacturerCode
))
{
}
else
{
jsonViewObject
=
wanJiControlCommandService
.
extendPhase
(
extendPhase
);
}
return
jsonViewObject
;
}
}
signal-utc-service/src/main/java/net/wanji/utc/service/control/impl/HKControlCommandServiceImpl.java
View file @
37714a0e
...
...
@@ -8,6 +8,7 @@ import com.hikvision.artemis.sdk.ArtemisHttpUtil;
import
com.hikvision.artemis.sdk.config.ArtemisConfig
;
import
lombok.extern.slf4j.Slf4j
;
import
net.wanji.common.framework.rest.JsonViewObject
;
import
net.wanji.databus.dto.ExtendPhaseDTO
;
import
net.wanji.databus.vo.TempSchemeSendVO
;
import
net.wanji.databus.dao.entity.CrossPhasePO
;
import
net.wanji.databus.dao.entity.SetTimingPO
;
...
...
@@ -560,4 +561,9 @@ public class HKControlCommandServiceImpl implements ControlCommandService {
public
JsonViewObject
tempSchemeDetail
(
TempSchemeSendVO
tempSchemeSendVO
)
throws
Exception
{
return
null
;
}
@Override
public
JsonViewObject
extendPhase
(
ExtendPhaseDTO
extendPhase
)
throws
Exception
{
return
null
;
}
}
signal-utc-service/src/main/java/net/wanji/utc/service/control/impl/WanJiControlCommandServiceImpl.java
View file @
37714a0e
...
...
@@ -2,6 +2,7 @@ package net.wanji.utc.service.control.impl;
import
lombok.RequiredArgsConstructor
;
import
net.wanji.common.framework.rest.JsonViewObject
;
import
net.wanji.databus.dto.ExtendPhaseDTO
;
import
net.wanji.databus.vo.TempSchemeSendVO
;
import
net.wanji.databus.vo.*
;
import
net.wanji.feign.service.common.FeignCommon
;
...
...
@@ -189,4 +190,14 @@ public class WanJiControlCommandServiceImpl implements ControlCommandService {
}
return
jsonViewObject
.
fail
(
"下发临时方案失败!"
);
}
@Override
public
JsonViewObject
extendPhase
(
ExtendPhaseDTO
extendPhase
)
throws
Exception
{
String
manufacturerIdCode
=
crossInfoCache
.
getManufacturerCodeByCrossId
(
extendPhase
.
getCrossId
());
JsonViewObject
jsonViewObject
=
utcFeignClientCache
.
getUtcFeignClientService
(
manufacturerIdCode
).
extendPhase
(
extendPhase
);
if
(
StringUtils
.
endsWithIgnoreCase
(
"success"
,
jsonViewObject
.
getStatus
()))
{
return
jsonViewObject
.
success
(
"海信-延长相位成功!"
);
}
return
jsonViewObject
.
fail
(
"海信-延长相位失败!"
);
}
}
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