Skip to content

Commit

Permalink
Fix parObjAddressId misspell
Browse files Browse the repository at this point in the history
  • Loading branch information
dolfinus committed Dec 5, 2019
1 parent afd9c54 commit 0f72f6b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ trait Address {
addressId : null,
objectId : null,
bindAddrTypeId : null,
parObjAddressid : null,
parObjAddressId : null,
addrTypeId : null,
code : null,
regionId : null,
Expand All @@ -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,
Expand All @@ -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,
Expand Down
17 changes: 10 additions & 7 deletions src/org/camunda/latera/bss/helpers/hydra/Address.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0f72f6b

Please sign in to comment.