package com.ssm.manage.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ssm.manage.entity.PayList;
import com.ssm.manage.utils.DateUtils;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Calendar;
import java.util.Date;
import java.util.List;

@Table(name = "account_trade_record_${tab}")
public class AccountTradeRecordResponse implements Serializable {
    /**
     * 主键ID
     */
    @Id
    private Long id;

    /**
     * 门店ID
     */
    @Column(name = "store_id")
    private Long storeId;

    /**
     * 门店名称
     */
    @Column(name = "store_name")
    private String storeName;

    /**
     * 会员ID
     */
    @Column(name = "member_id")
    private Long memberId;

    /**
     * 会员名称
     */
    @Column(name = "member_name")
    private String memberName;

    /**
     * 会员身份证号
     */
    @Column(name = "member_identity")
    private String memberIdentity;

    /**
     * 会员手机号
     */
    @Column(name = "member_phone")
    private String memberPhone;

    /**
     * 账户ID
     */
    @Column(name = "account_id")
    private Long accountId;

    /**
     * 账户ID
     */
    @Column(name = "account_num")
    private String accountNum;

    /**
     * 账户名称
     */
    @Column(name = "account_name")
    private String accountName;

    /**
     * 账户类型
     */
    @Column(name = "account_type")
    private String accountType;

    /**
     * 单据ID
     */
    @Column(name = "doc_id")
    private Long docId;

    /**
     * 单据号
     */
    @Column(name = "doc_num")
    private String docNum;

    /**
     * 单据时间
     */
    @Column(name = "input_date")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date inputDate;

    /**
     * 单据类型
     */
    @Column(name = "doc_type")
    private String docType;

    /**
     * 交易ID
     */
    @Column(name = "trade_id")
    private Long tradeId;

    /**
     * 交易名称
     */
    @Column(name = "trade_name")
    private String tradeName;

    /**
     * 交易金额
     */
    @Column(name = "trade_money")
    private BigDecimal tradeMoney;

    /**
     * 交易次数
     */
    @Column(name = "trade_count")
    private Integer tradeCount;

    /**
     * 存入金额
     */
    @Column(name = "account_in_money")
    private BigDecimal accountInMoney;

    /**
     * 存入次数
     */
    @Column(name = "account_in_count")
    private Integer accountInCount;

    /**
     * 支付金额
     */
    @Column(name = "account_spend_money")
    private BigDecimal accountSpendMoney;

    /**
     * 支付赠送金额
     */
    @Column(name = "account_gift_spend_money")
    private BigDecimal accountGiftSpendMoney;

    /**
     * 支付次数
     */
    @Column(name = "account_spend_count")
    private Integer accountSpendCount;

    /**
     * 剩余金额
     */
    @Column(name = "account_rest_money")
    private BigDecimal accountRestMoney;

    /**
     * 剩余可用金额
     */
    @Column(name = "account_consume_money")
    private BigDecimal accountConsumeMoney;

    /**
     * 剩余次数
     */
    @Column(name = "account_rest_count")
    private Integer accountRestCount;

    /**
     * 剩余可用次数
     */
    @Column(name = "account_consume_count")
    private Integer accountConsumeCount;

    /**
     * 剩余赠送金额
     */
    @Column(name = "account_gift_rest_money")
    private BigDecimal accountGiftRestMoney;

    /**
     * 剩余赠送次数
     */
    @Column(name = "account_gift_rest_count")
    private Integer accountGiftRestCount;

    /**
     * 剩余赠送可用金额
     */
    @Column(name = "account_gift_consume_money")
    private BigDecimal accountGiftConsumeMoney;


    /**
     * 赠送支付金额
     */
    @Column(name = "payment_amount")
    private BigDecimal paymentAmount;

    /**
     * 欠款金额
     */
    @Column(name = "debt_money")
    private BigDecimal debtMoney;
    /**
     * 单据操作人
     */
    @Column(name = "input_by")
    private String inputBy;
    /**
     * 单价
     */
    @Column(name = "price")
    private BigDecimal price;

