接受occ设备转换设备名称
This commit is contained in:
parent
03f9fb4807
commit
43cd1bffb0
@ -2,6 +2,7 @@ package club.joylink.xiannccda.ats.message.line3.rep;
|
||||
|
||||
import club.joylink.xiannccda.ats.message.MessageResponse;
|
||||
import club.joylink.xiannccda.ats.message.convertor.DeviceStatusConvertor;
|
||||
import club.joylink.xiannccda.ats.message.line3.changer.DeviceNameChangerManage;
|
||||
import club.joylink.xiannccda.ats.message.line3.device.DeviceStatus;
|
||||
import club.joylink.xiannccda.ats.message.line3.device.DeviceType;
|
||||
import club.joylink.xiannccda.ats.message.line3.rep.EntityParseUtil.ReadData;
|
||||
@ -116,6 +117,9 @@ public class DeviceStatusBitmapResponse extends MessageResponse {
|
||||
entity.type = DeviceType.of(buf.readShort());
|
||||
entity.objCount = buf.readShort();
|
||||
entity.deviceList = EntityParseUtil.collect(entity.objCount, buf, DeviceEntity.class);
|
||||
for (DeviceEntity de : entity.deviceList) {
|
||||
de.devName = DeviceNameChangerManage.findMatch(entity.type, de.devName);
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package club.joylink.xiannccda.ats.message.line3.rep;
|
||||
import club.joylink.xiannccda.ats.message.MessageId;
|
||||
import club.joylink.xiannccda.ats.message.MessageResponse;
|
||||
import club.joylink.xiannccda.ats.message.convertor.DeviceStatusConvertor;
|
||||
import club.joylink.xiannccda.ats.message.line3.changer.DeviceNameChangerManage;
|
||||
import club.joylink.xiannccda.ats.message.line3.device.DeviceStatus;
|
||||
import club.joylink.xiannccda.ats.message.line3.device.DeviceType;
|
||||
import club.joylink.xiannccda.dto.protos.DeviceStatusProto;
|
||||
@ -81,6 +82,7 @@ public class DeviceStatusChangeResponse extends MessageResponse {
|
||||
this.devName = EntityParseUtil.convertStr(buf, 24);
|
||||
this.deviceStatus = buf.readInt();
|
||||
this.spare = buf.readInt();
|
||||
this.devName = DeviceNameChangerManage.findMatch(this.type, this.devName);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -4,6 +4,7 @@ import club.joylink.xiannccda.ats.message.MessageResponse;
|
||||
import club.joylink.xiannccda.ats.message.convertor.DeviceStatusConvertor;
|
||||
import club.joylink.xiannccda.ats.message.line3.DateTimeUtil;
|
||||
import club.joylink.xiannccda.ats.message.line3.MessageCons;
|
||||
import club.joylink.xiannccda.ats.message.line3.changer.DeviceNameChangerManage;
|
||||
import club.joylink.xiannccda.ats.message.line3.device.DeviceStatus;
|
||||
import club.joylink.xiannccda.ats.message.line3.device.DeviceType;
|
||||
import club.joylink.xiannccda.dto.protos.DeviceStatusProto;
|
||||
@ -223,6 +224,8 @@ public class TrainIndicationInitResponse extends MessageResponse {
|
||||
//
|
||||
this.devType = DeviceType.of(devType);
|
||||
this.devName = new String(devName, MessageCons.STRING_CHARSET).trim();
|
||||
|
||||
this.devName = DeviceNameChangerManage.findMatch(this.devType, this.devName);
|
||||
this.trainIndex = new String(trainIndex, MessageCons.STRING_CHARSET).trim();
|
||||
this.groupId = new String(groupId, MessageCons.STRING_CHARSET).trim();
|
||||
this.trainId = new String(trainId, MessageCons.STRING_CHARSET).trim();
|
||||
|
@ -2,6 +2,7 @@ package club.joylink.xiannccda.ats.message.line3.rep;
|
||||
|
||||
import club.joylink.xiannccda.ats.message.MessageResponse;
|
||||
import club.joylink.xiannccda.ats.message.line3.MessageCons;
|
||||
import club.joylink.xiannccda.ats.message.line3.changer.DeviceNameChangerManage;
|
||||
import club.joylink.xiannccda.ats.message.line3.device.DeviceType;
|
||||
import club.joylink.xiannccda.dto.protos.DeviceStatusProto;
|
||||
import club.joylink.xiannccda.dto.protos.TrainProto.NccWindow;
|
||||
@ -72,6 +73,7 @@ public class TrainIndicationRemoveResponse extends MessageResponse {
|
||||
//
|
||||
this.devType = DeviceType.of(devType);
|
||||
this.devName = new String(devName, MessageCons.STRING_CHARSET).trim();
|
||||
this.devName = DeviceNameChangerManage.findMatch(this.devType, this.devName);
|
||||
this.trainIndex = new String(trainIndex, MessageCons.STRING_CHARSET).trim();
|
||||
this.groupId = new String(groupId, MessageCons.STRING_CHARSET).trim();
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import club.joylink.xiannccda.ats.message.MessageResponse;
|
||||
import club.joylink.xiannccda.ats.message.convertor.DeviceStatusConvertor;
|
||||
import club.joylink.xiannccda.ats.message.line3.DateTimeUtil;
|
||||
import club.joylink.xiannccda.ats.message.line3.MessageCons;
|
||||
import club.joylink.xiannccda.ats.message.line3.changer.DeviceNameChangerManage;
|
||||
import club.joylink.xiannccda.ats.message.line3.device.DeviceStatus;
|
||||
import club.joylink.xiannccda.ats.message.line3.device.DeviceType;
|
||||
import club.joylink.xiannccda.dto.protos.DeviceStatusProto;
|
||||
@ -211,6 +212,8 @@ public class TrainIndicationUpdateResponse extends MessageResponse {
|
||||
//
|
||||
this.devType = DeviceType.of(devType);
|
||||
this.devName = new String(devName, MessageCons.STRING_CHARSET).trim();
|
||||
|
||||
this.devName = DeviceNameChangerManage.findMatch(this.devType, this.devName);
|
||||
this.trainIndex = new String(trainIndex, MessageCons.STRING_CHARSET).trim();
|
||||
this.groupId = new String(groupId, MessageCons.STRING_CHARSET).trim();
|
||||
this.trainId = new String(trainId, MessageCons.STRING_CHARSET).trim();
|
||||
|
Loading…
Reference in New Issue
Block a user