Versions Compared

Key

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

...

Code Block
languagejson
[
        {
            "code": "SW_INITIATE_INITIATED_SMS_MESSAGE",
            "message": "Dear <Owner Name>, You have successfully submitted your application for a New <Service> Connection. Your Application No. is <Application number>. Click here to download your application <Application download link>. For more information, please log in to <mseva URL> or download <mseva app link>.",
            "module": "rainmaker-ws",
            "locale": "en_IN"
        },
        {
            "code": "SW_INITIATE_INITIATED_APP_MESSAGE",
            "message": "Dear <Owner Name>, You have successfully submitted your application for a New <Service> Connection. Your Application No. is <Application number> . <Action Button>Download Application</Action Button>",
            "module": "rainmaker-ws",
            "locale": "en_IN"
        },
        {
            "code": "SW_REJECT_REJECTED_SMS_MESSAGE",
            "message": "Dear <Owner Name>, Your Application <Application number>  for a New <Service> Connection has been rejected. For more details, please log in to <mseva URL> or download <mseva app link>.",
            "module": "rainmaker-ws",
            "locale": "en_IN"
        },
        {
            "code": "SW_REJECT_REJECTED_APP_MESSAGE",
            "message": "Dear <Owner Name>, Your Application <Application number>  for a New <Service> Connection has been rejected. Click here for more details <View History Link>",
            "module": "rainmaker-ws",
            "locale": "en_IN"
        },
        {
            "code": "SW_EDIT_SMS_MESSAGE",
            "message": "Dear <Owner Name>, Your Application <Application number>  for a New <Service> Connection has been edited. For more details, please log in to <mseva URL> or download <mseva app link>.",
            "module": "rainmaker-ws",
            "locale": "en_IN"
        },
        {
            "code": "SW_EDIT_IN_APP_MESSAGE",
            "message": "Dear <Owner Name>, Your Application <Application number>  for a New <Service> Connection has been edited. Click here for more details <View History Link>.",
            "module": "rainmaker-ws",
            "locale": "en_IN"
        },
        {
            "code": "SW_VERIFY_AND_FORWARD_PENDING_FOR_FIELD_INSPECTION_SMS_MESSAGE",
            "message": "Dear <Owner Name>, Status of your application <Application number> for a New <Service> Connection has changed to PENDING FOR FIELD INSPECTION from PENDING FOR DOCUMENT VERIFICATION. For more details, please log in to <mseva URL> or download <mseva app link>.",
            "module": "rainmaker-ws",
            "locale": "en_IN"
        },
        {
            "code": "SW_VERIFY_AND_FORWARD_PENDING_FOR_FIELD_INSPECTION_APP_MESSAGE",
            "message": "Dear <Owner Name>, Status of your application <Application number> for a New <Service> Connection has changed to PENDING FOR FIELD INSPECTION from PENDING FOR DOCUMENT VERIFICATION. To track your application, click on <View History Link>.",
            "module": "rainmaker-ws",
            "locale": "en_IN"
        },
        {
            "code": "SW_SEND_BACK_FOR_FIELD_INSPECTION_PENDING_FOR_FIELD_INSPECTION_SMS_MESSAGE",
            "message": "Dear <Owner Name>, Your Application <Application number>  for a New <Service> Connection has been sent back. For more details, please log in to <mseva URL> or download <mseva app link>.",
            "module": "rainmaker-ws",
            "locale": "en_IN"
        },
        {
            "code": "SW_SEND_BACK_FOR_FIELD_INSPECTION_PENDING_FOR_FIELD_INSPECTION_APP_MESSAGE",
            "message": "Dear <Owner Name>, Your Application <Application number>  for a New <Service> Connection has been sent back. Click here for more details <View History Link>",
            "module": "rainmaker-ws",
            "locale": "en_IN"
        },
        {
            "code": "SW_SEND_BACK_FOR_DOCUMENT_VERIFICATION_PENDING_FOR_DOCUMENT_VERIFICATION_SMS_MESSAG",
            "message": "Dear <Owner Name>, Your Application <Application number>  for a New <Service> Connection has been sent back. For more details, please log in to <mseva URL> or download <mseva app link>.",
            "module": "rainmaker-ws",
            "locale": "en_IN"
        },
        {
            "code": "SW_SEND_BACK_FOR_DOCUMENT_VERIFICATION_PENDING_FOR_DOCUMENT_VERIFICATION_APP_MESSAGE",
            "message": "Dear <Owner Name>, Your Application <Application number>  for a New <Service> Connection has been sent back. Click here for more details <View History Link>",
            "module": "rainmaker-ws",
            "locale": "en_IN"
        },
        {
            "code": "SEWERAGE_CONNECTION_BILL_GENERATION_MESSAGE",
            "message": "Dear <Owner Name>,Your<Service>  Bill for <Billing Period> has been generated. Please pay the amount due: <bill amount> by due date <Due Date>. Following is the link to your bill: <Link to Bill>",
            "module": "rainmaker-common",
            "locale": "en_IN"
        },
        {
            "code": "SEWERAGE_CONNECTION_BILL_GENERATION_SMS_MESSAGE",
            "message": "Dear <Owner Name>, Your <Service>  Bill has been generated. Please pay the amount due: <bill amount> by due date <Due Date>. Following is the link to your bill: <Link to Bill>",
            "module": "rainmaker-ws",
            "locale": "en_IN"
        },
        {
            "code": "SEWERAGE_CONNECTION_BILL_GENERATION_APP_MESSAGE",
            "message": "Dear <Owner Name>, Your <Service>  Bill has been generated. Please pay the amount due: <bill amount> by due date <Due Date>.",
            "module": "rainmaker-ws",
            "locale": "en_IN"
        },
          {
            "code": "SW_APPROVE_FOR_CONNECTION_PENDING_FOR_PAYMENT_SMS_MESSAGE",
            "message": "Dear <Owner Name>, Your New <Service> connection against the application <Application number> has been approved. To make payment against your application, please click on <payment link> . Log in to <mseva URL> or download <mseva app link> for more details.",
            "module": "rainmaker-ws",
            "locale": "en_IN"
        },
        {
            "code": "SW_APPROVE_FOR_CONNECTION_PENDING_FOR_PAYMENT_APP_MESSAGE",
            "message": "Dear <Owner Name>, Your New <Service> connection against the application <Application number> has been approved. To make payment against your application, please click on PAY NOW .<Action Button>Download Application</Action Button>",
            "module": "rainmaker-ws",
            "locale": "en_IN"
        },
        {
            "code": "SW_PAY_PENDING_FOR_CONNECTION_ACTIVATION_SMS_MESSAGE",
            "message": "Dear <Owner Name> , Your payment for New <Service> connection against the application <Application number> has been been succesfully recorded. You can download your receipt using this link <receipt download link>. For more details, please log in to <mseva URL> or download <mseva app link>.",
            "module": "rainmaker-ws",
            "locale": "en_IN"
        },
        {
            "code": "SW_PAY_PENDING_FOR_CONNECTION_ACTIVATION_APP_MESSAGE",
            "message": "Dear <Owner Name> , Your payment for New <Service> connection against the application <Application number> has been been succesfully recorded. You can download the receipt by clicking DOWNLOAD RECEIPT.<Action Button>Download Application</Action Button>",
            "module": "rainmaker-ws",
            "locale": "en_IN"
        },
        {
            "code": "SW_ACTIVATE_CONNECTION_CONNECTION_ACTIVATED_SMS_MESSAGE",
            "message": "Dear <Owner Name>, Your New <Service> connection against the application <Application number> has been activated. To check your connection details, please log in to <mseva URL> or download <mseva app link>",
            "module": "rainmaker-ws",
            "locale": "en_IN"
        },
           {
            "code": "SW_ACTIVATE_CONNECTION_CONNECTION_ACTIVATED_APP_MESSAGE",
            "message": "Dear <Owner Name>, Your New <Service> connection against the application <Application number> has been activated. To check your connection details, click here <connection details page>.",
            "module": "rainmaker-ws",
            "locale": "en_IN"
        }
    ]

