From fc4eb40904a82cfb8a0b53ce17c1e7b4fb892ed3 Mon Sep 17 00:00:00 2001 From: Lemon Date: Thu, 23 Nov 2023 09:53:38 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E7=AC=AC=E4=B8=89=E6=96=B9=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E6=8E=A8=E9=80=81=E7=AB=99=E7=82=B9=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=A4=E6=96=AD=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../thirdparty/zhongdianlian/service/impl/ZDLServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/zhongdianlian/service/impl/ZDLServiceImpl.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/zhongdianlian/service/impl/ZDLServiceImpl.java index 7c9e39860..86104af10 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/zhongdianlian/service/impl/ZDLServiceImpl.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/zhongdianlian/service/impl/ZDLServiceImpl.java @@ -138,7 +138,7 @@ public class ZDLServiceImpl implements ZDLService { // 截取运营商组织机构代码(去除最后一位后的最后九位) MerchantInfoVO merchantInfo = pileMerchantInfoService.getMerchantInfoVO(String.valueOf(pileStationInfo.getMerchantId())); String organizationCode = merchantInfo.getOrganizationCode(); - if (organizationCode.length() == 18) { + if (StringUtils.isNotBlank(organizationCode) && organizationCode.length() == 18) { String equipmentOwnerId = StringUtils.substring(organizationCode, organizationCode.length() - 10, organizationCode.length() - 1); info.setEquipmentOwnerId(equipmentOwnerId); } @@ -228,7 +228,7 @@ public class ZDLServiceImpl implements ZDLService { stationInfo.setStationId(String.valueOf(pileStationInfo.getId())); stationInfo.setOperatorId(dto.getOperatorId()); // 组织机构代码 String organizationCode = pileStationInfo.getOrganizationCode(); - if (organizationCode.length() == 18) { + if (StringUtils.isNotBlank(organizationCode) && organizationCode.length() == 18) { String equipmentOwnerId = StringUtils.substring(organizationCode, organizationCode.length() - 10, organizationCode.length() - 1); stationInfo.setEquipmentOwnerId(equipmentOwnerId); }else {