    /**
     * 单价
     */
    @Column(name = "gift_in_menoy")
    private BigDecimal giftInMenoy;

    /**
     * 单价
     */
    @Column(name = "card_money")
    private BigDecimal cardMoney;

    /**
     * 单价
     */
    @Column(name = "cash_money")
    private BigDecimal cashMoney;

    /**
     * 支付方式
     */
    //private List<PayList> payLists;

    /**
     * 疗程支付方式
     */
    //private List<RechargeAccountResponse> rechargeConsumeList;
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date additionDate;

    public Date getAdditionDate() {
        return additionDate;
    }

    public void setAdditionDate(Date additionDate) {
        this.additionDate = additionDate;
    }

    public BigDecimal getCardMoney() {
        return cardMoney;
    }

    public void setCardMoney(BigDecimal cardMoney) {
        this.cardMoney = cardMoney;
    }

    public BigDecimal getCashMoney() {
        return cashMoney;
    }

    public void setCashMoney(BigDecimal cashMoney) {
        this.cashMoney = cashMoney;
    }

    public BigDecimal getDebtMoney() {
        return debtMoney;
    }

    public void setDebtMoney(BigDecimal debtMoney) {
        this.debtMoney = debtMoney;
    }

    public String getInputBy() {
        return inputBy;
    }

    public void setInputBy(String inputBy) {
        this.inputBy = inputBy;
    }

    public BigDecimal getGiftInMenoy() {
        return giftInMenoy;
    }

    public void setGiftInMenoy(BigDecimal giftInMenoy) {
        this.giftInMenoy = giftInMenoy;
    }

    private String tab1;
    private String tab2;

    public String getAccountNum() {
        return accountNum;
    }

    public void setAccountNum(String accountNum) {
        this.accountNum = accountNum;
    }

    public void setTab1(String tab1) {
        this.tab1 = tab1;
    }

    public void setTab2(String tab2) {
        this.tab2 = tab2;
    }

    private String storeNum;

    public String getStoreNum() {
        return storeNum;
    }

    public void setStoreNum(String storeNum) {
        this.storeNum = storeNum;
    }

    /**
     * 剩余赠送可用次数
     */
    @Column(name = "account_gift_consume_count")
    private Integer accountGiftConsumeCount;

    @Column(name = "order_statu")
    private Integer orderStatu;


    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    private static final long serialVersionUID = 1L;

    public Integer getOrderStatu() {
        return orderStatu;
    }

    public void setOrderStatu(Integer orderStatu) {
        this.orderStatu = orderStatu;
    }

    public BigDecimal getPaymentAmount() {
        return paymentAmount;
    }

    public void setPaymentAmount(BigDecimal paymentAmount) {
        this.paymentAmount = paymentAmount;
    }

    /**
     * 获取主键ID
     *
     * @return id - 主键ID
     */
    public Long getId() {
        return id;
    }

    /**
     * 设置主键ID
     *
     * @param id 主键ID
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 获取门店ID
     *
     * @return store_id - 门店ID
     */
    public Long getStoreId() {
        return storeId;
    }

    /**
     * 设置门店ID
     *
     * @param storeId 门店ID
     */
    public void setStoreId(Long storeId) {
        this.storeId = storeId;
    }

    /**
     * 获取门店名称
     *
     * @return store_name - 门店名称
     */
    public String getStoreName() {
        return storeName;
    }

    /**
     * 设置门店名称
     *
     * @param storeName 门店名称
     */
    public void setStoreName(String storeName) {
        this.storeName = storeName;
    }

    /**
     * 获取会员ID
     *
     * @return member_id - 会员ID
     */
    public Long getMemberId() {
        return memberId;
    }

    /**
     * 设置会员ID
     *
     * @param memberId 会员ID
     */
    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    /**
     * 获取会员名称
     *
     * @return member_name - 会员名称
     */
    public String getMemberName() {
        return memberName;
    }

    /**
     * 设置会员名称
     *
     * @param memberName 会员名称
     */
    public void setMemberName(String memberName) {
        this.memberName = memberName;
    }

