package com.inkasso.factoring.settlement.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.inkasso.factoring.acceptanceManagement.entity.CAcceptanceGoodsInfo;
import com.inkasso.factoring.common.entity.BaseEntity;
import com.inkasso.factoring.dict.entity.Dictionary;
import com.inkasso.factoring.file.entity.FileStorageDO;
import com.inkasso.factoring.invoicemanage.entity.InvoiceGoodsInfo;
import com.inkasso.factoring.tradingPlatform.entity.Platform;
import org.springframework.format.annotation.DateTimeFormat;

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

/**
 * 结算单基础信息
 *
 * @author zhao.ms
 * @date 2023.11.27
 */
@TableName("c_settlement_basic_info")
public class SettlementBasicInfo extends BaseEntity {
    /**
     * 业务编号
     */
    @TableField("business_number")
    @NotNull
    private String businessNumber;
    /**
     * 结算单号
     */
    @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")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date settlementDate;
    /**
     * 结算金额
     */
    @NotNull(message = "结算金额不能为空")
    @TableField("settlement_amount")
    private BigDecimal settlementAmount;
    /**
     * 对账开始时间
     */
    @NotNull(message = "请选择对账开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @TableField("settlement_start_date")
    private Date settlementStartDate;
    /**
     * 对账结束时间
     */
    @NotNull(message = "对账结束时间不能为空")
    @DateTimeFormat(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;
    /**
     * 结算单状态
     **/
    @TableField(exist = false)
    private String statusName;
    /**
     * 合同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;
    /**
     * 验收单编号
     **/
    @TableField(exist = false)
    private String acceptanceNumber;
    /**
     * 验收单货物编号
     */
    @TableField(exist = false)
    private String acceptanceGoodsNumber;
    /**
     * 相关货物信息
     */
    @NotNull(message = "请选择已验收的货物")
    @TableField(exist = false)
    private List<SettlementGoodsInfo> settlementGoodsInfos;

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


    /**
     * 删除的附件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 String platformName;

    /**
     * 供应商
     */
//    @TableField(exist = false)
//    private Customer supplier;
//
//    /**
//     * 核心企业
//     */
//    @TableField(exist = false)
//    private Customer customer;

    /**
     * 业务信息
     */
//    @TableField(exist = false)
//    private BusinessBasicInfo businessBasicInfo;

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

    @TableField(exist = false)
    private List<Long> fileIds;

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

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

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

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

    /**
     * 发票货物信息
     */
    @TableField(exist = false)
    private List<InvoiceGoodsInfo> invoiceGoodsInfos;
    /**
     * 回款计划
     */
    @TableField(exist = false)
    private List<SettlementRepaymentPlan> settlementRepaymentPlans;

    public SettlementBasicInfo() {
    }

    public String getBusinessNumber() {
        return businessNumber;
    }

    public void setBusinessNumber(String businessNumber) {
        this.businessNumber = businessNumber;
    }

    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<CAcceptanceGoodsInfo> getAcceptanceGoodsInfos() {
        return acceptanceGoodsInfos;
    }

    public void setAcceptanceGoodsInfos(List<CAcceptanceGoodsInfo> 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<FileStorageDO> getFiles() {
        return files;
    }

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

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

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

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

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

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

    public void setAddFiles(List<FileStorageDO> 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 String getCountTheGoods() {
        return countTheGoods;
    }

    public void setCountTheGoods(String countTheGoods) {
        this.countTheGoods = countTheGoods;
    }

    public String getSettleTotalSalesPrice() {
        return settleTotalSalesPrice;
    }

    public void setSettleTotalSalesPrice(String settleTotalSalesPrice) {
        this.settleTotalSalesPrice = settleTotalSalesPrice;
    }

    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;
    }

    public List<Long> getAddFileIds() {
        return addFileIds;
    }

    public void setAddFileIds(List<Long> addFileIds) {
        this.addFileIds = addFileIds;
    }

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

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

    public String getPlatformName() {
        return platformName;
    }

    public void setPlatformName(String platformName) {
        this.platformName = platformName;
    }

    public String getStatusName() {
        return statusName;
    }

    public void setStatusName(String statusName) {
        this.statusName = statusName;
    }

    public String getAcceptanceNumber() {
        return acceptanceNumber;
    }

    public void setAcceptanceNumber(String acceptanceNumber) {
        this.acceptanceNumber = acceptanceNumber;
    }

    public String getAcceptanceGoodsNumber() {
        return acceptanceGoodsNumber;
    }

    public void setAcceptanceGoodsNumber(String acceptanceGoodsNumber) {
        this.acceptanceGoodsNumber = acceptanceGoodsNumber;
    }
}
