171015 - sarasayhi/hello-world GitHub Wiki

/* 1.建PointBO 加ip 和port 加toString方法 2.建DeviceBO name + List 加toString方法 3.service getAvailabelPoints 方法 public class DeviceBO { String Name; List pointBOs; }

service 层 public List getAvailablePoints(Long orgId){ List deviceBOs = new List(); List deviceDOs = deviceRepository.findByAreaId(Long areaId); for(DeviceDo d : deviceDOs){ DeviceBO deviceBO = new DeviceBO(); List pointBOs = new List(); List pointDOs = pointRepository.findByDeviceId(d.getId());

for(PointDO p : pointDOs){
    PointBO pointBO = new PointBO();
    pointBO.setId(p.getId());
    pointBO.setNum(p.getNum());
    pointBO.setName(p.getName());
    pointBO.setType(p.getType());
    pointBO.setLongitude(p.getLongitude());
    pointBO.setLatitude(p.getLatitude());
    pointBO.setChan(p.getChan());
    pointBO.setDeviceId(p.getDeviceId());
    pointBO.setAreaId(p.getAreaId());
    pointBO.setIPAddress(d.getIPAddress());
    pointBO.setPort(d.getPort());
    pointBOs.add(pointBO);
}
deviceBO.setName(d.getName());
deviceBO.setPointBOs(pointBOs);
deviceBOs.add(deviceBO);
System.out.println("deviceBO : " + deviceBO.toString());

} System.out.println("deviceBOs size : " + deviceBOs.size()); return pointBOs; } */

⚠️ **GitHub.com Fallback** ⚠️