    /**
     * 获取会员身份证号
     *
     * @return member_identity - 会员身份证号
     */
    public String getMemberIdentity() {
        return memberIdentity;
    }

    /**
     * 设置会员身份证号
     *
     * @param memberIdentity 会员身份证号
     */
    public void setMemberIdentity(String memberIdentity) {
        this.memberIdentity = memberIdentity;
    }

    /**
     * 获取会员手机号
     *
     * @return member_phone - 会员手机号
     */
    public String getMemberPhone() {
        return memberPhone;
    }

    /**
     * 设置会员手机号
     *
     * @param memberPhone 会员手机号
     */
    public void setMemberPhone(String memberPhone) {
        this.memberPhone = memberPhone;
    }

    /**
     * 获取账户ID
     *
     * @return account_id - 账户ID
     */
    public Long getAccountId() {
        return accountId;
    }

    /**
     * 设置账户ID
     *
     * @param accountId 账户ID
     */
    public void setAccountId(Long accountId) {
        this.accountId = accountId;
    }

    /**
     * 获取账户名称
     *
     * @return account_name - 账户名称
     */
    public String getAccountName() {
        return accountName;
    }

    /**
     * 设置账户名称
     *
     * @param accountName 账户名称
     */
    public void setAccountName(String accountName) {
        this.accountName = accountName;
    }

    /**
     * 获取账户类型
     *
     * @return account_type - 账户类型
     */
    public String getAccountType() {
        return accountType;
    }

    /**
     * 设置账户类型
     *
     * @param accountType 账户类型
     */
    public void setAccountType(String accountType) {
        this.accountType = accountType;
    }

    /**
     * 获取单据ID
     *
     * @return doc_id - 单据ID
     */
    public Long getDocId() {
        return docId;
    }

    /**
     * 设置单据ID
     *
     * @param docId 单据ID
     */
    public void setDocId(Long docId) {
        this.docId = docId;
    }

    /**
     * 获取单据号
     *
     * @return doc_num - 单据号
     */
    public String getDocNum() {
        return docNum;
    }

    /**
     * 设置单据号
     *
     * @param docNum 单据号
     */
    public void setDocNum(String docNum) {
        this.docNum = docNum;
    }

    /**
     * 获取单据时间
     *
     * @return input_date - 单据时间
     */
    public Date getInputDate() {
        return inputDate;
    }

    /**
     * 设置单据时间
     *
     * @param inputDate 单据时间
     */
    public void setInputDate(Date inputDate) {
        this.inputDate = inputDate;
    }

    /**
     * 获取单据类型
     *
     * @return doc_type - 单据类型
     */
    public String getDocType() {
        return docType;
    }

    /**
     * 设置单据类型
     *
     * @param docType 单据类型
     */
    public void setDocType(String docType) {
        this.docType = docType;
    }

    /**
     * 获取交易ID
     *
     * @return trade_id - 交易ID
     */
    public Long getTradeId() {
        return tradeId;
    }

    /**
     * 设置交易ID
     *
     * @param tradeId 交易ID
     */
    public void setTradeId(Long tradeId) {
        this.tradeId = tradeId;
    }

    /**
     * 获取交易名称
     *
     * @return trade_name - 交易名称
     */
    public String getTradeName() {
        return tradeName;
    }

    /**
     * 设置交易名称
     *
     * @param tradeName 交易名称
     */
    public void setTradeName(String tradeName) {
        this.tradeName = tradeName;
    }

    /**
     * 获取交易金额
     *
     * @return trade_money - 交易金额
     */
    public BigDecimal getTradeMoney() {
        return tradeMoney;
    }

    /**
     * 设置交易金额
     *
     * @param tradeMoney 交易金额
     */
    public void setTradeMoney(BigDecimal tradeMoney) {
        this.tradeMoney = tradeMoney;
    }

    /**
     * 获取交易次数
     *
     * @return trade_count - 交易次数
     */
    public Integer getTradeCount() {
        return tradeCount;
    }

