| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374 |
- package org.dromara.crm.domain;
- import com.baomidou.mybatisplus.annotation.*;
- import lombok.Data;
- import lombok.EqualsAndHashCode;
- import org.dromara.common.tenant.core.TenantEntity;
- import java.io.Serial;
- import java.math.BigDecimal;
- import java.time.LocalDate;
- import java.time.LocalDateTime;
- /**
- * CRM合同对象 crm_contract
- *
- * @author AI Assistant
- * @date 2025-10-04
- */
- @Data
- @EqualsAndHashCode(callSuper = true)
- @TableName("crm_contract")
- public class CrmContract extends TenantEntity {
- @Serial
- private static final long serialVersionUID = 1L;
- /**
- * 主键ID
- */
- @TableId(value = "id", type = IdType.ASSIGN_ID)
- private Long id;
- /**
- * 合同编号(SX/X-JT+yyyyMMdd+3位流水号,示例:SX/X-JT20250926002)
- */
- private String contractNo;
- /**
- * 合同名称
- */
- private String contractName;
- /**
- * 客户ID
- */
- private Long customerId;
- /**
- * 客户名称(冗余字段)
- */
- private String customerName;
- /**
- * 商机ID
- */
- private Long opportunityId;
- /**
- * 报价单ID
- */
- private Long quoteId;
- /**
- * 原合同ID(续签时关联)
- */
- private Long parentContractId;
- /**
- * 续签次数
- */
- private Integer renewalCount;
- /**
- * 合同模板ID
- */
- private Long templateId;
- /**
- * 合同模版(shanxia-山峡模版/customer-客户模版)
- */
- private String contractTemplate;
- /**
- * 联系人ID
- */
- private Long contactId;
- /**
- * 联系人姓名(冗余字段)
- */
- private String contactName;
- /**
- * 联系人手机(冗余字段)
- */
- private String contactMobile;
- /**
- * 合同类型(sale-销售合同/service-服务合同/lease-租赁合同/other-其他)
- */
- private String contractType;
- /**
- * 合同性质(new-新签/renewal-续签/change-变更)
- */
- private String contractNature;
- /**
- * 合同金额
- */
- private BigDecimal amount;
- /**
- * 币种(CNY-人民币/USD-美元/EUR-欧元)
- */
- private String currency;
- /**
- * 税率(%)
- */
- private BigDecimal taxRate;
- /**
- * 含税金额
- */
- private BigDecimal amountWithTax;
- /**
- * 签订日期
- */
- private LocalDate signDate;
- /**
- * 实际签订日期
- */
- private LocalDate actualSignDate;
- /**
- * 开始日期
- */
- private LocalDate startDate;
- /**
- * 结束日期
- */
- private LocalDate endDate;
- /**
- * 合同期限(月)
- */
- private Integer contractPeriod;
- /**
- * 合同状态(draft-草稿/approving-审批中/approved-已审批/executing-执行中/finished-已完成/invalid-已作废)
- */
- private String status;
- /**
- * 履约状态(normal-正常/delayed-延期/abnormal-异常/completed-已完成)
- */
- private String performanceStatus;
- /**
- * 履约完成度(%)
- */
- private BigDecimal performanceRate;
- /**
- * 客户满意度(1-5星)
- */
- private Integer customerSatisfaction;
- /**
- * 审批状态(pending-待审批/approved-已通过/rejected-已驳回)
- */
- private String approvalStatus;
- /**
- * 审批流程ID(关联工作流)
- */
- private Long approvalFlowId;
- /**
- * 合同文件路径(扫描件或电子版)
- */
- private String contractFile;
- /**
- * 附件文件(多个文件用逗号分隔)
- */
- private String attachmentFiles;
- /**
- * 负责人ID
- */
- private Long ownerUserId;
- /**
- * 负责人姓名(冗余字段)
- */
- private String ownerUserName;
- /**
- * 已回款金额
- */
- private BigDecimal receivedAmount;
- /**
- * 未回款金额
- */
- private BigDecimal unreceivedAmount;
- /**
- * 已开票金额
- */
- private BigDecimal invoiceAmount;
- /**
- * 未开票金额
- */
- private BigDecimal uninvoiceAmount;
- /**
- * 甲方(客户方)
- */
- private String partyA;
- /**
- * 甲方地址
- */
- private String partyAAddress;
- /**
- * 甲方联系人
- */
- private String partyAContact;
- /**
- * 甲方联系电话
- */
- private String partyAMobile;
- /**
- * 甲方法定代表人
- */
- private String partyALegalPerson;
- /**
- * 甲方代理人
- */
- private String partyAAgent;
- /**
- * 甲方电话/传真
- */
- private String partyAPhoneFax;
- /**
- * 甲方开户银行
- */
- private String partyABank;
- /**
- * 甲方银行账号
- */
- private String partyAAccount;
- /**
- * 供方主体ID(关联crm_supplier_info表)
- */
- private Long supplierId;
- /**
- * 结算方式(arrive_payment-货到付款/advance_payment-款到发货)
- */
- private String settlementMethod;
- /**
- * 乙方(我方)
- */
- private String partyB;
- /**
- * 乙方地址
- */
- private String partyBAddress;
- /**
- * 乙方联系人
- */
- private String partyBContact;
- /**
- * 乙方联系电话
- */
- private String partyBMobile;
- /**
- * 乙方法定代表人
- */
- private String partyBLegalPerson;
- /**
- * 乙方代理人
- */
- private String partyBAgent;
- /**
- * 乙方电话/传真
- */
- private String partyBPhoneFax;
- /**
- * 乙方开户银行
- */
- private String partyBBank;
- /**
- * 乙方银行账号
- */
- private String partyBAccount;
- /**
- * 付款条款
- */
- private String paymentTerms;
- /**
- * 交付条款
- */
- private String deliveryTerms;
- /**
- * 合同条款
- */
- private String contractTerms;
- /**
- * 作废原因
- */
- private String invalidReason;
- /**
- * 作废时间
- */
- private LocalDateTime invalidTime;
- /**
- * 逻辑删除标志(0存在 1删除)
- */
- @TableLogic
- private Integer delFlag;
- /**
- * 版本号
- */
- @Version
- private Integer version;
- /**
- * 合同模板内容(富文本HTML)
- */
- private String templateContent;
- /**
- * 第五条结算方式草稿(按结算方式区分的JSON)
- */
- private String settlementClauseDrafts;
- /**
- * 备注
- */
- private String remark;
- }
|