update 第三方平台推送站点信息添加判断条件

This commit is contained in:
Lemon
2023-11-23 09:53:38 +08:00
parent ffcb73c240
commit fc4eb40904

View File

@@ -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 {