Sewerage Calculator Service

This is one of the major business logic services which is used for calculation of sewerage charge, generating demand, update existing demand , SMS & email notification to the ULB officials on demand generation and also triggering demands(job scheduler) at some intervals and estimation of water charge(one-time cost) which involves cost like road-cutting charge , form fee , scrutiny fee etc.

Requirements:

  • Knowledge of Java/J2EE(preferably Java 8 version)

  • Knowledge of Spring Boot and spring-boot microservices.

  • Knowledge of Git or any version control system.

  • Knowledge of RESTful Web services.

  • Knowledge of the Lombok library will helpful.

  • knowledge of eGov-mdms service, eGov-persister, eGov-idgen, eGov-sms, eGov-email,eGov-user, eGov-localization, eGov-workflow-service will be helpful.

Functionality:

Sewerage calculator services present in municipal services provides multiple functionalities like calculating sewerage charges, generating demands for a particular sewerage connection , updating demands, SMS & email notification to the ULB officials on demand generation and also triggering demands(job scheduler) at some intervals and estimation of water charge(one-time cost) which involves cost like road-cutting charge , form fee , scrutiny fee etc. The different functionalities provided by sewerage calculator services are:

  1. Sewerage charge calculation

  2. Demand generation(here as its always non-metered demand will be generated based on time period)

  3. Sewerage charge estimation(one-time cost which involves cost like road-cutting charge , form fee , scrutiny fee etc.)

