diff --git a/egov-dss-dashboards/dashboard-analytics/ChartApiConfig.json b/egov-dss-dashboards/dashboard-analytics/ChartApiConfig.json index 634db29..9e9ee03 100644 --- a/egov-dss-dashboards/dashboard-analytics/ChartApiConfig.json +++ b/egov-dss-dashboards/dashboard-analytics/ChartApiConfig.json @@ -424,7 +424,7 @@ "dateRefField": "dataObject.paymentDetails.receiptDate", "requestQueryMap": "{\"wardId\" : \"domainObject.ward.name.keyword\",\r\n \"module\" : \"dataObject.paymentDetails.businessService.keyword\", \n\"tenantId\" : \"dataObject.tenantId\"}", "indexName": "dss-payment_v2", - "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"dataObject.tenantId.keyword\":\"pb.testing\"}},{\"terms\":{\"dataObject.bill.status.keyword\":[\"Cancelled\"]}}],\"must\":[{\"terms\":{\"dataObject.paymentDetails.businessService.keyword\":[\"PT\",\"TL\",\"FSM.TRIP_CHARGES\"]}}]}},\"aggs\":{\"Collections\":{\"date_histogram\":{\"field\":\"dataObject.paymentDetails.receiptDate\",\"interval\":\"intervalvalue\"},\"aggs\":{\"Sum\":{\"sum\":{\"field\":\"dataObject.paymentDetails.bill.billDetails.amountPaid\"}}}}}}}}" + "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"dataObject.tenantId.keyword\":\"pb.testing\"}},{\"terms\":{\"dataObject.bill.status.keyword\":[\"Cancelled\"]}}],\"must\":[{\"terms\":{\"dataObject.paymentDetails.businessService.keyword\":[\"PT\",\"TL\",\"FSM.TRIP_CHARGES\"]}}]}},\"aggs\":{\"Collections\":{\"date_histogram\":{\"field\":\"dataObject.paymentDetails.receiptDate\",\"calendar_interval\":\"intervalvalue\"},\"aggs\":{\"Sum\":{\"sum\":{\"field\":\"dataObject.paymentDetails.bill.billDetails.amountPaid\"}}}}}}}}" } ], "chartType": "line", @@ -436,7 +436,7 @@ "Collections" ], "isCumulative": true, - "interval": "month", + "calendar_interval": "month", "insight": { }, "_comment": " " @@ -953,7 +953,7 @@ "dateRefField": "dataObject.Bill.billDetails.receiptDate", "requestQueryMap": "{\"wardId\" : \"domainObject.ward.name.keyword\",\r\n \"module\" : \"dataObject.Bill.billDetails.businessService.keyword\", \n\"tenantId\" : \"dataObject.tenantId\"}", "indexName": "dss-collection_v2", - "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"dataObject.tenantId.keyword\":\"pb.testing\"}},{\"terms\":{\"dataObject.Bill.billDetails.status.keyword\":[\"Cancelled\"]}}],\"must\":[{\"terms\":{\"dataObject.Bill.billDetails.businessService.keyword\":[\"PT\",\"TL\"]}}]}},\"aggs\":{\"Collections\":{\"date_histogram\":{\"field\":\"dataObject.Bill.billDetails.receiptDate\",\"interval\":\"intervalvalue\"},\"aggs\":{\"Sum\":{\"sum\":{\"field\":\"dataObject.Bill.billDetails.amountPaid\"}}}}}}}}" + "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"dataObject.tenantId.keyword\":\"pb.testing\"}},{\"terms\":{\"dataObject.Bill.billDetails.status.keyword\":[\"Cancelled\"]}}],\"must\":[{\"terms\":{\"dataObject.Bill.billDetails.businessService.keyword\":[\"PT\",\"TL\"]}}]}},\"aggs\":{\"Collections\":{\"date_histogram\":{\"field\":\"dataObject.Bill.billDetails.receiptDate\",\"calendar_interval\":\"intervalvalue\"},\"aggs\":{\"Sum\":{\"sum\":{\"field\":\"dataObject.Bill.billDetails.amountPaid\"}}}}}}}}" } ], "chartType": "line", @@ -965,7 +965,7 @@ "Collections" ], "isCumulative": true, - "interval": "month", + "calendar_interval": "month", "insight": { }, "_comment": " " @@ -1346,14 +1346,14 @@ "dateRefField": "Data.@timestamp", "requestQueryMap": "{\"wardId\" : \"Data.ward.name.keyword\", \r\n \"district\" : \"Data.tenantData.city.districtCode\", \r\n\"tenantId\" : \"Data.tenantId.keyword\" \r\n}", "indexName": "ptindex-v1", - "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Total Application\":{\"date_histogram\":{\"field\":\"Data.@timestamp\",\"interval\":\"intervalvalue\"},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.propertyId.keyword\"}}}},\"Closed Application\":{\"date_histogram\":{\"field\":\"Data.@timestamp\",\"interval\":\"intervalvalue\"},\"aggs\":{\"Applications Closed\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.status.keyword\":[\"closed\",\"resolved\"]}}]}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.propertyId.keyword\"}}}}}}}}}}" + "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Total Application\":{\"date_histogram\":{\"field\":\"Data.@timestamp\",\"calendar_interval\":\"intervalvalue\"},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.propertyId.keyword\"}}}},\"Closed Application\":{\"date_histogram\":{\"field\":\"Data.@timestamp\",\"calendar_interval\":\"intervalvalue\"},\"aggs\":{\"Applications Closed\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.status.keyword\":[\"closed\",\"resolved\"]}}]}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.propertyId.keyword\"}}}}}}}}}}" }, { "module": "TL", "dateRefField": "Data.tradelicense.applicationdate", "requestQueryMap": "{\"wardId\" : \"Data.ward.name.keyword\", \r\n \"district\" : \"Data.tenantData.city.districtCode\", \r\n\"tenantId\" : \"Data.tradelicense.tenantid.keyword\" \r\n}", "indexName": "tlindex-v1", - "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tradelicense.tenantid.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Total Application\":{\"date_histogram\":{\"field\":\"Data.tradelicense.applicationdate\",\"interval\":\"intervalvalue\"},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.tradelicense.applicationnumber.keyword\"}}}},\"Closed Application\":{\"date_histogram\":{\"field\":\"Data.tradelicense.applicationdate\",\"interval\":\"intervalvalue\"},\"aggs\":{\"Applications Closed\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.status.keyword\":[\"closed\",\"resolved\"]}}]}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.tradelicense.applicationnumber.keyword\"}}}}}}}}}}" + "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tradelicense.tenantid.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Total Application\":{\"date_histogram\":{\"field\":\"Data.tradelicense.applicationdate\",\"calendar_interval\":\"intervalvalue\"},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.tradelicense.applicationnumber.keyword\"}}}},\"Closed Application\":{\"date_histogram\":{\"field\":\"Data.tradelicense.applicationdate\",\"calendar_interval\":\"intervalvalue\"},\"aggs\":{\"Applications Closed\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.status.keyword\":[\"closed\",\"resolved\"]}}]}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.tradelicense.applicationnumber.keyword\"}}}}}}}}}}" }, { @@ -1361,7 +1361,7 @@ "dateRefField": "Data.dateOfComplaint", "requestQueryMap": "{\"wardId\" : \"Data.complaintWard.name.keyword\", \r\n \"district\" : \"Data.tenantData.city.districtCode\", \r\n\"tenantId\" : \"Data.tenantId\" \r\n}", "indexName": "pgrindex-v1", - "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Total Application\":{\"date_histogram\":{\"field\":\"Data.dateOfComplaint\",\"interval\":\"intervalvalue\"},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.tenantId.keyword\"}}}},\"Closed Application\":{\"date_histogram\":{\"field\":\"Data.dateOfComplaint\",\"interval\":\"intervalvalue\"},\"aggs\":{\"Applications Closed\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.status.keyword\":[\"closed\",\"resolved\"]}}]}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.dateOfComplaint\"}}}}}}}}}}" + "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Total Application\":{\"date_histogram\":{\"field\":\"Data.dateOfComplaint\",\"calendar_interval\":\"intervalvalue\"},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.tenantId.keyword\"}}}},\"Closed Application\":{\"date_histogram\":{\"field\":\"Data.dateOfComplaint\",\"calendar_interval\":\"intervalvalue\"},\"aggs\":{\"Applications Closed\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.status.keyword\":[\"closed\",\"resolved\"]}}]}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.dateOfComplaint\"}}}}}}}}}}" }, { @@ -1369,7 +1369,7 @@ "dateRefField": "Data.@timestamp", "requestQueryMap": "{\"wardId\" : \"Data.ward.name.keyword\", \r\n \"district\" : \"Data.tenantData.city.districtCode\", \r\n\"tenantId\" : \"Data.fsm.tenantid.keyword\" \r\n}", "indexName": "fsm", - "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.fsm.tenantid.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Total Application\":{\"date_histogram\":{\"field\":\"Data.@timestamp\",\"interval\":\"intervalvalue\"},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.fsm.applicationNo.keyword\"}}}},\"Closed Application\":{\"date_histogram\":{\"field\":\"Data.@timestamp\",\"interval\":\"intervalvalue\"},\"aggs\":{\"Applications Closed\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.status.keyword\":[\"completed\"]}}]}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.fsm.applicationNo.keyword\"}}}}}}}}}}" + "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.fsm.tenantid.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Total Application\":{\"date_histogram\":{\"field\":\"Data.@timestamp\",\"calendar_interval\":\"intervalvalue\"},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.fsm.applicationNo.keyword\"}}}},\"Closed Application\":{\"date_histogram\":{\"field\":\"Data.@timestamp\",\"calendar_interval\":\"intervalvalue\"},\"aggs\":{\"Applications Closed\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"Data.status.keyword\":[\"completed\"]}}]}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.fsm.applicationNo.keyword\"}}}}}}}}}}" } ], "chartType": "line", @@ -1382,7 +1382,7 @@ "Closed Application" ], "isCumulative": false, - "interval": "month", + "calendar_interval": "month", "insight": { }, "_comment": " " @@ -1656,7 +1656,7 @@ { "module": "PT", "indexName": "ptindex-v1", - "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Collections\":{\"date_histogram\":{\"field\":\"Data.@timestamp\",\"interval\":\"intervalvalue\"},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.propertyDetails.assessmentNumber.keyword\"}}}}}}}}", + "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Collections\":{\"date_histogram\":{\"field\":\"Data.@timestamp\",\"calendar_interval\":\"intervalvalue\"},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.propertyDetails.assessmentNumber.keyword\"}}}}}}}}", "requestQueryMap": "{\"wardId\" : \"Data.ward.name.keyword\", \"tenantId\" : \"Data.tenantId\" ,\"district\" : \"Data.tenantData.city.districtCode\"}", "dateRefField": "Data.@timestamp" } @@ -1670,7 +1670,7 @@ "Collections" ], "isCumulative": true, - "interval": "week", + "calendar_interval": "week", "insight": { }, "_comment": " totol properties having assessmentNumber " @@ -2572,14 +2572,14 @@ { "module": "TL", "indexName": "tlindex-v1", - "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tradelicense.tenantid.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Trade Licence Issued\":{\"date_histogram\":{\"field\":\"Data.tradelicense.issueddate\",\"interval\":\"intervalvalue\"},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.tradelicense.licensenumber.keyword\"}}}}}}}}", + "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tradelicense.tenantid.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Trade Licence Issued\":{\"date_histogram\":{\"field\":\"Data.tradelicense.issueddate\",\"calendar_interval\":\"intervalvalue\"},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.tradelicense.licensenumber.keyword\"}}}}}}}}", "requestQueryMap": "{\"wardId\" : \"Data.ward.name.keyword\", \"tenantId\" : \"Data.tenantData.code\" ,\"district\" : \"Data.tenantData.city.districtCode\"}", "dateRefField": "Data.tradelicense.issueddate" }, { "module": "TL", "indexName": "tlindex-v1", - "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tradelicense.tenantid.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Total Application\":{\"date_histogram\":{\"field\":\"Data.tradelicense.applicationdate\",\"interval\":\"intervalvalue\"},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.tradelicense.applicationnumber.keyword\"}}}}}}}}", + "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tradelicense.tenantid.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Total Application\":{\"date_histogram\":{\"field\":\"Data.tradelicense.applicationdate\",\"calendar_interval\":\"intervalvalue\"},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.tradelicense.applicationnumber.keyword\"}}}}}}}}", "requestQueryMap": "{\"wardId\" : \"Data.ward.name.keyword\", \"tenantId\" : \"Data.tenantData.code\" ,\"district\" : \"Data.tenantData.city.districtCode\"}", "dateRefField": "Data.tradelicense.applicationdate" } @@ -2594,7 +2594,7 @@ "Total Application" ], "isCumulative": true, - "interval": "month", + "calendar_interval": "month", "insight": { }, "_comment": " Total Number of License having issued" @@ -3314,7 +3314,7 @@ "dateRefField": "Data.dateOfComplaint", "requestQueryMap": "{\"wardId\" : \"Data.complaintWard.name.keyword\",\"tenantId\" : \"Data.tenantId\"}", "indexName": "pgrindex-v1", - "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Total Complaints\":{\"date_histogram\":{\"field\":\"Data.dateOfComplaint\",\"interval\":\"intervalvalue\"},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.tenantId.keyword\"}}}},\"Closed Complaints\":{\"date_histogram\":{\"field\":\"Data.dateOfComplaint\",\"interval\":\"intervalvalue\"},\"aggs\":{\"Closed\":{\"filter\":{\"terms\":{\"Data.status.keyword\":[\"closed\",\"rejected\",\"resolved\"]}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.tenantId.keyword\"}}}}}},\"Reopened Complaints\":{\"date_histogram\":{\"field\":\"Data.dateOfComplaint\",\"interval\":\"intervalvalue\"},\"aggs\":{\"Reopened\":{\"filter\":{\"terms\":{\"Data.status.keyword\":[\"reopened\"]}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.tenantId.keyword\"}}}}}}}}}}" + "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Total Complaints\":{\"date_histogram\":{\"field\":\"Data.dateOfComplaint\",\"calendar_interval\":\"intervalvalue\"},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.tenantId.keyword\"}}}},\"Closed Complaints\":{\"date_histogram\":{\"field\":\"Data.dateOfComplaint\",\"calendar_interval\":\"intervalvalue\"},\"aggs\":{\"Closed\":{\"filter\":{\"terms\":{\"Data.status.keyword\":[\"closed\",\"rejected\",\"resolved\"]}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.tenantId.keyword\"}}}}}},\"Reopened Complaints\":{\"date_histogram\":{\"field\":\"Data.dateOfComplaint\",\"calendar_interval\":\"intervalvalue\"},\"aggs\":{\"Reopened\":{\"filter\":{\"terms\":{\"Data.status.keyword\":[\"reopened\"]}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.tenantId.keyword\"}}}}}}}}}}" } ], "chartType": "line", @@ -3329,7 +3329,7 @@ ], "isCumulative": true, - "interval": "month", + "calendar_interval": "month", "insight": { }, "_comment": " " @@ -3342,7 +3342,7 @@ "dateRefField": "Data.dateOfComplaint", "requestQueryMap": "{\"wardId\" : \"Data.complaintWard.name.keyword\", \"tenantId\" : \"Data.tenantId\"}", "indexName": "pgrindex-v1", - "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Ivr\":{\"date_histogram\":{\"field\":\"Data.dateOfComplaint\",\"interval\":\"intervalvalue\"},\"aggs\":{\"ivr\":{\"filter\":{\"terms\":{\"Data.source.keyword\":[\"ivr\"]}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.dateOfComplaint\"}}}}}},\"Web\":{\"date_histogram\":{\"field\":\"Data.dateOfComplaint\",\"interval\":\"intervalvalue\"},\"aggs\":{\"web\":{\"filter\":{\"terms\":{\"Data.source.keyword\":[\"web\"]}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.dateOfComplaint\"}}}}}},\"Whatsapp\":{\"date_histogram\":{\"field\":\"Data.dateOfComplaint\",\"interval\":\"intervalvalue\"},\"aggs\":{\"whatapp\":{\"filter\":{\"terms\":{\"Data.source.keyword\":[\"whatsapp\"]}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.dateOfComplaint\"}}}}}},\"Mobileapp\":{\"date_histogram\":{\"field\":\"Data.dateOfComplaint\",\"interval\":\"intervalvalue\"},\"aggs\":{\"mobileapp\":{\"filter\":{\"terms\":{\"Data.source.keyword\":[\"mobileapp\"]}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.dateOfComplaint\"}}}}}}}}}}" + "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Ivr\":{\"date_histogram\":{\"field\":\"Data.dateOfComplaint\",\"calendar_interval\":\"intervalvalue\"},\"aggs\":{\"ivr\":{\"filter\":{\"terms\":{\"Data.source.keyword\":[\"ivr\"]}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.dateOfComplaint\"}}}}}},\"Web\":{\"date_histogram\":{\"field\":\"Data.dateOfComplaint\",\"calendar_interval\":\"intervalvalue\"},\"aggs\":{\"web\":{\"filter\":{\"terms\":{\"Data.source.keyword\":[\"web\"]}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.dateOfComplaint\"}}}}}},\"Whatsapp\":{\"date_histogram\":{\"field\":\"Data.dateOfComplaint\",\"calendar_interval\":\"intervalvalue\"},\"aggs\":{\"whatapp\":{\"filter\":{\"terms\":{\"Data.source.keyword\":[\"whatsapp\"]}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.dateOfComplaint\"}}}}}},\"Mobileapp\":{\"date_histogram\":{\"field\":\"Data.dateOfComplaint\",\"calendar_interval\":\"intervalvalue\"},\"aggs\":{\"mobileapp\":{\"filter\":{\"terms\":{\"Data.source.keyword\":[\"mobileapp\"]}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.dateOfComplaint\"}}}}}}}}}}" } ], "chartType": "line", @@ -3357,7 +3357,7 @@ "Mobileapp" ], "isCumulative": false, - "interval": "month", + "calendar_interval": "month", "insight": { }, "_comment": " " @@ -3370,7 +3370,7 @@ "dateRefField": "Data.dateOfComplaint", "requestQueryMap": "{\"wardId\" : \"Data.complaintWard.name.keyword\",\"tenantId\" : \"Data.tenantId\"}", "indexName": "pgrindex-v1", - "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Open\":{\"date_histogram\":{\"field\":\"Data.dateOfComplaint\",\"interval\":\"intervalvalue\"},\"aggs\":{\"open\":{\"filter\":{\"terms\":{\"Data.status.keyword\":[\"open\"]}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.dateOfComplaint\"}}}}}},\"Closed\":{\"date_histogram\":{\"field\":\"Data.dateOfComplaint\",\"interval\":\"intervalvalue\"},\"aggs\":{\"closed\":{\"filter\":{\"terms\":{\"Data.status.keyword\":[\"closed\"]}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.dateOfComplaint\"}}}}}}}}}}" + "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Open\":{\"date_histogram\":{\"field\":\"Data.dateOfComplaint\",\"calendar_interval\":\"intervalvalue\"},\"aggs\":{\"open\":{\"filter\":{\"terms\":{\"Data.status.keyword\":[\"open\"]}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.dateOfComplaint\"}}}}}},\"Closed\":{\"date_histogram\":{\"field\":\"Data.dateOfComplaint\",\"calendar_interval\":\"intervalvalue\"},\"aggs\":{\"closed\":{\"filter\":{\"terms\":{\"Data.status.keyword\":[\"closed\"]}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"Data.dateOfComplaint\"}}}}}}}}}}" } ], "chartType": "line", @@ -3383,7 +3383,7 @@ "Closed" ], "isCumulative": false, - "interval": "month", + "calendar_interval": "month", "insight": { }, "_comment": " " @@ -3848,8 +3848,8 @@ "dateRefField": "Data.@timestamp", "requestQueryMap": "{\"wardId\" : \"Data.complaintWard.name.keyword\", \"tenantId\" : \"Data.tenantId\"}", "indexName": "pgrindex-v1", - "aggrQuery": "{\"aggs\":{\"Complaints Average Turn Around Time (in Days)\":{\"date_histogram\":{\"field\":\"Data.@timestamp\",\"interval\":\"intervalvalue\"},\"aggs\":{\"each_open\":{\"terms\":{\"field\":\"_id\",\"min_doc_count\":0, \"size\":200},\"aggs\":{\"Open_Complaints\":{\"nested\":{\"path\":\"Data.actionHistory.actions\"},\"aggs\":{\"aggrFilter\":{\"filter\":{\"terms\":{\"Data.actionHistory.actions.status.keyword\":[\"open\"]}},\"aggs\":{\"amount\":{\"sum\":{\"field\":\"Data.actionHistory.actions.when\"}}}}}},\"Closed_Complaints\":{\"nested\":{\"path\":\"Data.actionHistory.actions\"},\"aggs\":{\"aggrFilter\":{\"filter\":{\"terms\":{\"Data.actionHistory.actions.status.keyword\":[\"closed\"]}},\"aggs\":{\"amount\":{\"sum\":{\"field\":\"Data.actionHistory.actions.when\"}}}}}},\"computedValueATA\":{\"bucket_script\":{\"buckets_path\":{\"max\":\"Closed_Complaints>aggrFilter>amount\",\"min\":\"Open_Complaints>aggrFilter>amount\"},\"script\":{\"source\":\"params.max-params.min\"}}}}}}}}}", - "aggrQuerybc": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Complaints Average Turn Around Time (in Days)\":{\"date_histogram\":{\"field\":\"Data.@timestamp\",\"interval\":\"intervalvalue\"},\"aggs\":{\"each_open\":{\"terms\":{\"field\":\"_id\",\"min_doc_count\":0},\"aggs\":{\"Open_Complaints\":{\"min\":{\"field\":\"Data.actionHistory.actions.when\"}},\"Closed_Complaints\":{\"max\":{\"field\":\"Data.actionHistory.actions.when\"}},\"computedValueATA\":{\"bucket_script\":{\"buckets_path\":{\"max\":\"Closed_Complaints\",\"min\":\"Open_Complaints\"},\"script\":{\"source\":\"if(params.max == null && params.min == null) {0} else {params.max-params.min}\"}}}}}}}}}}}" + "aggrQuery": "{\"aggs\":{\"Complaints Average Turn Around Time (in Days)\":{\"date_histogram\":{\"field\":\"Data.@timestamp\",\"calendar_interval\":\"intervalvalue\"},\"aggs\":{\"each_open\":{\"terms\":{\"field\":\"_id\",\"min_doc_count\":0, \"size\":200},\"aggs\":{\"Open_Complaints\":{\"nested\":{\"path\":\"Data.actionHistory.actions\"},\"aggs\":{\"aggrFilter\":{\"filter\":{\"terms\":{\"Data.actionHistory.actions.status.keyword\":[\"open\"]}},\"aggs\":{\"amount\":{\"sum\":{\"field\":\"Data.actionHistory.actions.when\"}}}}}},\"Closed_Complaints\":{\"nested\":{\"path\":\"Data.actionHistory.actions\"},\"aggs\":{\"aggrFilter\":{\"filter\":{\"terms\":{\"Data.actionHistory.actions.status.keyword\":[\"closed\"]}},\"aggs\":{\"amount\":{\"sum\":{\"field\":\"Data.actionHistory.actions.when\"}}}}}},\"computedValueATA\":{\"bucket_script\":{\"buckets_path\":{\"max\":\"Closed_Complaints>aggrFilter>amount\",\"min\":\"Open_Complaints>aggrFilter>amount\"},\"script\":{\"source\":\"params.max-params.min\"}}}}}}}}}", + "aggrQuerybc": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Complaints Average Turn Around Time (in Days)\":{\"date_histogram\":{\"field\":\"Data.@timestamp\",\"calendar_interval\":\"intervalvalue\"},\"aggs\":{\"each_open\":{\"terms\":{\"field\":\"_id\",\"min_doc_count\":0},\"aggs\":{\"Open_Complaints\":{\"min\":{\"field\":\"Data.actionHistory.actions.when\"}},\"Closed_Complaints\":{\"max\":{\"field\":\"Data.actionHistory.actions.when\"}},\"computedValueATA\":{\"bucket_script\":{\"buckets_path\":{\"max\":\"Closed_Complaints\",\"min\":\"Open_Complaints\"},\"script\":{\"source\":\"if(params.max == null && params.min == null) {0} else {params.max-params.min}\"}}}}}}}}}}}" } ], "chartType": "line", @@ -3870,7 +3870,7 @@ } ], "isCumulative": false, - "interval": "month", + "calendar_interval": "month", "insight": { }, "_comment": " " @@ -3883,7 +3883,7 @@ "dateRefField": "Data.@timestamp", "requestQueryMap": "{\"wardId\" : \"Data.complaintWard.name.keyword\", \"tenantId\" : \"Data.tenantId\"}", "indexName": "pgrindex-v1", - "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Citizens\":{\"date_histogram\":{\"field\":\"Data.@timestamp\",\"interval\":\"intervalvalue\"},\"aggs\":{\"count\":{\"cardinality\":{\"field\":\"Data.citizen.uuid.keyword\"}}}}}}}}" + "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"Data.tenantId.keyword\":\"pb.testing\"}}]}},\"aggs\":{\"Citizens\":{\"date_histogram\":{\"field\":\"Data.@timestamp\",\"calendar_interval\":\"intervalvalue\"},\"aggs\":{\"count\":{\"cardinality\":{\"field\":\"Data.citizen.uuid.keyword\"}}}}}}}}" } ], "chartType": "line", @@ -3895,7 +3895,7 @@ "Citizens" ], "isCumulative": false, - "interval": "month", + "calendar_interval": "month", "insight": { }, "_comment": " " @@ -4023,7 +4023,7 @@ "dateRefField": "receiptdate", "requestQueryMap": "{\"tenantId\" : \"cityname.keyword\", \"wardId\" : \"block.keyword\"}", "indexName": "receipts-consumers", - "aggrQuery": "{\"aggs\":{\"Water Sewerage\":{\"date_histogram\":{\"field\":\"receiptdate\",\"interval\":\"intervalvalue\"},\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"terms\":{\"status\":[\"Cancelled\"]}}]}},\"aggs\":{\"approved\":{\"sum\":{\"field\":\"totalamount\"}}}}}}}}" + "aggrQuery": "{\"aggs\":{\"Water Sewerage\":{\"date_histogram\":{\"field\":\"receiptdate\",\"calendar_interval\":\"intervalvalue\"},\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"terms\":{\"status\":[\"Cancelled\"]}}]}},\"aggs\":{\"approved\":{\"sum\":{\"field\":\"totalamount\"}}}}}}}}" } ], "translateTenantCode": true, @@ -4036,7 +4036,7 @@ "Water Sewerage" ], "isCumulative": true, - "interval": "month", + "calendar_interval": "month", "insight": { }, "_comment": " " @@ -4634,7 +4634,7 @@ "dateRefField": "@timestamp", "requestQueryMap": "{\"tenantId\" : \"cityname.keyword\", \"wardId\" : \"block.keyword\"}", "indexName": "wsapplications", - "aggrQuery": "{\"aggs\":{\"Water Connections\":{\"date_histogram\":{\"field\":\"@timestamp\",\"interval\":\"intervalvalue\"},\"aggs\":{\"Water\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"servicetype.keyword\":[\"Water Charges\"]}}],\"must_not\":[{\"terms\":{\"applicationstatus.keyword\":[\"Cancelled\"]}}]}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"id.keyword\"}}}}}},\"Sewerage Connections\":{\"date_histogram\":{\"field\":\"@timestamp\",\"interval\":\"intervalvalue\"},\"aggs\":{\"Water\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"servicetype.keyword\":[\"Sewerage Charges\"]}}],\"must_not\":[{\"terms\":{\"applicationstatus.keyword\":[\"Cancelled\"]}}]}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"id.keyword\"}}}}}}}}" + "aggrQuery": "{\"aggs\":{\"Water Connections\":{\"date_histogram\":{\"field\":\"@timestamp\",\"calendar_interval\":\"intervalvalue\"},\"aggs\":{\"Water\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"servicetype.keyword\":[\"Water Charges\"]}}],\"must_not\":[{\"terms\":{\"applicationstatus.keyword\":[\"Cancelled\"]}}]}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"id.keyword\"}}}}}},\"Sewerage Connections\":{\"date_histogram\":{\"field\":\"@timestamp\",\"calendar_interval\":\"intervalvalue\"},\"aggs\":{\"Water\":{\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"servicetype.keyword\":[\"Sewerage Charges\"]}}],\"must_not\":[{\"terms\":{\"applicationstatus.keyword\":[\"Cancelled\"]}}]}},\"aggs\":{\"Count\":{\"value_count\":{\"field\":\"id.keyword\"}}}}}}}}" } ], "translateTenantCode": true, @@ -4649,7 +4649,7 @@ ], "isCumulative": true, - "interval": "month", + "calendar_interval": "month", "insight": { }, "_comment": " " @@ -4869,7 +4869,7 @@ "dateRefField": "dataObject.paymentDetails.receiptDate", "requestQueryMap": "{\"wardId\" : \"domainObject.ward.name.keyword\",\"module\" : \"dataObject.Bill.billDetails.businessService.keyword\", \"tenantId\" : \"dataObject.tenantId\", \"district\" : \"dataObject.tenantData.cityDistrictCode\"}", "indexName": "dss-collection_v2", - "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"bool\":{\"filter\":[{\"term\":{\"dataObject.tenantId.keyword\": \"pb.testing\"}},{\"term\":{\"dataObject.paymentStatus.keyword\": \"CANCELLED\"}},{\"terms\":{\"dataObject.paymentDetails.bill.status.keyword\": [\"Cancelled\"]}}]}}]}},\"aggs\": {\"Water_Service\": {\"filter\": {\"bool\": {\"must\": [{\"terms\": {\"dataObject.paymentDetails.bill.businessService.keyword\": [\"WS\"]}}]}},\"aggs\":{\"WaterService\":{\"date_histogram\":{\"field\": \"dataObject.paymentDetails.receiptDate\",\"interval\": \"month\"},\"aggs\": {\"Count\": {\"sum\": {\"field\": \"dataObject.paymentDetails.bill.billDetails.amountPaid\"}}}}}},\"Expense_Service\": {\"filter\": {\"bool\": {\"must\": [{\"terms\": {\"dataObject.paymentDetails.bill.businessService.keyword\": [\"EXPENSE.OTHERS\", \"EXPENSE.NEW_PIPELINE\", \"EXPENSE.CHLORINATION\", \"EXPENSE.WATER_TREATMENT\", \"EXPENSE.NEW_MACHINERY\", \"EXPENSE.SALARY\", \"EXPENSE.ELECTRICITY_BILL\", \"EXPENSE.PIPELINE_REPAIR\", \"EXPENSE.INCENTIVES\", \"EXPENSE.MACHINERY_REPAIR\"]}}]}},\"aggs\": {\"ExpenseService\": {\"date_histogram\": {\"field\": \"dataObject.paymentDetails.receiptDate\",\"interval\": \"month\"},\"aggs\": {\"Count\": {\"sum\": {\"field\": \"dataObject.paymentDetails.bill.billDetails.amountPaid\"}}}}}}}}}}" + "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"bool\":{\"filter\":[{\"term\":{\"dataObject.tenantId.keyword\": \"pb.testing\"}},{\"term\":{\"dataObject.paymentStatus.keyword\": \"CANCELLED\"}},{\"terms\":{\"dataObject.paymentDetails.bill.status.keyword\": [\"Cancelled\"]}}]}}]}},\"aggs\": {\"Water_Service\": {\"filter\": {\"bool\": {\"must\": [{\"terms\": {\"dataObject.paymentDetails.bill.businessService.keyword\": [\"WS\"]}}]}},\"aggs\":{\"WaterService\":{\"date_histogram\":{\"field\": \"dataObject.paymentDetails.receiptDate\",\"calendar_interval\": \"month\"},\"aggs\": {\"Count\": {\"sum\": {\"field\": \"dataObject.paymentDetails.bill.billDetails.amountPaid\"}}}}}},\"Expense_Service\": {\"filter\": {\"bool\": {\"must\": [{\"terms\": {\"dataObject.paymentDetails.bill.businessService.keyword\": [\"EXPENSE.OTHERS\", \"EXPENSE.NEW_PIPELINE\", \"EXPENSE.CHLORINATION\", \"EXPENSE.WATER_TREATMENT\", \"EXPENSE.NEW_MACHINERY\", \"EXPENSE.SALARY\", \"EXPENSE.ELECTRICITY_BILL\", \"EXPENSE.PIPELINE_REPAIR\", \"EXPENSE.INCENTIVES\", \"EXPENSE.MACHINERY_REPAIR\"]}}]}},\"aggs\": {\"ExpenseService\": {\"date_histogram\": {\"field\": \"dataObject.paymentDetails.receiptDate\",\"calendar_interval\": \"month\"},\"aggs\": {\"Count\": {\"sum\": {\"field\": \"dataObject.paymentDetails.bill.billDetails.amountPaid\"}}}}}}}}}}" } ], "chartType": "line", @@ -4882,7 +4882,7 @@ "ExpenseService" ], "isCumulative": false, - "interval": "month", + "calendar_interval": "month", "insight": {}, "_comment": " " }, @@ -4894,7 +4894,7 @@ "dateRefField": "dataObject.paymentDetails.receiptDate", "requestQueryMap": "{\"wardId\" : \"domainObject.ward.name.keyword\",\"module\" : \"dataObject.Bill.billDetails.businessService.keyword\", \"tenantId\" : \"dataObject.tenantId\", \"district\" : \"dataObject.tenantData.cityDistrictCode\"}", "indexName": "dss-collection_v2", - "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"dataObject.tenantId.keyword\":\"pb.testing\"}},{\"terms\":{\"dataObject.paymentDetails.bill.status.keyword\":[\"Cancelled\"]}}],\"must\":[{\"terms\":{\"dataObject.paymentDetails.bill.businessService.keyword\":[\"WS\",\"EXPENSE.OTHERS\",\"EXPENSE.NEW_PIPELINE\",\"EXPENSE.CHLORINATION\",\"EXPENSE.WATER_TREATMENT\",\"EXPENSE.NEW_MACHINERY\",\"EXPENSE.SALARY\",\"EXPENSE.ELECTRICITY_BILL\",\"EXPENSE.PIPELINE_REPAIR\",\"EXPENSE.INCENTIVES\",\"EXPENSE.MACHINERY_REPAIR\"]}}]}},\"aggs\":{\"WaterService\":{\"date_histogram\":{\"field\":\"dataObject.paymentDetails.receiptDate\",\"interval\":\"month\"},\"aggs\":{\"WaterService\":{\"terms\":{\"field\":\"domainObject.additionalDetails.propertyType.keyword\"},\"aggs\":{\"Count\":{\"sum\":{\"field\":\"dataObject.paymentDetails.bill.billDetails.amountPaid\"}}}}}},\"ExpenseType\":{\"date_histogram\":{\"field\":\"dataObject.paymentDetails.receiptDate\",\"interval\":\"month\"},\"aggs\":{\"ExpenseType\":{\"terms\":{\"field\":\"domainObject.typeOfExpense.keyword\"},\"aggs\":{\"Count\":{\"sum\":{\"field\":\"dataObject.paymentDetails.bill.billDetails.amountPaid\"}}}}}}}}}}" + "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"bool\":{\"must_not\":[{\"term\":{\"dataObject.tenantId.keyword\":\"pb.testing\"}},{\"terms\":{\"dataObject.paymentDetails.bill.status.keyword\":[\"Cancelled\"]}}],\"must\":[{\"terms\":{\"dataObject.paymentDetails.bill.businessService.keyword\":[\"WS\",\"EXPENSE.OTHERS\",\"EXPENSE.NEW_PIPELINE\",\"EXPENSE.CHLORINATION\",\"EXPENSE.WATER_TREATMENT\",\"EXPENSE.NEW_MACHINERY\",\"EXPENSE.SALARY\",\"EXPENSE.ELECTRICITY_BILL\",\"EXPENSE.PIPELINE_REPAIR\",\"EXPENSE.INCENTIVES\",\"EXPENSE.MACHINERY_REPAIR\"]}}]}},\"aggs\":{\"WaterService\":{\"date_histogram\":{\"field\":\"dataObject.paymentDetails.receiptDate\",\"calendar_interval\":\"month\"},\"aggs\":{\"WaterService\":{\"terms\":{\"field\":\"domainObject.additionalDetails.propertyType.keyword\"},\"aggs\":{\"Count\":{\"sum\":{\"field\":\"dataObject.paymentDetails.bill.billDetails.amountPaid\"}}}}}},\"ExpenseType\":{\"date_histogram\":{\"field\":\"dataObject.paymentDetails.receiptDate\",\"calendar_interval\":\"month\"},\"aggs\":{\"ExpenseType\":{\"terms\":{\"field\":\"domainObject.typeOfExpense.keyword\"},\"aggs\":{\"Count\":{\"sum\":{\"field\":\"dataObject.paymentDetails.bill.billDetails.amountPaid\"}}}}}}}}}}" } ], "chartType": "line", @@ -4908,7 +4908,7 @@ "ExpenseType" ], "isCumulative": false, - "interval": "month", + "calendar_interval": "month", "insight": {}, "_comment": " " }, @@ -5054,7 +5054,7 @@ "dateRefField": "Data.eventTime", "requestQueryMap": "{\"ZONE\":\"Data.hierarchyMap.ZONE.keyword\",\"CIRCLE\":\"Data.hierarchyMap.CIRCLE.keyword\",\"Department\":\"Data.hierarchyMap.DEPARTMENT.keyword\",\"GPWSC\":\"Data.hierarchyMap.GPWSC.keyword\",\"DIVISION\":\"Data.hierarchyMap.DIVISION.keyword\",\"SUBDIVISION\":\"Data.hierarchyMap.SUBDIVISION.keyword\",\"SECTION\":\"Data.hierarchyMap.SECTION.keyword\"}", "indexName": "ifix-fiscal-events", - "aggrQuery": "{\"aggs\":{\"Total Collection\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"interval\":\"month\"},\"aggs\":{\"Collection\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Receipt\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.amountDetails.amount\"}}}}}},\"Total Expenditure\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"interval\":\"month\"},\"aggs\":{\"Expenditure\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Payment\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.amountDetails.amount\"}}}}}}}}" + "aggrQuery": "{\"aggs\":{\"Total Collection\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"calendar_interval\":\"month\"},\"aggs\":{\"Collection\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Receipt\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.amountDetails.amount\"}}}}}},\"Total Expenditure\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"calendar_interval\":\"month\"},\"aggs\":{\"Expenditure\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Payment\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.amountDetails.amount\"}}}}}}}}" } ], "chartType": "line", @@ -5068,7 +5068,7 @@ ], "isCumulative": false, - "interval": "month", + "calendar_interval": "month", "insight": { }, "_comment": "" @@ -5081,7 +5081,7 @@ "dateRefField": "Data.eventTime", "requestQueryMap": "{\"ZONE\":\"Data.hierarchyMap.ZONE.keyword\",\"CIRCLE\":\"Data.hierarchyMap.CIRCLE.keyword\",\"Department\":\"Data.hierarchyMap.DEPARTMENT.keyword\",\"GPWSC\":\"Data.hierarchyMap.GPWSC.keyword\",\"DIVISION\":\"Data.hierarchyMap.DIVISION.keyword\",\"SUBDIVISION\":\"Data.hierarchyMap.SUBDIVISION.keyword\",\"SECTION\":\"Data.hierarchyMap.SECTION.keyword\"}", "indexName": "ifix-fiscal-events", - "aggrQuery": "{\"aggs\":{\"Bills\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"interval\":\"month\"},\"aggs\":{\"Bills\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Bill\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.amountDetails.amount\"}}}}}},\"Payments\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"interval\":\"month\"},\"aggs\":{\"Payments\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Payment\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.amountDetails.amount\"}}}}}}}}" + "aggrQuery": "{\"aggs\":{\"Bills\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"calendar_interval\":\"month\"},\"aggs\":{\"Bills\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Bill\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.amountDetails.amount\"}}}}}},\"Payments\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"calendar_interval\":\"month\"},\"aggs\":{\"Payments\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Payment\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.amountDetails.amount\"}}}}}}}}" } ], "chartType": "line", @@ -5095,7 +5095,7 @@ ], "isCumulative": false, - "interval": "month", + "calendar_interval": "month", "insight": { }, "_comment": "" @@ -5108,7 +5108,7 @@ "dateRefField": "Data.eventTime", "requestQueryMap": "{\"ZONE\":\"Data.hierarchyMap.ZONE.keyword\",\"CIRCLE\":\"Data.hierarchyMap.CIRCLE.keyword\",\"Department\":\"Data.hierarchyMap.DEPARTMENT.keyword\",\"GPWSC\":\"Data.hierarchyMap.GPWSC.keyword\",\"DIVISION\":\"Data.hierarchyMap.DIVISION.keyword\",\"SUBDIVISION\":\"Data.hierarchyMap.SUBDIVISION.keyword\",\"SECTION\":\"Data.hierarchyMap.SECTION.keyword\"}", "indexName": "ifix-fiscal-events", - "aggrQuery": "{\"aggs\":{\"Demand\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"interval\":\"month\"},\"aggs\":{\"Bills\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Demand\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.amountDetails.amount\"}}}}}},\"Receipt\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"interval\":\"month\"},\"aggs\":{\"Receipt\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Receipt\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.amountDetails.amount\"}}}}}}}}" + "aggrQuery": "{\"aggs\":{\"Demand\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"calendar_interval\":\"month\"},\"aggs\":{\"Bills\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Demand\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.amountDetails.amount\"}}}}}},\"Receipt\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"calendar_interval\":\"month\"},\"aggs\":{\"Receipt\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Receipt\"]}},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.amountDetails.amount\"}}}}}}}}" } ], "chartType": "line", @@ -5122,7 +5122,7 @@ ], "isCumulative": false, - "interval": "month", + "calendar_interval": "month", "insight": { }, "_comment": "" @@ -5135,7 +5135,7 @@ "dateRefField": "Data.eventTime", "requestQueryMap": "{\"ZONE\":\"Data.hierarchyMap.ZONE.keyword\",\"CIRCLE\":\"Data.hierarchyMap.CIRCLE.keyword\",\"Department\":\"Data.hierarchyMap.DEPARTMENT.keyword\",\"GPWSC\":\"Data.hierarchyMap.GPWSC.keyword\",\"DIVISION\":\"Data.hierarchyMap.DIVISION.keyword\",\"SUBDIVISION\":\"Data.hierarchyMap.SUBDIVISION.keyword\",\"SECTION\":\"Data.hierarchyMap.SECTION.keyword\"}", "indexName": "ifix-fiscal-events", - "aggrQuery": "{\"aggs\":{\"Current Demand\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"interval\":\"month\"},\"aggs\":{\"currentDemandAmount\":{\"sum\":{\"script\":{\"lang\":\"painless\",\"source\":\"long currentDemandAmount=0;if(params['_source']['Data']['eventType']=='Demand'||params['_source']['Data']['eventType']=='Bill'){long currentEventTime=params['_source']['Data']['eventTime'];for(int i=0;i=params['_source']['Data']['amountDetails'][i]['fromBillingPeriod']&¤tEventTime<=params['_source']['Data']['amountDetails'][i]['toBillingPeriod']){currentDemandAmount=currentDemandAmount+params['_source']['Data']['amountDetails'][i]['amount'];}}}return currentDemandAmount;\"}}}}},\"Arrear Demand\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"interval\":\"month\"},\"aggs\":{\"arrearDemandAmount\":{\"sum\":{\"script\":{\"lang\":\"painless\",\"source\":\"long currentDemandAmount=0;if(params['_source']['Data']['eventType']=='Receipt'){long currentEventTime=params['_source']['Data']['eventTime'];for(int i=0;iparams['_source']['Data']['amountDetails'][i]['toBillingPeriod']){currentDemandAmount=currentDemandAmount+params['_source']['Data']['amountDetails'][i]['amount'];}}}return currentDemandAmount;\"}}}}},\"Current Bill\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"interval\":\"month\"},\"aggs\":{\"currentBillAmount\":{\"sum\":{\"script\":{\"lang\":\"painless\",\"source\":\"long currentBillAmount=0;if(params['_source']['Data']['eventType']=='Payment'){long currentEventTime=params['_source']['Data']['eventTime'];for(int i=0;i=params['_source']['Data']['amountDetails'][i]['fromBillingPeriod']){currentBillAmount=currentBillAmount+params['_source']['Data']['amountDetails'][i]['amount'];}}}return currentBillAmount;\"}}}}},\"Old Bill\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"interval\":\"month\"},\"aggs\":{\"oldBillAmount\":{\"sum\":{\"script\":{\"lang\":\"painless\",\"source\":\"long currentBillAmount=0;if(params['_source']['Data']['eventType']=='Payment'){long currentEventTime=params['_source']['Data']['eventTime'];for(int i=0;iparams['_source']['Data']['amountDetails'][i]['toBillingPeriod']){currentBillAmount=currentBillAmount+params['_source']['Data']['amountDetails'][i]['amount'];}}}return currentBillAmount;\"}}}}}}}" + "aggrQuery": "{\"aggs\":{\"Current Demand\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"calendar_interval\":\"month\"},\"aggs\":{\"currentDemandAmount\":{\"sum\":{\"script\":{\"lang\":\"painless\",\"source\":\"long currentDemandAmount=0;if(params['_source']['Data']['eventType']=='Demand'||params['_source']['Data']['eventType']=='Bill'){long currentEventTime=params['_source']['Data']['eventTime'];for(int i=0;i=params['_source']['Data']['amountDetails'][i]['fromBillingPeriod']&¤tEventTime<=params['_source']['Data']['amountDetails'][i]['toBillingPeriod']){currentDemandAmount=currentDemandAmount+params['_source']['Data']['amountDetails'][i]['amount'];}}}return currentDemandAmount;\"}}}}},\"Arrear Demand\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"calendar_interval\":\"month\"},\"aggs\":{\"arrearDemandAmount\":{\"sum\":{\"script\":{\"lang\":\"painless\",\"source\":\"long currentDemandAmount=0;if(params['_source']['Data']['eventType']=='Receipt'){long currentEventTime=params['_source']['Data']['eventTime'];for(int i=0;iparams['_source']['Data']['amountDetails'][i]['toBillingPeriod']){currentDemandAmount=currentDemandAmount+params['_source']['Data']['amountDetails'][i]['amount'];}}}return currentDemandAmount;\"}}}}},\"Current Bill\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"calendar_interval\":\"month\"},\"aggs\":{\"currentBillAmount\":{\"sum\":{\"script\":{\"lang\":\"painless\",\"source\":\"long currentBillAmount=0;if(params['_source']['Data']['eventType']=='Payment'){long currentEventTime=params['_source']['Data']['eventTime'];for(int i=0;i=params['_source']['Data']['amountDetails'][i]['fromBillingPeriod']){currentBillAmount=currentBillAmount+params['_source']['Data']['amountDetails'][i]['amount'];}}}return currentBillAmount;\"}}}}},\"Old Bill\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"calendar_interval\":\"month\"},\"aggs\":{\"oldBillAmount\":{\"sum\":{\"script\":{\"lang\":\"painless\",\"source\":\"long currentBillAmount=0;if(params['_source']['Data']['eventType']=='Payment'){long currentEventTime=params['_source']['Data']['eventTime'];for(int i=0;iparams['_source']['Data']['amountDetails'][i]['toBillingPeriod']){currentBillAmount=currentBillAmount+params['_source']['Data']['amountDetails'][i]['amount'];}}}return currentBillAmount;\"}}}}}}}" } ], @@ -5151,7 +5151,7 @@ "Old Bill" ], "isCumulative": false, - "interval": "month", + "calendar_interval": "month", "insight": { }, "_comment": " " @@ -5164,7 +5164,7 @@ "dateRefField": "Data.eventTime", "requestQueryMap": "{\"ZONE\":\"Data.hierarchyMap.ZONE.keyword\",\"CIRCLE\":\"Data.hierarchyMap.CIRCLE.keyword\",\"Department\":\"Data.hierarchyMap.DEPARTMENT.keyword\",\"GPWSC\":\"Data.hierarchyMap.GPWSC.keyword\",\"DIVISION\":\"Data.hierarchyMap.DIVISION.keyword\",\"SUBDIVISION\":\"Data.hierarchyMap.SUBDIVISION.keyword\",\"SECTION\":\"Data.hierarchyMap.SECTION.keyword\"}", "indexName": "ifix-fiscal-events", - "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Payment\"]}},\"aggs\":{\"Electricity\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"interval\":\"month\"},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.computedFields.electricityHeadAmount\"}}}},\"Operations\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"interval\":\"month\"},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.computedFields.operationsHeadAmount\"}}}},\"Salary\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"interval\":\"month\"},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.computedFields.salaryHeadAmount\"}}}},\"Other\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"interval\":\"month\"},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.computedFields.otherHeadAmount\"}}}}}}}}" + "aggrQuery": "{\"aggs\":{\"AGGR\":{\"filter\":{\"terms\":{\"Data.eventType.keyword\":[\"Payment\"]}},\"aggs\":{\"Electricity\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"calendar_interval\":\"month\"},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.computedFields.electricityHeadAmount\"}}}},\"Operations\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"calendar_interval\":\"month\"},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.computedFields.operationsHeadAmount\"}}}},\"Salary\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"calendar_interval\":\"month\"},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.computedFields.salaryHeadAmount\"}}}},\"Other\":{\"date_histogram\":{\"field\":\"Data.eventTime\",\"calendar_interval\":\"month\"},\"aggs\":{\"Total\":{\"sum\":{\"field\":\"Data.computedFields.otherHeadAmount\"}}}}}}}}" } ], "chartType": "line", @@ -5179,7 +5179,7 @@ "Other" ], "isCumulative": false, - "interval": "month", + "calendar_interval": "month", "insight": { }, "_comment": " " diff --git a/egov-dss-dashboards/dashboard-ingest/egov-expense_v1.json b/egov-dss-dashboards/dashboard-ingest/egov-expense_v1.json new file mode 100644 index 0000000..7811948 --- /dev/null +++ b/egov-dss-dashboards/dashboard-ingest/egov-expense_v1.json @@ -0,0 +1,20 @@ +[ + { + "operation": "shift", + "spec": { + "tenantId": "tenantId", + "challanNo": "challanNo", + "amount": "amount", + "typeOfExpense": "typeOfExpense", + "vendorName": "vendorName", + "businessService": "businessService", + "isBillPaid": "isBillPaid", + "applicationStatus": "applicationStatus", + "additionalDetails": "additionalDetails", + "taxPeriodFrom": "taxPeriodFrom", + "taxPeriodTo": "taxPeriodTo", + "billDate": "billDate", + "paidDate": "paidDate" + } + } +] diff --git a/egov-indexer/billingservices-indexer.yml b/egov-indexer/billingservices-indexer.yml index 852ff36..ef8fcfd 100644 --- a/egov-indexer/billingservices-indexer.yml +++ b/egov-indexer/billingservices-indexer.yml @@ -1,24 +1,181 @@ ServiceMaps: - serviceName: Billing Service - version: 1.0.0 - mappings: - - topic: create-demand-index - configKey: INDEX - indexes: - - name: demandindex-v1 - type: demand - id: $.id, $.tenantId - isBulk: true - jsonPath: $.Demands - timeStampField: $.auditDetail.createdTime - - - topic: demand-reindex - configKey: REINDEX - indexes: - - name: demandindex-v1 - type: demand - id: $.id, $.tenantId - isBulk: true - jsonPath: $.hits - timeStampField: $.auditDetail.createdTime + serviceName: Billing Service + version: 1.0.0 + mappings: + - topic: create-demand-index + configKey: INDEX + indexes: + - name: demandindex-v1 + type: demands + id: $.id, $.tenantId + isBulk: true + jsonPath: $.Demands.* + timeStampField: $.auditDetails.createdTime + customJsonMapping: + indexMapping: { "Data": { "taxPeriodFrom": "", "businessService": "", "minimumAmountPayable": "", "taxPeriodTo": "", "fixedBillExpiryDate": null, "additionalDetails": null, "demandDetails": [], "consumerType": "", "auditDetails": {}, "tenantId": "", "consumerCode": "", "id": "", "billExpiryTime": "", "isPaymentCompleted": "", "status": "", "@timestamp": "", "tenantData": {} }} + fieldMapping: + - inJsonPath: $.taxPeriodFrom + outJsonPath: $.Data.taxPeriodFrom + - inJsonPath: $.businessService + outJsonPath: $.Data.businessService + - inJsonPath: $.minimumAmountPayable + outJsonPath: $.Data.minimumAmountPayable + - inJsonPath: $.taxPeriodTo + outJsonPath: $.Data.taxPeriodTo + - inJsonPath: $.fixedBillExpiryDate + outJsonPath: $.Data.fixedBillExpiryDate + - inJsonPath: $.additionalDetails + outJsonPath: $.Data.additionalDetails + - inJsonPath: $.payer.correspondenceCity + outJsonPath: $.Data.payer.correspondenceCity + - inJsonPath: $.demandDetails + outJsonPath: $.Data.demandDetails + - inJsonPath: $.consumerType + outJsonPath: $.Data.consumerType + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.consumerCode + outJsonPath: $.Data.consumerCode + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.billExpiryTime + outJsonPath: $.Data.billExpiryTime + - inJsonPath: $.isPaymentCompleted + outJsonPath: $.Data.isPaymentCompleted + - inJsonPath: $.status + outJsonPath: $.Data.status + - inJsonPath: $.@timestamp + outJsonPath: $.Data.@timestamp + mdmsMapping: + - path: http://mdms-v2:8080/assam/mdms-v2/v1/_search + moduleName: tenant + masterName: tenants + tenantId: as + filter: "[?(@.code == $tenant)]" + filterMapping: + - variable: $tenant + valueJsonpath: $.tenantId + uriResponseMapping: + - inJsonPath: $.MdmsRes.tenant.tenants + outJsonPath: $.Data.tenantData + - topic: update-demand-index + configKey: INDEX + indexes: + - name: demandindex-v1 + type: demands + id: $.id, $.tenantId + isBulk: true + jsonPath: $.Demands.* + timeStampField: $.auditDetails.lastModifiedTime + customJsonMapping: + indexMapping: { "Data": { "taxPeriodFrom": "", "businessService": "", "minimumAmountPayable": "", "taxPeriodTo": "", "fixedBillExpiryDate": null, "additionalDetails": null, "demandDetails": [ ], "consumerType": "", "auditDetails": { }, "tenantId": "", "consumerCode": "", "id": "", "billExpiryTime": "", "isPaymentCompleted": "", "status": "", "@timestamp": "", "tenantData": { } } } + fieldMapping: + - inJsonPath: $.taxPeriodFrom + outJsonPath: $.Data.taxPeriodFrom + - inJsonPath: $.businessService + outJsonPath: $.Data.businessService + - inJsonPath: $.minimumAmountPayable + outJsonPath: $.Data.minimumAmountPayable + - inJsonPath: $.taxPeriodTo + outJsonPath: $.Data.taxPeriodTo + - inJsonPath: $.fixedBillExpiryDate + outJsonPath: $.Data.fixedBillExpiryDate + - inJsonPath: $.additionalDetails + outJsonPath: $.Data.additionalDetails + - inJsonPath: $.payer.correspondenceCity + outJsonPath: $.Data.payer.correspondenceCity + - inJsonPath: $.demandDetails + outJsonPath: $.Data.demandDetails + - inJsonPath: $.consumerType + outJsonPath: $.Data.consumerType + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.consumerCode + outJsonPath: $.Data.consumerCode + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.billExpiryTime + outJsonPath: $.Data.billExpiryTime + - inJsonPath: $.isPaymentCompleted + outJsonPath: $.Data.isPaymentCompleted + - inJsonPath: $.status + outJsonPath: $.Data.status + - inJsonPath: $.@timestamp + outJsonPath: $.Data.@timestamp + mdmsMapping: + - path: http://mdms-v2:8080/assam/mdms-v2/v1/_search + moduleName: tenant + masterName: tenants + tenantId: as + filter: "[?(@.code == $tenant)]" + filterMapping: + - variable: $tenant + valueJsonpath: $.tenantId + uriResponseMapping: + - inJsonPath: $.MdmsRes.tenant.tenants + outJsonPath: $.Data.tenantData + + + - topic: demand-enrich-legacyindex + configKey: LEGACYINDEX + indexes: + - name: demand-enriched-index + type: demand + id: $.id, $.tenantId + isBulk: true + timeStampField: $.auditDetails.createdTime + jsonPath: $.Demands.* + customJsonMapping: + indexMapping: { "Data": { "taxPeriodFrom": "", "businessService": "", "minimumAmountPayable": "", "taxPeriodTo": "", "fixedBillExpiryDate": null, "additionalDetails": null, "demandDetails": [ ], "consumerType": "", "auditDetails": { }, "tenantId": "", "consumerCode": "", "id": "", "billExpiryTime": "", "isPaymentCompleted": "", "status": "", "@timestamp": "", "tenantData": { } } } + fieldMapping: + - inJsonPath: $.taxPeriodFrom + outJsonPath: $.Data.taxPeriodFrom + - inJsonPath: $.businessService + outJsonPath: $.Data.businessService + - inJsonPath: $.minimumAmountPayable + outJsonPath: $.Data.minimumAmountPayable + - inJsonPath: $.taxPeriodTo + outJsonPath: $.Data.taxPeriodTo + - inJsonPath: $.fixedBillExpiryDate + outJsonPath: $.Data.fixedBillExpiryDate + - inJsonPath: $.additionalDetails + outJsonPath: $.Data.additionalDetails + - inJsonPath: $.payer.correspondenceCity + outJsonPath: $.Data.payer.correspondenceCity + - inJsonPath: $.demandDetails + outJsonPath: $.Data.demandDetails + - inJsonPath: $.consumerType + outJsonPath: $.Data.consumerType + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.consumerCode + outJsonPath: $.Data.consumerCode + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.billExpiryTime + outJsonPath: $.Data.billExpiryTime + - inJsonPath: $.isPaymentCompleted + outJsonPath: $.Data.isPaymentCompleted + - inJsonPath: $.status + outJsonPath: $.Data.status + - inJsonPath: $.@timestamp + outJsonPath: $.Data.@timestamp + mdmsMapping: + - path: http://mdms-v2:8080/assam/mdms-v2/v1/_search + moduleName: tenant + masterName: tenants + tenantId: as + filter: "[?(@.code == $tenant)]" + filterMapping: + - variable: $tenant + valueJsonpath: $.tenantId + uriResponseMapping: + - inJsonPath: $.MdmsRes.tenant.tenants + outJsonPath: $.Data.tenantData \ No newline at end of file diff --git a/egov-indexer/collection-indexer.yml b/egov-indexer/collection-indexer.yml index a669c40..97723cd 100644 --- a/egov-indexer/collection-indexer.yml +++ b/egov-indexer/collection-indexer.yml @@ -12,19 +12,7 @@ ServiceMaps: timeStampField: $.auditDetails.createdDate jsonPath: $.Receipt.* customJsonMapping: - indexMapping: - { - 'Data': - { - 'tenantId': '', - 'transactionId': '', - 'Bill': {}, - 'auditDetails': {}, - 'instrument': {}, - 'tenantData': {}, - '@timestamp': 'timestamp', - }, - } + indexMapping: {"Data":{"tenantId":"","transactionId":"","Bill":{},"auditDetails":{},"instrument":{},"tenantData":{},"@timestamp":"timestamp"}} fieldMapping: - inJsonPath: $.tenantId outJsonPath: $.Data.tenantId @@ -42,8 +30,8 @@ ServiceMaps: - path: http://mdms-v2:8080/assam/mdms-v2/v1/_search moduleName: tenant masterName: tenants - tenantId: pb - filter: '[?(@.code == $tenant)]' + tenantId: as + filter: "[?(@.code == $tenant)]" filterMapping: - variable: $tenant valueJsonpath: $.tenantId @@ -71,19 +59,7 @@ ServiceMaps: timeStampField: $.auditDetails.createdDate jsonPath: $.Receipt.* customJsonMapping: - indexMapping: - { - 'Data': - { - 'tenantId': '', - 'transactionId': '', - 'Bill': {}, - 'auditDetails': {}, - 'instrument': {}, - 'tenantData': {}, - '@timestamp': 'timestamp', - }, - } + indexMapping: {"Data":{"tenantId":"","transactionId":"","Bill":{},"auditDetails":{},"instrument":{},"tenantData":{},"@timestamp":"timestamp"}} fieldMapping: - inJsonPath: $.tenantId outJsonPath: $.Data.tenantId @@ -102,7 +78,7 @@ ServiceMaps: moduleName: tenant masterName: tenants tenantId: as - filter: '[?(@.code == $tenant)]' + filter: "[?(@.code == $tenant)]" filterMapping: - variable: $tenant valueJsonpath: $.tenantId diff --git a/egov-indexer/egov-echallan.yml b/egov-indexer/egov-echallan.yml index de4ff3e..c9dde3e 100644 --- a/egov-indexer/egov-echallan.yml +++ b/egov-indexer/egov-echallan.yml @@ -11,38 +11,7 @@ ServiceMaps: jsonPath: $.Challan timeStampField: $.auditDetails.createdTime customJsonMapping: - indexMapping: - { - 'Data': - { - 'workflow': { 'state': {}, 'action': '', 'assignes': [] }, - 'applicationNo': '', - 'tenantId': '', - 'businessService': '', - 'challanNo': '', - 'referenceId': '', - 'description': '', - 'accountId': '', - 'additionalDetail': {}, - 'source': '', - 'taxPeriodFrom': '', - 'taxPeriodTo': '', - 'amount': [], - 'filestoreid': '', - 'additionalDetails': {}, - 'applicationStatus': '', - 'vendor': '', - 'typeOfExpense': '', - 'billDate': '', - 'billIssuedDate': '', - 'paidDate': '', - 'isBillPaid': '', - 'vendorName': '', - 'totalAmount': '', - '@timestamp': 'timestamp', - 'history': {}, - }, - } + indexMapping: {"Data":{"workflow": {"state": {}, "action": "", "assignes": []},"applicationNo":"","tenantId":"","businessService":"","challanNo":"","referenceId":"","description":"","accountId":"","additionalDetail":{},"source":"","taxPeriodFrom":"","taxPeriodTo":"","amount":[],"filestoreid":"","additionalDetails":{},"applicationStatus":"","vendor":"","typeOfExpense":"","billDate":"","billIssuedDate":"","paidDate":"","isBillPaid":"","vendorName":"","totalAmount":"","tenantData":{},"@timestamp":"timestamp","history":{}}} fieldMapping: - inJsonPath: $.applicationStatus.state outJsonPath: $.Data.workflow.state @@ -98,39 +67,22 @@ ServiceMaps: outJsonPath: $.Data.totalAmount - inJsonPath: $.@timestamp outJsonPath: $.Data.@timestamp + mdmsMapping: + - path: http://mdms-v2:8080/assam/mdms-v2/v1/_search + moduleName: tenant + masterName: tenants + tenantId: as + filter: "[?(@.code == $tenant)]" + filterMapping: + - variable: $tenant + valueJsonpath: $.tenantId + uriResponseMapping: + - inJsonPath: $.MdmsRes.tenant.tenants + outJsonPath: $.Data.tenantData externalUriMapping: - path: http://egov-workflow-v2.assam:8080/egov-workflow-v2/egov-wf/process/_search queryParam: businessIds=$.challanNo,history=true,tenantId=$.tenantId - apiRequest: - { - 'RequestInfo': - { - 'apiId': 'org.egov.echallan', - 'ver': '1.0', - 'ts': 1502890899493, - 'action': 'asd', - 'did': '4354648646', - 'key': 'xyz', - 'msgId': '654654', - 'requesterId': '61', - 'authToken': 'd9994555-7656-4a67-ab3a-a952a0d4dfc8', - 'userInfo': - { - 'id': 1, - 'uuid': '1fec8102-0e02-4d0a-b283-cd80d5dab067', - 'type': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - 'roles': - [ - { - 'name': 'Employee', - 'code': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - }, - ], - }, - }, - } + apiRequest: {"RequestInfo":{"apiId":"org.egov.echallan","ver":"1.0","ts":1502890899493,"action":"asd","did":"4354648646","key":"xyz","msgId":"654654","requesterId":"61","authToken":"d9994555-7656-4a67-ab3a-a952a0d4dfc8","userInfo":{"id":1,"uuid":"1fec8102-0e02-4d0a-b283-cd80d5dab067","type":"EMPLOYEE","tenantId":"pb.amritsar","roles":[{"name":"Employee","code":"EMPLOYEE","tenantId":"pb.amritsar"}]}}} uriResponseMapping: - inJsonPath: $.ProcessInstances outJsonPath: $.Data.history @@ -144,38 +96,7 @@ ServiceMaps: jsonPath: $.Challan timeStampField: $.auditDetails.createdTime customJsonMapping: - indexMapping: - { - 'Data': - { - 'workflow': { 'state': {}, 'action': '', 'assignes': [] }, - 'applicationNo': '', - 'tenantId': '', - 'businessService': '', - 'challanNo': '', - 'referenceId': '', - 'description': '', - 'accountId': '', - 'additionalDetail': {}, - 'source': '', - 'taxPeriodFrom': '', - 'taxPeriodTo': '', - 'amount': [], - 'filestoreid': '', - 'additionalDetails': {}, - 'applicationStatus': '', - 'vendor': '', - 'typeOfExpense': '', - 'billDate': '', - 'billIssuedDate': '', - 'paidDate': '', - 'isBillPaid': '', - 'vendorName': '', - 'totalAmount': '', - '@timestamp': 'timestamp', - 'history': {}, - }, - } + indexMapping: {"Data":{"workflow": {"state": {}, "action": "", "assignes": []},"applicationNo":"","tenantId":"","businessService":"","challanNo":"","referenceId":"","description":"","accountId":"","additionalDetail":{},"source":"","taxPeriodFrom":"","taxPeriodTo":"","amount":[],"filestoreid":"","additionalDetails":{},"applicationStatus":"","vendor":"","typeOfExpense":"","billDate":"","billIssuedDate":"","paidDate":"","isBillPaid":"","vendorName":"","totalAmount":"","tenantData":{},"@timestamp":"timestamp","history":{}}} fieldMapping: - inJsonPath: $.applicationStatus.state outJsonPath: $.Data.workflow.state @@ -231,39 +152,22 @@ ServiceMaps: outJsonPath: $.Data.totalAmount - inJsonPath: $.@timestamp outJsonPath: $.Data.@timestamp + mdmsMapping: + - path: http://mdms-v2:8080/assam/mdms-v2/v1/_search + moduleName: tenant + masterName: tenants + tenantId: as + filter: "[?(@.code == $tenant)]" + filterMapping: + - variable: $tenant + valueJsonpath: $.tenantId + uriResponseMapping: + - inJsonPath: $.MdmsRes.tenant.tenants + outJsonPath: $.Data.tenantData externalUriMapping: - path: http://egov-workflow-v2.assam:8080/egov-workflow-v2/egov-wf/process/_search queryParam: businessIds=$.challanNo,history=true,tenantId=$.tenantId - apiRequest: - { - 'RequestInfo': - { - 'apiId': 'org.egov.echallan', - 'ver': '1.0', - 'ts': 1502890899493, - 'action': 'asd', - 'did': '4354648646', - 'key': 'xyz', - 'msgId': '654654', - 'requesterId': '61', - 'authToken': 'd9994555-7656-4a67-ab3a-a952a0d4dfc8', - 'userInfo': - { - 'id': 1, - 'uuid': '1fec8102-0e02-4d0a-b283-cd80d5dab067', - 'type': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - 'roles': - [ - { - 'name': 'Employee', - 'code': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - }, - ], - }, - }, - } + apiRequest: {"RequestInfo":{"apiId":"org.egov.echallan","ver":"1.0","ts":1502890899493,"action":"asd","did":"4354648646","key":"xyz","msgId":"654654","requesterId":"61","authToken":"d9994555-7656-4a67-ab3a-a952a0d4dfc8","userInfo":{"id":1,"uuid":"1fec8102-0e02-4d0a-b283-cd80d5dab067","type":"EMPLOYEE","tenantId":"pb.amritsar","roles":[{"name":"Employee","code":"EMPLOYEE","tenantId":"pb.amritsar"}]}}} uriResponseMapping: - inJsonPath: $.ProcessInstances outJsonPath: $.Data.history @@ -278,38 +182,7 @@ ServiceMaps: jsonPath: $.challans.* timeStampField: $.auditDetails.createdTime customJsonMapping: - indexMapping: - { - 'Data': - { - 'workflow': { 'state': {}, 'action': '', 'assignes': [] }, - 'applicationNo': '', - 'tenantId': '', - 'businessService': '', - 'challanNo': '', - 'referenceId': '', - 'description': '', - 'accountId': '', - 'additionalDetail': {}, - 'source': '', - 'taxPeriodFrom': '', - 'taxPeriodTo': '', - 'amount': [], - 'filestoreid': '', - 'additionalDetails': {}, - 'applicationStatus': '', - 'vendor': '', - 'typeOfExpense': '', - 'billDate': '', - 'billIssuedDate': '', - 'paidDate': '', - 'isBillPaid': '', - 'vendorName': '', - 'totalAmount': '', - '@timestamp': 'timestamp', - 'history': {}, - }, - } + indexMapping: {"Data":{"workflow": {"state": {}, "action": "", "assignes": []},"applicationNo":"","tenantId":"","businessService":"","challanNo":"","referenceId":"","description":"","accountId":"","additionalDetail":{},"source":"","taxPeriodFrom":"","taxPeriodTo":"","amount":[],"filestoreid":"","additionalDetails":{},"applicationStatus":"","vendor":"","typeOfExpense":"","billDate":"","billIssuedDate":"","paidDate":"","isBillPaid":"","vendorName":"","totalAmount":"","tenantData":{},"@timestamp":"timestamp","history":{}}} fieldMapping: - inJsonPath: $.processInstance.action outJsonPath: $.Data.workflow.action @@ -363,39 +236,22 @@ ServiceMaps: outJsonPath: $.Data.totalAmount - inJsonPath: $.@timestamp outJsonPath: $.Data.@timestamp + mdmsMapping: + - path: http://mdms-v2:8080/assam/mdms-v2/v1/_search + moduleName: tenant + masterName: tenants + tenantId: as + filter: "[?(@.code == $tenant)]" + filterMapping: + - variable: $tenant + valueJsonpath: $.tenantId + uriResponseMapping: + - inJsonPath: $.MdmsRes.tenant.tenants + outJsonPath: $.Data.tenantData externalUriMapping: - path: http://egov-workflow-v2.assam:8080/egov-workflow-v2/egov-wf/process/_search queryParam: businessIds=$.challanNo,history=true,tenantId=$.tenantId - apiRequest: - { - 'RequestInfo': - { - 'apiId': 'org.egov.echallan', - 'ver': '1.0', - 'ts': 1502890899493, - 'action': 'asd', - 'did': '4354648646', - 'key': 'xyz', - 'msgId': '654654', - 'requesterId': '61', - 'authToken': 'd9994555-7656-4a67-ab3a-a952a0d4dfc8', - 'userInfo': - { - 'id': 1, - 'uuid': '1fec8102-0e02-4d0a-b283-cd80d5dab067', - 'type': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - 'roles': - [ - { - 'name': 'Employee', - 'code': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - }, - ], - }, - }, - } + apiRequest: {"RequestInfo":{"apiId":"org.egov.echallan","ver":"1.0","ts":1502890899493,"action":"asd","did":"4354648646","key":"xyz","msgId":"654654","requesterId":"61","authToken":"d9994555-7656-4a67-ab3a-a952a0d4dfc8","userInfo":{"id":1,"uuid":"1fec8102-0e02-4d0a-b283-cd80d5dab067","type":"EMPLOYEE","tenantId":"pb.amritsar","roles":[{"name":"Employee","code":"EMPLOYEE","tenantId":"pb.amritsar"}]}}} uriResponseMapping: - inJsonPath: $.ProcessInstances outJsonPath: $.Data.history diff --git a/egov-indexer/egov-vendor.yaml b/egov-indexer/egov-vendor.yaml index e19d724..9fd1629 100644 --- a/egov-indexer/egov-vendor.yaml +++ b/egov-indexer/egov-vendor.yaml @@ -12,7 +12,7 @@ ServiceMaps: timeStampField: $.auditDetails.createdTime jsonPath: $.vendor customJsonMapping: - indexMapping: { 'Data': { 'vendor': {}, 'tenantData': {} } } + indexMapping: {"Data":{"vendor":{},"tenantData":{}}} fieldMapping: - inJsonPath: $ outJsonPath: $.Data.vendor @@ -21,7 +21,7 @@ ServiceMaps: moduleName: tenant masterName: tenants tenantId: as - filter: '[?(@.code == $tenant)]' + filter: "[?(@.code == $tenant)]" filterMapping: - variable: $tenant valueJsonpath: $.tenantId @@ -39,7 +39,7 @@ ServiceMaps: timeStampField: $.auditDetails.createdTime jsonPath: $.vendor.* customJsonMapping: - indexMapping: { 'Data': { 'vendor': {}, 'tenantData': {} } } + indexMapping: {"Data":{"vendor":{},"tenantData":{}}} fieldMapping: - inJsonPath: $ outJsonPath: $.Data.vendor @@ -48,7 +48,7 @@ ServiceMaps: moduleName: tenant masterName: tenants tenantId: as - filter: '[?(@.code == $tenant)]' + filter: "[?(@.code == $tenant)]" filterMapping: - variable: $tenant valueJsonpath: $.tenantId diff --git a/egov-indexer/hrms-indexer.yml b/egov-indexer/hrms-indexer.yml new file mode 100644 index 0000000..557b1e6 --- /dev/null +++ b/egov-indexer/hrms-indexer.yml @@ -0,0 +1,198 @@ +ServiceMaps: + serviceName: HRMS Service + version: 1.0.0 + mappings: + - topic: save-hrms-employee-index + configKey: INDEX + indexes: + - name: hrmsindex + type: employees + id: $.uuid, $.tenantId + isBulk: true + jsonPath: $.Employees.* + timeStampField: $.auditDetails.createdDate + customJsonMapping: + indexMapping: { "Data": { "serviceHistory": [], "code": "", "assignments": [], "education": [], "documents": [], "isActive": "", "uuid": "", "employeeStatus": "", "deactivationDetails": [], "reactivationDetails": [ ], "employeeType": "", "tests": [], "auditDetails": {}, "dateOfAppointment": "", "tenantId": "", "id": "", "user": {}, "reActivateEmployee" : "", "jurisdictions" : [], "@timestamp":"timestamp", "tenantData":{}} } + fieldMapping: + - inJsonPath: $.serviceHistory + outJsonPath: $.Data.serviceHistory + - inJsonPath: $.code + outJsonPath: $.Data.code + - inJsonPath: $.assignments + outJsonPath: $.Data.assignments + - inJsonPath: $.education + outJsonPath: $.Data.education + - inJsonPath: $.documents + outJsonPath: $.Data.documents + - inJsonPath: $.isActive + outJsonPath: $.Data.isActive + - inJsonPath: $.uuid + outJsonPath: $.Data.uuid + - inJsonPath: $.employeeStatus + outJsonPath: $.Data.employeeStatus + - inJsonPath: $.deactivationDetails + outJsonPath: $.Data.deactivationDetails + - inJsonPath: $.reactivationDetails + outJsonPath: $.Data.reactivationDetails + - inJsonPath: $.employeeType + outJsonPath: $.Data.employeeType + - inJsonPath: $.tests + outJsonPath: $.Data.tests + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails + - inJsonPath: $.dateOfAppointment + outJsonPath: $.Data.dateOfAppointment + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.user + outJsonPath: $.Data.user + - inJsonPath: $.reActivateEmployee + outJsonPath: $.Data.reActivateEmployee + - inJsonPath: $.jurisdictions + outJsonPath: $.Data.jurisdictions + - inJsonPath: $.@timestamp + outJsonPath: $.Data.@timestamp + mdmsMapping: + - path: http://mdms-v2:8080/assam/mdms-v2/v1/_search + moduleName: tenant + masterName: tenants + tenantId: as + filter: "[?(@.code == $tenant)]" + filterMapping: + - variable: $tenant + valueJsonpath: $.tenantId + uriResponseMapping: + - inJsonPath: $.MdmsRes.tenant.tenants + outJsonPath: $.Data.tenantData + + - topic: update-hrms-employee-index + configKey: INDEX + indexes: + - name: hrmsindex + type: employees + id: $.uuid, $.tenantId + isBulk: true + jsonPath: $.Employees.* + timeStampField: $.auditDetails.lastModifiedDate + customJsonMapping: + indexMapping: { "Data": { "serviceHistory": [ ], "code": "", "assignments": [ ], "education": [ ], "documents": [ ], "isActive": "", "uuid": "", "employeeStatus": "", "deactivationDetails": [ ], "reactivationDetails": [ ], "employeeType": "", "tests": [ ], "auditDetails": { }, "dateOfAppointment": "", "tenantId": "", "id": "", "user": {}, "reActivateEmployee": "", "jurisdictions": [], "@timestamp": "timestamp", "tenantData": {} } } + fieldMapping: + - inJsonPath: $.serviceHistory + outJsonPath: $.Data.serviceHistory + - inJsonPath: $.code + outJsonPath: $.Data.code + - inJsonPath: $.assignments + outJsonPath: $.Data.assignments + - inJsonPath: $.education + outJsonPath: $.Data.education + - inJsonPath: $.documents + outJsonPath: $.Data.documents + - inJsonPath: $.isActive + outJsonPath: $.Data.isActive + - inJsonPath: $.uuid + outJsonPath: $.Data.uuid + - inJsonPath: $.employeeStatus + outJsonPath: $.Data.employeeStatus + - inJsonPath: $.deactivationDetails + outJsonPath: $.Data.deactivationDetails + - inJsonPath: $.reactivationDetails + outJsonPath: $.Data.reactivationDetails + - inJsonPath: $.employeeType + outJsonPath: $.Data.employeeType + - inJsonPath: $.tests + outJsonPath: $.Data.tests + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails + - inJsonPath: $.dateOfAppointment + outJsonPath: $.Data.dateOfAppointment + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.user + outJsonPath: $.Data.user + - inJsonPath: $.reActivateEmployee + outJsonPath: $.Data.reActivateEmployee + - inJsonPath: $.jurisdictions + outJsonPath: $.Data.jurisdictions + - inJsonPath: $.@timestamp + outJsonPath: $.Data.@timestamp + mdmsMapping: + - path: http://mdms-v2:8080/assam/mdms-v2/v1/_search + moduleName: tenant + masterName: tenants + tenantId: as + filter: "[?(@.code == $tenant)]" + filterMapping: + - variable: $tenant + valueJsonpath: $.tenantId + uriResponseMapping: + - inJsonPath: $.MdmsRes.tenant.tenants + outJsonPath: $.Data.tenantData + + - topic: hrms-employee-legacyIndex + configKey: LEGACYINDEX + indexes: + - name: hrmsindex + type: employees + id: $.uuid, $.tenantId + isBulk: true + jsonPath: $.Employees.* + timeStampField: $.auditDetails.lastModifiedDate + customJsonMapping: + indexMapping: { "Data": { "serviceHistory": [ ], "code": "", "assignments": [ ], "education": [ ], "documents": [ ], "isActive": "", "uuid": "", "employeeStatus": "", "deactivationDetails": [ ], "reactivationDetails": [ ], "employeeType": "", "tests": [ ], "auditDetails": { }, "dateOfAppointment": "", "tenantId": "", "id": "", "user": {}, "reActivateEmployee": "", "jurisdictions": [], "@timestamp": "timestamp", "tenantData": {} } } + fieldMapping: + - inJsonPath: $.serviceHistory + outJsonPath: $.Data.serviceHistory + - inJsonPath: $.code + outJsonPath: $.Data.code + - inJsonPath: $.assignments + outJsonPath: $.Data.assignments + - inJsonPath: $.education + outJsonPath: $.Data.education + - inJsonPath: $.documents + outJsonPath: $.Data.documents + - inJsonPath: $.isActive + outJsonPath: $.Data.isActive + - inJsonPath: $.uuid + outJsonPath: $.Data.uuid + - inJsonPath: $.employeeStatus + outJsonPath: $.Data.employeeStatus + - inJsonPath: $.deactivationDetails + outJsonPath: $.Data.deactivationDetails + - inJsonPath: $.reactivationDetails + outJsonPath: $.Data.reactivationDetails + - inJsonPath: $.employeeType + outJsonPath: $.Data.employeeType + - inJsonPath: $.tests + outJsonPath: $.Data.tests + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails + - inJsonPath: $.dateOfAppointment + outJsonPath: $.Data.dateOfAppointment + - inJsonPath: $.tenantId + outJsonPath: $.Data.tenantId + - inJsonPath: $.id + outJsonPath: $.Data.id + - inJsonPath: $.user + outJsonPath: $.Data.user + - inJsonPath: $.reActivateEmployee + outJsonPath: $.Data.reActivateEmployee + - inJsonPath: $.jurisdictions + outJsonPath: $.Data.jurisdictions + - inJsonPath: $.@timestamp + outJsonPath: $.Data.@timestamp + mdmsMapping: + - path: http://mdms-v2:8080/assam/mdms-v2/v1/_search + moduleName: tenant + masterName: tenants + tenantId: as + filter: "[?(@.code == $tenant)]" + filterMapping: + - variable: $tenant + valueJsonpath: $.tenantId + uriResponseMapping: + - inJsonPath: $.MdmsRes.tenant.tenants + outJsonPath: $.Data.tenantData \ No newline at end of file diff --git a/egov-indexer/payment-indexer.yml b/egov-indexer/payment-indexer.yml index dbb7aa4..5fbba85 100644 --- a/egov-indexer/payment-indexer.yml +++ b/egov-indexer/payment-indexer.yml @@ -12,25 +12,7 @@ ServiceMaps: timeStampField: $.auditDetails.createdTime jsonPath: $.Payment customJsonMapping: - indexMapping: - { - 'Data': - { - 'tenantId': '', - 'id': '', - 'transactionNumber': '', - 'transactionDate': 1, - 'paymentMode': '', - 'paymentStatus': '', - 'payer': { 'id': '', 'name': '' }, - 'paidBy': '', - 'paymentDetails': {}, - 'auditDetails': {}, - 'additionalDetails': {}, - 'tenantData': {}, - '@timestamp': 'timestamp', - }, - } + indexMapping: {"Data":{"tenantId":"","id":"","transactionNumber":"","transactionDate":1,"paymentMode":"","paymentStatus":"","payer":{"id":"","name":""},"paidBy":"","paymentDetails":{},"auditDetails":{},"additionalDetails":{},"tenantData":{},"@timestamp":"timestamp"}} fieldMapping: - inJsonPath: $.tenantId outJsonPath: $.Data.tenantId @@ -81,25 +63,7 @@ ServiceMaps: timeStampField: $.auditDetails.createdTime jsonPath: $.Payment customJsonMapping: - indexMapping: - { - 'Data': - { - 'tenantId': '', - 'id': '', - 'transactionNumber': '', - 'transactionDate': 1, - 'paymentMode': '', - 'paymentStatus': '', - 'payer': { 'id': '', 'name': '' }, - 'paidBy': '', - 'paymentDetails': {}, - 'auditDetails': {}, - 'additionalDetails': {}, - 'tenantData': {}, - '@timestamp': 'timestamp', - }, - } + indexMapping: {"Data":{"tenantId":"","id":"","transactionNumber":"","transactionDate":1,"paymentMode":"","paymentStatus":"","payer":{"id":"","name":""},"paidBy":"","paymentDetails":{},"auditDetails":{},"additionalDetails":{},"tenantData":{},"@timestamp":"timestamp"}} fieldMapping: - inJsonPath: $.tenantId outJsonPath: $.Data.tenantId @@ -132,7 +96,7 @@ ServiceMaps: moduleName: tenant masterName: tenants tenantId: as - filter: '[?(@.code == $tenant)]' + filter: "[?(@.code == $tenant)]" filterMapping: - variable: $tenant valueJsonpath: $.tenantId @@ -150,25 +114,7 @@ ServiceMaps: timeStampField: $.auditDetails.createdTime jsonPath: $.Payments.* customJsonMapping: - indexMapping: - { - 'Data': - { - 'tenantId': '', - 'id': '', - 'transactionNumber': '', - 'transactionDate': 1, - 'paymentMode': '', - 'paymentStatus': '', - 'payer': { 'id': '', 'name': '' }, - 'paidBy': '', - 'paymentDetails': {}, - 'auditDetails': {}, - 'additionalDetails': {}, - 'tenantData': {}, - '@timestamp': 'timestamp', - }, - } + indexMapping: {"Data":{"tenantId":"","id":"","transactionNumber":"","transactionDate":1,"paymentMode":"","paymentStatus":"","payer":{"id":"","name":""},"paidBy":"","paymentDetails":{},"auditDetails":{},"additionalDetails":{},"tenantData":{},"@timestamp":"timestamp"}} fieldMapping: - inJsonPath: $.tenantId outJsonPath: $.Data.tenantId @@ -201,7 +147,7 @@ ServiceMaps: moduleName: tenant masterName: tenants tenantId: as - filter: '[?(@.code == $tenant)]' + filter: "[?(@.code == $tenant)]" filterMapping: - variable: $tenant valueJsonpath: $.tenantId diff --git a/egov-indexer/property-services.yml b/egov-indexer/property-services.yml index befd2e3..8a4f875 100644 --- a/egov-indexer/property-services.yml +++ b/egov-indexer/property-services.yml @@ -11,37 +11,7 @@ ServiceMaps: jsonPath: $.Property timeStampField: $.auditDetails.lastModifiedTime customJsonMapping: - indexMapping: - { - 'Data': - { - 'ownerNames': [], - 'doorNo': '', - 'street': '', - 'owners': [], - 'acknowldgementNumber': '', - 'propertyType': '', - 'ownershipCategory': '', - 'creationReason': '', - 'usageCategory': '', - 'noOfFloors': '', - 'landArea': '', - 'superBuiltUpArea': '', - 'source': '', - 'channel': '', - 'units': {}, - 'auditDetails': {}, - 'id': '', - 'propertyId': '', - 'surveyId': '', - 'linkedProperties': {}, - 'tenantId': '', - 'accountId': '', - 'oldPropertyId': '', - 'status': '', - '@timestamp': 'timestamp', - }, - } + indexMapping: {"Data":{"ownerNames":[],"doorNo":"","street":"","owners":[],"acknowldgementNumber":"","propertyType":"","ownershipCategory":"","creationReason":"","usageCategory":"","noOfFloors":"","landArea":"","superBuiltUpArea":"","source":"","channel":"","units":{},"auditDetails":{},"id":"","propertyId":"","surveyId":"","linkedProperties":{},"tenantId":"","tenantData":{},"accountId":"","oldPropertyId":"","status":"","@timestamp":"timestamp"}} fieldMapping: - inJsonPath: $.owners.*.name outJsonPath: $.Data.ownerNames @@ -96,57 +66,14 @@ ServiceMaps: externalUriMapping: - path: http://egov-location.assam:8080/assam/egov-location/location/v11/boundarys/_search queryParam: hierarchyTypeCode=REVENUE,boundaryType=Block,codes=$.address.locality.code,tenantId=$.tenantId - apiRequest: - { - 'RequestInfo': - { - 'apiId': 'org.egov.pt', - 'ver': '1.0', - 'ts': 1502890899493, - 'action': 'asd', - 'did': '4354648646', - 'key': 'xyz', - 'msgId': '654654', - 'requesterId': '61', - 'authToken': '02dbe5be-28df-4d82-954f-3d27c56cca7d', - 'userInfo': { 'id': 73 }, - }, - } + apiRequest: {"RequestInfo": {"apiId": "org.egov.pt","ver": "1.0","ts": 1502890899493,"action": "asd","did": "4354648646","key": "xyz","msgId": "654654", "requesterId": "61", + "authToken": "02dbe5be-28df-4d82-954f-3d27c56cca7d","userInfo":{"id":73}}} uriResponseMapping: - inJsonPath: $.TenantBoundary[0].boundary[0] outJsonPath: $.Data.ward - path: http://egov-workflow-v2.assam:8080/egov-workflow-v2/egov-wf/process/_search queryParam: businessIds=$.acknowldgementNumber,history=true,tenantId=$.tenantId - apiRequest: - { - 'RequestInfo': - { - 'apiId': 'org.egov.pt', - 'ver': '1.0', - 'ts': 1502890899493, - 'action': 'asd', - 'did': '4354648646', - 'key': 'xyz', - 'msgId': '654654', - 'requesterId': '61', - 'authToken': 'd9994555-7656-4a67-ab3a-a952a0d4dfc8', - 'userInfo': - { - 'id': 1, - 'uuid': '1fec8102-0e02-4d0a-b283-cd80d5dab067', - 'type': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - 'roles': - [ - { - 'name': 'Employee', - 'code': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - }, - ], - }, - }, - } + apiRequest: {"RequestInfo":{"apiId":"org.egov.pt","ver":"1.0","ts":1502890899493,"action":"asd","did":"4354648646","key":"xyz","msgId":"654654","requesterId":"61","authToken":"d9994555-7656-4a67-ab3a-a952a0d4dfc8","userInfo":{"id":1,"uuid":"1fec8102-0e02-4d0a-b283-cd80d5dab067","type":"EMPLOYEE","tenantId":"pb.amritsar","roles":[{"name":"Employee","code":"EMPLOYEE","tenantId":"pb.amritsar"}]}}} uriResponseMapping: - inJsonPath: $.ProcessInstances outJsonPath: $.Data.history @@ -155,7 +82,7 @@ ServiceMaps: moduleName: tenant masterName: tenants tenantId: as - filter: '[?(@.code == $tenant)]' + filter: "[?(@.code == $tenant)]" filterMapping: - variable: $tenant valueJsonpath: $.tenantId @@ -166,7 +93,7 @@ ServiceMaps: moduleName: PropertyTax masterName: UsageCategory tenantId: as - filter: '[?(@.code == $usageCategory)]' + filter: "[?(@.code == $usageCategory)]" filterMapping: - variable: $usageCategory valueJsonpath: $.usageCategory @@ -180,20 +107,7 @@ ServiceMaps: jsonPath: $.Property timeStampField: $.auditDetails.lastModifiedTime customJsonMapping: - indexMapping: - { - 'Data': - { - 'acknowldgementNumber': '', - 'creationReason': '', - 'auditDetails': {}, - 'propertyId': '', - 'tenantId': '', - 'accountId': '', - 'status': '', - '@timestamp': '', - }, - } + indexMapping: {"Data":{"acknowldgementNumber":"","creationReason":"","auditDetails":{},"propertyId":"","tenantId":"","tenantData":{},"accountId":"","status":"","@timestamp":""}} fieldMapping: - inJsonPath: $.acknowldgementNumber outJsonPath: $.Data.acknowldgementNumber @@ -214,22 +128,8 @@ ServiceMaps: externalUriMapping: - path: http://egov-location.assam:8080/assam/egov-location/location/v11/boundarys/_search queryParam: hierarchyTypeCode=REVENUE,boundaryType=Block,codes=$.address.locality.code,tenantId=$.tenantId - apiRequest: - { - 'RequestInfo': - { - 'apiId': 'org.egov.pt', - 'ver': '1.0', - 'ts': 1502890899493, - 'action': 'asd', - 'did': '4354648646', - 'key': 'xyz', - 'msgId': '654654', - 'requesterId': '61', - 'authToken': '02dbe5be-28df-4d82-954f-3d27c56cca7d', - 'userInfo': { 'id': 73 }, - }, - } + apiRequest: {"RequestInfo": {"apiId": "org.egov.pt","ver": "1.0","ts": 1502890899493,"action": "asd","did": "4354648646","key": "xyz","msgId": "654654", "requesterId": "61", + "authToken": "02dbe5be-28df-4d82-954f-3d27c56cca7d","userInfo":{"id":73}}} uriResponseMapping: - inJsonPath: $.TenantBoundary[0].boundary[0] outJsonPath: $.Data.ward @@ -241,36 +141,7 @@ ServiceMaps: valueJsonpath: $.address.locality.code - path: http://egov-workflow-v2.assam:8080/egov-workflow-v2/egov-wf/process/_search queryParam: businessIds=$.acknowldgementNumber,history=true,tenantId=$.tenantId - apiRequest: - { - 'RequestInfo': - { - 'apiId': 'org.egov.pt', - 'ver': '1.0', - 'ts': 1502890899493, - 'action': 'asd', - 'did': '4354648646', - 'key': 'xyz', - 'msgId': '654654', - 'requesterId': '61', - 'authToken': 'd9994555-7656-4a67-ab3a-a952a0d4dfc8', - 'userInfo': - { - 'id': 1, - 'uuid': '1fec8102-0e02-4d0a-b283-cd80d5dab067', - 'type': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - 'roles': - [ - { - 'name': 'Employee', - 'code': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - }, - ], - }, - }, - } + apiRequest: {"RequestInfo":{"apiId":"org.egov.pt","ver":"1.0","ts":1502890899493,"action":"asd","did":"4354648646","key":"xyz","msgId":"654654","requesterId":"61","authToken":"d9994555-7656-4a67-ab3a-a952a0d4dfc8","userInfo":{"id":1,"uuid":"1fec8102-0e02-4d0a-b283-cd80d5dab067","type":"EMPLOYEE","tenantId":"pb.amritsar","roles":[{"name":"Employee","code":"EMPLOYEE","tenantId":"pb.amritsar"}]}}} uriResponseMapping: - inJsonPath: $.ProcessInstances outJsonPath: $.Data.history @@ -279,7 +150,7 @@ ServiceMaps: moduleName: tenant masterName: tenants tenantId: as - filter: '[?(@.code == $tenant)]' + filter: "[?(@.code == $tenant)]" filterMapping: - variable: $tenant valueJsonpath: $.tenantId @@ -296,37 +167,7 @@ ServiceMaps: jsonPath: $.Property timeStampField: $.auditDetails.lastModifiedTime customJsonMapping: - indexMapping: - { - 'Data': - { - 'ownerNames': [], - 'doorNo': '', - 'street': '', - 'owners': [], - 'acknowldgementNumber': '', - 'propertyType': '', - 'ownershipCategory': '', - 'creationReason': '', - 'usageCategory': '', - 'noOfFloors': '', - 'landArea': '', - 'superBuiltUpArea': '', - 'source': '', - 'channel': '', - 'units': {}, - 'auditDetails': {}, - 'id': '', - 'propertyId': '', - 'surveyId': '', - 'linkedProperties': {}, - 'tenantId': '', - 'accountId': '', - 'oldPropertyId': '', - 'status': '', - '@timestamp': 'timestamp', - }, - } + indexMapping: {"Data":{"ownerNames":[],"doorNo":"","street":"","owners":[],"acknowldgementNumber":"","propertyType":"","ownershipCategory":"","creationReason":"","usageCategory":"","noOfFloors":"","landArea":"","superBuiltUpArea":"","source":"","channel":"","units":{},"auditDetails":{},"id":"","propertyId":"","surveyId":"","linkedProperties":{},"tenantId":"","tenantData":{},"accountId":"","oldPropertyId":"","status":"","@timestamp":"timestamp"}} fieldMapping: - inJsonPath: $.owners.*.name outJsonPath: $.Data.ownerNames @@ -381,57 +222,14 @@ ServiceMaps: externalUriMapping: - path: http://egov-location.assam:8080/assam/egov-location/location/v11/boundarys/_search queryParam: hierarchyTypeCode=REVENUE,boundaryType=Block,codes=$.address.locality.code,tenantId=$.tenantId - apiRequest: - { - 'RequestInfo': - { - 'apiId': 'org.egov.pt', - 'ver': '1.0', - 'ts': 1502890899493, - 'action': 'asd', - 'did': '4354648646', - 'key': 'xyz', - 'msgId': '654654', - 'requesterId': '61', - 'authToken': '02dbe5be-28df-4d82-954f-3d27c56cca7d', - 'userInfo': { 'id': 73 }, - }, - } + apiRequest: {"RequestInfo": {"apiId": "org.egov.pt","ver": "1.0","ts": 1502890899493,"action": "asd","did": "4354648646","key": "xyz","msgId": "654654", "requesterId": "61", + "authToken": "02dbe5be-28df-4d82-954f-3d27c56cca7d","userInfo":{"id":73}}} uriResponseMapping: - inJsonPath: $.TenantBoundary[0].boundary[0] outJsonPath: $.Data.ward - path: http://egov-workflow-v2.assam:8080/egov-workflow-v2/egov-wf/process/_search queryParam: businessIds=$.acknowldgementNumber,history=true,tenantId=$.tenantId - apiRequest: - { - 'RequestInfo': - { - 'apiId': 'org.egov.pt', - 'ver': '1.0', - 'ts': 1502890899493, - 'action': 'asd', - 'did': '4354648646', - 'key': 'xyz', - 'msgId': '654654', - 'requesterId': '61', - 'authToken': 'd9994555-7656-4a67-ab3a-a952a0d4dfc8', - 'userInfo': - { - 'id': 1, - 'uuid': '1fec8102-0e02-4d0a-b283-cd80d5dab067', - 'type': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - 'roles': - [ - { - 'name': 'Employee', - 'code': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - }, - ], - }, - }, - } + apiRequest: {"RequestInfo":{"apiId":"org.egov.pt","ver":"1.0","ts":1502890899493,"action":"asd","did":"4354648646","key":"xyz","msgId":"654654","requesterId":"61","authToken":"d9994555-7656-4a67-ab3a-a952a0d4dfc8","userInfo":{"id":1,"uuid":"1fec8102-0e02-4d0a-b283-cd80d5dab067","type":"EMPLOYEE","tenantId":"pb.amritsar","roles":[{"name":"Employee","code":"EMPLOYEE","tenantId":"pb.amritsar"}]}}} uriResponseMapping: - inJsonPath: $.ProcessInstances outJsonPath: $.Data.history @@ -440,7 +238,7 @@ ServiceMaps: moduleName: tenant masterName: tenants tenantId: as - filter: '[?(@.code == $tenant)]' + filter: "[?(@.code == $tenant)]" filterMapping: - variable: $tenant valueJsonpath: $.tenantId @@ -451,7 +249,7 @@ ServiceMaps: moduleName: PropertyTax masterName: UsageCategory tenantId: as - filter: '[?(@.code == $usageCategory)]' + filter: "[?(@.code == $usageCategory)]" filterMapping: - variable: $usageCategory valueJsonpath: $.usageCategory @@ -465,20 +263,7 @@ ServiceMaps: jsonPath: $.Property timeStampField: $.auditDetails.lastModifiedTime customJsonMapping: - indexMapping: - { - 'Data': - { - 'acknowldgementNumber': '', - 'creationReason': '', - 'auditDetails': {}, - 'propertyId': '', - 'tenantId': '', - 'accountId': '', - 'status': '', - '@timestamp': '', - }, - } + indexMapping: {"Data":{"acknowldgementNumber":"","creationReason":"","auditDetails":{},"propertyId":"","tenantId":"","tenantData":{},"accountId":"","status":"","@timestamp":""}} fieldMapping: - inJsonPath: $.acknowldgementNumber outJsonPath: $.Data.acknowldgementNumber @@ -499,22 +284,8 @@ ServiceMaps: externalUriMapping: - path: http://egov-location.assam:8080/assam/egov-location/location/v11/boundarys/_search queryParam: hierarchyTypeCode=REVENUE,boundaryType=Block,codes=$.address.locality.code,tenantId=$.tenantId - apiRequest: - { - 'RequestInfo': - { - 'apiId': 'org.egov.pt', - 'ver': '1.0', - 'ts': 1502890899493, - 'action': 'asd', - 'did': '4354648646', - 'key': 'xyz', - 'msgId': '654654', - 'requesterId': '61', - 'authToken': '02dbe5be-28df-4d82-954f-3d27c56cca7d', - 'userInfo': { 'id': 73 }, - }, - } + apiRequest: {"RequestInfo": {"apiId": "org.egov.pt","ver": "1.0","ts": 1502890899493,"action": "asd","did": "4354648646","key": "xyz","msgId": "654654", "requesterId": "61", + "authToken": "02dbe5be-28df-4d82-954f-3d27c56cca7d","userInfo":{"id":73}}} uriResponseMapping: - inJsonPath: $.TenantBoundary[0].boundary[0] outJsonPath: $.Data.ward @@ -526,36 +297,7 @@ ServiceMaps: valueJsonpath: $.address.locality.code - path: http://egov-workflow-v2.assam:8080/egov-workflow-v2/egov-wf/process/_search queryParam: businessIds=$.acknowldgementNumber,history=true,tenantId=$.tenantId - apiRequest: - { - 'RequestInfo': - { - 'apiId': 'org.egov.pt', - 'ver': '1.0', - 'ts': 1502890899493, - 'action': 'asd', - 'did': '4354648646', - 'key': 'xyz', - 'msgId': '654654', - 'requesterId': '61', - 'authToken': 'd9994555-7656-4a67-ab3a-a952a0d4dfc8', - 'userInfo': - { - 'id': 1, - 'uuid': '1fec8102-0e02-4d0a-b283-cd80d5dab067', - 'type': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - 'roles': - [ - { - 'name': 'Employee', - 'code': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - }, - ], - }, - }, - } + apiRequest: {"RequestInfo":{"apiId":"org.egov.pt","ver":"1.0","ts":1502890899493,"action":"asd","did":"4354648646","key":"xyz","msgId":"654654","requesterId":"61","authToken":"d9994555-7656-4a67-ab3a-a952a0d4dfc8","userInfo":{"id":1,"uuid":"1fec8102-0e02-4d0a-b283-cd80d5dab067","type":"EMPLOYEE","tenantId":"pb.amritsar","roles":[{"name":"Employee","code":"EMPLOYEE","tenantId":"pb.amritsar"}]}}} uriResponseMapping: - inJsonPath: $.ProcessInstances outJsonPath: $.Data.history @@ -581,34 +323,7 @@ ServiceMaps: jsonPath: $.Property timeStampField: $.auditDetails.lastModifiedTime customJsonMapping: - indexMapping: - { - 'Data': - { - 'owners': [], - 'acknowldgementNumber': '', - 'propertyType': '', - 'ownershipCategory': '', - 'creationReason': '', - 'usageCategory': '', - 'noOfFloors': '', - 'landArea': '', - 'superBuiltUpArea': '', - 'source': '', - 'channel': '', - 'units': {}, - 'auditDetails': {}, - 'id': '', - 'propertyId': '', - 'surveyId': '', - 'linkedProperties': {}, - 'tenantId': '', - 'accountId': '', - 'oldPropertyId': '', - 'status': '', - '@timestamp': 'timestamp', - }, - } + indexMapping: {"Data":{"owners":[],"acknowldgementNumber":"","propertyType":"","ownershipCategory":"","creationReason":"","usageCategory":"","noOfFloors":"","landArea":"","superBuiltUpArea":"","source":"","channel":"","units":{},"auditDetails":{},"id":"","propertyId":"","surveyId":"","linkedProperties":{},"tenantId":"","tenantData":{},"accountId":"","oldPropertyId":"","status":"","@timestamp":"timestamp"}} fieldMapping: - inJsonPath: $.owners.*.uuid outJsonPath: $.Data.owners @@ -657,57 +372,14 @@ ServiceMaps: externalUriMapping: - path: http://egov-location.assam:8080/assam/egov-location/location/v11/boundarys/_search queryParam: hierarchyTypeCode=REVENUE,boundaryType=Block,codes=$.address.locality.code,tenantId=$.tenantId - apiRequest: - { - 'RequestInfo': - { - 'apiId': 'org.egov.pt', - 'ver': '1.0', - 'ts': 1502890899493, - 'action': 'asd', - 'did': '4354648646', - 'key': 'xyz', - 'msgId': '654654', - 'requesterId': '61', - 'authToken': '02dbe5be-28df-4d82-954f-3d27c56cca7d', - 'userInfo': { 'id': 73 }, - }, - } + apiRequest: {"RequestInfo": {"apiId": "org.egov.pt","ver": "1.0","ts": 1502890899493,"action": "asd","did": "4354648646","key": "xyz","msgId": "654654", "requesterId": "61", + "authToken": "02dbe5be-28df-4d82-954f-3d27c56cca7d","userInfo":{"id":73}}} uriResponseMapping: - inJsonPath: $.TenantBoundary[0].boundary[0] outJsonPath: $.Data.ward - path: http://egov-workflow-v2.assam:8080/egov-workflow-v2/egov-wf/process/_search queryParam: businessIds=$.acknowldgementNumber,history=true,tenantId=$.tenantId - apiRequest: - { - 'RequestInfo': - { - 'apiId': 'org.egov.pt', - 'ver': '1.0', - 'ts': 1502890899493, - 'action': 'asd', - 'did': '4354648646', - 'key': 'xyz', - 'msgId': '654654', - 'requesterId': '61', - 'authToken': 'd9994555-7656-4a67-ab3a-a952a0d4dfc8', - 'userInfo': - { - 'id': 1, - 'uuid': '1fec8102-0e02-4d0a-b283-cd80d5dab067', - 'type': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - 'roles': - [ - { - 'name': 'Employee', - 'code': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - }, - ], - }, - }, - } + apiRequest: {"RequestInfo":{"apiId":"org.egov.pt","ver":"1.0","ts":1502890899493,"action":"asd","did":"4354648646","key":"xyz","msgId":"654654","requesterId":"61","authToken":"d9994555-7656-4a67-ab3a-a952a0d4dfc8","userInfo":{"id":1,"uuid":"1fec8102-0e02-4d0a-b283-cd80d5dab067","type":"EMPLOYEE","tenantId":"pb.amritsar","roles":[{"name":"Employee","code":"EMPLOYEE","tenantId":"pb.amritsar"}]}}} uriResponseMapping: - inJsonPath: $.ProcessInstances outJsonPath: $.Data.history @@ -716,7 +388,7 @@ ServiceMaps: moduleName: tenant masterName: tenants tenantId: as - filter: '[?(@.code == $tenant)]' + filter: "[?(@.code == $tenant)]" filterMapping: - variable: $tenant valueJsonpath: $.tenantId @@ -727,7 +399,7 @@ ServiceMaps: moduleName: PropertyTax masterName: UsageCategory tenantId: as - filter: '[?(@.code == $usageCategory)]' + filter: "[?(@.code == $usageCategory)]" filterMapping: - variable: $usageCategory valueJsonpath: $.usageCategory @@ -741,20 +413,7 @@ ServiceMaps: jsonPath: $.Property timeStampField: $.auditDetails.lastModifiedTime customJsonMapping: - indexMapping: - { - 'Data': - { - 'acknowldgementNumber': '', - 'creationReason': '', - 'auditDetails': {}, - 'propertyId': '', - 'tenantId': '', - 'accountId': '', - 'status': '', - '@timestamp': '', - }, - } + indexMapping: {"Data":{"acknowldgementNumber":"","creationReason":"","auditDetails":{},"propertyId":"","tenantId":"","tenantData":{},"accountId":"","status":"","@timestamp":""}} fieldMapping: - inJsonPath: $.acknowldgementNumber outJsonPath: $.Data.acknowldgementNumber @@ -775,22 +434,8 @@ ServiceMaps: externalUriMapping: - path: http://egov-location.assam:8080/assam/egov-location/location/v11/boundarys/_search queryParam: hierarchyTypeCode=REVENUE,boundaryType=Block,codes=$.address.locality.code,tenantId=$.tenantId - apiRequest: - { - 'RequestInfo': - { - 'apiId': 'org.egov.pt', - 'ver': '1.0', - 'ts': 1502890899493, - 'action': 'asd', - 'did': '4354648646', - 'key': 'xyz', - 'msgId': '654654', - 'requesterId': '61', - 'authToken': '02dbe5be-28df-4d82-954f-3d27c56cca7d', - 'userInfo': { 'id': 73 }, - }, - } + apiRequest: {"RequestInfo": {"apiId": "org.egov.pt","ver": "1.0","ts": 1502890899493,"action": "asd","did": "4354648646","key": "xyz","msgId": "654654", "requesterId": "61", + "authToken": "02dbe5be-28df-4d82-954f-3d27c56cca7d","userInfo":{"id":73}}} uriResponseMapping: - inJsonPath: $.TenantBoundary[0].boundary[0] outJsonPath: $.Data.ward @@ -802,36 +447,7 @@ ServiceMaps: valueJsonpath: $.address.locality.code - path: http://egov-workflow-v2.assam:8080/egov-workflow-v2/egov-wf/process/_search queryParam: businessIds=$.acknowldgementNumber,history=true,tenantId=$.tenantId - apiRequest: - { - 'RequestInfo': - { - 'apiId': 'org.egov.pt', - 'ver': '1.0', - 'ts': 1502890899493, - 'action': 'asd', - 'did': '4354648646', - 'key': 'xyz', - 'msgId': '654654', - 'requesterId': '61', - 'authToken': 'd9994555-7656-4a67-ab3a-a952a0d4dfc8', - 'userInfo': - { - 'id': 1, - 'uuid': '1fec8102-0e02-4d0a-b283-cd80d5dab067', - 'type': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - 'roles': - [ - { - 'name': 'Employee', - 'code': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - }, - ], - }, - }, - } + apiRequest: {"RequestInfo":{"apiId":"org.egov.pt","ver":"1.0","ts":1502890899493,"action":"asd","did":"4354648646","key":"xyz","msgId":"654654","requesterId":"61","authToken":"d9994555-7656-4a67-ab3a-a952a0d4dfc8","userInfo":{"id":1,"uuid":"1fec8102-0e02-4d0a-b283-cd80d5dab067","type":"EMPLOYEE","tenantId":"pb.amritsar","roles":[{"name":"Employee","code":"EMPLOYEE","tenantId":"pb.amritsar"}]}}} uriResponseMapping: - inJsonPath: $.ProcessInstances outJsonPath: $.Data.history @@ -840,7 +456,7 @@ ServiceMaps: moduleName: tenant masterName: tenants tenantId: as - filter: '[?(@.code == $tenant)]' + filter: "[?(@.code == $tenant)]" filterMapping: - variable: $tenant valueJsonpath: $.tenantId @@ -858,37 +474,7 @@ ServiceMaps: jsonPath: $.Properties.* timeStampField: $.auditDetails.lastModifiedTime customJsonMapping: - indexMapping: - { - 'Data': - { - 'ownerNames': [], - 'doorNo': '', - 'street': '', - 'owners': [], - 'acknowldgementNumber': '', - 'propertyType': '', - 'ownershipCategory': '', - 'creationReason': '', - 'usageCategory': '', - 'noOfFloors': '', - 'landArea': '', - 'superBuiltUpArea': '', - 'source': '', - 'channel': '', - 'units': {}, - 'auditDetails': {}, - 'id': '', - 'propertyId': '', - 'surveyId': '', - 'linkedProperties': {}, - 'tenantId': '', - 'accountId': '', - 'oldPropertyId': '', - 'status': '', - '@timestamp': 'timestamp', - }, - } + indexMapping: {"Data":{"ownerNames":[],"doorNo":"","street":"","owners":[],"acknowldgementNumber":"","propertyType":"","ownershipCategory":"","creationReason":"","usageCategory":"","noOfFloors":"","landArea":"","superBuiltUpArea":"","source":"","channel":"","units":{},"auditDetails":{},"id":"","propertyId":"","surveyId":"","linkedProperties":{},"tenantId":"","tenantData":{},"accountId":"","oldPropertyId":"","status":"","@timestamp":"timestamp"}} fieldMapping: - inJsonPath: $.owners.*.name outJsonPath: $.Data.ownerNames @@ -943,57 +529,14 @@ ServiceMaps: externalUriMapping: - path: http://egov-location.assam:8080/assam/egov-location/location/v11/boundarys/_search queryParam: hierarchyTypeCode=REVENUE,boundaryType=Block,codes=$.address.locality.code,tenantId=$.tenantId - apiRequest: - { - 'RequestInfo': - { - 'apiId': 'org.egov.pt', - 'ver': '1.0', - 'ts': 1502890899493, - 'action': 'asd', - 'did': '4354648646', - 'key': 'xyz', - 'msgId': '654654', - 'requesterId': '61', - 'authToken': '02dbe5be-28df-4d82-954f-3d27c56cca7d', - 'userInfo': { 'id': 73 }, - }, - } + apiRequest: {"RequestInfo": {"apiId": "org.egov.pt","ver": "1.0","ts": 1502890899493,"action": "asd","did": "4354648646","key": "xyz","msgId": "654654", "requesterId": "61", + "authToken": "02dbe5be-28df-4d82-954f-3d27c56cca7d","userInfo":{"id":73}}} uriResponseMapping: - inJsonPath: $.TenantBoundary[0].boundary[0] outJsonPath: $.Data.ward - path: http://egov-workflow-v2.assam:8080/egov-workflow-v2/egov-wf/process/_search queryParam: businessIds=$.acknowldgementNumber,history=true,tenantId=$.tenantId - apiRequest: - { - 'RequestInfo': - { - 'apiId': 'org.egov.pt', - 'ver': '1.0', - 'ts': 1502890899493, - 'action': 'asd', - 'did': '4354648646', - 'key': 'xyz', - 'msgId': '654654', - 'requesterId': '61', - 'authToken': 'd9994555-7656-4a67-ab3a-a952a0d4dfc8', - 'userInfo': - { - 'id': 1, - 'uuid': '1fec8102-0e02-4d0a-b283-cd80d5dab067', - 'type': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - 'roles': - [ - { - 'name': 'Employee', - 'code': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - }, - ], - }, - }, - } + apiRequest: {"RequestInfo":{"apiId":"org.egov.pt","ver":"1.0","ts":1502890899493,"action":"asd","did":"4354648646","key":"xyz","msgId":"654654","requesterId":"61","authToken":"d9994555-7656-4a67-ab3a-a952a0d4dfc8","userInfo":{"id":1,"uuid":"1fec8102-0e02-4d0a-b283-cd80d5dab067","type":"EMPLOYEE","tenantId":"pb.amritsar","roles":[{"name":"Employee","code":"EMPLOYEE","tenantId":"pb.amritsar"}]}}} uriResponseMapping: - inJsonPath: $.ProcessInstances outJsonPath: $.Data.history @@ -1002,7 +545,7 @@ ServiceMaps: moduleName: tenant masterName: tenants tenantId: as - filter: '[?(@.code == $tenant)]' + filter: "[?(@.code == $tenant)]" filterMapping: - variable: $tenant valueJsonpath: $.tenantId @@ -1013,7 +556,7 @@ ServiceMaps: moduleName: PropertyTax masterName: UsageCategory tenantId: as - filter: '[?(@.code == $usageCategory)]' + filter: "[?(@.code == $usageCategory)]" filterMapping: - variable: $usageCategory valueJsonpath: $.usageCategory @@ -1031,20 +574,7 @@ ServiceMaps: jsonPath: $.Properties.* timeStampField: $.auditDetails.lastModifiedTime customJsonMapping: - indexMapping: - { - 'Data': - { - 'acknowldgementNumber': '', - 'creationReason': '', - 'auditDetails': {}, - 'propertyId': '', - 'tenantId': '', - 'accountId': '', - 'status': '', - '@timestamp': '', - }, - } + indexMapping: {"Data":{"acknowldgementNumber":"","creationReason":"","auditDetails":{},"propertyId":"","tenantId":"","tenantData":{},"accountId":"","status":"","@timestamp":""}} fieldMapping: - inJsonPath: $.acknowldgementNumber outJsonPath: $.Data.acknowldgementNumber @@ -1065,63 +595,20 @@ ServiceMaps: externalUriMapping: - path: http://egov-location.assam:8080/assam/egov-location/location/v11/boundarys/_search queryParam: hierarchyTypeCode=REVENUE,boundaryType=Block,codes=$.address.locality.code,tenantId=$.tenantId - apiRequest: - { - 'RequestInfo': - { - 'apiId': 'org.egov.pt', - 'ver': '1.0', - 'ts': 1502890899493, - 'action': 'asd', - 'did': '4354648646', - 'key': 'xyz', - 'msgId': '654654', - 'requesterId': '61', - 'authToken': '02dbe5be-28df-4d82-954f-3d27c56cca7d', - 'userInfo': { 'id': 73 }, - }, - } + apiRequest: {"RequestInfo": {"apiId": "org.egov.pt","ver": "1.0","ts": 1502890899493,"action": "asd","did": "4354648646","key": "xyz","msgId": "654654", "requesterId": "61", + "authToken": "02dbe5be-28df-4d82-954f-3d27c56cca7d","userInfo":{"id":73}}} uriResponseMapping: - inJsonPath: $.TenantBoundary[0].boundary[0] outJsonPath: $.Data.ward - inJsonPath: $.TenantBoundary[0].boundary[0].children outJsonPath: $.Data.ward.children - filter: '[?(@.code == $locality)]' + filter: "[?(@.code == $locality)]" filterMapping: - variable: $locality valueJsonpath: $.address.locality.code - path: http://egov-workflow-v2.assam:8080/egov-workflow-v2/egov-wf/process/_search queryParam: businessIds=$.acknowldgementNumber,history=true,tenantId=$.tenantId - apiRequest: - { - 'RequestInfo': - { - 'apiId': 'org.egov.pt', - 'ver': '1.0', - 'ts': 1502890899493, - 'action': 'asd', - 'did': '4354648646', - 'key': 'xyz', - 'msgId': '654654', - 'requesterId': '61', - 'authToken': 'd9994555-7656-4a67-ab3a-a952a0d4dfc8', - 'userInfo': - { - 'id': 1, - 'uuid': '1fec8102-0e02-4d0a-b283-cd80d5dab067', - 'type': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - 'roles': - [ - { - 'name': 'Employee', - 'code': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - }, - ], - }, - }, - } + apiRequest: {"RequestInfo":{"apiId":"org.egov.pt","ver":"1.0","ts":1502890899493,"action":"asd","did":"4354648646","key":"xyz","msgId":"654654","requesterId":"61","authToken":"d9994555-7656-4a67-ab3a-a952a0d4dfc8","userInfo":{"id":1,"uuid":"1fec8102-0e02-4d0a-b283-cd80d5dab067","type":"EMPLOYEE","tenantId":"pb.amritsar","roles":[{"name":"Employee","code":"EMPLOYEE","tenantId":"pb.amritsar"}]}}} uriResponseMapping: - inJsonPath: $.ProcessInstances outJsonPath: $.Data.history @@ -1130,7 +617,7 @@ ServiceMaps: moduleName: tenant masterName: tenants tenantId: as - filter: '[?(@.code == $tenant)]' + filter: "[?(@.code == $tenant)]" filterMapping: - variable: $tenant valueJsonpath: $.tenantId @@ -1147,25 +634,7 @@ ServiceMaps: jsonPath: $.Assessment timeStampField: $.auditDetails.createdTime customJsonMapping: - indexMapping: - { - 'Data': - { - 'id': '', - 'tenantId': '', - 'additionalDetails': '', - 'assessmentNumber': '', - 'financialYear': '', - 'propertyId': '', - 'assessmentDate': '', - 'status': '', - 'source': '', - 'unitUsageList': {}, - 'channel': '', - 'auditDetails': {}, - '@timestamp': 'timestamp', - }, - } + indexMapping: {"Data":{"id":"","tenantId":"","additionalDetails":"","assessmentNumber":"","financialYear":"","propertyId":"","assessmentDate":"","status":"","source":"","unitUsageList":{},"channel":"","auditDetails":{},"@timestamp":"timestamp"}} fieldMapping: - inJsonPath: $.id outJsonPath: $.Data.id @@ -1203,25 +672,7 @@ ServiceMaps: jsonPath: $.Assessment timeStampField: $.auditDetails.createdTime customJsonMapping: - indexMapping: - { - 'Data': - { - 'id': '', - 'tenantId': '', - 'additionalDetails': '', - 'assessmentNumber': '', - 'financialYear': '', - 'propertyId': '', - 'assessmentDate': '', - 'status': '', - 'source': '', - 'unitUsageList': {}, - 'channel': '', - 'auditDetails': {}, - '@timestamp': 'timestamp', - }, - } + indexMapping: {"Data":{"id":"","tenantId":"","additionalDetails":"","assessmentNumber":"","financialYear":"","propertyId":"","assessmentDate":"","status":"","source":"","unitUsageList":{},"channel":"","auditDetails":{},"@timestamp":"timestamp"}} fieldMapping: - inJsonPath: $.id outJsonPath: $.Data.id @@ -1259,25 +710,7 @@ ServiceMaps: jsonPath: $.Assessment timeStampField: $.auditDetails.createdTime customJsonMapping: - indexMapping: - { - 'Data': - { - 'id': '', - 'tenantId': '', - 'additionalDetails': '', - 'assessmentNumber': '', - 'financialYear': '', - 'propertyId': '', - 'assessmentDate': '', - 'status': '', - 'source': '', - 'unitUsageList': {}, - 'channel': '', - 'auditDetails': {}, - '@timestamp': 'timestamp', - }, - } + indexMapping: {"Data":{"id":"","tenantId":"","additionalDetails":"","assessmentNumber":"","financialYear":"","propertyId":"","assessmentDate":"","status":"","source":"","unitUsageList":{},"channel":"","auditDetails":{},"@timestamp":"timestamp"}} fieldMapping: - inJsonPath: $.id outJsonPath: $.Data.id @@ -1316,25 +749,7 @@ ServiceMaps: isBulk: true timeStampField: $.auditDetails.createdTime customJsonMapping: - indexMapping: - { - 'Data': - { - 'id': '', - 'tenantId': '', - 'additionalDetails': '', - 'assessmentNumber': '', - 'financialYear': '', - 'propertyId': '', - 'assessmentDate': '', - 'status': '', - 'source': '', - 'unitUsageList': {}, - 'channel': '', - 'auditDetails': {}, - '@timestamp': 'timestamp', - }, - } + indexMapping: {"Data":{"id":"","tenantId":"","additionalDetails":"","assessmentNumber":"","financialYear":"","propertyId":"","assessmentDate":"","status":"","source":"","unitUsageList":{},"channel":"","auditDetails":{},"@timestamp":"timestamp"}} fieldMapping: - inJsonPath: $.id outJsonPath: $.Data.id diff --git a/egov-indexer/rate-mdms-indexer.yml b/egov-indexer/rate-mdms-indexer.yml new file mode 100644 index 0000000..3eeadac --- /dev/null +++ b/egov-indexer/rate-mdms-indexer.yml @@ -0,0 +1,55 @@ +ServiceMaps: + serviceName: mdms-v2 + version: 1.0.0 + mappings: + - topic: create-rate-index + configKey: INDEX + indexes: + - name: rate-index-v1 + type: Rate + id: $.tenantId, $.uniqueIdentifier + jsonPath: $ + timeStampField: $.auditDetails.createdTime + customJsonMapping: + indexMapping: {"Data":{"rate":{},"tenantData":{}}} + fieldMapping: + - inJsonPath: $ + outJsonPath: $.Data.rate + mdmsMapping: + - path: http://mdms-v2:8080/assam/mdms-v2/v1/_search + moduleName: tenant + masterName: tenants + tenantId: as + filter: "[?(@.code == $tenant)]" + filterMapping: + - variable: $tenant + valueJsonpath: $.tenantId + uriResponseMapping: + - inJsonPath: $.MdmsRes.tenant.tenants + outJsonPath: $.Data.tenantData + + - topic: update-rate-index + configKey: INDEX + indexes: + - name: rate-index-v1 + type: Rate + id: $.tenantId, $.uniqueIdentifier + timeStampField: $.auditDetails.createdTime + jsonPath: $ + customJsonMapping: + indexMapping: {"Data":{"rate":{},"tenantData":{}}} + fieldMapping: + - inJsonPath: $ + outJsonPath: $.Data.rate + mdmsMapping: + - path: http://mdms-v2:8080/assam/mdms-v2/v1/_search + moduleName: tenant + masterName: tenants + tenantId: as + filter: "[?(@.code == $tenant)]" + filterMapping: + - variable: $tenant + valueJsonpath: $.tenantId + uriResponseMapping: + - inJsonPath: $.MdmsRes.tenant.tenants + outJsonPath: $.Data.tenantData \ No newline at end of file diff --git a/egov-indexer/tenant-mdms-indexer.yml b/egov-indexer/tenant-mdms-indexer.yml new file mode 100644 index 0000000..ac767f0 --- /dev/null +++ b/egov-indexer/tenant-mdms-indexer.yml @@ -0,0 +1,31 @@ +ServiceMaps: + serviceName: mdms-v2 + version: 1.0.0 + mappings: + - topic: create-tenant-index + configKey: INDEX + indexes: + - name: tenant-index-v1 + type: tenant + id: $.uniqueIdentifier + jsonPath: $ + timeStampField: $.auditDetails.createdTime + customJsonMapping: + indexMapping: { "Data": { } } + fieldMapping: + - inJsonPath: $ + outJsonPath: $.Data + + - topic: update-tenant-index + configKey: INDEX + indexes: + - name: tenant-index-v1 + type: tenant + id: $.uniqueIdentifier + timeStampField: $.auditDetails.createdTime + jsonPath: $ + customJsonMapping: + indexMapping: {"Data":{}} + fieldMapping: + - inJsonPath: $ + outJsonPath: $.Data \ No newline at end of file diff --git a/egov-indexer/water-service.yml b/egov-indexer/water-service.yml index 17385d4..3b850bf 100644 --- a/egov-indexer/water-service.yml +++ b/egov-indexer/water-service.yml @@ -11,50 +11,7 @@ ServiceMaps: jsonPath: $.WaterConnection timeStampField: $.auditDetails.createdTime customJsonMapping: - indexMapping: - { - 'Data': - { - 'workflow': { 'state': {}, 'action': '', 'assignes': [] }, - 'applicationNo': '', - 'applicationStatus': '', - 'status': '', - 'connectionNo': '', - 'oldConnectionNo': '', - "imisNumber":'', - "villageId":'', - 'plumberInfo': [], - 'roadCuttingInfo': [], - 'connectionHolders': [], - 'roadType': '', - 'roadCuttingArea': '', - 'connectionExecutionDate': '', - 'connectionCategory': '', - 'connectionType': '', - 'additionalDetails': {}, - 'id': '', - 'propertyId': '', - 'rainWaterHarvesting': '', - 'waterSource': '', - 'tenantId': '', - 'meterId': '', - 'meterInstallationDate': '', - 'proposedPipeSize': '', - 'proposedTaps': '', - 'pipeSize': '', - 'noOfTaps': '', - 'applicationType': '', - 'dateEffectiveFrom': '', - 'previousReadingDate': '', - 'arrears': '', - 'paymentType': '', - 'penalty': '', - 'advance': '', - '@timestamp': 'timestamp', - 'history': {}, - 'payments': {}, - }, - } + indexMapping: {"Data":{"workflow": {"state": {}, "action": "", "assignes": []},"applicationNo":"","applicationStatus":"","status":"","auditDetails":{},"connectionNo":"","oldConnectionNo":"","plumberInfo":[],"roadCuttingInfo":[],"connectionHolders":[],"roadType":"","roadCuttingArea":"","connectionExecutionDate":"","connectionCategory":"","connectionType":"","additionalDetails":{},"id":"","propertyId":"","rainWaterHarvesting":"","waterSource":"","tenantId":"","meterId":"","meterInstallationDate":"","proposedPipeSize":"","proposedTaps":"","pipeSize":"","noOfTaps":"","applicationType":"","dateEffectiveFrom":"", "previousReadingDate":"", "arrears":"","paymentType":"","penalty":"","advance":"", "@timestamp":"timestamp","history":{},"tenantData":{},"payments":{},"lastDemandGeneratedDate":"","dataVerified":""}} fieldMapping: - inJsonPath: $.applicationStatus.state outJsonPath: $.Data.workflow.state @@ -68,6 +25,8 @@ ServiceMaps: outJsonPath: $.Data.applicationStatus - inJsonPath: $.status outJsonPath: $.Data.status + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails - inJsonPath: $.connectionNo outJsonPath: $.Data.connectionNo - inJsonPath: $.oldConnectionNo @@ -132,98 +91,46 @@ ServiceMaps: outJsonPath: $.Data.paymentType - inJsonPath: $.@timestamp outJsonPath: $.Data.@timestamp + - inJsonPath: $.dataVerified + outJsonPath: $.Data.dataVerified + mdmsMapping: + - path: http://mdms-v2:8080/assam/mdms-v2/v1/_search + moduleName: tenant + masterName: tenants + tenantId: as + filter: "[?(@.code == $tenant)]" + filterMapping: + - variable: $tenant + valueJsonpath: $.tenantId + uriResponseMapping: + - inJsonPath: $.MdmsRes.tenant.tenants + outJsonPath: $.Data.tenantData externalUriMapping: - path: http://egov-workflow-v2.assam:8080/egov-workflow-v2/egov-wf/process/_search queryParam: businessIds=$.applicationNo,history=true,tenantId=$.tenantId - apiRequest: - { - 'RequestInfo': - { - 'apiId': 'org.egov.pt', - 'ver': '1.0', - 'ts': 1502890899493, - 'action': 'asd', - 'did': '4354648646', - 'key': 'xyz', - 'msgId': '654654', - 'requesterId': '61', - 'authToken': 'd9994555-7656-4a67-ab3a-a952a0d4dfc8', - 'userInfo': - { - 'id': 1, - 'uuid': '1fec8102-0e02-4d0a-b283-cd80d5dab067', - 'type': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - 'roles': - [ - { - 'name': 'Employee', - 'code': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - }, - ], - }, - }, - } + apiRequest: {"RequestInfo":{"apiId":"org.egov.pt","ver":"1.0","ts":1502890899493,"action":"asd","did":"4354648646","key":"xyz","msgId":"654654","requesterId":"61","authToken":"d9994555-7656-4a67-ab3a-a952a0d4dfc8","userInfo":{"id":1,"uuid":"1fec8102-0e02-4d0a-b283-cd80d5dab067","type":"EMPLOYEE","tenantId":"pb.amritsar","roles":[{"name":"Employee","code":"EMPLOYEE","tenantId":"pb.amritsar"}]}}} uriResponseMapping: - inJsonPath: $.ProcessInstances outJsonPath: $.Data.history - path: http://collection-services.assam:8080/assam/collection-services/payments/WS/_search queryParam: consumerCodes=$.connectionNo,tenantId=$.tenantId - apiRequest: - { - 'RequestInfo': - { - 'apiId': 'org.egov.pt', - 'ver': '1.0', - 'ts': 1502890899493, - 'action': 'asd', - 'did': '4354648646', - 'key': 'xyz', - 'msgId': '654654', - 'requesterId': '61', - 'authToken': 'd9994555-7656-4a67-ab3a-a952a0d4dfc8', - 'userInfo': - { - 'id': 1, - 'uuid': '1fec8102-0e02-4d0a-b283-cd80d5dab067', - 'type': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - 'roles': - [ - { - 'name': 'Employee', - 'code': 'FSM_EDITOR_EMP', - 'tenantId': 'pb.amritsar', - }, - ], - }, - }, - } + apiRequest: {"RequestInfo":{"apiId":"org.egov.pt","ver":"1.0","ts":1502890899493,"action":"asd","did":"4354648646","key":"xyz","msgId":"654654","requesterId":"61","authToken":"d9994555-7656-4a67-ab3a-a952a0d4dfc8","userInfo":{"id":1,"uuid":"1fec8102-0e02-4d0a-b283-cd80d5dab067","type":"EMPLOYEE","tenantId":"pb.amritsar","roles":[{"name":"Employee","code":"FSM_EDITOR_EMP","tenantId":"pb.amritsar"}]}}} uriResponseMapping: - inJsonPath: $.Payments outJsonPath: $.Data.payments - path: http://billing-service.assam:8080/assam/billing-service/demand/_search queryParam: consumerCode=$.connectionNo,tenantId=$.tenantId,businessService=WS - apiRequest: - { - 'RequestInfo': - { - 'apiId': 'org.egov.pt', - 'ver': '1.0', - 'ts': 1502890899493, - 'action': 'asd', - 'did': '4354648646', - 'key': 'xyz', - 'msgId': '654654', - 'requesterId': '61', - 'authToken': '02dbe5be-28df-4d82-954f-3d27c56cca7d', - 'userInfo': { 'id': 73 }, - }, - } + apiRequest: {"RequestInfo": {"apiId": "org.egov.pt","ver": "1.0","ts": 1502890899493,"action": "asd","did": "4354648646","key": "xyz","msgId": "654654", "requesterId": "61", "authToken": "02dbe5be-28df-4d82-954f-3d27c56cca7d","userInfo":{"id":73}}} uriResponseMapping: - inJsonPath: $.Demands outJsonPath: $.Data.demands + - path: http://ws-services.assam:8080/assam/ws-services/wc/_search + queryParam: connectionNumber=$.connectionNo,tenantId=$.tenantId + apiRequest: {"RequestInfo": {"apiId": "org.egov.pt","ver": "1.0","ts": 1502890899493,"action": "asd","did": "4354648646","key": "xyz","msgId": "654654", "requesterId": "61", "authToken": "02dbe5be-28df-4d82-954f-3d27c56cca7d","userInfo":{"id":73,"type":"EMPLOYEE","roles":[{"name":"Employee","code":"FSM_EDITOR_EMP","tenantId":"pb.amritsar"}]}}} + uriResponseMapping: + - inJsonPath: $.WaterConnection[0].lastDemandGeneratedDate + outJsonPath: $.Data.lastDemandGeneratedDate + - topic: update-ws-connection configKey: INDEX @@ -234,50 +141,7 @@ ServiceMaps: jsonPath: $.WaterConnection timeStampField: $.auditDetails.lastModifiedTime customJsonMapping: - indexMapping: - { - 'Data': - { - 'workflow': { 'state': {}, 'action': '', 'assignes': [] }, - 'applicationNo': '', - 'applicationStatus': '', - 'status': '', - 'connectionNo': '', - 'oldConnectionNo': '', - "imisNumber":'', - "villageId":'', - 'plumberInfo': [], - 'roadCuttingInfo': [], - 'connectionHolders': [], - 'roadType': '', - 'roadCuttingArea': '', - 'connectionExecutionDate': '', - 'connectionCategory': '', - 'connectionType': '', - 'additionalDetails': {}, - 'id': '', - 'propertyId': '', - 'rainWaterHarvesting': '', - 'waterSource': '', - 'tenantId': '', - 'meterId': '', - 'meterInstallationDate': '', - 'proposedPipeSize': '', - 'proposedTaps': '', - 'pipeSize': '', - 'noOfTaps': '', - 'applicationType': '', - 'dateEffectiveFrom': '', - 'previousReadingDate': '', - 'arrears': '', - 'paymentType': '', - 'penalty': '', - 'advance': '', - '@timestamp': 'timestamp', - 'history': {}, - 'payments': {}, - }, - } + indexMapping: {"Data":{"workflow": {"state": {}, "action": "", "assignes": []},"applicationNo":"","applicationStatus":"","status":"","auditDetails":{},"connectionNo":"","oldConnectionNo":"","plumberInfo":[],"roadCuttingInfo":[],"connectionHolders":[],"roadType":"","roadCuttingArea":"","connectionExecutionDate":"","connectionCategory":"","connectionType":"","additionalDetails":{},"id":"","propertyId":"","rainWaterHarvesting":"","waterSource":"","tenantId":"","meterId":"","meterInstallationDate":"","proposedPipeSize":"","proposedTaps":"","pipeSize":"","noOfTaps":"","applicationType":"","dateEffectiveFrom":"", "previousReadingDate":"", "arrears":"","paymentType":"","penalty":"","advance":"", "@timestamp":"timestamp","history":{},"tenantData":{},"payments":{},"lastDemandGeneratedDate":"","dataVerified":""}} fieldMapping: - inJsonPath: $.applicationStatus.state outJsonPath: $.Data.workflow.state @@ -291,6 +155,8 @@ ServiceMaps: outJsonPath: $.Data.applicationStatus - inJsonPath: $.status outJsonPath: $.Data.status + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails - inJsonPath: $.connectionNo outJsonPath: $.Data.connectionNo - inJsonPath: $.oldConnectionNo @@ -355,77 +221,40 @@ ServiceMaps: outJsonPath: $.Data.paymentType - inJsonPath: $.@timestamp outJsonPath: $.Data.@timestamp + - inJsonPath: $.dataVerified + outJsonPath: $.Data.dataVerified + mdmsMapping: + - path: http://mdms-v2:8080/assam/mdms-v2/v1/_search + moduleName: tenant + masterName: tenants + tenantId: as + filter: "[?(@.code == $tenant)]" + filterMapping: + - variable: $tenant + valueJsonpath: $.tenantId + uriResponseMapping: + - inJsonPath: $.MdmsRes.tenant.tenants + outJsonPath: $.Data.tenantData externalUriMapping: - path: http://egov-workflow-v2.assam:8080/egov-workflow-v2/egov-wf/process/_search queryParam: businessIds=$.applicationNo,history=true,tenantId=$.tenantId - apiRequest: - { - 'RequestInfo': - { - 'apiId': 'org.egov.pt', - 'ver': '1.0', - 'ts': 1502890899493, - 'action': 'asd', - 'did': '4354648646', - 'key': 'xyz', - 'msgId': '654654', - 'requesterId': '61', - 'authToken': 'd9994555-7656-4a67-ab3a-a952a0d4dfc8', - 'userInfo': - { - 'id': 1, - 'uuid': '1fec8102-0e02-4d0a-b283-cd80d5dab067', - 'type': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - 'roles': - [ - { - 'name': 'Employee', - 'code': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - }, - ], - }, - }, - } + apiRequest: {"RequestInfo":{"apiId":"org.egov.pt","ver":"1.0","ts":1502890899493,"action":"asd","did":"4354648646","key":"xyz","msgId":"654654","requesterId":"61","authToken":"d9994555-7656-4a67-ab3a-a952a0d4dfc8","userInfo":{"id":1,"uuid":"1fec8102-0e02-4d0a-b283-cd80d5dab067","type":"EMPLOYEE","tenantId":"pb.amritsar","roles":[{"name":"Employee","code":"EMPLOYEE","tenantId":"pb.amritsar"}]}}} uriResponseMapping: - inJsonPath: $.ProcessInstances outJsonPath: $.Data.history - path: http://collection-services.assam:8080/assam/collection-services/payments/_search queryParam: consumerCodes=$.connectionNo,tenantId=$.tenantId - apiRequest: - { - 'RequestInfo': - { - 'apiId': 'org.egov.pt', - 'ver': '1.0', - 'ts': 1502890899493, - 'action': 'asd', - 'did': '4354648646', - 'key': 'xyz', - 'msgId': '654654', - 'requesterId': '61', - 'authToken': 'd9994555-7656-4a67-ab3a-a952a0d4dfc8', - 'userInfo': - { - 'id': 1, - 'uuid': '1fec8102-0e02-4d0a-b283-cd80d5dab067', - 'type': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - 'roles': - [ - { - 'name': 'Employee', - 'code': 'FSM_EDITOR_EMP', - 'tenantId': 'pb.amritsar', - }, - ], - }, - }, - } + apiRequest: {"RequestInfo":{"apiId":"org.egov.pt","ver":"1.0","ts":1502890899493,"action":"asd","did":"4354648646","key":"xyz","msgId":"654654","requesterId":"61","authToken":"d9994555-7656-4a67-ab3a-a952a0d4dfc8","userInfo":{"id":1,"uuid":"1fec8102-0e02-4d0a-b283-cd80d5dab067","type":"EMPLOYEE","tenantId":"pb.amritsar","roles":[{"name":"Employee","code":"FSM_EDITOR_EMP","tenantId":"pb.amritsar"}]}}} uriResponseMapping: - inJsonPath: $.Payments[0] outJsonPath: $.Data.payments + - path: http://ws-services.assam:8080/assam/ws-services/wc/_search + queryParam: connectionNumber=$.connectionNo,tenantId=$.tenantId + apiRequest: {"RequestInfo": {"apiId": "org.egov.pt","ver": "1.0","ts": 1502890899493,"action": "asd","did": "4354648646","key": "xyz","msgId": "654654", "requesterId": "61", "authToken": "02dbe5be-28df-4d82-954f-3d27c56cca7d","userInfo":{"id":73,"type":"EMPLOYEE","roles":[{"name":"Employee","code":"FSM_EDITOR_EMP","tenantId":"pb.amritsar"}]}}} + uriResponseMapping: + - inJsonPath: $.WaterConnection[0].lastDemandGeneratedDate + outJsonPath: $.Data.lastDemandGeneratedDate + - topic: update-ws-workflow configKey: INDEX @@ -436,50 +265,7 @@ ServiceMaps: jsonPath: $.WaterConnection timeStampField: $.auditDetails.lastModifiedTime customJsonMapping: - indexMapping: - { - 'Data': - { - 'workflow': { 'state': {}, 'action': '', 'assignes': [] }, - 'applicationNo': '', - 'applicationStatus': '', - 'status': '', - 'connectionNo': '', - 'oldConnectionNo': '', - "imisNumber":'', - "villageId":'', - 'plumberInfo': [], - 'roadCuttingInfo': [], - 'connectionHolders': [], - 'roadType': '', - 'roadCuttingArea': '', - 'connectionExecutionDate': '', - 'connectionCategory': '', - 'connectionType': '', - 'additionalDetails': {}, - 'id': '', - 'propertyId': '', - 'rainWaterHarvesting': '', - 'waterSource': '', - 'tenantId': '', - 'meterId': '', - 'meterInstallationDate': '', - 'proposedPipeSize': '', - 'proposedTaps': '', - 'pipeSize': '', - 'noOfTaps': '', - 'applicationType': '', - 'dateEffectiveFrom': '', - 'previousReadingDate': '', - 'arrears': '', - 'paymentType': '', - 'penalty': '', - 'advance': '', - '@timestamp': 'timestamp', - 'history': {}, - 'payments': {}, - }, - } + indexMapping: {"Data":{"workflow": {"state": {}, "action": "", "assignes": []},"applicationNo":"","applicationStatus":"","status":"","auditDetails":{},"connectionNo":"","oldConnectionNo":"","plumberInfo":[],"roadCuttingInfo":[],"connectionHolders":[],"roadType":"","roadCuttingArea":"","connectionExecutionDate":"","connectionCategory":"","connectionType":"","additionalDetails":{},"id":"","propertyId":"","rainWaterHarvesting":"","waterSource":"","tenantId":"","meterId":"","meterInstallationDate":"","proposedPipeSize":"","proposedTaps":"","pipeSize":"","noOfTaps":"","applicationType":"","dateEffectiveFrom":"", "previousReadingDate":"", "arrears":"","paymentType":"","penalty":"","advance":"", "@timestamp":"timestamp","history":{},"tenantData":{},"payments":{},"lastDemandGeneratedDate":"","dataVerified":""}} fieldMapping: - inJsonPath: $.applicationStatus.state outJsonPath: $.Data.workflow.state @@ -493,6 +279,8 @@ ServiceMaps: outJsonPath: $.Data.applicationStatus - inJsonPath: $.status outJsonPath: $.Data.status + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails - inJsonPath: $.connectionNo outJsonPath: $.Data.connectionNo - inJsonPath: $.oldConnectionNo @@ -557,77 +345,39 @@ ServiceMaps: outJsonPath: $.Data.paymentType - inJsonPath: $.@timestamp outJsonPath: $.Data.@timestamp + - inJsonPath: $.dataVerified + outJsonPath: $.Data.dataVerified + mdmsMapping: + - path: http://mdms-v2:8080/assam/mdms-v2/v1/_search + moduleName: tenant + masterName: tenants + tenantId: as + filter: "[?(@.code == $tenant)]" + filterMapping: + - variable: $tenant + valueJsonpath: $.tenantId + uriResponseMapping: + - inJsonPath: $.MdmsRes.tenant.tenants + outJsonPath: $.Data.tenantData externalUriMapping: - path: http://egov-workflow-v2.assam:8080/egov-workflow-v2/egov-wf/process/_search queryParam: businessIds=$.applicationNo,history=true,tenantId=$.tenantId - apiRequest: - { - 'RequestInfo': - { - 'apiId': 'org.egov.pt', - 'ver': '1.0', - 'ts': 1502890899493, - 'action': 'asd', - 'did': '4354648646', - 'key': 'xyz', - 'msgId': '654654', - 'requesterId': '61', - 'authToken': 'd9994555-7656-4a67-ab3a-a952a0d4dfc8', - 'userInfo': - { - 'id': 1, - 'uuid': '1fec8102-0e02-4d0a-b283-cd80d5dab067', - 'type': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - 'roles': - [ - { - 'name': 'Employee', - 'code': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - }, - ], - }, - }, - } + apiRequest: {"RequestInfo":{"apiId":"org.egov.pt","ver":"1.0","ts":1502890899493,"action":"asd","did":"4354648646","key":"xyz","msgId":"654654","requesterId":"61","authToken":"d9994555-7656-4a67-ab3a-a952a0d4dfc8","userInfo":{"id":1,"uuid":"1fec8102-0e02-4d0a-b283-cd80d5dab067","type":"EMPLOYEE","tenantId":"pb.amritsar","roles":[{"name":"Employee","code":"EMPLOYEE","tenantId":"pb.amritsar"}]}}} uriResponseMapping: - inJsonPath: $.ProcessInstances outJsonPath: $.Data.history - path: http://collection-services.assam:8080/assam/collection-services/payments/_search queryParam: consumerCodes=$.connectionNo,tenantId=$.tenantId - apiRequest: - { - 'RequestInfo': - { - 'apiId': 'org.egov.pt', - 'ver': '1.0', - 'ts': 1502890899493, - 'action': 'asd', - 'did': '4354648646', - 'key': 'xyz', - 'msgId': '654654', - 'requesterId': '61', - 'authToken': 'd9994555-7656-4a67-ab3a-a952a0d4dfc8', - 'userInfo': - { - 'id': 1, - 'uuid': '1fec8102-0e02-4d0a-b283-cd80d5dab067', - 'type': 'EMPLOYEE', - 'tenantId': 'pb.amritsar', - 'roles': - [ - { - 'name': 'Employee', - 'code': 'FSM_EDITOR_EMP', - 'tenantId': 'pb.amritsar', - }, - ], - }, - }, - } + apiRequest: {"RequestInfo":{"apiId":"org.egov.pt","ver":"1.0","ts":1502890899493,"action":"asd","did":"4354648646","key":"xyz","msgId":"654654","requesterId":"61","authToken":"d9994555-7656-4a67-ab3a-a952a0d4dfc8","userInfo":{"id":1,"uuid":"1fec8102-0e02-4d0a-b283-cd80d5dab067","type":"EMPLOYEE","tenantId":"pb.amritsar","roles":[{"name":"Employee","code":"FSM_EDITOR_EMP","tenantId":"pb.amritsar"}]}}} uriResponseMapping: - inJsonPath: $.Payments[0] outJsonPath: $.Data.payments + - path: http://ws-services.assam:8080/assam/ws-services/wc/_search + queryParam: connectionNumber=$.connectionNo,tenantId=$.tenantId + apiRequest: {"RequestInfo": {"apiId": "org.egov.pt","ver": "1.0","ts": 1502890899493,"action": "asd","did": "4354648646","key": "xyz","msgId": "654654", "requesterId": "61", "authToken": "02dbe5be-28df-4d82-954f-3d27c56cca7d","userInfo":{"id":73,"type":"EMPLOYEE","roles":[{"name":"Employee","code":"FSM_EDITOR_EMP","tenantId":"pb.amritsar"}]}}} + uriResponseMapping: + - inJsonPath: $.WaterConnection[0].lastDemandGeneratedDate + outJsonPath: $.Data.lastDemandGeneratedDate - topic: ws-connection-legacyIndex configKey: LEGACYINDEX @@ -639,51 +389,10 @@ ServiceMaps: jsonPath: $.WaterConnection.* timeStampField: $.auditDetails.createdTime customJsonMapping: - indexMapping: - { - 'Data': - { - 'workflow': { 'state': {}, 'action': '', 'assignes': [] }, - 'applicationNo': '', - 'applicationStatus': '', - 'status': '', - 'connectionNo': '', - 'oldConnectionNo': '', - "imisNumber":'', - "villageId":'', - 'plumberInfo': [], - 'roadCuttingInfo': [], - 'connectionHolders': [], - 'roadType': '', - 'roadCuttingArea': '', - 'connectionExecutionDate': '', - 'connectionCategory': '', - 'connectionType': '', - 'additionalDetails': {}, - 'id': '', - 'propertyId': '', - 'rainWaterHarvesting': '', - 'waterSource': '', - 'tenantId': '', - 'meterId': '', - 'meterInstallationDate': '', - 'proposedPipeSize': '', - 'proposedTaps': '', - 'pipeSize': '', - 'noOfTaps': '', - 'applicationType': '', - 'dateEffectiveFrom': '', - 'previousReadingDate': '', - 'arrears': '', - 'paymentType': '', - 'penalty': '', - 'advance': '', - '@timestamp': 'timestamp', - 'history': {}, - 'payments': {}, - }, - } + indexMapping: {"Data":{"workflow": {"state": {}, "action": "", "assignes": []},"applicationNo":"","applicationStatus":"","status":"","auditDetails":{},"connectionNo":"","oldConnectionNo":"","plumberInfo":[],"roadCuttingInfo":[],"connectionHolders":[],"roadType":"","roadCuttingArea":"","connectionExecutionDate":"","connectionCategory":"","connectionType":"","additionalDetails":{},"id":"","propertyId":"","rainWaterHarvesting":"","waterSource":"","tenantId":"","meterId":"","meterInstallationDate":"","proposedPipeSize":"","proposedTaps":"","pipeSize":"","noOfTaps":"","applicationType":"","dateEffectiveFrom":"", "previousReadingDate":"", "arrears":"","paymentType":"","penalty":"","advance":"", "@timestamp":"timestamp","history":{},"tenantData":{},"payments":{},"lastDemandGeneratedDate":"","dataVerified":""}} fieldMapping: + - inJsonPath: $.applicationStatus.state + outJsonPath: $.Data.workflow.state - inJsonPath: $.processInstance.action outJsonPath: $.Data.workflow.action - inJsonPath: $.processInstance.assignes.*.uuid @@ -694,6 +403,10 @@ ServiceMaps: outJsonPath: $.Data.applicationStatus - inJsonPath: $.status outJsonPath: $.Data.status + - inJsonPath: $.lastDemandGeneratedDate + outJsonPath: $.Data.lastDemandGeneratedDate + - inJsonPath: $.auditDetails + outJsonPath: $.Data.auditDetails - inJsonPath: $.connectionNo outJsonPath: $.Data.connectionNo - inJsonPath: $.oldConnectionNo @@ -724,6 +437,8 @@ ServiceMaps: outJsonPath: $.Data.id - inJsonPath: $.propertyId outJsonPath: $.Data.propertyId + - inJsonPath: $.rainWaterHarvesting + outJsonPath: $.Data.rainWaterHarvesting - inJsonPath: $.waterSource outJsonPath: $.Data.waterSource - inJsonPath: $.tenantId @@ -756,39 +471,24 @@ ServiceMaps: outJsonPath: $.Data.paymentType - inJsonPath: $.@timestamp outJsonPath: $.Data.@timestamp + - inJsonPath: $.dataVerified + outJsonPath: $.Data.dataVerified + mdmsMapping: + - path: http://mdms-v2:8080/assam/mdms-v2/v1/_search + moduleName: tenant + masterName: tenants + tenantId: as + filter: "[?(@.code == $tenant)]" + filterMapping: + - variable: $tenant + valueJsonpath: $.tenantId + uriResponseMapping: + - inJsonPath: $.MdmsRes.tenant.tenants + outJsonPath: $.Data.tenantData externalUriMapping: - path: http://egov-workflow-v2.assam:8080/egov-workflow-v2/egov-wf/process/_search queryParam: businessIds=$.applicationNo,history=true,tenantId=$.tenantId - apiRequest: - { - 'RequestInfo': - { - 'apiId': 'org.egov.pt', - 'ver': '1.0', - 'ts': 1502890899493, - 'action': 'asd', - 'did': '4354648646', - 'key': 'xyz', - 'msgId': '654654', - 'requesterId': '61', - 'authToken': 'd9994555-7656-4a67-ab3a-a952a0d4dfc8', - 'userInfo': - { - 'id': 1, - 'uuid': '1fec8102-0e02-4d0a-b283-cd80d5dab067', - 'type': 'CITIZEN', - 'tenantId': 'pb.amritsar', - 'roles': - [ - { - 'name': 'Citizen', - 'code': 'CITIZEN', - 'tenantId': 'pb.amritsar', - }, - ], - }, - }, - } + 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":"CITIZEN","tenantId":"pb.amritsar","roles":[{"name":"Citizen","code":"CITIZEN","tenantId":"pb.amritsar"}]}}} uriResponseMapping: - inJsonPath: $.ProcessInstances outJsonPath: $.Data.history diff --git a/egov-indexer/water-services-meter.yml b/egov-indexer/water-services-meter.yml index b669b12..3a6eb7c 100644 --- a/egov-indexer/water-services-meter.yml +++ b/egov-indexer/water-services-meter.yml @@ -1,29 +1,40 @@ ServiceMaps: - serviceName: Meter Connection - rainmaker - version: 1.0.0 - mappings: - - topic: save-ws-meter - configKey: INDEX - indexes: - - name: meter-services - type: general - id: $.id,$.connectionNo - jsonPath: $.meterReadings - customJsonMapping: - indexMapping: {"Data":{"connectionNo":"","meterStatus":"","currentReadingDate":"","currentReading":"","lastReading":"","billingPeriod":"","lastReadingDate":""}} - fieldMapping: - - inJsonPath: $.connectionNo - outJsonPath: $.Data.connectionNo - - inJsonPath: $.meterStatus - outJsonPath: $.Data.meterStatus - - inJsonPath: $.currentReadingDate - outJsonPath: $.Data.currentReadingDate - - inJsonPath: $.currentReading - outJsonPath: $.Data.currentReading - - inJsonPath: $.lastReading - outJsonPath: $.Data.lastReading - - inJsonPath: $.billingPeriod - outJsonPath: $.Data.billingPeriod - - inJsonPath: $.lastReadingDate - outJsonPath: $.Data.lastReadingDate - + serviceName: Meter Connection - rainmaker + version: 1.0.0 + mappings: + - topic: save-ws-meter + configKey: INDEX + indexes: + - name: meter-services + type: general + id: $.id,$.connectionNo + jsonPath: $.meterReadings + customJsonMapping: + indexMapping: {"Data":{"connectionNo":"","meterStatus":"","currentReadingDate":"","currentReading":"","lastReading":"","billingPeriod":"","lastReadingDate":"","tenantData":{}}} + fieldMapping: + - inJsonPath: $.connectionNo + outJsonPath: $.Data.connectionNo + - inJsonPath: $.meterStatus + outJsonPath: $.Data.meterStatus + - inJsonPath: $.currentReadingDate + outJsonPath: $.Data.currentReadingDate + - inJsonPath: $.currentReading + outJsonPath: $.Data.currentReading + - inJsonPath: $.lastReading + outJsonPath: $.Data.lastReading + - inJsonPath: $.billingPeriod + outJsonPath: $.Data.billingPeriod + - inJsonPath: $.lastReadingDate + outJsonPath: $.Data.lastReadingDate + mdmsMapping: + - path: http://mdms-v2:8080/assam/mdms-v2/v1/_search + moduleName: tenant + masterName: tenants + tenantId: as + filter: "[?(@.code == $tenant)]" + filterMapping: + - variable: $tenant + valueJsonpath: $.tenantId + uriResponseMapping: + - inJsonPath: $.MdmsRes.tenant.tenants + outJsonPath: $.Data.tenantData diff --git a/egov-persister/audit-service-persister.yml b/egov-persister/audit-service-persister.yml new file mode 100644 index 0000000..2ccac26 --- /dev/null +++ b/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 diff --git a/egov-persister/boundary-bulk-persister.yml b/egov-persister/boundary-bulk-persister.yml new file mode 100644 index 0000000..52b715e --- /dev/null +++ b/egov-persister/boundary-bulk-persister.yml @@ -0,0 +1,43 @@ +serviceMaps: + serviceName: Boundary Bulk Service + mappings: + - version: 1.0 + name: CreateBulkBoundaries + description: Persist details for bulk boundary creation in table eg_boundary_bulk_details + fromTopic: save-boundary-details + isTransaction: true + queryMaps: + - query: INSERT INTO eg_boundary_bulk_details(id, tenantId, hierarchyType, fileStoreId,"status",processedFileStoreId, additionalDetails,createdTime, lastModifiedTime, createdBy, lastModifiedBy) VALUES (?, ?,?, ?,?,?, ?, ?, ?, ?, ?); + basePath: $.boundaryDetails + jsonMaps: + - jsonPath: $.boundaryDetails.id + - jsonPath: $.boundaryDetails.tenantId + - jsonPath: $.boundaryDetails.hierarchyType + - jsonPath: $.boundaryDetails.fileStoreId + - jsonPath: $.boundaryDetails.status + - jsonPath: $.boundaryDetails.processedFileStoreId + - jsonPath: $.boundaryDetails.additionalDetails + type: JSON + dbType: JSONB + - jsonPath: $.boundaryDetails.auditDetails.createdTime + - jsonPath: $.boundaryDetails.auditDetails.lastModifiedTime + - jsonPath: $.boundaryDetails.auditDetails.createdBy + - jsonPath: $.boundaryDetails.auditDetails.lastModifiedBy + + - version: 1.0 + name: UpdateBulkBoundaries + description: Update details for bulk boundary creation in table eg_boundary_bulk_details + fromTopic: update-boundary-details + isTransaction: true + queryMaps: + - query: UPDATE eg_boundary_bulk_details SET "status" = ?, processedFileStoreId = ?, lastModifiedBy = ?, lastModifiedTime = ?,additionalDetails = ? WHERE id = ?; + basePath: $.boundaryDetails + jsonMaps: + - jsonPath: $.boundaryDetails.status + - jsonPath: $.boundaryDetails.processedFileStoreId + - jsonPath: $.boundaryDetails.auditDetails.lastModifiedBy + - jsonPath: $.boundaryDetails.auditDetails.lastModifiedTime + - jsonPath: $.boundaryDetails.additionalDetails + type: JSON + dbType: JSONB + - jsonPath: $.boundaryDetails.id \ No newline at end of file diff --git a/egov-persister/boundary-persister.yml b/egov-persister/boundary-persister.yml new file mode 100644 index 0000000..efe394d --- /dev/null +++ b/egov-persister/boundary-persister.yml @@ -0,0 +1,126 @@ +serviceMaps: + serviceName: boundary-Service + mappings: + - version: 1.0 + description: Persists the boundary entity data + fromTopic: create-boundary-entity + isTransaction: true + queryMaps: + - query: INSERT INTO boundary (id, tenantId, code, geometry, additionalDetails, createdBy, lastModifiedBy, createdTime, lastModifiedTime) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: $.Boundary.* + jsonMaps: + - jsonPath: $.Boundary.*.id + + - jsonPath: $.Boundary.*.tenantId + + - jsonPath: $.Boundary.*.code + + - jsonPath: $.Boundary.*.geometry + type: JSON + dbType: JSONB + + - jsonPath: $.Boundary.*.additionalDetails + type: JSON + dbType: JSONB + + - jsonPath: $.Boundary.*.auditDetails.createdBy + + - jsonPath: $.Boundary.*.auditDetails.lastModifiedBy + + - jsonPath: $.Boundary.*.auditDetails.createdTime + + - jsonPath: $.Boundary.*.auditDetails.lastModifiedTime + + - version: 1.0 + description: Persists the boundary entity data + fromTopic: update-boundary-entity + isTransaction: true + queryMaps: + - query: UPDATE boundary SET geometry = ? , lastModifiedBy = ? , lastModifiedTime = ? WHERE code = ? AND tenantId = ?; + basePath: $.Boundary.* + jsonMaps: + - jsonPath: $.Boundary.*.geometry + type: JSON + dbType: JSONB + + - jsonPath: $.Boundary.*.auditDetails.lastModifiedBy + + - jsonPath: $.Boundary.*.auditDetails.lastModifiedTime + + - jsonPath: $.Boundary.*.code + + - jsonPath: $.Boundary.*.tenantId + + - version: 1.0 + description: Persists the boundary hierarchy definition data + fromTopic: save-boundary-hierarchy-definition + isTransaction: true + queryMaps: + - query: INSERT INTO boundary_hierarchy (id, tenantId, hierarchyType, boundaryHierarchy, createdTime, createdBy, lastModifiedTime, lastModifiedBy) VALUES (?, ?, ?, ?, ?, ?, ?, ?); + basePath: $.BoundaryHierarchy + jsonMaps: + - jsonPath: $.BoundaryHierarchy.id + + - jsonPath: $.BoundaryHierarchy.tenantId + + - jsonPath: $.BoundaryHierarchy.hierarchyType + + - jsonPath: $.BoundaryHierarchy.boundaryHierarchyJsonNode + type: JSON + dbType: JSONB + + - jsonPath: $.BoundaryHierarchy.auditDetails.createdTime + + - jsonPath: $.BoundaryHierarchy.auditDetails.createdBy + + - jsonPath: $.BoundaryHierarchy.auditDetails.lastModifiedTime + + - jsonPath: $.BoundaryHierarchy.auditDetails.lastModifiedBy + + - version: 1.0 + description: Persists the boundary relationship data + fromTopic: save-boundary-relationship + isTransaction: true + queryMaps: + - query: INSERT INTO boundary_relationship (id, tenantId, code, hierarchyType, boundaryType, parent, ancestralMaterializedPath, createdTime, createdBy, lastModifiedTime, lastModifiedBy) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: $.BoundaryRelationship + jsonMaps: + - jsonPath: $.BoundaryRelationship.id + + - jsonPath: $.BoundaryRelationship.tenantId + + - jsonPath: $.BoundaryRelationship.code + + - jsonPath: $.BoundaryRelationship.hierarchyType + + - jsonPath: $.BoundaryRelationship.boundaryType + + - jsonPath: $.BoundaryRelationship.parent + + - jsonPath: $.BoundaryRelationship.ancestralMaterializedPath + + - jsonPath: $.BoundaryRelationship.auditDetails.createdTime + + - jsonPath: $.BoundaryRelationship.auditDetails.createdBy + + - jsonPath: $.BoundaryRelationship.auditDetails.lastModifiedTime + + - jsonPath: $.BoundaryRelationship.auditDetails.lastModifiedBy + + - version: 1.0 + description: Updates boundary relationship data + fromTopic: update-boundary-relationship + isTransaction: true + queryMaps: + - query: UPDATE boundary_relationship SET parent = ?, ancestralmaterializedpath = ?, lastmodifiedtime = ?, lastmodifiedby = ? WHERE id = ?; + basePath: $.BoundaryRelationshipList.* + jsonMaps: + - jsonPath: $.BoundaryRelationshipList.*.parent + + - jsonPath: $.BoundaryRelationshipList.*.ancestralMaterializedPath + + - jsonPath: $.BoundaryRelationshipList.*.auditDetails.lastModifiedTime + + - jsonPath: $.BoundaryRelationshipList.*.auditDetails.lastModifiedBy + + - jsonPath: $.BoundaryRelationshipList.*.id \ No newline at end of file diff --git a/egov-persister/egov-persister/audit-service-persister.yml b/egov-persister/egov-persister/audit-service-persister.yml new file mode 100644 index 0000000..2ccac26 --- /dev/null +++ b/egov-persister/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 diff --git a/egov-persister/egov-workflow-v2-persister.yml b/egov-persister/egov-workflow-v2-persister.yml index 6671d0e..12e2852 100644 --- a/egov-persister/egov-workflow-v2-persister.yml +++ b/egov-persister/egov-workflow-v2-persister.yml @@ -7,7 +7,7 @@ serviceMaps: 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 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + - query: INSERT INTO eg_wf_processinstance_v2( id,tenantid,businessService,businessId,moduleName,action,status,comment, assigner, stateSla,businessServiceSla, previousStatus, createdby, lastmodifiedby, createdtime, lastmodifiedtime, rating) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: ProcessInstances.* jsonMaps: - jsonPath: $.ProcessInstances.*.id @@ -44,8 +44,6 @@ serviceMaps: - jsonPath: $.ProcessInstances.*.rating - - jsonPath: $.ProcessInstances.*.escalated - diff --git a/egov-persister/hrms-employee-persister.yml b/egov-persister/hrms-employee-persister.yml index bbee07c..3f1440b 100644 --- a/egov-persister/hrms-employee-persister.yml +++ b/egov-persister/hrms-employee-persister.yml @@ -221,7 +221,7 @@ serviceMaps: - jsonPath: $.Employees.*.jurisdictions.*.boundary - - jsonPath: $.Employees[*][?({id} in @.jurisdictions[*].id)].tenantId + - jsonPath: $.Employees.*.jurisdictions.*.tenantId - jsonPath: $.Employees.*.jurisdictions.*.isActive @@ -463,7 +463,7 @@ serviceMaps: - jsonPath: $.Employees.*.jurisdictions.*.boundary - - jsonPath: $.Employees[*][?({id} in @.jurisdictions[*].id)].tenantId + - jsonPath: $.Employees.*.jurisdictions.*.tenantId - jsonPath: $.Employees.*.jurisdictions.*.isActive diff --git a/egov-persister/water-persist.yml b/egov-persister/water-persist.yml index eb3442d..0b9d97e 100644 --- a/egov-persister/water-persist.yml +++ b/egov-persister/water-persist.yml @@ -6,8 +6,8 @@ serviceMaps: description: create ConnectionDetails in connection and water_service_connection fromTopic: save-ws-connection isTransaction: true - queryMaps: - - query: INSERT INTO eg_ws_connection (id, tenantid, property_id, applicationno, applicationstatus, status, ihlDetail, sbmAccountno, schemeId, schemeName, connectionno, oldconnectionno,imisNumber, villageId,roadcuttingarea,action,roadtype, createdby, lastmodifiedby, createdtime, lastmodifiedtime, applicationtype, dateEffectiveFrom, locality, isoldapplication,additionaldetails,previousReadingDate,arrears,paymentType,penalty,advance) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?); + queryMaps: + - query: INSERT INTO eg_ws_connection (id, tenantid, property_id, applicationno, applicationstatus, status, ihlDetail, sbmAccountno, schemeId, schemeName, connectionno, oldconnectionno,imisNumber, villageId,roadcuttingarea,action,roadtype, createdby, lastmodifiedby, createdtime, lastmodifiedtime, applicationtype, dateEffectiveFrom, locality, isoldapplication, isdataverified,additionaldetails,previousReadingDate,arrears,paymentType,penalty,advance) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?); basePath: $.WaterConnection jsonMaps: - jsonPath: $.WaterConnection.id @@ -60,6 +60,8 @@ serviceMaps: - jsonPath: $.WaterConnection.oldApplication + - jsonPath: $.WaterConnection.dataVerified + - jsonPath: $.WaterConnection.additionalDetails type: JSON dbType: JSONB @@ -185,8 +187,8 @@ serviceMaps: basePath: $.WaterConnection jsonMaps: - jsonPath: $.WaterConnection.id - - - query: UPDATE eg_ws_connection SET applicationstatus=?, status=?, connectionno=?, ihlDetail=?, sbmAccountno=?, schemeId=?, schemeName=?, oldconnectionno=?,imisNumber=?,villageId=?, action=?, roadCuttingArea=?, roadType=?, adhocpenalty=?, adhocrebate=?, adhocpenaltyreason=?, adhocpenaltycomment=?, adhocrebatereason=?, adhocrebatecomment=?, lastModifiedBy=?, lastModifiedTime=?, dateEffectiveFrom=?, locality=?, previousReadingDate=?, isoldapplication=?, property_id=?, arrears=?, paymentType=?, penalty=?,advance=?, additionaldetails=? WHERE id=?; + + - query: UPDATE eg_ws_connection SET applicationstatus=?, status=?, connectionno=?, ihlDetail=?, sbmAccountno=?, schemeId=?, schemeName=?, oldconnectionno=?,imisNumber=?,villageId=?, action=?, roadCuttingArea=?, roadType=?, adhocpenalty=?, adhocrebate=?, adhocpenaltyreason=?, adhocpenaltycomment=?, adhocrebatereason=?, adhocrebatecomment=?, lastModifiedBy=?, lastModifiedTime=?, dateEffectiveFrom=?, locality=?, previousReadingDate=?, isoldapplication=?, isdataverified=?, property_id=?, arrears=?, paymentType=?, penalty=?,advance=?, additionaldetails=? WHERE id=?; basePath: $.WaterConnection jsonMaps: @@ -240,6 +242,8 @@ serviceMaps: - jsonPath: $.WaterConnection.oldApplication + - jsonPath: $.WaterConnection.dataVerified + - jsonPath: $.WaterConnection.propertyId - jsonPath: $.WaterConnection.arrears diff --git a/egov-persister/ws-cal-demand-change-audit.yml b/egov-persister/ws-cal-demand-change-audit.yml new file mode 100644 index 0000000..7786a2e --- /dev/null +++ b/egov-persister/ws-cal-demand-change-audit.yml @@ -0,0 +1,28 @@ +serviceMaps: + serviceName: egov-notification-sms + mappings: + - version: 1.0 + description: Save demand change from ws-cal audit details in tables + fromTopic: save-ws-demand-change-audit + isTransaction: true + queryMaps: + + - query: INSERT INTO eg_ws_demand_auditchange ( id, consumercode, tenant_id, status, action, data, createdby, createdtime ) VALUES (?, ?, ?, ?, ?, ?, ?, ?); + basePath: $.WsDemandChangeAuditRequest + jsonMaps: + - jsonPath: $.WsDemandChangeAuditRequest.id + + - jsonPath: $.WsDemandChangeAuditRequest.consumercode + + - jsonPath: $.WsDemandChangeAuditRequest.tenant_id + + - jsonPath: $.WsDemandChangeAuditRequest.status + + - jsonPath: $.WsDemandChangeAuditRequest.action + + - jsonPath: $.WsDemandChangeAuditRequest.data + type: JSON + dbType: JSONB + - jsonPath: $.WsDemandChangeAuditRequest.createdby + + - jsonPath: $.WsDemandChangeAuditRequest.createdtime diff --git a/pdf-service/data-config/ws-bill-nm-v2.json b/pdf-service/data-config/ws-bill-nm-v2.json new file mode 100644 index 0000000..d5a5248 --- /dev/null +++ b/pdf-service/data-config/ws-bill-nm-v2.json @@ -0,0 +1,940 @@ +{ + "key": "ws-bill-nm-v2", + "DataConfigs": { + "serviceName": "mgramseva-common", + "version": "1.0.0", + "baseKeyPath": "$.BillAndDemand", + "entityIdPath": "$.Bill[0].billNumber", + "isCommonTableBorderRequired": true, + "mappings": [ + { + "topic": "common-pdf-generation-1", + "mappings": [ + { + "direct": + [ + { + "variable": "gpwsc_name", + "value": { + "path": "PDF_STATIC_LABEL_WATER_GPWSC_NAME" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "GPWSC", + "value": { + "path": "$.Bill[0].tenantId" + }, + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "connection_id", + "value": { + "path": "PDF_STATIC_LABEL_WATER_BILL_CONNECTION_ID" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "consumer_name", + "value": { + "path": "PDF_STATIC_LABEL_WATER_BILL_CONSUMER_NAME" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "consumer_mobileno", + "value": { + "path": "PDF_STATIC_LABEL_WATER_BILL_CONSUMER_MOBILE_NO" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "consumer_address", + "value": { + "path": "PDF_STATIC_LABEL_WATER_CONSUMER_ADDRESS" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "service_type", + "value": { + "path": "PDF_STATIC_LABEL_WATER_SERVICE_TYPE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "meter_no", + "value": { + "path": "PDF_STATIC_LABEL_WATER_METER_NUMBER" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "meter_reading", + "value": { + "path": "PDF_STATIC_LABEL_WATER_METER_READING" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "meter_reading_date", + "value": { + "path": "PDF_STATIC_LABEL_WATER_METER_READING_DATE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "bill_id", + "value": { + "path": "PDF_STATIC_LABEL_WATER_BILL_ID" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "bill_period", + "value": { + "path": "PDF_STATIC_LABEL_WATER_BILL_PERIOD" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "bill_issue_date", + "value": { + "path": "PDF_STATIC_LABEL_WATER_BILL_ISSUE_DATE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "latest_demand_generated_date", + "value": { + "path": "PDF_STATIC_LABEL_LATEST_DEMAND_GENERATED_DATE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "latest_penalty_created_date", + "value": { + "path": "PDF_STATIC_LABEL_LATEST_PENALTY_CREATED_DATE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "water_charges", + "value": { + "path": "PDF_STATIC_LABEL_WATER_CHARGES" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "water_arrears", + "value": { + "path": "PDF_STATIC_LABEL_WATER_ARREARS" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "total_bill_amount", + "value": { + "path": "PDF_STATIC_LABEL_WATER_TOTAL_BILL_AMOUNT" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "advance_adjusted_amount", + "value": { + "path": "PDF_STATIC_LABEL_WATER_ADVANCE_ADJUSTED_AMOUNT" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "net_amount_due", + "value": { + "path": "PDF_STATIC_LABEL_WATER_NET_AMOUNT_DUE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "penalty_after_due_date", + "value": { + "path": "PDF_STATIC_LABEL_WATER_PENALTY_AFTER_DUE_DATE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "current_penalty", + "value": { + "path": "PDF_STATIC_LABEL_WATER_CURRENT_PENALTY" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "net_amount_due_with_penalty", + "value": { + "path": "PDF_STATIC_LABEL_WATER_NET_AMOUNT_DUE_WITH_PENALTY" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "total_due", + "value": { + "path": "PDF_STATIC_LABEL_WATER_TOTAL_DUE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "amount_inwords", + "value": { + "path": "PDF_STATIC_LABEL_WATER_AMOUNT_INWORDS" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "bill_note", + "value": { + "path": "PDF_STATIC_LABEL_WS_BILL_NOTE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "customer_rating", + "value": { + "path": "PDF_STATIC_LABEL_WATER_CUSTOMER_RATING" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "quality_water_supply", + "value": { + "path": "PDF_STATIC_LABEL_WATER_QUALITY_WATER_SUPPLY" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "adequate_water_supply", + "value": { + "path": "PDF_STATIC_LABEL_WATER_ADEQUATE_WATER_SUPPLY" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "collections", + "value": { + "path": "PDF_STATIC_LABEL_WATER_COLLECTIONS" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "new_demand", + "value": { + "path": "PDF_STATIC_LABEL_WATER_NEW_DEMAND" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "actual_collections", + "value": { + "path": "PDF_STATIC_LABEL_WATER_ACTUAL_COLLECTIONS" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "total_pending_collections", + "value": { + "path": "PDF_STATIC_LABEL_WATER_TOTAL_PENDING_COLLECTIONS" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "expenditure", + "value": { + "path": "PDF_STATIC_LABEL_WATER_EXPENDITURE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "new_expenditure", + "value": { + "path": "PDF_STATIC_LABEL_WATER_NEW_EXPENDITURE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "actual_payments", + "value": { + "path": "PDF_STATIC_LABEL_WATER_ACTUAL_PAYMENTS" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "total_pending_expenditure", + "value": { + "path": "PDF_STATIC_LABEL_WATER_TOTAL_PENDING_EXPENDITURE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "gp_watersupply_sanitation", + "value": { + "path": "PDF_STATIC_LABEL_WATER_GP_WATER_SUPPLY_SANITATION" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "charges_bill", + "value": { + "path": "PDF_STATIC_LABEL_WATER_CHARGES_BILL" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "breakup_pending_watercharges", + "value": { + "path": "PDF_STATIC_LABEL_WATER_BREAKUP_PENDING_WATERCHARGES" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "water_id", + "value": { + "path": "PDF_STATIC_LABEL_WATER_ID" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "month_summary", + "value": { + "path": "PDF_STATIC_LABEL_WATER_PREVIOUS_MONTH_SUMMARY_NM" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "user_feedback", + "value": { + "path": "PDF_STATIC_LABEL_WATER_USER_FEEDBACK" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "summary_of", + "value": { + "path": "PDF_STATIC_LABEL_WATER_SUMMARY_OF" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "totalAmountDue", + "value": { + "path": "$.AggregatedDemands.netDueWithPenalty" + } + }, + { + "variable": "total", + "value": { + "path": "$.Bill[0].totalAmount" + } + }, + { + "variable": "totalAmountDueWithPenalty", + "value": { + "path": "$.AggregatedDemands.netDueWithPenalty" + } + }, + { + "variable": "mobileNo", + "value": { + "path": "$.Bill[0].mobileNumber" + } + }, + { + "variable": "billNo", + "value": { + "path": "$.Bill[0].billNumber" + } + }, + { + "variable": "fromPeriod", + "value": { + "path": "$.Bill[0].billDetails" + }, + "type":"function", + "format":"var y=0,x=arguments[0];x.sort(function(a, b){return b.fromPeriod - a.fromPeriod}); return (((new Date(x[0].fromPeriod+19800000).getDate())<10?'0'+new Date(x[0].fromPeriod+19800000).getDate():new Date(x[0].fromPeriod+19800000).getDate())+'/'+((new Date(x[0].fromPeriod+19800000).getMonth()+1)<10?'0'+(new Date(x[0].fromPeriod+19800000).getMonth()+1):(new Date(x[0].fromPeriod+19800000).getMonth()+1))+'/'+new Date(x[0].fromPeriod+19800000).getFullYear())" + }, + { + "variable": "toPeriod", + "value": { + "path": "$.Bill[0].billDetails" + }, + "type":"function", + "format":"var y=0,x=arguments[0];x.sort(function(a, b){return b.toPeriod - a.toPeriod}); return (((new Date(x[0].toPeriod+19800000).getDate())<10?('0'+new Date(x[0].toPeriod+19800000).getDate()):new Date(x[0].toPeriod+19800000).getDate())+'/'+((new Date(x[0].toPeriod+19800000).getMonth()+1)<10?('0'+(new Date(x[0].toPeriod+19800000).getMonth()+1)):(new Date(x[0].toPeriod+19800000).getMonth()+1))+'/'+new Date(x[0].toPeriod+19800000).getFullYear())" + }, + { + "variable": "billIssueDate", + "value": { + "path": "$.Bill[0].billDate" + }, + "type": "date" + }, + { + "variable": "billDueDate", + "value": { + "path": "$.Bill[0].billDetails[0].expiryDate" + }, + "type": "date" + }, + { + "variable": "billdate", + "value": { + "path": "$.Bill[0].billDate" + }, + "type": "date" + }, + { + "variable": "propertyID", + "value": { + "path": "$.Bill[0].consumerCode" + } + }, + { + "variable": "consumerID", + "value": { + "path": "$.Bill[0].consumerCode" + } + }, + { + "variable": "date", + "value": { + "path": "$.Bill[0].billDate" + }, + "type": "date" + }, + { + "variable": "totalArrears", + "value": { + "path":"$.AggregatedDemands.totalAreasWithPenalty" + } + }, + { + "variable": "arrears", + "value": { + "path":"$.Bill[0].billDetails" + }, + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + }, + "type":"function", + "format":"var y=[],x=arguments[0];x.sort(function(a, b){return b.fromPeriod - a.fromPeriod});for( var i=1;ix != 'NA').join(', ')" + }, + { + "variable":"advanceAdjustedAmount", + "formula":"-{{advanceAdjustedAmountOne}}" + }, + { + "variable":"ws_charge_amt", + "formula":"{{CurrentMonthWaterCharge}}-{{advanceAdjustedAmount}}" + }, + { + "variable":"totalArrear", + "formula":"{{totalArrears}}<0?0:{{totalArrears}}" + }, + { + "variable":"totalBillAmount", + "formula":"{{CurrentMonthWaterCharge}} + {{totalArrear}} + {{current_month_penalty}} - {{advanceAdjustedAmount}}" + }, + { + "variable":"netAmountDue", + "formula":"{{totalBillAmount}}+{{advanceAdjustedAmount}}" + }, + { + "variable":"netAmountDueWithPenalty", + "formula":"{{netAmountDue}}+{{totalApplicablePenalty}}" + }, + { + "variable":"penaltyDueDateOld", + "formula":"{{billExpiry}}+{{demandIssuedDate}}", + "type":"date" + }, + { + "variable": "penaltyDueDate", + "formula": "{{billIssueTime}} + 864000000", + "type": "date" + }, + { + "variable": "totalApplicablePenaltyText", + "formula": "{{totalApplicablePenalty}} > 0 ? [{'text': 'text' , 'value': {{totalApplicablePenalty}} }] : []" + }, + { + "variable": "netAmountDueWithPenaltyText", + "formula": "{{totalApplicablePenalty}} > 0 ? [{'text': 'text' , 'value': {{netAmountDueWithPenalty}} }] : []" + }, + { + "variable": "latestDemandPenaltyCreatedtimeText", + "formula": "{{latestDemandPenaltyCreatedtime}} > 0 ? [{'text': 'text' , 'value': {{latestDemandPenaltyCreatedtime}} }] : []" + } + ] + }, + { + "externalAPI": [ + { + "path": "http://mdms-v2:8080/assam/mdms-v2/v1/_get", + "queryParam": "moduleName=tenant&masterName=tenants&tenantId={$.Bill[0].tenantId}&filter=%5B?(@.code=='{$.Bill[0].tenantId}')%5D", + "apiRequest": null, + "responseMapping":[ + { + "variable":"tenantaddress", + "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":"mgramseva-common" + } + } + ] + }, + { + "path": "http://ws-services.assam:8080/assam/ws-services/wc/_search", + "queryParam": "tenantId=$.Bill[0].tenantId,connectionNumber=$.Bill[0].consumerCode", + "apiRequest": null, + "responseMapping": [ + { + "variable": "meternumber", + "value": "$.WaterConnection[(@.length-1)].meterId" + },{ + "variable": "serviceType", + "value": "$.WaterConnection[(@.length-1)].connectionType", + "localisation":{ + "required":true, + "prefix": "WS", + "module":"mgramseva-common" + } + },{ + "variable": "payerName", + "value": "$.WaterConnection[(@.length-1)].connectionHolders[0].name" + },{ + "variable": "doorHouseNo", + "value": "$.WaterConnection[(@.length-1)].additionalDetails.doorNo", + "type":"setEmpty" + }, + { + "variable": "streetName", + "value": "$.WaterConnection[(@.length-1)].additionalDetails.street", + "type":"setEmpty" + }, { + "variable": "mohalla", + "value": "$.WaterConnection[(@.length-1)].additionalDetails.locality" + } + ] + }, + { + "path": "http://ws-services.assam:8080/assam/ws-services/wc/_getfeedback", + "queryParam": "tenantId=$.Bill[0].tenantId", + "apiRequest": null, + "responseMapping": [ + { + "variable": "watersupply_rate", + "value": "$.feedback.HAPPY_WATER_SUPPLY" + }, + { + "variable": "waterquality_rate", + "value": "$.feedback.WATER_QUALITY_GOOD" + }, + { + "variable": "supplyregula_rate", + "value": "$.feedback.WATER_SUPPLY_REGULAR" + } + ] + }, + { + "path": "http://ws-services.assam:8080/assam/ws-services/wc/_lastMonthSummary", + "queryParam": "tenantId=$.Bill[0].tenantId,currentDate=$.Bill[0].billDate", + "apiRequest": null, + "responseMapping": [ + { + "variable": "pendingcollection", + "value": "$.LastMonthSummary.cumulativePendingCollection" + }, + { + "variable": "newdemand", + "value": "$.LastMonthSummary.newDemand" + }, + { + "variable": "actualcollection", + "value": "$.LastMonthSummary.actualCollection" + }, + { + "variable": "previousMonthYear", + "value": "$.LastMonthSummary.previousMonthYear" + } + ] + }, + { + "path": "http://billing-service:8080/assam/billing-service/demand/_history", + "queryParam": "tenantId=$.Bill[0].tenantId,consumerCode=$.Bill[0].consumerCode,businessService=$.Bill[0].businessService", + "apiRequest": null, + "responseMapping": [{ + "variable": "advanceAdjustedAmountOne", + "value": "$.AdvanceAdjustedAmount" + }, + { + "variable": "WCharge", + "value": "$.WaterCharge" + }, + { + "variable": "totalBillTaxAmount", + "value": "$.Demands[(@.length-1)].demandDetails[(@.length-1)].taxAmount" + },{ + "variable": "totalBillCollectionAmount", + "value": "$.Demands[(@.length-1)].demandDetails[(@.length-1)].collectionAmount" + }, + { + "variable": "billExpiry", + "value": "$.Demands[(@.length-1)].billExpiryTime" + }, + { + "variable": "demandIssuedDate", + "value": "$.Demands[(@.length-1)].auditDetails.createdTime" + } + + ] + }, + { + "path": "http://echallan-services.assam:8080/assam/echallan-services/eChallan/v1/_lastMonthSummary", + "queryParam": "tenantId=$.Bill[0].tenantId,currentDate=$.Bill[0].billDate", + "apiRequest": null, + "responseMapping": [ + { + "variable": "actualpayment", + "value": "$.LastMonthSummary.previousMonthCollection" + }, + { + "variable": "newexpenditure", + "value": "$.LastMonthSummary.previousMonthNewExpense" + }, + { + "variable": "pendingexpenditure", + "value": "$.LastMonthSummary.cumulativePendingExpense" + }, + { + "variable": "previousMonthYear", + "value": "$.LastMonthSummary.previousMonthYear" + } + + ] + } + ] + } + ] + } + ] + } +} \ No newline at end of file diff --git a/pdf-service/data-config/ws-bill-v2.json b/pdf-service/data-config/ws-bill-v2.json new file mode 100644 index 0000000..d6c78d5 --- /dev/null +++ b/pdf-service/data-config/ws-bill-v2.json @@ -0,0 +1,1012 @@ +{ + "key": "ws-bill-v2", + "DataConfigs": { + "serviceName": "mgramseva-common", + "version": "1.0.0", + "baseKeyPath": "$.BillAndDemand", + "entityIdPath": "$.Bill[0].billNumber", + "isCommonTableBorderRequired": true, + "mappings": [ + { + "topic": "common-pdf-generation-1", + "mappings": [ + { + "direct": + [ + { + "variable": "gpwsc_name", + "value": { + "path": "PDF_STATIC_LABEL_WATER_GPWSC_NAME" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "connection_id", + "value": { + "path": "PDF_STATIC_LABEL_WATER_BILL_CONNECTION_ID" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "consumer_name", + "value": { + "path": "PDF_STATIC_LABEL_WATER_BILL_CONSUMER_NAME" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "consumer_mobileno", + "value": { + "path": "PDF_STATIC_LABEL_WATER_BILL_CONSUMER_MOBILE_NO" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "consumer_address", + "value": { + "path": "PDF_STATIC_LABEL_WATER_CONSUMER_ADDRESS" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "service_type", + "value": { + "path": "PDF_STATIC_LABEL_WATER_SERVICE_TYPE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "meter_no", + "value": { + "path": "PDF_STATIC_LABEL_WATER_METER_NUMBER" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "meter_reading", + "value": { + "path": "PDF_STATIC_LABEL_WATER_METER_READING" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "meter_reading_date", + "value": { + "path": "PDF_STATIC_LABEL_WATER_METER_READING_DATE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "bill_id", + "value": { + "path": "PDF_STATIC_LABEL_WATER_BILL_ID" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "bill_period", + "value": { + "path": "PDF_STATIC_LABEL_WATER_BILL_PERIOD" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "bill_issue_date", + "value": { + "path": "PDF_STATIC_LABEL_WATER_BILL_ISSUE_DATE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "latest_demand_generated_date", + "value": { + "path": "PDF_STATIC_LABEL_LATEST_DEMAND_GENERATED_DATE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "latest_penalty_created_date", + "value": { + "path": "PDF_STATIC_LABEL_LATEST_DEMAND_CREATED_DATE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "water_charges", + "value": { + "path": "PDF_STATIC_LABEL_WATER_CHARGES" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "water_charges_roundoff", + "value": { + "path": "PDF_STATIC_LABEL_WATER_CHARGES_ROUNDOFF" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "water_arrears", + "value": { + "path": "PDF_STATIC_LABEL_WATER_ARREARS" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "total_bill_amount", + "value": { + "path": "PDF_STATIC_LABEL_WATER_TOTAL_BILL_AMOUNT" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "advance_adjusted_amount", + "value": { + "path": "PDF_STATIC_LABEL_WATER_ADVANCE_ADJUSTED_AMOUNT" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "net_amount_due", + "value": { + "path": "PDF_STATIC_LABEL_WATER_NET_AMOUNT_DUE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "penalty_after_due_date", + "value": { + "path": "PDF_STATIC_LABEL_WATER_PENALTY_AFTER_DUE_DATE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "current_penalty", + "value": { + "path": "PDF_STATIC_LABEL_WATER_CURRENT_PENALTY" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "net_amount_due_with_penalty", + "value": { + "path": "PDF_STATIC_LABEL_WATER_NET_AMOUNT_DUE_WITH_PENALTY" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "total_due", + "value": { + "path": "PDF_STATIC_LABEL_WATER_TOTAL_DUE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "amount_inwords", + "value": { + "path": "PDF_STATIC_LABEL_WATER_AMOUNT_INWORDS" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "bill_note", + "value": { + "path": "PDF_STATIC_LABEL_WS_BILL_NOTE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "customer_rating", + "value": { + "path": "PDF_STATIC_LABEL_WATER_CUSTOMER_RATING" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "quality_water_supply", + "value": { + "path": "PDF_STATIC_LABEL_WATER_QUALITY_WATER_SUPPLY" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "adequate_water_supply", + "value": { + "path": "PDF_STATIC_LABEL_WATER_ADEQUATE_WATER_SUPPLY" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "collections", + "value": { + "path": "PDF_STATIC_LABEL_WATER_COLLECTIONS" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "new_demand", + "value": { + "path": "PDF_STATIC_LABEL_WATER_NEW_DEMAND" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "actual_collections", + "value": { + "path": "PDF_STATIC_LABEL_WATER_ACTUAL_COLLECTIONS" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "total_pending_collections", + "value": { + "path": "PDF_STATIC_LABEL_WATER_TOTAL_PENDING_COLLECTIONS" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "expenditure", + "value": { + "path": "PDF_STATIC_LABEL_WATER_EXPENDITURE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "new_expenditure", + "value": { + "path": "PDF_STATIC_LABEL_WATER_NEW_EXPENDITURE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "actual_payments", + "value": { + "path": "PDF_STATIC_LABEL_WATER_ACTUAL_PAYMENTS" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "total_pending_expenditure", + "value": { + "path": "PDF_STATIC_LABEL_WATER_TOTAL_PENDING_EXPENDITURE" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "gp_watersupply_sanitation", + "value": { + "path": "PDF_STATIC_LABEL_WATER_GP_WATER_SUPPLY_SANITATION" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "charges_bill", + "value": { + "path": "PDF_STATIC_LABEL_WATER_CHARGES_BILL" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "breakup_pending_watercharges", + "value": { + "path": "PDF_STATIC_LABEL_WATER_BREAKUP_PENDING_WATERCHARGES" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "water_id", + "value": { + "path": "PDF_STATIC_LABEL_WATER_ID" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "month_summary", + "value": { + "path": "PDF_STATIC_LABEL_WATER_PREVIOUS_MONTH_SUMMARY" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "user_feedback", + "value": { + "path": "PDF_STATIC_LABEL_WATER_USER_FEEDBACK" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "summary_of", + "value": { + "path": "PDF_STATIC_LABEL_WATER_SUMMARY_OF" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "GPWSC", + "value": { + "path": "$.Bill[0].tenantId" + }, + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, + { + "variable": "totalAmountDue", + "value": { + "path": "$.AggregatedDemands.netDueWithPenalty" + } + }, + { + "variable": "total", + "value": { + "path": "$.Bill[0].totalAmount" + } + }, + { + "variable": "mobileNo", + "value": { + "path": "$.Bill[0].mobileNumber" + } + }, + { + "variable": "billNo", + "value": { + "path": "$.Bill[0].billNumber" + } + }, + { + "variable": "fromPeriod", + "value": { + "path": "$.Bill[0].billDetails" + }, + "type":"function", + "format":"var y=0,x=arguments[0];x.sort(function(a, b){return b.fromPeriod - a.fromPeriod}); return (((new Date(x[0].fromPeriod+19800000).getDate())<10?'0'+new Date(x[0].fromPeriod+19800000).getDate():new Date(x[0].fromPeriod+19800000).getDate())+'/'+((new Date(x[0].fromPeriod+19800000).getMonth()+1)<10?'0'+(new Date(x[0].fromPeriod+19800000).getMonth()+1):(new Date(x[0].fromPeriod+19800000).getMonth()+1))+'/'+new Date(x[0].fromPeriod+19800000).getFullYear())" + }, + { + "variable": "toPeriod", + "value": { + "path": "$.Bill[0].billDetails" + }, + "type":"function", + "format":"var y=0,x=arguments[0];x.sort(function(a, b){return b.toPeriod - a.toPeriod}); return (((new Date(x[0].toPeriod+19800000).getDate())<10?('0'+new Date(x[0].toPeriod+19800000).getDate()):new Date(x[0].toPeriod+19800000).getDate())+'/'+((new Date(x[0].toPeriod+19800000).getMonth()+1)<10?('0'+(new Date(x[0].toPeriod+19800000).getMonth()+1)):(new Date(x[0].toPeriod+19800000).getMonth()+1))+'/'+new Date(x[0].toPeriod+19800000).getFullYear())" + }, + { + "variable": "billIssueDate", + "value": { + "path": "$.Bill[0].billDate" + }, + "type": "date" + }, + { + "variable": "billDueDate", + "value": { + "path": "$.Bill[0].billDetails[0].expiryDate" + }, + "type": "date" + }, + { + "variable": "billdate", + "value": { + "path": "$.Bill[0].billDate" + }, + "type": "date" + }, + { + "variable": "propertyID", + "value": { + "path": "$.Bill[0].consumerCode" + } + }, + { + "variable": "waterCess", + "value": { + "path": "$.Bill[0].billDetails[0].billAccountDetails[?(@.taxHeadCode == 'WS_WATER_CESS' || @.taxHeadCode == 'SW_SEWERAGE_CESS')].amount" + } + }, + { + "variable": "ceilingDebit", + "value": { + "path": "$.Bill[0].billDetails[0].billAccountDetails[?(@.taxHeadCode == 'PT_DECIMAL_CEILING_DEBIT')].amount" + } + }, + { + "variable": "ceilingCredit", + "value": { + "path": "$.Bill[0].billDetails[0].billAccountDetails[?(@.taxHeadCode == 'PT_DECIMAL_CEILING_CREDIT')].amount" + } + }, + { + "variable": "consumerID", + "value": { + "path": "$.Bill[0].consumerCode" + } + }, + { + "variable": "date", + "value": { + "path": "$.Bill[0].billDate" + }, + "type": "date" + }, + { + "variable": "totalPayment", + "value": { + "path": "$.Bill[0].billDetails[0].amountPaid" + } + }, + { + "variable": "totalArrears", + "value": { + "path":"$.AggregatedDemands.totalAreasWithPenalty" + } + }, + { + "variable": "arrears", + "value": { + "path":"$.Bill[0].billDetails" + }, + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + }, + "type":"function", + "format":"var y=[],x=arguments[0];x.sort(function(a, b){return b.fromPeriod - a.fromPeriod});for( var i=1;ix != 'NA').join(', ')" + }, + { + "variable":"advanceAdjustedAmount", + "formula":"-{{advanceAdjustedAmountOne}}" + }, + { + "variable":"advanceAdjustedAmountNew", + "formula":"{{advanceAdjustedAmountOne}} != 0 ? -{{advanceAdjustedAmountOne}} : {{remainingAdvance}}" + }, + { + "variable":"ws_charge_amt", + "formula":"{{CurrentMonthWaterCharge}} -{{advanceAdjustedAmount}}" + }, + { + "variable":"totalArrear", + "formula":"{{totalArrears}}<0?0:{{totalArrears}}" + }, + { + "variable":"totalBillAmount", + "formula":"{{CurrentMonthWaterCharge}} + {{currentMonthRoundOff}} + {{totalArrear}} + {{current_month_penalty}} - {{advanceAdjustedAmount}}" + }, + { + "variable":"netAmountDue", + "formula":"{{totalBillAmount}}+{{advanceAdjustedAmount}}+{{remainingAdvance}}" + }, + { + "variable":"netAmountDueWithPenalty", + "formula":"{{netAmountDue}}+{{totalApplicablePenalty}}" + }, + { + "variable":"penaltyDueDateOld", + "formula":"{{billExpiry}}+{{demandIssuedDate}}", + "type":"date" + }, + { + "variable": "penaltyDueDate", + "formula": "{{billIssueTime}} + 864000000", + "type": "date" + }, + { + "variable": "totalApplicablePenaltyText", + "formula": "{{totalApplicablePenalty}} > 0 ? [{'text': 'text' , 'value': {{totalApplicablePenalty}} }] : []" + }, + { + "variable": "netAmountDueWithPenaltyText", + "formula": "{{totalApplicablePenalty}} > 0 ? [{'text': 'text' , 'value': {{netAmountDueWithPenalty}} }] : []" + }, + { + "variable": "latestDemandPenaltyCreatedtimeText", + "formula": "{{latestDemandPenaltyCreatedtime}} > 0 ? [{'text': 'text' , 'value': {{latestDemandPenaltyCreatedtime}} }] : []" + } + ] + }, + { + "externalAPI": [ + { + "path": "http://mdms-v2.assam:8080/mdms-v2/v1/_get", + "queryParam": "moduleName=tenant&masterName=tenants&tenantId={$.Bill[0].tenantId}&filter=%5B?(@.code=='{$.Bill[0].tenantId}')%5D", + "apiRequest": null, + "responseMapping":[ + { + "variable":"tenantaddress", + "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":"mgramseva-common" + } + } + ] + }, + { + "path": "http://ws-services.assam:8080/assam/ws-services/wc/_search", + "queryParam": "tenantId=$.Bill[0].tenantId,connectionNumber=$.Bill[0].consumerCode", + "apiRequest": null, + "responseMapping": [ + { + "variable": "meternumber", + "value": "$.WaterConnection[(@.length-1)].meterId" + },{ + "variable": "serviceType", + "value": "$.WaterConnection[(@.length-1)].connectionType", + "localisation":{ + "required":true, + "prefix": "WS", + "module":"mgramseva-common" + } + },{ + "variable": "payerName", + "value": "$.WaterConnection[(@.length-1)].connectionHolders[0].name" + },{ + "variable": "doorHouseNo", + "value": "$.WaterConnection[(@.length-1)].additionalDetails.doorNo", + "type":"setEmpty" + }, + { + "variable": "streetName", + "value": "$.WaterConnection[(@.length-1)].additionalDetails.street", + "type":"setEmpty" + }, { + "variable": "mohalla", + "value": "$.WaterConnection[(@.length-1)].additionalDetails.locality" + } + ] + }, + { + "path": "http://ws-calculator.assam:8080/ws-calculator/meterConnection/_search", + "queryParam": "tenantId=$.Bill[0].tenantId,connectionNos=$.Bill[0].consumerCode", + "apiRequest": null, + "responseMapping": [ + { + "variable": "currentmeterreading", + "value": "$.meterReadings[0].currentReading" + },{ + "variable": "lastmeterreading", + "value": "$.meterReadings[0].lastReading" + }, + { + "variable": "meterreading_date", + "value": "$.meterReadings[(@.length-1)].currentReadingDate", + "type": "date" + } + ] + }, + { + "path": "http://ws-services.assam:8080/assam/ws-services/wc/_getfeedback", + "queryParam": "tenantId=$.Bill[0].tenantId,", + "apiRequest": null, + "responseMapping": [ + { + "variable": "watersupply_rate", + "value": "$.feedback.HAPPY_WATER_SUPPLY" + }, + { + "variable": "waterquality_rate", + "value": "$.feedback.WATER_QUALITY_GOOD" + }, + { + "variable": "supplyregula_rate", + "value": "$.feedback.WATER_SUPPLY_REGULAR" + } + ] + }, + { + "path": "http://ws-services.assam:8080/assam/ws-services/wc/_lastMonthSummary", + "queryParam": "tenantId=$.Bill[0].tenantId,currentDate=$.Bill[0].billDate", + "apiRequest": null, + "responseMapping": [ + { + "variable": "pendingcollection", + "value": "$.LastMonthSummary.cumulativePendingCollection" + }, + { + "variable": "newdemand", + "value": "$.LastMonthSummary.newDemand" + }, + { + "variable": "actualcollection", + "value": "$.LastMonthSummary.actualCollection" + }, + { + "variable": "previousMonthYear", + "value": "$.LastMonthSummary.previousMonthYear" + } + ] + }, + { + "path": "http://billing-service.assam:8080/billing-service/demand/_history", + "queryParam": "tenantId=$.Bill[0].tenantId,consumerCode=$.Bill[0].consumerCode,businessService=$.Bill[0].businessService", + "apiRequest": null, + "responseMapping": [{ + "variable": "advanceAdjustedAmountOne", + "value": "$.AdvanceAdjustedAmount" + }, + { + "variable": "WCharge", + "value": "$.WaterCharge" + }, + { + "variable": "advanceAdjustedAmountTwo", + "value": "$.Demands[?(@.consumerType == 'waterConnection-advance')].demandDetails[(@.length-1)].collectionAmount" + }, + { + "variable": "totalBillTaxAmount", + "value": "$.Demands[(@.length-1)].demandDetails[(@.length-1)].taxAmount" + },{ + "variable": "totalBillCollectionAmount", + "value": "$.Demands[(@.length-1)].demandDetails[(@.length-1)].collectionAmount" + }, + { + "variable": "billExpiry", + "value": "$.Demands[(@.length-1)].billExpiryTime" + }, + { + "variable": "demandIssuedDate", + "value": "$.Demands[(@.length-1)].auditDetails.createdTime" + },{ + "variable": "advanceAdjustedAmountOneTax", + "value": "$.Demands[?(@.consumerType == 'waterConnection-advance')].demandDetails[(@.length-1)].taxAmount" + }] + }, + { + "path": "http://echallan-services.assam:8080/assam/echallan-services/eChallan/v1/_lastMonthSummary", + "queryParam": "tenantId=$.Bill[0].tenantId,currentDate=$.Bill[0].billDate", + "apiRequest": null, + "responseMapping": [ + { + "variable": "actualpayment", + "value": "$.LastMonthSummary.previousMonthCollection" + }, + { + "variable": "newexpenditure", + "value": "$.LastMonthSummary.previousMonthNewExpense" + }, + { + "variable": "pendingexpenditure", + "value": "$.LastMonthSummary.cumulativePendingExpense" + }, + { + "variable": "previousMonthYear", + "value": "$.LastMonthSummary.previousMonthYear" + } + ] + } + ] + } + ] + } + ] + } +} \ No newline at end of file diff --git a/pdf-service/data-config/ws-receipt-nm.json b/pdf-service/data-config/ws-receipt-nm.json index 79a4be5..73a5255 100644 --- a/pdf-service/data-config/ws-receipt-nm.json +++ b/pdf-service/data-config/ws-receipt-nm.json @@ -60,6 +60,18 @@ "module": "mgramseva-common" } }, + { + "variable": "current_penalty", + "value": { + "path": "PDF_STATIC_LABEL_WATER_CURRENT_PENALTY" + }, + "type": "label", + "localisation": { + "required": true, + "prefix": null, + "module": "mgramseva-common" + } + }, { "variable": "consumer_address", "value": { @@ -575,16 +587,31 @@ "value": { "path": "$.paymentDetails[0].bill.billDetails" }, + "type":"function", + "format":"var y=0,x=arguments[0];x.sort(function(a, b){return b.fromPeriod - a.fromPeriod});for( var i=1;i