Commit 32bb47a5 authored by zhouleilei's avatar zhouleilei

解决同步海信信号机静态信息时,灯组重复问题

parent 9a62f7df
......@@ -488,6 +488,9 @@ public class StaticInfoServiceImpl implements StaticInfoService {
for (RingPhaseDTO phaseDTO : ringPhaseList) {
Integer phaseId = phaseDTO.getPhaseId();
long channe = Long.valueOf(channelDim[phaseId - 1]);
if (channe == 0L){
continue;
}
String binaryString = Long.toBinaryString(channe);
//获取方向转向分组
List<String> binaryList = CommonUtils.groupStringFromRight(binaryString);
......@@ -498,6 +501,7 @@ public class StaticInfoServiceImpl implements StaticInfoService {
String turn = readUtf8Line.substring(3);
Integer wjLightsDir = HiseseDirEnum.getWjLightsDir(Integer.parseInt(dir, 2));
Integer wjLightsTurn = HisenseTurnEnum.getWjLightsTurn(Integer.parseInt(turn, 2));
log.error("readUtf8Line = {},dir={},turn={},wjLightsDir={},wjLightsTurn={}",readUtf8Line,dir,turn,wjLightsDir,wjLightsTurn);
if (wjLightsDir == 0 && wjLightsTurn == 0){
continue;
}
......
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