package com.njcn.product.carrycapacity.pojo.excel;

import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.converters.localdatetime.LocalDateTimeStringConverter;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * 类的介绍：
 *
 * @author xuyang
 * @version 1.0.0
 * @createTime 2022/5/12 9:13
 */
@Data
public class CarryCapcityDataEexcel {

    @ExcelProperty(index = 0,value = "时间(格式为yyyy-MM-dd hh:mm:ss)",converter = LocalDateTimeStringConverter.class)
    @JSONField(format  = "yyyy-MM-dd hh:mm:ss")
    private LocalDateTime time;

    @ExcelProperty(index =1,value = {"电压","A"})
    private Double u_a;

    @ExcelProperty(index =2,value = {"电压","B"})
    private Double u_b;

    @ExcelProperty(index =3,value = {"电压","C"})
    private Double u_c;


    @ExcelProperty(index =4,value = {"有功功率","A"})
    private Double p_a;

    @ExcelProperty(index =5,value = {"有功功率","B"})
    private Double p_b;

    @ExcelProperty(index =6,value = {"有功功率","C"})
    private Double p_c;

    @ExcelProperty(index =7,value = {"无功功率","A"})
    private Double q_a;

    @ExcelProperty(index =8,value = {"无功功率","B"})
    private Double q_b;

    @ExcelProperty(index =9,value = {"无功功率","C"})
    private Double q_c;

    @ExcelProperty(index =10,value = {"电流","2次","A"})
    private Double i2_a;

    @ExcelProperty(index =11,value = {"电流","2次","B"})
    private Double i2_b;

    @ExcelProperty(index =12,value = {"电流","2次","C"})
    private Double i2_c;

    @ExcelProperty(index =13,value = {"电流","3次","A"})
    private Double i3_a;

    @ExcelProperty(index =14,value = {"电流","3次","B"})
    private Double i3_b;

    @ExcelProperty(index =15,value = {"电流","3次","C"})
    private Double i3_c;

    @ExcelProperty(index =16,value = {"电流","4次","A"})
    private Double i4_a;

    @ExcelProperty(index =17,value = {"电流","4次","B"})
    private Double i4_b;

    @ExcelProperty(index =18,value = {"电流","4次","C"})
    private Double i4_c;

    @ExcelProperty(index =19,value = {"电流","5次","A"})
    private Double i5_a;

    @ExcelProperty(index =20,value = {"电流","5次","B"})
    private Double i5_b;

    @ExcelProperty(index =21,value = {"电流","5次","C"})
    private Double i5_c;

    @ExcelProperty(index =22,value = {"电流","6次","A"})
    private Double i6_a;

    @ExcelProperty(index =23,value = {"电流","6次","B"})
    private Double i6_b;

    @ExcelProperty(index =24,value = {"电流","6次","C"})
    private Double i6_c;

    @ExcelProperty(index =25,value = {"电流","7次","A"})
    private Double i7_a;

    @ExcelProperty(index =26,value = {"电流","7次","B"})
    private Double i7_b;

    @ExcelProperty(index =27,value = {"电流","7次","C"})
    private Double i7_c;

    @ExcelProperty(index =28,value = {"电流","8次","A"})
    private Double i8_a;

    @ExcelProperty(index =29,value = {"电流","8次","B"})
    private Double i8_b;

    @ExcelProperty(index =30,value = {"电流","8次","C"})
    private Double i8_c;

    @ExcelProperty(index =31,value = {"电流","9次","A"})
    private Double i9_a;

    @ExcelProperty(index =32,value = {"电流","9次","B"})
    private Double i9_b;

    @ExcelProperty(index =33,value = {"电流","9次","C"})
    private Double i9_c;

    @ExcelProperty(index =34,value = {"电流","10次","A"})
    private Double i10_a;

    @ExcelProperty(index =35,value = {"电流","10次","B"})
    private Double i10_b;

    @ExcelProperty(index =36,value = {"电流","10次","C"})
    private Double i10_c;

    @ExcelProperty(index =37,value = {"电流","11次","A"})
    private Double i11_a;

    @ExcelProperty(index =38,value = {"电流","11次","B"})
    private Double i11_b;

    @ExcelProperty(index =39,value = {"电流","11次","C"})
    private Double i11_c;

    @ExcelProperty(index =40,value = {"电流","12次","A"})
    private Double i12_a;

    @ExcelProperty(index =41,value = {"电流","12次","B"})
    private Double i12_b;

    @ExcelProperty(index =42,value = {"电流","12次","C"})
    private Double i12_c;

    @ExcelProperty(index =43,value = {"电流","13次","A"})
    private Double i13_a;

