Fire-NOC Calculator

Objective:

The main objective of the Fire-NOC calculator module is to create, update, search billing slabs. Calculate and generate FireNOC charges.

Requirements:

  • Prior knowledge of JavaScript.

  • Prior knowledge of Node.js platform.

  • Prior knowledge of Kafka.

  • JSONPath for filtering required data from json objects.

  • Prior Knowledge of REST APIs and related concepts like path parameters, headers, JSON etc.

  • Prior knowledge of eGov-mdms service, eGov-persister.

Functionality:

  • Create billing slab (/firenoc-calculator/billingslab/_create)

  • Update billing slab (/firenoc-calculator/billingslab/_update)

  • Search billing slab (/firenoc-calculator/billingslab/_search)

  • Calculate fees (/firenoc-calculator/v1/_calculate)

    • This endpoint is used to calculate firenoc related charges and generate demand. This is being called by firenoc service while creating or updating application. 

  • Getbill (/firenoc-calculator/v1/_getbill)

Setup:

 Before running the Fire NOC service in local system ,make sure that the  Workflow service, ID-Gen service, FireNOC Calculator service, Egov-Location service and Egov-User service are running in background.The following service can be port-forwarded. 

  • Step 1: Port-forward the workflow service.

    • kubectl port-forward  -n egov <egov-workflow pod id> 8089:8080

  • Step 2: Port-forward the egov-location service.

    • kubectl port-forward  -n egov <egov-location pod id> 8090:8080

  • Step 3: Port-forward the egov-user service.

    • kubectl port-forward  -n egov <egov-user pod id> 8088:8080

  • Step 4: Port-forward the firenoc-calculator service.

    • kubectl port-forward  -n egov <firenoc-calculator pod id> 8083:8080

  • Step 5: Port-forward the egov-idgen service.

    • kubectl port-forward  -n egov <egov-idgen pod id> 8087:8080

  • Step 6: After port-forwarding all the service mentioned above, now start the fire-noc 

  • service by running the command npm run dev in terminal

PRD:

Refer to below doc for the PRD of fire-noc service and calculator

https://docs.google.com/document/d/1HuNgTYYQ4nDrqn_LPPtu3CaVdrxHVHAIUIl-wOZsIgA/edit?ts=5c91c088

API  Contract:

Firenoc calculator:

Postman collection:

Configurations:

MDMS:

Firenoc master:

This master has list of building types with each building types having list of UOMs which will be used by calculator.

FireNocStateConstats -

This master has state level constants and their values.

Property

Allowed values

FireNocStateConstats

FLAT, SINGLESLAB, MULTIPLESLAB

MULTI_BUILDING_CALC_METHOD

SUM, AVERAGE, MAX, MIN

 

UOMs -

This master has list of UOMs for firenoc . This uoms 

FireNocULBConstats - (ulb specific constants)

 

This master has state level constants and their values.

Property

Allowed values

MINIMUM_PROVISIONAL

Numeric value for minimum fee in case of provisional application

MINIMUM_NEW

Numeric value for minimum fee in case of new application

TAX_PERCENTAGE

Numeric value

 

Branch -noc_latest 



Persister Config:


Id Gen Config: 

 

User Roles:

  • /firenoc-calculator/v1/_getbill - NOC_CEMP, CITIZEN, NOC_DOC_VERIFIER, NOC_FIELD_INSPECTOR, NOC_APPROVER, EMPLOYEE

  • /firenoc-calculator/v1/_calculate - SUPERUSER

  • /firenoc-calculator/billingslab/_create - SUPERUSER

  • /firenoc-calculator/billingslab/_update - SUPERUSER

  • /firenoc-calculator/billingslab/_search - NOC_CEMP, CITIZEN, NOC_DOC_VERIFIER, NOC_FIELD_INSPECTOR, NOC_APPROVER, EMPLOYEE

Dependencies:

BillingService: ( Service has to be restarted)

Firenoc calculator service make calls to billing-service for demand search, create and update (if demand is already generated for taxhead). Also it make call to bill/_generate during getbill call.

Firenoc service:

Firenoc calculator service make calls to firenoc service when application no is given . First fetches data from firenoc service and then do calculation based on firenoc data.

MDMS:  ( Service has to be restarted)

Firenoc calculator service makes calls to egov-mdms-service to fetch required masters as stated above. These are significant in validations.