diff --git a/CODEOWNERS b/CODEOWNERS index e2ce5cb92..5857605c8 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1 +1,4 @@ * @egovernments/services-pr-reviewer @sirishrao-egov @kapil-eGov @AmanKumar-eGov + +## Works +works/ @egovernments/works-dev-pr-reviewers diff --git a/works/egov-dss-dashboard/dashboard-analytics/ChartApiConfig.json b/works/egov-dss-dashboard/dashboard-analytics/ChartApiConfig.json new file mode 100644 index 000000000..50d305565 --- /dev/null +++ b/works/egov-dss-dashboard/dashboard-analytics/ChartApiConfig.json @@ -0,0 +1,299 @@ +{ + "unemployedWageSeekers": { + "chartName": "DSS_MUKTA_UNEMPLOYED_WAGE_SEEKERS", + "queries": [ + { + "module": "COMMON", + "dateRefField": "Data.auditDetails.createdTime", + "requestQueryMap": "{\"tenantId\" : \"Data.tenantId\"}", + "indexName": "individual-index-v1", + "aggrQuery": "{\n \"aggs\": {\n \"Total Individuals\": {\n \"filter\": {\n \"bool\": {\n \"must_not\": [\n {\n \"term\": {\n \"Data.tenantId\": \"\"\n }\n }\n ]\n }\n },\n \"aggs\": {\n \"Individuals Count\": {\n \"cardinality\": {\n \"field\": \"Data.id.keyword\"\n }\n }\n }\n }\n }\n}" + }, + { + "module": "COMMON", + "dateRefField": "Data.auditDetails.createdTime", + "requestQueryMap": "{\"tenantId\" : \"Data.tenantId\"}", + "indexName": "muster-roll-inbox", + "aggrQuery": "{\n \"aggs\": {\n \"AGGR\": {\n \"filters\": {\n \"filters\": {\n \"Total Projects\": {\n \"bool\": {\n \"must_not\": [\n {\n \"term\": {\n \"Data.tenantId\": \"\"\n }\n }\n ]\n }\n }\n }\n },\n \"aggs\": {\n \"Count\": {\n \"cardinality\": {\n \"field\": \"Data.individualEntries.attendanceEntries.id.keyword\"\n }\n },\n \"Overall Muster Count\": {\n \"bucket_script\": {\n \"buckets_path\": {\n \"ot\": \"Count\"\n },\n \"script\": \"params.ot * (-1)\"\n }\n }\n }\n }\n }\n}" + } + ], + "chartType": "metric", + "valueType": "number", + "drillChart": "none", + "documentType": "_doc", + "action": "", + "aggregationPaths": [ + "Individuals Count","Overall Muster Count" + ], + "insight": { + }, + "_comment": "Unemployed Wage seekers" + }, + "musterRollsByStatus": { + "chartName": "DSS_MUKTA_MUSTER_ROLLS_BY_STATUS", + "queries": [ + { + "module": "MUSTER-ROLL-SERVICES", + "dateRefField": "Data.auditDetails.createdTime", + "requestQueryMap": "{\"tenantId\" : \"Data.tenantId\"}", + "indexName": "muster-roll-inbox", + "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}},{\"terms\":{\"Data.musterRollStatus.keyword\":[\"REJECTED\"]}}]}},\"aggs\":{\"Muster Rolls\":{\"terms\":{\"script\":{\"source\":\"if(['APPROVED','SUBMITTED'].contains(doc['Data.musterRollStatus.keyword'].value)){return doc['Data.musterRollStatus.keyword'].value}else{return 'YET_TO_APPROVE'}\"}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.auditDetails.createdTime\"}}}}}}}}" + } + ], + "chartType": "pie", + "valueType": "number", + "action": "", + "documentType": "_doc", + "drillChart": "none", + "aggregationPaths": [ + "Muster Rolls" + ], + "insight": { + }, + "_comment": "Muster Rolls by status" + }, + "pendingBillsByBillNumberType": { + "chartName": "DSS_MUKTA_PENDING_BILLS_BY_BILL_NUMBER_TYPE", + "queries": [ + { + "module": "EXPENSE", + "requestQueryMap": "{\"tenantId\" : \"Data.tenantId\"}", + "dateRefField": "Data.auditDetails.createdTime", + "indexName": "expense-bill-index", + "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}},{\"terms\":{\"Data.currentProcessInstance.state.state.keyword\":[\"APPROVED\",\"REJECTED\"]}}]}},\"aggs\":{\"Pending Bills By Bill Type\":{\"terms\":{\"field\":\"Data.businessService.keyword\"},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.auditDetails.createdTime\"}}}}}}}}" + } + ], + "chartType": "pie", + "valueType": "number", + "action": "", + "documentType": "_doc", + "drillChart": "none", + "aggregationPaths": [ + "Pending Bills By Bill Type" + ], + "insight": { + }, + "_comment": "Pending Bills By Their Number" + }, + "pendingBillsByBillAmountType": { + "chartName": "DSS_MUKTA_PENDING_BILLS_BY_BILL_AMOUNT_TYPE", + "queries": [ + { + "module": "EXPENSE", + "requestQueryMap": "{\"tenantId\" : \"Data.tenantId\"}", + "dateRefField": "Data.auditDetails.createdTime", + "indexName": "expense-bill-index", + "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"terms\":{\"Data.currentProcessInstance.state.state.keyword\":[\"APPROVED\",\"REJECTED\"]}},{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Pending Bills By Bill Type\":{\"terms\":{\"field\":\"Data.businessService.keyword\"},\"aggs\":{\"Sum\":{\"sum\":{\"field\":\"Data.totalAmount\"}}}}}}}}" + } + ], + "chartType": "pie", + "valueType": "amount", + "action": "", + "documentType": "_doc", + "drillChart": "none", + "aggregationPaths": [ + "Pending Bills By Bill Type" + ], + "insight": { + }, + "_comment": "Pending Bills By Their Amount" + }, + "projectsByProjectNumberType": { + "chartName": "DSS_MUKTA_PROJECTS_BY_PROJECT_TYPE", + "queries": [ + { + "module": "PROJECT", + "requestQueryMap": "{\"tenantId\" : \"Data.tenantId\"}", + "dateRefField": "Data.auditDetails.createdTime", + "indexName": "project-index", + "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Projects By Project Type\":{\"terms\":{\"field\":\"Data.projectType.keyword\"},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.auditDetails.createdTime\"}}}}}}}}" + } + ], + "chartType": "pie", + "valueType": "number", + "action": "", + "documentType": "_doc", + "drillChart": "none", + "aggregationPaths": [ + "Projects By Project Type" + ], + "insight": { + }, + "_comment": "Count of Projects by their Project Type" + }, + "projectsByProjectAmountType": { + "chartName": "DSS_MUKTA_PROJECTS_BY_PROJECT_TYPE", + "queries": [ + { + "module": "PROJECT", + "requestQueryMap": "{\"tenantId\" : \"Data.tenantId\"}", + "dateRefField": "Data.auditDetails.createdTime", + "indexName": "project-index", + "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}},{\"term\":{\"Data.additionalDetails.estimatedCostInRs.keyword\":\"\"}}]}},\"aggs\":{\"Projects By Project Type\":{\"terms\":{\"field\":\"Data.projectType.keyword\"},\"aggs\":{\"Sum\":{\"sum\":{\"script\":{\"source\":\"def estCost=doc['Data.additionalDetails.estimatedCostInRs.keyword'].value;estCost!=null&&estCost!=''?Double.parseDouble(estCost):0.0\"},\"field\":\"Data.auditDetails.createdTime\"}}}}}}}}" + } + ], + "chartType": "pie", + "valueType": "amount", + "action": "", + "documentType": "_doc", + "drillChart": "none", + "aggregationPaths": [ + "Projects By Project Type" + ], + "insight": { + }, + "_comment": "Estimated amount of Projects by their Project Type" + }, + "projectsByStatusHorizontal":{ + "chartName": "DSS_MUKTA_PROJECTS_BY_STATUS_HORIZONTAL", + "queries": [ + { + "module": "PROJECT", + "requestQueryMap": "{\"tenantId\" : \"Data.tenantId\"}", + "dateRefField": "Data.auditDetails.createdTime", + "indexName": "project-index", + "aggrQuery":"{\"size\":10000,\"aggs\":{\"totalProject\":{\"cardinality\":{\"field\":\"Data.projectNumber.keyword\"}}}}" + } + ], + "chartType": "pie", + "valueType": "number", + "action": "", + "documentType": "_doc", + "drillChart": "none", + "aggregationPaths": [ + "totalProject" + ], + "insight": { + }, + "_comment": "Count of Created Projects" + }, + "estimatesByStatusHorizontal":{ + "chartName": "DSS_MUKTA_ESTIMATES_BY_STATUS_HORIZONTAL", + "queries": [ + { + "module": "ESTIMATE", + "requestQueryMap": "{\"tenantId\" : \"Data.tenantId\"}", + "dateRefField": "Data.auditDetails.createdTime", + "indexName": "estimate-inbox-v3", + "aggrQuery":"{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"ESTIMATES\":{\"terms\":{\"script\":{\"source\":\"if(['PENDINGFORVERIFICATION','REJECTED','PENDINGFORTECHNICALSANCTION','PENDINGFORAPPROVAL','PENDINGFORCORRECTION'].contains(doc['Data.wfStatus.keyword'].value)){return'YET_TO_APPROVE'}else{return'APPROVED'}\"}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.auditDetails.createdTime\"}}}},\"CREATED\":{\"value_count\":{\"field\":\"Data.auditDetails.createdTime\"}}}}}}" + } + ], + "chartType": "pie", + "valueType": "number", + "action": "", + "documentType": "_doc", + "drillChart": "none", + "aggregationPaths": [ + "ESTIMATES", + "CREATED" + ], + "insight": { + }, + "_comment": "Estimates by Statuses" + }, + "contractsByStatusHorizontal":{ + "chartName": "DSS_MUKTA_CONTRACTS_BY_STATUS_HORIZONTAL", + "queries": [ + { + "module": "CONTRACT", + "requestQueryMap": "{\"tenantId\" : \"Data.tenantId\"}", + "dateRefField": "Data.auditDetails.createdTime", + "indexName": "contract-inbox", + "aggrQuery":"{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"CONTRACTS\":{\"terms\":{\"script\":{\"source\":\"if(['PENDING_FOR_VERIFICATION','PENDING_FOR_APPROVAL','PENDING_FOR_CORRECTION','PENDING_FOR_REASSIGNMENT','PENDING_FOR_REVERIFICATION'].contains(doc['Data.contractStatus.keyword'].value)){return'YET_TO_APPROVE'}else if(['PENDING_FOR_ACCEPTANCE'].contains(doc['Data.contractStatus.keyword'].value)){return'YET_TO_ACCEPT'}else{return'INPROGRESS'}\"}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.auditDetails.createdTime\"}}}},\"CREATED\":{\"value_count\":{\"field\":\"Data.auditDetails.createdTime\"}}}}}}" + + } + ], + "chartType": "pie", + "valueType": "number", + "action": "", + "documentType": "_doc", + "drillChart": "none", + "aggregationPaths": [ + "CONTRACTS", + "CREATED" + ], + "insight": { + }, + "_comment": "Contracts by Statuses" + }, + "workOrdersNotIssued": { + "chartName" : "DSS_MUKTA_WORK_ORDERS_NOT_ISSUED", + "queries": [ + { + "module": "CONTRACT", + "requestQueryMap": "{\"tenantId\" : \"Data.tenantId\"}", + "dateRefField": "Data.auditDetails.createdTime", + "indexName": "contract-inbox", + "aggrQuery":"{\n \"aggs\": {\n \"Distinct_Work_Orders\": {\n \"terms\": {\n \"field\": \"Data.tenantId.keyword\",\n \"size\": 10000\n },\n \"aggs\": {\n \"Work_Order\": {\n \"cardinality\": {\n \"field\": \"Data.additionalDetails.projectId.keyword\"\n }\n },\n \"Work_Order_Count\": {\n \"bucket_script\": {\n \"buckets_path\": {\n \"path\": \"Work_Order\"\n },\n \"script\": \"params.path * (-1)\"\n }\n }\n }\n },\n \"Negative Work Order Count\": {\n \"sum_bucket\": {\n \"buckets_path\": \"Distinct_Work_Orders>Work_Order_Count\"\n }\n }\n }\n}" + }, + { + "module": "PROJECTS", + "requestQueryMap": "{\"tenantId\" : \"Data.tenantId\"}", + "dateRefField": "Data.auditDetails.createdTime", + "indexName": "project-index", + "aggrQuery": "{\n \"aggs\": {\n \"Total Projects\": {\n \"filter\": {\n \"bool\": {\n \"must_not\": {\n \"term\": {\n \"Data.projectNumber.keyword\": \"\"\n }\n }\n }\n },\n \"aggs\": {\n \"Projects\": {\n \"cardinality\": {\n \"field\": \"Data.projectNumber.keyword\"\n }\n }\n }\n }\n }\n}" + } + ], + "chartType": "metric", + "valueType": "number", + "drillChart": "none", + "documentType": "_doc", + "action": "", + "aggregationPaths": [ + "Projects","Negative Work Order Count" + ], + "insight": { + }, + "_comment": "Work orders not issued" + }, + "totalPayments": { + "chartName": "DSS_MUKTA_TOTAL_PAYMENTS", + "queries": [ + { + "module": "EXPENSE", + "dateRefField": "Data.auditDetails.createdTime", + "requestQueryMap": "{\"tenantId\" : \"Data.tenantId\"}", + "indexName": "expense-bill-index", + "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"dayHist\":{\"date_histogram\":{\"field\":\"Data.auditDetails.createdTime\",\"interval\":\"month\"},\"aggs\":{\"TotalAmount\":{\"sum\":{\"field\":\"Data.totalAmount\"}}}}}}}}" + } + ], + "chartType": "line", + "valueType": "number", + "action": "", + "drillChart": "none", + "documentType": "_doc", + "aggregationPaths": [ + "TotalAmount" + ], + "isCumulative": false, + "interval": "month", + "insight": { + }, + "_comment": "Total Bill Payment Amount" + }, + "totalAttendance": { + "chartName": "DSS_MUKTA_TOTAL_LABOUR_ATTENDANCE", + "queries": [ + { + "module": "MUSTER-ROLL-SERVICES", + "dateRefField": "Data.auditDetails.createdTime", + "requestQueryMap": "{\"tenantId\" : \"Data.tenantId\"}", + "indexName": "muster-roll-inbox", + "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}},{\"terms\":{\"Data.musterRollStatus.keyword\":[\"REJECTED\"]}}]}},\"aggs\":{\"dayHist\":{\"date_histogram\":{\"field\":\"Data.auditDetails.createdTime\",\"interval\":\"month\"},\"aggs\":{\"TotalAttendanceSum\":{\"sum\":{\"field\":\"Data.individualEntries.totalAttendance\"}}}}}}}}" + } + ], + "chartType": "line", + "valueType": "number", + "action": "", + "drillChart": "none", + "documentType": "_doc", + "aggregationPaths": [ + "TotalAttendanceSum" + ], + "isCumulative": false, + "interval": "month", + "insight": { + }, + "_comment": "Total Labour Attendance" + } +} diff --git a/works/egov-dss-dashboard/dashboard-analytics/MasterDashboardConfig.json b/works/egov-dss-dashboard/dashboard-analytics/MasterDashboardConfig.json new file mode 100644 index 000000000..eff344b6e --- /dev/null +++ b/works/egov-dss-dashboard/dashboard-analytics/MasterDashboardConfig.json @@ -0,0 +1,374 @@ +{ + "_comment": "Master dashboard which holds all the possible visualisation. Note new dashboards/visualisations can be added", + "dashboards": [ + { + "name": "DSS_MUKTA_DASHBOARD_HEADING", + "id": "mukta", + "isActive": "", + "style": "linear", + "visualizations": [ + { + "row": 1, + "name": "DSS_MUKTA", + "vizArray": [ + { + "id": 101, + "name": "DSS_OVERVIEW_ISSUES", + "label": "DSS_OVERVIEW_ISSUES", + "vizType": "metric-collection", + "noUnit": true, + "isCollapsible": false, + "charts": [ + { + "id": "unemployedWageSeekers", + "name": "DSS_MUKTA_UNEMPLOYED_WAGE_SEEKERS", + "code": "", + "chartType": "metric", + "filter": "", + "headers": [] + }, + { + "id": "pendingBillsByBillNumberType", + "name": "DSS_PENDING_BILLS", + "code": "", + "chartType": "metric", + "filter": "", + "headers": [] + }, + { + "id": "workOrdersNotIssued", + "name": "DSS_MUKTA_WORK_ORDERS_NOT_ISSUED", + "code": "", + "chartType": "metric", + "filter": "", + "headers": [] + }, + { + "id": "unemployedWageSeekers", + "name": "DSS_MUSTER_NOTCREATED", + "code": "", + "chartType": "metric", + "filter": "", + "headers": [] + } + ] + }, + { + "id": 102, + "name": "DSS_MUKTA_SLA_BREACHED", + "label": "DSS_MUKTA_SLA_BREACHED", + "vizType": "metric-collection", + "noUnit": true, + "isCollapsible": false, + "charts": [ + { + "id": "workOrdersNotIssued", + "name": "DSS_SLA_BRREACHED_ESTIMATE", + "code": "", + "chartType": "metric", + "filter": "", + "headers": [] + }, + { + "id": "workOrdersNotIssued", + "name": "DSS_SLA_BRREACHED_CONTRACT", + "code": "", + "chartType": "metric", + "filter": "", + "headers": [] + }, + { + "id": "workOrdersNotIssued", + "name": "DSS_SLA_BRREACHED_MUSTER", + "code": "", + "chartType": "metric", + "filter": "", + "headers": [] + }, + { + "id": "workOrdersNotIssued", + "name": "DSS_SLA_BRREACHED_BILLS", + "code": "", + "chartType": "metric", + "filter": "", + "headers": [] + } + ] + } + ] + }, + { + "row": 2, + "name": "DSS_MUKTA", + "vizArray": [ + { + "id": 201, + "name": "DSS_ULB_LEADERBOARD", + "dimensions": { + "height": 350, + "width": 12 + }, + "vizType": "chart", + "label": "", + "noUnit": false, + "isCollapsible": true, + "charts": [ + { + "id": "ulbWiseLeaderboard", + "name": "DSS_ULB_WISE_LEADERBOARD", + "code": "", + "chartType": "table", + "filter": "", + "headers": [], + "tabName": "Boundary" + } + ] + } + ] + }, + { + "row": 3, + "name": "DSS_MUKTA", + "vizArray": [ + { + "id": 301, + "name": "DSS_MUKTA_PROJECTS_CREATED", + "dimensions": { + "height": 250, + "width": 4 + }, + "label": "", + "vizType": "chart", + "isCollapsible": false, + "charts": [ + { + "id": "projectsByStatusHorizontal", + "name": "DSS_MUKTA_PROJECTS_BY_STATUS_HORIZONTAL", + "code": "", + "chartType": "horizontalBar", + "filter": "", + "headers": [], + "tabName": "Number" + } + ] + }, + { + "id": 302, + "name": "DSS_MUKTA_ESTIMATES_BY_STATUSES", + "dimensions": { + "height": 250, + "width": 4 + }, + "label": "", + "vizType": "chart", + "isCollapsible": false, + "charts": [ + { + "id": "estimatesByStatusHorizontal", + "name": "DSS_MUKTA_ESTIMATES_BY_STATUS_HORIZONTAL", + "code": "", + "chartType": "horizontalBar", + "filter": "", + "headers": [], + "tabName": "Number" + } + ] + }, + { + "id": 303, + "name": "DSS_MUKTA_CONTRACTS_BY_STATUSES", + "dimensions": { + "height": 250, + "width": 4 + }, + "label": "", + "vizType": "chart", + "isCollapsible": false, + "charts": [ + { + "id": "contractsByStatusHorizontal", + "name": "DSS_MUKTA_CONTRACTS_BY_STATUS_HORIZONTAL", + "code": "", + "chartType": "horizontalBar", + "filter": "", + "headers": [], + "tabName": "Number" + } + ] + }, + { + "id": 304, + "name": "DSS_MUKTA_MUSTER_ROLLS", + "dimensions": { + "height": 250, + "width": 4 + }, + "label": "", + "vizType": "chart", + "isCollapsible": false, + "charts": [ + { + "id": "musterRollsByStatus", + "name": "DSS_MUKTA_MUSTER_ROLLS_BY_STATUS", + "code": "", + "chartType": "horizontalBar", + "filter": "", + "headers": [] + } + ] + } + ] + }, + { + "row": 4, + "name": "DSS_MUKTA", + "vizArray": [ + { + "id": 401, + "name": "DSS_MONEY_TRANSFERED", + "dimensions": { + "height": 350, + "width": 7 + }, + "vizType": "chart", + "isCollapsible": false, + "label": "", + "charts": [ + { + "id": "cumulativeMoneyTransfered", + "name": "Monthly", + "code": "", + "chartType": "line", + "filter": "", + "headers": [] + } + ] + }, + { + "id": 402, + "name": "DSS_MUKTA_PAYMENTS_AND_LABOUR_ATTENDANCE", + "dimensions": { + "height": 350, + "width": 7 + }, + "vizType": "chart", + "isCollapsible": false, + "label": "", + "charts": [ + { + "id": "totalPayments", + "name": "", + "code": "", + "chartType": "bar", + "filter": "", + "headers": [], + "tabName": "Amount" + }, + { + "id": "totalAttendance", + "name": "", + "code": "", + "chartType": "bar", + "filter": "", + "headers": [], + "tabName": "Person Days" + } + ] + } + ] + }, + { + "row": 5, + "name": "DSS_MUKTA", + "vizArray": [ + { + "id": 501, + "name": "DSS_MUKTA_BY_PROJECT_TYPE", + "dimensions": { + "height": 250, + "width": 4 + }, + "label": "", + "vizType": "chart", + "isCollapsible": false, + "charts": [ + { + "id": "projectsByProjectNumberType", + "name": "DSS_MUKTA_PROJECTS_BY_PROJECT_TYPE", + "code": "", + "chartType": "donut", + "filter": "", + "headers": [], + "tabName": "Number" + }, + { + "id": "projectsByProjectAmountType", + "name": "DSS_MUKTA_PENDING_BILLS_BY_BILL_AMOUNT_TYPE", + "code": "", + "chartType": "donut", + "filter": "", + "headers": [], + "tabName": "Amount" + } + ] + }, + { + "id": 502, + "name": "DSS_MUKTA_PENDING_BILLS", + "dimensions": { + "height": 250, + "width": 4 + }, + "label": "", + "vizType": "chart", + "isCollapsible": false, + "charts": [ + { + "id": "pendingBillsByBillNumberType", + "name": "DSS_MUKTA_PENDING_BILLS_BY_BILL_NUMBER_TYPE", + "code": "", + "chartType": "donut", + "filter": "", + "headers": [], + "tabName": "Number" + }, + { + "id": "pendingBillsByBillAmountType", + "name": "DSS_MUKTA_PENDING_BILLS_BY_BILL_AMOUNT_TYPE", + "code": "", + "chartType": "donut", + "filter": "", + "headers": [], + "tabName": "Amount" + } + ] + }, + { + "id": 503, + "name": "DSS_PAYMENT_BY_GENDER", + "dimensions": { + "height": 350, + "width": 12 + }, + "vizType": "chart", + "label": "", + "noUnit": false, + "isCollapsible": true, + "charts": [ + { + "id": "payemntByGender", + "name": "DSS_PAYMENT_BY_GENDER", + "code": "", + "chartType": "table", + "filter": "", + "headers": [], + "tabName": "Boundary" + } + ] + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/works/egov-dss-dashboard/dashboard-analytics/RoleDashboardConfig.json b/works/egov-dss-dashboard/dashboard-analytics/RoleDashboardConfig.json new file mode 100644 index 000000000..87f54a4e8 --- /dev/null +++ b/works/egov-dss-dashboard/dashboard-analytics/RoleDashboardConfig.json @@ -0,0 +1,4 @@ +{ + "_comment": "TODO: denormalize the role & visualisations", + "roles": [] +} diff --git a/works/egov-dss-dashboard/dashboard-analytics/RoleDashboardMappingsConf.json b/works/egov-dss-dashboard/dashboard-analytics/RoleDashboardMappingsConf.json new file mode 100644 index 000000000..d58d4c8fa --- /dev/null +++ b/works/egov-dss-dashboard/dashboard-analytics/RoleDashboardMappingsConf.json @@ -0,0 +1,18 @@ +{ + "_comment": "Holds mapping for each role with and its associated dashboards", + "roles": [ + { + "_comment": "This role is for STADMIN who can access Mukta dshboard", + "roleId": 1, + "roleName": "STADMIN", + "isSuper": "", + "orgId": "", + "dashboards": [ + { + "name": "Mukta Dashboard", + "id": "mukta" + } + ] + } + ] +} diff --git a/works/egov-dss-dashboard/dashboard-analytics/TenantCodeNameMappings.json b/works/egov-dss-dashboard/dashboard-analytics/TenantCodeNameMappings.json new file mode 100644 index 000000000..57138bb84 --- /dev/null +++ b/works/egov-dss-dashboard/dashboard-analytics/TenantCodeNameMappings.json @@ -0,0 +1,4 @@ +{ + "comment" : "This mapping is used for resolving the miss match between MDM citynames and waterchargesconsumers citynames", + "ulbCityNamesMappings": [] +} diff --git a/works/egov-dss-dashboard/dashboard-analytics/getchart.json b/works/egov-dss-dashboard/dashboard-analytics/getchart.json new file mode 100644 index 000000000..5ab7e6ec0 --- /dev/null +++ b/works/egov-dss-dashboard/dashboard-analytics/getchart.json @@ -0,0 +1,43 @@ +{ + "$schema": "ain/getchart/schema1#", + "title": "getchart", + "description": "getchart api schema", + "type": "object", + "properties": { + "header": { + "type": "object", + "properties": { + "tenantId": { + "type": "string" + } + } + }, + "requestInfo": { + "type": "object", + "properties": { + "chartType":{ + "type":"string", + "enum":["bar","line","stackedbar","pie", "horizontalBar", "doughnut", "doubledonut","heat","radar"] + }, + "chartFormat":{ + "type":"string" + }, + "serviceApi":{ + "type":"string" + }, + "dates":{ + "type":"object", + "properties":{ + "startDate":{ + "type":"string" + }, + "endData":{ + "type":"string" + } + } + } + }, + "required": ["chartType","chartFormat", "serviceApi","dates"] + } + } +} diff --git a/works/egov-indexer/contractservices-indexer.yml b/works/egov-indexer/contractservices-indexer.yml new file mode 100644 index 000000000..9afad0110 --- /dev/null +++ b/works/egov-indexer/contractservices-indexer.yml @@ -0,0 +1,183 @@ +ServiceMaps: + serviceName: contract-event indexer + version: 1.0.0 + mappings: + - topic: save-contract + configKey: INDEX + indexes: + - name: contract-inbox + type: general + id: $.id,$.tenantId + jsonPath: $.contract + timeStampField: $.auditDetails.createdTime + isBulk: false + customJsonMapping: + indexMapping: { "Data":{"id":"","tenantId":"","contractStatus":"","contractNumber":"","executingAuthority":"","contractType":"","totalContractedAmount":"","securityDeposit":"","agreementDate":"","issueDate":"","defectLiabilityPeriod":"","orgId":"","startDate":"","endDate":"","completionPeriod":"","status":"","lineItems":[],"@timestamp":"timestamp","auditDetails":{},"additionalDetails":{},"currentProcessInstance":{},"history":{}}} + fieldMapping: + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.wfStatus + outJsonPath: $.Data.contractStatus + - inJsonPath: $.contractNumber + outJsonPath: $.Data.contractNumber + - inJsonPath: $.executingAuthority + outJsonPath: $.Data.executingAuthority + - inJsonPath: $.contractType + outJsonPath: $.Data.contractType + - inJsonPath: $.totalContractedAmount + outJsonPath: $.Data.totalContractedAmount + - inJsonPath: $.securityDeposit + outJsonPath: $.Data.securityDeposit + - inJsonPath: $.agreementDate + outJsonPath: $.Data.agreementDate + - inJsonPath: $.issueDate + outJsonPath: $.Data.issueDate + - inJsonPath: $.defectLiabilityPeriod + outJsonPath: $.Data.defectLiabilityPeriod + - inJsonPath: $.orgId + outJsonPath: $.Data.orgId + - inJsonPath: $.startDate + outJsonPath: $.Data.startDate + - inJsonPath: $.endDate + outJsonPath: $.Data.endDate + - inJsonPath: $.completionPeriod + outJsonPath: $.Data.completionPeriod + - inJsonPath: $.status + outJsonPath: $.Data.status + - inJsonPath: $.lineItems + outJsonPath: $.Data.lineItems + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails + - inJsonPath: $.additionalDetails + outJsonPath: $.Data.additionalDetails + - inJsonPath: $.processInstance + outJsonPath: $.Data.currentProcessInstance + externalUriMapping: + - path: http://egov-workflow-v2.egov:8080/egov-workflow-v2/egov-wf/process/_search + queryParam: businessIds=$.contractNumber,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.jalandhar","roles": [ { "name": "Employee","code": "EMPLOYEE","tenantId": "pb.jalandhar" } ] } } } + uriResponseMapping: + - inJsonPath: $.ProcessInstances + outJsonPath: $.Data.history + + - topic: update-contract + configKey: INDEX + indexes: + - name: contract-inbox + type: general + id: $.id,$.tenantId + jsonPath: $.contract + timeStampField: $.auditDetails.createdTime + customJsonMapping: + indexMapping: { "Data": { "id": "","tenantId": "","contractStatus":"","contractNumber": "","executingAuthority": "","contractType": "","totalContractedAmount": "","securityDeposit": "","agreementDate": "","issueDate": "","defectLiabilityPeriod": "","orgId": "","startDate": "","endDate": "","completionPeriod": "","status": "","lineItems": [],"@timestamp": "timestamp","auditDetails": {},"additionalDetails": {},"currentProcessInstance": {},"history": {}}} + fieldMapping: + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.wfStatus + outJsonPath: $.Data.contractStatus + - inJsonPath: $.contractNumber + outJsonPath: $.Data.contractNumber + - inJsonPath: $.executingAuthority + outJsonPath: $.Data.executingAuthority + - inJsonPath: $.contractType + outJsonPath: $.Data.contractType + - inJsonPath: $.totalContractedAmount + outJsonPath: $.Data.totalContractedAmount + - inJsonPath: $.securityDeposit + outJsonPath: $.Data.securityDeposit + - inJsonPath: $.agreementDate + outJsonPath: $.Data.agreementDate + - inJsonPath: $.issueDate + outJsonPath: $.Data.issueDate + - inJsonPath: $.defectLiabilityPeriod + outJsonPath: $.Data.defectLiabilityPeriod + - inJsonPath: $.orgId + outJsonPath: $.Data.orgId + - inJsonPath: $.startDate + outJsonPath: $.Data.startDate + - inJsonPath: $.endDate + outJsonPath: $.Data.endDate + - inJsonPath: $.completionPeriod + outJsonPath: $.Data.completionPeriod + - inJsonPath: $.status + outJsonPath: $.Data.status + - inJsonPath: $.lineItems + outJsonPath: $.Data.lineItems + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails + - inJsonPath: $.additionalDetails + outJsonPath: $.Data.additionalDetails + - inJsonPath: $.processInstance + outJsonPath: $.Data.currentProcessInstance + externalUriMapping: + - path: http://egov-workflow-v2.egov:8080/egov-workflow-v2/egov-wf/process/_search + queryParam: businessIds=$.contractNumber,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.jalandhar","roles": [ { "name": "Employee","code": "EMPLOYEE","tenantId": "pb.jalandhar" } ] } } } + uriResponseMapping: + - inJsonPath: $.ProcessInstances + outJsonPath: $.Data.history + + + - topic: contract-legacyIndex + configKey: LEGACYINDEX + indexes: + - name: contract-inbox-legacyindex + type: general + id: $.id,$.tenantId + isBulk: true + jsonPath: $.contract.* + timeStampField: $.auditDetails.createdTime + customJsonMapping: + indexMapping: { "Data": { "id": "","tenantId": "","contractStatus":"","contractNumber": "","executingAuthority": "","contractType": "","totalContractedAmount": "","securityDeposit": "","agreementDate": "","issueDate": "","defectLiabilityPeriod": "","orgId": "","startDate": "","endDate": "","completionPeriod": "","status": "","lineItems": [ ],"@timestamp": "timestamp","auditDetails": { },"additionalDetails": { },"currentProcessInstance": { },"history": { } } } + fieldMapping: + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.wfStatus + outJsonPath: $.Data.contractStatus + - inJsonPath: $.contractNumber + outJsonPath: $.Data.contractNumber + - inJsonPath: $.executingAuthority + outJsonPath: $.Data.executingAuthority + - inJsonPath: $.contractType + outJsonPath: $.Data.contractType + - inJsonPath: $.totalContractedAmount + outJsonPath: $.Data.totalContractedAmount + - inJsonPath: $.securityDeposit + outJsonPath: $.Data.securityDeposit + - inJsonPath: $.agreementDate + outJsonPath: $.Data.agreementDate + - inJsonPath: $.issueDate + outJsonPath: $.Data.issueDate + - inJsonPath: $.defectLiabilityPeriod + outJsonPath: $.Data.defectLiabilityPeriod + - inJsonPath: $.orgId + outJsonPath: $.Data.orgId + - inJsonPath: $.startDate + outJsonPath: $.Data.startDate + - inJsonPath: $.endDate + outJsonPath: $.Data.endDate + - inJsonPath: $.completionPeriod + outJsonPath: $.Data.completionPeriod + - inJsonPath: $.status + outJsonPath: $.Data.status + - inJsonPath: $.lineItems + outJsonPath: $.Data.lineItems + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails + - inJsonPath: $.additionalDetails + outJsonPath: $.Data.additionalDetails + - inJsonPath: $.processInstance + outJsonPath: $.Data.currentProcessInstance + externalUriMapping: + - path: http://egov-workflow-v2.egov:8080/egov-workflow-v2/egov-wf/process/_search + queryParam: businessIds=$.contractNumber,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.jalandhar","roles": [ { "name": "Employee","code": "EMPLOYEE","tenantId": "pb.jalandhar" } ] } } } + uriResponseMapping: + - inJsonPath: $.ProcessInstances + outJsonPath: $.Data.history \ No newline at end of file diff --git a/works/egov-indexer/estimateservices-indexer.yml b/works/egov-indexer/estimateservices-indexer.yml new file mode 100644 index 000000000..49a07a2f1 --- /dev/null +++ b/works/egov-indexer/estimateservices-indexer.yml @@ -0,0 +1,162 @@ +ServiceMaps: + serviceName: estimate-event indexer + version: 1.0.0 + mappings: + - topic: enrich-estimate + configKey: INDEX + indexes: + - name: estimate-inbox-v3 + type: general + id: $.id,$.tenantId + jsonPath: $.estimate + timeStampField: $.auditDetails.createdTime + isBulk: false + customJsonMapping: + indexMapping: { "Data":{"id":"","tenantId":"","estimateNumber":"","projectId":"","proposalDate":"","status":"","wfStatus":"","name":"","referenceNumber":"","description":"","executingDepartment":"","address":{},"estimateDetails":[],"@timestamp":"timestamp","auditDetails":{},"additionalDetails":{},"project":{},"currentProcessInstance":[],"history":{}}} + fieldMapping: + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.estimateNumber + outJsonPath: $.Data.estimateNumber + - inJsonPath: $.projectId + outJsonPath: $.Data.projectId + - inJsonPath: $.proposalDate + outJsonPath: $.Data.proposalDate + - inJsonPath: $.status + outJsonPath: $.Data.status + - inJsonPath: $.wfStatus + outJsonPath: $.Data.wfStatus + - inJsonPath: $.name + outJsonPath: $.Data.name + - inJsonPath: $.referenceNumber + outJsonPath: $.Data.referenceNumber + - inJsonPath: $.description + outJsonPath: $.Data.description + - inJsonPath: $.executingDepartment + outJsonPath: $.Data.executingDepartment + - inJsonPath: $.address + outJsonPath: $.Data.address + - inJsonPath: $.estimateDetails + outJsonPath: $.Data.estimateDetails + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails + - inJsonPath: $.additionalDetails + outJsonPath: $.Data.additionalDetails + - inJsonPath: $.project + outJsonPath: $.Data.project + - inJsonPath: $.ProcessInstances + outJsonPath: $.Data.currentProcessInstance + externalUriMapping: + - path: http://egov-workflow-v2.egov:8080/egov-workflow-v2/egov-wf/process/_search + queryParam: businessIds=$.estimateNumber,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.jalandhar","roles":[{"name":"Employee","code":"EMPLOYEE","tenantId":"pb.jalandhar"}]}}} + uriResponseMapping: + - inJsonPath: $.ProcessInstances + outJsonPath: $.Data.history + + - topic: update-estimate + configKey: INDEX + indexes: + - name: estimate-inbox-v3 + type: general + id: $.id,$.tenantId + jsonPath: $.estimate + timeStampField: $.auditDetails.createdTime + customJsonMapping: + indexMapping: { "Data":{"id":"","tenantId":"","estimateNumber":"","projectId":"","proposalDate":"","status":"","wfStatus":"","name":"","referenceNumber":"","description":"","executingDepartment":"","address":{},"estimateDetails":[],"@timestamp":"timestamp","auditDetails":{},"additionalDetails":{},"currentProcessInstance":{}, "history":{}}} + fieldMapping: + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.estimateNumber + outJsonPath: $.Data.estimateNumber + - inJsonPath: $.projectId + outJsonPath: $.Data.projectId + - inJsonPath: $.proposalDate + outJsonPath: $.Data.proposalDate + - inJsonPath: $.status + outJsonPath: $.Data.status + - inJsonPath: $.wfStatus + outJsonPath: $.Data.wfStatus + - inJsonPath: $.name + outJsonPath: $.Data.name + - inJsonPath: $.referenceNumber + outJsonPath: $.Data.referenceNumber + - inJsonPath: $.description + outJsonPath: $.Data.description + - inJsonPath: $.executingDepartment + outJsonPath: $.Data.executingDepartment + - inJsonPath: $.address + outJsonPath: $.Data.address + - inJsonPath: $.estimateDetails + outJsonPath: $.Data.estimateDetails + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails + - inJsonPath: $.additionalDetails + outJsonPath: $.Data.additionalDetails + externalUriMapping: + - path: http://egov-workflow-v2.egov:8080/egov-workflow-v2/egov-wf/process/_search + queryParam: businessIds=$.estimateNumber,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.jalandhar","roles":[{"name":"Employee","code":"EMPLOYEE","tenantId":"pb.jalandhar"}]}}} + uriResponseMapping: + - inJsonPath: $.ProcessInstances + outJsonPath: $.Data.history + + - topic: estimate-legacyIndex + configKey: LEGACYINDEX + indexes: + - name: estimate-inbox-legacyindex + type: general + id: $.id,$.tenantId + isBulk: true + jsonPath: $.estimates.* + timeStampField: $.auditDetails.createdTime + customJsonMapping: + indexMapping: { "Data":{"id":"","tenantId":"","estimateNumber":"","projectId":"","proposalDate":"","status":"","wfStatus":"","name":"","referenceNumber":"","description":"","executingDepartment":"","address":{},"estimateDetails":[],"@timestamp":"timestamp","auditDetails":{},"additionalDetails":{},"currentProcessInstance":{}, "history":{}}} + fieldMapping: + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.estimateNumber + outJsonPath: $.Data.estimateNumber + - inJsonPath: $.projectId + outJsonPath: $.Data.projectId + - inJsonPath: $.proposalDate + outJsonPath: $.Data.proposalDate + - inJsonPath: $.status + outJsonPath: $.Data.status + - inJsonPath: $.wfStatus + outJsonPath: $.Data.wfStatus + - inJsonPath: $.name + outJsonPath: $.Data.name + - inJsonPath: $.referenceNumber + outJsonPath: $.Data.referenceNumber + - inJsonPath: $.description + outJsonPath: $.Data.description + - inJsonPath: $.executingDepartment + outJsonPath: $.Data.executingDepartment + - inJsonPath: $.address + outJsonPath: $.Data.address + - inJsonPath: $.estimateDetails + outJsonPath: $.Data.estimateDetails + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails + - inJsonPath: $.additionalDetails + outJsonPath: $.Data.additionalDetails + externalUriMapping: + - path: http://egov-workflow-v2.egov:8080/egov-workflow-v2/egov-wf/process/_search + queryParam: businessIds=$.estimateNumber,history=false,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.jalandhar","roles":[{"name":"Employee","code":"EMPLOYEE","tenantId":"pb.jalandhar"}]}}} + uriResponseMapping: + - inJsonPath: $.ProcessInstances + outJsonPath: $.Data.currentProcessInstance + - path: http://egov-workflow-v2.egov:8080/egov-workflow-v2/egov-wf/process/_search + queryParam: businessIds=$.estimateNumber,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.jalandhar","roles":[{"name":"Employee","code":"EMPLOYEE","tenantId":"pb.jalandhar"}]}}} + uriResponseMapping: + - inJsonPath: $.ProcessInstances + outJsonPath: $.Data.history diff --git a/works/egov-indexer/expensebill-indexer.yml b/works/egov-indexer/expensebill-indexer.yml new file mode 100644 index 000000000..892fab085 --- /dev/null +++ b/works/egov-indexer/expensebill-indexer.yml @@ -0,0 +1,195 @@ +ServiceMaps: + serviceName: expense-bill indexer + version: 1.0.0 + mappings: + - topic: expense-bill-create + configKey: INDEX + indexes: + - name: expense-bill-index + type: general + id: $.id,$.tenantId + jsonPath: $.bill + isBulk: false + timeStampField: $.auditDetails.createdTime + customJsonMapping: + indexMapping: { "Data":{"id":"","tenantId":"","billNumber":"","billDate":"","dueDate":"","totalAmount":"","totalPaidAmount":"","businessService":"","referenceId":"","fromPeriod":"","toPeriod":"","paymentStatus":"","status":"","payer":{},"billDetails":[],"additionalDetails":{},"auditDetails":{},"currentProcessInstance":{},"history":{}}} + fieldMapping: + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.billNumber + outJsonPath: $.Data.billNumber + - inJsonPath: $.billDate + outJsonPath: $.Data.billDate + - inJsonPath: $.dueDate + outJsonPath: $.Data.dueDate + - inJsonPath: $.totalAmount + outJsonPath: $.Data.totalAmount + - inJsonPath: $.totalPaidAmount + outJsonPath: $.Data.totalPaidAmount + - inJsonPath: $.businessService + outJsonPath: $.Data.businessService + - inJsonPath: $.referenceId + outJsonPath: $.Data.referenceId + - inJsonPath: $.fromPeriod + outJsonPath: $.Data.fromPeriod + - inJsonPath: $.toPeriod + outJsonPath: $.Data.toPeriod + - inJsonPath: $.paymentStatus + outJsonPath: $.Data.paymentStatus + - inJsonPath: $.status + outJsonPath: $.Data.status + - inJsonPath: $.payer + outJsonPath: $.Data.payer + - inJsonPath: $.billDetails + outJsonPath: $.Data.billDetails + - inJsonPath: $.additionalDetails + outJsonPath: $.Data.additionalDetails + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails + - inJsonPath: $.additionalDetails.locality + outJsonPath: $.Data.locality + - inJsonPath: $.additionalDetails.ward + outJsonPath: $.Data.ward + - inJsonPath: $.additionalDetails.projectName + outJsonPath: $.Data.projectName + - inJsonPath: $.additionalDetails.orgName + outJsonPath: $.Data.orgName + externalUriMapping: + - path: http://egov-workflow-v2.egov:8080/egov-workflow-v2/egov-wf/process/_search + queryParam: businessIds=$.billNumber,history=true,tenantId=$.tenantId + apiRequest: {"RequestInfo":{"apiId":"org.egov.bill","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":"pg.citya","roles":[{"name":"Employee","code":"EMPLOYEE","tenantId":"pg.citya"}]}}} + uriResponseMapping: + - inJsonPath: $.ProcessInstances + outJsonPath: $.Data.history + - inJsonPath: $.ProcessInstances[0] + outJsonPath: $.Data.currentProcessInstance + + - topic: expense-bill-update + configKey: INDEX + indexes: + - name: expense-bill-index + type: general + id: $.id,$.tenantId + jsonPath: $.bill + isBulk: false + timeStampField: $.auditDetails.createdTime + customJsonMapping: + indexMapping: { "Data":{"id":"","tenantId":"","billNumber":"","billDate":"","dueDate":"","totalAmount":"","totalPaidAmount":"","businessService":"","referenceId":"","fromPeriod":"","toPeriod":"","paymentStatus":"","status":"","payer":{},"billDetails":[],"additionalDetails":{},"auditDetails":{},"currentProcessInstance":{},"history":{}}} + fieldMapping: + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.billNumber + outJsonPath: $.Data.billNumber + - inJsonPath: $.billDate + outJsonPath: $.Data.billDate + - inJsonPath: $.dueDate + outJsonPath: $.Data.dueDate + - inJsonPath: $.totalAmount + outJsonPath: $.Data.totalAmount + - inJsonPath: $.totalPaidAmount + outJsonPath: $.Data.totalPaidAmount + - inJsonPath: $.businessService + outJsonPath: $.Data.businessService + - inJsonPath: $.referenceId + outJsonPath: $.Data.referenceId + - inJsonPath: $.fromPeriod + outJsonPath: $.Data.fromPeriod + - inJsonPath: $.toPeriod + outJsonPath: $.Data.toPeriod + - inJsonPath: $.paymentStatus + outJsonPath: $.Data.paymentStatus + - inJsonPath: $.status + outJsonPath: $.Data.status + - inJsonPath: $.payer + outJsonPath: $.Data.payer + - inJsonPath: $.billDetails + outJsonPath: $.Data.billDetails + - inJsonPath: $.additionalDetails + outJsonPath: $.Data.additionalDetails + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails + - inJsonPath: $.additionalDetails.locality + outJsonPath: $.Data.locality + - inJsonPath: $.additionalDetails.ward + outJsonPath: $.Data.ward + - inJsonPath: $.additionalDetails.projectName + outJsonPath: $.Data.projectName + - inJsonPath: $.additionalDetails.orgName + outJsonPath: $.Data.orgName + externalUriMapping: + - path: http://egov-workflow-v2.egov:8080/egov-workflow-v2/egov-wf/process/_search + queryParam: businessIds=$.billNumber,history=true,tenantId=$.tenantId + apiRequest: {"RequestInfo":{"apiId":"org.egov.bill","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":"pg.citya","roles":[{"name":"Employee","code":"EMPLOYEE","tenantId":"pg.citya"}]}}} + uriResponseMapping: + - inJsonPath: $.ProcessInstances + outJsonPath: $.Data.history + - inJsonPath: $.ProcessInstances[0] + outJsonPath: $.Data.currentProcessInstance + + - topic: expense-bill-legacyIndex + configKey: LEGACYINDEX + indexes: + - name: expense-bill-legacyIndex + type: general + id: $.id,$.tenantId + jsonPath: $.bill + isBulk: false + timeStampField: $.auditDetails.createdTime + customJsonMapping: + indexMapping: { "Data":{"id":"","tenantId":"","billNumber":"","billDate":"","dueDate":"","totalAmount":"","totalPaidAmount":"","businessService":"","referenceId":"","fromPeriod":"","toPeriod":"","paymentStatus":"","status":"","payer":{},"billDetails":[],"additionalDetails":{},"auditDetails":{},"history":{}}} + fieldMapping: + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.billNumber + outJsonPath: $.Data.billNumber + - inJsonPath: $.billDate + outJsonPath: $.Data.billDate + - inJsonPath: $.dueDate + outJsonPath: $.Data.dueDate + - inJsonPath: $.totalAmount + outJsonPath: $.Data.totalAmount + - inJsonPath: $.totalPaidAmount + outJsonPath: $.Data.totalPaidAmount + - inJsonPath: $.businessService + outJsonPath: $.Data.businessService + - inJsonPath: $.referenceId + outJsonPath: $.Data.referenceId + - inJsonPath: $.fromPeriod + outJsonPath: $.Data.fromPeriod + - inJsonPath: $.toPeriod + outJsonPath: $.Data.toPeriod + - inJsonPath: $.paymentStatus + outJsonPath: $.Data.paymentStatus + - inJsonPath: $.status + outJsonPath: $.Data.status + - inJsonPath: $.payer + outJsonPath: $.Data.payer + - inJsonPath: $.billDetails + outJsonPath: $.Data.billDetails + - inJsonPath: $.additionalDetails + outJsonPath: $.Data.additionalDetails + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails + - inJsonPath: $.additionalDetails.locality + outJsonPath: $.Data.locality + - inJsonPath: $.additionalDetails.ward + outJsonPath: $.Data.ward + - inJsonPath: $.additionalDetails.projectName + outJsonPath: $.Data.projectName + - inJsonPath: $.additionalDetails.orgName + outJsonPath: $.Data.orgName + externalUriMapping: + - path: http://egov-workflow-v2.egov:8080/egov-workflow-v2/egov-wf/process/_search + queryParam: businessIds=$.billNumber,history=true,tenantId=$.tenantId + apiRequest: {"RequestInfo":{"apiId":"org.egov.bill","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":"pg.citya","roles":[{"name":"Employee","code":"EMPLOYEE","tenantId":"pg.citya"}]}}} + uriResponseMapping: + - inJsonPath: $.ProcessInstances + outJsonPath: $.Data.history + - inJsonPath: $.ProcessInstances[0] + outJsonPath: $.Data.currentProcessInstance diff --git a/works/egov-indexer/individual-indexer.yml b/works/egov-indexer/individual-indexer.yml new file mode 100644 index 000000000..47f2d56eb --- /dev/null +++ b/works/egov-indexer/individual-indexer.yml @@ -0,0 +1,190 @@ +ServiceMaps: + serviceName: individual + version: 1.0.0 + mappings: + - topic: save-individual-topic + configKey: INDEX + indexes: + - name: individual-index-v1 + type: individual + id: $.id + isBulk: true + jsonPath: $.* + timeStampField: $.auditDetails.createdTime + customJsonMapping: + indexMapping: { "Data":{"id":"","individualId":"","tenantId":"","clientReferenceId":"","userId":"","name":{},"dateOfBirth":"","gender":"","bloodGroup":"","mobileNumber":"","altContactNumber":"","email":"","address":[],"fatherName":"","husbandName":"","relationship":"","identifiers":[],"skills":[],"photo":"","additionalFields":{},"socialCategoryKey":"","socialCategoryValue":"","isDeleted":"","rowVersion":"","@timestamp":"","auditDetails":{}}} + fieldMapping: + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.individualId + outJsonPath: $.Data.individualId + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.clientReferenceId + outJsonPath: $.Data.clientReferenceId + - inJsonPath: $.userId + outJsonPath: $.Data.userId + - inJsonPath: $.name + outJsonPath: $.Data.name + - inJsonPath: $.dateOfBirth + outJsonPath: $.Data.dateOfBirth + - inJsonPath: $.gender + outJsonPath: $.Data.gender + - inJsonPath: $.bloodGroup + outJsonPath: $.Data.bloodGroup + - inJsonPath: $.mobileNumber + outJsonPath: $.Data.mobileNumber + - inJsonPath: $.altContactNumber + outJsonPath: $.Data.altContactNumber + - inJsonPath: $.email + outJsonPath: $.Data.email + - inJsonPath: $.address + outJsonPath: $.Data.address + - inJsonPath: $.fatherName + outJsonPath: $.Data.fatherName + - inJsonPath: $.husbandName + outJsonPath: $.Data.husbandName + - inJsonPath: $.relationship + outJsonPath: $.Data.relationship + - inJsonPath: $.identifiers + outJsonPath: $.Data.identifiers + - inJsonPath: $.skills + outJsonPath: $.Data.skills + - inJsonPath: $.photo + outJsonPath: $.Data.photo + - inJsonPath: $.additionalFields + outJsonPath: $.Data.additionalFields + - inJsonPath: $.additionalFields.fields[0].key + outJsonPath: $.Data.socialCategoryKey + - inJsonPath: $.additionalFields.fields[0].value + outJsonPath: $.Data.socialCategoryValue + - inJsonPath: $.isDeleted + outJsonPath: $.Data.isDeleted + - inJsonPath: $.rowVersion + outJsonPath: $.Data.rowVersion + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails + - topic: update-individual-topic + configKey: INDEX + indexes: + - name: individual-index-v1 + type: individual + id: $.id + isBulk: true + jsonPath: $.* + timeStampField: $.auditDetails.lastModifiedTime + customJsonMapping: + indexMapping: { "Data": { "id": "","individualId": "","tenantId": "","clientReferenceId": "","userId": "","name": { },"dateOfBirth": "","gender": "","bloodGroup": "","mobileNumber": "","altContactNumber": "","email": "","address": [ ],"fatherName": "","husbandName": "","relationship": "","identifiers": [ ],"skills": [ ],"photo": "","additionalFields": { },"socialCategoryKey":"","socialCategoryValue":"","isDeleted": "","rowVersion": "","@timestamp": "","auditDetails": { } } } + fieldMapping: + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.individualId + outJsonPath: $.Data.individualId + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.clientReferenceId + outJsonPath: $.Data.clientReferenceId + - inJsonPath: $.userId + outJsonPath: $.Data.userId + - inJsonPath: $.name + outJsonPath: $.Data.name + - inJsonPath: $.dateOfBirth + outJsonPath: $.Data.dateOfBirth + - inJsonPath: $.gender + outJsonPath: $.Data.gender + - inJsonPath: $.bloodGroup + outJsonPath: $.Data.bloodGroup + - inJsonPath: $.mobileNumber + outJsonPath: $.Data.mobileNumber + - inJsonPath: $.altContactNumber + outJsonPath: $.Data.altContactNumber + - inJsonPath: $.email + outJsonPath: $.Data.email + - inJsonPath: $.address + outJsonPath: $.Data.address + - inJsonPath: $.fatherName + outJsonPath: $.Data.fatherName + - inJsonPath: $.husbandName + outJsonPath: $.Data.husbandName + - inJsonPath: $.relationship + outJsonPath: $.Data.relationship + - inJsonPath: $.identifiers + outJsonPath: $.Data.identifiers + - inJsonPath: $.skills + outJsonPath: $.Data.skills + - inJsonPath: $.photo + outJsonPath: $.Data.photo + - inJsonPath: $.additionalFields + outJsonPath: $.Data.additionalFields + - inJsonPath: $.additionalFields.fields[0].key + outJsonPath: $.Data.socialCategoryKey + - inJsonPath: $.additionalFields.fields[0].value + outJsonPath: $.Data.socialCategoryValue + - inJsonPath: $.isDeleted + outJsonPath: $.Data.isDeleted + - inJsonPath: $.rowVersion + outJsonPath: $.Data.rowVersion + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails + - topic: delete-individual-topic + configKey: INDEX + indexes: + - name: individual-index-v1 + type: individual + id: $.id + isBulk: true + jsonPath: $.* + timeStampField: $.auditDetails.lastModifiedTime + customJsonMapping: + indexMapping: { "Data": { "id": "","individualId": "","tenantId": "","clientReferenceId": "","userId": "","name": { },"dateOfBirth": "","gender": "","bloodGroup": "","mobileNumber": "","altContactNumber": "","email": "","address": [ ],"fatherName": "","husbandName": "","relationship": "","identifiers": [ ],"skills": [ ],"photo": "","additionalFields": { },"socialCategoryKey":"","socialCategoryValue":"","isDeleted": "","rowVersion": "","@timestamp": "","auditDetails": { } } } + fieldMapping: + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.individualId + outJsonPath: $.Data.individualId + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.clientReferenceId + outJsonPath: $.Data.clientReferenceId + - inJsonPath: $.userId + outJsonPath: $.Data.userId + - inJsonPath: $.name + outJsonPath: $.Data.name + - inJsonPath: $.dateOfBirth + outJsonPath: $.Data.dateOfBirth + - inJsonPath: $.gender + outJsonPath: $.Data.gender + - inJsonPath: $.bloodGroup + outJsonPath: $.Data.bloodGroup + - inJsonPath: $.mobileNumber + outJsonPath: $.Data.mobileNumber + - inJsonPath: $.altContactNumber + outJsonPath: $.Data.altContactNumber + - inJsonPath: $.email + outJsonPath: $.Data.email + - inJsonPath: $.address + outJsonPath: $.Data.address + - inJsonPath: $.fatherName + outJsonPath: $.Data.fatherName + - inJsonPath: $.husbandName + outJsonPath: $.Data.husbandName + - inJsonPath: $.relationship + outJsonPath: $.Data.relationship + - inJsonPath: $.identifiers + outJsonPath: $.Data.identifiers + - inJsonPath: $.skills + outJsonPath: $.Data.skills + - inJsonPath: $.photo + outJsonPath: $.Data.photo + - inJsonPath: $.additionalFields + outJsonPath: $.Data.additionalFields + - inJsonPath: $.additionalFields.fields[0].key + outJsonPath: $.Data.socialCategoryKey + - inJsonPath: $.additionalFields.fields[0].value + outJsonPath: $.Data.socialCategoryValue + - inJsonPath: $.isDeleted + outJsonPath: $.Data.isDeleted + - inJsonPath: $.rowVersion + outJsonPath: $.Data.rowVersion + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails diff --git a/works/egov-indexer/loiservices-indexer.yml b/works/egov-indexer/loiservices-indexer.yml new file mode 100644 index 000000000..c63b3e55c --- /dev/null +++ b/works/egov-indexer/loiservices-indexer.yml @@ -0,0 +1,129 @@ +ServiceMaps: + serviceName: loi Service - rainmaker + version: 1.0.0 + mappings: + - topic: save-loi + configKey: INDEX + indexes: + - name: loi-service + type: general + id: $.id,$.tenantId + jsonPath: $.letterOfIndent + timeStampField: $.auditDetails.createdTime + customJsonMapping: + indexMapping: { "Data":{"tenantId":"","id":"","letterOfIndentNumber":"","workPackageNumber":"","workIdentificationNumber":"","fileNumber":"","fileDate":"","negotiatedPercentage":"","agreementDate":"","contractorId":"","securityDeposit":"","bankGuarantee":"","emdAmount":"","contractPeriod":"","defectLiabilityPeriod":"","oicId":"","letterStatus":""}} + fieldMapping: + - inJsonPath: $.applicationStatus.state + outJsonPath: $.Data.workflow.state + - inJsonPath: $.processInstance.action + outJsonPath: $.Data.workflow.action + - inJsonPath: $.processInstance.assignes.*.uuid + outJsonPath: $.Data.workflow.assignes + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.letterOfIndentNumber + outJsonPath: $.Data.letterOfIndentNumber + - inJsonPath: $.workPackageNumber + outJsonPath: $.Data.workPackageNumber + - inJsonPath: $.workIdentificationNumber + outJsonPath: $.Data.workIdentificationNumber + - inJsonPath: $.fileNumber + outJsonPath: $.Data.fileNumber + - inJsonPath: $.fileDate + outJsonPath: $.Data.fileDate + - inJsonPath: $.negotiatedPercentage + outJsonPath: $.Data.negotiatedPercentage + - inJsonPath: $.agreementDate + outJsonPath: $.Data.agreementDate + - inJsonPath: $.contractorId + outJsonPath: $.Data.contractorId + - inJsonPath: $.securityDeposit + outJsonPath: $.Data.securityDeposit + - inJsonPath: $.bankGuarantee + outJsonPath: $.Data.bankGuarantee + - inJsonPath: $.emdAmount + outJsonPath: $.Data.emdAmount + - inJsonPath: $.contractPeriod + outJsonPath: $.Data.contractPeriod + - inJsonPath: $.defectLiabilityPeriod + outJsonPath: $.Data.defectLiabilityPeriod + - inJsonPath: $.oicId + outJsonPath: $.Data.oicId + - inJsonPath: $.letterStatus + outJsonPath: $.Data.letterStatus + + + + - topic: update-loi + configKey: INDEX + indexes: + - name: loi-services + type: general + id: $.id,$.tenantId + jsonPath: $.Challan + timeStampField: $.auditDetails.createdTime + customJsonMapping: + indexMapping: {"Data":{"workflow": {"state": {}, "action": "", "assignes": []},"applicationNo":"","tenantId":"","street":"","locality":"","businessService":"","challanNo":"","referenceId":"","description":"","accountId":"","additionalDetail":{},"source":"","taxPeriodFrom":"","taxPeriodTo":"","amount":[],"filestoreid":"","additionalDetails":{},"applicationStatus":"","vendor":"","typeOfExpense":"","billDate":"","billIssuedDate":"","paidDate":"","isBillPaid":"","vendorName":"","totalAmount":"","@timestamp":"timestamp","history":{},"ward":"" }} + fieldMapping: + - inJsonPath: $.applicationStatus.state + outJsonPath: $.Data.workflow.state + - inJsonPath: $.processInstance.action + outJsonPath: $.Data.workflow.action + - inJsonPath: $.processInstance.assignes.*.uuid + outJsonPath: $.Data.workflow.assignes + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.address.street + outJsonPath: $.Data.street + - inJsonPath: $.address.locality.code + outJsonPath: $.Data.locality + - inJsonPath: $.businessService + outJsonPath: $.Data.businessService + - inJsonPath: $.challanNo + outJsonPath: $.Data.challanNo + - inJsonPath: $.referenceId + outJsonPath: $.Data.referenceId + - inJsonPath: $.description + outJsonPath: $.Data.description + - inJsonPath: $.accountId + outJsonPath: $.Data.accountId + - inJsonPath: $.additionalDetail + outJsonPath: $.Data.additionalDetail + - inJsonPath: $.source + outJsonPath: $.Data.source + - inJsonPath: $.taxPeriodFrom + outJsonPath: $.Data.taxPeriodFrom + - inJsonPath: $.taxPeriodTo + outJsonPath: $.Data.taxPeriodTo + - inJsonPath: $.amount + outJsonPath: $.Data.amount + - inJsonPath: $.filestoreid + outJsonPath: $.Data.filestoreid + - inJsonPath: $.additionalDetails + outJsonPath: $.Data.additionalDetails + - inJsonPath: $.applicationStatus + outJsonPath: $.Data.applicationStatus + - inJsonPath: $.vendor + outJsonPath: $.Data.vendor + - inJsonPath: $.typeOfExpense + outJsonPath: $.Data.typeOfExpense + - inJsonPath: $.billDate + outJsonPath: $.Data.billDate + - inJsonPath: $.billIssuedDate + outJsonPath: $.Data.billIssuedDate + - inJsonPath: $.paidDate + outJsonPath: $.Data.paidDate + - inJsonPath: $.isBillPaid + outJsonPath: $.Data.isBillPaid + - inJsonPath: $.vendorName + outJsonPath: $.Data.vendorName + - inJsonPath: $.totalAmount + outJsonPath: $.Data.totalAmount + - inJsonPath: $.@timestamp + outJsonPath: $.Data.@timestamp + + - \ No newline at end of file diff --git a/works/egov-indexer/musterservices-indexer.yml b/works/egov-indexer/musterservices-indexer.yml new file mode 100644 index 000000000..1be477fb5 --- /dev/null +++ b/works/egov-indexer/musterservices-indexer.yml @@ -0,0 +1,147 @@ +ServiceMaps: + serviceName: muster-event indexer + version: 1.0.0 + mappings: + - topic: save-musterroll + configKey: INDEX + indexes: + - name: muster-inbox + type: general + id: $.id,$.tenantId + jsonPath: $.musterRoll + timeStampField: $.auditDetails.createdTime + isBulk: false + customJsonMapping: + indexMapping: { "Data":{"id":"","tenantId":"","musterRollNumber":"","registerId":"","status":"","musterRollStatus":"","startDate":"","endDate":"","individualEntries":[],"referenceId":"","serviceCode":"","@timestamp":"timestamp","auditDetails":{},"additionalDetails":{},"currentProcessInstance":{},"history":{}}} + fieldMapping: + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.musterRollNumber + outJsonPath: $.Data.musterRollNumber + - inJsonPath: $.registerId + outJsonPath: $.Data.registerId + - inJsonPath: $.status + outJsonPath: $.Data.status + - inJsonPath: $.musterRollStatus + outJsonPath: $.Data.musterRollStatus + - inJsonPath: $.startDate + outJsonPath: $.Data.startDate + - inJsonPath: $.endDate + outJsonPath: $.Data.endDate + - inJsonPath: $.individualEntries + outJsonPath: $.Data.individualEntries + - inJsonPath: $.referenceId + outJsonPath: $.Data.referenceId + - inJsonPath: $.serviceCode + outJsonPath: $.Data.serviceCode + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails + - inJsonPath: $.additionalDetails + outJsonPath: $.Data.additionalDetails + - inJsonPath: $.processInstance + outJsonPath: $.Data.currentProcessInstance + externalUriMapping: + - path: http://egov-workflow-v2.egov:8080/egov-workflow-v2/egov-wf/process/_search + queryParam: businessIds=$.musterRollNumber,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.jalandhar","roles": [ { "name": "Employee","code": "EMPLOYEE","tenantId": "pb.jalandhar" } ] } } } + uriResponseMapping: + - inJsonPath: $.ProcessInstances + outJsonPath: $.Data.history + + + - topic: update-musterroll + configKey: INDEX + indexes: + - name: muster-inbox + type: general + id: $.id,$.tenantId + jsonPath: $.musterRoll + timeStampField: $.auditDetails.createdTime + customJsonMapping: + indexMapping: { "Data": { "id": "","tenantId": "","musterRollNumber": "","registerId": "","status": "","musterRollStatus": "","startDate": "","endDate": "","individualEntries": [ ],"@timestamp": "timestamp","auditDetails": { },"additionalDetails": { },"currentProcessInstance": { },"history": { } } } + fieldMapping: + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.musterRollNumber + outJsonPath: $.Data.musterRollNumber + - inJsonPath: $.registerId + outJsonPath: $.Data.registerId + - inJsonPath: $.status + outJsonPath: $.Data.status + - inJsonPath: $.musterRollStatus + outJsonPath: $.Data.musterRollStatus + - inJsonPath: $.startDate + outJsonPath: $.Data.startDate + - inJsonPath: $.endDate + outJsonPath: $.Data.endDate + - inJsonPath: $.individualEntries + outJsonPath: $.Data.individualEntries + - inJsonPath: $.referenceId + outJsonPath: $.Data.referenceId + - inJsonPath: $.serviceCode + outJsonPath: $.Data.serviceCode + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails + - inJsonPath: $.additionalDetails + outJsonPath: $.Data.additionalDetails + - inJsonPath: $.processInstance + outJsonPath: $.Data.currentProcessInstance + externalUriMapping: + - path: http://egov-workflow-v2.egov:8080/egov-workflow-v2/egov-wf/process/_search + queryParam: businessIds=$.musterRollNumber,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.jalandhar","roles": [ { "name": "Employee","code": "EMPLOYEE","tenantId": "pb.jalandhar" } ] } } } + uriResponseMapping: + - inJsonPath: $.ProcessInstances + outJsonPath: $.Data.history + + - topic: muster-legacyIndex + configKey: LEGACYINDEX + indexes: + - name: muster-inbox-legacyindex + type: general + id: $.id,$.tenantId + isBulk: true + jsonPath: $.musterRolls.* + timeStampField: $.auditDetails.createdTime + customJsonMapping: + indexMapping: { "Data": { "id": "","tenantId": "","musterRollNumber": "","registerId": "","status": "","musterRollStatus": "","startDate": "","endDate": "","individualEntries": [ ],"@timestamp": "timestamp","auditDetails": { },"additionalDetails": { },"currentProcessInstance": { },"history": { } } } + fieldMapping: + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.musterRollNumber + outJsonPath: $.Data.musterRollNumber + - inJsonPath: $.registerId + outJsonPath: $.Data.registerId + - inJsonPath: $.status + outJsonPath: $.Data.status + - inJsonPath: $.musterRollStatus + outJsonPath: $.Data.musterRollStatus + - inJsonPath: $.startDate + outJsonPath: $.Data.startDate + - inJsonPath: $.endDate + outJsonPath: $.Data.endDate + - inJsonPath: $.individualEntries + outJsonPath: $.Data.individualEntries + - inJsonPath: $.referenceId + outJsonPath: $.Data.referenceId + - inJsonPath: $.serviceCode + outJsonPath: $.Data.serviceCode + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails + - inJsonPath: $.additionalDetails + outJsonPath: $.Data.additionalDetails + - inJsonPath: $.processInstance + outJsonPath: $.Data.currentProcessInstance + externalUriMapping: + - path: http://egov-workflow-v2.egov:8080/egov-workflow-v2/egov-wf/process/_search + queryParam: businessIds=$.musterRollNumber,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.jalandhar","roles": [ { "name": "Employee","code": "EMPLOYEE","tenantId": "pb.jalandhar" } ] } } } + uriResponseMapping: + - inJsonPath: $.ProcessInstances + outJsonPath: $.Data.history diff --git a/works/egov-indexer/organisationservices-indexer.yml b/works/egov-indexer/organisationservices-indexer.yml new file mode 100644 index 000000000..84592f5d4 --- /dev/null +++ b/works/egov-indexer/organisationservices-indexer.yml @@ -0,0 +1,138 @@ +ServiceMaps: + serviceName: organisation-event indexer + version: 1.0.0 + mappings: + - topic: save-org + configKey: INDEX + indexes: + - name: organisation-index + type: general + id: $.id,$.tenantId + jsonPath: $.organisations.* + isBulk: true + timeStampField: $.auditDetails.createdTime + customJsonMapping: + indexMapping: { "Data":{"id":"","tenantId":"","name":"","applicationNumber":"","orgNumber":"","applicationStatus":"","externalRefNumber":"","isActive":"","orgAddress":[],"contactDetails":[],"identifiers":[],"functions":[],"jurisdiction":[],"documents":[],"additionalDetails":{},"auditDetails":{}}} + fieldMapping: + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.name + outJsonPath: $.Data.name + - inJsonPath: $.applicationNumber + outJsonPath: $.Data.applicationNumber + - inJsonPath: $.orgNumber + outJsonPath: $.Data.orgNumber + - inJsonPath: $.applicationStatus + outJsonPath: $.Data.applicationStatus + - inJsonPath: $.externalRefNumber + outJsonPath: $.Data.externalRefNumber + - inJsonPath: $.isActive + outJsonPath: $.Data.isActive + - inJsonPath: $.orgAddress + outJsonPath: $.Data.orgAddress + - inJsonPath: $.contactDetails + outJsonPath: $.Data.contactDetails + - inJsonPath: $.identifiers + outJsonPath: $.Data.identifiers + - inJsonPath: $.functions + outJsonPath: $.Data.functions + - inJsonPath: $.jurisdiction + outJsonPath: $.Data.jurisdiction + - inJsonPath: $.documents + outJsonPath: $.Data.documents + - inJsonPath: $.additionalDetails + outJsonPath: $.Data.additionalDetails + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails + + - topic: update-org + configKey: INDEX + indexes: + - name: organisation-index + type: general + id: $.id,$.tenantId + jsonPath: $.organisations.* + isBulk: true + timeStampField: $.auditDetails.createdTime + customJsonMapping: + indexMapping: { "Data": { "id": "","tenantId": "","name": "","applicationNumber": "","orgNumber": "","applicationStatus": "","externalRefNumber": "","isActive": "","orgAddress": [ ],"contactDetails": [ ],"identifiers": [ ],"functions": [ ],"jurisdiction": [ ],"documents": [ ],"additionalDetails": { },"auditDetails": { } } } + fieldMapping: + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.name + outJsonPath: $.Data.name + - inJsonPath: $.applicationNumber + outJsonPath: $.Data.applicationNumber + - inJsonPath: $.orgNumber + outJsonPath: $.Data.orgNumber + - inJsonPath: $.applicationStatus + outJsonPath: $.Data.applicationStatus + - inJsonPath: $.externalRefNumber + outJsonPath: $.Data.externalRefNumber + - inJsonPath: $.isActive + outJsonPath: $.Data.isActive + - inJsonPath: $.orgAddress + outJsonPath: $.Data.orgAddress + - inJsonPath: $.contactDetails + outJsonPath: $.Data.contactDetails + - inJsonPath: $.identifiers + outJsonPath: $.Data.identifiers + - inJsonPath: $.functions + outJsonPath: $.Data.functions + - inJsonPath: $.jurisdiction + outJsonPath: $.Data.jurisdiction + - inJsonPath: $.documents + outJsonPath: $.Data.documents + - inJsonPath: $.additionalDetails + outJsonPath: $.Data.additionalDetails + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails + + - topic: org-legacyIndex + configKey: LEGACYINDEX + indexes: + - name: organisation-index + type: general + id: $.id,$.tenantId + jsonPath: $.organisations.* + isBulk: true + timeStampField: $.auditDetails.createdTime + customJsonMapping: + indexMapping: { "Data": { "id": "","tenantId": "","name": "","applicationNumber": "","orgNumber": "","applicationStatus": "","externalRefNumber": "","isActive": "","orgAddress": [ ],"contactDetails": [ ],"identifiers": [ ],"functions": [ ],"jurisdiction": [ ],"documents": [ ],"additionalDetails": { },"auditDetails": { } } } + fieldMapping: + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.name + outJsonPath: $.Data.name + - inJsonPath: $.applicationNumber + outJsonPath: $.Data.applicationNumber + - inJsonPath: $.orgNumber + outJsonPath: $.Data.orgNumber + - inJsonPath: $.applicationStatus + outJsonPath: $.Data.applicationStatus + - inJsonPath: $.externalRefNumber + outJsonPath: $.Data.externalRefNumber + - inJsonPath: $.isActive + outJsonPath: $.Data.isActive + - inJsonPath: $.orgAddress + outJsonPath: $.Data.orgAddress + - inJsonPath: $.contactDetails + outJsonPath: $.Data.contactDetails + - inJsonPath: $.identifiers + outJsonPath: $.Data.identifiers + - inJsonPath: $.functions + outJsonPath: $.Data.functions + - inJsonPath: $.jurisdiction + outJsonPath: $.Data.jurisdiction + - inJsonPath: $.documents + outJsonPath: $.Data.documents + - inJsonPath: $.additionalDetails + outJsonPath: $.Data.additionalDetails + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails \ No newline at end of file diff --git a/works/egov-indexer/project-indexer.yml b/works/egov-indexer/project-indexer.yml new file mode 100644 index 000000000..8a97680d3 --- /dev/null +++ b/works/egov-indexer/project-indexer.yml @@ -0,0 +1,174 @@ +ServiceMaps: + serviceName: project-event indexer + version: 1.0.0 + mappings: + - topic: save-project + configKey: INDEX + indexes: + - name: project-index + type: general + id: $.id,$.tenantId + jsonPath: $.Projects.* + isBulk: true + timeStampField: $.auditDetails.createdTime + customJsonMapping: + indexMapping: { "Data":{"id":"","tenantId":"","projectNumber":"","name":"","projectType":"","projectSubType":"","department":"","description":"","referenceID":"","startDate":"","endDate":"","natureOfWork":"","isTaskEnabled":"","parent":"","projectHierarchy":"","additionalDetails":{},"isDeleted":"","rowVersion":"","address":{},"targets":[],"documents":[],"auditDetails":{}}} + fieldMapping: + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.projectNumber + outJsonPath: $.Data.projectNumber + - inJsonPath: $.name + outJsonPath: $.Data.name + - inJsonPath: $.projectType + outJsonPath: $.Data.projectType + - inJsonPath: $.projectSubType + outJsonPath: $.Data.projectSubType + - inJsonPath: $.department + outJsonPath: $.Data.department + - inJsonPath: $.description + outJsonPath: $.Data.description + - inJsonPath: $.referenceID + outJsonPath: $.Data.referenceID + - inJsonPath: $.startDate + outJsonPath: $.Data.startDate + - inJsonPath: $.endDate + outJsonPath: $.Data.endDate + - inJsonPath: $.natureOfWork + outJsonPath: $.Data.natureOfWork + - inJsonPath: $.isTaskEnabled + outJsonPath: $.Data.isTaskEnabled + - inJsonPath: $.parent + outJsonPath: $.Data.parent + - inJsonPath: $.projectHierarchy + outJsonPath: $.Data.projectHierarchy + - inJsonPath: $.additionalDetails + outJsonPath: $.Data.additionalDetails + - inJsonPath: $.isDeleted + outJsonPath: $.Data.isDeleted + - inJsonPath: $.rowVersion + outJsonPath: $.Data.rowVersion + - inJsonPath: $.address + outJsonPath: $.Data.address + - inJsonPath: $.targets + outJsonPath: $.Data.targets + - inJsonPath: $.documents + outJsonPath: $.Data.documents + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails + + - topic: update-project + configKey: INDEX + indexes: + - name: project-index + type: general + id: $.id,$.tenantId + jsonPath: $.Projects.* + isBulk: true + timeStampField: $.auditDetails.createdTime + customJsonMapping: + indexMapping: { "Data":{"id":"","tenantId":"","projectNumber":"","name":"","projectType":"","projectSubType":"","department":"","description":"","referenceID":"","startDate":"","endDate":"","natureOfWork":"","isTaskEnabled":"","parent":"","projectHierarchy":"","additionalDetails":{},"isDeleted":"","rowVersion":"","address":{},"targets":[],"documents":[],"auditDetails":{}}} + fieldMapping: + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.projectNumber + outJsonPath: $.Data.projectNumber + - inJsonPath: $.name + outJsonPath: $.Data.name + - inJsonPath: $.projectType + outJsonPath: $.Data.projectType + - inJsonPath: $.projectSubType + outJsonPath: $.Data.projectSubType + - inJsonPath: $.department + outJsonPath: $.Data.department + - inJsonPath: $.description + outJsonPath: $.Data.description + - inJsonPath: $.referenceID + outJsonPath: $.Data.referenceID + - inJsonPath: $.startDate + outJsonPath: $.Data.startDate + - inJsonPath: $.endDate + outJsonPath: $.Data.endDate + - inJsonPath: $.natureOfWork + outJsonPath: $.Data.natureOfWork + - inJsonPath: $.isTaskEnabled + outJsonPath: $.Data.isTaskEnabled + - inJsonPath: $.parent + outJsonPath: $.Data.parent + - inJsonPath: $.projectHierarchy + outJsonPath: $.Data.projectHierarchy + - inJsonPath: $.additionalDetails + outJsonPath: $.Data.additionalDetails + - inJsonPath: $.isDeleted + outJsonPath: $.Data.isDeleted + - inJsonPath: $.rowVersion + outJsonPath: $.Data.rowVersion + - inJsonPath: $.address + outJsonPath: $.Data.address + - inJsonPath: $.targets + outJsonPath: $.Data.targets + - inJsonPath: $.documents + outJsonPath: $.Data.documents + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails + + - topic: project-legacyIndex + configKey: LEGACYINDEX + indexes: + - name: project-index + type: general + id: $.id,$.tenantId + jsonPath: $.Projects.* + isBulk: true + timeStampField: $.auditDetails.createdTime + customJsonMapping: + indexMapping: { "Data":{"id":"","tenantId":"","projectNumber":"","name":"","projectType":"","projectSubType":"","department":"","description":"","referenceID":"","startDate":"","endDate":"","natureOfWork":"","isTaskEnabled":"","parent":"","projectHierarchy":"","additionalDetails":{},"isDeleted":"","rowVersion":"","address":{},"targets":[],"documents":[],"auditDetails":{}}} + fieldMapping: + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.projectNumber + outJsonPath: $.Data.projectNumber + - inJsonPath: $.name + outJsonPath: $.Data.name + - inJsonPath: $.projectType + outJsonPath: $.Data.projectType + - inJsonPath: $.projectSubType + outJsonPath: $.Data.projectSubType + - inJsonPath: $.department + outJsonPath: $.Data.department + - inJsonPath: $.description + outJsonPath: $.Data.description + - inJsonPath: $.referenceID + outJsonPath: $.Data.referenceID + - inJsonPath: $.startDate + outJsonPath: $.Data.startDate + - inJsonPath: $.endDate + outJsonPath: $.Data.endDate + - inJsonPath: $.natureOfWork + outJsonPath: $.Data.natureOfWork + - inJsonPath: $.isTaskEnabled + outJsonPath: $.Data.isTaskEnabled + - inJsonPath: $.parent + outJsonPath: $.Data.parent + - inJsonPath: $.projectHierarchy + outJsonPath: $.Data.projectHierarchy + - inJsonPath: $.additionalDetails + outJsonPath: $.Data.additionalDetails + - inJsonPath: $.isDeleted + outJsonPath: $.Data.isDeleted + - inJsonPath: $.rowVersion + outJsonPath: $.Data.rowVersion + - inJsonPath: $.address + outJsonPath: $.Data.address + - inJsonPath: $.targets + outJsonPath: $.Data.targets + - inJsonPath: $.documents + outJsonPath: $.Data.documents + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails diff --git a/works/egov-indexer/projectmanagementsystem-indexer.yml b/works/egov-indexer/projectmanagementsystem-indexer.yml new file mode 100644 index 000000000..8a97680d3 --- /dev/null +++ b/works/egov-indexer/projectmanagementsystem-indexer.yml @@ -0,0 +1,174 @@ +ServiceMaps: + serviceName: project-event indexer + version: 1.0.0 + mappings: + - topic: save-project + configKey: INDEX + indexes: + - name: project-index + type: general + id: $.id,$.tenantId + jsonPath: $.Projects.* + isBulk: true + timeStampField: $.auditDetails.createdTime + customJsonMapping: + indexMapping: { "Data":{"id":"","tenantId":"","projectNumber":"","name":"","projectType":"","projectSubType":"","department":"","description":"","referenceID":"","startDate":"","endDate":"","natureOfWork":"","isTaskEnabled":"","parent":"","projectHierarchy":"","additionalDetails":{},"isDeleted":"","rowVersion":"","address":{},"targets":[],"documents":[],"auditDetails":{}}} + fieldMapping: + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.projectNumber + outJsonPath: $.Data.projectNumber + - inJsonPath: $.name + outJsonPath: $.Data.name + - inJsonPath: $.projectType + outJsonPath: $.Data.projectType + - inJsonPath: $.projectSubType + outJsonPath: $.Data.projectSubType + - inJsonPath: $.department + outJsonPath: $.Data.department + - inJsonPath: $.description + outJsonPath: $.Data.description + - inJsonPath: $.referenceID + outJsonPath: $.Data.referenceID + - inJsonPath: $.startDate + outJsonPath: $.Data.startDate + - inJsonPath: $.endDate + outJsonPath: $.Data.endDate + - inJsonPath: $.natureOfWork + outJsonPath: $.Data.natureOfWork + - inJsonPath: $.isTaskEnabled + outJsonPath: $.Data.isTaskEnabled + - inJsonPath: $.parent + outJsonPath: $.Data.parent + - inJsonPath: $.projectHierarchy + outJsonPath: $.Data.projectHierarchy + - inJsonPath: $.additionalDetails + outJsonPath: $.Data.additionalDetails + - inJsonPath: $.isDeleted + outJsonPath: $.Data.isDeleted + - inJsonPath: $.rowVersion + outJsonPath: $.Data.rowVersion + - inJsonPath: $.address + outJsonPath: $.Data.address + - inJsonPath: $.targets + outJsonPath: $.Data.targets + - inJsonPath: $.documents + outJsonPath: $.Data.documents + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails + + - topic: update-project + configKey: INDEX + indexes: + - name: project-index + type: general + id: $.id,$.tenantId + jsonPath: $.Projects.* + isBulk: true + timeStampField: $.auditDetails.createdTime + customJsonMapping: + indexMapping: { "Data":{"id":"","tenantId":"","projectNumber":"","name":"","projectType":"","projectSubType":"","department":"","description":"","referenceID":"","startDate":"","endDate":"","natureOfWork":"","isTaskEnabled":"","parent":"","projectHierarchy":"","additionalDetails":{},"isDeleted":"","rowVersion":"","address":{},"targets":[],"documents":[],"auditDetails":{}}} + fieldMapping: + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.projectNumber + outJsonPath: $.Data.projectNumber + - inJsonPath: $.name + outJsonPath: $.Data.name + - inJsonPath: $.projectType + outJsonPath: $.Data.projectType + - inJsonPath: $.projectSubType + outJsonPath: $.Data.projectSubType + - inJsonPath: $.department + outJsonPath: $.Data.department + - inJsonPath: $.description + outJsonPath: $.Data.description + - inJsonPath: $.referenceID + outJsonPath: $.Data.referenceID + - inJsonPath: $.startDate + outJsonPath: $.Data.startDate + - inJsonPath: $.endDate + outJsonPath: $.Data.endDate + - inJsonPath: $.natureOfWork + outJsonPath: $.Data.natureOfWork + - inJsonPath: $.isTaskEnabled + outJsonPath: $.Data.isTaskEnabled + - inJsonPath: $.parent + outJsonPath: $.Data.parent + - inJsonPath: $.projectHierarchy + outJsonPath: $.Data.projectHierarchy + - inJsonPath: $.additionalDetails + outJsonPath: $.Data.additionalDetails + - inJsonPath: $.isDeleted + outJsonPath: $.Data.isDeleted + - inJsonPath: $.rowVersion + outJsonPath: $.Data.rowVersion + - inJsonPath: $.address + outJsonPath: $.Data.address + - inJsonPath: $.targets + outJsonPath: $.Data.targets + - inJsonPath: $.documents + outJsonPath: $.Data.documents + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails + + - topic: project-legacyIndex + configKey: LEGACYINDEX + indexes: + - name: project-index + type: general + id: $.id,$.tenantId + jsonPath: $.Projects.* + isBulk: true + timeStampField: $.auditDetails.createdTime + customJsonMapping: + indexMapping: { "Data":{"id":"","tenantId":"","projectNumber":"","name":"","projectType":"","projectSubType":"","department":"","description":"","referenceID":"","startDate":"","endDate":"","natureOfWork":"","isTaskEnabled":"","parent":"","projectHierarchy":"","additionalDetails":{},"isDeleted":"","rowVersion":"","address":{},"targets":[],"documents":[],"auditDetails":{}}} + fieldMapping: + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.projectNumber + outJsonPath: $.Data.projectNumber + - inJsonPath: $.name + outJsonPath: $.Data.name + - inJsonPath: $.projectType + outJsonPath: $.Data.projectType + - inJsonPath: $.projectSubType + outJsonPath: $.Data.projectSubType + - inJsonPath: $.department + outJsonPath: $.Data.department + - inJsonPath: $.description + outJsonPath: $.Data.description + - inJsonPath: $.referenceID + outJsonPath: $.Data.referenceID + - inJsonPath: $.startDate + outJsonPath: $.Data.startDate + - inJsonPath: $.endDate + outJsonPath: $.Data.endDate + - inJsonPath: $.natureOfWork + outJsonPath: $.Data.natureOfWork + - inJsonPath: $.isTaskEnabled + outJsonPath: $.Data.isTaskEnabled + - inJsonPath: $.parent + outJsonPath: $.Data.parent + - inJsonPath: $.projectHierarchy + outJsonPath: $.Data.projectHierarchy + - inJsonPath: $.additionalDetails + outJsonPath: $.Data.additionalDetails + - inJsonPath: $.isDeleted + outJsonPath: $.Data.isDeleted + - inJsonPath: $.rowVersion + outJsonPath: $.Data.rowVersion + - inJsonPath: $.address + outJsonPath: $.Data.address + - inJsonPath: $.targets + outJsonPath: $.Data.targets + - inJsonPath: $.documents + outJsonPath: $.Data.documents + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails diff --git a/works/egov-persister/attendance-service-persister.yml b/works/egov-persister/attendance-service-persister.yml new file mode 100644 index 000000000..c5e012240 --- /dev/null +++ b/works/egov-persister/attendance-service-persister.yml @@ -0,0 +1,393 @@ +serviceMaps: + serviceName: attendance-service + mappings: + - version: 1.0 + name: attendance + description: Persists attendance details in eg_wms_attendance_register table + fromTopic: save-attendance + isTransaction: true + isAuditEnabled: true + module: ATND + objecIdJsonPath: $.id + tenantIdJsonPath: $.tenantId + transactionCodeJsonPath: $.registerNumber + auditAttributeBasePath: $.attendanceRegister.* + queryMaps: + - query: INSERT INTO eg_wms_attendance_register(id,tenantid,registernumber,name,startdate,enddate,status,additionaldetails,createdby,lastmodifiedby,createdtime,lastmodifiedtime,referenceid,servicecode) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?); + basePath: $.attendanceRegister.* + jsonMaps: + - jsonPath: $.attendanceRegister.*.id + + - jsonPath: $.attendanceRegister.*.tenantId + + - jsonPath: $.attendanceRegister.*.registerNumber + + - jsonPath: $.attendanceRegister.*.name + + - jsonPath: $.attendanceRegister.*.startDate + + - jsonPath: $.attendanceRegister.*.endDate + + - jsonPath: $.attendanceRegister.*.status + + - jsonPath: $.attendanceRegister.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.attendanceRegister.*.auditDetails.createdBy + + - jsonPath: $.attendanceRegister.*.auditDetails.lastModifiedBy + + - jsonPath: $.attendanceRegister.*.auditDetails.createdTime + + - jsonPath: $.attendanceRegister.*.auditDetails.lastModifiedTime + + - jsonPath: $.attendanceRegister.*.referenceId + + - jsonPath: $.attendanceRegister.*.serviceCode + + - query: INSERT INTO eg_wms_attendance_staff(id,tenantid,individual_id,register_id,enrollment_date,deenrollment_date,additionaldetails,createdby,lastmodifiedby,createdtime,lastmodifiedtime) VALUES (?,?,?,?,?,?,?,?,?,?,?); + basePath: $.attendanceRegister.*.staff.* + jsonMaps: + - jsonPath: $.staff.*.id + + - jsonPath: $.staff.*.tenantId + + - jsonPath: $.staff.*.userId + + - jsonPath: $.staff.*.registerId + + - jsonPath: $.staff.*.enrollmentDate + + - jsonPath: $.staff.*.denrollmentDate + + - jsonPath: $.staff.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.staff.*.auditDetails.createdBy + + - jsonPath: $.staff.*.auditDetails.lastModifiedBy + + - jsonPath: $.staff.*.auditDetails.createdTime + + - jsonPath: $.staff.*.auditDetails.lastModifiedTime + + - version: 1.0 + name: attendee + description: Persists attendee details in eg_wms_attendance_attendee table + fromTopic: save-attendee + isTransaction: true + isAuditEnabled: true + module: ATND + objecIdJsonPath: $.id + tenantIdJsonPath: $.tenantId + transactionCodeJsonPath: $.registerId + auditAttributeBasePath: $.attendees.* + queryMaps: + - query: INSERT INTO eg_wms_attendance_attendee(id,tenantid,individual_id,register_id,enrollment_date,deenrollment_date,additionaldetails,createdby,lastmodifiedby,createdtime,lastmodifiedtime) VALUES (?,?,?,?,?,?,?,?,?,?,?); + basePath: $.attendees.* + jsonMaps: + + - jsonPath: $.attendees.*.id + + - jsonPath: $.attendees.*.tenantId + + - jsonPath: $.attendees.*.individualId + + - jsonPath: $.attendees.*.registerId + + - jsonPath: $.attendees.*.enrollmentDate + + - jsonPath: $.attendees.*.denrollmentDate + + - jsonPath: $.attendees.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.attendees.*.auditDetails.createdBy + + - jsonPath: $.attendees.*.auditDetails.lastModifiedBy + + - jsonPath: $.attendees.*.auditDetails.createdTime + + - jsonPath: $.attendees.*.auditDetails.lastModifiedTime + + - version: 1.0 + name: staff registration + description: Persists staff registration details in eg_wms_attendance_staff table + fromTopic: save-staff + isTransaction: true + isAuditEnabled: true + module: ATND + objecIdJsonPath: $.id + tenantIdJsonPath: $.tenantId + transactionCodeJsonPath: $.registerId + auditAttributeBasePath: $.staff.* + queryMaps: + - query: INSERT INTO eg_wms_attendance_staff(id,tenantid,individual_id,register_id,enrollment_date,deenrollment_date,additionaldetails,createdby,lastmodifiedby,createdtime,lastmodifiedtime) VALUES (?,?,?,?,?,?,?,?,?,?,?); + basePath: $.staff.* + jsonMaps: + - jsonPath: $.staff.*.id + + - jsonPath: $.staff.*.tenantId + + - jsonPath: $.staff.*.userId + + - jsonPath: $.staff.*.registerId + + - jsonPath: $.staff.*.enrollmentDate + + - jsonPath: $.staff.*.denrollmentDate + + - jsonPath: $.staff.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.staff.*.auditDetails.createdBy + + - jsonPath: $.staff.*.auditDetails.lastModifiedBy + + - jsonPath: $.staff.*.auditDetails.createdTime + + - jsonPath: $.staff.*.auditDetails.lastModifiedTime + + - version: 1.0 + name: Attendance Log + description: Persists attendance logs and corresponding documents + fromTopic: save-attendance-log + isTransaction: true + isAuditEnabled: true + module: ATND + objecIdJsonPath: $.id + tenantIdJsonPath: $.tenantId + transactionCodeJsonPath: $.registerId + auditAttributeBasePath: $.attendance.* + queryMaps: + - query: INSERT INTO eg_wms_attendance_log(id,tenantid,individual_id,register_id,status,time,event_type,additionaldetails,createdby,lastmodifiedby,createdtime,lastmodifiedtime) VALUES (?,?,?,?,?,?,?,?,?,?,?,?); + basePath: $.attendance.* + jsonMaps: + - jsonPath: $.attendance.*.id + + - jsonPath: $.attendance.*.tenantId + + - jsonPath: $.attendance.*.individualId + + - jsonPath: $.attendance.*.registerId + + - jsonPath: $.attendance.*.status + + - jsonPath: $.attendance.*.time + + - jsonPath: $.attendance.*.type + + - jsonPath: $.attendance.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.attendance.*.auditDetails.createdBy + + - jsonPath: $.attendance.*.auditDetails.lastModifiedBy + + - jsonPath: $.attendance.*.auditDetails.createdTime + + - jsonPath: $.attendance.*.auditDetails.lastModifiedTime + + - query: INSERT INTO eg_wms_attendance_document(id,filestore_id,document_type,attendance_log_id,additionaldetails,createdby,lastmodifiedby,createdtime,lastmodifiedtime,tenantid,status) VALUES (?,?,?,?,?,?,?,?,?,?,?); + basePath: $.attendance.*.documentIds.* + jsonMaps: + - jsonPath: $.attendance.*.documentIds.*.id + + - jsonPath: $.attendance.*.documentIds.*.fileStore + + - jsonPath: $.attendance.*.documentIds.*.documentType + + - jsonPath: $.attendance[*][?({id} in @.documentIds[*].id)].id + + - jsonPath: $.attendance.*.documentIds.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.attendance[*][?({id} in @.documentIds[*].id)].auditDetails.createdBy + + - jsonPath: $.attendance[*][?({id} in @.documentIds[*].id)].auditDetails.lastModifiedBy + + - jsonPath: $.attendance[*][?({id} in @.documentIds[*].id)].auditDetails.createdTime + + - jsonPath: $.attendance[*][?({id} in @.documentIds[*].id)].auditDetails.lastModifiedTime + + - jsonPath: $.attendance[*][?({id} in @.documentIds[*].id)].tenantId + + - jsonPath: $.attendance.*.documentIds.*.status + + + - version: 1.0 + name: Attendance Log + description: Update attendance logs and corresponding documents + fromTopic: update-attendance-log + isTransaction: true + isAuditEnabled: true + module: ATND + objecIdJsonPath: $.id + tenantIdJsonPath: $.tenantId + transactionCodeJsonPath: $.registerId + auditAttributeBasePath: $.attendance.* + queryMaps: + - query: UPDATE eg_wms_attendance_log set status = ?, time = ? ,event_type =? ,additionaldetails = ? ,lastmodifiedby = ? ,lastmodifiedtime = ? where id = ? ; + basePath: $.attendance.* + jsonMaps: + + - jsonPath: $.attendance.*.status + + - jsonPath: $.attendance.*.time + + - jsonPath: $.attendance.*.type + + - jsonPath: $.attendance.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.attendance.*.auditDetails.lastModifiedBy + + - jsonPath: $.attendance.*.auditDetails.lastModifiedTime + + - jsonPath: $.attendance.*.id + + + - query: INSERT INTO eg_wms_attendance_document(id, filestore_id, document_type, attendance_log_id, additionaldetails, createdby, lastmodifiedby, createdtime, lastmodifiedtime, tenantid, status) VALUES (?,?,?,?,?,?,?,?,?,?,?) ON CONFLICT (id) DO UPDATE SET filestore_id = ?, document_type = ? , additionaldetails = ? ,lastmodifiedby = ? ,lastmodifiedtime = ?, status = ?; + basePath: $.attendance.*.documentIds.* + jsonMaps: + - jsonPath: $.attendance.*.documentIds.*.id + + - jsonPath: $.attendance.*.documentIds.*.fileStore + + - jsonPath: $.attendance.*.documentIds.*.documentType + + - jsonPath: $.attendance[*][?({id} in @.documentIds[*].id)].id + + - jsonPath: $.attendance.*.documentIds.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.attendance[*][?({id} in @.documentIds[*].id)].auditDetails.createdBy + + - jsonPath: $.attendance[*][?({id} in @.documentIds[*].id)].auditDetails.lastModifiedBy + + - jsonPath: $.attendance[*][?({id} in @.documentIds[*].id)].auditDetails.createdTime + + - jsonPath: $.attendance[*][?({id} in @.documentIds[*].id)].auditDetails.lastModifiedTime + + - jsonPath: $.attendance[*][?({id} in @.documentIds[*].id)].tenantId + + - jsonPath: $.attendance.*.documentIds.*.status + + - jsonPath: $.attendance.*.documentIds.*.fileStore + + - jsonPath: $.attendance.*.documentIds.*.documentType + + - jsonPath: $.attendance.*.documentIds.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.attendance[*][?({id} in @.documentIds[*].id)].auditDetails.lastModifiedBy + + - jsonPath: $.attendance[*][?({id} in @.documentIds[*].id)].auditDetails.lastModifiedTime + + - jsonPath: $.attendance.*.documentIds.*.status + + + - version: 1.0 + description: update Attendance + fromTopic: update-attendance + isTransaction: true + isAuditEnabled: true + module: ATND + objecIdJsonPath: $.id + tenantIdJsonPath: $.tenantId + transactionCodeJsonPath: $.registerNumber + auditAttributeBasePath: $.attendanceRegister.* + queryMaps: + - query: UPDATE eg_wms_attendance_register set name=?, startdate=?, enddate=?, status=?,additionaldetails=?,lastmodifiedby=?, lastmodifiedtime=? where id=?; + basePath: $.attendanceRegister.* + jsonMaps: + - jsonPath: $.attendanceRegister.*.name + + - jsonPath: $.attendanceRegister.*.startDate + + - jsonPath: $.attendanceRegister.*.endDate + + - jsonPath: $.attendanceRegister.*.status + + - jsonPath: $.attendanceRegister.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.attendanceRegister.*.auditDetails.lastModifiedBy + + - jsonPath: $.attendanceRegister.*.auditDetails.lastModifiedTime + + - jsonPath: $.attendanceRegister.*.id + + - version: 1.0 + description: update Attendee + fromTopic: update-attendee + isTransaction: true + isAuditEnabled: true + module: ATND + objecIdJsonPath: $.id + tenantIdJsonPath: $.tenantId + transactionCodeJsonPath: $.registerId + auditAttributeBasePath: $.attendees.* + queryMaps: + - query: UPDATE eg_wms_attendance_attendee set individual_id=?, register_id=?, enrollment_date=?, deenrollment_date=?,additionaldetails=?,lastmodifiedby=?, lastmodifiedtime=? where id=?; + basePath: $.attendees.* + jsonMaps: + - jsonPath: $.attendees.*.individualId + + - jsonPath: $.attendees.*.registerId + + - jsonPath: $.attendees.*.enrollmentDate + + - jsonPath: $.attendees.*.denrollmentDate + + - jsonPath: $.attendees.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.attendees.*.auditDetails.lastModifiedBy + + - jsonPath: $.attendees.*.auditDetails.lastModifiedTime + + - jsonPath: $.attendees.*.id + + - version: 1.0 + description: update staff + fromTopic: update-staff + isTransaction: true + isAuditEnabled: true + module: ATND + objecIdJsonPath: $.id + tenantIdJsonPath: $.tenantId + transactionCodeJsonPath: $.registerId + auditAttributeBasePath: $.staff.* + queryMaps: + - query: UPDATE eg_wms_attendance_staff set individual_id=?, register_id=?, enrollment_date=?, deenrollment_date=?,additionaldetails=?,lastmodifiedby=?, lastmodifiedtime=? where id=?; + basePath: $.staff.* + jsonMaps: + - jsonPath: $.staff.*.userId + + - jsonPath: $.staff.*.registerId + + - jsonPath: $.staff.*.enrollmentDate + + - jsonPath: $.staff.*.denrollmentDate + + - jsonPath: $.staff.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.staff.*.auditDetails.lastModifiedBy + + - jsonPath: $.staff.*.auditDetails.lastModifiedTime + + - jsonPath: $.staff.*.id diff --git a/works/egov-persister/audit-service-persister.yml b/works/egov-persister/audit-service-persister.yml new file mode 100644 index 000000000..b7dbc01f9 --- /dev/null +++ b/works/egov-persister/audit-service-persister.yml @@ -0,0 +1,36 @@ +serviceMaps: + serviceName: audit-service + mappings: + - version: 1.0 + description: Persists audit service fields in database + fromTopic: audit-create + isTransaction: true + queryMaps: + - query: INSERT INTO eg_audit_logs( id, useruuid,module,tenantid,transactioncode,changedate,objectid,entityname, keyvaluemap, operationtype, integrityhash, auditcorrelationid) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: AuditLogs.* + jsonMaps: + - jsonPath: $.AuditLogs.*.id + + - jsonPath: $.AuditLogs.*.userUUID + + - jsonPath: $.AuditLogs.*.module + + - jsonPath: $.AuditLogs.*.tenantId + + - jsonPath: $.AuditLogs.*.transactionCode + + - jsonPath: $.AuditLogs.*.changeDate + + - jsonPath: $.AuditLogs.*.objectId + + - jsonPath: $.AuditLogs.*.entityName + + - jsonPath: $.AuditLogs.*.keyValueMap + type: JSON + dbType: JSONB + + - jsonPath: $.AuditLogs.*.operationType + + - jsonPath: $.AuditLogs.*.integrityHash + + - jsonPath: $.AuditLogs.*.auditCorrelationId \ No newline at end of file diff --git a/works/egov-persister/bankaccounts-persister.yml b/works/egov-persister/bankaccounts-persister.yml new file mode 100644 index 000000000..5af43cab6 --- /dev/null +++ b/works/egov-persister/bankaccounts-persister.yml @@ -0,0 +1,202 @@ +serviceMaps: + serviceName: bankaccounts + mappings: + - version: 1.0 + name: bankaccount + description: Persists bank account details + fromTopic: save-bank-account + isTransaction: true + isAuditEnabled: true + module: BAS + objecIdJsonPath: $.id + tenantIdJsonPath: $.tenantId + transactionCodeJsonPath: $.accountNumber + auditAttributeBasePath: $.bankAccounts.* + queryMaps: + - query: INSERT INTO eg_bank_account(id,tenant_id,service_code,reference_id,additional_details,created_by,last_modified_by,created_time,last_modified_time) VALUES (?,?,?,?,?,?,?,?,?); + + basePath: $.bankAccounts.* + jsonMaps: + + - jsonPath: $.bankAccounts.*.id + + - jsonPath: $.bankAccounts.*.tenantId + + - jsonPath: $.bankAccounts.*.serviceCode + + - jsonPath: $.bankAccounts.*.referenceId + + - jsonPath: $.bankAccounts.*.additionalFields + type: JSON + dbType: JSONB + + - jsonPath: $.bankAccounts.*.auditDetails.createdBy + + - jsonPath: $.bankAccounts.*.auditDetails.lastModifiedBy + + - jsonPath: $.bankAccounts.*.auditDetails.createdTime + + - jsonPath: $.bankAccounts.*.auditDetails.lastModifiedTime + + + - query: INSERT INTO eg_bank_account_detail(id,tenant_id,bank_account_id,account_holder_name,account_number,account_type,is_primary,is_active,additional_details,created_by,last_modified_by,created_time,last_modified_time) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?); + + basePath: $.bankAccounts.*.bankAccountDetails.* + jsonMaps: + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.id + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.tenantId + + - jsonPath: $.bankAccounts[*][?({id} in @.bankAccountDetails[*].id)].id + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.accountHolderName + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.accountNumber + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.accountType + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.isPrimary + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.isActive + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.additionalFields + type: JSON + dbType: JSONB + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.auditDetails.createdBy + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.auditDetails.createdTime + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.auditDetails.lastModifiedTime + + + - query: INSERT INTO eg_bank_accounts_doc(id,bank_account_detail_id,document_type,file_store,document_uid,additional_details) VALUES (?,?,?,?,?,?); + + basePath: $.bankAccounts.*.bankAccountDetails.*.documents.* + jsonMaps: + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.documents.*.id + + - jsonPath: $.bankAccounts.*.bankAccountDetails[*][?({id} in @.documents[*].id)].id + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.documents.*.documentType + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.documents.*.fileStore + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.documents.*.documentUid + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.documents.*.additionalDetails + type: JSON + dbType: JSONB + + + - query: INSERT INTO eg_bank_branch_identifier(id,bank_account_detail_id,type,code,additional_details) VALUES (?,?,?,?,?); + + basePath: $.bankAccounts.*.bankAccountDetails.*.bankBranchIdentifier + jsonMaps: + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.bankBranchIdentifier.id + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.id + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.bankBranchIdentifier.type + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.bankBranchIdentifier.code + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.bankBranchIdentifier.additionalDetails + type: JSON + dbType: JSONB + + + - version: 1.0 + description: Update bank account details + fromTopic: update-bank-account + isTransaction: true + isAuditEnabled: true + module: BAS + objecIdJsonPath: $.id + tenantIdJsonPath: $.tenantId + transactionCodeJsonPath: $.accountNumber + auditAttributeBasePath: $.bankAccounts.* + queryMaps: + - query: UPDATE eg_bank_account set service_code=?, reference_id=?, additional_details=?,last_modified_by=?, last_modified_time=? where id=?; + basePath: $.bankAccounts.* + jsonMaps: + + - jsonPath: $.bankAccounts.*.serviceCode + + - jsonPath: $.bankAccounts.*.referenceId + + - jsonPath: $.bankAccounts.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.bankAccounts.*.auditDetails.lastModifiedBy + + - jsonPath: $.bankAccounts.*.auditDetails.lastModifiedTime + + - jsonPath: $.bankAccounts.*.id + + + - query: UPDATE eg_bank_account_detail set account_holder_name=?, account_type=?, account_number=?, is_primary=?,is_active=?, additional_details=?,last_modified_by=?, last_modified_time=? where id=?; + + basePath: $.bankAccounts.*.bankAccountDetails.* + jsonMaps: + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.accountHolderName + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.accountType + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.accountNumber + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.isPrimary + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.isActive + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.additionalFields + type: JSON + dbType: JSONB + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.id + + + + - query: UPDATE eg_bank_accounts_doc set document_type=?, file_store=?, document_uid=?,additional_details=? where id=?; + + basePath: $.bankAccounts.*.bankAccountDetails.*.documents.* + jsonMaps: + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.documents.*.documentType + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.documents.*.fileStore + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.documents.*.documentUid + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.documents.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.documents.*.id + + + - query: UPDATE eg_bank_branch_identifier set type=?, code=?,additional_details=? where id=?; + + basePath: $.bankAccounts.*.bankAccountDetails.*.bankBranchIdentifier + jsonMaps: + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.bankBranchIdentifier.type + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.bankBranchIdentifier.code + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.bankBranchIdentifier.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.bankAccounts.*.bankAccountDetails.*.bankBranchIdentifier.id diff --git a/works/egov-persister/btr-persister.yml b/works/egov-persister/btr-persister.yml new file mode 100644 index 000000000..f975a65f6 --- /dev/null +++ b/works/egov-persister/btr-persister.yml @@ -0,0 +1,104 @@ +serviceMaps: + serviceName: btr-services + mappings: + - version: 1.0 + description: Persists birth details in tables + fromTopic: save-bt-application + isTransaction: true + queryMaps: + + - query: INSERT INTO eg_bt_registration(id,tenantid,applicationnumber,babyfirstname,babylastname,fatherid,motherid,doctorname,hospitalname,placeofbirth,timeofbirth,createdby,lastmodifiedby,createdtime, lastmodifiedtime) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?,?,?); + basePath: BirthRegistrationApplication + jsonMaps: + - jsonPath: $.BirthRegistrationApplication.id + + - jsonPath: $.BirthRegistrationApplication.tenantId + + - jsonPath: $.BirthRegistrationApplication.applicationNumber + + - jsonPath: $.BirthRegistrationApplication.babyFirstName + + - jsonPath: $.BirthRegistrationApplication.babyLastName + + - jsonPath: $.BirthRegistrationApplication.fatherOfApplicant.id + + - jsonPath: $.BirthRegistrationApplication.motherOfApplicant.id + + - jsonPath: $.BirthRegistrationApplication.doctorName + + - jsonPath: $.BirthRegistrationApplication.hospitalName + + - jsonPath: $.BirthRegistrationApplication.placeOfBirth + + - jsonPath: $.BirthRegistrationApplication.timeOfBirth + + - jsonPath: $.BirthRegistrationApplication.auditDetails.createdBy + + - jsonPath: $.BirthRegistrationApplication.auditDetails.lastModifiedBy + + - jsonPath: $.BirthRegistrationApplication.auditDetails.createdTime + + - jsonPath: $.BirthRegistrationApplication.auditDetails.lastModifiedTime + + - query: INSERT INTO eg_bt_address(id, tenantid, doorno, latitude, longitude, buildingname, addressid, addressnumber, type, addressline1, addressline2, landmark, street, city, locality, pincode, detail, registrationid, createdby, lastmodifiedby, createdtime, lastmodifiedtime) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: BirthRegistrationApplication + jsonMaps: + - jsonPath: $.BirthRegistrationApplication.address.id + + - jsonPath: $.BirthRegistrationApplication.address.tenantId + + - jsonPath: $.BirthRegistrationApplication.address.doorNo + + - jsonPath: $.BirthRegistrationApplication.address.latitude + + - jsonPath: $.BirthRegistrationApplication.address.longitude + + - jsonPath: $.BirthRegistrationApplication.address.buildingName + + - jsonPath: $.BirthRegistrationApplication.address.addressId + + - jsonPath: $.BirthRegistrationApplication.address.addressNumber + + - jsonPath: $.BirthRegistrationApplication.address.type + + - jsonPath: $.BirthRegistrationApplication.address.addressLine1 + + - jsonPath: $.BirthRegistrationApplication.address.addressLine2 + + - jsonPath: $.BirthRegistrationApplication.address.landmark + + - jsonPath: $.BirthRegistrationApplication.address.street + + - jsonPath: $.BirthRegistrationApplication.address.city + + - jsonPath: $.BirthRegistrationApplication.address.locality + + - jsonPath: $.BirthRegistrationApplication.address.pincode + + - jsonPath: $.BirthRegistrationApplication.address.detail + + - jsonPath: $.BirthRegistrationApplication.id + + - jsonPath: $.BirthRegistrationApplication.address.auditDetails.createdBy + + - jsonPath: $.BirthRegistrationApplication.address.auditDetails.lastModifiedBy + + - jsonPath: $.BirthRegistrationApplication.address.auditDetails.createdTime + + - jsonPath: $.BirthRegistrationApplication.address.auditDetails.lastModifiedTime + + - version: 1.0 + description: Update birth registration applications in table + fromTopic: update-bt-application + isTransaction: true + queryMaps: + - query: UPDATE eg_bt_registration SET tenantid = ?,babyFirstName = ?, timeOfBirth = ? WHERE id=?; + basePath: BirthRegistrationApplication + jsonMaps: + - jsonPath: $.BirthRegistrationApplication.tenantId + + - jsonPath: $.BirthRegistrationApplication.babyFirstName + + - jsonPath: $.BirthRegistrationApplication.timeOfBirth + + - jsonPath: $.BirthRegistrationApplication.id diff --git a/works/egov-persister/contract-service-persister.yml b/works/egov-persister/contract-service-persister.yml new file mode 100644 index 000000000..f13cb8653 --- /dev/null +++ b/works/egov-persister/contract-service-persister.yml @@ -0,0 +1,320 @@ +serviceMaps: + serviceName: contract-service + mappings: + - version: 1.0 + name: contract + description: Persists contract details in eg_wms_contract table + fromTopic: save-contract + isTransaction: true + isAuditEnabled: true + module: CT + objecIdJsonPath: $.id + tenantIdJsonPath: $.tenantId + transactionCodeJsonPath: $.contractNumber + auditAttributeBasePath: $.contract + queryMaps: + - query: INSERT INTO eg_wms_contract (id, contract_number, tenant_id , wf_status, executing_authority, contract_type, total_contracted_amount, security_deposit, agreement_date, defect_liability_period, org_id, start_date, end_date, status, additional_details, created_by, last_modified_by, created_time, last_modified_time,completion_period) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?); + basePath: $.contract + jsonMaps: + - jsonPath: $.contract.id + + - jsonPath: $.contract.contractNumber + + - jsonPath: $.contract.tenantId + + - jsonPath: $.contract.wfStatus + + - jsonPath: $.contract.executingAuthority + + - jsonPath: $.contract.contractType + + - jsonPath: $.contract.totalContractedAmount + + - jsonPath: $.contract.securityDeposit + + - jsonPath: $.contract.agreementDate + + - jsonPath: $.contract.defectLiabilityPeriod + + - jsonPath: $.contract.orgId + + - jsonPath: $.contract.startDate + + - jsonPath: $.contract.endDate + + - jsonPath: $.contract.status + + - jsonPath: $.contract.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.contract.auditDetails.createdBy + + - jsonPath: $.contract.auditDetails.lastModifiedBy + + - jsonPath: $.contract.auditDetails.createdTime + + - jsonPath: $.contract.auditDetails.lastModifiedTime + + - jsonPath: $.contract.completionPeriod + + - query: INSERT INTO eg_wms_contract_documents (id, filestore_id, document_type, document_uid, status, contract_id, additional_details, created_by, last_modified_by, created_time, last_modified_time) VALUES (?,?,?,?,?,?,?,?,?,?,?); + basePath: $.contract.documents.* + jsonMaps: + - jsonPath: $.contract.documents.*.id + + - jsonPath: $.contract.documents.*.fileStore + + - jsonPath: $.contract.documents.*.documentType + + - jsonPath: $.contract.documents.*.documentUid + + - jsonPath: $.contract.documents.*.status + + - jsonPath: $.contract[?({id} in @.documents[*].id)].id + + - jsonPath: $.contract.documents.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.contract[?({id} in @.documents[*].id)].auditDetails.createdBy + + - jsonPath: $.contract[?({id} in @.documents[*].id)].auditDetails.lastModifiedBy + + - jsonPath: $.contract[?({id} in @.documents[*].id)].auditDetails.createdTime + + - jsonPath: $.contract[?({id} in @.documents[*].id)].auditDetails.lastModifiedTime + + + - query: INSERT INTO eg_wms_contract_line_items (id, estimate_id, estimate_line_item_id, contract_id, tenant_id, unit_rate, no_of_unit, status, additional_details, created_by, last_modified_by, created_time, last_modified_time) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?); + basePath: $.contract.lineItems.* + jsonMaps: + - jsonPath: $.contract.lineItems.*.id + + - jsonPath: $.contract.lineItems.*.estimateId + + - jsonPath: $.contract.lineItems.*.estimateLineItemId + + - jsonPath: $.contract[?({id} in @.lineItems[*].id)].id + + - jsonPath: $.contract.lineItems.*.tenantId + + - jsonPath: $.contract.lineItems.*.unitRate + + - jsonPath: $.contract.lineItems.*.noOfunit + + - jsonPath: $.contract.lineItems.*.status + + - jsonPath: $.contract.documents.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.contract[?({id} in @.lineItems[*].id)].auditDetails.createdBy + + - jsonPath: $.contract[?({id} in @.lineItems[*].id)].auditDetails.lastModifiedBy + + - jsonPath: $.contract[?({id} in @.lineItems[*].id)].auditDetails.createdTime + + - jsonPath: $.contract[?({id} in @.lineItems[*].id)].auditDetails.lastModifiedTime + + - query: INSERT INTO eg_wms_contract_amount_breakups (id, estimate_amount_breakup_id, line_item_id, amount, status, additional_details, created_by, last_modified_by, created_time, last_modified_time) VALUES (?,?,?,?,?,?,?,?,?,?); + basePath: $.contract.lineItems.*.amountBreakups.* + jsonMaps: + - jsonPath: $.contract.lineItems.*.amountBreakups.*.id + + - jsonPath: $.contract.lineItems.*.amountBreakups.*.estimateAmountBreakupId + + - jsonPath: $.contract.lineItems[?({id} in @.amountBreakups[*].id)].id + + - jsonPath: $.contract.lineItems.*.amountBreakups.*.amount + + - jsonPath: $.contract.lineItems.*.amountBreakups.*.status + + - jsonPath: $.contract.lineItems.*.amountBreakups.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.contract[?({id} in @.lineItems.*.amountBreakups[*].id)].auditDetails.createdBy + + - jsonPath: $.contract[?({id} in @.lineItems.*.amountBreakups[*].id)].auditDetails.lastModifiedBy + + - jsonPath: $.contract[?({id} in @.lineItems.*.amountBreakups[*].id)].auditDetails.createdTime + + - jsonPath: $.contract[?({id} in @.lineItems.*.amountBreakups[*].id)].auditDetails.lastModifiedTime + + - version: 1.0 + name: contract + description: Update contract details in eg_wms_contract table + fromTopic: update-contract + isTransaction: true + module: CT + objecIdJsonPath: $.id + tenantIdJsonPath: $.tenantId + transactionCodeJsonPath: $.contractNumber + auditAttributeBasePath: $.contract + queryMaps: + - query: UPDATE eg_wms_contract set wf_status = ?, executing_authority = ?, contract_type = ?, total_contracted_amount = ?, security_deposit = ?, agreement_date = ?, defect_liability_period = ?, start_date = ?, end_date = ?, status = ?, additional_details = ?, created_by = ?, last_modified_by = ?, created_time = ?, last_modified_time = ?, issue_date = ?, completion_period = ?, org_id = ? where id = ? ; + basePath: $.contract + jsonMaps: + - jsonPath: $.contract.wfStatus + + - jsonPath: $.contract.executingAuthority + + - jsonPath: $.contract.contractType + + - jsonPath: $.contract.totalContractedAmount + + - jsonPath: $.contract.securityDeposit + + - jsonPath: $.contract.agreementDate + + - jsonPath: $.contract.defectLiabilityPeriod + + - jsonPath: $.contract.startDate + + - jsonPath: $.contract.endDate + + - jsonPath: $.contract.status + + - jsonPath: $.contract.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.contract.auditDetails.createdBy + + - jsonPath: $.contract.auditDetails.lastModifiedBy + + - jsonPath: $.contract.auditDetails.createdTime + + - jsonPath: $.contract.auditDetails.lastModifiedTime + + - jsonPath: $.contract.issueDate + + - jsonPath: $.contract.completionPeriod + + - jsonPath: $.contract.orgId + + - jsonPath: $.contract.id + + - query: INSERT INTO eg_wms_contract_documents (id, filestore_id, document_type, document_uid, status, contract_id, additional_details, created_by, last_modified_by, created_time, last_modified_time) VALUES (?,?,?,?,?,?,?,?,?,?,?) ON CONFLICT (id) DO UPDATE SET filestore_id = ?, document_type = ? , additional_details = ? ,last_modified_by = ? ,last_modified_time = ?, status = ?; + basePath: $.contract.documents.* + jsonMaps: + - jsonPath: $.contract.documents.*.id + + - jsonPath: $.contract.documents.*.fileStore + + - jsonPath: $.contract.documents.*.documentType + + - jsonPath: $.contract.documents.*.documentUid + + - jsonPath: $.contract.documents.*.status + + - jsonPath: $.contract[?({id} in @.documents[*].id)].id + + - jsonPath: $.contract.documents.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.contract[?({id} in @.documents[*].id)].auditDetails.createdBy + + - jsonPath: $.contract[?({id} in @.documents[*].id)].auditDetails.lastModifiedBy + + - jsonPath: $.contract[?({id} in @.documents[*].id)].auditDetails.createdTime + + - jsonPath: $.contract[?({id} in @.documents[*].id)].auditDetails.lastModifiedTime + + - jsonPath: $.contract.documents.*.fileStore + + - jsonPath: $.contract.documents.*.documentType + + - jsonPath: $.contract.documents.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.contract[?({id} in @.documents[*].id)].auditDetails.lastModifiedBy + + - jsonPath: $.contract[?({id} in @.documents[*].id)].auditDetails.lastModifiedTime + + - jsonPath: $.contract.documents.*.status + + - query: INSERT INTO eg_wms_contract_line_items (id, estimate_id, estimate_line_item_id, contract_id, tenant_id, unit_rate, no_of_unit, status, additional_details, created_by, last_modified_by, created_time, last_modified_time) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?) ON CONFLICT (id) DO UPDATE SET unit_rate = ?, no_of_unit = ?, status = ?, additional_details = ?, last_modified_by = ?, last_modified_time = ?; + basePath: $.contract.lineItems.* + jsonMaps: + - jsonPath: $.contract.lineItems.*.id + + - jsonPath: $.contract.lineItems.*.estimateId + + - jsonPath: $.contract.lineItems.*.estimateLineItemId + + - jsonPath: $.contract[?({id} in @.lineItems[*].id)].id + + - jsonPath: $.contract.lineItems.*.tenantId + + - jsonPath: $.contract.lineItems.*.unitRate + + - jsonPath: $.contract.lineItems.*.noOfunit + + - jsonPath: $.contract.lineItems.*.status + + - jsonPath: $.contract.documents.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.contract[?({id} in @.lineItems[*].id)].auditDetails.createdBy + + - jsonPath: $.contract[?({id} in @.lineItems[*].id)].auditDetails.lastModifiedBy + + - jsonPath: $.contract[?({id} in @.lineItems[*].id)].auditDetails.createdTime + + - jsonPath: $.contract[?({id} in @.lineItems[*].id)].auditDetails.lastModifiedTime + + - jsonPath: $.contract.lineItems.*.unitRate + + - jsonPath: $.contract.lineItems.*.noOfunit + + - jsonPath: $.contract.lineItems.*.status + + - jsonPath: $.contract.documents.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.contract[?({id} in @.lineItems[*].id)].auditDetails.lastModifiedBy + + - jsonPath: $.contract[?({id} in @.lineItems[*].id)].auditDetails.lastModifiedTime + + - query: INSERT INTO eg_wms_contract_amount_breakups (id, estimate_amount_breakup_id, line_item_id, amount, status, additional_details, created_by, last_modified_by, created_time, last_modified_time) VALUES (?,?,?,?,?,?,?,?,?,?) ON CONFLICT (id) DO UPDATE SET amount = ?, status = ?, additional_details = ?, last_modified_by = ?, last_modified_time = ?; + basePath: $.contract.lineItems.*.amountBreakups.* + jsonMaps: + - jsonPath: $.contract.lineItems.*.amountBreakups.*.id + + - jsonPath: $.contract.lineItems.*.amountBreakups.*.estimateAmountBreakupId + + - jsonPath: $.contract.lineItems[?({id} in @.amountBreakups[*].id)].id + + - jsonPath: $.contract.lineItems.*.amountBreakups.*.amount + + - jsonPath: $.contract.lineItems.*.amountBreakups.*.status + + - jsonPath: $.contract.lineItems.*.amountBreakups.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.contract[?({id} in @.lineItems.*.amountBreakups[*].id)].auditDetails.createdBy + + - jsonPath: $.contract[?({id} in @.lineItems.*.amountBreakups[*].id)].auditDetails.lastModifiedBy + + - jsonPath: $.contract[?({id} in @.lineItems.*.amountBreakups[*].id)].auditDetails.createdTime + + - jsonPath: $.contract[?({id} in @.lineItems.*.amountBreakups[*].id)].auditDetails.lastModifiedTime + + - jsonPath: $.contract.lineItems.*.amountBreakups.*.amount + + - jsonPath: $.contract.lineItems.*.amountBreakups.*.status + + - jsonPath: $.contract.lineItems.*.amountBreakups.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.contract[?({id} in @.lineItems.*.amountBreakups[*].id)].auditDetails.lastModifiedBy + + - jsonPath: $.contract[?({id} in @.lineItems.*.amountBreakups[*].id)].auditDetails.lastModifiedTime \ No newline at end of file diff --git a/works/egov-persister/egov-workflow-v2-persister.yml b/works/egov-persister/egov-workflow-v2-persister.yml new file mode 100644 index 000000000..c281c0263 --- /dev/null +++ b/works/egov-persister/egov-workflow-v2-persister.yml @@ -0,0 +1,278 @@ +serviceMaps: + serviceName: egov-workflow-v2 + mappings: + - version: 1.0 + description: Persists workflow processInstanceFromRequest details in eg_workflow_v2 table + fromTopic: save-wf-transitions + isTransaction: true + queryMaps: + + - query: INSERT INTO eg_wf_processinstance_v2( id,tenantid,businessService,businessId,moduleName,action,status,comment, assigner, stateSla,businessServiceSla, previousStatus, createdby, lastmodifiedby, createdtime, lastmodifiedtime, rating, escalated) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: ProcessInstances.* + jsonMaps: + - jsonPath: $.ProcessInstances.*.id + + - jsonPath: $.ProcessInstances.*.tenantId + + - jsonPath: $.ProcessInstances.*.businessService + + - jsonPath: $.ProcessInstances.*.businessId + + - jsonPath: $.ProcessInstances.*.moduleName + + - jsonPath: $.ProcessInstances.*.action + + - jsonPath: $.ProcessInstances.*.state.uuid + + - jsonPath: $.ProcessInstances.*.comment + + - jsonPath: $.ProcessInstances.*.assigner.uuid + + - jsonPath: $.ProcessInstances.*.stateSla + + - jsonPath: $.ProcessInstances.*.businesssServiceSla + + - jsonPath: $.ProcessInstances.*.previousStatus + + - jsonPath: $.ProcessInstances.*.auditDetails.createdBy + + - jsonPath: $.ProcessInstances.*.auditDetails.lastModifiedBy + + - jsonPath: $.ProcessInstances.*.auditDetails.createdTime + + - jsonPath: $.ProcessInstances.*.auditDetails.lastModifiedTime + + - jsonPath: $.ProcessInstances.*.rating + + - jsonPath: $.ProcessInstances.*.escalated + + + - query: INSERT INTO eg_wf_document_v2( id, tenantid, active, documenttype,documentUid, processinstanceid, filestoreid, createdby, lastmodifiedby, createdtime, lastmodifiedtime) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: ProcessInstances.*.documents.* + jsonMaps: + - jsonPath: $.ProcessInstances.documents.*.id + + - jsonPath: $.ProcessInstances.documents.*.tenantId + + - jsonPath: $.ProcessInstances.documents.*.active + + - jsonPath: $.ProcessInstances.documents.*.documentType + + - jsonPath: $.ProcessInstances.documents.*.documentUid + + - jsonPath: $.ProcessInstances[*][?({id} in @.documents[*].id)].id + + - jsonPath: $.ProcessInstances.documents.*.fileStoreId + + - jsonPath: $.ProcessInstances.documents.*.auditDetails.createdBy + + - jsonPath: $.ProcessInstances.documents.*.auditDetails.lastModifiedBy + + - jsonPath: $.ProcessInstances.documents.*.auditDetails.createdTime + + - jsonPath: $.ProcessInstances.documents.*.auditDetails.lastModifiedTime + + + - query: INSERT INTO eg_wf_assignee_v2(processinstanceid, tenantid, assignee, createdby, lastmodifiedby, createdtime, lastmodifiedtime) VALUES (?, ?, ?, ?, ?, ?, ?); + basePath: ProcessInstances.*.assignes.* + jsonMaps: + - jsonPath: $.ProcessInstances[*][?({uuid} in @.assignes[*].uuid)].id + + - jsonPath: $.ProcessInstances[*][?({uuid} in @.assignes[*].uuid)].tenantId + + - jsonPath: $.ProcessInstances.*.assignes.*.uuid + + - jsonPath: $.ProcessInstances[*][?({uuid} in @.assignes[*].uuid)].auditDetails.createdBy + + - jsonPath: $.ProcessInstances[*][?({uuid} in @.assignes[*].uuid)].auditDetails.lastModifiedBy + + - jsonPath: $.ProcessInstances[*][?({uuid} in @.assignes[*].uuid)].auditDetails.createdTime + + - jsonPath: $.ProcessInstances[*][?({uuid} in @.assignes[*].uuid)].auditDetails.lastModifiedTime + + + + + - version: 1.0 + description: Persists BusinessService in the table + fromTopic: save-wf-businessservice + isTransaction: true + queryMaps: + + - query: INSERT INTO eg_wf_businessservice_v2(businessServiceSla, businessservice, business, tenantid, uuid, geturi, posturi, createdby, createdtime, lastmodifiedby, lastmodifiedtime) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: BusinessServices.* + jsonMaps: + - jsonPath: $.BusinessServices.*.businessServiceSla + + - jsonPath: $.BusinessServices.*.businessService + + - jsonPath: $.BusinessServices.*.business + + - jsonPath: $.BusinessServices.*.tenantId + + - jsonPath: $.BusinessServices.*.uuid + + - jsonPath: $.BusinessServices.*.geturi + + - jsonPath: $.BusinessServices.*.posturi + + - jsonPath: $.BusinessServices.*.auditDetails.createdBy + + - jsonPath: $.BusinessServices.*.auditDetails.createdTime + + - jsonPath: $.BusinessServices.*.auditDetails.lastModifiedBy + + - jsonPath: $.BusinessServices.*.auditDetails.lastModifiedTime + + + + + - query: INSERT INTO eg_wf_state_v2(seq, uuid, tenantid, businessserviceid, state,applicationStatus,sla,docuploadrequired, isstartstate, isterminatestate,isStateUpdatable, createdby, createdtime, lastmodifiedby, lastmodifiedtime) VALUES (nextval('seq_eg_wf_state_v2'),? , ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: BusinessServices.*.states.* + jsonMaps: + - jsonPath: $.BusinessServices.*.states.*.uuid + + - jsonPath: $.BusinessServices.*.states.*.tenantId + + - jsonPath: $.BusinessServices[*][?({uuid} in @.states[*].uuid)].uuid + + - jsonPath: $.BusinessServices.*.states.*.state + + - jsonPath: $.BusinessServices.*.states.*.applicationStatus + + - jsonPath: $.BusinessServices.*.states.*.sla + + - jsonPath: $.BusinessServices.*.states.*.docUploadRequired + + - jsonPath: $.BusinessServices.*.states.*.isStartState + + - jsonPath: $.BusinessServices.*.states.*.isTerminateState + + - jsonPath: $.BusinessServices.*.states.*.isStateUpdatable + + - jsonPath: $.BusinessServices.*.states.*.auditDetails.createdBy + + - jsonPath: $.BusinessServices.*.states.*.auditDetails.createdTime + + - jsonPath: $.BusinessServices.*.states.*.auditDetails.lastModifiedBy + + - jsonPath: $.BusinessServices.*.states.*.auditDetails.lastModifiedTime + + + + - query: INSERT INTO eg_wf_action_v2( uuid,tenantId,active, currentState, action, nextstate, roles, createdby, createdtime, lastmodifiedby, lastmodifiedtime) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: BusinessServices.*.states.*.actions.* + jsonMaps: + - jsonPath: $.BusinessServices.*.states.*.actions.*.uuid + + - jsonPath: $.BusinessServices.*.states.*.actions.*.tenantId + + - jsonPath: $.BusinessServices.*.states.*.actions.*.active + + - jsonPath: $.BusinessServices.*.states[*][?({uuid} in @.actions[*].uuid)].uuid + + - jsonPath: $.BusinessServices.*.states.*.actions.*.action + + - jsonPath: $.BusinessServices.*.states.*.actions.*.nextState + + - jsonPath: $.BusinessServices.*.states.*.actions.*.roles + type: ARRAY + dbType: STRING + + - jsonPath: $.BusinessServices.*.states.*.actions.*.auditDetails.createdBy + + - jsonPath: $.BusinessServices.*.states.*.actions.*.auditDetails.createdTime + + - jsonPath: $.BusinessServices.*.states.*.actions.*.auditDetails.lastModifiedBy + + - jsonPath: $.BusinessServices.*.states.*.actions.*.auditDetails.lastModifiedTime + + + + - version: 1.0 + description: Persists BusinessService in the table + fromTopic: update-wf-businessservice + isTransaction: true + queryMaps: + + - query: UPDATE eg_wf_businessservice_v2 SET businessservicesla=?,businessservice=?, business=?, geturi=?, posturi=?, lastmodifiedby=?, lastmodifiedtime=? WHERE uuid=?; + basePath: BusinessServices.* + jsonMaps: + - jsonPath: $.BusinessServices.*.businessServiceSla + + - jsonPath: $.BusinessServices.*.businessService + + - jsonPath: $.BusinessServices.*.business + + - jsonPath: $.BusinessServices.*.geturi + + - jsonPath: $.BusinessServices.*.posturi + + - jsonPath: $.BusinessServices.*.auditDetails.lastModifiedBy + + - jsonPath: $.BusinessServices.*.auditDetails.lastModifiedTime + + - jsonPath: $.BusinessServices.*.uuid + + + + + - query: INSERT INTO eg_wf_state_v2(seq, uuid, tenantid, businessserviceid, state,applicationStatus,sla,docuploadrequired, isstartstate, isterminatestate,isStateUpdatable, createdby, createdtime, lastmodifiedby, lastmodifiedtime) VALUES (nextval('seq_eg_wf_state_v2'), ?,?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON CONFLICT (uuid) DO UPDATE SET state=EXCLUDED.state,applicationStatus=EXCLUDED.applicationStatus,sla=EXCLUDED.sla,docuploadrequired=EXCLUDED.docuploadrequired,isstartstate=EXCLUDED.isstartstate, isterminatestate=EXCLUDED.isterminatestate,isStateUpdatable=EXCLUDED.isStateUpdatable, lastmodifiedby=EXCLUDED.lastmodifiedby, lastmodifiedtime=EXCLUDED.lastmodifiedtime; + basePath: BusinessServices.*.states.* + jsonMaps: + + - jsonPath: $.BusinessServices.*.states.*.uuid + + - jsonPath: $.BusinessServices.*.states.*.tenantId + + - jsonPath: $.BusinessServices[*][?({uuid} in @.states[*].uuid)].uuid + + - jsonPath: $.BusinessServices.*.states.*.state + + - jsonPath: $.BusinessServices.*.states.*.applicationStatus + + - jsonPath: $.BusinessServices.*.states.*.sla + + - jsonPath: $.BusinessServices.*.states.*.docUploadRequired + + - jsonPath: $.BusinessServices.*.states.*.isStartState + + - jsonPath: $.BusinessServices.*.states.*.isTerminateState + + - jsonPath: $.BusinessServices.*.states.*.isStateUpdatable + + - jsonPath: $.BusinessServices.*.states.*.auditDetails.createdBy + + - jsonPath: $.BusinessServices.*.states.*.auditDetails.createdTime + + - jsonPath: $.BusinessServices.*.states.*.auditDetails.lastModifiedBy + + - jsonPath: $.BusinessServices.*.states.*.auditDetails.lastModifiedTime + + - query: INSERT INTO eg_wf_action_v2( uuid,tenantId,active, currentState, action, nextstate, roles, createdby, createdtime, lastmodifiedby, lastmodifiedtime) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON CONFLICT (uuid) DO UPDATE SET active=EXCLUDED.active, action=EXCLUDED.action, nextstate=EXCLUDED.nextstate, roles=EXCLUDED.roles, lastmodifiedby=EXCLUDED.lastmodifiedby, lastmodifiedtime=EXCLUDED.lastmodifiedtime; + basePath: BusinessServices.*.states.*.actions.* + jsonMaps: + + - jsonPath: $.BusinessServices.*.states.*.actions.*.uuid + + - jsonPath: $.BusinessServices.*.states.*.actions.*.tenantId + + - jsonPath: $.BusinessServices.*.states.*.actions.*.active + + - jsonPath: $.BusinessServices.*.states[*][?({uuid} in @.actions[*].uuid)].uuid + + - jsonPath: $.BusinessServices.*.states.*.actions.*.action + + - jsonPath: $.BusinessServices.*.states.*.actions.*.nextState + + - jsonPath: $.BusinessServices.*.states.*.actions.*.roles + type: ARRAY + dbType: STRING + + - jsonPath: $.BusinessServices.*.states.*.actions.*.auditDetails.createdBy + + - jsonPath: $.BusinessServices.*.states.*.actions.*.auditDetails.createdTime + + - jsonPath: $.BusinessServices.*.states.*.actions.*.auditDetails.lastModifiedBy + + - jsonPath: $.BusinessServices.*.states.*.actions.*.auditDetails.lastModifiedTime diff --git a/works/egov-persister/estimate-service.yml b/works/egov-persister/estimate-service.yml new file mode 100644 index 000000000..ae4a3d1e0 --- /dev/null +++ b/works/egov-persister/estimate-service.yml @@ -0,0 +1,276 @@ +serviceMaps: + serviceName: estimate-service + mappings: + - version: 1.0 + name: Estimate + description: Persists estimate details + fromTopic: save-estimate + isTransaction: true + isAuditEnabled: true + module: EST + objecIdJsonPath: $.id + tenantIdJsonPath: $.tenantId + transactionCodeJsonPath: $.estimateNumber + auditAttributeBasePath: $.estimate + queryMaps: + - query: INSERT INTO eg_wms_estimate(id,tenant_id,estimate_number,project_id,proposal_date,status,wf_status,name,reference_number,description,executing_department,additional_details,created_by,last_modified_by,created_time,last_modified_time) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?); + + basePath: $.estimate + jsonMaps: + - jsonPath: $.estimate.id + + - jsonPath: $.estimate.tenantId + + - jsonPath: $.estimate.estimateNumber + + - jsonPath: $.estimate.projectId + + - jsonPath: $.estimate.proposalDate + + - jsonPath: $.estimate.status + + - jsonPath: $.estimate.wfStatus + + - jsonPath: $.estimate.name + + - jsonPath: $.estimate.referenceNumber + + - jsonPath: $.estimate.description + + - jsonPath: $.estimate.executingDepartment + + - jsonPath: $.estimate.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.estimate.auditDetails.createdBy + + - jsonPath: $.estimate.auditDetails.lastModifiedBy + + - jsonPath: $.estimate.auditDetails.createdTime + + - jsonPath: $.estimate.auditDetails.lastModifiedTime + + - query: INSERT INTO eg_wms_estimate_detail(id,tenant_id,estimate_id,sor_id,is_active,category,name,description,unit_rate,no_of_unit,uom,uom_value,additional_details) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?); + + basePath: $.estimate.estimateDetails.* + jsonMaps: + - jsonPath: $.estimate.estimateDetails.*.id + + - jsonPath: $.estimate.tenantId + + - jsonPath: $.estimate.id + + - jsonPath: $.estimate.estimateDetails.*.sorId + + - jsonPath: $.estimate.estimateDetails.*.isActive + + - jsonPath: $.estimate.estimateDetails.*.category + + - jsonPath: $.estimate.estimateDetails.*.name + + - jsonPath: $.estimate.estimateDetails.*.description + + - jsonPath: $.estimate.estimateDetails.*.unitRate + + - jsonPath: $.estimate.estimateDetails.*.noOfunit + + - jsonPath: $.estimate.estimateDetails.*.uom + + - jsonPath: $.estimate.estimateDetails.*.uomValue + + - jsonPath: $.estimate.estimateDetails.*.additionalDetails + type: JSON + dbType: JSONB + + - query: INSERT INTO eg_wms_estimate_address(id,tenant_id,estimate_id,latitude,longitude,address_number,address_line_1,address_line_2,landmark,city,pin_code,detail) VALUES (?,?,?,?,?,?,?,?,?,?,?,?); + + basePath: $.estimate.address + jsonMaps: + - jsonPath: $.estimate.address.id + + - jsonPath: $.estimate.address.tenantId + + - jsonPath: $.estimate.id + + - jsonPath: $.estimate.address.latitude + + - jsonPath: $.estimate.address.longitude + + - jsonPath: $.estimate.address.addressNumber + + - jsonPath: $.estimate.address.addressLine1 + + - jsonPath: $.estimate.address.addressLine2 + + - jsonPath: $.estimate.address.landmark + + - jsonPath: $.estimate.address.city + + - jsonPath: $.estimate.address.pincode + + - jsonPath: $.estimate.address.detail + + - query: INSERT INTO eg_wms_estimate_amount_detail(id,tenant_id,estimate_detail_id,type,is_active,amount,additional_details) VALUES (?,?,?,?,?,?,?); + + basePath: $.estimate.estimateDetails.*.amountDetail.* + jsonMaps: + - jsonPath: $.estimate.estimateDetails.*.amountDetail.*.id + + - jsonPath: $.estimate.tenantId + + - jsonPath: $.estimate.estimateDetails[*][?({id} in @.amountDetail[*].id)].id + + - jsonPath: $.estimate.estimateDetails.*.amountDetail.*.type + + - jsonPath: $.estimate.estimateDetails.*.amountDetail.*.isActive + + - jsonPath: $.estimate.estimateDetails.*.amountDetail.*.amount + + - jsonPath: $.estimate.estimateDetails.*.amountDetail.*.additionalDetails + type: JSON + dbType: JSONB + + - version: 1.0 + description: Update estimate + fromTopic: update-estimate + isTransaction: true + isAuditEnabled: true + module: EST + objecIdJsonPath: $.id + tenantIdJsonPath: $.tenantId + transactionCodeJsonPath: $.estimateNumber + auditAttributeBasePath: $.estimate + queryMaps: + - query: UPDATE eg_wms_estimate set status=?, wf_status=?, name=?, reference_number=?, description=?, executing_department=?, additional_details=?,last_modified_by=?, last_modified_time=? where id=?; + basePath: $.estimate + jsonMaps: + - jsonPath: $.estimate.status + + - jsonPath: $.estimate.wfStatus + + - jsonPath: $.estimate.name + + - jsonPath: $.estimate.referenceNumber + + - jsonPath: $.estimate.description + + - jsonPath: $.estimate.executingDepartment + + - jsonPath: $.estimate.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.estimate.auditDetails.lastModifiedBy + + - jsonPath: $.estimate.auditDetails.lastModifiedTime + + - jsonPath: $.estimate.id + + - query: INSERT INTO eg_wms_estimate_detail(id,tenant_id,estimate_id,sor_id,is_active,category,name,description,unit_rate,no_of_unit,uom,uom_value,additional_details) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?) ON CONFLICT (id) DO UPDATE SET sor_id=?, is_active = ?,name=?, description=?,unit_rate=?, no_of_unit=?,category=?,uom=?, uom_value=?, additional_details=?; + + basePath: $.estimate.estimateDetails.* + jsonMaps: + - jsonPath: $.estimate.estimateDetails.*.id + + - jsonPath: $.estimate.tenantId + + - jsonPath: $.estimate.id + + - jsonPath: $.estimate.estimateDetails.*.sorId + + - jsonPath: $.estimate.estimateDetails.*.isActive + + - jsonPath: $.estimate.estimateDetails.*.category + + - jsonPath: $.estimate.estimateDetails.*.name + + - jsonPath: $.estimate.estimateDetails.*.description + + - jsonPath: $.estimate.estimateDetails.*.unitRate + + - jsonPath: $.estimate.estimateDetails.*.noOfunit + + - jsonPath: $.estimate.estimateDetails.*.uom + + - jsonPath: $.estimate.estimateDetails.*.uomValue + + - jsonPath: $.estimate.estimateDetails.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.estimate.estimateDetails.*.sorId + + - jsonPath: $.estimate.estimateDetails.*.isActive + + - jsonPath: $.estimate.estimateDetails.*.name + + - jsonPath: $.estimate.estimateDetails.*.description + + - jsonPath: $.estimate.estimateDetails.*.unitRate + + - jsonPath: $.estimate.estimateDetails.*.noOfunit + + - jsonPath: $.estimate.estimateDetails.*.category + + - jsonPath: $.estimate.estimateDetails.*.uom + + - jsonPath: $.estimate.estimateDetails.*.uomValue + + - jsonPath: $.estimate.estimateDetails.*.additionalDetails + type: JSON + dbType: JSONB + + - query: UPDATE eg_wms_estimate_address set latitude=?, longitude=?, address_number=?,address_line_1=?, address_line_2=?,landmark=?,city=?, pin_code=?, detail=? where id=?; + + basePath: $.estimate.address + jsonMaps: + - jsonPath: $.estimate.address.latitude + + - jsonPath: $.estimate.address.longitude + + - jsonPath: $.estimate.address.addressNumber + + - jsonPath: $.estimate.address.addressLine1 + + - jsonPath: $.estimate.address.addressLine2 + + - jsonPath: $.estimate.address.landmark + + - jsonPath: $.estimate.address.city + + - jsonPath: $.estimate.address.pincode + + - jsonPath: $.estimate.address.detail + + - jsonPath: $.estimate.address.id + + - query: INSERT INTO eg_wms_estimate_amount_detail(id,tenant_id,estimate_detail_id,type,is_active,amount,additional_details) VALUES (?,?,?,?,?,?,?) ON CONFLICT (id) DO UPDATE set type=?, is_active=?,amount=?,additional_details=?; + + basePath: $.estimate.estimateDetails.*.amountDetail.* + jsonMaps: + - jsonPath: $.estimate.estimateDetails.*.amountDetail.*.id + + - jsonPath: $.estimate.tenantId + + - jsonPath: $.estimate.estimateDetails[*][?({id} in @.amountDetail[*].id)].id + + - jsonPath: $.estimate.estimateDetails.*.amountDetail.*.type + + - jsonPath: $.estimate.estimateDetails.*.amountDetail.*.isActive + + - jsonPath: $.estimate.estimateDetails.*.amountDetail.*.amount + + - jsonPath: $.estimate.estimateDetails.*.amountDetail.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.estimate.estimateDetails.*.amountDetail.*.type + + - jsonPath: $.estimate.estimateDetails.*.amountDetail.*.isActive + + - jsonPath: $.estimate.estimateDetails.*.amountDetail.*.amount + + - jsonPath: $.estimate.estimateDetails.*.amountDetail.*.additionalDetails + type: JSON + dbType: JSONB diff --git a/works/egov-persister/expence-calculator-service-persister.yml b/works/egov-persister/expence-calculator-service-persister.yml new file mode 100644 index 000000000..29156af6f --- /dev/null +++ b/works/egov-persister/expence-calculator-service-persister.yml @@ -0,0 +1,72 @@ +serviceMaps: + serviceName: expense-calculator-service + mappings: + - version: 1.0 + name: expense-calculator + description: Persists bill meta details in eg_works_calculation table + fromTopic: calculate-billmeta + isTransaction: true + queryMaps: + - query: INSERT INTO eg_works_calculation (id, tenant_id, business_service, bill_id, bill_number, bill_reference, contract_number, musterroll_number, project_number,org_id, is_active, additionaldetails, createdby, lastmodifiedby, createdtime, lastmodifiedtime ) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?); + basePath: $.BillMetaCalculation.* + jsonMaps: + - jsonPath: $.BillMetaCalculation.*.id + + - jsonPath: $.BillMetaCalculation.*.tenantId + + - jsonPath: $.BillMetaCalculation.*.businessService + + - jsonPath: $.BillMetaCalculation.*.billId + + - jsonPath: $.BillMetaCalculation.*.billNumber + + - jsonPath: $.BillMetaCalculation.*.billReference + + - jsonPath: $.BillMetaCalculation.*.contractNumber + + - jsonPath: $.BillMetaCalculation.*.musterrollNumber + + - jsonPath: $.BillMetaCalculation.*.projectNumber + + - jsonPath: $.BillMetaCalculation.*.orgId + + - jsonPath: $.BillMetaCalculation.*.isActive + + - jsonPath: $.BillMetaCalculation.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.BillMetaCalculation.*.auditDetails.createdBy + + - jsonPath: $.BillMetaCalculation.*.auditDetails.lastModifiedBy + + - jsonPath: $.BillMetaCalculation.*.auditDetails.createdTime + + - jsonPath: $.BillMetaCalculation.*.auditDetails.lastModifiedTime + + - query: INSERT INTO eg_works_calc_details (id, tenant_id, calculation_id, payee_id, billingslab_code, is_active, additionaldetails, createdby, lastmodifiedby, createdtime, lastmodifiedtime ) VALUES (?,?,?,?,?,?,?,?,?,?,?); + basePath: $.BillMetaCalculation.*.billMetaCalcDetails.* + jsonMaps: + - jsonPath: $.BillMetaCalculation.*.billMetaCalcDetails.*.id + + - jsonPath: $.BillMetaCalculation.*.billMetaCalcDetails.*.tenantId + + - jsonPath: $.BillMetaCalculation[*][?({id} in @.billMetaCalcDetails[*].id)].id + + - jsonPath: $.BillMetaCalculation.*.billMetaCalcDetails.*.payeeId + + - jsonPath: $.BillMetaCalculation.*.billMetaCalcDetails.*.billingSlabCode + + - jsonPath: $.BillMetaCalculation.*.isActive + + - jsonPath: $.BillMetaCalculation.*.billMetaCalcDetails.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.BillMetaCalculation.*.billMetaCalcDetails.*.auditDetails.createdBy + + - jsonPath: $.BillMetaCalculation.*.billMetaCalcDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.BillMetaCalculation.*.billMetaCalcDetails.*.auditDetails.createdTime + + - jsonPath: $.BillMetaCalculation.*.billMetaCalcDetails.*.auditDetails.lastModifiedTime \ No newline at end of file diff --git a/works/egov-persister/expense-bill-payment-persister.yaml b/works/egov-persister/expense-bill-payment-persister.yaml new file mode 100644 index 000000000..97bd21412 --- /dev/null +++ b/works/egov-persister/expense-bill-payment-persister.yaml @@ -0,0 +1,576 @@ +serviceMaps: + serviceName: expense Service + mappings: + - version: 1.0 + name: bill create + description: create bill in eg_expense_bill + fromTopic: expense-bill-create + queryMaps: + - query: INSERT into eg_expense_bill (id, tenantid, billdate, duedate, billnumber, totalamount, totalPaidAmount, businessservice, referenceId, fromperiod, toperiod, status, paymentStatus, createdby, createdTime, lastmodifiedby, lastModifiedTime, additionalDetails) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) + basePath: $.bill + jsonMaps: + + - jsonPath: $.bill.id + + - jsonPath: $.bill.tenantId + + - jsonPath: $.bill.billDate + + - jsonPath: $.bill.dueDate + + - jsonPath: $.bill.billNumber + + - jsonPath: $.bill.totalAmount + + - jsonPath: $.bill.totalPaidAmount + + - jsonPath: $.bill.businessService + + - jsonPath: $.bill.referenceId + + - jsonPath: $.bill.fromPeriod + + - jsonPath: $.bill.toPeriod + + - jsonPath: $.bill.status + + - jsonPath: $.bill.paymentStatus + + - jsonPath: $.bill.auditDetails.createdBy + + - jsonPath: $.bill.auditDetails.createdTime + + - jsonPath: $.bill.auditDetails.lastModifiedBy + + - jsonPath: $.bill.auditDetails.lastModifiedTime + + - jsonPath: $.bill.additionalDetails + type: JSON + dbType: JSONB + + + # insert into party from payer of bill + - query: INSERT into eg_expense_party (id, tenantid, type, identifier, parentId, status, createdby, createdTime, lastmodifiedby, lastModifiedTime) values(?,?,?,?,?,?,?,?,?,?) + basePath: $.bill.payer + jsonMaps: + + - jsonPath: $.bill.payer.id + + - jsonPath: $.bill.payer.tenantId + + - jsonPath: $.bill.payer.type + + - jsonPath: $.bill.payer.identifier + + - jsonPath: $.bill.id + + - jsonPath: $.bill.payer.status + + - jsonPath: $.bill.payer.auditDetails.createdBy + + - jsonPath: $.bill.payer.auditDetails.createdTime + + - jsonPath: $.bill.payer.auditDetails.lastModifiedBy + + - jsonPath: $.bill.payer.auditDetails.lastModifiedTime + + + - query: INSERT into eg_expense_billdetail (id, tenantid, billid, referenceId, totalAmount, totalPaidAmount, status, paymentStatus, fromperiod, toperiod, createdby, createdTime, lastModifiedby, lastModifiedTime, additionalDetails) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?); + basePath: $.bill.billDetails.* + jsonMaps: + - jsonPath: $.bill.billDetails.*.id + + - jsonPath: $.bill.billDetails.*.tenantId + + - jsonPath: $.bill.id + + - jsonPath: $.bill.billDetails.*.referenceId + + - jsonPath: $.bill.totalAmount + + - jsonPath: $.bill.totalPaidAmount + + - jsonPath: $.bill.billDetails.*.status + + - jsonPath: $.bill.billDetails.*.paymentStatus + + - jsonPath: $.bill.billDetails.*.fromPeriod + + - jsonPath: $.bill.billDetails.*.toPeriod + + - jsonPath: $.bill.billDetails.*.auditDetails.createdBy + + - jsonPath: $.bill.billDetails.*.auditDetails.createdTime + + - jsonPath: $.bill.billDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.bill.billDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.bill.billDetails.*.additionalDetails + type: JSON + dbType: JSONB + + # insert into party from payee of bill details + - query: INSERT into eg_expense_party (id, tenantid, type, identifier, parentId, status, createdby, createdTime, lastmodifiedby, lastModifiedTime) values(?,?,?,?,?,?,?,?,?,?) + basePath: $.bill.billDetails.*.payee + jsonMaps: + + - jsonPath: $.bill.billDetails.*.payee.id + + - jsonPath: $.bill.billDetails.*.payee.tenantId + + - jsonPath: $.bill.billDetails.*.payee.type + + - jsonPath: $.bill.billDetails.*.payee.identifier + + - jsonPath: $.bill.billDetails.*.id + + - jsonPath: $.bill.billDetails.*.payee.status + + - jsonPath: $.bill.billDetails.*.payee.auditDetails.createdBy + + - jsonPath: $.bill.billDetails.*.payee.auditDetails.createdTime + + - jsonPath: $.bill.billDetails.*.payee.auditDetails.lastModifiedBy + + - jsonPath: $.bill.billDetails.*.payee.auditDetails.lastModifiedTime + + + - query: INSERT into eg_expense_lineitem (id, tenantid, billDetailId, headCode, amount, paidAmount, type, status, paymentStatus, islineitempayable, createdby, createdTime, lastmodifiedby, lastModifiedTime, additionalDetails) values(?,?,?,?,?,?,?,?,?,false,?,?,?,?,?); + basePath: $.bill.billDetails.*.lineItems.* + jsonMaps: + - jsonPath: $.bill.billDetails.*.lineItems.*.id + + - jsonPath: $.bill.billDetails.*.lineItems.*.tenantId + + - jsonPath: $.bill.billDetails[?({id} in @.lineItems[*].id)].id + + - jsonPath: $.bill.billDetails.*.lineItems.*.headCode + + - jsonPath: $.bill.billDetails.*.lineItems.*.amount + + - jsonPath: $.bill.billDetails.*.lineItems.*.paidAmount + + - jsonPath: $.bill.billDetails.*.lineItems.*.type + + - jsonPath: $.bill.billDetails.*.lineItems.*.status + + - jsonPath: $.bill.billDetails.*.lineItems.*.paymentStatus + + - jsonPath: $.bill.billDetails.*.lineItems.*.auditDetails.createdBy + + - jsonPath: $.bill.billDetails.*.lineItems.*.auditDetails.createdTime + + - jsonPath: $.bill.billDetails.*.lineItems.*.auditDetails.lastModifiedBy + + - jsonPath: $.bill.billDetails.*.lineItems.*.auditDetails.lastModifiedTime + + - jsonPath: $.bill.billDetails.*.lineItems.*.additionalDetails + type: JSON + dbType: JSONB + + - query: INSERT into eg_expense_lineitem (id, tenantid, billDetailId, headCode, amount, paidAmount, type, status, paymentStatus,islineitempayable, createdby, createdTime, lastmodifiedby, lastModifiedTime, additionalDetails) values(?,?,?,?,?,?,?,?,?,true,?,?,?,?,?); + basePath: $.bill.billDetails.*.payableLineItems.* + jsonMaps: + - jsonPath: $.bill.billDetails.*.payableLineItems.*.id + + - jsonPath: $.bill.billDetails.*.payableLineItems.*.tenantId + + - jsonPath: $.bill.billDetails[?({id} in @.payableLineItems[*].id)].id + + - jsonPath: $.bill.billDetails.*.payableLineItems.*.headCode + + - jsonPath: $.bill.billDetails.*.payableLineItems.*.amount + + - jsonPath: $.bill.billDetails.*.payableLineItems.*.paidAmount + + - jsonPath: $.bill.billDetails.*.payableLineItems.*.type + + - jsonPath: $.bill.billDetails.*.payableLineItems.*.status + + - jsonPath: $.bill.billDetails.*.lineItems.*.paymentStatus + + - jsonPath: $.bill.billDetails.*.payableLineItems.*.auditDetails.createdBy + + - jsonPath: $.bill.billDetails.*.payableLineItems.*.auditDetails.createdTime + + - jsonPath: $.bill.billDetails.*.payableLineItems.*.auditDetails.lastModifiedBy + + - jsonPath: $.bill.billDetails.*.payableLineItems.*.auditDetails.lastModifiedTime + + - jsonPath: $.bill.billDetails.*.payableLineItems.*.additionalDetails + type: JSON + dbType: JSONB + + + - version: 1.0 + name: bill update + description: update bill in eg_expense_bill + fromTopic: expense-bill-update + queryMaps: + - query: UPDATE eg_expense_bill SET billdate=?, duedate=?, totalAmount=?, totalPaidAmount=?, businessservice=?, referenceid=?, fromperiod=?, toperiod=?, status=?, paymentstatus=?, lastmodifiedby=?, lastmodifiedtime=?, additionaldetails=? WHERE id=? AND tenantid=?; + basePath: $.bill + jsonMaps: + + - jsonPath: $.bill.billDate + + - jsonPath: $.bill.dueDate + + - jsonPath: $.bill.totalAmount + + - jsonPath: $.bill.totalPaidAmount + + - jsonPath: $.bill.businessService + + - jsonPath: $.bill.referenceId + + - jsonPath: $.bill.fromPeriod + + - jsonPath: $.bill.toPeriod + + - jsonPath: $.bill.status + + - jsonPath: $.bill.paymentStatus + + - jsonPath: $.bill.auditDetails.lastModifiedBy + + - jsonPath: $.bill.auditDetails.lastModifiedTime + + - jsonPath: $.bill.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.bill.id + + - jsonPath: $.bill.tenantId + + # update to party from payer of bill + - query: UPDATE eg_expense_party SET type=?, identifier=?, parentid=?, status=?, lastmodifiedby=?, lastmodifiedtime=? WHERE id=? AND tenantid=?; + basePath: $.bill + jsonMaps: + + - jsonPath: $.bill.payer.type + + - jsonPath: $.bill.payer.identifier + + - jsonPath: $.bill.id + + - jsonPath: $.bill.payer.status + + - jsonPath: $.bill.payer.auditDetails.lastModifiedBy + + - jsonPath: $.bill.payer.auditDetails.lastModifiedTime + + - jsonPath: $.bill.payer.id + + - jsonPath: $.bill.tenantId + + - query: INSERT into eg_expense_billdetail (id, tenantid, billid, totalamount, totalpaidamount, status, referenceId, paymentStatus, fromperiod, toperiod, createdby, createdTime, lastModifiedby, lastModifiedTime, additionalDetails) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) ON CONFLICT(id, tenantid) DO UPDATE SET referenceid=EXCLUDED.referenceid, paymentstatus=EXCLUDED.paymentstatus, status=EXCLUDED.status, totalamount=EXCLUDED.totalamount, totalpaidamount=EXCLUDED.totalpaidamount, fromperiod=EXCLUDED.fromperiod, toperiod=EXCLUDED.toperiod, lastmodifiedby=EXCLUDED.lastmodifiedby, lastmodifiedtime=EXCLUDED.lastmodifiedtime, additionaldetails=EXCLUDED.additionaldetails; + basePath: $.bill.billDetails.* + jsonMaps: + - jsonPath: $.bill.billDetails.*.id + + - jsonPath: $.bill.billDetails.*.tenantId + + - jsonPath: $.bill.id + + - jsonPath: $.bill.totalAmount + + - jsonPath: $.bill.totalPaidAmount + + - jsonPath: $.bill.billDetails.*.status + + - jsonPath: $.bill.billDetails.*.referenceId + + - jsonPath: $.bill.billDetails.*.paymentStatus + + - jsonPath: $.bill.billDetails.*.fromPeriod + + - jsonPath: $.bill.billDetails.*.toPeriod + + - jsonPath: $.bill.billDetails.*.auditDetails.createdBy + + - jsonPath: $.bill.billDetails.*.auditDetails.createdTime + + - jsonPath: $.bill.billDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.bill.billDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.bill.billDetails.*.additionalDetails + type: JSON + dbType: JSONB + + # update party from payee of bill details + - query: INSERT into eg_expense_party (id, tenantid, type, identifier, parentId, status, createdby, createdTime, lastmodifiedby, lastModifiedTime) values(?,?,?,?,?,?,?,?,?,?) ON CONFLICT (id, tenantid) DO UPDATE SET type=EXCLUDED.type, identifier=EXCLUDED.identifier, parentid=EXCLUDED.parentid, status=EXCLUDED.status, lastmodifiedby=EXCLUDED.lastmodifiedby, lastmodifiedtime=EXCLUDED.lastmodifiedtime + basePath: $.bill.billDetails.*.payee + jsonMaps: + + - jsonPath: $.bill.billDetails.*.payee.id + + - jsonPath: $.bill.billDetails.*.payee.tenantId + + - jsonPath: $.bill.billDetails.*.payee.type + + - jsonPath: $.bill.billDetails.*.payee.identifier + + - jsonPath: $.bill.billDetails.*.id + + - jsonPath: $.bill.billDetails.*.payee.status + + - jsonPath: $.bill.billDetails.*.payee.auditDetails.createdBy + + - jsonPath: $.bill.billDetails.*.payee.auditDetails.createdTime + + - jsonPath: $.bill.billDetails.*.payee.auditDetails.lastModifiedBy + + - jsonPath: $.bill.billDetails.*.payee.auditDetails.lastModifiedTime + + + - query: INSERT into eg_expense_lineitem (id, tenantid, billDetailId, headCode, amount, paidAmount, type, status, islineitempayable, createdby, createdTime, lastmodifiedby, lastModifiedTime, additionalDetails) values(?,?,?,?,?,?,?,?,false,?,?,?,?,?) ON CONFLICT (id,tenantid) DO UPDATE SET headcode=EXCLUDED.headcode, amount=EXCLUDED.amount, paidamount=EXCLUDED.paidamount, type=EXCLUDED.type, status=EXCLUDED.status, islineitempayable=EXCLUDED.islineitempayable, lastmodifiedby=EXCLUDED.lastmodifiedby, lastmodifiedtime=EXCLUDED.lastmodifiedtime, additionaldetails=EXCLUDED.additionaldetails; + basePath: $.bill.billDetails.*.lineItems.* + jsonMaps: + + - jsonPath: $.bill.billDetails.*.lineItems.*.id + + - jsonPath: $.bill.billDetails.*.lineItems.*.tenantId + + - jsonPath: $.bill.billDetails[?({id} in @.lineItems[*].id)].id + + - jsonPath: $.bill.billDetails.*.lineItems.*.headCode + + - jsonPath: $.bill.billDetails.*.lineItems.*.amount + + - jsonPath: $.bill.billDetails.*.lineItems.*.paidAmount + + - jsonPath: $.bill.billDetails.*.lineItems.*.type + + - jsonPath: $.bill.billDetails.*.lineItems.*.status + + - jsonPath: $.bill.billDetails.*.lineItems.*.auditDetails.createdBy + + - jsonPath: $.bill.billDetails.*.lineItems.*.auditDetails.createdTime + + - jsonPath: $.bill.billDetails.*.lineItems.*.auditDetails.lastModifiedBy + + - jsonPath: $.bill.billDetails.*.lineItems.*.auditDetails.lastModifiedTime + + - jsonPath: $.bill.billDetails.*.lineItems.*.additionalDetails + type: JSON + dbType: JSONB + + - query: INSERT into eg_expense_lineitem (id, tenantid, billDetailId, headCode, amount, paidAmount, type, status, islineitempayable, createdby, createdTime, lastmodifiedby, lastModifiedTime, additionalDetails) values(?,?,?,?,?,?,?,?,true,?,?,?,?,?) ON CONFLICT (id,tenantid) DO UPDATE SET headcode=EXCLUDED.headcode, amount=EXCLUDED.amount, paidamount=EXCLUDED.paidamount, type=EXCLUDED.type, status=EXCLUDED.status, islineitempayable=EXCLUDED.islineitempayable, lastmodifiedby=EXCLUDED.lastmodifiedby, lastmodifiedtime=EXCLUDED.lastmodifiedtime, additionaldetails=EXCLUDED.additionaldetails; + basePath: $.bill.billDetails.*.payableLineItems.* + jsonMaps: + + - jsonPath: $.bill.billDetails.*.payableLineItems.*.id + + - jsonPath: $.bill.billDetails.*.payableLineItems.*.tenantId + + - jsonPath: $.bill.billDetails[?({id} in @.payableLineItems[*].id)].id + + - jsonPath: $.bill.billDetails.*.payableLineItems.*.headCode + + - jsonPath: $.bill.billDetails.*.payableLineItems.*.amount + + - jsonPath: $.bill.billDetails.*.payableLineItems.*.paidAmount + + - jsonPath: $.bill.billDetails.*.payableLineItems.*.type + + - jsonPath: $.bill.billDetails.*.payableLineItems.*.status + + - jsonPath: $.bill.billDetails.*.payableLineItems.*.auditDetails.createdBy + + - jsonPath: $.bill.billDetails.*.payableLineItems.*.auditDetails.createdTime + + - jsonPath: $.bill.billDetails.*.payableLineItems.*.auditDetails.lastModifiedBy + + - jsonPath: $.bill.billDetails.*.payableLineItems.*.auditDetails.lastModifiedTime + + - jsonPath: $.bill.billDetails.*.payableLineItems.*.additionalDetails + type: JSON + dbType: JSONB + + + - version: 1.0 + name: Payment create + description: create payment in eg_expense_payment + fromTopic: expense-payment-create + queryMaps: + - query: INSERT INTO eg_expense_payment(id, tenantid, netpayableamount, netpaidamount, paymentnumber, status, createdby, createdtime, lastmodifiedby, lastmodifiedtime, additionaldetails) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: $.payment + jsonMaps: + + - jsonPath: $.payment.id + + - jsonPath: $.payment.tenantId + + - jsonPath: $.payment.netPayableAmount + + - jsonPath: $.payment.netPaidAmount + + - jsonPath: $.payment.paymentNumber + + - jsonPath: $.payment.status + + - jsonPath: $.payment.auditDetails.createdBy + + - jsonPath: $.payment.auditDetails.createdTime + + - jsonPath: $.payment.auditDetails.lastModifiedBy + + - jsonPath: $.payment.auditDetails.lastModifiedTime + + - jsonPath: $.payment.additionalDetails + type: JSON + dbType: JSONB + + + # insert into party from payer of payment + - query: INSERT INTO eg_expense_payment_bill (id, paymentid, billid, tenantid, totalamount, totalpaidamount, status, createdby, createdtime, lastmodifiedby, lastmodifiedtime) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: $.payment.bills.* + jsonMaps: + + - jsonPath: $.payment.bills.*.id + + - jsonPath: $.payment.id + + - jsonPath: $.payment.bills.*.billId + + - jsonPath: $.payment.tenantId + + - jsonPath: $.payment.bills.*.totalAmount + + - jsonPath: $.payment.bills.*.totalPaidAmount + + - jsonPath: $.payment.bills.*.status + + - jsonPath: $.payment.auditDetails.createdBy + + - jsonPath: $.payment.auditDetails.createdTime + + - jsonPath: $.payment.auditDetails.lastModifiedBy + + - jsonPath: $.payment.auditDetails.lastModifiedTime + + + - query: INSERT INTO eg_expense_payment_billdetail (id, tenantid, paymentbillid, billdetailid, totalamount, totalpaidamount, status, createdby, createdtime, lastmodifiedby, lastmodifiedtime) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: $.payment.bills.*.billDetails.* + jsonMaps: + + - jsonPath: $.payment.bills.*.billDetails.*.id + + - jsonPath: $.payment.tenantId + + - jsonPath: $.payment.bills[?({id} in @.billDetails[*].id)].id + + - jsonPath: $.payment.bills.*.billDetails.*.billDetailId + + - jsonPath: $.payment.bills.*.billDetails.*.totalAmount + + - jsonPath: $.payment.bills.*.billDetails.*.totalPaidAmount + + - jsonPath: $.payment.bills.*.billDetails.*.status + + - jsonPath: $.payment.auditDetails.createdBy + + - jsonPath: $.payment.auditDetails.createdTime + + - jsonPath: $.payment.auditDetails.lastModifiedBy + + - jsonPath: $.payment.auditDetails.lastModifiedTime + + + - query: INSERT INTO eg_expense_payment_lineitem (id, tenantid, paymentbilldetailid, lineitemid, paidamount, status, createdby, createdtime, lastmodifiedby, lastmodifiedtime) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: $.payment.bills.*.billDetails.*.payableLineItems.* + jsonMaps: + + - jsonPath: $.payment.bills.*.billDetails.*.payableLineItems.*.id + + - jsonPath: $.payment.tenantId + + - jsonPath: $.payment.bills.*.billDetails[?({id} in @.payableLineItems[*].id)].id + + - jsonPath: $.payment.bills.*.billDetails.*.payableLineItems.*.lineItemId + + - jsonPath: $.payment.bills.*.billDetails.*.payableLineItems.*.paidAmount + + - jsonPath: $.payment.bills.*.billDetails.*.payableLineItems.*.status + + - jsonPath: $.payment.auditDetails.createdBy + + - jsonPath: $.payment.auditDetails.createdTime + + - jsonPath: $.payment.auditDetails.lastModifiedBy + + - jsonPath: $.payment.auditDetails.lastModifiedTime + + - version: 1.0 + name: Payment update + description: update payment status in eg_expense_payment + fromTopic: expense-payment-update + queryMaps: + - query: UPDATE eg_expense_payment SET status=?, lastmodifiedby=?, lastmodifiedtime=?, additionaldetails=? WHERE id=? AND tenantid=?; + basePath: $.payment + jsonMaps: + + - jsonPath: $.payment.status + + - jsonPath: $.payment.auditDetails.lastModifiedBy + + - jsonPath: $.payment.auditDetails.lastModifiedTime + + - jsonPath: $.payment.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.payment.id + + - jsonPath: $.payment.tenantId + + - query: UPDATE eg_expense_payment_bill SET status=?, lastmodifiedby=?, lastmodifiedtime=? WHERE id = ? AND paymentid=? AND tenantid = ?; + basePath: $.payment.bills.* + jsonMaps: + + - jsonPath: $.payment.bills.*.status + + - jsonPath: $.payment.auditDetails.lastModifiedBy + + - jsonPath: $.payment.auditDetails.lastModifiedTime + + - jsonPath: $.payment.bills.*.id + + - jsonPath: $.payment.id + + - jsonPath: $.payment.tenantId + + - query: UPDATE eg_expense_payment_billdetail SET status=?, lastmodifiedby=?, lastmodifiedtime=? WHERE id=? AND paymentbillid=? AND tenantid=?; + basePath: $.payment.bills.*.billDetails.* + jsonMaps: + + - jsonPath: $.payment.bills.*.billDetails.*.status + + - jsonPath: $.payment.auditDetails.lastModifiedBy + + - jsonPath: $.payment.auditDetails.lastModifiedTime + + - jsonPath: $.payment.bills.*.billDetails.*.id + + - jsonPath: $.payment.bills[?({id} in @.billDetails[*].id)].id + + - jsonPath: $.payment.tenantId + + - query: UPDATE eg_expense_payment_lineitem SET status=?, lastmodifiedby=?, lastmodifiedtime=? WHERE id=? AND paymentbilldetailid=? AND tenantid=?; + basePath: $.payment.bills.*.billDetails.*.payableLineItems.* + jsonMaps: + + - jsonPath: $.payment.bills.*.billDetails.*.payableLineItems.*.status + + - jsonPath: $.payment.auditDetails.lastModifiedBy + + - jsonPath: $.payment.auditDetails.lastModifiedTime + + - jsonPath: $.payment.bills.*.billDetails.*.payableLineItems.*.id + + - jsonPath: $.payment.bills.*.billDetails[?({id} in @.payableLineItems[*].id)].id + + - jsonPath: $.payment.tenantId diff --git a/works/egov-persister/expense-billarray-payment-persister.yaml b/works/egov-persister/expense-billarray-payment-persister.yaml new file mode 100644 index 000000000..61bd6cdf4 --- /dev/null +++ b/works/egov-persister/expense-billarray-payment-persister.yaml @@ -0,0 +1,450 @@ +serviceMaps: + serviceName: expense Service + mappings: + - version: 1.0 + name: bill create + description: create bill in eg_expense_bill + fromTopic: save-expense-bill-db + queryMaps: + - query: INSERT into eg_expense_bill (id, tenantid, billdate, duedate, netPayableAmount, netPaidAmount, businessservice, referenceId, fromperiod, toperiod, status, paymentStatus, createdby, createdTime, lastmodifiedby, lastModifiedTime, additionalDetails) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) + basePath: $.bills.* + jsonMaps: + + - jsonPath: $.bills.*.id + + - jsonPath: $.bills.*.tenantId + + - jsonPath: $.bills.*.billDate + + - jsonPath: $.bills.*.dueDate + + - jsonPath: $.bills.*.netPayableAmount + + - jsonPath: $.bills.*.netPaidAmount + + - jsonPath: $.bills.*.businessservice + + - jsonPath: $.bills.*.referenceId + + - jsonPath: $.bills.*.fromPeriod + + - jsonPath: $.bills.*.toPeriod + + - jsonPath: $.bills.*.status + + - jsonPath: $.bills.*.paymentStatus + + - jsonPath: $.bills.*.auditDetails.createdBy + + - jsonPath: $.bills.*.auditDetails.createdTime + + - jsonPath: $.bills.*.auditDetails.lastModifiedBy + + - jsonPath: $.bills.*.auditDetails.lastModifiedTime + + - jsonPath: $.bills.*.additionalDetails + type: JSON + dbType: JSONB + + + # insert into party from payer of bill + - query: INSERT into eg_expense_party (id, tenantid, type, identifier, parentId, status, createdby, createdTime, lastmodifiedby, lastModifiedTime, additionalDetails) values(?,?,?,?,?,?,?,?,?,?,?) + basePath: $.bills.*.payer + jsonMaps: + + - jsonPath: $.bills.*.payer.id + + - jsonPath: $.bills.*.payer.tenantId + + - jsonPath: $.bills.*.payer.type + + - jsonPath: $.bills.*.payer.identifier + + - jsonPath: $.bills[?({id} in @.payee.id)].id + + - jsonPath: $.bills.*.payer.status + + - jsonPath: $.bills.*.payer.auditDetails.createdBy + + - jsonPath: $.bills.*.payer.auditDetails.createdTime + + - jsonPath: $.bills.*.payer.auditDetails.lastModifiedBy + + - jsonPath: $.bills.*.payer.auditDetails.lastModifiedTime + + + - query: INSERT into eg_expense_billdetail (id, tenantid, billid, referenceId, paymentStatus, fromperiod, toperiod, createdby, createdTime, lastModifiedby, lastModifiedTime, additionalDetails) values(?,?,?,?,?,?,?,?,?,?,?,?); + basePath: $.bills.*.billDetails.* + jsonMaps: + - jsonPath: $.bills.*.billDetails.*.id + + - jsonPath: $.bills.*.billDetails.*.tenantId + + - jsonPath: $.bills[?({id} in @.billDetails[*].id)].id + + - jsonPath: $.bills.*.billDetails.*.referenceId + + - jsonPath: $.bills.*.billDetails.*.paymentStatus + + - jsonPath: $.bills.*.billDetails.*.fromPeriod + + - jsonPath: $.bills.*.billDetails.*.toPeriod + + - jsonPath: $.bills.*.billDetails.*.auditDetails.createdBy + + - jsonPath: $.bills.*.billDetails.*.auditDetails.createdTime + + - jsonPath: $.bills.*.billDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.bills.*.billDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.bills.*.billDetails.*.additionalDetails + type: JSON + dbType: JSONB + + # insert into party from payee of bill details + - query: INSERT into eg_expense_party (id, tenantid, type, identifier, parentId, status, createdby, createdTime, lastmodifiedby, lastModifiedTime, additionalDetails) values(?,?,?,?,?,?,?,?,?,?,?) + basePath: $.bills.*.billDetails.*.payee + jsonMaps: + + - jsonPath: $.bills.*.billDetails.*.payee.id + + - jsonPath: $.bills.*.billDetails.*.payee.tenantId + + - jsonPath: $.bills.*.billDetails.*.payee.type + + - jsonPath: $.bills.*.billDetails.*.payee.identifier + + - jsonPath: $.bills[*].billDetails[?({id} in @.payee.id)].id + + - jsonPath: $.bills.*.billDetails.*.payee.status + + - jsonPath: $.bills.*.billDetails.*.payee.auditDetails.createdBy + + - jsonPath: $.bills.*.billDetails.*.payee.auditDetails.createdTime + + - jsonPath: $.bills.*.billDetails.*.payee.auditDetails.lastModifiedBy + + - jsonPath: $.bills.*.billDetails.*.payee.auditDetails.lastModifiedTime + + + - query: INSERT into eg_expense_lineitem (id, tenantid, billDetailId, headCode, amount, paidAmount, type, status, islineitempayable, createdby, createdTime, lastmodifiedby, lastModifiedTime, additionalDetails) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?); + basePath: $.bills.*.billDetails.*.lineItems.* + jsonMaps: + - jsonPath: $.bills.*.billDetails.*.lineItems.*.id + + - jsonPath: $.bills.*.billDetails.*.lineItems.*.tenantId + + - jsonPath: $.bills[*].billDetails[?({id} in @.lineItems[*].id)].id + + - jsonPath: $.bills.*.billDetails.*.lineItems.*.headCode + + - jsonPath: $.bills.*.billDetails.*.lineItems.*.amount + + - jsonPath: $.bills.*.billDetails.*.lineItems.*.paidAmount + + - jsonPath: $.bills.*.billDetails.*.lineItems.*.type + + - jsonPath: $.bills.*.billDetails.*.lineItems.*.status + + - jsonPath: $.bills.*.billDetails.*.lineItems.*.isLineItemPayable + + - jsonPath: $.bills.*.billDetails.*.lineItems.*.auditDetails.createdBy + + - jsonPath: $.bills.*.billDetails.*.lineItems.*.auditDetails.createdTime + + - jsonPath: $.bills.*.billDetails.*.lineItems.*.auditDetails.lastModifiedBy + + - jsonPath: $.bills.*.billDetails.*.lineItems.*.auditDetails.lastModifiedTime + + - jsonPath: $.bills.*.billDetails.*.lineItems.*.additionalDetails + type: JSON + dbType: JSONB + + - query: INSERT into eg_expense_lineitem (id, tenantid, billDetailId, headCode, amount, paidAmount, type, status, islineitempayable, createdby, createdTime, lastmodifiedby, lastModifiedTime, additionalDetails) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?); + basePath: $.bills.*.billDetails.*.payableLineItems.* + jsonMaps: + - jsonPath: $.bills.*.billDetails.*.payableLineItems.*.id + + - jsonPath: $.bills.*.billDetails.*.payableLineItems.*.tenantId + + - jsonPath: $.bills[*].billDetails[?({id} in @.payableLineItems[*].id)].id + + - jsonPath: $.bills.*.billDetails.*.payableLineItems.*.headCode + + - jsonPath: $.bills.*.billDetails.*.payableLineItems.*.amount + + - jsonPath: $.bills.*.billDetails.*.payableLineItems.*.paidAmount + + - jsonPath: $.bills.*.billDetails.*.payableLineItems.*.type + + - jsonPath: $.bills.*.billDetails.*.payableLineItems.*.status + + - jsonPath: $.bills.*.billDetails.*.payableLineItems.*.isLineItemPayable + + - jsonPath: $.bills.*.billDetails.*.payableLineItems.*.auditDetails.createdBy + + - jsonPath: $.bills.*.billDetails.*.payableLineItems.*.auditDetails.createdTime + + - jsonPath: $.bills.*.billDetails.*.payableLineItems.*.auditDetails.lastModifiedBy + + - jsonPath: $.bills.*.billDetails.*.payableLineItems.*.auditDetails.lastModifiedTime + + - jsonPath: $.bills.*.billDetails.*.payableLineItems.*.additionalDetails + type: JSON + dbType: JSONB + + + - version: 1.0 + name: bill update + description: update bill in eg_expense_bill + fromTopic: update-expense-bill-db + queryMaps: + - query: UPDATE eg_expense_bill SET billdate=?, duedate=?, netpayableamount=?, netpaidamount=?, businessservice=?, referenceid=?, fromperiod=?, toperiod=?, status=?, paymentstatus=?, lastmodifiedby=?, lastmodifiedtime=?, additionaldetails=? WHERE id=? AND tenantid=?; + basePath: $.bills.* + jsonMaps: + + - jsonPath: $.bills.*.billDate + + - jsonPath: $.bills.*.dueDate + + - jsonPath: $.bills.*.netPayableAmount + + - jsonPath: $.bills.*.netPaidAmount + + - jsonPath: $.bills.*.businessservice + + - jsonPath: $.bills.*.referenceId + + - jsonPath: $.bills.*.fromPeriod + + - jsonPath: $.bills.*.toPeriod + + - jsonPath: $.bills.*.status + + - jsonPath: $.bills.*.paymentStatus + + - jsonPath: $.bills.*.auditDetails.lastModifiedBy + + - jsonPath: $.bills.*.auditDetails.lastModifiedTime + + - jsonPath: $.bills.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.bills.*.id + + - jsonPath: $.bills.*.tenantId + + # update to party from payer of bill + - query: UPDATE eg_expense_party SET type=?, identifier=?, parentid=?, status, lastmodifiedby=?, lastmodifiedtime=?, additionaldetails=? WHERE id=? AND tenatid=?; + basePath: $.bills.* + jsonMaps: + + - jsonPath: $.bills.*.payer.type + + - jsonPath: $.bills.*.payer.identifier + + - jsonPath: $.bills[?({id} in @.payee.id)].id + + - jsonPath: $.bills.*.payer.status + + - jsonPath: $.bills.*.payer.auditDetails.createdBy + + - jsonPath: $.bills.*.payer.auditDetails.createdTime + + - jsonPath: $.bills.*.payer.auditDetails.lastModifiedBy + + - jsonPath: $.bills.*.payer.auditDetails.lastModifiedTime + + - jsonPath: $.bills.*.payer.id + + - jsonPath: $.bills.*.tenantId + + - query: INSERT into eg_expense_billdetail (id, tenantid, billid, referenceId, paymentStatus, fromperiod, toperiod, createdby, createdTime, lastModifiedby, lastModifiedTime, additionalDetails) values(?,?,?,?,?,?,?,?,?,?,?,?) DO UPDATE SET referenceid=EXCLUDED.referenceid, paymentstatus=EXCLUDED.paymentstatus, fromperiod=EXCLUDED.fromperiod, toperiod=EXCLUDED.toperiod, lastmodifiedby=EXCLUDED.lastmodifiedby, lastmodifiedtime=EXCLUDED.lastmodifiedtime, additionaldetails=EXCLUDED.additionaldetails WHERE id=EXCLUDED.id AND tenantid=EXCLUDED.tenantid; + basePath: $.bills.*.billDetails.* + jsonMaps: + - jsonPath: $.bills.*.billDetails.*.id + + - jsonPath: $.bills.*.billDetails.*.tenantId + + - jsonPath: $.bills[?({id} in @.billDetails[*].id)].id + + - jsonPath: $.bills.*.billDetails.*.referenceId + + - jsonPath: $.bills.*.billDetails.*.paymentStatus + + - jsonPath: $.bills.*.billDetails.*.fromPeriod + + - jsonPath: $.bills.*.billDetails.*.toPeriod + + - jsonPath: $.bills.*.billDetails.*.auditDetails.createdBy + + - jsonPath: $.bills.*.billDetails.*.auditDetails.createdTime + + - jsonPath: $.bills.*.billDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.bills.*.billDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.bills.*.billDetails.*.additionalDetails + type: JSON + dbType: JSONB + + # update party from payee of bill details + - query: INSERT into eg_expense_party (id, tenantid, type, identifier, parentId, status, createdby, createdTime, lastmodifiedby, lastModifiedTime, additionalDetails) values(?,?,?,?,?,?,?,?,?,?,?) ON CONFLICT (id, tenantid) DO UPDATE SET type=EXCLUDED.type, identifier=EXCLUDED.identifier, parentid=EXCLUDED.parentid, status=EXCLUDED.status, lastmodifiedby=EXCLUDED.lastmodifiedby, lastmodifiedtime=EXCLUDED.lastmodifiedtime, WHERE id=EXCLUDED.id AND tenantid=EXCLUDED.tenantid + basePath: $.bills.*.billDetails.*.payee + jsonMaps: + + - jsonPath: $.bills.*.billDetails.*.payee.id + + - jsonPath: $.bills.*.billDetails.*.payee.tenantId + + - jsonPath: $.bills.*.billDetails.*.payee.type + + - jsonPath: $.bills.*.billDetails.*.payee.identifier + + - jsonPath: $.bills[*].billDetails[?({id} in @.payee.id)].id + + - jsonPath: $.bills.*.billDetails.*.payee.status + + - jsonPath: $.bills.*.billDetails.*.payee.auditDetails.createdBy + + - jsonPath: $.bills.*.billDetails.*.payee.auditDetails.createdTime + + - jsonPath: $.bills.*.billDetails.*.payee.auditDetails.lastModifiedBy + + - jsonPath: $.bills.*.billDetails.*.payee.auditDetails.lastModifiedTime + + + - query: INSERT into eg_expense_lineitem (id, tenantid, billDetailId, headCode, amount, paidAmount, type, status, islineitempayable, createdby, createdTime, lastmodifiedby, lastModifiedTime, additionalDetails) values(?,?,?,?,?,?,?,?,false,?,?,?,?,?) ON CONFLICT (id,tenantid) DO UPDATE SET headcode=EXCLUDED.headcode, amount=EXCLUDED.amount, paidamount=EXCLUDED.paidamount, type=EXCLUDED.type, status=EXCLUDED.status, islineitempayable=EXCLUDED.islineitempayable, lastmodifiedby=EXCLUDED.lastmodifiedby, lastmodifiedtime=EXCLUDED.lastmodifiedtime, additionaldetails=EXCLUDED.additionaldetails, WHERE id=EXCLUDED.id AND tenantid=EXCLUDED.tenantid; + basePath: $.bills.*.billDetails.*.lineItems.* + jsonMaps: + + - jsonPath: $.bills.*.billDetails.*.lineItems.*.id + + - jsonPath: $.bills.*.billDetails.*.lineItems.*.tenantId + + - jsonPath: $.bills[*].billDetails[?({id} in @.lineItems[*].id)].id + + - jsonPath: $.bills.*.billDetails.*.lineItems.*.headCode + + - jsonPath: $.bills.*.billDetails.*.lineItems.*.amount + + - jsonPath: $.bills.*.billDetails.*.lineItems.*.paidAmount + + - jsonPath: $.bills.*.billDetails.*.lineItems.*.type + + - jsonPath: $.bills.*.billDetails.*.lineItems.*.status + + - jsonPath: $.bills.*.billDetails.*.lineItems.*.isLineItemPayable + + - jsonPath: $.bills.*.billDetails.*.lineItems.*.auditDetails.createdBy + + - jsonPath: $.bills.*.billDetails.*.lineItems.*.auditDetails.createdTime + + - jsonPath: $.bills.*.billDetails.*.lineItems.*.auditDetails.lastModifiedBy + + - jsonPath: $.bills.*.billDetails.*.lineItems.*.auditDetails.lastModifiedTime + + - jsonPath: $.bills.*.billDetails.*.lineItems.*.additionalDetails + type: JSON + dbType: JSONB + + - query: INSERT into eg_expense_lineitem (id, tenantid, billDetailId, headCode, amount, paidAmount, type, status, islineitempayable, createdby, createdTime, lastmodifiedby, lastModifiedTime, additionalDetails) values(?,?,?,?,?,?,?,?,true,?,?,?,?,?) ON CONFLICT (id,tenantid) DO UPDATE SET headcode=EXCLUDED.headcode, amount=EXCLUDED.amount, paidamount=EXCLUDED.paidamount, type=EXCLUDED.type, status=EXCLUDED.status, islineitempayable=EXCLUDED.islineitempayable, lastmodifiedby=EXCLUDED.lastmodifiedby, lastmodifiedtime=EXCLUDED.lastmodifiedtime, additionaldetails=EXCLUDED.additionaldetails, WHERE id=EXCLUDED.id AND tenantid=EXCLUDED.tenantid; + basePath: $.bills.*.billDetails.*.payableLineItems.* + jsonMaps: + + - jsonPath: $.bills.*.billDetails.*.payableLineItems.*.id + + - jsonPath: $.bills.*.billDetails.*.payableLineItems.*.tenantId + + - jsonPath: $.bills[*].billDetails[?({id} in @.payableLineItems[*].id)].id + + - jsonPath: $.bills.*.billDetails.*.payableLineItems.*.headCode + + - jsonPath: $.bills.*.billDetails.*.payableLineItems.*.amount + + - jsonPath: $.bills.*.billDetails.*.payableLineItems.*.paidAmount + + - jsonPath: $.bills.*.billDetails.*.payableLineItems.*.type + + - jsonPath: $.bills.*.billDetails.*.payableLineItems.*.status + + - jsonPath: $.bills.*.billDetails.*.payableLineItems.*.auditDetails.createdBy + + - jsonPath: $.bills.*.billDetails.*.payableLineItems.*.auditDetails.createdTime + + - jsonPath: $.bills.*.billDetails.*.payableLineItems.*.auditDetails.lastModifiedBy + + - jsonPath: $.bills.*.billDetails.*.payableLineItems.*.auditDetails.lastModifiedTime + + - jsonPath: $.bills.*.billDetails.*.payableLineItems.*.additionalDetails + type: JSON + dbType: JSONB + + + - version: 1.0 + name: Payment create + description: create payment in eg_expense_payment + fromTopic: save-expense-payment-db + queryMaps: + - query: INSERT INTO eg_expense_payment(id, tenantid, netpayableamount, netpaidamount, status, createdby, createdtime, lastmodifiedby, lastmodifiedtime, additionaldetails) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: $.payment + jsonMaps: + + - jsonPath: $.payment.id + + - jsonPath: $.payment.tenantId + + - jsonPath: $.payment.netPayableAmount + + - jsonPath: $.payment.netPaidAmount + + - jsonPath: $.payment.status + + - jsonPath: $.payment.auditDetails.createdBy + + - jsonPath: $.payment.auditDetails.createdTime + + - jsonPath: $.payment.auditDetails.lastModifiedBy + + - jsonPath: $.payment.auditDetails.lastModifiedTime + + - jsonPath: $.payment.additionalDetails + type: JSON + dbType: JSONB + + + # insert into party from payer of payment + - query: INSERT INTO eg_expense_bill_payment(paymentid, billid, tenantid) VALUES (?, ?, ?); + basePath: $.payment.bills.* + jsonMaps: + + - jsonPath: $.payment.id + + - jsonPath: $.payment.bills.*.id + + - jsonPath: $.payment.tenantid + + - version: 1.0 + name: Payment update + description: update payment status in eg_expense_payment + fromTopic: update-expense-payment-db + queryMaps: + - query: UPDATE eg_expense_payment SET status=?, lastmodifiedby=?, lastmodifiedtime=?, additionaldetails=? WHERE id=? AND tenantid=?; + basePath: $.payment + jsonMaps: + + - jsonPath: $.payment.status + + - jsonPath: $.payment.auditDetails.lastModifiedBy + + - jsonPath: $.payment.auditDetails.lastModifiedTime + + - jsonPath: $.payment.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.payment.id + + - jsonPath: $.payment.tenantId diff --git a/works/egov-persister/expensebilling-service-persister.yml b/works/egov-persister/expensebilling-service-persister.yml new file mode 100644 index 000000000..cefa499da --- /dev/null +++ b/works/egov-persister/expensebilling-service-persister.yml @@ -0,0 +1,117 @@ +serviceMaps: + serviceName: expensebilling-service + mappings: + - version: 1.0 + name: expensebilling + description: Persists billing demand in eg_wms_bill_demand table + fromTopic: bill + isTransaction: true + queryMaps: + - query: INSERT INTO eg_wms_bill_demand (id, tenant_id, bill_number, bill_date, net_amount, gross_amount, head_of_account, ifms_sanction_number, purpose, created_by, last_modified_by, created_time, last_modified_time) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?); + basePath: $.BillDemands.* + jsonMaps: + - jsonPath: $.BillDemands.*.id + + - jsonPath: $.BillDemands.*.tenantId + + - jsonPath: $.BillDemands.*.billNumber + + - jsonPath: $.BillDemands.*.billDate + + - jsonPath: $.BillDemands.*.netAmount + + - jsonPath: $.BillDemands.*.grossAmount + + - jsonPath: $.BillDemands.*.headOfAccount + + - jsonPath: $.BillDemands.*.ifmsSanctionNumber + + - jsonPath: $.BillDemands.*.purpose + + - jsonPath: $.BillDemands.*.auditDetails.createdBy + + - jsonPath: $.BillDemands.*.auditDetails.lastModifiedBy + + - jsonPath: $.BillDemands.*.auditDetails.createdTime + + - jsonPath: $.BillDemands.*.auditDetails.lastModifiedTime + + - query: INSERT INTO eg_wms_demand_beneficiaries (pk_id, id, bill_number, name, account_number, ifsc_code, mobile_number, address, account_type, amount, purpose, status, created_by, last_modified_by, created_time, last_modified_time) VALUES (?, ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?); + basePath: $.BillDemands.*.beneficiaries.* + jsonMaps: + - jsonPath: $.BillDemands.*.beneficiaries.*.pkId + + - jsonPath: $.BillDemands.*.beneficiaries.*.id + + - jsonPath: $.BillDemands[*][?({id} in @.beneficiaries[*].id)].billNumber + + - jsonPath: $.BillDemands.*.beneficiaries.*.name + + - jsonPath: $.BillDemands.*.beneficiaries.*.accountNumber + + - jsonPath: $.BillDemands.*.beneficiaries.*.ifscCode + + - jsonPath: $.BillDemands.*.beneficiaries.*.mobileNumber + + - jsonPath: $.BillDemands.*.beneficiaries.*.address + + - jsonPath: $.BillDemands.*.beneficiaries.*.accountType + + - jsonPath: $.BillDemands.*.beneficiaries.*.amount + + - jsonPath: $.BillDemands.*.beneficiaries.*.purpose + + - jsonPath: $.BillDemands.*.beneficiaries.*.status + + - jsonPath: $.BillDemands[*][?({id} in @.beneficiaries[*].id)].auditDetails.createdBy + + - jsonPath: $.BillDemands[*][?({id} in @.beneficiaries[*].id)].auditDetails.lastModifiedBy + + - jsonPath: $.BillDemands[*][?({id} in @.beneficiaries[*].id)].auditDetails.createdTime + + - jsonPath: $.BillDemands[*][?({id} in @.beneficiaries[*].id)].auditDetails.lastModifiedTime + + - version: 1.0 + name: expensebilling + description: Insert / Update payment status + fromTopic: payment-status + isTransaction: true + queryMaps: + - query: INSERT INTO eg_wms_bill_payment (bill_number, bill_date, voucher_number, voucher_date) VALUES (?,?,?,?); + basePath: $.PaymentStatuses.* + jsonMaps: + - jsonPath: $.PaymentStatuses.*.billNumber + + - jsonPath: $.PaymentStatuses.*.billDate + + - jsonPath: $.PaymentStatuses.*.voucherNumber + + - jsonPath: $.PaymentStatuses.*.voucherDate + + - query: INSERT INTO eg_wms_beneficiary_transfer_status (bill_number, account_number, ifsc_code, rbi_sequence_number, sequence_date, end_to_end_id, status) VALUES (?,?,?,?,?,?,?); + basePath: $.PaymentStatuses.*.beneficiaryTransferStatuses.* + jsonMaps: + - jsonPath: $.PaymentStatuses[*][?({endToEndId} in @.beneficiaryTransferStatuses[*].endToEndId)].billNumber + + - jsonPath: $.PaymentStatuses.*.beneficiaryTransferStatuses.*.accountNumber + + - jsonPath: $.PaymentStatuses.*.beneficiaryTransferStatuses.*.ifscCode + + - jsonPath: $.PaymentStatuses.*.beneficiaryTransferStatuses.*.rbiSequenceNumber + + - jsonPath: $.PaymentStatuses.*.beneficiaryTransferStatuses.*.sequenceDate + + - jsonPath: $.PaymentStatuses.*.beneficiaryTransferStatuses.*.endToEndId + + - jsonPath: $.PaymentStatuses.*.beneficiaryTransferStatuses.*.status + + - query: UPDATE eg_wms_demand_beneficiaries set status = ? where bill_number = ? and account_number = ? and ifsc_code = ? ; + basePath: $.PaymentStatuses.*.beneficiaryTransferStatuses.* + jsonMaps: + - jsonPath: $.PaymentStatuses.*.beneficiaryTransferStatuses.*.status + + - jsonPath: $.PaymentStatuses[*][?({endToEndId} in @.beneficiaryTransferStatuses[*].endToEndId)].billNumber + + - jsonPath: $.PaymentStatuses.*.beneficiaryTransferStatuses.*.accountNumber + + - jsonPath: $.PaymentStatuses.*.beneficiaryTransferStatuses.*.ifscCode \ No newline at end of file diff --git a/works/egov-persister/hrms-employee-persister.yml b/works/egov-persister/hrms-employee-persister.yml new file mode 100644 index 000000000..bbee07cb2 --- /dev/null +++ b/works/egov-persister/hrms-employee-persister.yml @@ -0,0 +1,533 @@ +serviceMaps: + serviceName: HRMS + mappings: + - version: 1.0 + name: hrms + description: Persists employee details in the table + fromTopic: save-hrms-employee + isTransaction: true + queryMaps: + - query: INSERT INTO eg_hrms_employee(tenantid, id, uuid, code, dateOfAppointment, employeestatus, employeetype, active, createdby, createddate, lastmodifiedby, lastModifiedDate, reactivateemployee) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + + basePath: Employees.* + jsonMaps: + + + - jsonPath: $.Employees.*.tenantId + + - jsonPath: $.Employees.*.id + + - jsonPath: $.Employees.*.uuid + + - jsonPath: $.Employees.*.code + + - jsonPath: $.Employees.*.dateOfAppointment + + - jsonPath: $.Employees.*.employeeStatus + + - jsonPath: $.Employees.*.employeeType + + - jsonPath: $.Employees.*.isActive + + - jsonPath: $.Employees.*.auditDetails.createdBy + + - jsonPath: $.Employees.*.auditDetails.createdDate + + - jsonPath: $.Employees.*.auditDetails.lastModifiedBy + + - jsonPath: $.Employees.*.auditDetails.lastModifiedDate + + - jsonPath: $.Employees.*.reActivateEmployee + + + + - query: INSERT INTO eg_hrms_assignment(tenantid, uuid, position, department, designation, fromdate, todate, govtordernumber, reportingto, isHOD, iscurrentassignment, employeeid, createdby, createddate, lastmodifiedby, lastModifiedDate) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + + basePath: Employees.*.assignments.* + jsonMaps: + + + - jsonPath: $.Employees[*][?({id} in @.assignments[*].id)].tenantId + + - jsonPath: $.Employees.*.assignments.*.id + + - jsonPath: $.Employees.*.assignments.*.position + + - jsonPath: $.Employees.*.assignments.*.department + + - jsonPath: $.Employees.*.assignments.*.designation + + - jsonPath: $.Employees.*.assignments.*.fromDate + + - jsonPath: $.Employees.*.assignments.*.toDate + + - jsonPath: $.Employees.*.assignments.*.govtOrderNumber + + - jsonPath: $.Employees.*.assignments.*.reportingTo + + - jsonPath: $.Employees.*.assignments.*.isHOD + + - jsonPath: $.Employees.*.assignments.*.isCurrentAssignment + + - jsonPath: $.Employees[*][?({id} in @.assignments[*].id)].uuid + + - jsonPath: $.Employees.*.assignments.*.auditDetails.createdBy + + - jsonPath: $.Employees.*.assignments.*.auditDetails.createdDate + + - jsonPath: $.Employees.*.assignments.*.auditDetails.lastModifiedBy + + - jsonPath: $.Employees.*.assignments.*.auditDetails.lastModifiedDate + + + + + - query: INSERT INTO eg_hrms_educationaldetails(tenantid, uuid, employeeid, qualification, stream, yearofpassing, university, remarks, isactive, createdby, createddate, lastmodifiedby, lastModifiedDate) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + + basePath: Employees.*.education.* + jsonMaps: + + + - jsonPath: $.Employees[*][?({id} in @.education[*].id)].tenantId + + - jsonPath: $.Employees.*.education.*.id + + - jsonPath: $.Employees[*][?({id} in @.education[*].id)].uuid + + - jsonPath: $.Employees.*.education.*.qualification + + - jsonPath: $.Employees.*.education.*.stream + + - jsonPath: $.Employees.*.education.*.yearOfPassing + + - jsonPath: $.Employees.*.education.*.university + + - jsonPath: $.Employees.*.education.*.remarks + + - jsonPath: $.Employees.*.education.*.isActive + + - jsonPath: $.Employees.*.education.*.auditDetails.createdBy + + - jsonPath: $.Employees.*.education.*.auditDetails.createdDate + + - jsonPath: $.Employees.*.education.*.auditDetails.lastModifiedBy + + - jsonPath: $.Employees.*.education.*.auditDetails.lastModifiedDate + + + - query: INSERT INTO eg_hrms_departmentaltests(tenantid, uuid, employeeid, test, yearofpassing, remarks, isactive, createdby, createddate, lastmodifiedby, lastModifiedDate) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + + basePath: Employees.*.tests.* + jsonMaps: + + + - jsonPath: $.Employees[*][?({id} in @.tests[*].id)].tenantId + + - jsonPath: $.Employees.*.tests.*.id + + - jsonPath: $.Employees[*][?({id} in @.tests[*].id)].uuid + + - jsonPath: $.Employees.*.tests.*.test + + - jsonPath: $.Employees.*.tests.*.yearOfPassing + + - jsonPath: $.Employees.*.tests.*.remarks + + - jsonPath: $.Employees.*.tests.*.isActive + + - jsonPath: $.Employees.*.tests.*.auditDetails.createdBy + + - jsonPath: $.Employees.*.tests.*.auditDetails.createdDate + + - jsonPath: $.Employees.*.tests.*.auditDetails.lastModifiedBy + + - jsonPath: $.Employees.*.tests.*.auditDetails.lastModifiedDate + + + - query: INSERT INTO eg_hrms_empdocuments(tenantid, uuid, employeeid, documentid, documentname, referencetype, referenceid, createdby, createddate, lastmodifiedby, lastModifiedDate) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + + basePath: Employees.*.documents.* + jsonMaps: + + + - jsonPath: $.Employees[*][?({id} in @.documents[*].id)].tenantId + + - jsonPath: $.Employees.*.documents.*.id + + - jsonPath: $.Employees[*][?({id} in @.documents[*].id)].uuid + + - jsonPath: $.Employees.*.documents.*.documentId + + - jsonPath: $.Employees.*.documents.*.documentName + + - jsonPath: $.Employees.*.documents.*.referenceType + + - jsonPath: $.Employees.*.documents.*.referenceId + + - jsonPath: $.Employees.*.documents.*.auditDetails.createdBy + + - jsonPath: $.Employees.*.documents.*.auditDetails.createdDate + + - jsonPath: $.Employees.*.documents.*.auditDetails.lastModifiedBy + + - jsonPath: $.Employees.*.documents.*.auditDetails.lastModifiedDate + + + - query: INSERT INTO eg_hrms_servicehistory(tenantid, uuid, employeeid, servicestatus, servicefrom, serviceto, ordernumber, isCurrentPosition, location, createdby, createddate, lastmodifiedby, lastModifiedDate) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + + basePath: Employees.*.serviceHistory.* + jsonMaps: + + + - jsonPath: $.Employees[*][?({id} in @.serviceHistory[*].id)].tenantId + + - jsonPath: $.Employees.*.serviceHistory.*.id + + - jsonPath: $.Employees[*][?({id} in @.serviceHistory[*].id)].uuid + + - jsonPath: $.Employees.*.serviceHistory.*.serviceStatus + + - jsonPath: $.Employees.*.serviceHistory.*.serviceFrom + + - jsonPath: $.Employees.*.serviceHistory.*.serviceTo + + - jsonPath: $.Employees.*.serviceHistory.*.orderNo + + - jsonPath: $.Employees.*.serviceHistory.*.isCurrentPosition + + - jsonPath: $.Employees.*.serviceHistory.*.location + + - jsonPath: $.Employees.*.serviceHistory.*.auditDetails.createdBy + + - jsonPath: $.Employees.*.serviceHistory.*.auditDetails.createdDate + + - jsonPath: $.Employees.*.serviceHistory.*.auditDetails.lastModifiedBy + + - jsonPath: $.Employees.*.serviceHistory.*.auditDetails.lastModifiedDate + + + - query: INSERT INTO eg_hrms_jurisdiction (uuid, employeeid, hierarchy, boundarytype, boundary, tenantid, isActive, createdby, createddate, lastmodifiedby, lastModifiedDate) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + + basePath: Employees.*.jurisdictions.* + jsonMaps: + + - jsonPath: $.Employees.*.jurisdictions.*.id + + - jsonPath: $.Employees[*][?({id} in @.jurisdictions[*].id)].uuid + + - jsonPath: $.Employees.*.jurisdictions.*.hierarchy + + - jsonPath: $.Employees.*.jurisdictions.*.boundaryType + + - jsonPath: $.Employees.*.jurisdictions.*.boundary + + - jsonPath: $.Employees[*][?({id} in @.jurisdictions[*].id)].tenantId + + - jsonPath: $.Employees.*.jurisdictions.*.isActive + + - jsonPath: $.Employees.*.jurisdictions.*.auditDetails.createdBy + + - jsonPath: $.Employees.*.jurisdictions.*.auditDetails.createdDate + + - jsonPath: $.Employees.*.jurisdictions.*.auditDetails.lastModifiedBy + + - jsonPath: $.Employees.*.jurisdictions.*.auditDetails.lastModifiedDate + + + + + - version: 1.0 + name: hrms + description: Persists employee details in the table + fromTopic: update-hrms-employee + isTransaction: true + queryMaps: + - query: DELETE from eg_hrms_employee WHERE uuid=? + + basePath: Employees.* + jsonMaps: + + - jsonPath: $.Employees.*.uuid + + - query: INSERT INTO eg_hrms_employee(tenantid, id, uuid, code, dateOfAppointment, employeestatus, employeetype, active, createdby, createddate, lastmodifiedby, lastModifiedDate, reactivateemployee) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + + basePath: Employees.* + jsonMaps: + + + - jsonPath: $.Employees.*.tenantId + + - jsonPath: $.Employees.*.id + + - jsonPath: $.Employees.*.uuid + + - jsonPath: $.Employees.*.code + + - jsonPath: $.Employees.*.dateOfAppointment + + - jsonPath: $.Employees.*.employeeStatus + + - jsonPath: $.Employees.*.employeeType + + - jsonPath: $.Employees.*.isActive + + - jsonPath: $.Employees.*.auditDetails.createdBy + + - jsonPath: $.Employees.*.auditDetails.createdDate + + - jsonPath: $.Employees.*.auditDetails.lastModifiedBy + + - jsonPath: $.Employees.*.auditDetails.lastModifiedDate + + - jsonPath: $.Employees.*.reActivateEmployee + + + + - query: INSERT INTO eg_hrms_assignment(tenantid, uuid, position, department, designation, fromdate, todate, govtordernumber, reportingto, isHOD, iscurrentassignment, employeeid, createdby, createddate, lastmodifiedby, lastModifiedDate) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + + basePath: Employees.*.assignments.* + jsonMaps: + + + - jsonPath: $.Employees[*][?({id} in @.assignments[*].id)].tenantId + + - jsonPath: $.Employees.*.assignments.*.id + + - jsonPath: $.Employees.*.assignments.*.position + + - jsonPath: $.Employees.*.assignments.*.department + + - jsonPath: $.Employees.*.assignments.*.designation + + - jsonPath: $.Employees.*.assignments.*.fromDate + + - jsonPath: $.Employees.*.assignments.*.toDate + + - jsonPath: $.Employees.*.assignments.*.govtOrderNumber + + - jsonPath: $.Employees.*.assignments.*.reportingTo + + - jsonPath: $.Employees.*.assignments.*.isHOD + + - jsonPath: $.Employees.*.assignments.*.isCurrentAssignment + + - jsonPath: $.Employees[*][?({id} in @.assignments[*].id)].uuid + + - jsonPath: $.Employees.*.assignments.*.auditDetails.createdBy + + - jsonPath: $.Employees.*.assignments.*.auditDetails.createdDate + + - jsonPath: $.Employees.*.assignments.*.auditDetails.lastModifiedBy + + - jsonPath: $.Employees.*.assignments.*.auditDetails.lastModifiedDate + + + + + - query: INSERT INTO eg_hrms_educationaldetails(tenantid, uuid, employeeid, qualification, stream, yearofpassing, university, remarks, isactive, createdby, createddate, lastmodifiedby, lastModifiedDate) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + + basePath: Employees.*.education.* + jsonMaps: + + + - jsonPath: $.Employees[*][?({id} in @.education[*].id)].tenantId + + - jsonPath: $.Employees.*.education.*.id + + - jsonPath: $.Employees[*][?({id} in @.education[*].id)].uuid + + - jsonPath: $.Employees.*.education.*.qualification + + - jsonPath: $.Employees.*.education.*.stream + + - jsonPath: $.Employees.*.education.*.yearOfPassing + + - jsonPath: $.Employees.*.education.*.university + + - jsonPath: $.Employees.*.education.*.remarks + + - jsonPath: $.Employees.*.education.*.isActive + + - jsonPath: $.Employees.*.education.*.auditDetails.createdBy + + - jsonPath: $.Employees.*.education.*.auditDetails.createdDate + + - jsonPath: $.Employees.*.education.*.auditDetails.lastModifiedBy + + - jsonPath: $.Employees.*.education.*.auditDetails.lastModifiedDate + + + - query: INSERT INTO eg_hrms_departmentaltests(tenantid, uuid, employeeid, test, yearofpassing, remarks, isactive, createdby, createddate, lastmodifiedby, lastModifiedDate) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + + basePath: Employees.*.tests.* + jsonMaps: + + + - jsonPath: $.Employees[*][?({id} in @.tests[*].id)].tenantId + + - jsonPath: $.Employees.*.tests.*.id + + - jsonPath: $.Employees[*][?({id} in @.tests[*].id)].uuid + + - jsonPath: $.Employees.*.tests.*.test + + - jsonPath: $.Employees.*.tests.*.yearOfPassing + + - jsonPath: $.Employees.*.tests.*.remarks + + - jsonPath: $.Employees.*.tests.*.isActive + + - jsonPath: $.Employees.*.tests.*.auditDetails.createdBy + + - jsonPath: $.Employees.*.tests.*.auditDetails.createdDate + + - jsonPath: $.Employees.*.tests.*.auditDetails.lastModifiedBy + + - jsonPath: $.Employees.*.tests.*.auditDetails.lastModifiedDate + + + - query: INSERT INTO eg_hrms_empdocuments(tenantid, uuid, employeeid, documentid, documentname, referencetype, referenceid, createdby, createddate, lastmodifiedby, lastModifiedDate) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + + basePath: Employees.*.documents.* + jsonMaps: + + + - jsonPath: $.Employees[*][?({id} in @.documents[*].id)].tenantId + + - jsonPath: $.Employees.*.documents.*.id + + - jsonPath: $.Employees[*][?({id} in @.documents[*].id)].uuid + + - jsonPath: $.Employees.*.documents.*.documentId + + - jsonPath: $.Employees.*.documents.*.documentName + + - jsonPath: $.Employees.*.documents.*.referenceType + + - jsonPath: $.Employees.*.documents.*.referenceId + + - jsonPath: $.Employees.*.documents.*.auditDetails.createdBy + + - jsonPath: $.Employees.*.documents.*.auditDetails.createdDate + + - jsonPath: $.Employees.*.documents.*.auditDetails.lastModifiedBy + + - jsonPath: $.Employees.*.documents.*.auditDetails.lastModifiedDate + + + - query: INSERT INTO eg_hrms_servicehistory(tenantid, uuid, employeeid, servicestatus, servicefrom, serviceto, ordernumber, isCurrentPosition, location, createdby, createddate, lastmodifiedby, lastModifiedDate) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + + basePath: Employees.*.serviceHistory.* + jsonMaps: + + + - jsonPath: $.Employees[*][?({id} in @.serviceHistory[*].id)].tenantId + + - jsonPath: $.Employees.*.serviceHistory.*.id + + - jsonPath: $.Employees[*][?({id} in @.serviceHistory[*].id)].uuid + + - jsonPath: $.Employees.*.serviceHistory.*.serviceStatus + + - jsonPath: $.Employees.*.serviceHistory.*.serviceFrom + + - jsonPath: $.Employees.*.serviceHistory.*.serviceTo + + - jsonPath: $.Employees.*.serviceHistory.*.orderNo + + - jsonPath: $.Employees.*.serviceHistory.*.isCurrentPosition + + - jsonPath: $.Employees.*.serviceHistory.*.location + + - jsonPath: $.Employees.*.serviceHistory.*.auditDetails.createdBy + + - jsonPath: $.Employees.*.serviceHistory.*.auditDetails.createdDate + + - jsonPath: $.Employees.*.serviceHistory.*.auditDetails.lastModifiedBy + + - jsonPath: $.Employees.*.serviceHistory.*.auditDetails.lastModifiedDate + + + - query: INSERT INTO eg_hrms_jurisdiction (uuid, employeeid, hierarchy, boundarytype, boundary, tenantid, isActive, createdby, createddate, lastmodifiedby, lastModifiedDate) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + + basePath: Employees.*.jurisdictions.* + jsonMaps: + + - jsonPath: $.Employees.*.jurisdictions.*.id + + - jsonPath: $.Employees[*][?({id} in @.jurisdictions[*].id)].uuid + + - jsonPath: $.Employees.*.jurisdictions.*.hierarchy + + - jsonPath: $.Employees.*.jurisdictions.*.boundaryType + + - jsonPath: $.Employees.*.jurisdictions.*.boundary + + - jsonPath: $.Employees[*][?({id} in @.jurisdictions[*].id)].tenantId + + - jsonPath: $.Employees.*.jurisdictions.*.isActive + + - jsonPath: $.Employees.*.jurisdictions.*.auditDetails.createdBy + + - jsonPath: $.Employees.*.jurisdictions.*.auditDetails.createdDate + + - jsonPath: $.Employees.*.jurisdictions.*.auditDetails.lastModifiedBy + + - jsonPath: $.Employees.*.jurisdictions.*.auditDetails.lastModifiedDate + + + + - query: INSERT INTO eg_hrms_deactivationdetails(uuid, employeeid, reasonfordeactivation, effectivefrom, ordernumber, remarks, tenantid, createdby, createddate, lastmodifiedby, lastModifiedDate) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + + basePath: Employees.*.deactivationDetails.* + jsonMaps: + + - jsonPath: $.Employees.*.deactivationDetails.*.id + + - jsonPath: $.Employees[*][?({id} in @.deactivationDetails[*].id)].uuid + + - jsonPath: $.Employees.*.deactivationDetails.*.reasonForDeactivation + + - jsonPath: $.Employees.*.deactivationDetails.*.effectiveFrom + + - jsonPath: $.Employees.*.deactivationDetails.*.orderNo + + - jsonPath: $.Employees.*.deactivationDetails.*.remarks + + - jsonPath: $.Employees[*][?({id} in @.deactivationDetails[*].id)].tenantId + + - jsonPath: $.Employees.*.deactivationDetails.*.auditDetails.createdBy + + - jsonPath: $.Employees.*.deactivationDetails.*.auditDetails.createdDate + + - jsonPath: $.Employees.*.deactivationDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.Employees.*.deactivationDetails.*.auditDetails.lastModifiedDate + + + - query: INSERT INTO eg_hrms_reactivationdetails(uuid, employeeid, reasonforreactivation, effectivefrom, ordernumber, remarks, tenantid, createdby, createddate, lastmodifiedby, lastModifiedDate) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + + basePath: Employees.*.reactivationDetails.* + jsonMaps: + + - jsonPath: $.Employees.*.reactivationDetails.*.id + + - jsonPath: $.Employees[*][?({id} in @.reactivationDetails[*].id)].uuid + + - jsonPath: $.Employees.*.reactivationDetails.*.reasonForReactivation + + - jsonPath: $.Employees.*.reactivationDetails.*.effectiveFrom + + - jsonPath: $.Employees.*.reactivationDetails.*.orderNo + + - jsonPath: $.Employees.*.reactivationDetails.*.remarks + + - jsonPath: $.Employees[*][?({id} in @.reactivationDetails[*].id)].tenantId + + - jsonPath: $.Employees.*.reactivationDetails.*.auditDetails.createdBy + + - jsonPath: $.Employees.*.reactivationDetails.*.auditDetails.createdDate + + - jsonPath: $.Employees.*.reactivationDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.Employees.*.reactivationDetails.*.auditDetails.lastModifiedDate diff --git a/works/egov-persister/individual-persister.yml b/works/egov-persister/individual-persister.yml new file mode 100644 index 000000000..4cd07ebe6 --- /dev/null +++ b/works/egov-persister/individual-persister.yml @@ -0,0 +1,261 @@ +serviceMaps: + serviceName: individual + mappings: + - version: 1.0 + description: Persists Individual + fromTopic: save-individual-topic + isTransaction: true + queryMaps: + - query: INSERT INTO address(id, clientReferenceId, tenantId, doorNo, latitude, longitude, locationAccuracy, type, addressLine1, addressLine2, landmark, city, pincode, buildingName, street, localityCode, wardCode) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: $.*.address.* + jsonMaps: + - jsonPath: $.*.address.*.id + - jsonPath: $.*.address.*.clientReferenceId + - jsonPath: $.*.address.*.tenantId + - jsonPath: $.*.address.*.doorNo + - jsonPath: $.*.address.*.latitude + - jsonPath: $.*.address.*.longitude + - jsonPath: $.*.address.*.locationAccuracy + - jsonPath: $.*.address.*.type + - jsonPath: $.*.address.*.addressLine1 + - jsonPath: $.*.address.*.addressLine2 + - jsonPath: $.*.address.*.landmark + - jsonPath: $.*.address.*.city + - jsonPath: $.*.address.*.pincode + - jsonPath: $.*.address.*.buildingName + - jsonPath: $.*.address.*.street + - jsonPath: $.*.address.*.locality.code + - jsonPath: $.*.address.*.ward.code + - query: INSERT INTO individual(id, userId, clientReferenceId, tenantId, givenName, familyName, otherNames, dateOfBirth, gender, bloodGroup, mobileNumber, altContactNumber, email, fatherName, husbandName, photo, additionalDetails, createdBy, lastModifiedBy, createdTime, lastModifiedTime, rowVersion, isDeleted, individualId, relationship, isSystemUser) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: $.* + jsonMaps: + - jsonPath: $.*.id + - jsonPath: $.*.userId + - jsonPath: $.*.clientReferenceId + - jsonPath: $.*.tenantId + - jsonPath: $.*.name.givenName + - jsonPath: $.*.name.familyName + - jsonPath: $.*.name.otherNames + - jsonPath: $.*.dateOfBirth + type: DATE + - jsonPath: $.*.gender + - jsonPath: $.*.bloodGroup + - jsonPath: $.*.mobileNumber + - jsonPath: $.*.altContactNumber + - jsonPath: $.*.email + - jsonPath: $.*.fatherName + - jsonPath: $.*.husbandName + - jsonPath: $.*.photo + - jsonPath: $.*.additionalFields + type: JSON + dbType: JSONB + - jsonPath: $.*.auditDetails.createdBy + - jsonPath: $.*.auditDetails.lastModifiedBy + - jsonPath: $.*.auditDetails.createdTime + - jsonPath: $.*.auditDetails.lastModifiedTime + - jsonPath: $.*.rowVersion + - jsonPath: $.*.isDeleted + - jsonPath: $.*.individualId + - jsonPath: $.*.relationship + - jsonPath: $.*.isSystemUser + - query: INSERT INTO individual_address(individualId, addressId, type, createdBy, lastModifiedBy, createdTime, lastModifiedTime, isDeleted) VALUES (?, ?, ?, ?, ?, ?, ?, ?); + basePath: $.*.address.* + jsonMaps: + - jsonPath: $.*.address.*.individualId + - jsonPath: $.*.address.*.id + - jsonPath: $.*.address.*.type + - jsonPath: $.*.address.*.auditDetails.createdBy + - jsonPath: $.*.address.*.auditDetails.lastModifiedBy + - jsonPath: $.*.address.*.auditDetails.createdTime + - jsonPath: $.*.address.*.auditDetails.lastModifiedTime + - jsonPath: $.*.address.*.isDeleted + - query: INSERT INTO individual_identifier(id, clientReferenceId, identifierType, identifierId, individualId, createdBy, lastModifiedBy, createdTime, lastModifiedTime, isDeleted) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: $.*.identifiers.* + jsonMaps: + - jsonPath: $.*.identifiers.*.id + - jsonPath: $.*.clientReferenceId + - jsonPath: $.*.identifiers.*.identifierType + - jsonPath: $.*.identifiers.*.identifierId + - jsonPath: $.*.identifiers.*.individualId + - jsonPath: $.*.identifiers.*.auditDetails.createdBy + - jsonPath: $.*.identifiers.*.auditDetails.lastModifiedBy + - jsonPath: $.*.identifiers.*.auditDetails.createdTime + - jsonPath: $.*.identifiers.*.auditDetails.lastModifiedTime + - jsonPath: $.*.identifiers.*.isDeleted + - query: INSERT INTO individual_skill(id, clientReferenceId, individualId, type, level, experience, createdBy, lastModifiedBy, createdTime, lastModifiedTime, isDeleted) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: $.*.skills.* + jsonMaps: + - jsonPath: $.*.skills.*.id + - jsonPath: $.*.skills.*.clientReferenceId + - jsonPath: $.*.skills.*.individualId + - jsonPath: $.*.skills.*.type + - jsonPath: $.*.skills.*.level + - jsonPath: $.*.skills.*.experience + - jsonPath: $.*.skills.*.auditDetails.createdBy + - jsonPath: $.*.skills.*.auditDetails.lastModifiedBy + - jsonPath: $.*.skills.*.auditDetails.createdTime + - jsonPath: $.*.skills.*.auditDetails.lastModifiedTime + - jsonPath: $.*.skills.*.isDeleted + + - version: 1.0 + description: Updates Individual + fromTopic: update-individual-topic + isTransaction: true + queryMaps: + - query: UPDATE individual SET userId=?, tenantId=?, givenName=?, familyName=?, otherNames=?, dateOfBirth=?, Gender=?, bloodGroup=?, mobileNumber=?, altContactNumber=?, email=?, fatherName=?, husbandName=?, relationship=?, photo=?, additionalDetails=?, lastModifiedBy=?, lastModifiedTime=?, rowVersion=? WHERE id=? AND isDeleted=false; + basePath: $.* + jsonMaps: + - jsonPath: $.*.userId + - jsonPath: $.*.tenantId + - jsonPath: $.*.name.givenName + - jsonPath: $.*.name.familyName + - jsonPath: $.*.name.otherNames + - jsonPath: $.*.dateOfBirth + type: DATE + - jsonPath: $.*.gender + - jsonPath: $.*.bloodGroup + - jsonPath: $.*.mobileNumber + - jsonPath: $.*.altContactNumber + - jsonPath: $.*.email + - jsonPath: $.*.fatherName + - jsonPath: $.*.husbandName + - jsonPath: $.*.relationship + - jsonPath: $.*.photo + - jsonPath: $.*.additionalFields + type: JSON + dbType: JSONB + - jsonPath: $.*.auditDetails.lastModifiedBy + - jsonPath: $.*.auditDetails.lastModifiedTime + - jsonPath: $.*.rowVersion + - jsonPath: $.*.id + - query: INSERT INTO address(id, clientReferenceId, tenantId, doorNo, latitude, longitude, locationAccuracy, type, addressLine1, addressLine2, landmark, city, pincode, buildingName, street, localityCode, wardCode) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON CONFLICT (id) DO UPDATE SET doorno=?, latitude=?, longitude=?, locationaccuracy=?, type=?, addressline1=?, addressline2=?, landmark=?, city=?, pincode=?, buildingname=?, street=?, localitycode=?, wardCode=?; + basePath: $.*.address.* + jsonMaps: + - jsonPath: $.*.address.*.id + - jsonPath: $.*.address.*.clientReferenceId + - jsonPath: $.*.address.*.tenantId + - jsonPath: $.*.address.*.doorNo + - jsonPath: $.*.address.*.latitude + - jsonPath: $.*.address.*.longitude + - jsonPath: $.*.address.*.locationAccuracy + - jsonPath: $.*.address.*.type + - jsonPath: $.*.address.*.addressLine1 + - jsonPath: $.*.address.*.addressLine2 + - jsonPath: $.*.address.*.landmark + - jsonPath: $.*.address.*.city + - jsonPath: $.*.address.*.pincode + - jsonPath: $.*.address.*.buildingName + - jsonPath: $.*.address.*.street + - jsonPath: $.*.address.*.locality.code + - jsonPath: $.*.address.*.ward.code + - jsonPath: $.*.address.*.doorNo + - jsonPath: $.*.address.*.latitude + - jsonPath: $.*.address.*.longitude + - jsonPath: $.*.address.*.locationAccuracy + - jsonPath: $.*.address.*.type + - jsonPath: $.*.address.*.addressLine1 + - jsonPath: $.*.address.*.addressLine2 + - jsonPath: $.*.address.*.landmark + - jsonPath: $.*.address.*.city + - jsonPath: $.*.address.*.pincode + - jsonPath: $.*.address.*.buildingName + - jsonPath: $.*.address.*.street + - jsonPath: $.*.address.*.locality.code + - jsonPath: $.*.address.*.ward.code + - query: INSERT INTO individual_address(individualId, addressId, type, createdBy, lastModifiedBy, createdTime, lastModifiedTime, isDeleted) VALUES (?, ?, ?, ?, ?, ?, ?, ?) ON CONFLICT (individualId, addressId, type, isDeleted) WHERE isDeleted=false DO UPDATE SET lastModifiedBy = ?, lastModifiedTime = ?; + basePath: $.*.address.* + jsonMaps: + - jsonPath: $.*.address.*.individualId + - jsonPath: $.*.address.*.id + - jsonPath: $.*.address.*.type + - jsonPath: $.*.address.*.auditDetails.createdBy + - jsonPath: $.*.address.*.auditDetails.lastModifiedBy + - jsonPath: $.*.address.*.auditDetails.createdTime + - jsonPath: $.*.address.*.auditDetails.lastModifiedTime + - jsonPath: $.*.address.*.isDeleted + - jsonPath: $.*.address.*.auditDetails.lastModifiedBy + - jsonPath: $.*.address.*.auditDetails.lastModifiedTime + - query: INSERT INTO individual_identifier(id, clientReferenceId, individualId, identifierType, identifierId, createdBy, lastModifiedBy, createdTime, lastModifiedTime, isDeleted) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON CONFLICT (id) WHERE isDeleted=false DO UPDATE SET identifierId = ?, identifierType = ?, lastModifiedBy = ?, lastModifiedTime = ?; + basePath: $.*.identifiers.* + jsonMaps: + - jsonPath: $.*.identifiers.*.id + - jsonPath: $.*.identifiers.*.clientReferenceId + - jsonPath: $.*.identifiers.*.individualId + - jsonPath: $.*.identifiers.*.identifierType + - jsonPath: $.*.identifiers.*.identifierId + - jsonPath: $.*.identifiers.*.auditDetails.createdBy + - jsonPath: $.*.identifiers.*.auditDetails.lastModifiedBy + - jsonPath: $.*.identifiers.*.auditDetails.createdTime + - jsonPath: $.*.identifiers.*.auditDetails.lastModifiedTime + - jsonPath: $.*.identifiers.*.isDeleted + - jsonPath: $.*.identifiers.*.identifierId + - jsonPath: $.*.identifiers.*.identifierType + - jsonPath: $.*.identifiers.*.auditDetails.lastModifiedBy + - jsonPath: $.*.identifiers.*.auditDetails.lastModifiedTime + - query: INSERT INTO individual_skill(id, clientReferenceId, individualId, type, level, experience, createdBy, lastModifiedBy, createdTime, lastModifiedTime, isDeleted) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON CONFLICT (id) WHERE isDeleted=false DO UPDATE SET type = ?, level = ?, experience = ?, lastModifiedBy = ?, lastModifiedTime = ?; + basePath: $.*.skills.* + jsonMaps: + - jsonPath: $.*.skills.*.id + - jsonPath: $.*.skills.*.clientReferenceId + - jsonPath: $.*.skills.*.individualId + - jsonPath: $.*.skills.*.type + - jsonPath: $.*.skills.*.level + - jsonPath: $.*.skills.*.experience + - jsonPath: $.*.skills.*.auditDetails.createdBy + - jsonPath: $.*.skills.*.auditDetails.lastModifiedBy + - jsonPath: $.*.skills.*.auditDetails.createdTime + - jsonPath: $.*.skills.*.auditDetails.lastModifiedTime + - jsonPath: $.*.skills.*.isDeleted + - jsonPath: $.*.skills.*.type + - jsonPath: $.*.skills.*.level + - jsonPath: $.*.skills.*.experience + - jsonPath: $.*.skills.*.auditDetails.lastModifiedBy + - jsonPath: $.*.skills.*.auditDetails.lastModifiedTime + + - version: 1.0 + description: Deletes Individual and related Entities + fromTopic: delete-individual-topic + isTransaction: true + queryMaps: + - query: UPDATE individual SET lastModifiedBy=?, lastModifiedTime=?, rowVersion=?, isDeleted=? WHERE id=?; + basePath: $.* + jsonMaps: + - jsonPath: $.*.auditDetails.lastModifiedBy + - jsonPath: $.*.auditDetails.lastModifiedTime + - jsonPath: $.*.rowVersion + - jsonPath: $.*.isDeleted + - jsonPath: $.*.id + - query: UPDATE individual_address SET lastModifiedBy=?, lastModifiedTime=?, isDeleted=? WHERE individualId=? AND addressId=?; + basePath: $.*.address.* + jsonMaps: + - jsonPath: $.*.address.*.auditDetails.lastModifiedBy + - jsonPath: $.*.address.*.auditDetails.lastModifiedTime + - jsonPath: $.*.address.*.isDeleted + - jsonPath: $.*.address.*.individualId + - jsonPath: $.*.address.*.id + - query: UPDATE individual_identifier SET lastModifiedBy=?, lastModifiedTime=?, isDeleted=? WHERE id=?; + basePath: $.*.identifiers.* + jsonMaps: + - jsonPath: $.*.identifiers.*.auditDetails.lastModifiedBy + - jsonPath: $.*.identifiers.*.auditDetails.lastModifiedTime + - jsonPath: $.*.identifiers.*.isDeleted + - jsonPath: $.*.identifiers.*.id + - query: UPDATE individual_skill SET lastModifiedBy=?, lastModifiedTime=?, isDeleted=? WHERE id=?; + basePath: $.*.skills.* + jsonMaps: + - jsonPath: $.*.skills.*.auditDetails.lastModifiedBy + - jsonPath: $.*.skills.*.auditDetails.lastModifiedTime + - jsonPath: $.*.skills.*.isDeleted + - jsonPath: $.*.skills.*.id + + - version: 1.0 + description: Updates userId and userUuid received from user-service into an individual + fromTopic: update-user-id-topic + isTransaction: true + queryMaps: + - query: UPDATE individual SET userId=?, userUuid=? WHERE id=?; + basePath: $.* + jsonMaps: + - jsonPath: $.*.userId + - jsonPath: $.*.userUuid + - jsonPath: $.*.id diff --git a/works/egov-persister/loi-service.yml b/works/egov-persister/loi-service.yml new file mode 100644 index 000000000..7a5fac2b5 --- /dev/null +++ b/works/egov-persister/loi-service.yml @@ -0,0 +1,111 @@ +serviceMaps: + serviceName: loi-service + mappings: + - version: 1.0 + description: Persists letterofindent details in eg_wms_loi table + fromTopic: save-loi + isTransaction: true + queryMaps: + - query: INSERT INTO eg_wms_loi(id, tenantId, loi_number, work_pkg_number, work_identification_number, file_number, file_date, negotiated_percentage, agreement_date, contractor_id, security_deposit, bank_guarantee, emd_amount, contract_period, defect_liability_period, oic_id, status, letter_status, additionaldetails, createdby, lastmodifiedby, createdtime, lastmodifiedtime) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: letterOfIndent + jsonMaps: + - jsonPath: $.letterOfIndent.id + + - jsonPath: $.letterOfIndent.tenantId + + - jsonPath: $.letterOfIndent.letterOfIndentNumber + + - jsonPath: $.letterOfIndent.workPackageNumber + + - jsonPath: $.letterOfIndent.workIdentificationNumber + + - jsonPath: $.letterOfIndent.fileNumber + + - jsonPath: $.letterOfIndent.fileDate + + - jsonPath: $.letterOfIndent.negotiatedPercentage + + - jsonPath: $.letterOfIndent.agreementDate + + - jsonPath: $.letterOfIndent.contractorId + + - jsonPath: $.letterOfIndent.securityDeposit + + - jsonPath: $.letterOfIndent.bankGuarantee + + - jsonPath: $.letterOfIndent.emdAmount + + - jsonPath: $.letterOfIndent.contractPeriod + + - jsonPath: $.letterOfIndent.defectLiabilityPeriod + + - jsonPath: $.letterOfIndent.oicId + + - jsonPath: $.letterOfIndent.status + + - jsonPath: $.letterOfIndent.letterStatus + + - jsonPath: $.letterOfIndent.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.letterOfIndent.auditDetails.createdBy + + - jsonPath: $.letterOfIndent.auditDetails.lastModifiedBy + + - jsonPath: $.letterOfIndent.auditDetails.createdTime + + - jsonPath: $.letterOfIndent.auditDetails.lastModifiedTime + + - version: 1.0 + description: Updates letterofindent details in eg_wms_loi table + fromTopic: update-loi + isTransaction: true + queryMaps: + - query: UPDATE eg_wms_loi set loi_number=?, work_pkg_number=?, work_identification_number=?, file_number=?, file_date=?, negotiated_percentage=?, agreement_date=?, contractor_id=?,security_deposit=?, bank_guarantee=?, emd_amount=?, contract_period=?, defect_liability_period=?, oic_id=?, status=?, letter_status=?,additionaldetails=?, lastmodifiedby=?, lastmodifiedtime=? where id=?; + basePath: letterOfIndent + jsonMaps: + + - jsonPath: $.letterOfIndent.tenantId + + - jsonPath: $.letterOfIndent.letterOfIndentNumber + + - jsonPath: $.letterOfIndent.workPackageNumber + + - jsonPath: $.letterOfIndent.workIdentificationNumber + + - jsonPath: $.letterOfIndent.fileNumber + + - jsonPath: $.letterOfIndent.fileDate + + - jsonPath: $.letterOfIndent.negotiatedPercentage + + - jsonPath: $.letterOfIndent.agreementDate + + - jsonPath: $.letterOfIndent.contractorId + + - jsonPath: $.letterOfIndent.securityDeposit + + - jsonPath: $.letterOfIndent.bankGuarantee + + - jsonPath: $.letterOfIndent.emdAmount + + - jsonPath: $.letterOfIndent.contractPeriod + + - jsonPath: $.letterOfIndent.defectLiabilityPeriod + + - jsonPath: $.letterOfIndent.oicId + + - jsonPath: $.letterOfIndent.status + + - jsonPath: $.letterOfIndent.letterStatus + + - jsonPath: $.letterOfIndent.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.letterOfIndent.auditDetails.lastModifiedBy + + - jsonPath: $.letterOfIndent.auditDetails.lastModifiedTime + + - jsonPath: $.letterOfIndent.id diff --git a/works/egov-persister/muster-service-persister.yml b/works/egov-persister/muster-service-persister.yml new file mode 100644 index 000000000..8515e6bb9 --- /dev/null +++ b/works/egov-persister/muster-service-persister.yml @@ -0,0 +1,169 @@ +serviceMaps: + serviceName: muster-service + mappings: + - version: 1.0 + name: Muster roll + description: Persists muster roll details in DB + fromTopic: save-musterroll + isTransaction: true + isAuditEnabled: true + module: MST + objecIdJsonPath: $.id + tenantIdJsonPath: $.tenantId + transactionCodeJsonPath: $.musterRollNumber + auditAttributeBasePath: $.musterRoll + queryMaps: + - query: INSERT INTO eg_wms_muster_roll(id,tenant_id,musterroll_number,attendance_register_id,start_date,end_date,musterroll_status,status,additionaldetails,createdby,lastmodifiedby,createdtime,lastmodifiedtime,reference_id,service_code) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?); + basePath: $.musterRoll + jsonMaps: + - jsonPath: $.musterRoll.id + + - jsonPath: $.musterRoll.tenantId + + - jsonPath: $.musterRoll.musterRollNumber + + - jsonPath: $.musterRoll.registerId + + - jsonPath: $.musterRoll.startDate + + - jsonPath: $.musterRoll.endDate + + - jsonPath: $.musterRoll.musterRollStatus + + - jsonPath: $.musterRoll.status + + - jsonPath: $.musterRoll.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.musterRoll.auditDetails.createdBy + + - jsonPath: $.musterRoll.auditDetails.lastModifiedBy + + - jsonPath: $.musterRoll.auditDetails.createdTime + + - jsonPath: $.musterRoll.auditDetails.lastModifiedTime + + - jsonPath: $.musterRoll.referenceId + + - jsonPath: $.musterRoll.serviceCode + + - query: INSERT INTO eg_wms_attendance_summary(id,individual_id,muster_roll_id,musterroll_number,actual_total_attendance,additionaldetails,createdby,lastmodifiedby,createdtime,lastmodifiedtime,modified_total_attendance) VALUES(?,?,?,?,?,?,?,?,?,?,?); + basePath: $.musterRoll.individualEntries.* + jsonMaps: + + - jsonPath: $.musterRoll.individualEntries.*.id + + - jsonPath: $.musterRoll.individualEntries.*.individualId + + - jsonPath: $.musterRoll.id + + - jsonPath: $.musterRoll.musterRollNumber + + - jsonPath: $.musterRoll.individualEntries.*.actualTotalAttendance + + - jsonPath: $.musterRoll.individualEntries.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.musterRoll.individualEntries.*.auditDetails.createdBy + + - jsonPath: $.musterRoll.individualEntries.*.auditDetails.lastModifiedBy + + - jsonPath: $.musterRoll.individualEntries.*.auditDetails.createdTime + + - jsonPath: $.musterRoll.individualEntries.*.auditDetails.lastModifiedTime + + - jsonPath: $.musterRoll.individualEntries.*.modifiedTotalAttendance + + - query: INSERT INTO eg_wms_attendance_entries(id,attendance_summary_id,individual_id,musterroll_number,date_of_attendance,attendance_value,additionaldetails,createdby,lastmodifiedby,createdtime,lastmodifiedtime) VALUES(?,?,?,?,?,?,?,?,?,?,?); + basePath: $.musterRoll.individualEntries.*.attendanceEntries.* + jsonMaps: + + - jsonPath: $.musterRoll.individualEntries.*.attendanceEntries.*.id + + - jsonPath: $.musterRoll.individualEntries[*][?({id} in @.attendanceEntries[*].id)].id + + - jsonPath: $.musterRoll.individualEntries[*][?({id} in @.attendanceEntries[*].id)].individualId + + - jsonPath: $.musterRoll.musterRollNumber + + - jsonPath: $.musterRoll.individualEntries.*.attendanceEntries.*.time + + - jsonPath: $.musterRoll.individualEntries.*.attendanceEntries.*.attendance + + - jsonPath: $.musterRoll.individualEntries.*.attendanceEntries.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.musterRoll.individualEntries.*.attendanceEntries.*.auditDetails.createdBy + + - jsonPath: $.musterRoll.individualEntries.*.attendanceEntries.*.auditDetails.lastModifiedBy + + - jsonPath: $.musterRoll.individualEntries.*.attendanceEntries.*.auditDetails.createdTime + + - jsonPath: $.musterRoll.individualEntries.*.attendanceEntries.*.auditDetails.lastModifiedTime + + - version: 1.0 + description: Update Muster Roll details + fromTopic: update-musterroll + isTransaction: true + isAuditEnabled: true + module: MST + objecIdJsonPath: $.id + tenantIdJsonPath: $.tenantId + transactionCodeJsonPath: $.id + auditAttributeBasePath: $.musterRoll + queryMaps: + - query: UPDATE eg_wms_muster_roll SET musterroll_status=?, status=?, additionaldetails=?, lastmodifiedby=?, lastmodifiedtime=? WHERE id=?; + basePath: $.musterRoll + jsonMaps: + + - jsonPath: $.musterRoll.musterRollStatus + + - jsonPath: $.musterRoll.status + + - jsonPath: $.musterRoll.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.musterRoll.auditDetails.lastModifiedBy + + - jsonPath: $.musterRoll.auditDetails.lastModifiedTime + + - jsonPath: $.musterRoll.id + + - query: UPDATE eg_wms_attendance_summary SET actual_total_attendance=?, modified_total_attendance=?, additionaldetails=?, lastmodifiedby=?, lastmodifiedtime=? WHERE id=?; + basePath: $.musterRoll.individualEntries.* + jsonMaps: + + - jsonPath: $.musterRoll.individualEntries.*.actualTotalAttendance + + - jsonPath: $.musterRoll.individualEntries.*.modifiedTotalAttendance + + - jsonPath: $.musterRoll.individualEntries.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.musterRoll.auditDetails.lastModifiedBy + + - jsonPath: $.musterRoll.auditDetails.lastModifiedTime + + - jsonPath: $.musterRoll.individualEntries.*.id + + + - query: UPDATE eg_wms_attendance_entries SET attendance_value=?, additionaldetails=?, lastmodifiedby=?, lastmodifiedtime=? WHERE id=?; + basePath: $.musterRoll.individualEntries.*.attendanceEntries.* + jsonMaps: + + - jsonPath: $.musterRoll.individualEntries.*.attendanceEntries.*.attendance + + - jsonPath: $.musterRoll.individualEntries.*.attendanceEntries.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.musterRoll.auditDetails.lastModifiedBy + + - jsonPath: $.musterRoll.auditDetails.lastModifiedTime + + - jsonPath: $.musterRoll.individualEntries.*.attendanceEntries.*.id \ No newline at end of file diff --git a/works/egov-persister/organisation-persister.yml b/works/egov-persister/organisation-persister.yml new file mode 100644 index 000000000..29881d7a6 --- /dev/null +++ b/works/egov-persister/organisation-persister.yml @@ -0,0 +1,530 @@ +serviceMaps: + serviceName: organisation + mappings: + - version: 1.0 + name: Organisation + description: Persists organisation details + fromTopic: save-org + isTransaction: true + isAuditEnabled: true + module: ORG + objecIdJsonPath: $.id + tenantIdJsonPath: $.tenantId + transactionCodeJsonPath: $.applicationNumber + auditAttributeBasePath: $.organisations.* + queryMaps: + - query: INSERT INTO eg_org(id,tenant_id,application_number,name,org_number,external_ref_number,date_of_incorporation,application_status,is_active,additional_details,created_by,last_modified_by,created_time,last_modified_time) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?); + + basePath: $.organisations.* + jsonMaps: + + - jsonPath: $.organisations.*.id + + - jsonPath: $.organisations.*.tenantId + + - jsonPath: $.organisations.*.applicationNumber + + - jsonPath: $.organisations.*.name + + - jsonPath: $.organisations.*.orgNumber + + - jsonPath: $.organisations.*.externalRefNumber + + - jsonPath: $.organisations.*.dateOfIncorporation + + - jsonPath: $.organisations.*.applicationStatus + + - jsonPath: $.organisations.*.isActive + + - jsonPath: $.organisations.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.organisations.*.auditDetails.createdBy + + - jsonPath: $.organisations.*.auditDetails.lastModifiedBy + + - jsonPath: $.organisations.*.auditDetails.createdTime + + - jsonPath: $.organisations.*.auditDetails.lastModifiedTime + + + - query: INSERT INTO eg_org_address(id,tenant_id,org_id,door_no,plot_no,landmark,city,pin_code,district,region,state,country,boundary_code,boundary_type,building_name,street,additional_details) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?); + + basePath: $.organisations.*.orgAddress.* + jsonMaps: + + - jsonPath: $.organisations.*.orgAddress.*.id + + - jsonPath: $.organisations.*.orgAddress.*.tenantId + + - jsonPath: $.organisations[*][?({id} in @.orgAddress[*].id)].id + + - jsonPath: $.organisations.*.orgAddress.*.doorNo + + - jsonPath: $.organisations.*.orgAddress.*.plotNo + + - jsonPath: $.organisations.*.orgAddress.*.landmark + + - jsonPath: $.organisations.*.orgAddress.*.city + + - jsonPath: $.organisations.*.orgAddress.*.pincode + + - jsonPath: $.organisations.*.orgAddress.*.district + + - jsonPath: $.organisations.*.orgAddress.*.region + + - jsonPath: $.organisations.*.orgAddress.*.state + + - jsonPath: $.organisations.*.orgAddress.*.country + + - jsonPath: $.organisations.*.orgAddress.*.boundaryCode + + - jsonPath: $.organisations.*.orgAddress.*.boundaryType + + - jsonPath: $.organisations.*.orgAddress.*.buildingName + + - jsonPath: $.organisations.*.orgAddress.*.street + + - jsonPath: $.organisations.*.orgAddress.*.additionDetails + type: JSON + dbType: JSONB + + + - query: INSERT INTO eg_org_address_geo_location(id,address_id,latitude,longitude,additional_details) VALUES (?,?,?,?,?); + + basePath: $.organisations.*.orgAddress.*.geoLocation + jsonMaps: + + - jsonPath: $.organisations.*.orgAddress.*.geoLocation.id + + - jsonPath: $.organisations.*.orgAddress.*.id + + - jsonPath: $.organisations.*.orgAddress.*.geoLocation.latitude + + - jsonPath: $.organisations.*.orgAddress.*.geoLocation.longitude + + - jsonPath: $.organisations.*.orgAddress.*.geoLocation.additionalDetails + type: JSON + dbType: JSONB + + + - query: INSERT INTO eg_org_contact_detail(id,tenant_id,org_id,contact_name,contact_mobile_number,contact_email) VALUES (?,?,?,?,?,?); + + basePath: $.organisations.*.contactDetails.* + jsonMaps: + + - jsonPath: $.organisations.*.contactDetails.*.id + + - jsonPath: $.organisations.*.contactDetails.*.tenantId + + - jsonPath: $.organisations[*][?({id} in @.contactDetails[*].id)].id + + - jsonPath: $.organisations.*.contactDetails.*.contactName + + - jsonPath: $.organisations.*.contactDetails.*.contactMobileNumber + + - jsonPath: $.organisations.*.contactDetails.*.contactEmail + + + - query: INSERT INTO eg_tax_identifier(id,org_id,type,value,is_active,additional_details) VALUES (?,?,?,?,?,?); + + basePath: $.organisations.*.identifiers.* + jsonMaps: + + - jsonPath: $.organisations.*.identifiers.*.id + + - jsonPath: $.organisations[*][?({id} in @.identifiers[*].id)].id + + - jsonPath: $.organisations.*.identifiers.*.type + + - jsonPath: $.organisations.*.identifiers.*.value + + - jsonPath: $.organisations.*.identifiers.*.isActive + + - jsonPath: $.organisations.*.identifiers.*.additionalDetails + type: JSON + dbType: JSONB + + + - query: INSERT INTO eg_org_jurisdiction(id,org_id,code,additional_details) VALUES (?,?,?,?); + + basePath: $.organisations.*.jurisdiction.* + jsonMaps: + + - jsonPath: $.organisations.*.jurisdiction.*.id + + - jsonPath: $.organisations[*][?({id} in @.jurisdiction[*].id)].id + + - jsonPath: $.organisations.*.jurisdiction.*.code + + - jsonPath: $.organisations.*.jurisdiction.*.additionalDetails + type: JSON + dbType: JSONB + + + - query: INSERT INTO eg_org_function(id,org_id,application_number,type,category,class,valid_from,valid_to,application_status,wf_status,is_active,additional_details,created_by,last_modified_by,created_time,last_modified_time) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?); + + basePath: $.organisations.*.functions.* + jsonMaps: + + - jsonPath: $.organisations.*.functions.*.id + + - jsonPath: $.organisations[*][?({id} in @.functions[*].id)].id + + - jsonPath: $.organisations.*.functions.*.applicationNumber + + - jsonPath: $.organisations.*.functions.*.type + + - jsonPath: $.organisations.*.functions.*.category + + - jsonPath: $.organisations.*.functions.*.class + + - jsonPath: $.organisations.*.functions.*.validFrom + + - jsonPath: $.organisations.*.functions.*.validTo + + - jsonPath: $.organisations.*.functions.*.applicationStatus + + - jsonPath: $.organisations.*.functions.*.wfStatus + + - jsonPath: $.organisations.*.functions.*.isActive + + - jsonPath: $.organisations.*.functions.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.organisations.*.functions.*.auditDetails.createdBy + + - jsonPath: $.organisations.*.functions.*.auditDetails.lastModifiedBy + + - jsonPath: $.organisations.*.functions.*.auditDetails.createdTime + + - jsonPath: $.organisations.*.functions.*.auditDetails.lastModifiedTime + + + - query: INSERT INTO eg_org_document(id,org_id,document_type,file_store,document_uid,is_active,additional_details) VALUES (?,?,?,?,?,?,?); + + basePath: $.organisations.*.documents.* + jsonMaps: + + - jsonPath: $.organisations.*.documents.*.id + + - jsonPath: $.organisations[*][?({id} in @.documents[*].id)].id + + - jsonPath: $.organisations.*.documents.*.documentType + + - jsonPath: $.organisations.*.documents.*.fileStore + + - jsonPath: $.organisations.*.documents.*.documentUid + + - jsonPath: $.organisations.*.documents.*.isActive + + - jsonPath: $.organisations.*.documents.*.additionalDetails + type: JSON + dbType: JSONB + + + - query: INSERT INTO eg_org_document(id,org_func_id,document_type,file_store,document_uid,is_active,additional_details) VALUES (?,?,?,?,?,?,?); + + basePath: $.organisations.*.functions.*.documents.* + jsonMaps: + + - jsonPath: $.organisations.*.functions.*.documents.*.id + + - jsonPath: $.organisations.*.functions[*][?({id} in @.documents[*].id)].id + + - jsonPath: $.organisations.*.functions.*.documents.*.documentType + + - jsonPath: $.organisations.*.functions.*.documents.*.fileStore + + - jsonPath: $.organisations.*.functions.*.documents.*.documentUid + + - jsonPath: $.organisations.*.functions.*.documents.*.isActive + + - jsonPath: $.organisations.*.functions.*.documents.*.additionalDetails + type: JSON + dbType: JSONB + + + - version: 1.0 + description: Update organisation details + fromTopic: update-org + isTransaction: true + isAuditEnabled: true + module: ORG + objecIdJsonPath: $.id + tenantIdJsonPath: $.tenantId + transactionCodeJsonPath: $.applicationNumber + auditAttributeBasePath: $.organisations.* + queryMaps: + + - query: UPDATE eg_org set name=?, external_ref_number=?, date_of_incorporation=?, application_status=?, is_active=?, additional_details=?,last_modified_by=?, last_modified_time=? where id=?; + basePath: $.organisations.* + jsonMaps: + + - jsonPath: $.organisations.*.name + + - jsonPath: $.organisations.*.externalRefNumber + + - jsonPath: $.organisations.*.dateOfIncorporation + + - jsonPath: $.organisations.*.applicationStatus + + - jsonPath: $.organisations.*.isActive + + - jsonPath: $.organisations.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.organisations.*.auditDetails.lastModifiedBy + + - jsonPath: $.organisations.*.auditDetails.lastModifiedTime + + - jsonPath: $.organisations.*.id + + + - query: UPDATE eg_org_address set door_no=?, plot_no=?, landmark=?,city=?, pin_code=?,district=?,region=?, state=?, country=?,boundary_code=?, boundary_type=?, building_name=?, street=?,additional_details=? where id=?; + + basePath: $.organisations.*.orgAddress.* + jsonMaps: + + - jsonPath: $.organisations.*.orgAddress.*.doorNo + + - jsonPath: $.organisations.*.orgAddress.*.plotNo + + - jsonPath: $.organisations.*.orgAddress.*.landmark + + - jsonPath: $.organisations.*.orgAddress.*.city + + - jsonPath: $.organisations.*.orgAddress.*.pincode + + - jsonPath: $.organisations.*.orgAddress.*.district + + - jsonPath: $.organisations.*.orgAddress.*.region + + - jsonPath: $.organisations.*.orgAddress.*.state + + - jsonPath: $.organisations.*.orgAddress.*.country + + - jsonPath: $.organisations.*.orgAddress.*.boundaryCode + + - jsonPath: $.organisations.*.orgAddress.*.boundaryType + + - jsonPath: $.organisations.*.orgAddress.*.buildingName + + - jsonPath: $.organisations.*.orgAddress.*.street + + - jsonPath: $.organisations.*.orgAddress.*.additionDetails + type: JSON + dbType: JSONB + + - jsonPath: $.organisations.*.orgAddress.*.id + + + + - query: UPDATE eg_org_address_geo_location set latitude=?, longitude=?, additional_details=? where id=?; + + basePath: $.organisations.*.orgAddress.*.geoLocation + jsonMaps: + + - jsonPath: $.organisations.*.orgAddress.*.geoLocation.latitude + + - jsonPath: $.organisations.*.orgAddress.*.geoLocation.longitude + + - jsonPath: $.organisations.*.orgAddress.*.geoLocation.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.organisations.*.orgAddress.*.geoLocation.id + + + - query: UPDATE eg_org_contact_detail set contact_name=?, contact_mobile_number=?,contact_email=? where id=?; + + basePath: $.organisations.*.contactDetails.* + jsonMaps: + + - jsonPath: $.organisations.*.contactDetails.*.contactName + + - jsonPath: $.organisations.*.contactDetails.*.contactMobileNumber + + - jsonPath: $.organisations.*.contactDetails.*.contactEmail + + - jsonPath: $.organisations.*.contactDetails.*.id + + - query: INSERT INTO eg_tax_identifier(id,org_id,type,value,is_active,additional_details) VALUES (?,?,?,?,?,?) ON CONFLICT (id) DO UPDATE SET type=?, value=?, is_active=?, additional_details=?; + + basePath: $.organisations.*.identifiers.* + jsonMaps: + + - jsonPath: $.organisations.*.identifiers.*.id + + - jsonPath: $.organisations[*][?({id} in @.identifiers[*].id)].id + + - jsonPath: $.organisations.*.identifiers.*.type + + - jsonPath: $.organisations.*.identifiers.*.value + + - jsonPath: $.organisations.*.identifiers.*.isActive + + - jsonPath: $.organisations.*.identifiers.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.organisations.*.identifiers.*.type + + - jsonPath: $.organisations.*.identifiers.*.value + + - jsonPath: $.organisations.*.identifiers.*.isActive + + - jsonPath: $.organisations.*.identifiers.*.additionalDetails + type: JSON + dbType: JSONB + + + - query: UPDATE eg_org_jurisdiction set code=?,additional_details=? where id=?; + + basePath: $.organisations.*.jurisdiction.* + jsonMaps: + + - jsonPath: $.organisations.*.jurisdiction.*.code + + - jsonPath: $.organisations.*.jurisdiction.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.organisations.*.jurisdiction.*.id + + + - query: INSERT INTO eg_org_function(id,org_id,application_number,type,category,class,valid_from,valid_to,application_status,wf_status,is_active,additional_details,created_by,last_modified_by,created_time,last_modified_time) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) ON CONFLICT (id) DO UPDATE SET type=?, category=?, class=?,valid_from=?, valid_to=?,application_status=?,wf_status=?, is_active=?,last_modified_by=?, last_modified_time=?,additional_details=?; + + basePath: $.organisations.*.functions.* + jsonMaps: + + - jsonPath: $.organisations.*.functions.*.id + + - jsonPath: $.organisations[*][?({id} in @.functions[*].id)].id + + - jsonPath: $.organisations.*.functions.*.applicationNumber + + - jsonPath: $.organisations.*.functions.*.type + + - jsonPath: $.organisations.*.functions.*.category + + - jsonPath: $.organisations.*.functions.*.class + + - jsonPath: $.organisations.*.functions.*.validFrom + + - jsonPath: $.organisations.*.functions.*.validTo + + - jsonPath: $.organisations.*.functions.*.applicationStatus + + - jsonPath: $.organisations.*.functions.*.wfStatus + + - jsonPath: $.organisations.*.functions.*.isActive + + - jsonPath: $.organisations.*.functions.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.organisations.*.functions.*.auditDetails.createdBy + + - jsonPath: $.organisations.*.functions.*.auditDetails.lastModifiedBy + + - jsonPath: $.organisations.*.functions.*.auditDetails.createdTime + + - jsonPath: $.organisations.*.functions.*.auditDetails.lastModifiedTime + + - jsonPath: $.organisations.*.functions.*.type + + - jsonPath: $.organisations.*.functions.*.category + + - jsonPath: $.organisations.*.functions.*.class + + - jsonPath: $.organisations.*.functions.*.validFrom + + - jsonPath: $.organisations.*.functions.*.validTo + + - jsonPath: $.organisations.*.functions.*.applicationStatus + + - jsonPath: $.organisations.*.functions.*.wfStatus + + - jsonPath: $.organisations.*.functions.*.isActive + + - jsonPath: $.organisations.*.functions.*.auditDetails.lastModifiedBy + + - jsonPath: $.organisations.*.functions.*.auditDetails.lastModifiedTime + + - jsonPath: $.organisations.*.functions.*.additionalDetails + type: JSON + dbType: JSONB + + + + - query: INSERT INTO eg_org_document(id,org_id,document_type,file_store,document_uid,is_active,additional_details) VALUES (?,?,?,?,?,?,?) ON CONFLICT (id) DO UPDATE SET document_type=?, file_store=?,document_uid=?, is_active=?, additional_details=?; + + basePath: $.organisations.*.documents.* + jsonMaps: + + - jsonPath: $.organisations.*.documents.*.id + + - jsonPath: $.organisations[*][?({id} in @.documents[*].id)].id + + - jsonPath: $.organisations.*.documents.*.documentType + + - jsonPath: $.organisations.*.documents.*.fileStore + + - jsonPath: $.organisations.*.documents.*.documentUid + + - jsonPath: $.organisations.*.documents.*.isActive + + - jsonPath: $.organisations.*.documents.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.organisations.*.documents.*.documentType + + - jsonPath: $.organisations.*.documents.*.fileStore + + - jsonPath: $.organisations.*.documents.*.documentUid + + - jsonPath: $.organisations.*.documents.*.isActive + + - jsonPath: $.organisations.*.documents.*.additionalDetails + type: JSON + dbType: JSONB + + + + - query: INSERT INTO eg_org_document(id,org_func_id,document_type,file_store,document_uid,is_active,additional_details) VALUES (?,?,?,?,?,?,?) ON CONFLICT (id) DO UPDATE SET document_type=?, file_store=?,document_uid=?,is_active=?, additional_details=?; + + basePath: $.organisations.*.functions.*.documents.* + jsonMaps: + + - jsonPath: $.organisations.*.functions.*.documents.*.id + + - jsonPath: $.organisations.*.functions[*][?({id} in @.documents[*].id)].id + + - jsonPath: $.organisations.*.functions.*.documents.*.documentType + + - jsonPath: $.organisations.*.functions.*.documents.*.fileStore + + - jsonPath: $.organisations.*.functions.*.documents.*.documentUid + + - jsonPath: $.organisations.*.functions.*.documents.*.isActive + + - jsonPath: $.organisations.*.functions.*.documents.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.organisations.*.functions.*.documents.*.documentType + + - jsonPath: $.organisations.*.functions.*.documents.*.fileStore + + - jsonPath: $.organisations.*.functions.*.documents.*.documentUid + + - jsonPath: $.organisations.*.functions.*.documents.*.isActive + + - jsonPath: $.organisations.*.functions.*.documents.*.additionalDetails + type: JSON + dbType: JSONB diff --git a/works/egov-persister/project-management-system-persister.yml b/works/egov-persister/project-management-system-persister.yml new file mode 100644 index 000000000..2bdd092e9 --- /dev/null +++ b/works/egov-persister/project-management-system-persister.yml @@ -0,0 +1,373 @@ +serviceMaps: + serviceName: project-management-system + mappings: + - version: 1.0 + name: Projects + description: Persists project details in eg_pms_project table + fromTopic: save-project + isTransaction: true + isAuditEnabled: true + module: PMS + objecIdJsonPath: $.id + tenantIdJsonPath: $.tenantId + transactionCodeJsonPath: $.projectNumber + auditAttributeBasePath: $.Projects.* + queryMaps: + - query: INSERT INTO eg_pms_project(id,tenant_id,project_number,name,project_type,project_subtype,department,description,reference_id,start_date,end_date,nature_of_work,is_task_enabled,parent,project_hierarchy,additional_details,is_deleted,row_version,created_by,last_modified_by,created_time,last_modified_time) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?); + basePath: $.Projects.* + jsonMaps: + - jsonPath: $.Projects.*.id + + - jsonPath: $.Projects.*.tenantId + + - jsonPath: $.Projects.*.projectNumber + + - jsonPath: $.Projects.*.name + + - jsonPath: $.Projects.*.projectType + + - jsonPath: $.Projects.*.projectSubType + + - jsonPath: $.Projects.*.department + + - jsonPath: $.Projects.*.description + + - jsonPath: $.Projects.*.referenceID + + - jsonPath: $.Projects.*.startDate + + - jsonPath: $.Projects.*.endDate + + - jsonPath: $.Projects.*.natureOfWork + + - jsonPath: $.Projects.*.isTaskEnabled + + - jsonPath: $.Projects.*.parent + + - jsonPath: $.Projects.*.projectHierarchy + + - jsonPath: $.Projects.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.Projects.*.isDeleted + + - jsonPath: $.Projects.*.rowVersion + + - jsonPath: $.Projects.*.auditDetails.createdBy + + - jsonPath: $.Projects.*.auditDetails.lastModifiedBy + + - jsonPath: $.Projects.*.auditDetails.createdTime + + - jsonPath: $.Projects.*.auditDetails.lastModifiedTime + + + - query: INSERT INTO eg_pms_address(id,tenant_id,project_id,door_no,latitude,longitude,location_accuracy,type,address_line1,address_line2,landmark,city,pin_code,building_name,street,boundary_type,boundary,created_by,last_modified_by,created_time,last_modified_time) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?); + basePath: $.Projects.*.address + jsonMaps: + - jsonPath: $.Projects.*.address.id + + - jsonPath: $.Projects.*.address.tenantId + + - jsonPath: $.Projects.*.id + + - jsonPath: $.Projects.*.address.doorNo + + - jsonPath: $.Projects.*.address.latitude + + - jsonPath: $.Projects.*.address.longitude + + - jsonPath: $.Projects.*.address.locationAccuracy + + - jsonPath: $.Projects.*.address.type + + - jsonPath: $.Projects.*.address.addressLine1 + + - jsonPath: $.Projects.*.address.addressLine2 + + - jsonPath: $.Projects.*.address.landmark + + - jsonPath: $.Projects.*.address.city + + - jsonPath: $.Projects.*.address.pincode + + - jsonPath: $.Projects.*.address.buildingName + + - jsonPath: $.Projects.*.address.street + + - jsonPath: $.Projects.*.address.boundaryType + + - jsonPath: $.Projects.*.address.boundary + + - jsonPath: $.Projects.*.address.auditDetails.createdBy + + - jsonPath: $.Projects.*.address.auditDetails.lastModifiedBy + + - jsonPath: $.Projects.*.address.auditDetails.createdTime + + - jsonPath: $.Projects.*.address.auditDetails.lastModifiedTime + + + - query: INSERT INTO eg_pms_target(id,project_id,beneficiary_type,total_no,target_no,is_deleted,created_by,last_modified_by,created_time,last_modified_time) VALUES (?,?,?,?,?,?,?,?,?,?); + basePath: $.Projects.*.targets.* + jsonMaps: + - jsonPath: $.Projects.*.targets.*.id + + - jsonPath: $.Projects[*][?({id} in @.targets[*].id)].id + + - jsonPath: $.Projects.*.targets.*.beneficiaryType + + - jsonPath: $.Projects.*.targets.*.totalNo + + - jsonPath: $.Projects.*.targets.*.targetNo + + - jsonPath: $.Projects.*.targets.*.isDeleted + + - jsonPath: $.Projects.*.targets.*.auditDetails.createdBy + + - jsonPath: $.Projects.*.targets.*.auditDetails.lastModifiedBy + + - jsonPath: $.Projects.*.targets.*.auditDetails.createdTime + + - jsonPath: $.Projects.*.targets.*.auditDetails.lastModifiedTime + + + - query: INSERT INTO eg_pms_document(id,project_id,document_type,filestore_id,document_uid,additional_details,status,created_by,last_modified_by,created_time,last_modified_time) VALUES (?,?,?,?,?,?,?,?,?,?,?); + basePath: $.Projects.*.documents.* + jsonMaps: + - jsonPath: $.Projects.*.documents.*.id + + - jsonPath: $.Projects[*][?({id} in @.documents[*].id)].id + + - jsonPath: $.Projects.*.documents.*.documentType + + - jsonPath: $.Projects.*.documents.*.fileStore + + - jsonPath: $.Projects.*.documents.*.documentUid + + - jsonPath: $.Projects.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.Projects.*.documents.*.status + + - jsonPath: $.Projects.*.documents.*.auditDetails.createdBy + + - jsonPath: $.Projects.*.documents.*.auditDetails.lastModifiedBy + + - jsonPath: $.Projects.*.documents.*.auditDetails.createdTime + + - jsonPath: $.Projects.*.documents.*.auditDetails.lastModifiedTime + + + - version: 1.0 + name: Projects + description: Updates project details in eg_pms_project table + fromTopic: update-project + isTransaction: true + isAuditEnabled: true + module: PMS + objecIdJsonPath: $.id + tenantIdJsonPath: $.tenantId + transactionCodeJsonPath: $.projectNumber + auditAttributeBasePath: $.Projects.* + queryMaps: + - query: UPDATE eg_pms_project SET name = ?, project_type = ?, project_subtype = ?, department = ?, description = ?, reference_id = ?, start_date = ?, end_date = ?, nature_of_work = ?, is_task_enabled = ?, additional_details = ?, is_deleted = ?, row_version = ?, last_modified_by = ?, last_modified_time = ? WHERE id = ?; + basePath: $.Projects.* + jsonMaps: + + - jsonPath: $.Projects.*.name + + - jsonPath: $.Projects.*.projectType + + - jsonPath: $.Projects.*.projectSubType + + - jsonPath: $.Projects.*.department + + - jsonPath: $.Projects.*.description + + - jsonPath: $.Projects.*.referenceID + + - jsonPath: $.Projects.*.startDate + + - jsonPath: $.Projects.*.endDate + + - jsonPath: $.Projects.*.natureOfWork + + - jsonPath: $.Projects.*.isTaskEnabled + + - jsonPath: $.Projects.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.Projects.*.isDeleted + + - jsonPath: $.Projects.*.rowVersion + + - jsonPath: $.Projects.*.auditDetails.lastModifiedBy + + - jsonPath: $.Projects.*.auditDetails.lastModifiedTime + + - jsonPath: $.Projects.*.id + + + - query: INSERT INTO eg_pms_address(id,tenant_id,project_id,door_no,latitude,longitude,location_accuracy,type,address_line1,address_line2,landmark,city,pin_code,building_name,street,boundary_type,boundary,created_by,last_modified_by,created_time,last_modified_time) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) ON CONFLICT (id) DO UPDATE SET door_no = ?, latitude=?, longitude=?, location_accuracy=?, type=?, address_line1=?, address_line2=?, landmark=?, city=?, pin_code=?, building_name=?, street=?, boundary_type=?, boundary=?, last_modified_by=?, last_modified_time=?; + basePath: $.Projects.*.address + jsonMaps: + + - jsonPath: $.Projects.*.address.id + + - jsonPath: $.Projects.*.address.tenantId + + - jsonPath: $.Projects.*.id + + - jsonPath: $.Projects.*.address.doorNo + + - jsonPath: $.Projects.*.address.latitude + + - jsonPath: $.Projects.*.address.longitude + + - jsonPath: $.Projects.*.address.locationAccuracy + + - jsonPath: $.Projects.*.address.type + + - jsonPath: $.Projects.*.address.addressLine1 + + - jsonPath: $.Projects.*.address.addressLine2 + + - jsonPath: $.Projects.*.address.landmark + + - jsonPath: $.Projects.*.address.city + + - jsonPath: $.Projects.*.address.pincode + + - jsonPath: $.Projects.*.address.buildingName + + - jsonPath: $.Projects.*.address.street + + - jsonPath: $.Projects.*.address.boundaryType + + - jsonPath: $.Projects.*.address.boundary + + - jsonPath: $.Projects.*.address.auditDetails.createdBy + + - jsonPath: $.Projects.*.address.auditDetails.lastModifiedBy + + - jsonPath: $.Projects.*.address.auditDetails.createdTime + + - jsonPath: $.Projects.*.address.auditDetails.lastModifiedTime + + - jsonPath: $.Projects.*.address.doorNo + + - jsonPath: $.Projects.*.address.latitude + + - jsonPath: $.Projects.*.address.longitude + + - jsonPath: $.Projects.*.address.locationAccuracy + + - jsonPath: $.Projects.*.address.type + + - jsonPath: $.Projects.*.address.addressLine1 + + - jsonPath: $.Projects.*.address.addressLine2 + + - jsonPath: $.Projects.*.address.landmark + + - jsonPath: $.Projects.*.address.city + + - jsonPath: $.Projects.*.address.pincode + + - jsonPath: $.Projects.*.address.buildingName + + - jsonPath: $.Projects.*.address.street + + - jsonPath: $.Projects.*.address.boundaryType + + - jsonPath: $.Projects.*.address.boundary + + - jsonPath: $.Projects.*.address.auditDetails.lastModifiedBy + + - jsonPath: $.Projects.*.address.auditDetails.lastModifiedTime + + + - query: INSERT INTO eg_pms_target(id,project_id,beneficiary_type,total_no,target_no,is_deleted,created_by,last_modified_by,created_time,last_modified_time) VALUES (?,?,?,?,?,?,?,?,?,?) ON CONFLICT (id) DO UPDATE SET beneficiary_type = ?, total_no =?, target_no=?, is_deleted=?, last_modified_by=?, last_modified_time=?; + basePath: $.Projects.*.targets.* + jsonMaps: + + - jsonPath: $.Projects.*.targets.*.id + + - jsonPath: $.Projects[*][?({id} in @.targets[*].id)].id + + - jsonPath: $.Projects.*.targets.*.beneficiaryType + + - jsonPath: $.Projects.*.targets.*.totalNo + + - jsonPath: $.Projects.*.targets.*.targetNo + + - jsonPath: $.Projects.*.targets.*.isDeleted + + - jsonPath: $.Projects.*.targets.*.auditDetails.createdBy + + - jsonPath: $.Projects.*.targets.*.auditDetails.lastModifiedBy + + - jsonPath: $.Projects.*.targets.*.auditDetails.createdTime + + - jsonPath: $.Projects.*.targets.*.auditDetails.lastModifiedTime + + - jsonPath: $.Projects.*.targets.*.beneficiaryType + + - jsonPath: $.Projects.*.targets.*.totalNo + + - jsonPath: $.Projects.*.targets.*.targetNo + + - jsonPath: $.Projects.*.targets.*.isDeleted + + - jsonPath: $.Projects.*.targets.*.auditDetails.lastModifiedBy + + - jsonPath: $.Projects.*.targets.*.auditDetails.lastModifiedTime + + + - query: INSERT INTO eg_pms_document(id,project_id,document_type,filestore_id,document_uid,additional_details,status,created_by,last_modified_by,created_time,last_modified_time) VALUES (?,?,?,?,?,?,?,?,?,?,?) ON CONFLICT (id) DO UPDATE SET document_type=?, filestore_id=?, document_uid=?, additional_details=?, status=?, last_modified_by=?, last_modified_time=?; + basePath: $.Projects.*.documents.* + jsonMaps: + + - jsonPath: $.Projects.*.documents.*.id + + - jsonPath: $.Projects[*][?({id} in @.documents[*].id)].id + + - jsonPath: $.Projects.*.documents.*.documentType + + - jsonPath: $.Projects.*.documents.*.fileStore + + - jsonPath: $.Projects.*.documents.*.documentUid + + - jsonPath: $.Projects.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.Projects.*.documents.*.status + + - jsonPath: $.Projects.*.documents.*.auditDetails.createdBy + + - jsonPath: $.Projects.*.documents.*.auditDetails.lastModifiedBy + + - jsonPath: $.Projects.*.documents.*.auditDetails.createdTime + + - jsonPath: $.Projects.*.documents.*.auditDetails.lastModifiedTime + + - jsonPath: $.Projects.*.documents.*.documentType + + - jsonPath: $.Projects.*.documents.*.fileStore + + - jsonPath: $.Projects.*.documents.*.documentUid + + - jsonPath: $.Projects.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.Projects.*.documents.*.status + + - jsonPath: $.Projects.*.documents.*.auditDetails.lastModifiedBy + + - jsonPath: $.Projects.*.documents.*.auditDetails.lastModifiedTime diff --git a/works/egov-persister/project-persister.yml b/works/egov-persister/project-persister.yml new file mode 100644 index 000000000..4f9f0672e --- /dev/null +++ b/works/egov-persister/project-persister.yml @@ -0,0 +1,578 @@ +serviceMaps: + serviceName: project + mappings: + - version: 1.0 + description: Saves a project staff + fromTopic: save-project-staff-topic + isTransaction: true + queryMaps: + - query: INSERT INTO project_staff (id, tenantId, projectId, staffId, startDate, endDate, additionalDetails, createdBy, lastModifiedBy, createdTime, lastModifiedTime, rowVersion, isDeleted) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?); + basePath: $.* + jsonMaps: + - jsonPath: $.*.id + - jsonPath: $.*.tenantId + - jsonPath: $.*.projectId + - jsonPath: $.*.userId + - jsonPath: $.*.startDate + - jsonPath: $.*.endDate + - jsonPath: $.*.additionalFields + type: JSON + dbType: JSONB + - jsonPath: $.*.auditDetails.createdBy + - jsonPath: $.*.auditDetails.lastModifiedBy + - jsonPath: $.*.auditDetails.createdTime + - jsonPath: $.*.auditDetails.lastModifiedTime + - jsonPath: $.*.rowVersion + - jsonPath: $.*.isDeleted + + - version: 1.0 + description: Update Project Staff + fromTopic: update-project-staff-topic + isTransaction: true + queryMaps: + - query: UPDATE project_staff SET projectId=?, staffId=?, startDate=?, endDate=?, additionalDetails=?, lastModifiedBy=?, lastModifiedTime=?, rowVersion=?, isDeleted=? WHERE id = ? + basePath: $.* + jsonMaps: + - jsonPath: $.*.projectId + - jsonPath: $.*.userId + - jsonPath: $.*.startDate + - jsonPath: $.*.endDate + - jsonPath: $.*.additionalFields + type: JSON + dbType: JSONB + - jsonPath: $.*.auditDetails.lastModifiedBy + - jsonPath: $.*.auditDetails.lastModifiedTime + - jsonPath: $.*.rowVersion + - jsonPath: $.*.isDeleted + - jsonPath: $.*.id + + - version: 1.0 + description: Deletes Project Staff + fromTopic: delete-project-staff-topic + isTransaction: true + queryMaps: + - query: UPDATE project_staff SET lastModifiedBy=?, lastModifiedTime=?, rowVersion=?, isDeleted=?, additionalDetails=? WHERE id=?; + basePath: $.* + jsonMaps: + - jsonPath: $.*.auditDetails.lastModifiedBy + - jsonPath: $.*.auditDetails.lastModifiedTime + - jsonPath: $.*.rowVersion + - jsonPath: $.*.isDeleted + - jsonPath: $.*.additionalFields + type: JSON + dbType: JSONB + - jsonPath: $.*.id + + - version: 1.0 + description: Saves a project beneficiary + fromTopic: save-project-beneficiary-topic + isTransaction: true + queryMaps: + - query: INSERT INTO project_beneficiary (id, tenantId, projectId, beneficiaryId, clientReferenceId, beneficiaryClientReferenceId, dateOfRegistration, additionalDetails, createdBy, lastModifiedBy, createdTime, lastModifiedTime, rowVersion, isDeleted) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?); + basePath: $.* + jsonMaps: + - jsonPath: $.*.id + - jsonPath: $.*.tenantId + - jsonPath: $.*.projectId + - jsonPath: $.*.beneficiaryId + - jsonPath: $.*.clientReferenceId + - jsonPath: $.*.beneficiaryClientReferenceId + - jsonPath: $.*.dateOfRegistration + - jsonPath: $.*.additionalFields + type: JSON + dbType: JSONB + - jsonPath: $.*.auditDetails.createdBy + - jsonPath: $.*.auditDetails.lastModifiedBy + - jsonPath: $.*.auditDetails.createdTime + - jsonPath: $.*.auditDetails.lastModifiedTime + - jsonPath: $.*.rowVersion + - jsonPath: $.*.isDeleted + + - version: 1.0 + description: Update Project Beneficiary + fromTopic: update-project-beneficiary-topic + isTransaction: true + queryMaps: + - query: UPDATE project_beneficiary SET projectId=?, beneficiaryId=?, clientReferenceId=?, beneficiaryClientReferenceId=?, dateOfRegistration=?, additionalDetails=?, lastModifiedBy=?, lastModifiedTime=?, rowVersion=?, isDeleted=? WHERE id = ? AND isDeleted=false + basePath: $.* + jsonMaps: + - jsonPath: $.*.projectId + - jsonPath: $.*.beneficiaryId + - jsonPath: $.*.clientReferenceId + - jsonPath: $.*.beneficiaryClientReferenceId + - jsonPath: $.*.dateOfRegistration + - jsonPath: $.*.additionalFields + type: JSON + dbType: JSONB + - jsonPath: $.*.auditDetails.lastModifiedBy + - jsonPath: $.*.auditDetails.lastModifiedTime + - jsonPath: $.*.rowVersion + - jsonPath: $.*.isDeleted + - jsonPath: $.*.id + + - version: 1.0 + description: Deletes Project Beneficiaries + fromTopic: delete-project-beneficiary-topic + isTransaction: true + queryMaps: + - query: UPDATE project_beneficiary SET lastModifiedBy=?, lastModifiedTime=?, rowVersion=?, isDeleted=?, additionalDetails=? WHERE id=?; + basePath: $.* + jsonMaps: + - jsonPath: $.*.auditDetails.lastModifiedBy + - jsonPath: $.*.auditDetails.lastModifiedTime + - jsonPath: $.*.rowVersion + - jsonPath: $.*.isDeleted + - jsonPath: $.*.additionalFields + type: JSON + dbType: JSONB + - jsonPath: $.*.id + + - version: 1.0 + name: Projects + description: Persists project details in project table + fromTopic: save-project + isTransaction: true + queryMaps: + - query: INSERT INTO project(id,tenantId,projectNumber,name,projectType,projectTypeId,projectSubType,department,description,referenceId,startDate,endDate,isTaskEnabled,parent,projectHierarchy,natureOfWork,additionalDetails,isDeleted,rowVersion,createdBy,lastModifiedBy,createdTime,lastModifiedTime) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?); + basePath: $.Projects.* + jsonMaps: + - jsonPath: $.Projects.*.id + + - jsonPath: $.Projects.*.tenantId + + - jsonPath: $.Projects.*.projectNumber + + - jsonPath: $.Projects.*.name + + - jsonPath: $.Projects.*.projectType + + - jsonPath: $.Projects.*.projectTypeId + + - jsonPath: $.Projects.*.projectSubType + + - jsonPath: $.Projects.*.department + + - jsonPath: $.Projects.*.description + + - jsonPath: $.Projects.*.referenceID + + - jsonPath: $.Projects.*.startDate + + - jsonPath: $.Projects.*.endDate + + - jsonPath: $.Projects.*.isTaskEnabled + + - jsonPath: $.Projects.*.parent + + - jsonPath: $.Projects.*.projectHierarchy + + - jsonPath: $.Projects.*.natureOfWork + + - jsonPath: $.Projects.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.Projects.*.isDeleted + + - jsonPath: $.Projects.*.rowVersion + + - jsonPath: $.Projects.*.auditDetails.createdBy + + - jsonPath: $.Projects.*.auditDetails.lastModifiedBy + + - jsonPath: $.Projects.*.auditDetails.createdTime + + - jsonPath: $.Projects.*.auditDetails.lastModifiedTime + + + - query: INSERT INTO project_address(id,tenantId,projectId,doorNo,latitude,longitude,locationAccuracy,type,addressLine1,addressLine2,landmark,city,pinCode,buildingName,street,boundaryType,boundary) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?); + basePath: $.Projects.*.address + jsonMaps: + - jsonPath: $.Projects.*.address.id + + - jsonPath: $.Projects.*.address.tenantId + + - jsonPath: $.Projects.*.id + + - jsonPath: $.Projects.*.address.doorNo + + - jsonPath: $.Projects.*.address.latitude + + - jsonPath: $.Projects.*.address.longitude + + - jsonPath: $.Projects.*.address.locationAccuracy + + - jsonPath: $.Projects.*.address.type + + - jsonPath: $.Projects.*.address.addressLine1 + + - jsonPath: $.Projects.*.address.addressLine2 + + - jsonPath: $.Projects.*.address.landmark + + - jsonPath: $.Projects.*.address.city + + - jsonPath: $.Projects.*.address.pincode + + - jsonPath: $.Projects.*.address.buildingName + + - jsonPath: $.Projects.*.address.street + + - jsonPath: $.Projects.*.address.boundaryType + + - jsonPath: $.Projects.*.address.boundary + + + - query: INSERT INTO project_target(id,projectId,beneficiaryType,totalNo,targetNo,isDeleted,createdBy,lastModifiedBy,createdTime,lastModifiedTime) VALUES (?,?,?,?,?,?,?,?,?,?); + basePath: $.Projects.*.targets.* + jsonMaps: + - jsonPath: $.Projects.*.targets.*.id + + - jsonPath: $.Projects[*][?({id} in @.targets[*].id)].id + + - jsonPath: $.Projects.*.targets.*.beneficiaryType + + - jsonPath: $.Projects.*.targets.*.totalNo + + - jsonPath: $.Projects.*.targets.*.targetNo + + - jsonPath: $.Projects.*.targets.*.isDeleted + + - jsonPath: $.Projects.*.targets.*.auditDetails.createdBy + + - jsonPath: $.Projects.*.targets.*.auditDetails.lastModifiedBy + + - jsonPath: $.Projects.*.targets.*.auditDetails.createdTime + + - jsonPath: $.Projects.*.targets.*.auditDetails.lastModifiedTime + + + - query: INSERT INTO project_document(id,projectId,documentType,filestoreId,documentUid,additionalDetails,status,createdBy,lastModifiedBy,createdTime,lastModifiedTime) VALUES (?,?,?,?,?,?,?,?,?,?,?); + basePath: $.Projects.*.documents.* + jsonMaps: + - jsonPath: $.Projects.*.documents.*.id + + - jsonPath: $.Projects[*][?({id} in @.documents[*].id)].id + + - jsonPath: $.Projects.*.documents.*.documentType + + - jsonPath: $.Projects.*.documents.*.fileStoreId + + - jsonPath: $.Projects.*.documents.*.documentUid + + - jsonPath: $.Projects.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.Projects.*.documents.*.status + + - jsonPath: $.Projects.*.documents.*.auditDetails.createdBy + + - jsonPath: $.Projects.*.documents.*.auditDetails.lastModifiedBy + + - jsonPath: $.Projects.*.documents.*.auditDetails.createdTime + + - jsonPath: $.Projects.*.documents.*.auditDetails.lastModifiedTime + + + - version: 1.0 + name: Projects + description: Updates project details in project table + fromTopic: update-project + isTransaction: true + queryMaps: + - query: UPDATE project SET name = ?, projectType = ?, projectTypeId = ?, projectSubType = ?, department = ?, description = ?, referenceId = ?, startDate = ?, endDate = ?, isTaskEnabled = ?, natureOfWork = ?, additionalDetails = ?, isDeleted = ?, rowVersion = ?, lastModifiedBy = ?, lastModifiedTime = ? WHERE id = ?; + basePath: $.Projects.* + jsonMaps: + + - jsonPath: $.Projects.*.name + + - jsonPath: $.Projects.*.projectType + + - jsonPath: $.Projects.*.projectTypeId + + - jsonPath: $.Projects.*.projectSubType + + - jsonPath: $.Projects.*.department + + - jsonPath: $.Projects.*.description + + - jsonPath: $.Projects.*.referenceID + + - jsonPath: $.Projects.*.startDate + + - jsonPath: $.Projects.*.endDate + + - jsonPath: $.Projects.*.isTaskEnabled + + - jsonPath: $.Projects.*.natureOfWork + + - jsonPath: $.Projects.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.Projects.*.isDeleted + + - jsonPath: $.Projects.*.rowVersion + + - jsonPath: $.Projects.*.auditDetails.lastModifiedBy + + - jsonPath: $.Projects.*.auditDetails.lastModifiedTime + + - jsonPath: $.Projects.*.id + + + - query: UPDATE project_address SET doorNo = ?, latitude=?, longitude=?, locationAccuracy=?, type=?, addressLine1=?, addressLine2=?, landmark=?, city=?, pinCode=?, buildingName=?, street=?, boundaryType=?, boundary=? WHERE id=?; + basePath: $.Projects.*.address + jsonMaps: + + - jsonPath: $.Projects.*.address.doorNo + + - jsonPath: $.Projects.*.address.latitude + + - jsonPath: $.Projects.*.address.longitude + + - jsonPath: $.Projects.*.address.locationAccuracy + + - jsonPath: $.Projects.*.address.type + + - jsonPath: $.Projects.*.address.addressLine1 + + - jsonPath: $.Projects.*.address.addressLine2 + + - jsonPath: $.Projects.*.address.landmark + + - jsonPath: $.Projects.*.address.city + + - jsonPath: $.Projects.*.address.pincode + + - jsonPath: $.Projects.*.address.buildingName + + - jsonPath: $.Projects.*.address.street + + - jsonPath: $.Projects.*.address.boundaryType + + - jsonPath: $.Projects.*.address.boundary + + - jsonPath: $.Projects.*.address.id + + + - query: INSERT INTO project_target(id,projectId,beneficiaryType,totalNo,targetNo,isDeleted,createdBy,lastModifiedBy,createdTime,lastModifiedTime) VALUES (?,?,?,?,?,?,?,?,?,?) ON CONFLICT (id) DO UPDATE SET beneficiaryType = ?, totalNo =?, targetNo=?, isDeleted=?, lastModifiedBy=?, lastModifiedTime=?; + basePath: $.Projects.*.targets.* + jsonMaps: + + - jsonPath: $.Projects.*.targets.*.id + + - jsonPath: $.Projects[*][?({id} in @.targets[*].id)].id + + - jsonPath: $.Projects.*.targets.*.beneficiaryType + + - jsonPath: $.Projects.*.targets.*.totalNo + + - jsonPath: $.Projects.*.targets.*.targetNo + + - jsonPath: $.Projects.*.targets.*.isDeleted + + - jsonPath: $.Projects.*.targets.*.auditDetails.createdBy + + - jsonPath: $.Projects.*.targets.*.auditDetails.lastModifiedBy + + - jsonPath: $.Projects.*.targets.*.auditDetails.createdTime + + - jsonPath: $.Projects.*.targets.*.auditDetails.lastModifiedTime + + - jsonPath: $.Projects.*.targets.*.beneficiaryType + + - jsonPath: $.Projects.*.targets.*.totalNo + + - jsonPath: $.Projects.*.targets.*.targetNo + + - jsonPath: $.Projects.*.targets.*.isDeleted + + - jsonPath: $.Projects.*.targets.*.auditDetails.lastModifiedBy + + - jsonPath: $.Projects.*.targets.*.auditDetails.lastModifiedTime + + + - query: INSERT INTO project_document(id,projectId,documentType,filestoreId,documentUid,additionalDetails,status,createdBy,lastModifiedBy,createdTime,lastModifiedTime) VALUES (?,?,?,?,?,?,?,?,?,?,?) ON CONFLICT (id) DO UPDATE SET documentType=?, filestoreId=?, documentUid=?, additionalDetails=?, status=?, lastModifiedBy=?, lastModifiedTime=?; + basePath: $.Projects.*.documents.* + jsonMaps: + + - jsonPath: $.Projects.*.documents.*.id + + - jsonPath: $.Projects[*][?({id} in @.documents[*].id)].id + + - jsonPath: $.Projects.*.documents.*.documentType + + - jsonPath: $.Projects.*.documents.*.fileStoreId + + - jsonPath: $.Projects.*.documents.*.documentUid + + - jsonPath: $.Projects.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.Projects.*.documents.*.status + + - jsonPath: $.Projects.*.documents.*.auditDetails.createdBy + + - jsonPath: $.Projects.*.documents.*.auditDetails.lastModifiedBy + + - jsonPath: $.Projects.*.documents.*.auditDetails.createdTime + + - jsonPath: $.Projects.*.documents.*.auditDetails.lastModifiedTime + + - jsonPath: $.Projects.*.documents.*.documentType + + - jsonPath: $.Projects.*.documents.*.fileStoreId + + - jsonPath: $.Projects.*.documents.*.documentUid + + - jsonPath: $.Projects.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.Projects.*.documents.*.status + + - jsonPath: $.Projects.*.documents.*.auditDetails.lastModifiedBy + + - jsonPath: $.Projects.*.documents.*.auditDetails.lastModifiedTime + + + - version: 1.0 + description: Saves a project resourcce + fromTopic: save-project-resource-topic + isTransaction: true + queryMaps: + - query: INSERT INTO project_resource (id, tenantId, projectId, productVariantId, isBaseUnitVariant, startDate, endDate, type, createdBy, lastModifiedBy, createdTime, lastModifiedTime, rowVersion, isDeleted) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?); + basePath: $.* + jsonMaps: + - jsonPath: $.*.id + - jsonPath: $.*.tenantId + - jsonPath: $.*.projectId + - jsonPath: $.*.resource.productVariantId + - jsonPath: $.*.resource.isBaseUnitVariant + - jsonPath: $.*.startDate + - jsonPath: $.*.endDate + - jsonPath: $.*.resource.type + - jsonPath: $.*.auditDetails.createdBy + - jsonPath: $.*.auditDetails.lastModifiedBy + - jsonPath: $.*.auditDetails.createdTime + - jsonPath: $.*.auditDetails.lastModifiedTime + - jsonPath: $.*.rowVersion + - jsonPath: $.*.isDeleted + + - version: 1.0 + description: Update a project resourcce + fromTopic: update-project-resource-topic + isTransaction: true + queryMaps: + - query: UPDATE project_resource SET tenantId=?, projectId=?, productVariantId=?, isBaseUnitVariant=?, startDate=?, endDate=?, type=?, lastModifiedBy=?, lastModifiedTime=?, rowVersion=?, isDeleted=? WHERE id = ? + basePath: $.* + jsonMaps: + - jsonPath: $.*.tenantId + - jsonPath: $.*.projectId + - jsonPath: $.*.resource.productVariantId + - jsonPath: $.*.resource.isBaseUnitVariant + - jsonPath: $.*.startDate + - jsonPath: $.*.endDate + - jsonPath: $.*.resource.type + - jsonPath: $.*.auditDetails.lastModifiedBy + - jsonPath: $.*.auditDetails.lastModifiedTime + - jsonPath: $.*.rowVersion + - jsonPath: $.*.isDeleted + - jsonPath: $.*.id + + - version: 1.0 + description: Delete a project resourcce + fromTopic: delete-project-resource-topic + isTransaction: true + queryMaps: + - query: UPDATE project_resource SET lastModifiedBy=?, lastModifiedTime=?, rowVersion=?, isDeleted=?, additionalDetails=? WHERE id = ? + basePath: $.* + jsonMaps: + - jsonPath: $.*.auditDetails.lastModifiedBy + - jsonPath: $.*.auditDetails.lastModifiedTime + - jsonPath: $.*.rowVersion + - jsonPath: $.*.isDeleted + - jsonPath: $.*.additionalFields + type: JSON + dbType: JSONB + - jsonPath: $.*.id + + - version: 1.0 + description: Saves a project facility + fromTopic: save-project-facility-topic + isTransaction: true + queryMaps: + + - query: INSERT INTO project_facility (id, tenantId, projectId, facilityId, additionalDetails, createdBy, lastModifiedBy, createdTime, lastModifiedTime, rowVersion, isDeleted) VALUES (?,?,?,?,?,?,?,?,?,?,?); + basePath: $.* + jsonMaps: + - jsonPath: $.*.id + + - jsonPath: $.*.tenantId + + - jsonPath: $.*.projectId + + - jsonPath: $.*.facilityId + + - jsonPath: $.*.additionalFields + type: JSON + dbType: JSONB + + - jsonPath: $.*.auditDetails.createdBy + + - jsonPath: $.*.auditDetails.lastModifiedBy + + - jsonPath: $.*.auditDetails.createdTime + + - jsonPath: $.*.auditDetails.lastModifiedTime + + - jsonPath: $.*.rowVersion + + - jsonPath: $.*.isDeleted + + - version: 1.0 + description: Update Project Facility + fromTopic: update-project-facility-topic + isTransaction: true + queryMaps: + + - query: UPDATE project_facility SET projectId=?, facilityId=?, additionalDetails=?, lastModifiedBy=?, lastModifiedTime=?, rowVersion=?, isDeleted=? WHERE id = ? + basePath: $.* + jsonMaps: + - jsonPath: $.*.projectId + + - jsonPath: $.*.facilityId + + - jsonPath: $.*.additionalFields + type: JSON + dbType: JSONB + + - jsonPath: $.*.auditDetails.lastModifiedBy + + - jsonPath: $.*.auditDetails.lastModifiedTime + + - jsonPath: $.*.rowVersion + + - jsonPath: $.*.isDeleted + + - jsonPath: $.*.id + + - version: 1.0 + description: Deletes Project Facility + fromTopic: delete-project-facility-topic + isTransaction: true + queryMaps: + - query: UPDATE project_facility SET lastModifiedBy=?, lastModifiedTime=?, rowVersion=?, isDeleted=?, additionalDetails=? WHERE id=?; + basePath: $.* + jsonMaps: + - jsonPath: $.*.auditDetails.lastModifiedBy + - jsonPath: $.*.auditDetails.lastModifiedTime + - jsonPath: $.*.rowVersion + - jsonPath: $.*.isDeleted + - jsonPath: $.*.additionalFields + type: JSON + dbType: JSONB + - jsonPath: $.*.id \ No newline at end of file diff --git a/works/egov-persister/service-request-persister.yml b/works/egov-persister/service-request-persister.yml new file mode 100644 index 000000000..f3a6c07e3 --- /dev/null +++ b/works/egov-persister/service-request-persister.yml @@ -0,0 +1,135 @@ +serviceMaps: + serviceName: service-request + mappings: + - version: 1.0 + description: Persists service definition details in service definition table + fromTopic: save-service-definition + isTransaction: true + queryMaps: + + - query: INSERT INTO eg_service_definition(id, tenantid, code, isactive, createdby, lastmodifiedby, createdtime, lastmodifiedtime, additionaldetails, clientid) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: $.ServiceDefinition + jsonMaps: + - jsonPath: $.ServiceDefinition.id + + - jsonPath: $.ServiceDefinition.tenantId + + - jsonPath: $.ServiceDefinition.code + + - jsonPath: $.ServiceDefinition.isActive + + - jsonPath: $.ServiceDefinition.auditDetails.createdBy + + - jsonPath: $.ServiceDefinition.auditDetails.lastModifiedBy + + - jsonPath: $.ServiceDefinition.auditDetails.createdTime + + - jsonPath: $.ServiceDefinition.auditDetails.lastModifiedTime + + - jsonPath: $.ServiceDefinition.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.ServiceDefinition.clientId + + + - query: INSERT INTO eg_service_attribute_definition(id, referenceid, tenantid, code, datatype, "values", isactive, required, regex, "order", createdby, lastmodifiedby, createdtime, lastmodifiedtime, additionaldetails) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: $.ServiceDefinition.attributes.* + jsonMaps: + - jsonPath: $.ServiceDefinition.attributes.*.id + + - jsonPath: $.ServiceDefinition.attributes.*.referenceId + + - jsonPath: $.ServiceDefinition.attributes.*.tenantId + + - jsonPath: $.ServiceDefinition.attributes.*.code + + - jsonPath: $.ServiceDefinition.attributes.*.dataType + + - jsonPath: $.ServiceDefinition.attributes.*.values + type: ARRAY + dbType: STRING + + - jsonPath: $.ServiceDefinition.attributes.*.isActive + + - jsonPath: $.ServiceDefinition.attributes.*.required + + - jsonPath: $.ServiceDefinition.attributes.*.regex + + - jsonPath: $.ServiceDefinition.attributes.*.order + + - jsonPath: $.ServiceDefinition.attributes.*.auditDetails.createdBy + + - jsonPath: $.ServiceDefinition.attributes.*.auditDetails.lastModifiedBy + + - jsonPath: $.ServiceDefinition.attributes.*.auditDetails.createdTime + + - jsonPath: $.ServiceDefinition.attributes.*.auditDetails.lastModifiedTime + + - jsonPath: $.ServiceDefinition.attributes.*.additionalDetails + type: JSON + dbType: JSONB + + + + + + - version: 1.0 + description: Persists service details in service table + fromTopic: save-service + isTransaction: true + queryMaps: + + + - query: INSERT INTO eg_service(id, tenantid, servicedefid, referenceid, createdby, lastmodifiedby, createdtime, lastmodifiedtime, additionaldetails, accountid, clientid) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: $.Service + jsonMaps: + - jsonPath: $.Service.id + + - jsonPath: $.Service.tenantId + + - jsonPath: $.Service.serviceDefId + + - jsonPath: $.Service.referenceId + + - jsonPath: $.Service.auditDetails.createdBy + + - jsonPath: $.Service.auditDetails.lastModifiedBy + + - jsonPath: $.Service.auditDetails.createdTime + + - jsonPath: $.Service.auditDetails.lastModifiedTime + + - jsonPath: $.Service.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.Service.accountId + + - jsonPath: $.Service.clientId + + + - query: INSERT INTO eg_service_attribute_value(id, referenceid, attributecode, value, createdby, lastmodifiedby, createdtime, lastmodifiedtime, additionaldetails) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: $.Service.attributes.* + jsonMaps: + - jsonPath: $.Service.attributes.*.id + + - jsonPath: $.Service.attributes.*.referenceId + + - jsonPath: $.Service.attributes.*.attributeCode + + - jsonPath: $.Service.attributes.*.value + type: JSON + dbType: JSONB + + - jsonPath: $.Service.attributes.*.auditDetails.createdBy + + - jsonPath: $.Service.attributes.*.auditDetails.lastModifiedBy + + - jsonPath: $.Service.attributes.*.auditDetails.createdTime + + - jsonPath: $.Service.attributes.*.auditDetails.lastModifiedTime + + - jsonPath: $.Service.attributes.*.additionalDetails + type: JSON + dbType: JSONB \ No newline at end of file diff --git a/works/pdf-service/data-config/estimate.json b/works/pdf-service/data-config/estimate.json new file mode 100644 index 000000000..ec6ac9456 --- /dev/null +++ b/works/pdf-service/data-config/estimate.json @@ -0,0 +1,303 @@ +{ + "key": "estimate", + "documentType":"ESTIMATE", + "DataConfigs": { + "moduleName": "rainmaker-common", + "version": "1.0.0", + "baseKeyPath": "$.estimates.*", + "entityIdPath":"$.id", + "isCommonTableBorderRequired": true, + "mappings": [ + { + "topic": "common-pdf-generation-3", + "mappings": [ + { + "direct": [ + { + "variable": "projectId", + "value": { + "path": "$.additionalDetails.projectNumber" + } + }, + { + "variable": "ProjectID", + "value": { + "path": "WORKS_PROJECT_ID" + }, + "type": "label", + "localisation":{ + "required":true, + "prefix": null, + "module":"rainmaker-project" + } + }, + { + "variable": "name", + "value": { + "path": "$.name" + } + }, + { + "variable": "ProjectName", + "value": { + "path": "WORKS_PROJECT_NAME" + }, + "type": "label", + "localisation":{ + "required":true, + "prefix": null, + "module":"rainmaker-project" + } + }, + { + "variable": "description", + "value": { + "path": "$.description" + } + }, + { + "variable": "ProjectDescription", + "value": { + "path": "PROJECT_PROJECT_DESC" + }, + "type": "label", + "localisation":{ + "required":true, + "prefix": null, + "module":"rainmaker-project" + } + }, + { + "variable": "estimateNumber", + "value": { + "path": "$.estimateNumber" + } + }, + { + "variable": "EstimateDetails", + "value": { + "path": "ESTIMATE_DETAILS" + }, + "type": "label", + "localisation":{ + "required":true, + "prefix": null, + "module":"rainmaker-estimate" + } + }, + { + "variable": "SNo", + "value": { + "path": "WORKS_SNO" + }, + "type": "label", + "localisation":{ + "required":true, + "prefix": null, + "module":"rainmaker-common" + } + }, + { + "variable": "EstimateDescription", + "value": { + "path": "PROJECT_DESC" + }, + "type": "label", + "localisation":{ + "required":true, + "prefix": null, + "module":"rainmaker-project" + } + }, + { + "variable": "EstimateRate", + "value": { + "path": "CS_COMMON_RATE" + }, + "type": "label", + "localisation":{ + "required":true, + "prefix": null, + "module":"rainmaker-estimate" + } + }, + { + "variable": "EstimateUOM", + "value": { + "path": "PROJECT_UOM" + }, + "type": "label", + "localisation":{ + "required":true, + "prefix": null, + "module":"rainmaker-estimate" + } + }, + { + "variable": "EstimateQuantity", + "value": { + "path": "WORKS_ESTIMATED_QUANTITY" + }, + "type": "label", + "localisation":{ + "required":true, + "prefix": null, + "module":"rainmaker-estimate" + } + }, + { + "variable": "EstimateAmount", + "value": { + "path": "WORKS_ESTIMATED_AMOUNT" + }, + "type": "label", + "localisation":{ + "required":true, + "prefix": null, + "module":"rainmaker-estimate" + } + }, + { + "variable": "TotalEstimateAmount", + "value": { + "path": "TOTAL_EST_AMOUNT" + }, + "type": "label", + "localisation":{ + "required":true, + "prefix": null, + "module":"rainmaker-estimate" + } + }, + { + "variable": "ServiceName", + "value": { + "path": "ACTION_TEST_ESTIMATE" + }, + "type": "label", + "localisation":{ + "required":true, + "prefix": null, + "module":"rainmaker-common" + } + }, + { + "variable": "Municipal_Corporation", + "value": { + "path": "ULBGRADE_MC1" + }, + "type": "label", + "localisation":{ + "required":true, + "prefix": null, + "module":"rainmaker-common" + } + }, + { + "variable": "pdf_header", + "value": { + "path": "$.tenantId" + }, + "localisation": { + "required": true, + "prefix": "TENANT_TENANTS", + "module": "rainmaker-pg" + } + }, + { + "variable": "minucipality", + "value": { + "path": "MINUCIPALITY" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + + + { + "variable": "estimates", + "value": { + "path": "$.estimateDetails" + }, + "type":"function", + "format": "var y=[],a=[],estimateDetails=arguments[0];function rupeeFormat(amount){flag=0;var count=0;var amount=amount.toString(); var len=amount.length;var val=''; for(var i=len-1;i>=0;i--){ val=amount[i]+val;if(amount[i]=='.'){flag=1;count=-1;val=amount.substring(i,len)};if(count%2==0 && i!=0 && count!=0){val=','+val;};count+=1;};if(flag==0){val+='.00'};return val}; for(var i=0;i=0;i--){ val=amount[i]+val;if(amount[i]=='.'){flag=1;count=-1;val=amount.substring(i,len)};if(count%2==0 && i!=0 && count!=0){val=','+val;};count+=1;};if(flag==0){val+='.00'};return val}; for(var i=0;i=0;i--){ val=amount[i]+val;if(amount[i]=='.'){flag=1;count=-1;val=amount.substring(i,len)};if(count%2==0 && i!=0 && count!=0){val=','+val;};count+=1;};/*if(flag==0){val+='.00'};*/y.push({'amount':val}); return y" + } + + + ] + }, + { + "externalAPI": [ + { + "path": "http://egov-mdms-service:8080/egov-mdms-service/v1/_get", + "queryParam": "moduleName=tenant&masterName=tenants&tenantId=pg&filter=%5B?(@.code=='{$.tenantId}')%5D", + "apiRequest": null, + "responseMapping":[ + { + "variable":"address", + "value":"$.MdmsRes.tenant.tenants[0].address" + }, + { + "variable":"phoneNumber", + "value":"$.MdmsRes.tenant.tenants[0].contactNumber" + }, + { + "variable":"website", + "value":"$.MdmsRes.tenant.tenants[0].domainUrl" + }, + { + "variable":"email", + "value":"$.MdmsRes.tenant.tenants[0].emailId" + }, + { + "variable": "logoImage", + "value":"$.MdmsRes.tenant.tenants[0].logoId", + "type":"image" + }, + { + "variable": "logo-header", + "value":"$.MdmsRes.tenant.tenants[0].code", + "localisation":{ + "required":true, + "module":"rainmaker-common" + } + }, + { + "variable": "subdivision", + "value": "$.MdmsRes.tenant.tenants[0].city.ulbGrade", + "localisation": { + "required": true, + "prefix": "COMMON_SUBDIVISION", + "module": "rainmaker-common" + } + } + ] + } + + ] + } + ] + } + ] + } +} diff --git a/works/pdf-service/data-config/nominal-muster-roll.json b/works/pdf-service/data-config/nominal-muster-roll.json new file mode 100644 index 000000000..f669c4e27 --- /dev/null +++ b/works/pdf-service/data-config/nominal-muster-roll.json @@ -0,0 +1,719 @@ +{ + "key": "nominal-muster-roll", + "documentType": "NOMINAL-MUSTER-ROLL", + "DataConfigs": { + "moduleName": "rainmaker-common", + "version": "1.0.0", + "baseKeyPath": "$.musterRolls.*", + "entityIdPath": "$.id", + "isCommonTableBorderRequired": true, + "mappings": [ + { + "topic": "common-pdf-generation-3", + "mappings": [ + { + "direct": [ + { + "variable": "_total", + "value": { + "path": "COMMON_TOTAL" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "pdf_header", + "value": { + "path": "$.tenantId" + }, + "localisation": { + "required": true, + "prefix": "TENANT_TENANTS", + "module": "rainmaker-pg" + } + }, + { + "variable": "minucipality", + "value": { + "path": "MINUCIPALITY" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "work_order_number", + "value": { + "path": "WORKS_ORDER_NO" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "project_id", + "value": { + "path": "WORKS_PROJECT_ID" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "project_description", + "value": { + "path": "PROJECTS_DESCRIPTION" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "name_of_cbo", + "value": { + "path": "COMMON_NAME_OF_CBO" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "role_of_cbo", + "value": { + "path": "COMMON_ROLE_OF_CBO" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "number_of_wage_seekers", + "value": { + "path": "MUSTER_ROLLS_NO_OF_WAGE_SEEKERS" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-muster-rolls" + } + }, + { + "variable": "days_worked", + "value": { + "path": "MUSTER_ROLLS_DAYS_WORKED" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-muster-rolls" + } + }, + { + "variable": "sun_day", + "value": { + "path": "$.individualEntries[0].attendanceEntries[0].dateMonth" + } + }, + { + "variable": "start_date", + "value": { + "path": "$.startDate" + }, + "type": "date" + }, + { + "variable": "individualEntriesLength", + "value": { + "path": "$.individualEntries" + } + }, + { + "variable": "end_date", + "value": { + "path": "$.endDate" + }, + "type": "date" + }, + { + "variable": "sat_day", + "value": { + "path": "$.individualEntries[0].attendanceEntries[1].dateMonth" + } + }, + { + "variable": "fri_day", + "value": { + "path": "$.individualEntries[0].attendanceEntries[2].dateMonth" + } + }, + { + "variable": "thu_day", + "value": { + "path": "$.individualEntries[0].attendanceEntries[3].dateMonth" + } + }, + { + "variable": "wed_day", + "value": { + "path": "$.individualEntries[0].attendanceEntries[4].dateMonth" + } + }, + { + "variable": "tue_day", + "value": { + "path": "$.individualEntries[0].attendanceEntries[5].dateMonth" + } + }, + { + "variable": "mon_day", + "value": { + "path": "$.individualEntries[0].attendanceEntries[6].dateMonth" + } + }, + { + "variable": "projectDesc", + "value": { + "path": "$.projectDesc" + } + }, + { + "variable": "cboName", + "value": { + "path": "$.cboName" + } + }, + { + "variable": "rollOfCbo", + "value": { + "path": "$.rollOfCbo" + }, + "localisation": { + "required": true, + "prefix": "COMMON_MASTERS", + "module": "rainmaker-common-masters" + } + }, + { + "variable": "days_measured", + "value": { + "path": "MUSTER_ROLLS_DAYS_MEASURED" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-muster-rolls" + } + }, + { + "variable": "period", + "value": { + "path": "MUSTER_ROLL_PERIOD" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-muster-rolls" + } + }, + { + "variable": "per_day_wage", + "value": { + "path": "MUSTER_ROLLS_PER_DAY_WAGE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-muster-rolls" + } + }, + { + "variable": "total_wage", + "value": { + "path": "MUSTER_ROLLS_TOTAL_WAGE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-muster-rolls" + } + }, + { + "variable": "_signature", + "value": { + "path": "MUSTER_ROLLS_SIGNATURE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-muster-rolls" + } + }, + { + "variable": "total_attendance", + "value": { + "path": "MUSTER_ROLLS_TOTAL_ATTENDANCE_IN_DAYS" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-muster-rolls" + } + }, + { + "variable": "musterRollStatus", + "value": { + "path": "$.musterRollStatus" + }, + "localisation": { + "required": true, + "prefix": "MUSTER_ROLLS_STATUS", + "module": "rainmaker-muster-rolls" + } + }, + { + "variable": "projectNumber", + "value": { + "path": "$.musterRollNumber" + } + }, + { + "variable": "projectNumber", + "value": { + "path": "$.musterRollNumber" + } + }, + { + "variable": "nominal_muster_roll", + "value": { + "path": "MUSTER_ROLLS_NOMINAL_MUSTER_ROLL" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-muster-rolls" + } + }, + { + "variable": "quantity_of_work", + "value": { + "path": "MUSTER_ROLLS_QUANTITY_OF_WORK_IN_DAYS" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-muster-rolls" + } + }, + { + "variable": "wage_amount", + "value": { + "path": "MUSTER_ROLLS_WAGE_AMOUNT" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-muster-rolls" + } + }, + { + "variable": "_total", + "value": { + "path": "RT_TOTAL" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "projectType", + "value": { + "path": "$.projectType" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": "COMMON_MASTERS", + "module": "rainmaker-common-masters" + } + }, + { + "variable": "s_no", + "value": { + "path": "WORKS_SNO" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "registration_id", + "value": { + "path": "EXP_REG_ID" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-expenditure" + } + }, + { + "variable": "number_of_the_individual", + "value": { + "path": "ATM_NAME_OF_THE_INDIVIDUAL" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-attendencemgmt" + } + }, + { + "variable": "_mon", + "value": { + "path": "ATM_MON" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-attendencemgmt" + } + }, + { + "variable": "_tue", + "value": { + "path": "ATM_TUE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-attendencemgmt" + } + }, + { + "variable": "_wed", + "value": { + "path": "ATM_WED" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-attendencemgmt" + } + }, + { + "variable": "_thr", + "value": { + "path": "ATM_THR" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-attendencemgmt" + } + }, + { + "variable": "_fri", + "value": { + "path": "ATM_FRI" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-attendencemgmt" + } + }, + { + "variable": "_sat", + "value": { + "path": "ATM_SAT" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-attendencemgmt" + } + }, + { + "variable": "_sun", + "value": { + "path": "ATM_SUN" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-attendencemgmt" + } + }, + { + "variable": "_amount", + "value": { + "path": "ATM_AMOUNT_IN_RS" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-attendencemgmt" + } + }, + { + "variable": "_status", + "value": { + "path": "CORE_COMMON_STATUS" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "bank_account", + "value": { + "path": "ATM_BANK_ACCOUNT_DETAILS" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-attendencemgmt" + } + }, + { + "variable": "aadhar_number", + "value": { + "path": "ATM_WAGE_SEEKER_AADHAR" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-attendencemgmt" + } + }, + { + "variable": "guardian_name", + "value": { + "path": "FATHER_NAME" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "_skill", + "value": { + "path": "MUSTER_ROLLS_CATEGORY_OR_SKILL" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-muster-rolls" + } + }, + { + "variable": "day_worked", + "value": { + "path": "ES_COMMON_SKILL_CATEGORY" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "_signature", + "value": { + "path": "MUSTER_ROLLS_SIGNATURE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-muster-rolls" + } + }, + { + "variable": "contractId", + "value": { + "path": "$.referenceId" + } + }, + { + "variable": "projectId", + "value": { + "path": "$.projectId" + } + }, + { + "variable": "actualTotalAttendance", + "value": { + "path": "$.individualEntries[0].actualTotalAttendance" + } + }, + { + "variable": "mon_day_attendance", + "value": { + "path": "$.individualEntries[0].attendanceEntries[0].attendance" + } + }, + { + "variable": "nominal_muster_roll", + "value": { + "path": "NOMINAL_MUSTER_ROLLS" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-muster-rolls" + } + }, + { + "variable": "arrears", + "value": { + "path": "$.attendanceDetails" + } + }, + { + "variable": "total", + "value": { + "path": "$.attendanceTotal" + } + }, + { + "variable": "totalWageAmount", + "value": { + "path": "$.totalWageAmount" + } + }, + { + "variable": "len", + "value": { + "path": "$.individualEntries" + }, + "type": "function", + "format": " var y=[], x=arguments[0]; if(x){y.push({'len':x.length})}return y;" + } + ] + }, + { + "externalAPI": [ + { + "path": "http://egov-mdms-service:8080/egov-mdms-service/v1/_get", + "queryParam": "moduleName=tenant&masterName=tenants&tenantId=pg&filter=%5B?(@.code=='{$.tenantId}')%5D", + "apiRequest": null, + "responseMapping": [ + { + "variable": "address", + "value": "$.MdmsRes.tenant.tenants[0].address" + }, + { + "variable": "phoneNumber", + "value": "$.MdmsRes.tenant.tenants[0].contactNumber" + }, + { + "variable": "website", + + "value": "$.MdmsRes.tenant.tenants[0].domainUrl" + }, + { + "variable": "email", + "value": "$.MdmsRes.tenant.tenants[0].emailId" + }, + { + "variable": "logoImage", + "value": "$.MdmsRes.tenant.tenants[0].logoId", + "type": "image" + }, + { + "variable": "logo-header", + "value": "$.MdmsRes.tenant.tenants[0].code", + "localisation": { + "required": true, + "prefix": "TENANT_TENANTS", + "module": "rainmaker-pg" + } + }, + { + "variable": "logo-header", + "value": "$.MdmsRes.pdfHeader", + "localisation": { + "required": true, + "prefix": "TENANT_TENANTS", + "module": "rainmaker-pg" + } + }, + { + "variable": "subdivision", + "value": "$.MdmsRes.tenant.tenants[0].city.ulbGrade", + "localisation": { + "required": true, + "prefix": "COMMON_SUBDIVISION", + "module": "rainmaker-common" + } + } + ] + } + ] + } + ] + } + ] + } +} \ No newline at end of file diff --git a/works/pdf-service/data-config/project-detail.json b/works/pdf-service/data-config/project-detail.json new file mode 100644 index 000000000..7ab6c5f81 --- /dev/null +++ b/works/pdf-service/data-config/project-detail.json @@ -0,0 +1,363 @@ +{ + "key": "project-detail", + "documentType": "PROJECT-DETAILS", + "DataConfigs": { + "moduleName": "rainmaker-project", + "version": "1.0.0", + "baseKeyPath": "$.Projects.*", + "entityIdPath": "$.id", + "isCommonTableBorderRequired": true, + "mappings": [ + { + "topic": "common-pdf-generation-3", + "mappings": [ + { + "direct": [ + { + "variable": "pdf_header", + "value": { + "path": "$.tenantId" + }, + "localisation": { + "required": true, + "prefix": "TENANT_TENANTS", + "module": "rainmaker-pg" + } + }, + { + "variable": "minucipality", + "value": { + "path": "MINUCIPALITY" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "projectNumber", + "value": { + "path": "$.projectNumber" + } + }, + { + "variable": "date_of_proposal", + "value": { + "path": "WORKS_DATE_PROPOSAL" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-project" + } + }, + { + "variable": "project_name", + "value": { + "path": "ES_COMMON_PROJECT_NAME" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "project_description", + "value": { + "path": "PROJECT_PROJECT_DESC" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-project" + } + }, + { + "variable": "project_details", + "value": { + "path": "WORKS_PROJECT_DETAILS" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-project" + } + }, + { + "variable": "work_details", + "value": { + "path": "WORKS_WORK_DETAILS" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "letter_reference_or_requirement_number", + "value": { + "path": "PROJECT_LOR" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-project" + } + }, + { + "variable": "project_type", + "value": { + "path": "WORKS_PROJECT_TYPE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-project" + } + }, + { + "variable": "target_demography", + "value": { + "path": "PROJECT_TARGET_DEMOGRAPHY" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-project" + } + }, + { + "variable": "estimated_cost", + "value": { + "path": "PROJECT_ESTIMATED_COST" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-project" + } + }, + { + "variable": "location_details", + "value": { + "path": "WORKS_LOCATION_DETAILS" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "geo_location", + "value": { + "path": "PROJECT_GEO_LOCATION" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "_city", + "value": { + "path": "CORE_COMMON_CITY" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "_ward", + "value": { + "path": "WORKS_WARD" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "_locality", + "value": { + "path": "WORKS_LOCALITY" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + + { + "variable": "dateOfProposal", + "value": { + "path": "$.additionalDetails.dateOfProposal" + }, + "type": "date" + }, + { + "variable": "name", + "value": { + "path": "$.name" + } + }, + { + "variable": "description", + "value": { + "path": "$.description" + } + }, + { + "variable": "referenceID", + "value": { + "path": "$.referenceID" + } + }, + { + "variable": "projectType", + "value": { + "path": "$.projectType" + }, + "localisation": { + "required": true, + "prefix": "COMMON_MASTERS", + "module": "rainmaker-common-masters" + } + }, + { + "variable": "targetDemography", + "value": { + "path": "$.additionalDetails.targetDemography" + }, + "localisation": { + "required": true, + "prefix": "COMMON_MASTERS", + "module": "rainmaker-common-masters" + } + }, + { + "variable": "estimatedCostInRs", + "value": { + "path": "$.additionalDetails.estimatedCostInRs" + }, + "type":"function", + "format":"var y=[];var flag=0;var count=0;var amount=arguments[0]; var len=amount.length;var val=''; for(var i=len-1;i>=0;i--){ val=amount[i]+val;if(amount[i]=='.'){flag=1;count=-1;val=amount.substring(i,len)};if(count%2==0 && i!=0 && count!=0){val=','+val;};count+=1;};if(flag==0){val+='.00'};y.push({'amount':val}); return y" + + }, + { + "variable": "latlong", + "value": { + "path": "$.address.pdfLatlong" + } + }, + { + "variable": "city", + "value": { + "path": "$.address.city" + } + }, + { + "variable": "ward", + "value": { + "path": "$.address.boundary" + } + }, + { + "variable": "boundary", + "value": { + "path": "$.additionalDetails.locality" + } + } + ] + }, + { + "externalAPI": [ + { + "path": "http://egov-mdms-service:8080/egov-mdms-service/v1/_get", + "queryParam": "moduleName=tenant&masterName=tenants&tenantId=pg&filter=%5B?(@.code=='{$.tenantId}')%5D", + "apiRequest": null, + "responseMapping": [ + { + "variable": "address", + "value": "$.MdmsRes.tenant.tenants[0].address" + }, + { + "variable": "address", + "value": "$.MdmsRes.tenant.tenants[0].address" + }, + { + "variable": "phoneNumber", + "value": "$.MdmsRes.tenant.tenants[0].contactNumber" + }, + { + "variable": "website", + "value": "$.MdmsRes.tenant.tenants[0].domainUrl" + }, + { + "variable": "email", + "value": "$.MdmsRes.tenant.tenants[0].emailId" + }, + { + "variable": "logoImage", + "value": "$.MdmsRes.tenant.tenants[0].logoId", + "type": "image" + }, + { + "variable": "logo-header", + "value": "$.MdmsRes.tenant.tenants[0].code", + "localisation": { + "required": true, + "prefix": "TENANT_TENANTS", + "module": "rainmaker-pg" + } + }, + { + "variable": "logo-header", + "value": "$.MdmsRes.pdfHeader", + "localisation": { + "required": true, + "prefix": "TENANT_TENANTS", + "module": "rainmaker-pg" + } + }, + { + "variable": "subdivision", + "value": "$.MdmsRes.tenant.tenants[0].city.ulbGrade", + "localisation": { + "required": true, + "prefix": "COMMON_SUBDIVISION", + "module": "rainmaker-common" + } + } + ] + } + ] + } + ] + } + ] + } +} \ No newline at end of file diff --git a/works/pdf-service/data-config/purchase-bill.json b/works/pdf-service/data-config/purchase-bill.json new file mode 100644 index 000000000..847b52dc4 --- /dev/null +++ b/works/pdf-service/data-config/purchase-bill.json @@ -0,0 +1,81 @@ +{ + "key": "purchase-bill", + "documentType": "PURCHASE-BILL", + "DataConfigs": { + "moduleName": "rainmaker-common", + "version": "1.0.0", + "baseKeyPath": "$.Bill.*", + "entityIdPath": "$.id", + "isCommonTableBorderRequired": true, + "mappings": [ + { + "topic": "common-pdf-generation-3", + "mappings": [ + { + "externalAPI": [ + { + "path": "http://egov-mdms-service:8080/egov-mdms-service/v1/_get", + "queryParam": "moduleName=tenant&masterName=tenants&tenantId=pg&filter=%5B?(@.code=='{$.tenantId}')%5D", + "apiRequest": null, + "responseMapping": [ + { + "variable": "address", + "value": "$.MdmsRes.tenant.tenants[0].address" + }, + { + "variable": "address", + "value": "$.MdmsRes.tenant.tenants[0].address" + }, + { + "variable": "phoneNumber", + "value": "$.MdmsRes.tenant.tenants[0].contactNumber" + }, + { + "variable": "website", + "value": "$.MdmsRes.tenant.tenants[0].domainUrl" + }, + { + "variable": "email", + "value": "$.MdmsRes.tenant.tenants[0].emailId" + }, + { + "variable": "logoImage", + "value": "$.MdmsRes.tenant.tenants[0].logoId", + "type": "image" + }, + { + "variable": "logo-header", + "value": "$.MdmsRes.tenant.tenants[0].code", + "localisation": { + "required": true, + "prefix": "TENANT_TENANTS", + "module": "rainmaker-pg" + } + }, + { + "variable": "logo-header", + "value": "$.MdmsRes.pdfHeader", + "localisation": { + "required": true, + "prefix": "TENANT_TENANTS", + "module": "rainmaker-pg" + } + }, + { + "variable": "subdivision", + "value": "$.MdmsRes.tenant.tenants[0].city.ulbGrade", + "localisation": { + "required": true, + "prefix": "COMMON_SUBDIVISION", + "module": "rainmaker-common" + } + } + ] + } + ] + } + ] + } + ] + } +} \ No newline at end of file diff --git a/works/pdf-service/data-config/supervision-bill.json b/works/pdf-service/data-config/supervision-bill.json new file mode 100644 index 000000000..1c6080e1a --- /dev/null +++ b/works/pdf-service/data-config/supervision-bill.json @@ -0,0 +1,81 @@ +{ + "key": "supervision-bill", + "documentType": "SUPERVISION-BILL", + "DataConfigs": { + "moduleName": "rainmaker-common", + "version": "1.0.0", + "baseKeyPath": "$.Bill.*", + "entityIdPath": "$.id", + "isCommonTableBorderRequired": true, + "mappings": [ + { + "topic": "common-pdf-generation-3", + "mappings": [ + { + "externalAPI": [ + { + "path": "http://egov-mdms-service:8080/egov-mdms-service/v1/_get", + "queryParam": "moduleName=tenant&masterName=tenants&tenantId=pg&filter=%5B?(@.code=='{$.tenantId}')%5D", + "apiRequest": null, + "responseMapping": [ + { + "variable": "address", + "value": "$.MdmsRes.tenant.tenants[0].address" + }, + { + "variable": "address", + "value": "$.MdmsRes.tenant.tenants[0].address" + }, + { + "variable": "phoneNumber", + "value": "$.MdmsRes.tenant.tenants[0].contactNumber" + }, + { + "variable": "website", + "value": "$.MdmsRes.tenant.tenants[0].domainUrl" + }, + { + "variable": "email", + "value": "$.MdmsRes.tenant.tenants[0].emailId" + }, + { + "variable": "logoImage", + "value": "$.MdmsRes.tenant.tenants[0].logoId", + "type": "image" + }, + { + "variable": "logo-header", + "value": "$.MdmsRes.tenant.tenants[0].code", + "localisation": { + "required": true, + "prefix": "TENANT_TENANTS", + "module": "rainmaker-pg" + } + }, + { + "variable": "logo-header", + "value": "$.MdmsRes.pdfHeader", + "localisation": { + "required": true, + "prefix": "TENANT_TENANTS", + "module": "rainmaker-pg" + } + }, + { + "variable": "subdivision", + "value": "$.MdmsRes.tenant.tenants[0].city.ulbGrade", + "localisation": { + "required": true, + "prefix": "COMMON_SUBDIVISION", + "module": "rainmaker-common" + } + } + ] + } + ] + } + ] + } + ] + } +} \ No newline at end of file diff --git a/works/pdf-service/data-config/wage-bill.json b/works/pdf-service/data-config/wage-bill.json new file mode 100644 index 000000000..e230bf449 --- /dev/null +++ b/works/pdf-service/data-config/wage-bill.json @@ -0,0 +1,283 @@ +{ + "key": "wage-bill", + "documentType": "WAGE-BILL", + "DataConfigs": { + "moduleName": "rainmaker-common", + "version": "1.0.0", + "baseKeyPath": "$.Bill.*", + "entityIdPath": "$.id", + "isCommonTableBorderRequired": true, + "mappings": [ + { + "topic": "common-pdf-generation-3", + "mappings": [ + { + "direct": [ + { + "variable": "muster_roll_period", + "value": { + "path": "ES_COMMON_MUSTER_ROLL_PERIOD" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "muster_roll_id", + "value": { + "path": "ES_COMMON_MUSTER_ROLL_ID" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "beneficiary_details", + "value": { + "path": "COMMON_BENEFICIARY_DETAILS" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "project_description", + "value": { + "path": "PROJECTS_DESCRIPTION" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "project_name", + "value": { + "path": "WORKS_PROJECT_NAME" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "project_sanction_date", + "value": { + "path": "ES_COMMON_PROPOSAL_DATE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "project_details", + "value": { + "path": "WORKS_PROJECT_DETAILS" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "project_id", + "value": { + "path": "WORKS_PROJECT_ID" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "s_no", + "value": { + "path": "WORKS_SNO" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "registration_id", + "value": { + "path": "EXP_REG_ID" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-expenditure" + } + }, + { + "variable": "guardian_name", + "value": { + "path": "FATHER_NAME" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "_total", + "value": { + "path": "COMMON_TOTAL" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "name", + "value": { + "path": "COMMON_NAME" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "total_wage", + "value": { + "path": "MUSTER_ROLLS_TOTAL_WAGE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-muster-rolls" + } + }, + { + "variable": "payable_amount", + "value": { + "path": "COMMON_PAYABLE_AMOUNT" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "rainmaker-common" + } + }, + { + "variable": "len", + "value": { + "path": "$.billDetails" + }, + "type": "function", + "format": "var y=[],x=arguments[0];var total=0; function rupeeFormat(amount){flag=0;var count=0;var amount=amount.toString(); var len=amount.length;var val=''; for(var i=len-1;i>=0;i--){ val=amount[i]+val;if(amount[i]=='.'){flag=1;count=-1;val=amount.substring(i,len)};if(count%2==0 && i!=0 && count!=0){val=','+val;};count+=1;};if(flag==0){val+='.00'};return val}; if(x){for(var i=0;i=0;i--){ val=amount[i]+val;if(amount[i]=='.'){flag=1;count=-1;val=amount.substring(i,len)};if(count%2==0 && i!=0 && count!=0){val=','+val;};count+=1;};if(flag==0){val+='.00'};return val}; if(x){for(var i=0;i=0;i--){ val=amount[i]+val;if(amount[i]=='.'){flag=1;count=-1;val=amount.substring(i,len)};if(count%2==0 && i!=0 && count!=0){val=','+val;};count+=1;};if(flag==0){val+='.00'};y.push({'amount':val}); return y" + }, + { + "variable": "address1", + "value": { + "path": "$.street" + } + }, + { + "variable": "address2", + "value": { + "path": "$.doorNo" + } + }, + { + "variable": "address3", + "value": { + "path": "$.city" + } + }, + { + "variable": "cboAddress", + "value": { + "path": "$.pdfCboAddress" + } + }, + { + "variable": "work_description", + "value": { + "path": "$.additionalDetails.projectName" + } + }, + + + { + "variable": "name_of_the_contact_person", + "value": { + "path": "$.contactName" + } + }, + + { + "variable": "termsAndConditions", + "value": { + "path": "$.additionalDetails.termsAndConditions" + }, + "type":"function", + "format":"var a=[];var conditionNo=0; termsAndConditions=arguments[0]; for(var i=0;i=0;i--){ val=amount[i]+val;if(amount[i]=='.'){flag=1;count=-1;val=amount.substring(i,len)};if(count%2==0 && i!=0 && count!=0){val=','+val;};count+=1;};if(flag==0){val+='.00'};y.push({'amount':val}); return y" + }, + { + "variable": "address1", + "value": { + "path": "$.street" + } + }, + { + "variable": "address2", + "value": { + "path": "$.doorNo" + } + }, + { + "variable": "address3", + "value": { + "path": "$.city" + } + }, + { + "variable": "cboAddress", + "value": { + "path": "$.pdfCboAddress" + } + }, + { + "variable": "work_description", + "value": { + "path": "$.additionalDetails.projectDesc" + } + }, + + + { + "variable": "name_of_the_contact_person", + "value": { + "path": "$.contactName" + } + }, + + { + "variable": "termsAndConditions", + "value": { + "path": "$.additionalDetails.termsAndConditions" + }, + "type":"function", + "format":"var a=[];var conditionNo=0; termsAndConditions=arguments[0]; for(var i=0;i