    @ExcelProperty(index =44,value = {"电流","13次","B"})
    private Double i13_b;

    @ExcelProperty(index =45,value = {"电流","13次","C"})
    private Double i13_c;

    @ExcelProperty(index =46,value = {"电流","14次","A"})
    private Double i14_a;

    @ExcelProperty(index =47,value = {"电流","14次","B"})
    private Double i14_b;

    @ExcelProperty(index =48,value = {"电流","14次","C"})
    private Double i14_c;

    @ExcelProperty(index =49,value = {"电流","15次","A"})
    private Double i15_a;

    @ExcelProperty(index =50,value = {"电流","15次","B"})
    private Double i15_b;

    @ExcelProperty(index =51,value = {"电流","15次","C"})
    private Double i15_c;

    @ExcelProperty(index =52,value = {"电流","16次","A"})
    private Double i16_a;

    @ExcelProperty(index =53,value = {"电流","16次","B"})
    private Double i16_b;

    @ExcelProperty(index =54,value = {"电流","16次","C"})
    private Double i16_c;

    @ExcelProperty(index =55,value = {"电流","17次","A"})
    private Double i17_a;

    @ExcelProperty(index =56,value = {"电流","17次","B"})
    private Double i17_b;

    @ExcelProperty(index =57,value = {"电流","17次","C"})
    private Double i17_c;

    @ExcelProperty(index =58,value = {"电流","18次","A"})
    private Double i18_a;

    @ExcelProperty(index =59,value = {"电流","18次","B"})
    private Double i18_b;

    @ExcelProperty(index =60,value = {"电流","18次","C"})
    private Double i18_c;

    @ExcelProperty(index =61,value = {"电流","19次","A"})
    private Double i19_a;

    @ExcelProperty(index =62,value = {"电流","19次","B"})
    private Double i19_b;

    @ExcelProperty(index =63,value = {"电流","19次","C"})
    private Double i19_c;

    @ExcelProperty(index =64,value = {"电流","20次","A"})
    private Double i20_a;

    @ExcelProperty(index =65,value = {"电流","20次","B"})
    private Double i20_b;

    @ExcelProperty(index =66,value = {"电流","20次","C"})
    private Double i20_c;

    @ExcelProperty(index =67,value = {"电流","21次","A"})
    private Double i21_a;

    @ExcelProperty(index =68,value = {"电流","21次","B"})
    private Double i21_b;

    @ExcelProperty(index =69,value = {"电流","21次","C"})
    private Double i21_c;

    @ExcelProperty(index =70,value = {"电流","22次","A"})
    private Double i22_a;

    @ExcelProperty(index =71,value = {"电流","22次","B"})
    private Double i22_b;

    @ExcelProperty(index =72,value = {"电流","22次","C"})
    private Double i22_c;

    @ExcelProperty(index =73,value = {"电流","23次","A"})
    private Double i23_a;

    @ExcelProperty(index =74,value = {"电流","23次","B"})
    private Double i23_b;

    @ExcelProperty(index =75,value = {"电流","23次","C"})
    private Double i23_c;

    @ExcelProperty(index =76,value = {"电流","24次","A"})
    private Double i24_a;

    @ExcelProperty(index =77,value = {"电流","24次","B"})
    private Double i24_b;

    @ExcelProperty(index =78,value = {"电流","24次","C"})
    private Double i24_c;

    @ExcelProperty(index =79,value = {"电流","25次","A"})
    private Double i25_a;

    @ExcelProperty(index =80,value = {"电流","25次","B"})
    private Double i25_b;

    @ExcelProperty(index =81,value = {"电流","25次","C"})
    private Double i25_c;

    public static void main(String[] args) {
//        List<CarryCapcityDataEexcel> objects = EasyExcelUtil.syncReadModel("C:\\Users\\无名\\Desktop\\11.xlsx", CarryCapcityDataEexcel.class, 0,3);
//        System.out.println(objects);

        String sheetName = "sheetName";
        List<CarryCapcityDataEexcel> excels = new ArrayList<>();
        CarryCapcityDataEexcel exportHeadersExcel = new CarryCapcityDataEexcel();
        excels.add(exportHeadersExcel);

        EasyExcel.write("C:\\\\Users\\\\无名\\\\Desktop\\\\22.xlsx", CarryCapcityDataEexcel.class)
                .sheet(sheetName)
                .doWrite(excels);
        EasyExcel.write("C:\\\\Users\\\\无名\\\\Desktop\\\\22.xlsx", CarryCapcityDataEexcel.class)
                .sheet("sheetName2")
                .doWrite(excels);

    }




}
