childEntityRef);
logger.debug("child : {}", child);
PartyEntity parent = partyEntityManager.get(partyEntityId);
PartyStruct dest = new PartyStruct();
beanMapper.copy(partyStruct, dest);
dest.setPartyStructType(partyStructTypeManager
.get(partyStructTypeId));
dest.setParentEntity(parent);
dest.setChildEntity(child);
partyStructManager.save(dest);
} else {
// 组织
PartyEntity child = null;
if (childEntityId == null) {
child = new PartyEntity();
child.setName(childEntityName);
child.setPartyType(partyType);
partyEntityManager.save(child);
} else {
child = partyEntityManager.get(childEntityId);
}
logger.debug("child : {}", child);
PartyEntity parent = partyEntityManager.get(partyEntityId);
PartyStruct dest = new PartyStruct();
beanMapper.copy(partyStruct, dest);
dest.setPartyStructType(partyStructTypeManager
.get(partyStructTypeId));
dest.setParentEntity(parent);
dest.setChildEntity(child);
partyStructManager.save(dest);
}
return "redirect:/party/org-list.do?partyStructTypeId="
+ partyStructTypeId + "&partyEntityId=" + partyEntityId;