package com.ruoyi.oa.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.entity.SysUser;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * cmc合同评审对象 cmc_contract
 *
 * @author cmc
 * @date 2024-04-18
 */
public class CmcContract extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 合同id */
    private String contractId;

    /** 合同名称 */
    @Excel(name = "合同名称")
    private String contractName;

    /** 合同编码 */
    @Excel(name = "合同编码")
    private String contractCode;

    /** 合同编号 */
    @Excel(name = "合同编号")
    private String contractNumber;

    /** 合同内容 */
    @Excel(name = "合同内容")
    private String content;
    private CmcContractWork contractWork;

    /** 投标项目 */
    @Excel(name = "投标项目")
    private String tenderName;
    private Integer tenderId;

    /** 项目id */
    @Excel(name = "项目编号")
    private String projectNumber;
    @Excel(name = "项目名称")
    private String projectName;
    private String projectType;
    private String projectSource;

    /** 甲方单位 */
    @Excel(name = "甲方单位")
    private String partyAName;
    private String partyAId;

    /** 合同金额 */
    @Excel(name = "合同金额")
    private BigDecimal amount;

    /** 开票金额 */
    @Excel(name = "开票金额")
    private BigDecimal invoiceAmount;

    /** 开票比例 */
    @Excel(name = "开票比例")
    private String invoicePercentage;

    /** 回款金额 */
    @Excel(name = "回款金额")
    private BigDecimal paidAmount;

    /** 回款比例 */
    @Excel(name = "回款比例")
    private String paidPercentage;

    /** 履约保证金 */
    @Excel(name = "履约保证金")
    private BigDecimal deposit;

    /** 合同文件 */
//    @Excel(name = "合同文件")
    private String contractDocument;

    /** 拟稿人 */
    @Excel(name = "拟稿人")
    private String draftUserName;
    private Long drafter;

    /** 拟稿日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "拟稿日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date draftTime;

    /** 评审方式 */
    @Excel(name = "评审方式", readConverterExp = "0=无须评审,1=会议评审,2=线上会审")
    private String commentType;

    /** 分管审批意见 */
    @Excel(name = "分管审批意见")
    private String managerComment;

    /** 分管审批人 */
    @Excel(name = "分管审批人")
    private String managerUserName;
    private Long managerUserId;

    /** 分管审批日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "分管审批日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date managerTime;

    /** 总经理审核意见 */
    @Excel(name = "总经理审核意见")
    private String gmComment;

    /** 总经理审核人 */
    private Long gmUserId;
    @Excel(name = "总经理")
    private String gmUserName;

    /** 总经理审核日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "总经理审核日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date gmTime;

    /** 签订日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "签订日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date signDate;

    /** 签订备注 */
    @Excel(name = "签订备注")
    private String signRemark;

    /** 签订扫描件 */