    /**
     * 设置交易次数
     *
     * @param tradeCount 交易次数
     */
    public void setTradeCount(Integer tradeCount) {
        this.tradeCount = tradeCount;
    }

    /**
     * 获取存入金额
     *
     * @return account_in_money - 存入金额
     */
    public BigDecimal getAccountInMoney() {
        return accountInMoney;
    }

    /**
     * 设置存入金额
     *
     * @param accountInMoney 存入金额
     */
    public void setAccountInMoney(BigDecimal accountInMoney) {
        this.accountInMoney = accountInMoney;
    }

    /**
     * 获取存入次数
     *
     * @return account_in_count - 存入次数
     */
    public Integer getAccountInCount() {
        return accountInCount;
    }

    /**
     * 设置存入次数
     *
     * @param accountInCount 存入次数
     */
    public void setAccountInCount(Integer accountInCount) {
        this.accountInCount = accountInCount;
    }

    /**
     * 获取支付金额
     *
     * @return account_spend_money - 支付金额
     */
    public BigDecimal getAccountSpendMoney() {
        return accountSpendMoney;
    }

    /**
     * 设置支付金额
     *
     * @param accountSpendMoney 支付金额
     */
    public void setAccountSpendMoney(BigDecimal accountSpendMoney) {
        this.accountSpendMoney = accountSpendMoney;
    }

    /**
     * 获取支付赠送金额
     *
     * @return account_gift_spend_money - 支付赠送金额
     */
    public BigDecimal getAccountGiftSpendMoney() {
        return accountGiftSpendMoney;
    }

    /**
     * 设置支付赠送金额
     *
     * @param accountGiftSpendMoney 支付赠送金额
     */
    public void setAccountGiftSpendMoney(BigDecimal accountGiftSpendMoney) {
        this.accountGiftSpendMoney = accountGiftSpendMoney;
    }

    /**
     * 获取支付次数
     *
     * @return account_spend_count - 支付次数
     */
    public Integer getAccountSpendCount() {
        return accountSpendCount;
    }

    /**
     * 设置支付次数
     *
     * @param accountSpendCount 支付次数
     */
    public void setAccountSpendCount(Integer accountSpendCount) {
        this.accountSpendCount = accountSpendCount;
    }

    /**
     * 获取剩余金额
     *
     * @return account_rest_money - 剩余金额
     */
    public BigDecimal getAccountRestMoney() {
        return accountRestMoney;
    }

    /**
     * 设置剩余金额
     *
     * @param accountRestMoney 剩余金额
     */
    public void setAccountRestMoney(BigDecimal accountRestMoney) {
        this.accountRestMoney = accountRestMoney;
    }

    /**
     * 获取剩余可用金额
     *
     * @return account_consume_money - 剩余可用金额
     */
    public BigDecimal getAccountConsumeMoney() {
        return accountConsumeMoney;
    }

    /**
     * 设置剩余可用金额
     *
     * @param accountConsumeMoney 剩余可用金额
     */
    public void setAccountConsumeMoney(BigDecimal accountConsumeMoney) {
        this.accountConsumeMoney = accountConsumeMoney;
    }

    /**
     * 获取剩余次数
     *
     * @return account_rest_count - 剩余次数
     */
    public Integer getAccountRestCount() {
        return accountRestCount;
    }

    /**
     * 设置剩余次数
     *
     * @param accountRestCount 剩余次数
     */
    public void setAccountRestCount(Integer accountRestCount) {
        this.accountRestCount = accountRestCount;
    }

    /**
     * 获取剩余可用次数
     *
     * @return account_consume_count - 剩余可用次数
     */
    public Integer getAccountConsumeCount() {
        return accountConsumeCount;
    }

    /**
     * 设置剩余可用次数
     *
     * @param accountConsumeCount 剩余可用次数
     */
    public void setAccountConsumeCount(Integer accountConsumeCount) {
        this.accountConsumeCount = accountConsumeCount;
    }

