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 {