Setup and usage:

The Application is present among the municipal services group of applications available in the eGov-services git repository.  The spring boot application needs the Lombok* extension added in your IDE to load it. Once the application is up and running API requests can be posted to the URL and ids can be generated. 

  • in case of IntelliJ, the plugin can be installed directly, for eclipse the Lombok jar location has to be added in eclipse.ini file in this format  javaagent:lombok.jar

API Information :

Application.properties File Information:

kafka topics persister configs for eGov persister(for notification)

  • kafka.topics.notification.sms=egov.core.notification.sms

  • notification.sms.enabled=true

  • kafka.topics.notification.mail=notification.mail

  • notification.mail.enabled=true

  • kafka.topics.notification.mail.name=egov.core.notification.email

  • egov.seweragecalculatorservice.createdemand=sw-generate-demand

  • notification.sms.link=citizen/egov-common/pay?consumerCode=$consumerCode&tenantId=$tenantId&businessService=SW

URLs for the external API references:

Billing Slabs:

Criteria :

  1. connection type

  2. building type

  3. calculation attribute

  4. property usage type

The combination of the above can be used to define the billing slab. Billing Slab is defined in mdms under sw-services-calculation folder with the SCBillingSlab. The following is the sample slab.

Code Block
{
  "tenantId": "pb",
  "moduleName": "sw-services-calculation",
  "SCBillingSlab": [
    {
      "id": "1",
      "buildingType": "RESIDENTIAL",
      "calculationAttribute": "No. of water closets",
      "connectionType": "Non Metered",
      "minimumCharge": 0,
      "slabs": [
        {
          "from": 0,
          "to": 1000000000,
          "charge": 15
        }
      ]
    },
    {
      "id": "2",
      "buildingType": "RESIDENTIAL",
      "calculationAttribute": "No. of toilets",
      "connectionType": "Non Metered",
      "minimumCharge": 0,
      "slabs": [
        {
          "from": 0,
          "to": 1000000000,
          "charge": 15
        }
      ]
    },
    {
      "id": "3",
      "buildingType": "NONRESIDENTIAL",
      "calculationAttribute": "No. of water closets",
      "connectionType": "Non Metered",
      "minimumCharge": 0,
      "slabs": [
        {
          "from": 0,
          "to": 1000000000,
          "charge": 30
        }
      ]
    },
    {
      "id": "4",
      "buildingType": "NONRESIDENTIAL",
      "calculationAttribute": "No. of toilets",
      "connectionType": "Non Metered",
      "minimumCharge": 0,
      "slabs": [
        {
          "from": 0,
          "to": 1000000000,
          "charge": 30
        }
      ]
    },
    {
      "id": "5",
      "buildingType": "Commercial",
      "calculationAttribute": "No. of water closets",
      "connectionType": "Non Metered",
      "minimumCharge": 0,
      "slabs": [
        {
          "from": 0,
          "to": 1000000000,
          "charge": 30
        }
      ]
    },
    {
      "id": "6",
      "buildingType": "Commercial",
      "calculationAttribute": "No. of toilets",
      "connectionType": "Non Metered",
      "slabs": [
        {
          "from": 0,
          "to": 1000000000,
          "charge": 30
        }
      ]
    },
    {
      "id": "7",
      "buildingType": "Government",
      "calculationAttribute": "No. of water closets",
      "connectionType": "Non Metered",
      "slabs": [
        {
          "from": 0,
          "to": 1000000000,
          "charge": 30
        }
      ]
    },
    {
      "id": "8",
      "buildingType": "Government",
      "calculationAttribute": "No. of toilets",
      "connectionType": "Non Metered",
      "slabs": [
        {
          "from": 0,
          "to": 1000000000,
          "charge": 30
        }
      ]
    },
    {
      "id": "9",
      "buildingType": "Partly Commercial",
      "calculationAttribute": "No. of water closets",
      "connectionType": "Non Metered",
      "slabs": [
        {
          "from": 0,
          "to": 1000000000,
          "charge": 25
        }
      ]
    },
    {
      "id": "10",
      "buildingType": "Partly Commercial",
      "calculationAttribute": "No. of toilets",
      "connectionType": "Non Metered",
      "slabs": [
        {
          "from": 0,
          "to": 1000000000,
          "charge": 25
        }
      ]
    },
    {
      "id": "11",
      "buildingType": "RESIDENTIAL",
      "calculationAttribute": "Flat",
      "connectionType": "Non Metered",
      "minimumCharge": 100,
      "slabs": []
    },
    {
      "id": "12",
      "buildingType": "NONRESIDENTIAL",
      "calculationAttribute": "Flat",
      "connectionType": "Non Metered",
      "minimumCharge": 250,
      "slabs": []
    },
    {
      "id": "13",
      "buildingType": "Commercial",
      "calculationAttribute": "Flat",
      "connectionType": "Non Metered",
      "minimumCharge": 250,
      "slabs": []
    },
    {
      "id": "14",
      "buildingType": "Government",
      "calculationAttribute": "Flat",
      "connectionType": "Non Metered",
      "minimumCharge": 350,
      "slabs": []
    },
    {
      "id": "15",
      "buildingType": "Partly commercial",
      "calculationAttribute": "Flat",
      "connectionType": "Non Metered",
      "minimumCharge": 200,
      "slabs": []
    }
  ]
}

