package org.springblade.manager.excel;

import lombok.RequiredArgsConstructor;
import org.springblade.core.excel.support.ExcelImporter;
import org.springblade.manager.service.IWbsFormElementService;

import java.util.List;

/**
 * Wbs元素导入
 *
 * @author liuyc
 */
@RequiredArgsConstructor
public class WbsFormElementImporter implements ExcelImporter<WbsFormElementExcel> {
    private final IWbsFormElementService service;
    private final Boolean isCovered;
    private final String tableId;

    @Override
    public void save(List<WbsFormElementExcel> data) {
//        data.forEach(System.out::print);
        service.importElement(data, isCovered, tableId);
    }
}