//    @Excel(name = "签订扫描件")
    private String signScan;

    /** 分包总额 */
    private BigDecimal subAmount;

    /** 预算总额 */
    private BigDecimal budgetAmount;

    /** 借款总额 */
    private BigDecimal borrowAmount;

    /** 结算总额 */
    private BigDecimal settleAmount;

    /** 查询字符 */
    private String queryString;

    private SysUser draftUser;

    private SysUser managerUser;

    private SysUser gmUser;

    private CmcTender tender;

    private CmcPartyA partyA;

    private CmcProject project;

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

    public String getContractId()
    {
        return contractId;
    }
    public void setContractName(String contractName)
    {
        this.contractName = contractName;
    }

    public String getContractName()
    {
        return contractName;
    }
    public void setContractCode(String contractCode)
    {
        this.contractCode = contractCode;
    }

    public String getContractCode()
    {
        return contractCode;
    }
    public void setContractNumber(String contractNumber)
    {
        this.contractNumber = contractNumber;
    }

    public String getContractNumber()
    {
        return contractNumber;
    }
    public void setTenderId(Integer tenderId)
    {
        this.tenderId = tenderId;
    }

    public Integer getTenderId()
    {
        return tenderId;
    }
    public void setTender(CmcTender tender)
    {
        this.tender = tender;
        this.tenderName = tender != null ? tender.getProjectName() : "";
    }

    public CmcTender getTender()
    {
        return tender;
    }
    public void setProject(CmcProject project)
    {
        this.project = project;
        this.projectNumber = project == null ? "" : project.getProjectNumber();
        this.projectName = project == null ? "" : project.getProjectName();
        this.projectType = project == null ? "" : project.getProjectType();
    }

    public CmcProject getProject()
    {
        return project;
    }
    public void setProjectSource(String projectSource)
    {
        this.projectSource = projectSource;
    }

    public String getProjectSource()
    {
        return projectSource;
    }
    public void setProjectName(String projectName)
    {
        this.projectName = projectName;
    }

    public String getProjectName()
    {
        return projectName;
    }
    public void setPartyAId(String partyAId)
    {
        this.partyAId = partyAId;
    }

    public String getPartyAId()
    {
        return partyAId;
    }
    public void setPartyAName(String partyAName)
    {
        this.partyAName = partyAName;
    }

    public String getPartyAName()
    {
        return partyAName;
    }
    public void setPartyA(CmcPartyA partyA)
    {
        this.partyA = partyA;
        this.partyAName = partyA != null ? partyA.getPartyAName() : "";
    }

    public CmcPartyA getPartyA()
    {
        return partyA;
    }
    public void setAmount(BigDecimal amount)
    {
        this.amount = amount;
    }

    public BigDecimal getAmount()
    {
        return amount;
    }
    public void setPaidAmount(BigDecimal paidAmount)
    {
        this.paidAmount = paidAmount;
    }

    public BigDecimal getPaidAmount()
    {
        return paidAmount;
    }
    public void setPaidPercentage(String paidPercentage)
    {
        this.paidPercentage = paidPercentage;
    }

    public String getPaidPercentage()
    {
        return paidPercentage;
    }
    public void setInvoiceAmount(BigDecimal invoiceAmount)
    {
        this.invoiceAmount = invoiceAmount;
    }

    public BigDecimal getInvoiceAmount()
    {
        return invoiceAmount;
    }
    public void setInvoicePercentage(String invoicePercentage)
    {
        this.invoicePercentage = invoicePercentage;
    }

    public String getInvoicePercentage()
    {
        return invoicePercentage;
    }
    public void setDeposit(BigDecimal deposit)
    {
        this.deposit = deposit;
    }

    public BigDecimal getDeposit()
    {
        return deposit;
    }
    public void setContractDocument(String contractDocument)
    {
        this.contractDocument = contractDocument;
    }

    public String getContractDocument()
    {
        return contractDocument;
    }
    public void setDrafter(Long drafter)
    {
        this.drafter = drafter;
    }

    public Long getDrafter()
    {
        return drafter;
    }
    public void setDraftUser(SysUser draftUser)
    {
        this.draftUser = draftUser;
        this.draftUserName = draftUser != null ? draftUser.getNickName() : "";
    }

    public SysUser getDraftUser()
    {
        return draftUser;
    }
    public void setManagerUser(SysUser managerUser)
    {
        this.managerUser = managerUser;
        this.managerUserName = managerUser != null ? managerUser.getNickName() : "";
    }

    public SysUser getManagerUser()
    {
        return managerUser;
    }
    public void setDraftTime(Date draftTime)
    {
        this.draftTime = draftTime;
    }

    public Date getDraftTime()
    {
        return draftTime;
    }
    public void setSignDate(Date signDate)
    {
        this.signDate = signDate;
    }

    public Date getSignDate()
    {
        return signDate;
    }
    public void setSignRemark(String signRemark)
    {
        this.signRemark = signRemark;
    }

    public String getSignRemark()
    {
        return signRemark;
    }
    public void setSignScan(String signScan)
    {
        this.signScan = signScan;
    }

    public String getSignScan()
    {
        return signScan;
    }
    public void setCommentType(String commentType)
    {
        this.commentType = commentType;
    }

    public String getCommentType()
    {
        return commentType;
    }

    public void setManagerComment(String managerComment)
    {
        this.managerComment = managerComment;
    }

    public String getManagerComment()
    {
        return managerComment;
    }
    public void setManagerUserId(Long managerUserId)
    {
        this.managerUserId = managerUserId;
    }

    public Long getManagerUserId()
    {
        return managerUserId;
    }
    public void setManagerTime(Date managerTime)
    {
        this.managerTime = managerTime;
    }

    public Date getManagerTime()
    {
        return managerTime;
    }
    public void setGmUserId(Long gmUserId)
    {
        this.gmUserId = gmUserId;
    }

    public Long getGmUserId()
    {
        return gmUserId;
    }
    public void setGmTime(Date gmTime)
    {
        this.gmTime = gmTime;
    }

    public Date getGmTime()
    {
        return gmTime;
    }
    public void setGmComment(String gmComment)
    {
        this.gmComment = gmComment;
    }

    public String getGmComment()
    {
        return gmComment;
    }
    public void setGmUser(SysUser gmUser)
    {
        this.gmUser = gmUser;
        this.gmUserName = gmUser == null ? "" : gmUser.getNickName();
    }

    public SysUser getGmUser()
    {
        return gmUser;
    }
    public void setSubAmount(BigDecimal subAmount) { this.subAmount = subAmount; }

    public BigDecimal getSubAmount()
    {
        return subAmount;
    }
    public void setBorrowAmount(BigDecimal borrowAmount)
    {
        this.borrowAmount = borrowAmount;
    }

    public BigDecimal getBorrowAmount()
    {
        return borrowAmount;
    }
    public void setSettleAmount(BigDecimal settleAmount)
    {
        this.settleAmount = settleAmount;
    }

    public BigDecimal getSettleAmount()
    {
        return settleAmount;
    }

    public void setBudgetAmount(BigDecimal budgetAmount)
    {
        this.budgetAmount = budgetAmount;
    }

    public BigDecimal getBudgetAmount()
    {
        return budgetAmount;
    }

    public void setQueryString(String queryString)
    {
        this.queryString = queryString;
    }

    public String getQueryString()
    {
        return queryString;
    }

    public void setContractWork(CmcContractWork contractWork)
    {
        this.contractWork = contractWork;
        this.content = contractWork == null ? "" : contractWork.getContent();
    }

    public CmcContractWork getContractWork()
    {
        return contractWork;
    }

    public void setContent(String content)
    {
        this.content = content;
    }

    public String getContent()
    {
        return content;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("contractId", getContractId())
                .append("contractNumber", getContractNumber())
                .append("amount", getAmount())
                .append("deposit", getDeposit())
                .append("contractDocument", getContractDocument())
                .append("drafter", getDrafter())
                .append("draftTime", getDraftTime())
                .append("remark", getRemark())
                .append("signDate", getSignDate())
                .append("signRemark", getSignRemark())
                .append("signScan", getSignScan())
                .append("commentType", getCommentType())
                .append("managerComment", getManagerComment())
                .append("managerUserId", getManagerUserId())
                .append("managerTime", getManagerTime())
                .toString();
    }
}
