package com.base.core.model.enity;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class ArcCoreDTO {

    /**
     * 网格数组
     */
    private List<GridInfoCoreDTO> gridlist = new ArrayList<GridInfoCoreDTO>();

    public List<GridInfoCoreDTO> getGridlist() {
        return gridlist;
    }

    /**
     * 增加网格节点
     */
    public void addGridlist(GridInfoCoreDTO grid) {
        this.gridlist.add(grid);
    }


    public List<String> getGridListCode() {
        List<String> gridCodeList = new ArrayList<>();
        for (int i = 0; i < this.gridlist.size(); i++) {
            gridCodeList.add(gridlist.get(i).getId());
        }
        return gridCodeList;
    }
}
