package com.sunxung.factoring.entity.settlement;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.sunxung.factoring.entity.acceptance.AcceptanceGoodsInfo;
import com.sunxung.factoring.entity.customerinformation.Customer;
import com.sunxung.factoring.entity.invoicemanage.InvoiceGoodsInfo;
import com.sunxung.factoring.entity.project.Project;
import com.sunxung.factoring.entity.sys.Dictionary;
import com.sunxung.factoring.entity.sys.FileStorage;
import com.sunxung.factoring.entity.tradingPlatform.Platform;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 结算单基础信息
 *
 * @author liutao
 * @date 2021.09.22
 */
@TableName("c_settlement_basic_info")
public class SettlementBasicInfo extends Project {
    /**
     * 结算单号
     */
    @TableField("settlement_number")
    private String settlementNumber;
    /**
     * 供应商Id
     */
    @NotNull(message = "请选择供应商")
    @TableField(value = "supplier_id")
    private Long supplierId;
    /**
     * 核心企业Id
     */
    @NotNull(message = "请选择核心企业")
    @TableField(value = "enterprise_customer_info_id")
    private Long enterpriseCustomerInfoId;
    /**
     * 贸易平台单位名称
     */
    @NotNull(message = "贸易平台不能为空")
    @TableField(value = "trading_platform_id")
    private Long tradingPlatformId;
    /**
     * 结算日期
     */
    @NotNull(message = "请选择结算日期")
    @TableField("settlement_date")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date settlementDate;
    /**
     * 结算金额
     */
    @NotNull(message = "结算金额不能为空")
    @TableField("settlement_amount")
    private BigDecimal settlementAmount;
    /**
     * 对账开始时间
     */
    @NotNull(message = "请选择对账开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField("settlement_start_date")
    private Date settlementStartDate;
    /**
     * 对账结束时间
     */
    @NotNull(message = "对账结束时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField("settlement_end_date")
    private Date settlementEndDate;

    /**
     * 经办人（供应商）
     */
    @NotNull(message = "请输入经办人（供应商）")
    @TableField("operator_supplier")
    private String operatorSupplier;
    /**
     * 经办人（核心企业）
     */
    @NotNull(message = "请输入经办人（核心企业）")
    @TableField("operator_enterprise")
    private String operatorEnterprise;
    /**
     * 补充说明
     */
    @TableField("additional_remarks")
    private String additionalRemarks;
    /**
     * 状态 已录入、已驳回、待签署，已签署
     */
    @TableField("settlement_status")
    private String settlementStatus;

    /**
     * 合同Id
     */
    @TableField("contract_id")
    private String contractId;

    /**
     * 业务名称
     */
    @TableField("business_name")
    private String businessName;

    /**
     * 结算货物数量
     */
    @TableField("count_the_goods")
    private String countTheGoods;

    /**
     * 结算销售总价
     */
    @TableField("settle_total_sales_price")
    private String settleTotalSalesPrice;

    /**
     * 结算单状态字典项
     **/
    @TableField(exist = false)
    private Dictionary acceptanceSheetDict;
    /**
     * 相关货物信息
     */
    @NotNull(message = "请选择已验收的货物")
    @TableField(exist = false)
    private List<SettlementGoodsInfo> settlementGoodsInfos;

    /**
     * 验收单货物列表
     */
    @TableField(exist = false)
    private List<AcceptanceGoodsInfo> acceptanceGoodsInfos;

    /**
     * 回款计划
     */
    @TableField(exist = false)
    private List<SettlementRepaymentPlan> settlementRepaymentPlans;

    /**
     * 删除的附件Id
     */
    @TableField(exist = false)
    private List<Long> deleteFileIds;
    /**
     * taskId
     */
    @TableField(exist = false)
    private String taskId;

    /**
     * 平台
     */
    @TableField(exist = false)
    private Platform platform;

    /**
     * 供应商
     */
    @TableField(exist = false)
    private Customer supplier;

    /**
     * 核心企业
     */
    @TableField(exist = false)
    private Customer customer;
//
//    /**
//     * 业务信息
//     */
//    @TableField(exist = false)
//    private BusinessBasicInfo businessBasicInfo;

    /**
     * 普通附件
     */
    @TableField(exist = false)
    private List<Long> fileIds;
    @TableField(exist = false)
    private List<FileStorage> files;

    /**
     * 网价附件
     */
    @TableField(exist = false)
    private List<Long> netPriceFileIds;
    @TableField(exist = false)
    private List<FileStorage> netPriceFiles;

    /**
     * \
     * 补充说明附件
     */
    @TableField(exist = false)
    private List<Long> additionalFileIds;
    @TableField(exist = false)
    private List<FileStorage> additionalFiles;

    /**
     * \
     * 补充附件
     */
    @TableField(exist = false)
    private List<FileStorage> addFiles;

    /** 是否提交 true是 false否 **/
    @TableField(exist = false)
    private Boolean submit;

    /**
     * 对应不同模块状态
     */
    @TableField(exist = false)
    private Dictionary status;


    /**
     * 发票货物信息
     */
    @TableField(exist = false)
    private List<InvoiceGoodsInfo> invoiceGoodsInfos;

    public SettlementBasicInfo() {
    }

    public String getSettlementNumber() {
        return settlementNumber;
    }

    public void setSettlementNumber(String settlementNumber) {
        this.settlementNumber = settlementNumber;
    }

    public Long getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }

    public Long getEnterpriseCustomerInfoId() {
        return enterpriseCustomerInfoId;
    }

    public void setEnterpriseCustomerInfoId(Long enterpriseCustomerInfoId) {
        this.enterpriseCustomerInfoId = enterpriseCustomerInfoId;
    }

    public Long getTradingPlatformId() {
        return tradingPlatformId;
    }

    public void setTradingPlatformId(Long tradingPlatformId) {
        this.tradingPlatformId = tradingPlatformId;
    }

    public Date getSettlementDate() {
        return settlementDate;
    }

    public void setSettlementDate(Date settlementDate) {
        this.settlementDate = settlementDate;
    }

    public BigDecimal getSettlementAmount() {
        return settlementAmount;
    }

    public void setSettlementAmount(BigDecimal settlementAmount) {
        this.settlementAmount = settlementAmount;
    }

    public Date getSettlementStartDate() {
        return settlementStartDate;
    }

    public void setSettlementStartDate(Date settlementStartDate) {
        this.settlementStartDate = settlementStartDate;
    }

    public Date getSettlementEndDate() {
        return settlementEndDate;
    }

    public void setSettlementEndDate(Date settlementEndDate) {
        this.settlementEndDate = settlementEndDate;
    }

    public String getOperatorSupplier() {
        return operatorSupplier;
    }

    public void setOperatorSupplier(String operatorSupplier) {
        this.operatorSupplier = operatorSupplier;
    }

    public String getOperatorEnterprise() {
        return operatorEnterprise;
    }

    public void setOperatorEnterprise(String operatorEnterprise) {
        this.operatorEnterprise = operatorEnterprise;
    }

    public String getAdditionalRemarks() {
        return additionalRemarks;
    }

    public void setAdditionalRemarks(String additionalRemarks) {
        this.additionalRemarks = additionalRemarks;
    }

    public String getSettlementStatus() {
        return settlementStatus;
    }

    public void setSettlementStatus(String settlementStatus) {
        this.settlementStatus = settlementStatus;
    }

    public Dictionary getAcceptanceSheetDict() {
        return acceptanceSheetDict;
    }

    public void setAcceptanceSheetDict(Dictionary acceptanceSheetDict) {
        this.acceptanceSheetDict = acceptanceSheetDict;
    }

    public List<SettlementGoodsInfo> getSettlementGoodsInfos() {
        return settlementGoodsInfos;
    }

    public void setSettlementGoodsInfos(List<SettlementGoodsInfo> settlementGoodsInfos) {
        this.settlementGoodsInfos = settlementGoodsInfos;
    }

    public List<AcceptanceGoodsInfo> getAcceptanceGoodsInfos() {
        return acceptanceGoodsInfos;
    }

    public void setAcceptanceGoodsInfos(List<AcceptanceGoodsInfo> acceptanceGoodsInfos) {
        this.acceptanceGoodsInfos = acceptanceGoodsInfos;
    }

    public List<SettlementRepaymentPlan> getSettlementRepaymentPlans() {
        return settlementRepaymentPlans;
    }

    public void setSettlementRepaymentPlans(List<SettlementRepaymentPlan> settlementRepaymentPlans) {
        this.settlementRepaymentPlans = settlementRepaymentPlans;
    }

    public List<Long> getDeleteFileIds() {
        return deleteFileIds;
    }

    public void setDeleteFileIds(List<Long> deleteFileIds) {
        this.deleteFileIds = deleteFileIds;
    }

    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    public Platform getPlatform() {
        return platform;
    }

    public void setPlatform(Platform platform) {
        this.platform = platform;
    }

    public Customer getSupplier() {
        return supplier;
    }

    public void setSupplier(Customer supplier) {
        this.supplier = supplier;
    }

    public Customer getCustomer() {
        return customer;
    }

    public void setCustomer(Customer customer) {
        this.customer = customer;
    }

//    public BusinessBasicInfo getBusinessBasicInfo() {
//        return businessBasicInfo;
//    }
//
//    public void setBusinessBasicInfo(BusinessBasicInfo businessBasicInfo) {
//        this.businessBasicInfo = businessBasicInfo;
//    }

    public List<FileStorage> getFiles() {
        return files;
    }

    public void setFiles(List<FileStorage> files) {
        this.files = files;
    }

    public List<FileStorage> getNetPriceFiles() {
        return netPriceFiles;
    }

    public void setNetPriceFiles(List<FileStorage> netPriceFiles) {
        this.netPriceFiles = netPriceFiles;
    }

    public List<FileStorage> getAdditionalFiles() {
        return additionalFiles;
    }

    public void setAdditionalFiles(List<FileStorage> additionalFiles) {
        this.additionalFiles = additionalFiles;
    }

    public List<FileStorage> getAddFiles() {
        return addFiles;
    }

    public void setAddFiles(List<FileStorage> addFiles) {
        this.addFiles = addFiles;
    }

    public List<InvoiceGoodsInfo> getInvoiceGoodsInfos() {
        return invoiceGoodsInfos;
    }

    public void setInvoiceGoodsInfos(List<InvoiceGoodsInfo> invoiceGoodsInfos) {
        this.invoiceGoodsInfos = invoiceGoodsInfos;
    }

    public String getContractId() {
        return contractId;
    }

    public void setContractId(String contractId) {
        this.contractId = contractId;
    }

    @Override
    public String getBusinessName() {
        return businessName;
    }

    @Override
    public void setBusinessName(String businessName) {
        this.businessName = businessName;
    }

    public Boolean getSubmit() {
        return submit;
    }

    public void setSubmit(Boolean submit) {
        this.submit = submit;
    }

    public Dictionary getStatus() {
        return status;
    }

    public void setStatus(Dictionary status) {
        this.status = status;
    }

    public List<Long> getFileIds() {
        return fileIds;
    }

    public void setFileIds(List<Long> fileIds) {
        this.fileIds = fileIds;
    }

    public List<Long> getNetPriceFileIds() {
        return netPriceFileIds;
    }

    public void setNetPriceFileIds(List<Long> netPriceFileIds) {
        this.netPriceFileIds = netPriceFileIds;
    }

    public List<Long> getAdditionalFileIds() {
        return additionalFileIds;
    }

    public void setAdditionalFileIds(List<Long> additionalFileIds) {
        this.additionalFileIds = additionalFileIds;
    }

    @Override
    public String toString() {
        return "SettlementBasicInfo{" +
                "settlementNumber='" + settlementNumber + '\'' +
                ", supplierId=" + supplierId +
                ", enterpriseCustomerInfoId=" + enterpriseCustomerInfoId +
                ", tradingPlatformId=" + tradingPlatformId +
                ", settlementDate=" + settlementDate +
                ", settlementAmount=" + settlementAmount +
                ", settlementStartDate=" + settlementStartDate +
                ", settlementEndDate=" + settlementEndDate +
                ", operatorSupplier='" + operatorSupplier + '\'' +
                ", operatorEnterprise='" + operatorEnterprise + '\'' +
                ", additionalRemarks='" + additionalRemarks + '\'' +
                ", settlementStatus=" + settlementStatus +
                ", acceptanceSheetDict=" + acceptanceSheetDict +
                ", settlementGoodsInfos=" + settlementGoodsInfos +
                ", acceptanceGoodsInfos=" + acceptanceGoodsInfos +
                ", settlementRepaymentPlans=" + settlementRepaymentPlans +
                ", deleteFileIds=" + deleteFileIds +
                ", taskId='" + taskId + '\'' +
                ", platform=" + platform +
                ", supplier=" + supplier +
                ", customer=" + customer +
                ", files=" + files +
                ", netPriceFiles=" + netPriceFiles +
                ", additionalFiles=" + additionalFiles +
                ", addFiles=" + addFiles +
                ", invoiceGoodsInfos=" + invoiceGoodsInfos +
                '}';
    }
}
