package com.iformall.domain.vo;


import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author gongbiao
 */
@Data
public class WxBillDailyExportVo {

    @Excel(name = "商铺号", width = 20, orderNum = "1")
    private String shopNumber;
    @Excel(name = "商户名称", width = 20, orderNum = "2")
    private String merchantName;
    @Excel(name = "费用类型", replace = {"水费_1", "电费_2", "空调费_3"}, width = 10, orderNum = "3")
    private Integer type;
    @Excel(name = "实际应收金额(元)", orderNum = "4", width = 20)
    private String receivePayStr;
    @Excel(name = "实收金额(元)", orderNum = "5", width = 20)
    private String payStr;
    @Excel(name = "欠缴金额(元)", orderNum = "6", width = 20)
    private String oweStr;
    @Excel(name = "缴款截止日期", orderNum = "7", width = 20, format = "yyyy-MM-dd")
    private Date receiveDate;
    @Excel(name = "收款日期", orderNum = "8", width = 20, format = "yyyy-MM-dd")
    private Date payDate;
    @Excel(name = "状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6"}, width = 20, orderNum = "9")
    private Integer status;
    @Excel(name = "逾期(天)", orderNum = "10", width = 20)
    private Long expiredDay;

    private Long receivePay;
    private Long pay;
    private Long owe;

    public String getReceivePayStr() {
        return new BigDecimal(receivePay == null ? 0 : receivePay).divide(new BigDecimal(100)).toPlainString();
    }

    public String getPayStr() {
        return new BigDecimal(pay == null ? 0 : pay).divide(new BigDecimal(100)).toPlainString();
    }

    public String getOweStr() {
        return new BigDecimal(owe == null ? 0 : owe).divide(new BigDecimal(100)).toPlainString();
    }
}
