feat: 正式结算单/开票申请同步金蝶后联带锁单,支持解锁回调与金蝶删单还原

This commit is contained in:
刘泉佳
2026-10-09 19:52:15 +08:00
parent 92a975b5e4
commit e08be9a297
12 changed files with 855 additions and 0 deletions
@@ -0,0 +1,87 @@
/**
* 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>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.transport.pojo.entity;
import com.baomidou.mybatisplus.annotation.TableName;
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.time.LocalDateTime;
/**
* 金蝶单据锁定记录实体类
* <p>
* 一行 = 一张金蝶目标单:推送成功后 lockBusiData 锁定(FAILED→LOCKED),金蝶经 unLockNotifyBusiData
* 回调解锁(→UNLOCKED,DELETE 时废除源单并还原关联数据);同时承担当前锁状态(编辑守卫/回调定位)
* 与锁定补偿扫表(FAILED+try_count)、锁定/解锁留痕
*
* @author Chill
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("blade_kingdee_bill_lock")
@Schema(description = "金蝶单据锁定记录")
public class KingdeeBillLock extends TenantEntity {
@Serial private static final long serialVersionUID = 1L;
/**
* WLTMS 单据类型(SETTLEMENT/INVOICE_APPLY,预留 PAY_APPLY/RECEIVED_INVOICE)
*/
private String sourceBillType;
/**
* WLTMS 业务主键
*/
private Long sourceBillId;
/**
* WLTMS 单号(正式结算单号/开票申请单号)
*/
private String sourceBillNo;
/**
* 金蝶单据类型(ApFin_other_BT_S/arfin_other_BT_S/cdm_paybill_bank_elect_BT_S 等固定值)
*/
private String targetBillType;
/**
* 金蝶单据编号(即业务单 kingdeeBillNo,开票申请按发票张次逐张一行)
*/
private String targetBillNo;
/**
* 锁状态:failed-锁定失败(补偿重试对象)/locked-金蝶锁定中/unlocked-已解锁(终态)
*/
private String lockStatus;
/**
* 最近动作来源操作类型:SAVE-单据新增,DELETE-单据删除(DELETE 回调触发废除还原)
*/
private String operationType;
/**
* 锁定重试次数(补偿任务用,超上限停试)
*/
private Integer tryCount;
/**
* 锁定时间
*/
private LocalDateTime lockTime;
/**
* 解锁时间
*/
private LocalDateTime unlockTime;
/**
* 推单发起人(锁定操作人)
*/
private String lockOperator;
/**
* 回调操作人(金蝶侧操作人)
*/
private String notifyOperator;
/**
* 锁定失败原因
*/
private String failReason;
}