/*
 * @Author: Kane
 * @Date: 2023-10-07 23:17:13
 * @LastEditors: Kane
 * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/utils/data/TelsalerData.java
 * @Description: 电销坐席数据导入导出
 * 
 * Copyright (c) ${2023} by Kane, All Rights Reserved. 
 */
package com.cpic.xim.utils.data;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;
import com.cpic.xim.mybatis.pojo.TelsalerFromJYGL;

public class TelsalerData
{
    /**
     *
     * @param filePath Xlsx文件路径。
     * @return 
     */
    public static ArrayList<TelsalerFromJYGL> importTelsalersFromXlsx( String filePath )
    {
        ArrayList<TelsalerFromJYGL> telsalers = new ArrayList<>();

        Workbook wb = null;

        try
        {
            wb = WorkbookFactory.create( new File( filePath ) );
        }
        catch ( IOException error )
        {

        }
        finally
        {
            try
            {
                if ( wb != null )
                {
                    wb.close();
                }
            }
            catch ( IOException error )
            {
                error.printStackTrace();
            }
        }

        return telsalers;
    }

    public static int importTelsalers( ArrayList<TelsalerFromJYGL> telsalers )
    {
        int importedCount = 0;

        return importedCount;
    }
}
