package com.jeeplus.modules.workreceiptsregister.entity;

import com.jeeplus.common.persistence.BaseEntity;
import com.jeeplus.common.utils.DateUtils;
import com.jeeplus.common.utils.excel.annotation.ExcelField;
import com.jeeplus.modules.iim.utils.DateUtil;
import com.jeeplus.modules.sys.entity.Office;
import com.jeeplus.modules.sys.utils.UserUtils;

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

public class WorkReceiptsRegisterInfo extends BaseEntity<WorkReceiptsRegisterInfo>{

    private Double receiptAmt;
    private String receiptDate;
    private Office office;
    private Date arrivalDate;
    private String invoiceNum;
    private String clientName;
    private String companyId;

    public String getOfficeId() {
        return officeId;
    }

    public void setOfficeId(String officeId) {
        this.officeId = officeId;
    }

    private String officeId;
    public Double getReceiptAmt() {
        return receiptAmt;
    }
    @ExcelField(title="收款金额", align=2, sort=4)
    public String getReceiptAmtStr() {
        return UserUtils.getDecimalFormat(new BigDecimal(this.receiptAmt));
    }

    public void setReceiptAmt(Double receiptAmt) {
        this.receiptAmt = receiptAmt;
    }

    public String getReceiptDate() {
        return receiptDate;
    }

    public void setReceiptDate(String receiptDate) {
        this.receiptDate = receiptDate;
    }

    public Office getOffice() {
        return office;
    }

    public void setOffice(Office office) {
        this.office = office;
    }

    public Date getArrivalDate() {
        return arrivalDate;
    }

    @ExcelField(title="到账日期", align=2, sort=3)
    public String getArrDate() {
        return DateUtils.formatDate(arrivalDate,"yyyy-MM-dd");
    }

    public void setArrivalDate(Date arrivalDate) {
        this.arrivalDate = arrivalDate;
    }

    @ExcelField(title="发票号码", align=2, sort=1)
    public String getInvoiceNum() {
        return invoiceNum;
    }

    public void setInvoiceNum(String invoiceNum) {
        this.invoiceNum = invoiceNum;
    }

    @ExcelField(title="对方户名", align=2, sort=2)
    public String getClientName() {
        return clientName;
    }

    public void setClientName(String clientName) {
        this.clientName = clientName;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    @Override
    public void preInsert() {

    }

    @Override
    public void preUpdate() {

    }
}
