| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.by4cloud.platformx.common.data.mybatis.BaseModel; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import jakarta.persistence.Column; |
| | | import jakarta.persistence.Entity; |
| | | import jakarta.persistence.Table; |
| | | import jakarta.persistence.Transient; |
| | | import lombok.Data; |
| | | import org.hibernate.annotations.Table; |
| | | |
| | | import javax.persistence.Transient; |
| | | import java.math.BigDecimal; |
| | | |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.ToString; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author cd |
| | | * @description |
| | | * @description 合同管理 |
| | | * @date 2026/4/29 10:51 |
| | | **/ |
| | | @Data |
| | | @Entity |
| | | @Table(appliesTo = "contract", comment = "合同管理") |
| | | @Table(name = "contract") |
| | | @ToString(callSuper = true) |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class Contract extends BaseModel<Contract> { |
| | | |
| | | |
| | |
| | | private String contractName; |
| | | |
| | | @Schema(description = "甲方id") |
| | | @Column(columnDefinition = "bigint comment '甲方id'") |
| | | @Column(name = "party_a_id",columnDefinition = "bigint comment '甲方id'") |
| | | private Long partyAId; |
| | | |
| | | @Schema(description = "甲方名称") |
| | | @Column(columnDefinition = "VARCHAR(100) comment '甲方名称'") |
| | | @Column(name = "party_a",columnDefinition = "VARCHAR(100) comment '甲方名称'") |
| | | private String partyA; |
| | | |
| | | @Schema(description = "乙方id") |
| | | @Column(columnDefinition = "VARCHAR(100) comment '乙方id'") |
| | | private String partyBId; |
| | | @Column(name = "party_b_id",columnDefinition = "bigint comment '乙方id'") |
| | | private Long partyBId; |
| | | |
| | | @Schema(description = "乙方名称") |
| | | @Column(columnDefinition = "VARCHAR(100) comment '乙方名称'") |
| | | @Column(name = "party_b",columnDefinition = "VARCHAR(100) comment '乙方名称'") |
| | | private String partyB; |
| | | |
| | | @Schema(description = "合同金额") |
| | | @Column(columnDefinition = "double comment '合同金额'") |
| | | private Double amount; |
| | | @Column(columnDefinition = "decimal(10,2) comment '合同金额'") |
| | | private BigDecimal amount; |
| | | |
| | | @Schema(description = "币种(CNY/USD等)") |
| | | @Column(columnDefinition = "VARCHAR(10) default 'CNY' comment '币种'") |
| | |
| | | @Column(columnDefinition = "tinyint(2) default 0 comment '合同类型'") |
| | | private Integer contractType; |
| | | |
| | | @Schema(description = "供应属性 0-成品 1-备件 2-大修 3-其他") |
| | | @Column(columnDefinition = "varchar(16) default 0 comment '供应属性 0-成品 1-备件 2-大修 3-其他'") |
| | | private String supplyAttribute; |
| | | |
| | | @Schema(description = "合同状态(0-草稿 1-已生效 2-已终止 3-已过期)") |
| | | @Column(columnDefinition = "tinyint(2) default 0 comment '合同状态'") |
| | | private Integer contractStatus; |
| | |
| | | @Column(columnDefinition = "tinyint(2) default 0 comment '合同服务属性'") |
| | | private Integer contractAttribute; |
| | | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Schema(description = "签署日期") |
| | | @Column(columnDefinition = "VARCHAR(64) comment '签署日期'") |
| | | private String signDate; |
| | | @Column(columnDefinition = "date comment '签署日期'") |
| | | private Date signDate; |
| | | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | @Schema(description = "签订地点") |
| | | @Column(columnDefinition = "VARCHAR(255) comment '签订地点'") |
| | | private String signPlace; |
| | | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Schema(description = "生效日期") |
| | | @Column(columnDefinition = "VARCHAR(64) comment '生效日期'") |
| | | private String effectiveDate; |
| | | @Column(columnDefinition = "date comment '生效日期'") |
| | | private Date effectiveDate; |
| | | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | @Schema(description = "交付周期") |
| | | @Column(columnDefinition = "int default 0 comment '交付周期 /机械厂销售合同(月)'") |
| | | private Integer deliveryCycle; |
| | | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Schema(description = "到期日期") |
| | | @Column(columnDefinition = "VARCHAR(64) comment '到期日期'") |
| | | private String expirationDate; |
| | | @Column(columnDefinition = "date comment '到期日期'") |
| | | private Date expirationDate; |
| | | |
| | | @Schema(description = "合同附件URL") |
| | | @Column(columnDefinition = "VARCHAR(500) comment '合同附件URL'") |
| | | private String attachmentUrl; |
| | | |
| | | @Schema(description = "合同附件名称") |
| | | @Column(columnDefinition = "VARCHAR(100) comment '合同附件名称'") |
| | | private String attachmentName; |
| | | |
| | | @Schema(description = "人员编号") |
| | | @Column(columnDefinition = "VARCHAR(100) comment '人员编号'") |
| | | private String nickName; |
| | | |
| | | @Schema(description = "备注") |
| | | @Column(columnDefinition = "TEXT comment '备注'") |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | @Schema(description = "审批时间") |
| | | @Column(columnDefinition = "datetime comment '审批时间'") |
| | | private String approveTime; |
| | | private Date approveTime; |
| | | |
| | | /** |
| | | * 临时字段 - 用于接收审批人名称等关联查询结果 |
| | | */ |
| | | @Transient |
| | | @TableField(exist = false) |
| | | private String approverName; |
| | | @Schema(description = "到货节点ID") |
| | | @Column(columnDefinition = "bigint comment '到货节点ID'") |
| | | private Long arrivalScheduleId; |
| | | |
| | | /** |
| | | * 临时字段 - 合同剩余天数 |
| | | */ |
| | | @Transient |
| | | @TableField(exist = false) |
| | | @Schema(description = "合同剩余天数(临时字段)") |
| | | private Long remainingDays; |
| | | @Schema(description = "验收节点ID") |
| | | @Column(columnDefinition = "bigint comment '验收节点ID'") |
| | | private Long acceptScheduleId; |
| | | |
| | | @Schema(description = "质保节点ID") |
| | | @Column(columnDefinition = "bigint comment '质保节点ID'") |
| | | private Long warrantyScheduleId; |
| | | |
| | | @Schema(description = "erp推送标识") |
| | | @Column(columnDefinition = "char comment 'erp推送标识 0 未推 1 已推'") |
| | | private String erpPushFlag; |
| | | |
| | | @Schema(description = "开票状态") |
| | | @Column(columnDefinition = "char comment '开票状态 1 待开 2 可开 3 完成'") |
| | | private String billingStatus; |
| | | |
| | | @Schema(description = "已开票金额") |
| | | @Column(columnDefinition = "decimal(10,2) comment '已开票金额'") |
| | | private BigDecimal billingAmout; |
| | | |
| | | @Schema(description = "下一阶段") |
| | | @Column(columnDefinition = "VARCHAR(128) comment '下一阶段'") |
| | | private String nextScheduleName; |
| | | |
| | | @Schema(description = "模版ID") |
| | | @Column(columnDefinition = "bigint comment '模版ID'") |
| | | private Long templateId; |
| | | |
| | | @Schema(description = "销售模式") |
| | | @Column(columnDefinition = "VARCHAR(16) comment '销售模式 1 按单生产 2 先产后销 3 代储代销'") |
| | | private String salesModel; |
| | | |
| | | @Schema(description = "已付款金额") |
| | | @Column(columnDefinition = "decimal(10,2) comment '已付款金额'") |
| | | private BigDecimal paidAmount; |
| | | |
| | | @Schema(description = "合同分类") |
| | | @Column(columnDefinition = "VARCHAR(64) comment '合同分类 water_house 水电房屋租赁'") |
| | | private String contractCategory; |
| | | |
| | | @Schema(description = "执行周期") |
| | | @Column(columnDefinition = "char comment '执行周期 1/周 2/月 3/季度 4/半年 5/年'") |
| | | private String execFrequency; |
| | | |
| | | @Schema(description = "执行次数") |
| | | @Column(columnDefinition = "int comment '执行次数'") |
| | | private Integer execTimes; |
| | | |
| | | @Schema(description = "执行日期后多少天生成应收") |
| | | @Column(columnDefinition = "int comment '执行日期后多少天生成应收'") |
| | | private Integer execDay; |
| | | |
| | | @Schema(description = "环境") |
| | | @Column(columnDefinition = "VARCHAR(128) comment '环境 一煤机采购合同用'") |
| | | private String environment; |
| | | |
| | | @Schema(description = "标准") |
| | | @Column(columnDefinition = "VARCHAR(128) comment '标准 一煤机采购合同用/机械厂销售合同'") |
| | | private String standard; |
| | | |
| | | @Schema(description = "质保期 使用月数") |
| | | @Column(columnDefinition = "decimal(10,0) comment '质保期 使用月数 一煤机采购合同用/机械厂销售合同'") |
| | | private BigDecimal useMonth; |
| | | |
| | | @Schema(description = "质保期 发货后月数") |
| | | @Column(columnDefinition = "decimal(10,0) comment '质保期 发货后月数 一煤机采购合同用/机械厂销售合同'") |
| | | private BigDecimal afterShipMonth; |
| | | |
| | | @Schema(description = "货运方式") |
| | | @Column(columnDefinition = "VARCHAR(128) comment '货运方式 一煤机采购合同用'") |
| | | private String shipMethod; |
| | | |
| | | @Schema(description = "货运地址") |
| | | @Column(columnDefinition = "VARCHAR(128) comment '货运地址 一煤机采购合同用 /机械厂销售合同'") |
| | | private String shipAddress; |
| | | |
| | | @Schema(description = "包装") |
| | | @Column(columnDefinition = "VARCHAR(128) comment '包装 一煤机采购合同用'") |
| | | private String packaging; |
| | | |
| | | @Schema(description = "维修或换货期限") |
| | | @Column(columnDefinition = "decimal(10,0) comment '维修或换货期限 一煤机采购合同用'") |
| | | private BigDecimal repairPeriod; |
| | | |
| | | @Schema(description = "维修或换货 违约金") |
| | | @Column(columnDefinition = "decimal(10,2) comment '维修或换货 违约金 一煤机采购合同用'") |
| | | private BigDecimal repairBreachAmount; |
| | | |
| | | @Schema(description = "货物数量不足 补货天数") |
| | | @Column(columnDefinition = "decimal(10,0) comment '货物数量不足 补货天数 一煤机采购合同用'") |
| | | private BigDecimal goodsShort; |
| | | |
| | | @Schema(description = "货物数量不足 违约金") |
| | | @Column(columnDefinition = "decimal(10,2) comment '货物数量不足 补货天数 一煤机采购合同用'") |
| | | private BigDecimal goodsShortBreachAmount; |
| | | |
| | | @Schema(description = "每逾期一日,承担本合同总额 违约金") |
| | | @Column(columnDefinition = "decimal(10,2) comment '每逾期一日,承担本合同总额违约金 补货天数 一煤机采购合同用'") |
| | | private BigDecimal overdueBreachAmount; |
| | | |
| | | @Schema(description = "逾期 日以上的,甲方有权解除合同") |
| | | @Column(columnDefinition = "decimal(10,0) comment '逾期 日以上的,甲方有权解除合同 一煤机采购合同用'") |
| | | private BigDecimal terminateContract; |
| | | |
| | | @Schema(description = "双方均可向 人民法院") |
| | | @Column(columnDefinition = "VARCHAR(128) comment '双方均可向 人民法院 一煤机采购合同用'") |
| | | private String court; |
| | | |
| | | @Schema(description = "本合同附件包括:") |
| | | @Column(columnDefinition = "VARCHAR(128) comment '本合同附件包括: 一煤机采购合同用/机械厂销售合同'") |
| | | private String contractAttchment; |
| | | |
| | | @Schema(description = "合同签订市") |
| | | @Column(columnDefinition = "VARCHAR(128) comment '合同签订市 一煤机采购合同用'") |
| | | private String city; |
| | | |
| | | @Schema(description = "合同签订区") |
| | | @Column(columnDefinition = "VARCHAR(128) comment '合同签订区 一煤机采购合同用'") |
| | | private String region; |
| | | |
| | | @Schema(description = "开票通知在 个工作日内") |
| | | @Column(columnDefinition = "decimal(10,0) comment '开票通知在 个工作日内 一煤机采购合同用 /机械厂销售合同'") |
| | | private BigDecimal invoiceNotice; |
| | | |
| | | @Schema(description = "合同总价税率") |
| | | @Column(columnDefinition = "decimal(10,2) comment '开票通知在 个工作日内 一煤机采购合同用'") |
| | | private BigDecimal contractTax; |
| | | |
| | | @Schema(description = "经济事项 bip推送应收用") |
| | | @Column(columnDefinition = "VARCHAR(32) comment '经济事项 bip推送应收用'") |
| | | private String economicMatters; |
| | | |
| | | @Schema(description = "erp合同编号") |
| | | @Column(columnDefinition = "VARCHAR(64) comment 'erp合同编号'") |
| | | private String erpContractNo; |
| | | |
| | | @Schema(description = "石工泵数据ID") |
| | | @Column(columnDefinition = "VARCHAR(128) comment '石工泵数据ID'") |
| | | private String dataId; |
| | | |
| | | @Schema(description = "行业") |
| | | @Column(columnDefinition = "VARCHAR(50) comment '行业'") |
| | | private String industryCode; |
| | | |
| | | @Schema(description = "区域") |
| | | @Column(columnDefinition = "VARCHAR(50) comment '区域'") |
| | | private String areaCode; |
| | | |
| | | @Schema(description = "需方在接到通知后 日内进行检验") |
| | | @Column(columnDefinition = "decimal(10,0) comment '机械厂销售合同 需方在接到通知后 日内进行检验'") |
| | | private BigDecimal inspectDay; |
| | | |
| | | @Schema(description = "收到供方通知后 日内派人验收") |
| | | @Column(columnDefinition = "decimal(10,0) comment '机械厂销售合同 收到供方通知后 日内派人验收'") |
| | | private BigDecimal acceptDay; |
| | | |
| | | @Schema(description = "延验收超过 日") |
| | | @Column(columnDefinition = "decimal(10,0) comment '机械厂销售合同 延验收超过 日'") |
| | | private BigDecimal delayAcceptDay; |
| | | |
| | | @Schema(description = "验收合格后 个工作日") |
| | | @Column(columnDefinition = "decimal(10,0) comment '机械厂销售合同 验收合格后 个工作日'") |
| | | private BigDecimal acceptPassDay; |
| | | |
| | | @Schema(description = "验收合格向供方足额支付合同总价的") |
| | | @Column(columnDefinition = "decimal(10,2) comment '机械厂销售合同 验收合格向供方足额支付合同总价的'") |
| | | private BigDecimal acceptPassAmount; |
| | | |
| | | @Schema(description = "日内开始发货") |
| | | @Column(columnDefinition = "decimal(10,0) comment '机械厂销售合同 日内开始发货'") |
| | | private BigDecimal deliverDay; |
| | | |
| | | @Schema(description = "日内发完") |
| | | @Column(columnDefinition = "decimal(10,0) comment '机械厂销售合同 日内发完'") |
| | | private BigDecimal deliverCompleteDay; |
| | | |
| | | @Schema(description = "供方代理") |
| | | @Column(columnDefinition = "VARCHAR(50) comment '供方代理'") |
| | | private String supplierAgent; |
| | | |
| | | @Schema(description = "供方代理身份证") |
| | | @Column(name = "supplier_agent_id_card",columnDefinition = "VARCHAR(50) comment '供方代理身份证'") |
| | | private String supplierAgentIdCard; |
| | | |
| | | @Schema(description = "需方代理") |
| | | @Column(columnDefinition = "VARCHAR(50) comment '需方代理'") |
| | | private String buyerAgent; |
| | | |
| | | @Schema(description = "需方代理身份证") |
| | | @Column(name = "buyer_agent_id_card",columnDefinition = "VARCHAR(50) comment '需方代理身份证'") |
| | | private String buyerAgentIdCard; |
| | | |
| | | @Schema(description = "代理权限") |
| | | @Column(columnDefinition = "VARCHAR(250) comment '代理权限'") |
| | | private String agentAuthority; |
| | | |
| | | @Schema(description = "需方向供方足额支付预付款") |
| | | @Column(columnDefinition = "decimal(10,2) comment '机械厂销售合同 需方向供方足额支付预付款'") |
| | | private BigDecimal advancePayment; |
| | | |
| | | @Schema(description = "延期支付预付款") |
| | | @Column(columnDefinition = "decimal(10,2) comment '机械厂销售合同 延期支付预付款'") |
| | | private BigDecimal delayPayAdvancePayment; |
| | | |
| | | @Schema(description = "延期支付进度款") |
| | | @Column(columnDefinition = "decimal(10,2) comment '机械厂销售合同 延期支付进度款'") |
| | | private BigDecimal delayPayProcessPayment; |
| | | |
| | | @Schema(description = "收到预付款之日起 个月内未生产完成") |
| | | @Column(columnDefinition = "decimal(10,0) comment '机械厂销售合同 收到预付款之日起 个月内未生产完成'") |
| | | private BigDecimal receiveAdvancePaymentMonth; |
| | | |
| | | @Schema(description = "并提前 各工作日通知需方验收") |
| | | @Column(columnDefinition = "decimal(10,0) comment '机械厂销售合同 并提前 各工作日通知需方验收'") |
| | | private BigDecimal noticeSupplierAcceptDay; |
| | | |
| | | @Schema(description = "每逾期 日") |
| | | @Column(columnDefinition = "decimal(10,0) comment '机械厂销售合同 每逾期 日'") |
| | | private BigDecimal overdueDay; |
| | | |
| | | @Schema(description = "按合同总价的 偿付需方损失") |
| | | @Column(columnDefinition = "decimal(10,2) comment '机械厂销售合同 按合同总价的 偿付需方损失'") |
| | | private BigDecimal lossAmount; |
| | | |
| | | @Schema(description = "违约金最高不超过合同总价的") |
| | | @Column(columnDefinition = "decimal(10,2) comment '机械厂销售合同 违约金最高不超过合同总价的'") |
| | | private BigDecimal liquidatedDamagesHighSupplier; |
| | | |
| | | @Schema(description = "需方如逾期付款每逾期 日") |
| | | @Column(columnDefinition = "decimal(10,0) comment '机械厂销售合同 每逾期 日'") |
| | | private BigDecimal overdueDayXf; |
| | | |
| | | @Schema(description = "需方如逾期付款按合同总价的 偿付需方损失") |
| | | @Column(columnDefinition = "decimal(10,2) comment '机械厂销售合同 按合同总价的 偿付需方损失'") |
| | | private BigDecimal lossAmountXf; |
| | | |
| | | @Schema(description = "违约金最高不超过合同总价的") |
| | | @Column(columnDefinition = "decimal(10,2) comment '机械厂销售合同 违约金最高不超过合同总价的'") |
| | | private BigDecimal liquidatedDamagesHighBuyer; |
| | | |
| | | @Schema(description = "本合同一式 份") |
| | | @Column(columnDefinition = "decimal(10,0) comment '机械厂销售合同 本合同一式 份'") |
| | | private BigDecimal totalParts; |
| | | |
| | | @Schema(description = "供方执 份") |
| | | @Column(columnDefinition = "decimal(10,0) comment '机械厂销售合同 供方执 份'") |
| | | private BigDecimal supplierPart; |
| | | |
| | | @Schema(description = "需方执 份") |
| | | @Column(columnDefinition = "decimal(10,0) comment '机械厂销售合同 需方执 份'") |
| | | private BigDecimal buyerPart; |
| | | |
| | | @Schema(description = "付款方式") |
| | | @Column(columnDefinition = "VARCHAR(50) comment '付款方式'") |
| | | private String paymentMethod; |
| | | |
| | | @Schema(description = "出库金额") |
| | | @Column(columnDefinition = "decimal(10,2) comment '出库金额'") |
| | | private BigDecimal outBoundAmout; |
| | | |
| | | } |