zypy333
2022-12-26 14:30:50 +08:00
他应该不上 v 站
```java
public TableDataInfo list(@PathVariable String floor) throws Exception {
EntrancePoint entrancePoint=new EntrancePoint();
List<PublicEquipment> listOfep=new ArrayList<>();
List<EntrancePoint> list=null;
if(floor.isEmpty()){
throw new Exception("Please enter the number of floors");
}else {
entrancePoint.setFloor(floor);
list = entrancePointService.selectEntrancePointList(entrancePoint);
if(list.isEmpty()){
throw new Exception("The set or list cannot be empty!");
}else{
for (EntrancePoint entrancePoints:list) {
PublicEquipment pe =new PublicEquipment();
pe.setDeviceName(entrancePoints.getName());
pe.setIp(entrancePoints.getEntranceHost());
pe.setModelName(entrancePoints.getModelName());
pe.setState(entrancePoints.getEntranceStatus().equals("0")?"开启":"关闭");
pe.setDoorNum(entrancePoints.getVariable());
listOfep.add(pe);
}
}
}
return getDataTable(listOfep);
}
```