Versions Compared

Key

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

Overview

Master data service maintains information of Government, Chart of Account, Department, Expenditure and Project. We can create these details and search the same details based on the given parameters/request data.

Version History

Current version : 1.0.1.0

Prerequisites

Before you we proceed with the configuration, make sure the following pre-requisites are met

  1. Java 8

  2. Mongodb MongoDB instance

  3. Required service dependency - Department entity service should be up and runningKeycloak server should be up and running.

  4. Zuul Service should be up and running.

Features

Creation of master data service is secure and we need the access token for creating the same. Hence we need to get the access token from keycloak server And pass the same in the subsequent request with request details with Bearer token.

Master data service maintains the details of below services:

...

Features

It creates secure endpoints for the master data service. The access token is required to create any master data.

The subsequent sections on this page discuss the service details maintained by the master data service.

Government

This maintains the Government details and support supports create and search Government details. While creating the Government, we need a unique Id for the Government and a name for the same. Optionally, we can pass some additional details as part of the attribute. In the case of search, passing the unique idID(s) as search parameters can given give you all the details of the Government.

API List

Chart Of Account

...

This maintains the Chart of Account(COA) details and support supports create and search of COA. While The following information is passed while creating the Chart of account, we need to pass the Accounts - Government Id, majorHead, subMajorHead, minorHead, subHead, groupHead, objectHead and corresponding head names & types. A unique code named COACode will be is generated always by combining (concatenating) majorHead, subMajorHead, minorHead, subHead, groupHead, objectHead with a hyphen ("-") and store with the given request.
Searching the details for COA will be is done based on the provided search parameters like chart of account Idsthe Chart of Account IDs, COACode, Government IdID, majorHead, subMajorHead, minorHead, subHead, groupHead, objectHead.

API List

Department

...

Maintains the create and search department details. While The following information is passed while creating the department , pass - the Government IdID, department code, department name, parent department if any. Searching the department details will be is on given parameters like idsIDs, Government IdID, department code, department name.

API List

Expenditure

...

Maintains the expenditure details And provide create and search functionality. In case of For creating the expenditure, need to pass the following details are required - the Government idID, the department idID, code, name, type (can be "SCHEME", "NON_SCHEME") details. While searching the expenditure details, pass the given parameters like idsIDs, Government idIDs, name, code.

API List

Title

Link

...

Project

Maintains the project details and provide create and search functionality. In case of creating the project, need to pass The following details are required to create the project - Government, name, code, expenditure idID, the department entity idID, location idsIDs. While searching, pass the idsIDs, Government idID, name, code, expenditure ID, location ID.

The Project contains department entity information along with its hierarchy detail and also attaches master department information (department id , location id.

Interaction Diagram:

...

- UUID). All child information lists for every department node (department record) is maintained here. Leaf level department will not have any child info.

Child list contains department entity ID list, which makes current department entity parent of all child list (department id list). This is how the department entity level details and information is maintained.

API List

Interaction Diagram

...

Environment

There will not be any environment variables required specific to the environment (migration).

Configurations and Setup

  1. Update all the DB and URI configuration in the dev.yaml, qa.yaml, prod.yaml file.

  2. Make sure the keycloak server is up and running And have and has been configured with the required client ID.

References and Notes

Master Project API With Example

Project Create API creates the project when all the Master data details (COA, Government, Expenditure, Department) and Department Entity have been created.

Project Create API takes below attributes in request :

  1. tenantId : This is the Id that will be defined while creating the Ifix Master Government Service.

  2. expenditureId : This is the Id that will be generated while creating the Ifix Master Expenditure Service.

  3. code : This is the project code that needs to be created.

  4. name : This is the project name that needs to be created.

  5. departmentEntityId :  This is the Department Entity Id. If we have to create a project at hierarchy level 1 then we need to pass the Department Entity Id of that corresponding level. It depends on the Department hierarchy level on which the project has to be created and hence the same level Department Entity Id.

For reference, Below is the Dummy project create example :

Request :

Code Block
{
  "requestHeader": {
    "ts": 1627193067,
    "version": "V1",
    "msgId": "Unknown",
    "signature": "NON",
    "userInfo": {
        "uuid": "e4fd96e8-3b6b-4e36-9503-0f14a01af39d"
    }
  },
  "project": {
    "tenantId": "pb",
    "code": "Dummy-001",
    "name": "Dummy-Project",
    "expenditureId": "910f4d23-fc63-48fb-a8fb-f0ad567b788a",
    "departmentEntitytId": "7bdf9514-e2e5-4563-bfea-f5aaa41b2137"
  }
}

Response :

Code Block
{
    "responseHeader": {
        "ts": 1627193067,
        "correlationId": "7ad35d85-3815-49d9-978a-e7c1f65491c6",
        "msgId": "Unknown",
        "status": "successful",
        "signature": "NON",
        "version": "V1"
    },
    "project": [
        {
            "id": "fa7eedda-c2f0-49f7-9d21-46d361f05dea",
            "tenantId": "pb",
            "code": "Dummy-001",
            "name": "Dummy-Project",
            "expenditureId": "910f4d23-fc63-48fb-a8fb-f0ad567b788a",
            "departmentEntitytId": "7bdf9514-e2e5-4563-bfea-f5aaa41b2137",
            "departmentEntity": {
                "id": "7bdf9514-e2e5-4563-bfea-f5aaa41b2137",
                "code": "7278",
                "name": "BARUWAL",
                "departmentId": "b32f0cc1-f4b1-4503-95d6-fdf04d0ea2d4",
                "hierarchyLevel": 6,
                "ancestry": [
                    {
                        "id": "7bdf9514-e2e5-4563-bfea-f5aaa41b2137",
                        "code": "7278",
                        "name": "BARUWAL",
                        "hierarchyLevel": 6
                    }
                ]
            },
            "locationIds": null,
            "auditDetails": {
                "createdBy": "ba28ebe8-ed9c-4cdb-9328-b8e227eb0342",
                "lastModifiedBy": "ba28ebe8-ed9c-4cdb-9328-b8e227eb0342",
                "createdTime": 1639028363464,
                "lastModifiedTime": 1639028363464
            }
        }
    ]
}

Note : Below are the observations from the above example:

  1. Project has been created at hierarchical level 6 (at “BARUWAL”). Since, At the time of project created based on request, Department Entity Id is of “BARUWAL”.

  2. Government , Expenditure, Chart Of Account (COA) and Department have to be created well before creating any project.

  3. Make sure Department Hierarchy and Department Entity have been created well before creating any project.