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
d904a93f
Commit
d904a93f
authored
Feb 05, 2025
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[add] 添加易购海信灯态推送
parent
8d632358
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
StrategyControlServiceImpl.java
...pt/synthesis/service/impl/StrategyControlServiceImpl.java
+3
-0
SignalStatusServiceImpl.java
...nji/utc/hisense/service/impl/SignalStatusServiceImpl.java
+9
-2
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/synthesis/service/impl/StrategyControlServiceImpl.java
View file @
d904a93f
...
...
@@ -247,6 +247,9 @@ public class StrategyControlServiceImpl implements StrategyControlService {
histVO
.
setId
(
crossId
);
histVO
.
setName
(
resultEntity
.
getCrossName
());
String
coordinateByCrossId
=
BaseCrossInfoCache
.
getCoordinateByCrossId
(
crossId
);
if
(
StringUtils
.
isBlank
(
coordinateByCrossId
))
{
continue
;
}
histVO
.
setWkt
(
coordinateByCrossId
.
replace
(
"POINT("
,
""
).
replace
(
" "
,
","
).
replace
(
")"
,
""
));
histVO
.
setStrategy
(
resultEntity
.
getCurrentAlgo
());
histVO
.
setStrategyName
(
StrategyCrossAlgoEnum
.
getDescByCode
(
resultEntity
.
getCurrentAlgo
()));
...
...
signal-utc-hisense-service/src/main/java/net/wanji/utc/hisense/service/impl/SignalStatusServiceImpl.java
View file @
d904a93f
...
...
@@ -54,6 +54,8 @@ public class SignalStatusServiceImpl implements SignalStatusService {
private
String
shensiUrl
;
@Value
(
"${hisenseLightsStatus.baiduUrl}"
)
private
String
baiduUrl
;
@Value
(
"${hisenseLightsStatus.yiGouUrl}"
)
private
String
yiGouUrl
;
@Override
public
List
<
SignalStatusLogPO
>
runningStatusAlarm
(
String
crossId
)
throws
DocumentException
{
...
...
@@ -193,7 +195,7 @@ public class SignalStatusServiceImpl implements SignalStatusService {
public
void
receiveLightStatus
(
List
<
HisenseLightStatusPojo
>
hisenseLightStatusPojos
)
throws
Exception
{
ObjectMapper
jackson
=
JacksonUtils
.
getInstance
();
pushOtherCompany
(
hisenseLightStatusPojos
,
jackson
,
shensiUrl
,
baiduUrl
);
pushOtherCompany
(
hisenseLightStatusPojos
,
jackson
,
shensiUrl
,
baiduUrl
,
yiGouUrl
);
if
(!
CollectionUtils
.
isEmpty
(
hisenseLightStatusPojos
))
{
for
(
HisenseLightStatusPojo
hisenseLightStatusPojo
:
hisenseLightStatusPojos
)
{
...
...
@@ -260,7 +262,7 @@ public class SignalStatusServiceImpl implements SignalStatusService {
}
private
static
void
pushOtherCompany
(
List
<
HisenseLightStatusPojo
>
hisenseLightStatusPojos
,
ObjectMapper
jackson
,
String
shensiUrl
,
String
baiduUrl
)
{
String
shensiUrl
,
String
baiduUrl
,
String
yiGouUrl
)
{
try
{
OkHttpClientUtil
.
jsonPost
(
shensiUrl
,
jackson
.
writeValueAsString
(
hisenseLightStatusPojos
));
}
catch
(
Exception
e
)
{
...
...
@@ -271,6 +273,11 @@ public class SignalStatusServiceImpl implements SignalStatusService {
}
catch
(
Exception
e
)
{
log
.
error
(
"海信灯态推送百度失败:{}"
,
e
.
getMessage
());
}
try
{
OkHttpClientUtil
.
jsonPost
(
yiGouUrl
,
jackson
.
writeValueAsString
(
hisenseLightStatusPojos
));
}
catch
(
Exception
e
)
{
log
.
error
(
"海信灯态推送易购失败:{}"
,
e
.
getMessage
());
}
}
/**
...
...
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