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
0771d199
Commit
0771d199
authored
Nov 05, 2024
by
zhouleilei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
海信-去掉测试数据
parent
6e1fb6a6
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
166 deletions
+16
-166
ControlCommandServiceImpl.java
...i/utc/hisense/service/impl/ControlCommandServiceImpl.java
+13
-124
StaticInfoServiceImpl.java
...wanji/utc/hisense/service/impl/StaticInfoServiceImpl.java
+3
-42
No files found.
signal-utc-hisense-service/src/main/java/net/wanji/utc/hisense/service/impl/ControlCommandServiceImpl.java
View file @
0771d199
This diff is collapsed.
Click to expand it.
signal-utc-hisense-service/src/main/java/net/wanji/utc/hisense/service/impl/StaticInfoServiceImpl.java
View file @
0771d199
...
@@ -103,53 +103,16 @@ public class StaticInfoServiceImpl implements StaticInfoService {
...
@@ -103,53 +103,16 @@ public class StaticInfoServiceImpl implements StaticInfoService {
@Override
@Override
public
CrossSchemeRings
crossSchemeRings
(
CrossSchemeRingsDTO
crossSchemeRingsDTO
)
throws
Exception
{
public
CrossSchemeRings
crossSchemeRings
(
CrossSchemeRingsDTO
crossSchemeRingsDTO
)
throws
Exception
{
//TODO 暂时注释
CrossInfoPOExt
crossInfoPOExt
=
crossInfoMapper
.
selectById
(
crossSchemeRingsDTO
.
getCrossId
());
// CrossInfoPOExt crossInfoPOExt = crossInfoMapper.selectById(crossId);
//组装document
//组装document
Document
document
=
OperationBaseDom
.
generateBaseDoc
();
Document
document
=
OperationBaseDom
.
generateBaseDoc
();
Element
element
=
(
Element
)
document
.
selectSingleNode
(
HttpConstants
.
SYSTEMSCRIPTION
);
Element
element
=
(
Element
)
document
.
selectSingleNode
(
HttpConstants
.
SYSTEMSCRIPTION
);
element
.
addElement
(
HttpConstants
.
MESSAGETYPE
).
setText
(
HttpConstants
.
MESSAGETYPE_30
);
element
.
addElement
(
HttpConstants
.
MESSAGETYPE
).
setText
(
HttpConstants
.
MESSAGETYPE_30
);
Element
messageContent
=
(
Element
)
document
.
selectSingleNode
(
HttpConstants
.
SYSTEMSCRIPTION_MESSAGECONTENT
);
Element
messageContent
=
(
Element
)
document
.
selectSingleNode
(
HttpConstants
.
SYSTEMSCRIPTION_MESSAGECONTENT
);
// messageContent.addElement(HttpConstants.SPOT).setText(crossInfoPOExt.getCode());
messageContent
.
addElement
(
HttpConstants
.
SPOT
).
setText
(
crossInfoPOExt
.
getCode
());
messageContent
.
addElement
(
HttpConstants
.
SPOT
).
setText
(
crossSchemeRingsDTO
.
getCrossId
());
messageContent
.
addElement
(
HttpConstants
.
PATTERN
).
setText
(
crossSchemeRingsDTO
.
getPattern
());
messageContent
.
addElement
(
HttpConstants
.
PATTERN
).
setText
(
crossSchemeRingsDTO
.
getPattern
());
//给海信发送http请求
//给海信发送http请求
// String post = OkHttpClientUtil.xmlPost(hisenseUrl, document.asXML());
String
post
=
OkHttpClientUtil
.
xmlPost
(
hisenseUrl
,
document
.
asXML
());
String
post
=
"<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"
+
"<systemScription System=\"TCIP\" Version=\"1.0\">\n"
+
"<subSystem>Hisense</subSystem>\n"
+
"<messageType>30</messageType>\n"
+
"<isRequest>0</isRequest>\n"
+
"<seq>20190806160612000678</seq>\n"
+
"<needResponse>0</needResponse>\n"
+
"<result>1</result>\n"
+
"<flag>0</flag>\n"
+
"<tStamp>1567142534</tStamp>\n"
+
"<messageContent>\n"
+
"<Spot>102494</Spot>\n"
+
"<Pattern>1</Pattern>\n"
+
"<CycleLen>138</CycleLen>\n"
+
"<RingCount>3</RingCount>\n"
+
"<CycleList>\n"
+
"<Cycle1>1 2 3 4_</Cycle1>\n"
+
"<Cycle2>5 6 7 8_</Cycle2>\n"
+
"<Cycle3>9 12 10 11_</Cycle3>\n"
+
"</CycleList>\n"
+
"<PhaseList>\n"
+
"<RedTime>0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0</RedTime>\n"
+
"<YellowTime>3 3 3 3 3 3 3 3 3 3 0 0 0 0 0 0</YellowTime>\n"
+
"<GreenTime>32 25 22 47 37 20 50 19 52 64 8 8 0 0 0 0</GreenTime>\n"
+
"<Direction>37 17 39 19 33 21 35 23 0 0 0 0 0 0 0 0</Direction>\n"
+
"<MinGTime>14 10 14 14 14 1 14 10 14 5 8 8 0 0 0 0</MinGTime>\n"
+
"<MaxGTime>60 60 60 60 60 60 60 60 60 60 60 60 0 0 0 0</MaxGTime>\n"
+
"<ChannelDim>28066 33 2993634 97 60194 161 98 225 10707747 10707747 236 \n"
+
"236 0 0 0 0</ChannelDim>\n"
+
"<Concurrent>4080 4080 4080 4080 3855 3855 3855 3855 255 255 255 255 0 0 0 \n"
+
"0</Concurrent>\n"
+
"</PhaseList>\n"
+
"</messageContent>\n"
+
"</systemScription>"
;
if
(
StringUtils
.
isBlank
(
post
)){
if
(
StringUtils
.
isBlank
(
post
)){
log
.
error
(
"请求 5.15.根据方案号获取配时方案环图 失败"
);
log
.
error
(
"请求 5.15.根据方案号获取配时方案环图 失败"
);
return
null
;
return
null
;
...
@@ -176,7 +139,6 @@ public class StaticInfoServiceImpl implements StaticInfoService {
...
@@ -176,7 +139,6 @@ public class StaticInfoServiceImpl implements StaticInfoService {
for
(
Node
node
:
elements
)
{
for
(
Node
node
:
elements
)
{
node
.
getName
();
node
.
getName
();
jsonObject
.
put
(
node
.
getName
(),
node
.
getText
());
jsonObject
.
put
(
node
.
getName
(),
node
.
getText
());
}
}
}
}
List
<
CrossSchemeRings
.
Phase
>
phaseList
=
new
ArrayList
<>();
List
<
CrossSchemeRings
.
Phase
>
phaseList
=
new
ArrayList
<>();
...
@@ -200,7 +162,6 @@ public class StaticInfoServiceImpl implements StaticInfoService {
...
@@ -200,7 +162,6 @@ public class StaticInfoServiceImpl implements StaticInfoService {
//失败
//失败
log
.
error
(
"请求 5.15. 方案环图请求 失败"
);
log
.
error
(
"请求 5.15. 方案环图请求 失败"
);
}
}
return
null
;
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