package com.trs.web2frame.tool.tyjyh.tonglaozheng;

import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.read.listener.PageReadListener;

public class StartExcel2 {

    public static void main(String[] args) {

        EasyExcel.read(ColumnConfig.fileNamenew, DemoData.class, new PageReadListener<DemoData>(dataList -> {
            for (DemoData demoData : dataList) {
                System.out.println(demoData);
                String view = demoData.getView();
                ViewMove viewMove = new ViewMove();
                if(view != null && view != ""){
                    if(view.equals("1")){
                        try {
                            viewMove.DataZhiXunByChannel(demoData.getKpChannelId(),demoData.getHyChannelId());
                        } catch (Exception e) {
                            e.printStackTrace();
                        }
                    }
                    if(view.equals("2")){
                        try {
                            viewMove.DataZWGKByChannel(demoData.getKpChannelId(),demoData.getHyChannelId());
                        } catch (Exception e) {
                        }
                    }
                    if(view.equals("3")){
                        try {
                            viewMove.DataZFGBByChannel(demoData.getKpChannelId(),demoData.getHyChannelId());
                        } catch (Exception e) {
                        }
                    }
                    if(view.equals("4")){
                        try {
                            viewMove.DataZhiXunByChannel(demoData.getKpChannelId(),demoData.getHyChannelId());
                        } catch (Exception e) {
                        }
                    }
                    if(view.equals("8")){
                        try {
                            viewMove.DataZFGBBQZByChannel(demoData.getKpChannelId(),demoData.getHyChannelId());
                        } catch (Exception e) {
                        }
                    }
                }
            }
        })).sheet().doRead();
    }
}
