package com.iformall.domain.vo;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

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

/**
 * @author gongbiao
 */
@Data
public class WxBillAllVo {
    private Long id;

    private String tenantId;

    private Long merchantId;

    private Long shopId;

    @Excel(name = "商铺号", width = 20, orderNum = "1")
    private String shopNumber;

    @Excel(name = "商户名称", width = 20, orderNum = "2")
    private String merchantName;

    @Excel(name = "商铺类型", width = 20, orderNum = "3", replace = {"店铺_1", "多经点位_2"})
    private Integer rentShopType;

    @Excel(name="费用类型",width = 20,orderNum = "4")
    private String billType;

    @Excel(name="实际应收金额(元)",width = 20,orderNum = "5")
    private String receivePayStr;

    @Excel(name="实收金额(元)",width = 20,orderNum = "6")
    private String payStr;

    @Excel(name="欠缴金额(元)",width = 20,orderNum = "7")
    private String oweStr;

    @Excel(name="缴款截止日期",width = 20,orderNum = "8", format="yyyy-MM-dd")
    private Date receiveDate;

    @Excel(name="逾期天数",width = 20,orderNum = "9")
    private Integer expiredDay;

    @Excel(name = "账单状态", width = 20, orderNum = "10", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6", "_7"})
    private Integer status;


    @Excel(name="缴款时间",width = 20,orderNum = "11")
    private String payDateStr;

    private Date payDate;

    @Excel(name="账单开始时间",width = 20,orderNum = "12")
    private String rentStartTime;

    @Excel(name="账单截止时间",width = 20,orderNum = "13")
    private String rentEndTime;

    private Integer billTypeValue;
    private Long needPay;
    private Long receivePay;
    private Long pay;
    private Long owe;
    private Date starttime;
    private Date endtime;

    private String manager;
    private String managerPhone;

    private String shopInfo;

    private String name;

    @io.swagger.annotations.ApiModelProperty(value = "评论", name = "comments")
    private String comments;

    @io.swagger.annotations.ApiModelProperty(value = "明细", name = "priceDetail")
    private String priceDetail;

    @io.swagger.annotations.ApiModelProperty(value = "更新时间", name = "updatetime")
    private Date updatetime;

    @TableField(exist = false)
    private Integer freeze;

    public String getReceivePayStr() {
        if(getReceivePay()!=null) {
            receivePayStr = new BigDecimal(getReceivePay()).divide(new BigDecimal(100)).toString();
        }
        return receivePayStr;
    }

    public void setReceivePayStr(String receivePayStr) {
        this.receivePayStr = receivePayStr;
    }

    public String getPayStr() {
        if(getPay()!=null) {
            payStr = new BigDecimal(getPay()).divide(new BigDecimal(100)).toString();
        }
        return payStr;
    }

    public String getOweStr() {
        if(getOwe()!=null) {
            oweStr = new BigDecimal(getOwe()).divide(new BigDecimal(100)).toString();
        }
        return oweStr;
    }

    @io.swagger.annotations.ApiModelProperty(value = "手续费", name = "serviceChargePay")
    @TableField(exist = false)
    private Integer serviceChargePay;

    @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="realReceivePay")
    @TableField(exist = false)
    private Long realReceivePay;

    @io.swagger.annotations.ApiModelProperty(value = "滞纳金", name = "latePayPrice")
    private Long latePayPrice;
}
