Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Root level department hierarchy will not contain any parent value and the level value will be zero

  2. When parent id is having any value then we search parent in department hierarchy record for hierarchy level evaluation

  3. Get level value from parent department hierarchy and increment current department hierarchy level value by one

...

It contains department entity information along with its hierarchy level and also attaches master department information (department id - UUID). It keeps all child level information lists at every department node (department record). Leaf The leaf level department does not have any children children’s info.
Child ChiThe childld list contains the department entity ID list, which makes the current department entity parent of all children list (department ID list). This is how it maintains the department entity level.

...

Define the hierarchy level using the top to bottom because it has the parent's references. For department entity, create using the bottom-to-top approach. The leaf department entity does not have any child reference. When the department entity goes higher (parent) only then does it defines child reference in its child list.

...

  1. Create Department Hierarchy:
    We pass the current hierarchy level and its parent details along with master department and tenant information. It stores data as meta-information about hierarchy level for department entity data processing, it will be working as a reference meta index which will tell about hierarchy level information.

  2. Search Department Hierarchy:
    It just provides a preview of department hierarchies by providing request parameter parameters - tenant Id, hierarchy level or department hierarchy id.

...