package com.yuchen.saas.parking.api.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.*;
import com.yuchen.saas.parking.api.util.StringUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.poi.ss.usermodel.HorizontalAlignment;

import java.util.Date;

/**
 * @Description 停车账单账单导出excel
 */
@Data
@HeadStyle(horizontalAlignment = HorizontalAlignment.CENTER)
@HeadRowHeight(25)
@ContentStyle(horizontalAlignment = HorizontalAlignment.CENTER)
@ColumnWidth(12)
@ContentRowHeight(15)
@HeadFontStyle(fontHeightInPoints =9)
@ExcelIgnoreUnannotated
public class BatParkBillLogExcelVo {

    @ExcelProperty("停车场")
    @ApiModelProperty("停车场")
    private String parkingName;

    @ExcelProperty("车牌号")
    @ApiModelProperty("车牌")
    private String plateNo;

    @ExcelProperty("占位费金额（元）")
    @ApiModelProperty("占位费金额（元）")
    private String placeIdleCostStr;

    @ExcelProperty("占位费时长（分钟）")
    @ApiModelProperty("占位费时长（分钟）")
    private Long placeIdleTime;

    @ExcelProperty("应收金额（元）")
    @ApiModelProperty("应收金额")
    private String supposeCostStr;

    @ExcelProperty("实缴金额(元)")
    @ApiModelProperty("实缴金额(元)")
    private String paidCostStr;

    @ExcelProperty("支付时间")
    @ApiModelProperty("支付时间")
    @DateTimeFormat(value = "yyyy-MM-dd HH:mm:ss")
    private Date outTime;

    @ExcelProperty("支付方式")
    @ApiModelProperty("支付名称")
    private String payTypeName;

    @ExcelProperty("订单号")
    @ApiModelProperty("订单号")
    private String orderNumber;

    @ApiModelProperty(value = "充电车位占用费用, 人民币单位：分")
    private Long placeIdleCost;

    @ApiModelProperty("应收金额（最大长度8） 单位：分")
    private Long supposeCost;



    @ApiModelProperty("已支付金额（最大长度8） 单位：分")
    private Long paidCost;



   /* @ApiModelProperty("优惠减免金额（最大长度8） 单位：分")
    private Long discountCost;

    @ExcelProperty("优惠券（元）")
    @ApiModelProperty("优惠券")
    private String discountCostStr;*/

    public String getPlaceIdleCostStr(){
        return StringUtil.formatFenToYuan(placeIdleCost);
    }

    public String getSupposeCostStr(){
        return StringUtil.formatFenToYuan(placeIdleCost);
    }

    public String getPaidCostStr(){
        return StringUtil.formatFenToYuan(placeIdleCost);
    }

   /* public String getDiscountCostStr(){
        return StringUtil.formatFenToYuan(discountCost);
    }*/

}
