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<MonitorPointVO> stateControllerStations;
|
|
public static StateControllerStationVO convert(List<MonitorPoint> monitorPoints){
|
StateControllerStationVO stateControllerStationVO = new StateControllerStationVO();
|
List<MonitorPointVO> 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;
|
}
|
}
|