kaiyu
2021-09-13 10d4b885a9b2af2a38bb03249d7547283f948197
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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;
    }
}