CaseExportExcelData.java 4.22 KB
package com.ash.excelData;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.ash.base.excelOpt.DatetimeConverter;
import com.ash.base.excelOpt.ExcelCheck;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

@Data
@ContentRowHeight(15)
@HeadRowHeight(20)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CaseExportExcelData implements Serializable {
    private static final long serialVersionUID = 1L;

    @ExcelCheck(canEmpty = false, canRepeat = false)
    @ExcelProperty(value = "案件编号", index = 0)
    @ContentStyle(dataFormat = 49)
    @ColumnWidth(25)
    private String code;

    @ExcelCheck(canEmpty = false)
    @ExcelProperty(value = "案件名称", index = 1)
    @ContentStyle(dataFormat = 49)
    @ColumnWidth(25)
    private String name;

    @ExcelCheck(canEmpty = false)
    @ExcelProperty(value = "案件详情", index = 2)
    @ContentStyle(dataFormat = 49)
    @ColumnWidth(25)
    private String caseDetail;

    @ExcelCheck(canEmpty = false, dateFormatValid = "yyyy-MM-dd HH:mm:ss")
    @ExcelProperty(value = "接警时间", index = 3, converter = DatetimeConverter.class)
    @ContentStyle(dataFormat = 49)
    @ColumnWidth(25)
    private Date alarmDate;

    @ExcelCheck(canEmpty = false, dateFormatValid = "yyyy-MM-dd HH:mm:ss")
    @ExcelProperty(value = "立案时间", index = 4, converter = DatetimeConverter.class)
    @ContentStyle(dataFormat = 49)
    @ColumnWidth(25)
    private Date filingDate;

    @ExcelCheck(canEmpty = false)
    @ExcelProperty(value = "立案单位", index = 5)
    @ContentStyle(dataFormat = 49)
    @ColumnWidth(25)
    private String filingUnit;


    @ExcelCheck(canEmpty = false)
    @ExcelProperty(value = "地区", index = 6)
    @ContentStyle(dataFormat = 49)
    @ColumnWidth(25)
    private String area;

    @ExcelCheck(canEmpty = false)
    @ExcelProperty(value = "县区", index = 7)
    @ContentStyle(dataFormat = 49)
    @ColumnWidth(25)
    private String county;

    @ExcelCheck(canEmpty = false)
    @ExcelProperty(value = "涉案总金额", index = 8)
    @ContentStyle(dataFormat = 49)
    @ColumnWidth(25)
    private Double totalAmount;

    @ExcelCheck(canEmpty = false)
    @ExcelProperty(value = "受害人性别", index = 9)
    @ContentStyle(dataFormat = 49)
    @ColumnWidth(25)
    private String sex;

    @ExcelCheck(canEmpty = false)
    @ExcelProperty(value = "受害人年龄", index = 10)
    @ContentStyle(dataFormat = 49)
    @ColumnWidth(25)
    private Integer age;

    @ExcelCheck(canEmpty = false)
    @ExcelProperty(value = "受害人职业", index = 11)
    @ContentStyle(dataFormat = 49)
    @ColumnWidth(25)
    private String career;

    @ExcelCheck(canEmpty = false)
    @ExcelProperty(value = "诈骗类型", index = 12)
    @ContentStyle(dataFormat = 49)
    @ColumnWidth(25)
    private String fraudType;

    @ExcelCheck(canEmpty = false)
    @ExcelProperty(value = "引流方式", index = 13)
    @ContentStyle(dataFormat = 49)
    @ColumnWidth(25)
    private String rainageMethod;

    @ExcelCheck(canEmpty = false)
    @ExcelProperty(value = "支付方式", index = 14)
    @ContentStyle(dataFormat = 49)
    @ColumnWidth(25)
    private String payMethod;

    @ExcelCheck(canEmpty = false)
    @ExcelProperty(value = "引流电话", index = 15)
    @ContentStyle(dataFormat = 49)
    @ColumnWidth(25)
    private String rainagePhone;

    @ExcelCheck(canEmpty = false)
    @ExcelProperty(value = "快递单号", index = 16)
    @ContentStyle(dataFormat = 49)
    @ColumnWidth(25)
    private String trackingNumber;

    @ExcelCheck(canEmpty = false)
    @ExcelProperty(value = "快递公司", index = 17)
    @ContentStyle(dataFormat = 49)
    @ColumnWidth(25)
    private String expressCompany;

    @ExcelCheck(canEmpty = false)
    @ExcelProperty(value = "受害人是否寄递黄金、现金", index = 18)
    @ContentStyle(dataFormat = 49)
    @ColumnWidth(25)
    private String deliverWealth;
}