李白
1 天以前 a0a32468bd6f5e887938674d3c2cf70cc2f555b8
platformx-business-finance-api/src/main/java/com/by4cloud/platformx/business/entity/ContractPaymentSchedule.java
@@ -6,9 +6,11 @@
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 lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
@@ -23,7 +25,9 @@
 */
@Data
@Entity
@Table(appliesTo = "contract_payment_schedule", comment = "合同收款计划/履约节点表")
@Table(name = "contract_payment_schedule")
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class ContractPaymentSchedule extends BaseModel<ContractPaymentSchedule> {
    // ==================== 关联信息 ====================
@@ -69,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;
    // ==================== 时序控制 ====================
@@ -86,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 '约定天数'")