If all criteria will match for that sewerage connection this slab will use for calculation.

Estimation:

For application one-time fee, the estimation will return all the related tax head based on criteria. For estimation, all configuration is present in ws-services-calculation.

  1. FeeSlab.json

  2. PlotSizeSlab.json

  3. RoadType.json

All the above master configuration is used for estimation.

Following are the exemptions and taxes that are calculated:

  • Form fee

  • Scrutiny fee

  • Other charges

  • Road cutting charges

  • One time fee

  • Security charges

  • Tax and cess

Sewerage Charge and Tax:

Sewerage charge is based on billing slab, for sewerage application charge will be based on slab and tax based on master configuration.

Interest:

Below is a sample of master data JSON for interest :

Code Block
{
  "tenantId": "pb",
  "moduleName": "sw-services-calculation",
  "Interest": [
    {
      "rate": 5,
      "minAmount": null,
      "applicableAfterDays":0,
      "flatAmount": null,
      "maxAmount": null,
      "fromFY": "2019-20",
      "startingDay": "1/01/2019"
    }
  ]
}

Penalty:

Below is a sample of master data JSON for penalty :

Code Block
{
  "tenantId": "pb",
  "moduleName": "sw-services-calculation",
  "Penalty": [
    {
      "rate": 10,
      "minAmount": null,
      "applicableAfterDays": 0,
      "flatAmount": null,
      "fromFY": "2019-20",
      "startingDay": "1/01/2019"
    }
  ]
}