    /**
     * 获取剩余赠送金额
     *
     * @return account_gift_rest_money - 剩余赠送金额
     */
    public BigDecimal getAccountGiftRestMoney() {
        return accountGiftRestMoney;
    }

    /**
     * 设置剩余赠送金额
     *
     * @param accountGiftRestMoney 剩余赠送金额
     */
    public void setAccountGiftRestMoney(BigDecimal accountGiftRestMoney) {
        this.accountGiftRestMoney = accountGiftRestMoney;
    }

    /**
     * 获取剩余赠送次数
     *
     * @return account_gift_rest_count - 剩余赠送次数
     */
    public Integer getAccountGiftRestCount() {
        return accountGiftRestCount;
    }

    /**
     * 设置剩余赠送次数
     *
     * @param accountGiftRestCount 剩余赠送次数
     */
    public void setAccountGiftRestCount(Integer accountGiftRestCount) {
        this.accountGiftRestCount = accountGiftRestCount;
    }

    /**
     * 获取剩余赠送可用金额
     *
     * @return account_gift_consume_money - 剩余赠送可用金额
     */
    public BigDecimal getAccountGiftConsumeMoney() {
        return accountGiftConsumeMoney;
    }

    /**
     * 设置剩余赠送可用金额
     *
     * @param accountGiftConsumeMoney 剩余赠送可用金额
     */
    public void setAccountGiftConsumeMoney(BigDecimal accountGiftConsumeMoney) {
        this.accountGiftConsumeMoney = accountGiftConsumeMoney;
    }

    /**
     * 获取剩余赠送可用次数
     *
     * @return account_gift_consume_count - 剩余赠送可用次数
     */
    public Integer getAccountGiftConsumeCount() {
        return accountGiftConsumeCount;
    }

