Commit 0771d199 authored by zhouleilei's avatar zhouleilei

海信-去掉测试数据

parent 6e1fb6a6
...@@ -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;
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment