From 8b01eecde53ebdd5eb2c0b4e84c928e78834943f Mon Sep 17 00:00:00 2001 From: yefei Date: Mon, 3 Jul 2023 14:56:54 +0800 Subject: [PATCH] =?UTF-8?q?ariesy=20=E5=A2=9E=E5=8A=A0=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BaseInvoiceManualCheckServiceImpl.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dxhy-base/src/main/java/com/dxhy/base/service/invoicecheck/BaseInvoiceManualCheckServiceImpl.java b/dxhy-base/src/main/java/com/dxhy/base/service/invoicecheck/BaseInvoiceManualCheckServiceImpl.java index 8a67fc55..4d9136ea 100644 --- a/dxhy-base/src/main/java/com/dxhy/base/service/invoicecheck/BaseInvoiceManualCheckServiceImpl.java +++ b/dxhy-base/src/main/java/com/dxhy/base/service/invoicecheck/BaseInvoiceManualCheckServiceImpl.java @@ -578,42 +578,42 @@ public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl getGfshList(List gfshList, List companyCodes) { - log.info("111111111111111111111111111111111111111111111"); DynamicContextHolder.push(DbConstant.BASICS_READ); List taxnoList = sysDeptAuthDao.queryTaxnoList(); List parentIdList = sysDeptAuthDao.queryParentIdList(); Map taxnoMap = taxnoList.stream().collect(Collectors.toMap(SysDeptEntity::getDeptId, SysDeptEntity::getTaxno)); - Map parentIdMap = parentIdList.stream().collect(Collectors.toMap(SysDeptEntity::getDeptId, SysDeptEntity::getParentId)); + Map parentIdMap = parentIdList.stream().collect(Collectors.toMap(SysDeptEntity::getDeptId, e -> e.getParentId() == null ? "" : e.getParentId())); log.info("taxnoMap={},parentIdMap={}",taxnoMap,parentIdMap); - log.info("22222222222222222222222222222222222222222222222222222"); String gfsh = ""; for(String companyCode : companyCodes){ - log.info("33333333333333333333333333333333333333333333333333"); QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq("org_code",companyCode); SysDeptEntity sysDeptEntity = sysDeptAuthDao.selectOne(wrapper); if(sysDeptEntity != null) { - log.info("4444444444444444444444444444444444444444444444444"); String dId = sysDeptEntity.getDeptId(); gfsh = getGfsh(dId, taxnoMap, parentIdMap); + gfshList.add(gfsh); + log.info("获取的税号为:{}",gfsh); + } } - log.info("购方税号为:{}",gfsh); - gfshList.add(gfsh); + log.info("购方税号list为:{}",gfshList); + return gfshList; } private String getGfsh(String deptId,Map taxnoMap,Map parentIdMap) { - + log.info("deptId={}",deptId); String taxno = taxnoMap.get(deptId); if(StringUtils.isEmpty(taxno)){ deptId = parentIdMap.get(deptId); + log.info("获取map中的deptId:{}",deptId); getGfsh(deptId,taxnoMap,parentIdMap); } return taxno;