From 0f72f6b55a2ef8b8d5bd056591ff41ece9f355e5 Mon Sep 17 00:00:00 2001 From: dolfinus Date: Thu, 5 Dec 2019 13:25:41 +0300 Subject: [PATCH] Fix parObjAddressId misspell --- .../bss/connectors/hid/hydra/Address.groovy | 6 +++--- .../latera/bss/helpers/hydra/Address.groovy | 17 ++++++++++------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/org/camunda/latera/bss/connectors/hid/hydra/Address.groovy b/src/org/camunda/latera/bss/connectors/hid/hydra/Address.groovy index 5fda9f8b..dd1b21cd 100644 --- a/src/org/camunda/latera/bss/connectors/hid/hydra/Address.groovy +++ b/src/org/camunda/latera/bss/connectors/hid/hydra/Address.groovy @@ -496,7 +496,7 @@ trait Address { addressId : null, objectId : null, bindAddrTypeId : null, - parObjAddressid : null, + parObjAddressId : null, addrTypeId : null, code : null, regionId : null, @@ -519,7 +519,7 @@ trait Address { num_N_ADDRESS_ID : params.addressId, num_N_OBJECT_ID : params.objectId, num_N_OBJ_ADDR_TYPE_ID : params.bindAddrTypeId, - num_N_PAR_OBJ_ADDR_ID : params.parObjAddressid, + num_N_PAR_OBJ_ADDR_ID : params.parObjAddressId, num_N_ADDR_TYPE_ID : params.addrTypeId, vch_VC_CODE : params.code, vch_VC_ADDRESS : params.rawAddress, @@ -539,7 +539,7 @@ trait Address { num_N_ADDRESS_ID : params.addressId, num_N_OBJECT_ID : params.objectId, num_N_OBJ_ADDR_TYPE_ID : params.bindAddrTypeId, - num_N_PAR_OBJ_ADDR_ID : params.parObjAddressid, + num_N_PAR_OBJ_ADDR_ID : params.parObjAddressId, num_N_ADDR_TYPE_ID : params.addrTypeId, vch_VC_CODE : params.code, vch_VC_ADDRESS : params.rawAddress, diff --git a/src/org/camunda/latera/bss/helpers/hydra/Address.groovy b/src/org/camunda/latera/bss/helpers/hydra/Address.groovy index 934e6a01..f5f909fb 100755 --- a/src/org/camunda/latera/bss/helpers/hydra/Address.groovy +++ b/src/org/camunda/latera/bss/helpers/hydra/Address.groovy @@ -3,6 +3,7 @@ package org.camunda.latera.bss.helpers.hydra import static org.camunda.latera.bss.utils.StringUtil.capitalize import static org.camunda.latera.bss.utils.StringUtil.decapitalize import static org.camunda.latera.bss.utils.StringUtil.isEmpty +import static org.camunda.latera.bss.utils.StringUtil.notEmpty import static org.camunda.latera.bss.utils.DateTimeUtil.local import static org.camunda.latera.bss.utils.MapUtil.mergeNotNull import java.util.regex.Pattern @@ -772,15 +773,17 @@ trait Address { // e.g. equipmentIP is set and equipmentIPParentVLAN is filled up with VLAN, so created IP address will bound to VLAN def parAddress = order."${prefix}${parentPrefixId}" def parAddressId = order."${prefix}${parentPrefixId}Id" - if (parAddressId || parAddress) { + if (notEmpty(parAddressId) || notEmpty(parAddress)) { Map parAddressParams = [ - entityId : entityId, - addrType : params.parentAddrType ? "ADDR_TYPE_${params.parentAddrType}" : null, - bindAddrType : params.parentBindAddrType ? "BIND_ADDR_TYPE_${params.parentBindAddrType}" : null + entityId : entityId, + addrTypeId : null, + addrType : params.parentAddrType ? "ADDR_TYPE_${params.parentAddrType}" : null, + bindAddrTypeId : null, + bindAddrType : params.parentBindAddrType ? "BIND_ADDR_TYPE_${params.parentBindAddrType}" : null ] - if (parAddressId) { - parAddressParams.addressId = parAddressId - } else if (parAddress) { + if (notEmpty(parAddressId)) { + parAddressParams.entityAddressId = parAddressId + } else if (notEmpty(parAddress)) { parAddressParams.code = parAddress } inp.parEntityAddressId = hydra.getEntityAddressBy(parAddressParams)?.n_obj_address_id