Round Off:

If the fraction is greater than equal to 0.5 the number is round up else it’s round down. eg: 100.4 will be rounded to 100 while 100.6 will be rounded to 101.

Demand Generation:

Once sewerage is sent to calculator it’s tax estimates are calculated. Using this tax head estimates demand details are created. For every tax head, estimate demand generates function will create a corresponding demand detail.

Whenever _calculate API is called demand is first searched based on the connection no or application no and the demand from and to period. If demand already exists the same demand is updated else new demand is generated with consumer code as connection no or application no and demand from and to a period equal to financial year start and end period.

In case of the update if the tax head estimates change, the difference in amount for that tax head is added as new demand detail. For example, if the initial demand has one demand detail with SEWERAGE_CHARGE equal to 120

Code Block
"demandDetails": [
                {
                    "id": "77ba1e93-a535-409c-b9d1-a312c409bd45",
                    "demandId": "687c3176-305b-461d-9cec-2fa26a30c88f",
                    "taxHeadMasterCode": "SEWERAGE_CHARGE",
                    "taxAmount": 120,
                    "collectionAmount": 120,
                    "additionalDetails": null,
                    "auditDetails": {
                        "createdBy": "04956309-87cd-4526-b4e6-48123abd4f3d",
                        "lastModifiedBy": "04956309-87cd-4526-b4e6-48123abd4f3d",
                        "createdTime": 1583675275873,
                        "lastModifiedTime": 1583675298705
                    },
                    "tenantId": "pb.amritsar"
                }
            ],

After updating if the SEWERAGE_CHARGE increases to 150 we add one more demand detail to account for the increased amount. The demand detail will be updated to:

Code Block
"demandDetails": [
                {
                    "id": "77ba1e93-a535-409c-b9d1-a312c409bd45",
                    "demandId": "687c3176-305b-461d-9cec-2fa26a30c88f",
                    "taxHeadMasterCode": "SEWERAGE_CHARGE",
                    "taxAmount": 120,
                    "collectionAmount": 0,
                    "additionalDetails": null,
                    "auditDetails": {
                        "createdBy": "04956309-87cd-4526-b4e6-48123abd4f3d",
                        "lastModifiedBy": "04956309-87cd-4526-b4e6-48123abd4f3d",
                        "createdTime": 1583675275873,
                        "lastModifiedTime": 1583675298705
                    },
                    "tenantId": "pb.amritsar"
                },
                {
                    "id": "0d83f4b0-6442-11ea-bc55-0242ac130003 ",
                    "demandId": "687c3176-305b-461d-9cec-2fa26a30c88f",
                    "taxHeadMasterCode": "SEWERAGE_CHARGE",
                    "taxAmount": 30,
                    "collectionAmount": 0,
                    "additionalDetails": null,
                    "auditDetails": {
                        "createdBy": "04956309-87cd-4526-b4e6-48123abd4f3d",
                        "lastModifiedBy": "04956309-87cd-4526-b4e6-48123abd4f3d",
                        "createdTime": 1583675275873,
                        "lastModifiedTime": 1583675298705
                    },
                    "tenantId": "pb.amritsar"
                }
            ],

RoundOff is bill based i.e every time bill is generated round off is adjusted so that payable amount is the whole number. Individual SW_ROUNDOFF in demand detail can be greater than 0.5 but the sum of all SW_ROUNDOFF will always be less than 0.5.

Frontend:

Sewerage Citizen UI Guide:

...