package org.springblade.customer.listener;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.event.AnalysisEventListener;
import com.alibaba.excel.metadata.Cell;
import com.alibaba.excel.read.metadata.ReadSheet;
import com.alibaba.excel.read.metadata.holder.ReadWorkbookHolder;
import lombok.extern.slf4j.Slf4j;
import org.springblade.customer.dto.FctCsIrregularDTO;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Slf4j
@Component
public class FctCsIrregularListener extends AnalysisEventListener<FctCsIrregularDTO> {

	public List<FctCsIrregularDTO> list = new ArrayList<FctCsIrregularDTO>();

	public boolean sysHead = true;

	public FctCsIrregularListener() {
	}


	@Override
	public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {
		if(headMap.size() != 26){
			sysHead = false;
		}
	}

	@Override
	public void invoke(FctCsIrregularDTO t, AnalysisContext analysisContext) {
		list.add(t);
	}

	@Override
	public void doAfterAllAnalysed(AnalysisContext analysisContext) {
	}


}
