From 2db76f2066701cbe292f206ad49a7f8523b8aa9f Mon Sep 17 00:00:00 2001
From: shiyunteng <shiyunteng@example.com>
Date: 星期五, 14 八月 2026 16:30:25 +0800
Subject: [PATCH] feat:银行流水关联多个合同,新增预收款开票,所有List校验调整为ColUtil

---
 platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/BusinessCustomerServiceImpl.java |   25 +++++++++++++++++--------
 1 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/BusinessCustomerServiceImpl.java b/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/BusinessCustomerServiceImpl.java
index 0767e4d..3be2168 100644
--- a/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/BusinessCustomerServiceImpl.java
+++ b/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/BusinessCustomerServiceImpl.java
@@ -1,6 +1,7 @@
 package com.by4cloud.platformx.business.service.impl;
 
-import cn.hutool.core.util.ArrayUtil;
+import cn.hutool.core.collection.CollUtil;
+
 import cn.hutool.core.util.ObjUtil;
 import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@@ -43,30 +44,38 @@
 				.or().isNull(BusinessCustomer::getLegalPerson)
 				.or().isNull(BusinessCustomer::getBankName)
 				.or().isNull(BusinessCustomer::getBankAccount)
-				.or().isNull(BusinessCustomer::getRegisterName))
+				.or().isNull(BusinessCustomer::getRegisterName)
+				.or().isNull(BusinessCustomer::getBipCode))
 		);
-		if (ArrayUtil.isNotEmpty(bcList.toArray())){
+		if (CollUtil.isNotEmpty(bcList)){
 			for (BusinessCustomer bc:bcList
 				 ) {
 				log.info("寮�濮嬪悓姝}淇℃伅",bc.getCompanyName());
 				CustInfoVo custInfo = bipViewMapper.selectBaseInfoByCustName(bc.getCompanyName());
+				if (ObjUtil.isNull(custInfo)){
+					continue;
+				}
 				if (ObjUtil.isNotNull(custInfo)){
 					bc.setCreditCode(custInfo.getCertificateId());
 					bc.setRegisterName(custInfo.getCustName());
 					bc.setLegalPerson(custInfo.getLegalPerson());
 					bc.setAddress(custInfo.getRegistrationAddress());
+					bc.setBipCode(custInfo.getCustCode());
 					baseMapper.updateById(bc);
-					log.info("{}鍚屾鍚嶇О銆佹硶浜恒�佸湴鍧�銆佷俊鐢ㄧ爜淇℃伅鎴愬姛",bc.getCompanyName());
+					log.info("{}鍚屾鍚嶇О銆佹硶浜恒�佸湴鍧�銆佷俊鐢ㄧ爜銆乥ipcode淇℃伅鎴愬姛",bc.getCompanyName());
 				}
 				List<CustBankVo> bankVoList = bipViewMapper.selectBankByCustName(bc.getCompanyName());
-				if (ArrayUtil.isNotEmpty(bankVoList.toArray())){
+				if (CollUtil.isEmpty(bankVoList)){
+					continue;
+				}
+				if (CollUtil.isNotEmpty(bankVoList)){
 					if (StrUtil.isEmpty(bc.getBankAccount())){
 						bc.setBankAccount(bankVoList.get(0).getBankAccount());
 						baseMapper.updateById(bc);
 						log.info("{}鍚屾閾惰鍗″彿淇℃伅鎴愬姛",bc.getCompanyName());
 					}
 					List<BankNameVo> bankNameVoList = bipBanklViewMapper.selectBankByCode(bankVoList.get(0).getBankName());
-					if (ArrayUtil.isNotEmpty(bankNameVoList.toArray())){
+					if (CollUtil.isNotEmpty(bankNameVoList)){
 						bc.setBankName(bankNameVoList.get(0).getBankNameName());
 						baseMapper.updateById(bc);
 						log.info("{}鍚屾閾惰鍚嶇О淇℃伅鎴愬姛",bc.getCompanyName());
@@ -92,13 +101,13 @@
 			log.info("{}涓绘暟鎹煡璇㈠悕绉般�佹硶浜恒�佸湴鍧�銆佷俊鐢ㄧ爜淇℃伅鎴愬姛",companyName);
 		}
 		List<CustBankVo> bankVoList = bipViewMapper.selectBankByCustName(bc.getCompanyName());
-		if (ArrayUtil.isNotEmpty(bankVoList.toArray())){
+		if (CollUtil.isNotEmpty(bankVoList)){
 			if (StrUtil.isEmpty(bc.getBankAccount())){
 				bc.setBankAccount(bankVoList.get(0).getBankAccount());
 				log.info("{}涓绘暟鎹煡璇㈤摱琛屽崱鍙蜂俊鎭垚鍔�",companyName);
 			}
 			List<BankNameVo> bankNameVoList = bipBanklViewMapper.selectBankByCode(bankVoList.get(0).getBankName());
-			if (ArrayUtil.isNotEmpty(bankNameVoList.toArray())){
+			if (CollUtil.isNotEmpty(bankNameVoList)){
 				bc.setBankName(bankNameVoList.get(0).getBankNameName());
 				log.info("{}涓绘暟鎹煡璇㈤摱琛屽悕绉颁俊鎭垚鍔�",companyName);
 			}

--
Gitblit v1.9.1