From 4bec639a233c8d3cdb4a1536962c8f14c2f5322f Mon Sep 17 00:00:00 2001 From: ouyangxq <775153912@qq.com> Date: Sun, 27 Sep 2026 20:48:18 +0800 Subject: [PATCH] fix(firstleg): open declaration batch after broker execution --- .../customs/container/service/ContainerCustomsService.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/firstleg/src/main/java/com/baiyue/firstleg/customs/container/service/ContainerCustomsService.java b/firstleg/src/main/java/com/baiyue/firstleg/customs/container/service/ContainerCustomsService.java index e6f32f784..8d7997b84 100644 --- a/firstleg/src/main/java/com/baiyue/firstleg/customs/container/service/ContainerCustomsService.java +++ b/firstleg/src/main/java/com/baiyue/firstleg/customs/container/service/ContainerCustomsService.java @@ -323,10 +323,9 @@ public class ContainerCustomsService { CommandRow replay = claim(operatorId, action, key, requestHash); if (replay != null) return declarationBatchView(mapper.declarationBatch(replay.resultId())); ContainerRow container = mapper.lockContainer(planId); - if (container == null || !COMPLETED.equals(container.status())) throw conflict("报关完税文件未全部完成,不能创建正式申报批次"); + if (container == null || !(DECLARING.equals(container.status()) || COMPLETED.equals(container.status()))) throw conflict("当前柜尚未进入报关行执行阶段,不能创建正式申报批次"); if (mapper.taxRefundCount(planId) == 0) throw conflict("全买单柜不创建退税正式申报批次"); - if (mapper.missingFinalCount(container.id()) != 0 || mapper.unconfirmedReceiptCount(container.id()) != 0 - || mapper.brokerSubmittedAt(container.id()) == null) { + if (mapper.unconfirmedReceiptCount(container.id()) != 0 || mapper.brokerSubmittedAt(container.id()) == null) { throw conflict("当前柜尚未完成退税资料、回执确认和报关行执行"); } if (!Objects.equals(container.version(), request.expectedVersion())) throw concurrent();