| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485 |
- package org.dromara.crm.domain.vo;
- import cn.idev.excel.annotation.ExcelProperty;
- import io.github.linpeilie.annotations.AutoMapper;
- import lombok.Data;
- import org.dromara.common.excel.annotation.ExcelDictFormat;
- import org.dromara.common.excel.convert.ExcelDictConvert;
- import org.dromara.common.translation.annotation.Translation;
- import org.dromara.common.translation.constant.TransConstant;
- import org.dromara.crm.domain.CrmContract;
- import com.fasterxml.jackson.annotation.JsonFormat;
- import java.io.Serial;
- import java.io.Serializable;
- import java.math.BigDecimal;
- import java.time.LocalDate;
- import java.time.LocalDateTime;
- import java.util.Date;
- import java.util.List;
- /**
- * CRM合同视图对象 crm_contract
- *
- * @author AI Assistant
- * @date 2025-10-04
- */
- @Data
- @AutoMapper(target = CrmContract.class)
- public class CrmContractVo implements Serializable {
- @Serial
- private static final long serialVersionUID = 1L;
- /**
- * 主键ID
- */
- @ExcelProperty(value = "ID")
- private Long id;
- /**
- * 合同编号
- */
- @ExcelProperty(value = "合同编号")
- private String contractNo;
- /**
- * 合同名称
- */
- @ExcelProperty(value = "合同名称")
- private String contractName;
- /**
- * 客户ID
- */
- private Long customerId;
- /**
- * 客户名称
- */
- @ExcelProperty(value = "客户名称")
- private String customerName;
- /**
- * 商机ID
- */
- private Long opportunityId;
- /**
- * 报价单ID
- */
- private Long quoteId;
- /**
- * 原合同ID(续签时关联)
- */
- private Long parentContractId;
- /**
- * 续签次数
- */
- @ExcelProperty(value = "续签次数")
- private Integer renewalCount;
- /**
- * 合同模板ID
- */
- private Long templateId;
- /**
- * 合同模版
- */
- @ExcelProperty(value = "合同模版", converter = ExcelDictConvert.class)
- @ExcelDictFormat(dictType = "crm_contract_template")
- private String contractTemplate;
- /**
- * 联系人ID
- */
- private Long contactId;
- /**
- * 联系人姓名
- */
- @ExcelProperty(value = "联系人")
- private String contactName;
- /**
- * 联系人手机
- */
- private String contactMobile;
- /**
- * 合同类型
- */
- @ExcelProperty(value = "合同类型", converter = ExcelDictConvert.class)
- @ExcelDictFormat(dictType = "crm_contract_type")
- private String contractType;
- /**
- * 合同性质
- */
- @ExcelProperty(value = "合同性质", converter = ExcelDictConvert.class)
- @ExcelDictFormat(dictType = "crm_contract_nature")
- private String contractNature;
- /**
- * 合同金额
- */
- @ExcelProperty(value = "合同金额")
- private BigDecimal amount;
- /**
- * 币种
- */
- @ExcelProperty(value = "币种", converter = ExcelDictConvert.class)
- @ExcelDictFormat(dictType = "crm_currency")
- private String currency;
- /**
- * 税率(%)
- */
- @ExcelProperty(value = "税率(%)")
- private BigDecimal taxRate;
- /**
- * 含税金额
- */
- @ExcelProperty(value = "含税金额")
- private BigDecimal amountWithTax;
- /**
- * 签订日期
- */
- @ExcelProperty(value = "签订日期")
- private LocalDate signDate;
- /**
- * 实际签订日期
- */
- @ExcelProperty(value = "实际签订日期")
- private LocalDate actualSignDate;
- /**
- * 开始日期
- */
- @ExcelProperty(value = "开始日期")
- private LocalDate startDate;
- /**
- * 结束日期
- */
- @ExcelProperty(value = "结束日期")
- private LocalDate endDate;
- /**
- * 合同期限(月)
- */
- @ExcelProperty(value = "合同期限(月)")
- private Integer contractPeriod;
- /**
- * 合同状态
- */
- @ExcelProperty(value = "合同状态", converter = ExcelDictConvert.class)
- @ExcelDictFormat(dictType = "crm_contract_status")
- private String status;
- /**
- * 履约状态
- */
- @ExcelProperty(value = "履约状态", converter = ExcelDictConvert.class)
- @ExcelDictFormat(dictType = "crm_performance_status")
- private String performanceStatus;
- /**
- * 履约完成度(%)
- */
- @ExcelProperty(value = "履约完成度(%)")
- private BigDecimal performanceRate;
- /**
- * 客户满意度(1-5星)
- */
- @ExcelProperty(value = "客户满意度")
- private Integer customerSatisfaction;
- /**
- * 审批状态
- */
- @ExcelProperty(value = "审批状态", converter = ExcelDictConvert.class)
- @ExcelDictFormat(dictType = "crm_contract_approval_status")
- private String approvalStatus;
- /**
- * 审批流程ID
- */
- private Long approvalFlowId;
- /**
- * 合同文件路径
- */
- private String contractFile;
- /**
- * 附件文件
- */
- private String attachmentFiles;
- /**
- * 负责人ID
- */
- private Long ownerUserId;
- /**
- * 负责人姓名
- */
- @ExcelProperty(value = "负责人")
- private String ownerUserName;
- /**
- * 已回款金额
- */
- @ExcelProperty(value = "已回款金额")
- private BigDecimal receivedAmount;
- /**
- * 未回款金额
- */
- @ExcelProperty(value = "未回款金额")
- private BigDecimal unreceivedAmount;
- /**
- * 已开票金额
- */
- @ExcelProperty(value = "已开票金额")
- private BigDecimal invoiceAmount;
- /**
- * 未开票金额
- */
- @ExcelProperty(value = "未开票金额")
- private BigDecimal uninvoiceAmount;
- /**
- * 甲方
- */
- @ExcelProperty(value = "甲方")
- 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;
- /**
- * 供方主体名称(冗余字段,用于显示)
- */
- private String supplierName;
- /**
- * 结算方式(arrive_payment-货到付款/advance_payment-款到发货)
- */
- private String settlementMethod;
- /**
- * 乙方
- */
- @ExcelProperty(value = "乙方")
- private String partyB;
- /**
- * 乙方地址
- */
- private String partyBAddress;
- /**
- * 乙方联系人
- */
- private String partyBContact;
- /**
- * 乙方联系电话
- */
- private String partyBMobile;
- /**
- * 乙方法定代表人
- */
- @ExcelProperty(value = "乙方法定代表人")
- private String partyBLegalPerson;
- /**
- * 乙方代理人
- */
- @ExcelProperty(value = "乙方代理人")
- private String partyBAgent;
- /**
- * 乙方电话/传真
- */
- @ExcelProperty(value = "乙方电话/传真")
- private String partyBPhoneFax;
- /**
- * 乙方开户银行
- */
- @ExcelProperty(value = "乙方开户银行")
- private String partyBBank;
- /**
- * 乙方银行账号
- */
- @ExcelProperty(value = "乙方银行账号")
- private String partyBAccount;
- /**
- * 付款条款
- */
- private String paymentTerms;
- /**
- * 交付条款
- */
- private String deliveryTerms;
- /**
- * 合同条款
- */
- private String contractTerms;
- /**
- * 作废原因
- */
- private String invalidReason;
- /**
- * 作废时间
- */
- private LocalDateTime invalidTime;
- /**
- * 创建部门
- */
- private Long createDept;
- /**
- * 创建部门名称
- */
- @Translation(type = TransConstant.DEPT_ID_TO_NAME, mapper = "createDept")
- @ExcelProperty(value = "创建部门")
- private String createDeptName;
- /**
- * 创建者
- */
- private Long createBy;
- /**
- * 创建者昵称
- */
- @Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "createBy")
- @ExcelProperty(value = "创建人")
- private String createByName;
- /**
- * 创建时间
- */
- @ExcelProperty(value = "创建时间")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
- private Date createTime;
- /**
- * 更新者
- */
- private Long updateBy;
- /**
- * 更新者昵称
- */
- @Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "updateBy")
- @ExcelProperty(value = "更新人")
- private String updateByName;
- /**
- * 更新时间
- */
- @ExcelProperty(value = "更新时间")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
- private Date updateTime;
- /**
- * 合同模板内容(富文本HTML)
- */
- private String templateContent;
- /**
- * 第五条结算方式草稿(按结算方式区分的JSON)
- */
- private String settlementClauseDrafts;
- /**
- * 备注
- */
- @ExcelProperty(value = "备注")
- private String remark;
- /**
- * 当前用户是否可以审批(前端使用,非数据库字段)
- */
- private Boolean canApprove;
- /**
- * 合同产品明细列表(非数据库字段,查询时关联)
- */
- private List<CrmContractProductVo> products;
- public List<CrmContractProductVo> getProducts() {
- return products;
- }
- public void setProducts(List<CrmContractProductVo> products) {
- this.products = products;
- }
- }
|