...
Creating sewerage connection
Updating sewerage connection
Apply for Property creation.
Searching sewerage connection based on few criterias mentioned in swagger documentation later
Creating property if it doesnt exist
Creating and updating workflow.
...
Please refer Swagger API for YAML file details. Link -https://appgithub.swaggerhub.com/apis/egov-foundation/Water-Sewerage-1.0/1.0.0.egovernments/municipal-services/blob/RAIN-2317/docs/water-sewerage-services.yaml
The variables in the Application.properties to be updated are as follows
...
Code Block |
---|
sw-services-calculation
PropertyTax |
master-config.json for sewerage service
Code Block |
---|
"sw-services-calculation": { "Interest": { "masterName": "Interest", "isStateLevel": true, "uniqueKeys": [ "$.fromFY" ] }, "Rebate": { "masterName": "Rebate", "isStateLevel": true, "uniqueKeys": [ "$.fromFY" ] }, "Penalty": { "masterName": "Penalty", "isStateLevel": true, "uniqueKeys": [ "$.fromFY" ] }, "SCBillingSlab": { "masterName": "SCBillingSlab", "isStateLevel": true, "uniqueKeys": [] }, "billingPeriod": { "masterName": "billingPeriod", "isStateLevel": true, "uniqueKeys": [ "$.billingCycle" ] }, "SW_CHARGE": { "masterName": "SW_CHARGE", "isStateLevel": true, "uniqueKeys": [] }, "SW_TIME_PENALTY": { "masterName": "SW_TIME_PENALTY", "isStateLevel": true, "uniqueKeys": [] }, "SW_Round_Off": { "masterName": "SW_Round_Off", "isStateLevel": true, "uniqueKeys": [] }, "PlotSizeSlab": { "masterName": "PlotSizeSlab", "isStateLevel": true, "uniqueKeys": [] }, "PropertyUsageType": { "masterName": "PropertyUsageType", "isStateLevel": true, "uniqueKeys": [] }, "FeeSlab": { "masterName": "FeeSlab", "isStateLevel": true, "uniqueKeys": [] }, "RoadType": { "masterName": "RoadType", "isStateLevel": true, "uniqueKeys": [] }, "CalculationAttribute": { "masterName": "CalculationAttribute", "isStateLevel": true, "uniqueKeys": [] } } |
Property creation through WNS module
https://github.com/egovernments/egov-mdms-data/blob/DEV/data/pb/PropertyTax/PTWorkflow.json
Persister configuration:
https://github.com/egovernments/configs/blob/masterqa/egov-persister/sewerage-persist.yml
Postman link:
https://www.getpostman.com/collections/27458a8c6249d786317ce4c39fd6c0ed0a7dfacd
Workflow business service config:
Code Block |
---|
{ "BusinessServicesRequestInfo": [{ { "apiId": "Rainmaker", "tenantIdaction": "pb", "did": 1, "businessServicekey": "NewSW1", "businessmsgId": "sw-services20170310130900|en_IN", "businessServiceSlarequesterId": 259200000"", "statests": [1513579888683, "ver": ".01", { "authToken": "{{Auth_Token}}" }, "BusinessServices": [ { "tenantId": "pb", "businessService": "NewSW1", "business": "sw-services", "businessServiceSla": 259200000, "states": [ { "sla": null, "state": null, "applicationStatus": null, "docUploadRequired": false, "isStartState": true, "isTerminateState": false, "isStateUpdatable": false, "actions": [ { "action": "INITIATE", "nextState": "INITIATED", "roles": [ "CITIZEN", "SW_CEMP" ] } ] }, { "sla": null, "state": "INITIATED", "applicationStatus": "INITIATED", "docUploadRequired": false, "isStartState": false, "isTerminateState": false, "isStateUpdatable": true, "actions": [ { "action": "SUBMIT_APPLICATION", "nextState": "PENDING_FOR_DOCUMENT_VERIFICATION", "roles": [ "CITIZEN", "SW_CEMP" ] } ] }, { "sla": null, "state": "PENDING_FOR_CITIZEN_ACTION", "applicationStatus": "PENDING_FOR_CITIZEN_ACTION", "docUploadRequired": false, "isStartState": false, "isTerminateState": false, "isStateUpdatable": true, "actions": [ { "action": "RESUBMIT_APPLICATION", "nextState": "PENDING_FOR_DOCUMENT_VERIFICATION", "roles": [ "CITIZEN", "SW_CEMP" ] } ] }, { "sla": null, "state": "PENDING_FOR_DOCUMENT_VERIFICATION", "applicationStatus": "PENDING_FOR_DOCUMENT_VERIFICATION", "docUploadRequired": false, "isStartState": false, "isTerminateState": false, "isStateUpdatable": true, "actions": [ { "action": "VERIFY_AND_FORWARD", "nextState": "PENDING_FOR_FIELD_INSPECTION", "roles": [ "SW_DOC_VERIFIER" ] }, { "action": "REJECT", "nextState": "REJECTED", "roles": [ "SW_DOC_VERIFIER" ] }, { "action": "SEND_BACK_TO_CITIZEN", "nextState": "PENDING_FOR_CITIZEN_ACTION", "roles": [ "SW_DOC_VERIFIER" ] } ] }, { "sla": null, "state": "REJECTED", "applicationStatus": "REJECTED", "isStateUpdatable": false, "docUploadRequired": false, "isStartState": false, "isTerminateState": true }, { "sla": 86400000, "state": "PENDING_FOR_FIELD_INSPECTION", "applicationStatus": "PENDING_FOR_FIELD_INSPECTION", "docUploadRequired": false, "isStartState": false, "isStateUpdatable": true, "isTerminateState": false, "actions": [ { "action": "VERIFY_AND_FORWARD", "nextState": "PENDING_APPROVAL_FOR_CONNECTION", "roles": [ "SW_FIELD_INSPECTOR" ] }, { "action": "REJECT", "nextState": "REJECTED", "roles": [ "SW_FIELD_INSPECTOR" ] }, { "action": "SEND_BACK_FOR_DOCUMENT_VERIFICATION", "nextState": "PENDING_FOR_DOCUMENT_VERIFICATION", "roles": [ "SW_FIELD_INSPECTOR" ] } ] }, { "sla": 43200000, "state": "PENDING_APPROVAL_FOR_CONNECTION", "applicationStatus": "PENDING_APPROVAL_FOR_CONNECTION", "docUploadRequired": false, "isStartState": false, "isStateUpdatable": true, "isTerminateState": false, "actions": [ { "action": "APPROVE_FOR_CONNECTION", "nextState": "PENDING_FOR_PAYMENT", "roles": [ "SW_APPROVER" ] }, { "action": "REJECT", "nextState": "REJECTED", "roles": [ "SW_APPROVER" ] }, { "action": "SEND_BACK_FOR_FIELD_INSPECTION", "nextState": "PENDING_FOR_FIELD_INSPECTION", "roles": [ "SW_APPROVER" ] } ] }, { "sla": 43200000, "state": "PENDING_FOR_PAYMENT", "applicationStatus": "PENDING_FOR_PAYMENT", "docUploadRequired": false, "isStartState": false, "isTerminateState": false, "isStateUpdatable": false, "actions": [ { "action": "PAY", "nextState": "PENDING_FOR_CONNECTION_ACTIVATION", "roles": [ "CITIZEN", "SW_CEMP" ] } ] }, { "sla": null, "state": "PENDING_FOR_CONNECTION_ACTIVATION", "applicationStatus": "PENDING_FOR_CONNECTION_ACTIVATION", "isStateUpdatable": true, "docUploadRequired": false, "isStartState": false, "isTerminateState": false, "actions": [ { "action": "ACTIVATE_CONNECTION", "nextState": "CONNECTION_ACTIVATED", "roles": [ "SW_CLERK" ] } ] }, { "sla": null, "state": "CONNECTION_ACTIVATED", "applicationStatus": "CONNECTION_ACTIVATED", "isStateUpdatable": false, "docUploadRequired": false, "isStartState": false, "isTerminateState": true } ] } ] } |
Notifications :
To enable or disable notifcation
notification.sms.enabled=true
egov.user.event.notification.enabled=true
Notification config:
notification.url = https://egov-micro-dev.egovernments.org/
kafka.topics.notification.sms=egov.core.notification.sms
notification.sms.link=citizen/egov-common/pay?consumerCode=$consumerCode&tenantId=$tenantId&businessService=SW
sw.mseva.app.link=https://play.google.com/store/apps/details?id=org.egovernment.mseva.citizen
sw.view.history.link=citizen/wns/search-preview?applicationNumber=$applicationNumber&history=true&tenantId=$tenantId&service=SEWERAGE
sw.connectiondetails.link=citizen/wns/connection-details?connectionNumber=$connectionNumber&tenantId=$tenantId&service=SEWERAGE
sw.application.pay.link=citizen/egov-common/pay?consumerCode=$consumerCode&tenantId=$tenantId&businessService=SW.ONE_TIME_FEE
The Current localization messages for notification :
...
language | json |
---|
...
Workflow for property creation through Water and Sewerage Module
Code Block |
---|
{ "BusinessServices": [ { "tenantId": "pb", "businessService": "NewWS1", "business": "ws-services", { "businessServiceSla": 259200000, "codestates": "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>."sla": null, "state": null, "applicationStatus": "INWORKFLOW", "moduledocUploadRequired": "rainmaker-ws"false, "localeisStartState": "en_IN"true, }, "isTerminateState": false, { "codeisStateUpdatable": "SW_INITIATE_INITIATED_APP_MESSAGE"false, "messageactions": "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>", "moduleaction": "rainmaker-wsOPEN", "localenextState": "en_ININITIATED", }, "roles": {[ "code": "SW_REJECT_REJECTED_SMS_MESSAGE", "CITIZEN", "message": "Dear <Owner Name>, Your Application <Application number> for a New"WS_CEMP" <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" }, { "codesla": "SW_REJECT_REJECTED_APP_MESSAGE",null, "messagestate": "Dear <Owner Name>INITIATED", Your Application <Application number> for a New <Service> Connection has been rejected. Click here for more details <View History Link> "applicationStatus": "INWORKFLOW", "moduledocUploadRequired": "rainmaker-ws"false, "localeisStartState": "en_IN"true, }, "isTerminateState": false, { "codeisStateUpdatable": "SW_EDIT_SMS_MESSAGE"true, "messageactions": [ "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>."action": "SUBMIT", "module "nextState": "rainmaker-wsAPPROVED", "localeroles": "en_IN"[ }, "CITIZEN", { "code": "SW_EDIT_IN_APP_MESSAGE",WS_CEMP" "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" { }, "sla": null, { "codestate": "SW_VERIFY_AND_FORWARD_PENDING_FOR_FIELD_INSPECTION_SMS_MESSAGEAPPROVED", "messageapplicationStatus": "DearACTIVE", <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""docUploadRequired": false, "isStartState": false, "isTerminateState": true, "localeisStateUpdatable": "en_IN"false, }, "actions": null { } "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" }, ] } |
Indexer config for sewerage-service:
The indexer provides the facility for indexing the data to elastic search.
Setup:
Write the configuration for sewerage service. The structure of the config file is explained later in the same doc.
Provide the absolute path of the checked-in file to DevOps, to add it to the file-read path of egov-indexer. The file will be added to the egov-indexer's environment manifest file for it to be read at the start-up of the application.
Put indexer config file to the config repo under egov-indexer folder.(https://github.com/egovernments/configs )
Run the egov-indexer app, Since it is a consumer, it starts listening to the configured topics and indexes the data.
config Keys:
The indexer uses a config file per module to store all the configurations pertaining to that module. Indexer reads multiple such files at start-up to support indexing for all the configured modules. The water service file contains the following keys:
a. serviceName: Name of the module to which this configuration belongs.
b. summary: Summary of the module.
c. version: The version of the configuration.
d. mappings: List of definitions within the module. Every definition corresponds to one index requirement. Which means, every object received onto the Kafka queue can be used to create multiple indexes, each of these indexes will need configuration, all such configurations belonging to one topic forms one entry in the mappings list. The keys listed henceforth together form one definition and multiple such definitions are part of this mappings key.
i. topic: Topic on which the data is to be received to activate this particular configuration.
ii. configKey: Key to identify to what type of job is this config for. values: INDEX, REINDEX, LEGACYINDEX. INDEX: LiveIndex, REINDEX: Reindex, LEGACYINDEX: LegacyIndex.
iii. indexes: Key to configure multiple index configurations for the data received on the particular topic. Multiple indexes based on different requirement can be created using the same object. This list of such configurations is a part of this key. uses the following keys:
name: Index name on the elasticsearch. (Index will be created if it doesn't exist with this name.)
type: Document type within that index to which the index json has to go. (Elasticsearch uses the structure of index/type/docId to locate any file within index/type with id = docId)
id: Takes comma separated JsonPaths. The JSONPath is applied on the record received on the queue, the values hence obtained are appended and used as id for the record.
jsonPath: Key to be used in case of indexing a part of the input JSON and in case of indexing a custom json where the values for custom json are to be fetched from this part of the input.
timeStampField: JSONPath of the field in the input which can be used to obtain the timestamp of the input.
i) indexMapping: A skeleton/mapping of the JSON that is to be indexed. Note that, this JSON must always contain a key called "Data" at the top-level and the custom mapping begins within this key. This is only a convention to smoothen dashboarding on Kibana when data from multiple indexes have to be fetched for a single dashboard.
ii) fieldMapping: Contains a list of configurations. Each configuration contains keys to identify the field of the input JSON that has to be mapped to the fields of the index json which is mentioned in the key 'indexMapping' in the config. Has the following keys:
inJsonPath: JSONPath of the field from the input.
outJsonPath: JSONPath of the field of the index json.
iii) externalUriMapping: Contains a list of configurations. Each configuration contains keys to identify the field of the input JSON that are to be enriched using APIs from the external services. The configuration for those APIs also is a part of this. Uses the following keys:
path: URI of the API to be used. (it should be POST/_search API.)
queryParam: Configruation of the query params to be used for the API call. It is a comma seperated key-value pair, where key is the parameter name as per the API contract and value is the JSONPath of the field to be equated against this paramter.
apiRequest: Request Body of the API. (Since we only use _search APIs, it should be only RequestInfo.)
uriResponseMapping: Contains a list of configuration. Each configuration contains two keys: One is a JSONPath to identify the field from response, Second is also a JSONPath to map the response field to a field of the index json mentioned in the key 'indexMapping'.
i) inJsonPath: JSONPath to identify the field from response
ii) outJsonPath: JSONPath to map the response field to a field of the index json
sewerage-service indexer config:
Code Block | ||
---|---|---|
| ||
ServiceMaps:
serviceName: Sewerage Service - rainmaker
version: 1.0.0
mappings:
- topic: save-sw-connection
configKey: INDEX
indexes:
- name: sewerage-services
type: general
id: $.id,$.tenantId
timeStampField: $.auditDetails.createdTime
jsonPath: $.SewerageConnection
customJsonMapping:
indexMapping: {"Data":{"workflow": {"state": {}, "action": "", "assignes": []},"applicationNo":"","applicationStatus":"","status":"","connectionNo":"","oldConnectionNo":"","plumberInfo":[],"roadCuttingInfo":[],"connectionHolders":[],"roadType":"","roadCuttingArea":"","connectionExecutionDate":"","connectionCategory":"","connectionType":"","additionalDetails":{},"id":"","propertyId":"","tenantId":"","proposedWaterClosets":"","proposedToilets":"","noOfWaterClosets":"","noOfToilets":"","applicationType":"","dateEffectiveFrom":"","history":{}}}
fieldMapping:
- inJsonPath: $.applicationStatus.state
outJsonPath: $.Data.workflow.state
- inJsonPath: $.processInstance.action
outJsonPath: $.Data.workflow.action
- inJsonPath: $.processInstance.assignes.*.uuid
outJsonPath: $.Data.workflow.assignes
- inJsonPath: $.applicationNo
outJsonPath: $.Data.applicationNo
- inJsonPath: $.applicationStatus
outJsonPath: $.Data.applicationStatus
- inJsonPath: $.status
outJsonPath: $.Data.status
- inJsonPath: $.connectionNo
outJsonPath: $.Data.connectionNo
- inJsonPath: $.oldConnectionNo
outJsonPath: $.Data.oldConnectionNo
- inJsonPath: $.plumberInfo
outJsonPath: $.Data.plumberInfo
- inJsonPath: $.roadCuttingInfo
outJsonPath: $.Data.roadCuttingInfo
- inJsonPath: $.connectionHolders
outJsonPath: $.Data.connectionHolders
- inJsonPath: $.roadType
outJsonPath: $.Data.roadType
- inJsonPath: $.roadCuttingArea
outJsonPath: $.Data.roadCuttingArea
- inJsonPath: $.connectionExecutionDate
outJsonPath: $.Data.connectionExecutionDate
- inJsonPath: $.connectionCategory
outJsonPath: $.Data.connectionCategory
- inJsonPath: $.connectionType
outJsonPath: $.Data.connectionType
- inJsonPath: $.additionalDetails
outJsonPath: $.Data.additionalDetails
- inJsonPath: $.id
outJsonPath: $.Data.id
- inJsonPath: $.propertyId
outJsonPath: $.Data.propertyId
- inJsonPath: $.tenantId
outJsonPath: $.Data.tenantId
- inJsonPath: $.proposedWaterClosets
outJsonPath: $.Data.proposedWaterClosets
- inJsonPath: $.proposedToilets
outJsonPath: $.Data.proposedToilets
- inJsonPath: $.noOfWaterClosets
outJsonPath: $.Data.noOfWaterClosets
- inJsonPath: $.noOfToilets
outJsonPath: $.Data.noOfToilets
- inJsonPath: $.applicationType
outJsonPath: $.Data.applicationType
- inJsonPath: $.dateEffectiveFrom
outJsonPath: $.Data.dateEffectiveFrom
externalUriMapping:
- path: http://egov-workflow-v2.egov:8080/egov-workflow-v2/egov-wf/process/_search
queryParam: businessIds=$.applicationNo,history=true,tenantId=$.tenantId
apiRequest: {"RequestInfo":{"apiId":"org.egov.pt","ver":"1.0","ts":1502890899493,"action":"asd","did":"4354648646","key":"xyz","msgId":"654654","requesterId":"61","authToken":"d9994555-7656-4a67-ab3a-a952a0d4dfc8","userInfo":{"id":1,"uuid":"1fec8102-0e02-4d0a-b283-cd80d5dab067","type":"EMPLOYEE","tenantId":"pb.amritsar","roles":[{"name":"Employee","code":"EMPLOYEE","tenantId":"pb.amritsar"}]}}}
uriResponseMapping:
- inJsonPath: $.ProcessInstances
outJsonPath: $.Data.history
- topic: update-sw-connection
configKey: INDEX
indexes:
- name: sewerage-services
type: general
id: $.id,$.tenantId
timeStampField: $.auditDetails.lastModifiedTime
jsonPath: $.SewerageConnection
customJsonMapping:
indexMapping: {"Data":{"workflow": {"state": {}, "action": "", "assignes": []},"applicationNo":"","applicationStatus":"","status":"","connectionNo":"","oldConnectionNo":"","plumberInfo":[],"roadCuttingInfo":[],"connectionHolders":[],"roadType":"","roadCuttingArea":"","connectionExecutionDate":"","connectionCategory":"","connectionType":"","additionalDetails":{},"id":"","propertyId":"","tenantId":"","proposedWaterClosets":"","proposedToilets":"","noOfWaterClosets":"","noOfToilets":"","applicationType":"","dateEffectiveFrom":"","history":{}}}
fieldMapping:
- inJsonPath: $.applicationStatus.state
outJsonPath: $.Data.workflow.state
- inJsonPath: $.processInstance.action
outJsonPath: $.Data.workflow.action
- inJsonPath: $.processInstance.assignes.*.uuid
outJsonPath: $.Data.workflow.assignes
- inJsonPath: $.applicationNo
outJsonPath: $.Data.applicationNo
- inJsonPath: $.applicationStatus
outJsonPath: $.Data.applicationStatus
- inJsonPath: $.status
outJsonPath: $.Data.status
- inJsonPath: $.connectionNo
outJsonPath: $.Data.connectionNo
- inJsonPath: $.oldConnectionNo
outJsonPath: $.Data.oldConnectionNo
- inJsonPath: $.plumberInfo
outJsonPath: $.Data.plumberInfo
- inJsonPath: $.roadCuttingInfo
outJsonPath: $.Data.roadCuttingInfo
- inJsonPath: $.connectionHolders
outJsonPath: $.Data.connectionHolders
- inJsonPath: $.roadType
outJsonPath: $.Data.roadType
- inJsonPath: $.roadCuttingArea
outJsonPath: $.Data.roadCuttingArea
- inJsonPath: $.connectionExecutionDate
outJsonPath: $.Data.connectionExecutionDate
- inJsonPath: $.connectionCategory
outJsonPath: $.Data.connectionCategory
- inJsonPath: $.connectionType
outJsonPath: $.Data.connectionType
- inJsonPath: $.additionalDetails
outJsonPath: $.Data.additionalDetails
- inJsonPath: $.id
outJsonPath: $.Data.id
- inJsonPath: $.propertyId
outJsonPath: $.Data.propertyId
- inJsonPath: $.tenantId
outJsonPath: $.Data.tenantId
- inJsonPath: $.proposedWaterClosets
outJsonPath: $.Data.proposedWaterClosets
- inJsonPath: $.proposedToilets
outJsonPath: $.Data.proposedToilets
- inJsonPath: $.noOfWaterClosets
outJsonPath: $.Data.noOfWaterClosets
- inJsonPath: $.noOfToilets
outJsonPath: $.Data.noOfToilets
- inJsonPath: $.applicationType
outJsonPath: $.Data.applicationType
- inJsonPath: $.dateEffectiveFrom
outJsonPath: $.Data.dateEffectiveFrom
externalUriMapping:
- path: http://egov-workflow-v2.egov:8080/egov-workflow-v2/egov-wf/process/_search
queryParam: businessIds=$.applicationNo,history=true,tenantId=$.tenantId
apiRequest: {"RequestInfo":{"apiId":"org.egov.pt","ver":"1.0","ts":1502890899493,"action":"asd","did":"4354648646","key":"xyz","msgId":"654654","requesterId":"61","authToken":"d9994555-7656-4a67-ab3a-a952a0d4dfc8","userInfo":{"id":1,"uuid":"1fec8102-0e02-4d0a-b283-cd80d5dab067","type":"EMPLOYEE","tenantId":"pb.amritsar","roles":[{"name":"Employee","code":"EMPLOYEE","tenantId":"pb.amritsar"}]}}}
uriResponseMapping:
- inJsonPath: $.ProcessInstances
outJsonPath: $.Data.history
- topic: update-sw-workflow
configKey: INDEX
indexes:
- name: sewerage-services
type: general
id: $.id,$.tenantId
timeStampField: $.auditDetails.lastModifiedTime
jsonPath: $.SewerageConnection
customJsonMapping:
indexMapping: {"Data":{"workflow": {"state": {}, "action": "", "assignes": []},"applicationNo":"","applicationStatus":"","status":"","connectionNo":"","oldConnectionNo":"","plumberInfo":[],"roadCuttingInfo":[],"connectionHolders":[],"roadType":"","roadCuttingArea":"","connectionExecutionDate":"","connectionCategory":"","connectionType":"","additionalDetails":{},"id":"","propertyId":"","tenantId":"","proposedWaterClosets":"","proposedToilets":"","noOfWaterClosets":"","noOfToilets":"","applicationType":"","dateEffectiveFrom":"","history":{}}}
fieldMapping:
- inJsonPath: $.applicationStatus.state
outJsonPath: $.Data.workflow.state
- inJsonPath: $.processInstance.action
outJsonPath: $.Data.workflow.action
- inJsonPath: $.processInstance.assignes.*.uuid
outJsonPath: $.Data.workflow.assignes
- inJsonPath: $.applicationNo
outJsonPath: $.Data.applicationNo
- inJsonPath: $.applicationStatus
outJsonPath: $.Data.applicationStatus
- inJsonPath: $.status
outJsonPath: $.Data.status
- inJsonPath: $.connectionNo
outJsonPath: $.Data.connectionNo
- inJsonPath: $.oldConnectionNo
outJsonPath: $.Data.oldConnectionNo
- inJsonPath: $.plumberInfo
outJsonPath: $.Data.plumberInfo
- inJsonPath: $.roadCuttingInfo
outJsonPath: $.Data.roadCuttingInfo
- inJsonPath: $.connectionHolders
outJsonPath: $.Data.connectionHolders
- inJsonPath: $.roadType
outJsonPath: $.Data.roadType
- inJsonPath: $.roadCuttingArea
outJsonPath: $.Data.roadCuttingArea
- inJsonPath: $.connectionExecutionDate
outJsonPath: $.Data.connectionExecutionDate
- inJsonPath: $.connectionCategory
outJsonPath: $.Data.connectionCategory
- inJsonPath: $.connectionType
outJsonPath: $.Data.connectionType
- inJsonPath: $.additionalDetails
outJsonPath: $.Data.additionalDetails
- inJsonPath: $.id
outJsonPath: $.Data.id
- inJsonPath: $.propertyId
outJsonPath: $.Data.propertyId
- inJsonPath: $.tenantId
outJsonPath: $.Data.tenantId
- inJsonPath: $.proposedWaterClosets
outJsonPath: $.Data.proposedWaterClosets
- inJsonPath: $.proposedToilets
outJsonPath: $.Data.proposedToilets
- inJsonPath: $.noOfWaterClosets
outJsonPath: $.Data.noOfWaterClosets
- inJsonPath: $.noOfToilets
outJsonPath: $.Data.noOfToilets
- inJsonPath: $.applicationType
outJsonPath: $.Data.applicationType
- inJsonPath: $.dateEffectiveFrom
outJsonPath: $.Data.dateEffectiveFrom
externalUriMapping:
- path: http://egov-workflow-v2.egov:8080/egov-workflow-v2/egov-wf/process/_search
queryParam: businessIds=$.applicationNo,history=true,tenantId=$.tenantId
apiRequest: {"RequestInfo":{"apiId":"org.egov.pt","ver":"1.0","ts":1502890899493,"action":"asd","did":"4354648646","key":"xyz","msgId":"654654","requesterId":"61","authToken":"d9994555-7656-4a67-ab3a-a952a0d4dfc8","userInfo":{"id":1,"uuid":"1fec8102-0e02-4d0a-b283-cd80d5dab067","type":"EMPLOYEE","tenantId":"pb.amritsar","roles":[{"name":"Employee","code":"EMPLOYEE","tenantId":"pb.amritsar"}]}}}
uriResponseMapping:
- inJsonPath: $.ProcessInstances
outJsonPath: $.Data.history |
Notifications :
To enable or disable notifcation
notification.sms.enabled=true
egov.user.event.notification.enabled=true
Notification config:
notification.url = https://egov-micro-dev.egovernments.org/
kafka.topics.notification.sms=egov.core.notification.sms
notification.sms.link=citizen/egov-common/pay?consumerCode=$consumerCode&tenantId=$tenantId&businessService=SW
sw.mseva.app.link=https://play.google.com/store/apps/details?id=org.egovernment.mseva.citizen
sw.view.history.link=citizen/wns/search-preview?applicationNumber=$applicationNumber&history=true&tenantId=$tenantId&service=SEWERAGE
sw.connectiondetails.link=citizen/wns/connection-details?connectionNumber=$connectionNumber&tenantId=$tenantId&service=SEWERAGE
sw.application.pay.link=citizen/egov-common/pay?consumerCode=$consumerCode&tenantId=$tenantId&businessService=SW.ONE_TIME_FEE
The Current localization messages for notification :
Code Block | ||
---|---|---|
| ||
[
{
"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"
}
] |
Table UML Diagram:
...
Modify connection:
After connection activation or legacy connection, we can edit the connection. This process based on defined workflow. Any action is based on defined roles on the action level. For edit connection, we need to upload some supporting documents and mandatory info.
Workflow config for edit connection:
Code Block |
---|
{ "RequestInfo": { "apiId": "Rainmaker", "action": "", "did": 1, "key": "", "msgId": "20170310130900|en_IN", "requesterId": "", "ts": 1513579888683, "ver": ".01", "authToken": "{{Auth_Token}}" }, "BusinessServices": [ { "tenantId": "pb", "code "businessService": "ModifySWConnection", "business": "SW_SEND_BACK_FOR_FIELD_INSPECTION_PENDING_FOR_FIELD_INSPECTION_SMS_MESSAGEsw-services", "businessServiceSla": 259200000, "messagestates": [ "Dear <Owner Name>, Your Application <Application number> { for a New <Service> Connection has been sent back. For more details"sla": null, please log in to <mseva URL> or download <mseva app link>.""state": null, "moduleapplicationStatus": "rainmaker-ws"null, "localedocUploadRequired": "en_IN"false, "isStartState": }true, { "isTerminateState": false, "codeisStateUpdatable": "SW_SEND_BACK_FOR_FIELD_INSPECTION_PENDING_FOR_FIELD_INSPECTION_APP_MESSAGE"false, "messageactions": "Dear <Owner Name>, Your Application <Application number> for a New <Service> Connection has been sent back. Click here for more details <View History Link> [ { "action": "INITIATE", "modulenextState": "rainmaker-wsINITIATED", "localeroles": "en_IN"[ }, "SW_CEMP" { "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>."} ] }, { "sla": null, "modulestate": "rainmaker-wsINITIATED", "localeapplicationStatus": "en_ININITIATED", }, "docUploadRequired": false, { "isStartState": false, "codeisTerminateState": "SW_SEND_BACK_FOR_DOCUMENT_VERIFICATION_PENDING_FOR_DOCUMENT_VERIFICATION_APP_MESSAGE", false, "messageisStateUpdatable": "Dear <Owner Name>, Your Application <Application number> for a New <Service> Connection has been sent back. Click here for more details <View History Link>", true, "actions": [ { "moduleaction": "rainmaker-wsSUBMIT_APPLICATION", "localenextState": "enPENDING_FOR_IN" }APPROVAL", { "roles": [ "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>",SW_CEMP" ] } ] "module": "rainmaker-common", }, { "locale": "en_IN" "sla": }86400000, { "state": "PENDING_FOR_APPROVAL", "codeapplicationStatus": "SEWERAGEPENDING_CONNECTION_BILL_GENERATION_SMS_MESSAGEFOR_APPROVAL", "messagedocUploadRequired": "Dear <Owner Name>false, Your <Service> Bill has been generated. Please pay the amount due "isStartState": <billfalse, amount> by due date <Due Date>. Following is the link to your bill"isStateUpdatable": <Link to Bill>"true, "moduleisTerminateState": "rainmaker-ws"false, "localeactions": "en_IN"[ }, { { "codeaction": "SEWERAGEAPPROVE_CONNECTION_BILL_GENERATION_APP_MESSAGE", "messagenextState": "DearAPPROVED", <Owner Name>, Your <Service> Bill has been generated. Please pay the amount due"roles": <bill[ amount> by due date <Due Date>.", "SW_APPROVER" "module": "rainmaker-ws", ] "locale": "en_IN" }, { "codeaction": "SW_APPROVE_FOR_CONNECTION_PENDING_FOR_PAYMENT_SMS_MESSAGEREJECT", "messagenextState": "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.", REJECTED", "roles": [ "SW_APPROVER" ] "module": "rainmaker-ws" }, "locale": "en_IN"{ }, "action": "SEND_BACK", { "codenextState": "SW_APPROVE_FOR_CONNECTION_PENDING_FOR_PAYMENT_APP_MESSAGEINITIATED", "messageroles": "Dear[ <Owner Name>, Your New <Service> connection against the application <Application number> has been approved. To make payment against"SW_APPROVER" your application, please click on PAY NOW .<Action Button>Download Application</Action Button>", ] "module": "rainmaker-ws", } "locale": "en_IN" ] }, { "codesla": "SW_PAY_PENDING_FOR_CONNECTION_ACTIVATION_SMS_MESSAGE"null, "messagestate": "Dear <Owner Name> REJECTED", 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>.", "applicationStatus": "REJECTED", "isStateUpdatable": false, "docUploadRequired": false, "moduleisStartState": "rainmaker-ws", false, "localeisTerminateState": "en_IN"true }, { "codesla": "SW_PAY_PENDING_FOR_CONNECTION_ACTIVATION_APP_MESSAGE"null, "messagestate": "Dear <Owner Name> "APPROVED", 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>""applicationStatus": "APPROVED", "isStateUpdatable": false, "moduledocUploadRequired": "rainmaker-ws"false, "localeisStartState": "en_IN" }false, { "isTerminateState": true "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
...
}
]
} |
Notification :
Notification will be sent to the property owners and connection holders based on different application states.
Capturing connection holders :
We can add connection holders to the sewerage connection which will be the owner of the connection. We can fill the connection holders' details or we can just make the property owner to the connection holder.
The connection holder will get notification based on a different state of the application. We are pushing the data of the connection holders in the user service too.
Multiple Road Type Support
We can add road cutting details of multiple roads to the sewerage connection. For each road which goes under cutting process we have to fill their road type details and road cutting area.
Based on this information, application one time fee estimate is calculated.
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:
Sewerage charge calculation
Demand generation(here as its always non-metered demand will be generated based on time period)
Sewerage charge estimation(one-time cost which involves cost like road-cutting charge , form fee , scrutiny fee etc.)
RequirementsSetup and usage:
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:
Sewerage charge calculation
Demand generation(here as its always non-metered demand will be generated based on time period)
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 :
Please refer Swagger API for YAML file details. Link -https://app.swaggerhub.com/apis/egov-foundation/Water-Sewerage-1.0/1.0.0.
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:
eGvo mdms :-> egov.mdms.host = https://egov-micro-dev.egovernments.org
eGov -idGen :-> egov.idgen.host = https://egov-micro-dev.egovernments.org/
localization service :-> egov.localization.host = https://egov-micro-dev.egovernments.org/
user-service :-> egov.user.host = https://egov-micro-dev.egovernments.org/
Url-Shortner
egov.url.shortner.host=http://egov-url-shortening.egov:8080
Billing Slabs:
Criteria :
connection type
building type
calculation attribute
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.
...
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 :
Please refer Swagger API for YAML file details. Link -https://app.swaggerhub.com/apis/egov-foundation/Water-Sewerage-1.0/1.0.0.
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:
eGvo mdms :-> egov.mdms.host = https://egov-micro-dev.egovernments.org
eGov -idGen :-> egov.idgen.host = https://egov-micro-dev.egovernments.org/
localization service :-> egov.localization.host = https://egov-micro-dev.egovernments.org/
user-service :-> egov.user.host = https://egov-micro-dev.egovernments.org/
Url-Shortner
egov.url.shortner.host=http://egov-url-shortening.egov:8080
Billing Slabs:
Criteria :
connection type
building type
calculation attribute
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": "13", "buildingType": "RESIDENTIALNONRESIDENTIAL", "calculationAttribute": "No. of water closets", "connectionType": "Non Metered", "minimumCharge": 0, "slabs": [ { "from": 0, "to": 1000000000, "charge": 1530 } ] }, { "id": "24", "buildingType": "RESIDENTIALNONRESIDENTIAL", "calculationAttribute": "No. of toilets", "connectionType": "Non Metered", "minimumCharge": 0, "slabs": [ { "from": 0, "to": 1000000000, "charge": 1530 } ] }, { "id": "35", "buildingType": "NONRESIDENTIALCommercial", "calculationAttribute": "No. of water closets", "connectionType": "Non Metered", "minimumCharge": 0, "slabs": [ { "from": 0, "to": 1000000000, "charge": 30 } ] }, { "id": "46", "buildingType": "NONRESIDENTIALCommercial", "calculationAttribute": "No. of toilets", "connectionType": "Non Metered", "minimumCharge": 0, "slabs": [ { "from": 0, "to": 1000000000, "charge": 30 } ] }, { "id": "57", "buildingType": "CommercialGovernment", "calculationAttribute": "No. of water closets", "connectionType": "Non Metered", "minimumCharge": 0, "slabs": [ { "from": 0, "to": 1000000000, "charge": 30 } ] }, { "id": "68", "buildingType": "CommercialGovernment", "calculationAttribute": "No. of toilets", "connectionType": "Non Metered", "slabs": [ { "from": 0, "to": 1000000000, "charge": 30 } ] }, { "id": "79", "buildingType": "Partly Commercial"Government", "calculationAttribute": "No. of water closets", "connectionType": "Non Metered", "slabs": [ { "from": 0, "to": 1000000000, "charge": 3025 } ] }, { "id": "810", "buildingType": "GovernmentPartly Commercial", "calculationAttribute": "No. of toilets", "connectionType": "Non Metered", "slabs": [ { "from": 0, "to": 1000000000, "charge": 3025 } ] }, { "id": "911", "buildingType": "Partly CommercialRESIDENTIAL", "calculationAttribute": "No. of water closetsFlat", "connectionType": "Non Metered", "slabsminimumCharge": 100, [ "slabs": [] }, { { "fromid": 0"12", "buildingType": "NONRESIDENTIAL", "tocalculationAttribute": 1000000000"Flat", "chargeconnectionType": 25"Non Metered", }"minimumCharge": 250, "slabs": [] }, { "id": "1013", "buildingType": "Partly Commercial", "calculationAttribute": "No. of toiletsFlat", "connectionType": "Non Metered", "minimumCharge": 250, "slabs": [] }, { "id": "14", "frombuildingType": 0, "Government", "tocalculationAttribute": 1000000000"Flat", "chargeconnectionType": 25"Non Metered", "minimumCharge": 350, } "slabs": [] }, { "id": "1115", "buildingType": "RESIDENTIALPartly commercial", "calculationAttribute": "Flat", "connectionType": "Non Metered", "minimumCharge": 100, "slabs": [] }, { "id": "12", "buildingType": "NONRESIDENTIAL", "calculationAttribute": "Flat", "connectionType": "Non Metered", "minimumCharge": 250, "slabs": [] }, 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.
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": [ { "idrate": "13"5, "buildingTypeminAmount": "Commercial"null, "calculationAttributeapplicableAfterDays": "Flat"0, "connectionTypeflatAmount": "Non Metered"null, "minimumChargemaxAmount": 250null, "slabsfromFY": [] }, { "id": "14"2019-20", "buildingTypestartingDay": "Government1/01/2019", } "calculationAttribute": "Flat", "connectionType ] } |
Penalty:
Below is a sample of master data JSON for penalty :
Code Block |
---|
{ "tenantId": "Non Meteredpb", "minimumChargemoduleName": 350"sw-services-calculation", "slabsPenalty": [] }, { "idrate": "15"10, "buildingTypeminAmount": "Partly commercial"null, "calculationAttributeapplicableAfterDays": "Flat"0, "connectionTypeflatAmount": "Non Metered"null, "minimumChargefromFY": 200"2019-20", "slabsstartingDay": []"1/01/2019" } ] } |
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.
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 :
...
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.
Adding Adhoc penalty or rebate:
The only employee can apply for a penalty or rebate for an existing connection. As an employee, I can update or add the penalty and rebate of a connection. This applied penalty or rebate will be added or updated in existing demand as tax heads. For configuration, we have to add the tax head in TaxHeadMaster.json file.
Code Block |
---|
{ "category": "TAX", "service": "SW", " |
...
name": |
...
"Sewerage adhoc |
...
rebate", " |
...
code": |
...
"SW_TIME_ADHOC_REBATE", " |
...
isDebit": |
...
false, " |
...
isActualDemand": |
...
true, |
...
Penalty:
Below is a sample of master data JSON for penalty :
...
" |
...
order": " |
...
5", " |
...
isRequired": |
...
false |
...
}, { " |
...
category": |
...
"TAX", " |
...
service": |
...
"SW", " |
...
name": |
...
"Sewerage adhoc penalty", " |
...
code": |
...
"SW_TIME_ADHOC_PENALTY", " |
...
isDebit": false, |
...
"isActualDemand": true, " |
...
order": " |
...
6", |
...
"isRequired": false |
...
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.
...