【注释错误内容】

This commit is contained in:
weizhihong 2023-06-26 09:53:56 +08:00
parent 1d040eb3b2
commit 41e107139e
2 changed files with 35 additions and 35 deletions

View File

@ -43,28 +43,28 @@ public class TrainIndicationInitResponse extends MessageResponse {
@Override
public List<Builder> generateProto() throws Exception {
List<GeneratedMessageV3.Builder> msgBuildList = Lists.newArrayList();
for (TrainCell trainCell : this.trains) {
DeviceStatusProto.Train.Builder builder = DeviceStatusProto.Train.newBuilder();
builder.setLineId(lineId);
builder.setRtuId(trainCell.getRtuId());
builder.setTrainIndex(trainCell.getTrainIndex());
builder.setTrainId(trainCell.getTrainId());
builder.setGroupId(trainCell.getGroupId());
builder.setNccWindow(trainCell.getNccWindow());
builder.setNccWindowOffset(trainCell.getNccWindowOffset());
builder.setDevType(trainCell.getDevType().getVal());
builder.setDevName(trainCell.getDevName());
builder.setDestinationId(trainCell.getDestinationId());
builder.setRollingStock(trainCell.getRollingStock());
builder.setDriverId(trainCell.getDriverId());
builder.setOtpTime(trainCell.getOtpTime());
builder.setMode(trainCell.getMode());
builder.setArriveTime(trainCell.getArriveTime().getNano());
builder.setDepartTime(trainCell.getDepartTime().getNano());
builder.setRate(trainCell.getRate());
builder.setSpeed(trainCell.getSpeed());
msgBuildList.add(builder);
}
// for (TrainCell trainCell : this.trains) {
// DeviceStatusProto.Train.Builder builder = DeviceStatusProto.Train.newBuilder();
// builder.setLineId(lineId);
// builder.setRtuId(trainCell.getRtuId());
// builder.setTrainIndex(trainCell.getTrainIndex());
// builder.setTrainId(trainCell.getTrainId());
// builder.setGroupId(trainCell.getGroupId());
// builder.setNccWindow(trainCell.getNccWindow());
// builder.setNccWindowOffset(trainCell.getNccWindowOffset());
// builder.setDevType(trainCell.getDevType().getVal());
// builder.setDevName(trainCell.getDevName());
// builder.setDestinationId(trainCell.getDestinationId());
// builder.setRollingStock(trainCell.getRollingStock());
// builder.setDriverId(trainCell.getDriverId());
// builder.setOtpTime(trainCell.getOtpTime());
// builder.setMode(trainCell.getMode());
// builder.setArriveTime(trainCell.getArriveTime().getNano());
// builder.setDepartTime(trainCell.getDepartTime().getNano());
// builder.setRate(trainCell.getRate());
// builder.setSpeed(trainCell.getSpeed());
// msgBuildList.add(builder);
// }
return msgBuildList;
}

View File

@ -111,19 +111,19 @@ public class TrainRecordResponse extends MessageResponse {
@Override
public List<Builder> generateProto() throws Exception {
List<GeneratedMessageV3.Builder> msgBuildList = Lists.newArrayList();
DeviceStatusProto.Train.Builder builder = DeviceStatusProto.Train.newBuilder();
builder.setLineId(this.getLineId());
builder.setTrainId(this.getTrainId());
builder.setGlobalId(this.getGlobalId());
builder.setLocalSubId(this.getLocalSubId());
builder.setTrainType(this.getTrainType().type);
builder.setDirection(this.getDirection().value);
builder.setStationId(this.getStationId());
builder.setSideId(this.getSideId());
builder.setTrackName(this.getTrackName());
builder.setRecordType(this.getRecordType());
builder.setRecordTime(this.getRecordTime().getNano());
msgBuildList.add(builder);
// DeviceStatusProto.Train.Builder builder = DeviceStatusProto.Train.newBuilder();
// builder.setLineId(this.getLineId());
// builder.setTrainId(this.getTrainId());
// builder.setGlobalId(this.getGlobalId());
// builder.setLocalSubId(this.getLocalSubId());
// builder.setTrainType(this.getTrainType().type);
// builder.setDirection(this.getDirection().value);
// builder.setStationId(this.getStationId());
// builder.setSideId(this.getSideId());
// builder.setTrackName(this.getTrackName());
// builder.setRecordType(this.getRecordType());
// builder.setRecordTime(this.getRecordTime().getNano());
// msgBuildList.add(builder);
return msgBuildList;
}