From 338b0f4b9e8ece54f855dd5dcd10bb133b633d7b Mon Sep 17 00:00:00 2001 From: yefei Date: Wed, 18 Oct 2023 11:34:44 +0800 Subject: [PATCH] =?UTF-8?q?ariesy=20=E5=A2=9E=E5=8A=A0throw?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dxhy/core/job/service/InvoiceInterfaceService.java | 2 +- .../job/service/impl/InvoiceInterfaceServiceImpl.java | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/dxhy-core/src/main/java/com/dxhy/core/job/service/InvoiceInterfaceService.java b/dxhy-core/src/main/java/com/dxhy/core/job/service/InvoiceInterfaceService.java index fa1745d6..a126afac 100644 --- a/dxhy-core/src/main/java/com/dxhy/core/job/service/InvoiceInterfaceService.java +++ b/dxhy-core/src/main/java/com/dxhy/core/job/service/InvoiceInterfaceService.java @@ -48,7 +48,7 @@ public interface InvoiceInterfaceService { * @param aceKey * @return void */ - void sendSelectRequest(String string, String db, String aceId, String aceKey); + void sendSelectRequest(String string, String db, String aceId, String aceKey) throws Exception; /** * 获取税号 diff --git a/dxhy-core/src/main/java/com/dxhy/core/job/service/impl/InvoiceInterfaceServiceImpl.java b/dxhy-core/src/main/java/com/dxhy/core/job/service/impl/InvoiceInterfaceServiceImpl.java index 2b61b0d7..b7dab1ff 100644 --- a/dxhy-core/src/main/java/com/dxhy/core/job/service/impl/InvoiceInterfaceServiceImpl.java +++ b/dxhy-core/src/main/java/com/dxhy/core/job/service/impl/InvoiceInterfaceServiceImpl.java @@ -11,11 +11,7 @@ import java.util.*; import javax.annotation.Resource; import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; - -import com.dxhy.core.job.thread.InvoiceParseHandle; import org.apache.commons.lang.StringUtils; -import org.redisson.api.RLock; -import org.redisson.api.RedissonClient; import org.springframework.beans.factory.annotation.Value; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.stereotype.Service; @@ -40,6 +36,7 @@ import com.dxhy.core.rabbitmq.Sender; import cn.hutool.core.codec.Base64; import cn.hutool.http.HttpUtil; import lombok.extern.slf4j.Slf4j; +import org.springframework.transaction.annotation.Transactional; /** * 功能描述 @@ -531,7 +528,7 @@ public class InvoiceInterfaceServiceImpl implements InvoiceInterfaceService { */ @Override @Transactional(rollbackFor = Exception.class) - public void sendSelectRequest(String taxno, String db, String aceId, String aceKey) { + public void sendSelectRequest(String taxno, String db, String aceId, String aceKey) throws Exception { // 请求通用头 GlobalInfo globalInfo = new GlobalInfo(); // 请求通用 @@ -615,7 +612,7 @@ public class InvoiceInterfaceServiceImpl implements InvoiceInterfaceService { } catch (Exception e) { e.printStackTrace(); - + throw new Exception(e); } }