    /**
     * 设置剩余赠送可用次数
     *
     * @param accountGiftConsumeCount 剩余赠送可用次数
     */
    public void setAccountGiftConsumeCount(Integer accountGiftConsumeCount) {
        this.accountGiftConsumeCount = accountGiftConsumeCount;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AccountTradeRecordResponse other = (AccountTradeRecordResponse) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getStoreId() == null ? other.getStoreId() == null : this.getStoreId().equals(other.getStoreId()))
                && (this.getStoreName() == null ? other.getStoreName() == null : this.getStoreName().equals(other.getStoreName()))
                && (this.getMemberId() == null ? other.getMemberId() == null : this.getMemberId().equals(other.getMemberId()))
                && (this.getMemberName() == null ? other.getMemberName() == null : this.getMemberName().equals(other.getMemberName()))
                && (this.getMemberIdentity() == null ? other.getMemberIdentity() == null : this.getMemberIdentity().equals(other.getMemberIdentity()))
                && (this.getMemberPhone() == null ? other.getMemberPhone() == null : this.getMemberPhone().equals(other.getMemberPhone()))
                && (this.getAccountId() == null ? other.getAccountId() == null : this.getAccountId().equals(other.getAccountId()))
                && (this.getAccountName() == null ? other.getAccountName() == null : this.getAccountName().equals(other.getAccountName()))
                && (this.getAccountType() == null ? other.getAccountType() == null : this.getAccountType().equals(other.getAccountType()))
                && (this.getDocId() == null ? other.getDocId() == null : this.getDocId().equals(other.getDocId()))
                && (this.getDocNum() == null ? other.getDocNum() == null : this.getDocNum().equals(other.getDocNum()))
                && (this.getInputDate() == null ? other.getInputDate() == null : this.getInputDate().equals(other.getInputDate()))
                && (this.getDocType() == null ? other.getDocType() == null : this.getDocType().equals(other.getDocType()))
                && (this.getTradeId() == null ? other.getTradeId() == null : this.getTradeId().equals(other.getTradeId()))
                && (this.getTradeName() == null ? other.getTradeName() == null : this.getTradeName().equals(other.getTradeName()))
                && (this.getTradeMoney() == null ? other.getTradeMoney() == null : this.getTradeMoney().equals(other.getTradeMoney()))
                && (this.getTradeCount() == null ? other.getTradeCount() == null : this.getTradeCount().equals(other.getTradeCount()))
                && (this.getAccountInMoney() == null ? other.getAccountInMoney() == null : this.getAccountInMoney().equals(other.getAccountInMoney()))
                && (this.getAccountInCount() == null ? other.getAccountInCount() == null : this.getAccountInCount().equals(other.getAccountInCount()))
                && (this.getAccountSpendMoney() == null ? other.getAccountSpendMoney() == null : this.getAccountSpendMoney().equals(other.getAccountSpendMoney()))
                && (this.getAccountGiftSpendMoney() == null ? other.getAccountGiftSpendMoney() == null : this.getAccountGiftSpendMoney().equals(other.getAccountGiftSpendMoney()))
                && (this.getAccountSpendCount() == null ? other.getAccountSpendCount() == null : this.getAccountSpendCount().equals(other.getAccountSpendCount()))
                && (this.getAccountRestMoney() == null ? other.getAccountRestMoney() == null : this.getAccountRestMoney().equals(other.getAccountRestMoney()))
                && (this.getAccountConsumeMoney() == null ? other.getAccountConsumeMoney() == null : this.getAccountConsumeMoney().equals(other.getAccountConsumeMoney()))
                && (this.getAccountRestCount() == null ? other.getAccountRestCount() == null : this.getAccountRestCount().equals(other.getAccountRestCount()))
                && (this.getAccountConsumeCount() == null ? other.getAccountConsumeCount() == null : this.getAccountConsumeCount().equals(other.getAccountConsumeCount()))
                && (this.getAccountGiftRestMoney() == null ? other.getAccountGiftRestMoney() == null : this.getAccountGiftRestMoney().equals(other.getAccountGiftRestMoney()))
                && (this.getAccountGiftRestCount() == null ? other.getAccountGiftRestCount() == null : this.getAccountGiftRestCount().equals(other.getAccountGiftRestCount()))
                && (this.getAccountGiftConsumeMoney() == null ? other.getAccountGiftConsumeMoney() == null : this.getAccountGiftConsumeMoney().equals(other.getAccountGiftConsumeMoney()))
                && (this.getAccountGiftConsumeCount() == null ? other.getAccountGiftConsumeCount() == null : this.getAccountGiftConsumeCount().equals(other.getAccountGiftConsumeCount()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getStoreId() == null) ? 0 : getStoreId().hashCode());
        result = prime * result + ((getStoreName() == null) ? 0 : getStoreName().hashCode());
        result = prime * result + ((getMemberId() == null) ? 0 : getMemberId().hashCode());
        result = prime * result + ((getMemberName() == null) ? 0 : getMemberName().hashCode());
        result = prime * result + ((getMemberIdentity() == null) ? 0 : getMemberIdentity().hashCode());
        result = prime * result + ((getMemberPhone() == null) ? 0 : getMemberPhone().hashCode());
        result = prime * result + ((getAccountId() == null) ? 0 : getAccountId().hashCode());
        result = prime * result + ((getAccountName() == null) ? 0 : getAccountName().hashCode());
        result = prime * result + ((getAccountType() == null) ? 0 : getAccountType().hashCode());
        result = prime * result + ((getDocId() == null) ? 0 : getDocId().hashCode());
        result = prime * result + ((getDocNum() == null) ? 0 : getDocNum().hashCode());
        result = prime * result + ((getInputDate() == null) ? 0 : getInputDate().hashCode());
        result = prime * result + ((getDocType() == null) ? 0 : getDocType().hashCode());
        result = prime * result + ((getTradeId() == null) ? 0 : getTradeId().hashCode());
        result = prime * result + ((getTradeName() == null) ? 0 : getTradeName().hashCode());
        result = prime * result + ((getTradeMoney() == null) ? 0 : getTradeMoney().hashCode());
        result = prime * result + ((getTradeCount() == null) ? 0 : getTradeCount().hashCode());
        result = prime * result + ((getAccountInMoney() == null) ? 0 : getAccountInMoney().hashCode());
        result = prime * result + ((getAccountInCount() == null) ? 0 : getAccountInCount().hashCode());
        result = prime * result + ((getAccountSpendMoney() == null) ? 0 : getAccountSpendMoney().hashCode());
        result = prime * result + ((getAccountGiftSpendMoney() == null) ? 0 : getAccountGiftSpendMoney().hashCode());
        result = prime * result + ((getAccountSpendCount() == null) ? 0 : getAccountSpendCount().hashCode());
        result = prime * result + ((getAccountRestMoney() == null) ? 0 : getAccountRestMoney().hashCode());
        result = prime * result + ((getAccountConsumeMoney() == null) ? 0 : getAccountConsumeMoney().hashCode());
        result = prime * result + ((getAccountRestCount() == null) ? 0 : getAccountRestCount().hashCode());
        result = prime * result + ((getAccountConsumeCount() == null) ? 0 : getAccountConsumeCount().hashCode());
        result = prime * result + ((getAccountGiftRestMoney() == null) ? 0 : getAccountGiftRestMoney().hashCode());
        result = prime * result + ((getAccountGiftRestCount() == null) ? 0 : getAccountGiftRestCount().hashCode());
        result = prime * result + ((getAccountGiftConsumeMoney() == null) ? 0 : getAccountGiftConsumeMoney().hashCode());
        result = prime * result + ((getAccountGiftConsumeCount() == null) ? 0 : getAccountGiftConsumeCount().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", storeId=").append(storeId);
        sb.append(", storeName=").append(storeName);
        sb.append(", memberId=").append(memberId);
        sb.append(", memberName=").append(memberName);
        sb.append(", memberIdentity=").append(memberIdentity);
        sb.append(", memberPhone=").append(memberPhone);
        sb.append(", accountId=").append(accountId);
        sb.append(", accountName=").append(accountName);
        sb.append(", accountType=").append(accountType);
        sb.append(", docId=").append(docId);
        sb.append(", docNum=").append(docNum);
        sb.append(", inputDate=").append(inputDate);
        sb.append(", docType=").append(docType);
        sb.append(", tradeId=").append(tradeId);
        sb.append(", tradeName=").append(tradeName);
        sb.append(", tradeMoney=").append(tradeMoney);
        sb.append(", tradeCount=").append(tradeCount);
        sb.append(", accountInMoney=").append(accountInMoney);
        sb.append(", accountInCount=").append(accountInCount);
        sb.append(", accountSpendMoney=").append(accountSpendMoney);
        sb.append(", accountGiftSpendMoney=").append(accountGiftSpendMoney);
        sb.append(", accountSpendCount=").append(accountSpendCount);
        sb.append(", accountRestMoney=").append(accountRestMoney);
        sb.append(", accountConsumeMoney=").append(accountConsumeMoney);
        sb.append(", accountRestCount=").append(accountRestCount);
        sb.append(", accountConsumeCount=").append(accountConsumeCount);
        sb.append(", accountGiftRestMoney=").append(accountGiftRestMoney);
        sb.append(", accountGiftRestCount=").append(accountGiftRestCount);
        sb.append(", accountGiftConsumeMoney=").append(accountGiftConsumeMoney);
        sb.append(", accountGiftConsumeCount=").append(accountGiftConsumeCount);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }

    @JsonIgnore
    public String getTab() {
        return DateUtils.YMFormat(inputDate);
    }

    public String getTab1() {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(inputDate); // 设置为当前时间
        calendar.add(Calendar.MONTH, -1);
        String s = DateUtils.YMFormat(calendar.getTime());
        this.tab1="account_trade_record_"+s;
        return this.tab1;
    }

    public String getTab2() {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(inputDate); // 设置为当前时间
        calendar.add(Calendar.MONTH, -2);
        String s = DateUtils.YMFormat(calendar.getTime());
        this.tab2="account_trade_record_"+s;
        return this.tab2;
    }
}