package com.moral.api.pojo.vo.monitorPoint; import com.moral.api.entity.Device; import com.moral.api.entity.MonitorPoint; import com.moral.api.pojo.vo.device.DeviceVO; import lombok.Data; import java.util.ArrayList; import java.util.List; /** * @ClassName StateControllerStationVO * @Description TODO * @Author 陈凯裕 * @Date 2021/7/16 13:52 * @Version TODO **/ @Data public class StateControllerStationVO { private List stateControllerStations; public static StateControllerStationVO convert(List monitorPoints){ StateControllerStationVO stateControllerStationVO = new StateControllerStationVO(); List stateControllerStations = new ArrayList<>(); for (MonitorPoint monitorPoint : monitorPoints) { MonitorPointVO monitorPointVO = new MonitorPointVO(); monitorPointVO.setName(monitorPoint.getName()); monitorPointVO.setLatitude(monitorPoint.getLatitude()); monitorPointVO.setLongitude(monitorPoint.getLongitude()); stateControllerStations.add(monitorPointVO); } stateControllerStationVO.setStateControllerStations(stateControllerStations); return stateControllerStationVO; } }