From 121da2f7adcc8da6ed0f762734809b8b72abe3b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Fri, 1 Dec 2023 11:46:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E7=A8=8E=E4=BA=91=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../taxapiflow/response/QueryAccountBalanceResponse.java | 2 +- .../impl/TaxDeclarationApiFlowStatisticServiceImpl.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/com/engine/salary/entity/taxapiflow/response/QueryAccountBalanceResponse.java b/src/com/engine/salary/entity/taxapiflow/response/QueryAccountBalanceResponse.java index 67779fd42..4c5cb33e3 100644 --- a/src/com/engine/salary/entity/taxapiflow/response/QueryAccountBalanceResponse.java +++ b/src/com/engine/salary/entity/taxapiflow/response/QueryAccountBalanceResponse.java @@ -43,7 +43,7 @@ public class QueryAccountBalanceResponse { /** * 税号 */ - private String taxNumber; + private String taxNum; /** * 已使用流量 */ diff --git a/src/com/engine/salary/service/impl/TaxDeclarationApiFlowStatisticServiceImpl.java b/src/com/engine/salary/service/impl/TaxDeclarationApiFlowStatisticServiceImpl.java index 2a2e51fed..7d09f19f1 100644 --- a/src/com/engine/salary/service/impl/TaxDeclarationApiFlowStatisticServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxDeclarationApiFlowStatisticServiceImpl.java @@ -62,7 +62,7 @@ public class TaxDeclarationApiFlowStatisticServiceImpl extends Service implement return TaxDeclarationApiFlowTotalDTO.builder() .total(apiConfigPO.getTotality()) .remain(apiConfigPO.getRemain()) - .used(apiConfigPO.getTotality() - apiConfigPO.getRemain()) + .used(Long.parseLong(response.getBody().getSurplus())) .lastUpdateTime(SalaryDateUtil.getFormatLocalDateTime(apiConfigPO.getLastUpdateTime())) .build(); } @@ -81,7 +81,7 @@ public class TaxDeclarationApiFlowStatisticServiceImpl extends Service implement log.info("details is empty"); return new ArrayList<>(); } - Set taxCodes = details.stream().map(QueryAccountBalanceResponse.Detail::getTaxNumber).collect(Collectors.toSet()); + Set taxCodes = details.stream().map(QueryAccountBalanceResponse.Detail::getTaxNum).collect(Collectors.toSet()); List returnPOList = getTaxAgentTaxReturnService(user).getByTaxCodes(taxCodes); if (returnPOList.isEmpty()) { log.info("TaxAgentTaxReturnPO is empty"); @@ -98,7 +98,7 @@ public class TaxDeclarationApiFlowStatisticServiceImpl extends Service implement Map> taxCodeMap = returnPOList.stream().collect(Collectors.groupingBy(TaxAgentTaxReturnPO::getTaxCode)); List flowStatisticDTOS = new ArrayList<>(); for (QueryAccountBalanceResponse.Detail detail : details) { - List list = taxCodeMap.getOrDefault(detail.getTaxNumber(), new ArrayList<>()); + List list = taxCodeMap.getOrDefault(detail.getTaxNum(), new ArrayList<>()); for (TaxAgentTaxReturnPO returnPO : list) { TaxDeclarationApiFlowStatisticListDTO statisticDTO = new TaxDeclarationApiFlowStatisticListDTO(); statisticDTO.setId(IdGenerator.generate());