Create Estimate

Create an Estimate Proposal

Add Module MDMS (Master Data Management Service) Configuration

When creating a works module, the module needs to be enabled in citymodule.json.Add the Following details in citymodule.json

{
    "tenantId": "pb",
    "moduleName": "tenant",
    "citymodule": [
        {
            "module": "Works",
            "code": "Works",
            "active": true,
            "order": 1,
            "tenants": [
                {
                    "code": "pb.jalandhar"
                },
                {
                    "code": "pb.nawanshahr"
                },
                {
                    "code": "pb.amritsar"
                }
            ]
        }
}

Estimate Creator will have link to create estimate from estimate inbox screen.

Clicking on this will open create estimate screen.

Add create Estimate mdms config

Add the following MDMS config to fetch the values of different dropdown filed of create estimate

MDMS config for Depatment
{
    tenant,   //pb
    "common-masters",
        [
            {
                "name": "Department"
            }
        ]
}

MDMS config for Beneficiary Type, Entrustment Mode, Nature Of Work, Type Of Work
{
     tenant,    //pb
        "works",
        [
            {
                "name": "BeneficiaryType"
            },
            {
                "name": "EntrustmentMode"
            },
            {
                "name": "NatureOfWork"
            },
            {
                "name": "TypeOfWork"
            },
        ]
}

MDMS config for Scheme, Budget Head, Functions, Fund
{
    tenant,
        "finance",
        [
            {
                "name": "Scheme"
            },
            {
                "name": "BudgetHead"
            },
            {
                "name": "Functions"
            },
            {
                "name": "Fund"
            }
        ]
}

MDMS config for location
{
    tenantId,  //pb.amritsar || pb.jalandhar etc.
        "egov-location",
        [
            {
                "name": "TenantBoundary"
            },
        ]
}

Once the above details are filled, user needs to forward estimate to concerned department and official for checking. Forwarding is considered as part of estimate creation.Fill in the details and click “Forward Estimate”.

Each Work detail will be referred to as Sub-Estimate & sub Estimate will back track to all details of Estimate as-is. At least 1 Sub-Estimate has to be created to create an Estimate. Sum of All Amounts of Sub-Estimates is the Estimate Amount.

Once Create Estimate API call is successful, an acknowledgement screen is shown.

API Call Roll action-mapping

APIAction IdRoles

/estimate-service/estimate/v1/_create

9

EST_CREATOR

Sample Curl for Create API

jcurl 'https://works-dev.digit.org/estimate-service/estimate/v1/_create' \
  -H 'authority: works-dev.digit.org' \
  -H 'accept: application/json, text/plain, */*' \
  -H 'accept-language: en-US,en;q=0.9' \
  -H 'content-type: application/json;charset=UTF-8' \
  -H 'origin: https://works-dev.digit.org' \
  -H 'referer: https://works-dev.digit.org/works-ui/employee/works/create-estimate' \
  -H 'sec-ch-ua: "Google Chrome";v="107", "Chromium";v="107", "Not=A?Brand";v="24"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "Linux"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: same-origin' \
  -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36' \
  --data-raw '{
        "estimate": {
            "tenantId":"pb.amritsar",
            "status":"ACTIVE",
            "estimateStatus":"ACTIVE",
            "subject":"Construct new schools",
            "requirementNumber":"78960",
            "description":"Construct new schools",
            "department":"DEPT_3",
            "location":"pb.amritsar:ADMIN:pb.amritsar:Z1:B3:SUN08",
            "workCategory":"Engineering",
            "beneficiaryType":"Minority",
            "natureOfWork":"Operation & Maintenance",
            "typeOfWork":"Road",
            "subTypeOfWork":"RD02",
            "entrustmentMode":"Nomination",
            "fund":"01",
            "function":"0006",
            "budgetHead":"02",
            "scheme":"AMRUT",
            "subScheme":"AMRUT-01",
            "estimateDetails":[{
                "name":"Amrut Yojana",
                "amount":"90876"
            }],
            "additionalDetails":{
            "formData":{},
            "createdBy":"Est Super User",
            "owner":"Est Super User",
            },
        "workflow":{
            "action":"CREATE",
            "comment":"",
            "assignees":["88bd1b70-dd6d-45f7-bcf7-5aa7a6fae7d9"]
        },
        "RequestInfo":{
            "apiId":"Rainmaker",
            "authToken":"153c3161-55ce-4485-96fa-f67ea9757eea",
            "userInfo":{
                "id":110,
                "uuid":"c8d0093a-4d2b-495f-8bdf-fd9d3594e43f",
                "userName":"EST_SUPER",
                "name":"Est Super User",
                "mobileNumber":"9876543210",
                "emailId":"",
                "locale":null,
                "type":"EMPLOYEE",
                "roles":[{
                    "name":"Employee",
                    "code":"EMPLOYEE",
                    "tenantId":"pb.amritsar"
                    },{
                    "name":"EST CREATOR",
                    "code":"EST_CREATOR",
                    "tenantId":"pb.amritsar"
                }],
                "active":true,
                "tenantId":"pb.amritsar",
                "permanentCity":null
            },
        "msgId":"1667826119526|en_IN",
        "plainAccessRequest":{}
        }
    }'

Some of the dropdown data is fetched from mdms and hrms search API

PageComponentData SourceAPI

Executing Department

mdms

{

tenant,

"common-masters",

[ { "name": "Department" } ]

}

Ward, Location

mdms

{

"pb.amritsar",

"egov-location",

[ { "name": "TenantBoundary" }]

}

Beneficiary, Nature of Work, Type of Work

mdms

{

"pb,

"works",

[ { "name": "BeneficiaryType" },

{ "name": "EntrustmentMode" },

{ "name": "NatureOfWork" },

{ "name": "TypeOfWork" }, ]

}

Fund, Function, Budget Head,Scheme, subSchem

mdms

{

"pb",

"finance",

[ { "name": "BudgetHead" },

{ "name": "Functions" },

{ "name": "Fund" },

{ "name": "Scheme"} ]

}

Designation of officer in charge

hrms

/egov-hrms/employees/_search

Name of officer in charge

hrms

/egov-hrms/employees/_search

Localization keys are added under the ‘rainmaker-works’ locale module. In future if any new labels are implemented in works module that should also be pushed in the locale DB under rainmaker-works locale module. Below is the example of few locale labels for hindi and English.

{
    "code":"ACTION_TEST_CREATE_ESTIMATE",
    "message":"अनुमान बनाएँ",
    "module":"rainmaker-works",
    "locale":"hi_IN"
}

{
    "code":"ACTION_TEST_CREATE_ESTIMATE",
    "message":"Create Estimate",
    "module":"rainmaker-works",
    "locale":"en_IN"
}

Roles - Action

RoleActions

Creator (EST_CREATOR)

Create/Edit(Rejected) Estimate and Forawrded

Checket1 (EST_CHECKER)

Checked Estimate and Forwarded

Checker2 (EST_TECH_SANC)

Checked Estimate and Forwarded

Admin Approver (EST_ADMIN_SANC)

Approved Estimate

All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.