feat: HCS履约规则数据层与表单维护(blade_contract_exe_stage表/行级差异标记维护接口/合同审批置行待同步)

This commit is contained in:
刘泉佳
2026-09-27 23:27:29 +08:00
parent eaab17b220
commit 892035ee6f
7 changed files with 512 additions and 0 deletions
@@ -0,0 +1,101 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.transport.pojo.entity;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import java.io.Serial;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* 合同履约规则实体类(HCS 履约阶段,设计文档 §4.1,ADR-0002)
* <p>
* 合同维度的资金计划阶段,C103-9 行级同步的数据源:合同审批通过置 row_op=add,
* 后续编辑按行差异置 add/update/delete,由扫描任务随合同链路同步;
* 合规返回的阶段ID 必须持久化(hcsStageFdId),行更新/删除全靠它。
*
* @author Chill
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("blade_contract_exe_stage")
@Schema(description = "合同履约规则(HCS 履约阶段)")
public class HcsContractExeStage extends TenantEntity {
@Serial
private static final long serialVersionUID = 1L;
@JsonSerialize(using = ToStringSerializer.class)
@Schema(description = "合同ID")
private Long contractId;
@Schema(description = "履约类型 payment=付款/collection=收款")
private String performType;
@Schema(description = "款项性质 prepayment/progress/acceptance/retention")
private String fundNature;
@Schema(description = "计划金额(元)")
private BigDecimal fundAmount;
@Schema(description = "计划资金日期")
private LocalDateTime fundDate;
@Schema(description = "开票规则(如 payFirst)")
private String invoiceRule;
@Schema(description = "账期")
private Integer invoiceCycle;
@Schema(description = "金额类型")
private String fundType;
@Schema(description = "是否完成")
private Integer isFinish;
@Schema(description = "行级同步操作 none/add/update/delete")
private String rowOp;
@Schema(description = "合规阶段ID(C103-9 返回,update/delete 必用)")
private String hcsStageFdId;
@Schema(description = "同步状态 unsynced/synced/failed")
private String hcsSyncStatus;
@Schema(description = "同步结果信息/失败原因")
@TableField(insertStrategy = FieldStrategy.ALWAYS, updateStrategy = FieldStrategy.ALWAYS)
private String hcsSyncMsg;
}