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

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

import java.text.SimpleDateFormat;
import java.util.Date;

public class StartExcel {

    public static void main(String[] args) {

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