:feat: 合同特批结果定时查询兜底并同步更新设计文档

- HcsPushTask 合同任务每轮附带 syncProcessingSpecResults:扫描特批中(processing)合同调 C103-4 详情,fdApprovalStatus=approved/approvalinvalid 联动恢复/驳回,作为合规回调未达时的补偿
- 更新 2026-10-12 特批流程梳理文档:状态机、阶段 B/C/D、§五机制汇总、§六配置、§七常量对齐当前实现
- 2026-10-09 前端接入设计文档标注 spec-apply 失效说明
This commit is contained in:
刘泉佳
2026-10-13 18:36:38 +08:00
parent 68885ab31e
commit 08e07841b5
3 changed files with 69 additions and 59 deletions
@@ -42,6 +42,7 @@ import org.springblade.transport.pojo.entity.InvoiceApplication;
import org.springblade.transport.pojo.entity.InvoiceReceipt;
import org.springblade.transport.pojo.entity.PaymentApplication;
import org.springblade.transport.pojo.entity.ProjectApply;
import org.springblade.transport.support.hcs.HcsContractSpecSyncSupport;
import org.springblade.transport.support.hcs.HcsContractSyncSupport;
import org.springblade.transport.support.hcs.HcsInvoiceRegSyncSupport;
import org.springblade.transport.support.hcs.HcsPaymentSyncSupport;
@@ -104,6 +105,7 @@ public class HcsPushTask {
private final InvoiceReceiptMapper invoiceReceiptMapper;
private final HcsProjectSyncSupport hcsProjectSyncSupport;
private final HcsContractSyncSupport hcsContractSyncSupport;
private final HcsContractSpecSyncSupport hcsContractSpecSyncSupport;
private final HcsPaymentSyncSupport hcsPaymentSyncSupport;
private final HcsInvoiceRegSyncSupport hcsInvoiceRegSyncSupport;
private final HcsReceiptBillSyncSupport hcsReceiptBillSyncSupport;
@@ -149,11 +151,19 @@ public class HcsPushTask {
/**
* 合同(C103)定时推送:扫描审批通过且待同步/待补偿的合同(含风险校验→附件转传→C103-1→履约规则 C103-9 行级同步),
* 独立开关与 cron 调度
* 并对特批中(processing)的合同做 C103-4 结果查询兜底,独立开关与 cron 调度
*/
@Scheduled(cron = "${thirdParty.hcs.push.contract.cron:0 1/5 * * * ?}")
public void pushHcsContract() {
this.runOnce("合同", HcsSyncConstant.BIZ_TYPE_CONTRACT, contractSyncEnabled, this::pushUnsyncedContracts);
this.runOnce("合同", HcsSyncConstant.BIZ_TYPE_CONTRACT, contractSyncEnabled, this::syncHcsContracts);
}
/**
* 合同链路组合动作:待同步合同推送 + 特批结果查询兜底(合规推送 contractLegal/result 未达时 C103-4 轮询联动)
*/
private String syncHcsContracts() {
String pushSummary = this.pushUnsyncedContracts();
return pushSummary + ";" + hcsContractSpecSyncSupport.syncProcessingSpecResults();
}
/**