ariesy 增加非空税号

release
yefei 2 years ago
parent 8b01eecde5
commit 4504b1e2ad
  1. 14
      dxhy-base/src/main/java/com/dxhy/base/service/invoicecheck/BaseInvoiceManualCheckServiceImpl.java

@ -591,14 +591,17 @@ public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl<BaseTDx
for (String companyCode : companyCodes) { for (String companyCode : companyCodes) {
QueryWrapper<SysDeptEntity> wrapper = new QueryWrapper<>(); QueryWrapper<SysDeptEntity> wrapper = new QueryWrapper<>();
wrapper.eq("org_code", companyCode); wrapper.eq("org_code", companyCode);
SysDeptEntity sysDeptEntity = sysDeptAuthDao.selectOne(wrapper); List<SysDeptEntity> sysDeptEntityList = sysDeptAuthDao.selectList(wrapper);
SysDeptEntity sysDeptEntity = sysDeptEntityList.get(0);
if (sysDeptEntity != null) { if (sysDeptEntity != null) {
String dId = sysDeptEntity.getDeptId(); String dId = sysDeptEntity.getDeptId();
log.info("获取deptId为:{}", dId);
if (StringUtils.isNotEmpty(dId)) {
gfsh = getGfsh(dId, taxnoMap, parentIdMap); gfsh = getGfsh(dId, taxnoMap, parentIdMap);
if (StringUtils.isNotEmpty(gfsh))
gfshList.add(gfsh); gfshList.add(gfsh);
log.info("获取的税号为:{}", gfsh); log.info("获取的税号为:{}", gfsh);
}
} }
} }
log.info("购方税号list为:{}", gfshList); log.info("购方税号list为:{}", gfshList);
@ -608,14 +611,17 @@ public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl<BaseTDx
} }
private String getGfsh(String deptId, Map<String, String> taxnoMap, Map<String, String> parentIdMap) { private String getGfsh(String deptId, Map<String, String> taxnoMap, Map<String, String> parentIdMap) {
String taxno = "";
if (StringUtils.isNotEmpty(deptId)) {
log.info("deptId={}", deptId); log.info("deptId={}", deptId);
String taxno = taxnoMap.get(deptId); taxno = taxnoMap.get(deptId);
if (StringUtils.isEmpty(taxno)) { if (StringUtils.isEmpty(taxno)) {
deptId = parentIdMap.get(deptId); deptId = parentIdMap.get(deptId);
log.info("获取map中的deptId:{}", deptId); log.info("获取map中的deptId:{}", deptId);
getGfsh(deptId, taxnoMap, parentIdMap); getGfsh(deptId, taxnoMap, parentIdMap);
} }
}
return taxno; return taxno;
} }

Loading…
Cancel
Save