package com.sckw.payment.model.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;

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

/**
 * 结算-交易订单
 *
 * @author Aick Spt
 * @date 2023-07-20 12:26
 */
public class SettlementTradeDto implements ISettlement {
    /**
     * 对账单id主键
     */
    private Long ledgerId;
    /**
     * 主键
     */
    private Long id;

    /**
     * 企业id
     */
    private Long entId;

    /**
     * 交易订单对账id
     */
    @JsonProperty("tLedgerId")
    private Long tLedgerId;

    /**
     * 结算单编号
     */
    private String stOrderNo;
    @JsonProperty("tLedgerNo")
    private String tLedgerNo;

    /**
     * 结算单名称
     */
    private String name;

    /**
     * 总应收/元
     */
    private BigDecimal totalPrice;

    /**
     * 已收款/元
     */
    private BigDecimal actualPrice;
    /**
     * 带回款金额（扩展的计算字段）
     */
    private BigDecimal waitPrice;
    private String trading;
    private String tradingLabel;

    /**
     * 预计收款日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date receiptTime;

    /**
     * 对账采购财务联系人名称
     */
    private String auditUser;
    //导出时的财务联系人
    private String contacts;
    private String phone;

    /**
     * 对账采购财务联系人电话
     */
    private String auditPhone;

    /**
     * 对账销售财务联系人名称
     */
    private String successUser;

    /**
     * 对账销售财务联系人电话
     */
    private String successPhone;

    /**
     * 备注
     */
    private String remark;

    /**
     * 状态（待回款、部分回款、全部回款、回退）
     */
    private Integer status;
    private String statusLabel;
    //客户企业名称
    private String firmName;
    private String sellFirmName;
    private String purchaseFirmName;

    /**
     * 创建人
     */
    private Long createBy;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /**
     * 更新人
     */
    private Long updateBy;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    /**
     * 是否删除（0未删除，1删除）
     */
    private Integer delFlag;

    //百分比
    private String percentage;

    public String getSellFirmName() {
        return sellFirmName;
    }

    public void setSellFirmName(String sellFirmName) {
        this.sellFirmName = sellFirmName;
    }

    public String getPurchaseFirmName() {
        return purchaseFirmName;
    }

    public void setPurchaseFirmName(String purchaseFirmName) {
        this.purchaseFirmName = purchaseFirmName;
    }

    public String getContacts() {
        return contacts;
    }

    public void setContacts(String contacts) {
        this.contacts = contacts;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPercentage() {
        return percentage;
    }

    public void setPercentage(String percentage) {
        this.percentage = percentage;
    }

    public String gettLedgerNo() {
        return tLedgerNo;
    }

    public void settLedgerNo(String tLedgerNo) {
        this.tLedgerNo = tLedgerNo;
    }

    public String getFirmName() {
        return firmName;
    }

    public void setFirmName(String firmName) {
        this.firmName = firmName;
    }

    public Long getLedgerId() {
        return ledgerId;
    }

    public void setLedgerId(Long ledgerId) {
        this.ledgerId = ledgerId;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getEntId() {
        return entId;
    }

    public void setEntId(Long entId) {
        this.entId = entId;
    }

    public Long gettLedgerId() {
        return tLedgerId;
    }

    public void settLedgerId(Long tLedgerId) {
        this.tLedgerId = tLedgerId;
    }

    public String getStOrderNo() {
        return stOrderNo;
    }

    public void setStOrderNo(String stOrderNo) {
        this.stOrderNo = stOrderNo;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public BigDecimal getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(BigDecimal totalPrice) {
        this.totalPrice = totalPrice;
    }

    public BigDecimal getActualPrice() {
        if (Objects.isNull(actualPrice)) {
            return new BigDecimal("0.0");
        }
        return actualPrice;
    }

    public void setActualPrice(BigDecimal actualPrice) {
        this.actualPrice = actualPrice;
    }

    public BigDecimal getWaitPrice() {
        if (Objects.isNull(waitPrice)) {
            return new BigDecimal("0.0");
        }
        return waitPrice;
    }

    public void setWaitPrice(BigDecimal waitPrice) {
        this.waitPrice = waitPrice;
    }

    public String getTradingLabel() {
        return tradingLabel;
    }

    public Date getReceiptTime() {
        return receiptTime;
    }

    public void setReceiptTime(Date receiptTime) {
        this.receiptTime = receiptTime;
    }

    public String getAuditUser() {
        return auditUser;
    }

    public void setAuditUser(String auditUser) {
        this.auditUser = auditUser;
    }

    public String getAuditPhone() {
        return auditPhone;
    }

    public void setAuditPhone(String auditPhone) {
        this.auditPhone = auditPhone;
    }

    public String getSuccessUser() {
        return successUser;
    }

    public void setSuccessUser(String successUser) {
        this.successUser = successUser;
    }

    public String getSuccessPhone() {
        return successPhone;
    }

    public void setSuccessPhone(String successPhone) {
        this.successPhone = successPhone;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public Integer getStatus() {
        return status;
    }

    @Override
    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getStatusLabel() {
        return statusLabel;
    }

    public Long getCreateBy() {
        return createBy;
    }

    public void setCreateBy(Long createBy) {
        this.createBy = createBy;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Long getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(Long updateBy) {
        this.updateBy = updateBy;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }

    @Override
    public void setTrading(String trading) {
        this.trading = trading;
    }

    @Override
    public String getTrading() {
        return trading;
    }

    @Override
    public void setTradingLabel(String tradingLabel) {
        this.tradingLabel = tradingLabel;
    }

    @Override
    public void setStatusLabel(String statusLabel) {
        this.statusLabel = statusLabel;
    }
}
