shiyunteng
5 天以前 fb9fca375c78c5b79acf6db990357816f86100fb
platformx-business-finance-api/src/main/java/com/by4cloud/platformx/business/entity/ContractPaymentSchedule.java
@@ -13,6 +13,9 @@
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.util.Date;
/**
 * 合同收款计划/履约节点实体类
 * 统一管理合同的收款阶段、履约节点、收款比例及履约时间节点
@@ -70,16 +73,16 @@
    // ==================== 收款比例/金额 ====================
    @Schema(description = "收款比例(%,如30表示30%)(显性要素)")
    @Column(columnDefinition = "double comment '收款比例(%)'")
    private Double paymentRatio;
    @Column(columnDefinition = "decimal(10,2) comment '收款比例(%)'")
    private BigDecimal paymentRatio;
    @Schema(description = "计划收款金额(根据合同总金额*比例自动计算)")
    @Column(columnDefinition = "double comment '计划收款金额'")
    private Double plannedAmount;
    @Column(columnDefinition = "decimal(10,2) comment '计划收款金额'")
    private BigDecimal plannedAmount;
    @Schema(description = "实际收款金额")
    @Column(columnDefinition = "double default 0.00 comment '实际收款金额'")
    private Double actualAmount;
    @Column(columnDefinition = "decimal(10,2) comment '实际收款金额'")
    private BigDecimal actualAmount;
    // ==================== 时序控制 ====================
@@ -87,17 +90,29 @@
    @Column(columnDefinition = "int not null comment '阶段顺序'")
    private Integer stageOrder;
    @Schema(description = "计划收款日期(基于合同签订日期+约定天数计算)")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @Column(columnDefinition = "VARCHAR(64) comment '计划收款日期'")
    private String plannedPaymentDate;
//    @Schema(description = "计划收款日期(基于合同签订日期+约定天数计算)")
//    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
//    @Column(columnDefinition = "date comment '计划收款日期'")
//    private Date plannedPaymentDate;
   @Schema(description = "收款日期")
   @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
   @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
   @Column(columnDefinition = "datetime comment '收款日期'")
   private Date paymentDate;
    @Schema(description = "收款阶段生效日期(隐性要素 - 履约时间起点,即该节点实际达成的日期)")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @Column(columnDefinition = "VARCHAR(64) comment '收款阶段生效日期(履约节点实际达成日期)'")
    private String effectiveDate;
    @Column(columnDefinition = "date comment '收款阶段生效日期(履约节点实际达成日期)'")
    private Date effectiveDate;
   @Schema(description = "收款阶段截止日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @Column(columnDefinition = "date comment '收款阶段截止日期'")
    private Date effectiveEndDate;
    @Schema(description = "约定天数(合同签订后X天内付款/货到后X天内付款等)")
    @Column(columnDefinition = "int default 0 comment '约定天数'")