Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update bill-genie.yml #703

Open
wants to merge 1 commit into
base: UAT_V2
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 37 additions & 30 deletions configs/egov-searcher/bill-genie.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ SearchDefinitions:
rowMapperKey: billsearch
query:
baseQuery: with bill_data as (
SELECT conn.status as conn_status,conn.property_id as pid,conn.oldConnectionNo as oldpid,conn.additionaldetails as conn_add,b.id AS b_id, b.mobilenumber,
SELECT conn.status as conn_status,conn.property_id as pid,conn.oldConnectionNo as oldpid,conn.additionaldetails as conn_add,b.id AS b_id, b.mobilenumber,
b.tenantid AS b_tenantid, b.payername AS b_payername,
b.payeraddress AS b_payeraddress, b.payeremail AS b_payeremail,
b.isactive AS b_isactive, b.iscancelled AS b_iscancelled,
Expand Down Expand Up @@ -131,7 +131,7 @@ SearchDefinitions:
INNER JOIN eg_pt_address ptadd ON ptadd.propertyid = pt.id
INNER JOIN eg_pt_owner ptown ON ptown.propertyid = pt.id $where )

select * from bill_data inner join (select max(b_createddate) as maxcreateddate, bd_consumercode from bill_data group by bd_consumercode) as max ON max.maxcreateddate=b_createddate
select * from bill_data inner join (select max(b_createddate) as maxcreateddate, bd_consumercode from bill_data group by bd_consumercode) as max ON max.maxcreateddate=b_createddate
searchParams:
condition: AND
params:
Expand Down Expand Up @@ -166,6 +166,10 @@ SearchDefinitions:
- name: b.status
isMandatory: false
jsonPath: $.searchCriteria.billActive
- name: conn.property_id
isMandatory: false
jsonPath: $.searchCriteria.propertyId


output:
jsonFormat: {"ResponseInfo": {},"Bills": []}
Expand All @@ -180,7 +184,7 @@ SearchDefinitions:
rowMapperKey: billsearch
query:
baseQuery: with bill_data as (
SELECT conn.status as conn_status,conn.property_id as pid,conn.oldConnectionNo as oldpid,conn.additionaldetails as conn_add,b.id AS b_id, b.mobilenumber,
SELECT conn.status as conn_status,conn.property_id as pid,conn.oldConnectionNo as oldpid,conn.additionaldetails as conn_add,b.id AS b_id, b.mobilenumber,
b.tenantid AS b_tenantid, b.payername AS b_payername,
b.payeraddress AS b_payeraddress, b.payeremail AS b_payeremail,
b.isactive AS b_isactive, b.iscancelled AS b_iscancelled,
Expand Down Expand Up @@ -216,7 +220,7 @@ SearchDefinitions:
INNER JOIN eg_pt_address ptadd ON ptadd.propertyid = pt.id
INNER JOIN eg_pt_owner ptown ON ptown.propertyid = pt.id $where )

select * from bill_data inner join (select max(b_createddate) as maxcreateddate, bd_consumercode from bill_data group by bd_consumercode) as max ON max.maxcreateddate=b_createddate
select * from bill_data inner join (select max(b_createddate) as maxcreateddate, bd_consumercode from bill_data group by bd_consumercode) as max ON max.maxcreateddate=b_createddate
searchParams:
condition: AND
params:
Expand Down Expand Up @@ -251,18 +255,21 @@ SearchDefinitions:
- name: b.status
isMandatory: false
jsonPath: $.searchCriteria.billActive
- name: conn.property_id
isMandatory: false
jsonPath: $.searchCriteria.propertyId

output:
jsonFormat: {"ResponseInfo": {},"Bills": []}
outJsonPath: $.Bills
responseInfoPath: $.ResponseInfo
- name: mcollectbills

- name: integratedbills
isCustomerRowMapEnabled: true
rowMapperKey: billsearch
query:
baseQuery: with bill_data as (
SELECT b.id AS b_id, b.mobilenumber,
SELECT conn.status as conn_status,conn.property_id as pid,conn.oldConnectionNo as oldpid,conn.additionaldetails as conn_add,b.id AS b_id, b.mobilenumber,
b.tenantid AS b_tenantid, b.payername AS b_payername,
b.payeraddress AS b_payeraddress, b.payeremail AS b_payeremail,
b.isactive AS b_isactive, b.iscancelled AS b_iscancelled,
Expand All @@ -287,16 +294,18 @@ SearchDefinitions:
ad.taxheadcode AS ad_taxheadcode, ad.demanddetailid,
ad.isactualdemand AS ad_isactualdemand, ad.purpose AS ad_purpose,
ad.additionaldetails as ad_additionaldetails,
challanadd.doorNo as ptadd_doorNo, challanadd.landmark as ptadd_landmark,
challanadd.city as ptadd_city, challanadd.pincode as ptadd_pincode,
challanadd.locality as ptadd_locality, challan.accountid as ptown_userid , challan.createdtime
ptadd.doorNo as ptadd_doorNo, ptadd.landmark as ptadd_landmark,
ptadd.city as ptadd_city, ptadd.pincode as ptadd_pincode,
ptadd.locality as ptadd_locality, ptown.userid as ptown_userid

FROM egbs_bill_v1 b INNER JOIN egbs_billdetail_v1 bd ON b.id = bd.billid AND b.tenantid = bd.tenantid and bd.totalamount > 0
FROM egbs_bill_v1 b INNER JOIN egbs_billdetail_v1 bd ON b.id = bd.billid AND b.tenantid = bd.tenantid AND b.status='ACTIVE'
INNER JOIN egbs_billaccountdetail_v1 ad ON bd.id = ad.billdetail AND bd.tenantid = ad.tenantid
INNER JOIN eg_echallan challan ON bd.consumercode = challan.challanno AND b.status!='CANCELLED'
INNER JOIN eg_challan_address challanadd ON challanadd.eChallanId = challan.id $where )
INNER JOIN eg_ws_connection conn ON bd.consumercode = conn.connectionno
INNER JOIN eg_pt_property pt ON conn.property_id = pt.propertyid
INNER JOIN eg_pt_address ptadd ON ptadd.propertyid = pt.id
INNER JOIN eg_pt_owner ptown ON ptown.propertyid = pt.id $where AND bd.businessservice IN ('WS', 'SW') order by conn.property_id asc)

select * from bill_data inner join (select max(b_createddate) as maxcreateddate, bd_consumercode from bill_data group by bd_consumercode) as max ON max.maxcreateddate=b_createddate
select * from bill_data inner join (select max(b_createddate) as maxcreateddate,bd_businessservice as business from bill_data group by bd_businessservice) as max ON max.business=bd_businessservice
searchParams:
condition: AND
params:
Expand All @@ -307,15 +316,11 @@ SearchDefinitions:
isMandatory: false
jsonPath: $.searchCriteria.consumerCode
operator: ILIKE
- name: bd.businessservice
isMandatory: false
jsonPath: $.searchCriteria.businesService
- name: b.mobilenumber
isMandatory: false
jsonPath: $.searchCriteria.mobileNumber
- name: bd.billno
isMandatory: false
operator: ILIKE
jsonPath: $.searchCriteria.billNo
- name: ptadd.locality
isMandatory: false
Expand All @@ -337,12 +342,12 @@ SearchDefinitions:
outJsonPath: $.Bills
responseInfoPath: $.ResponseInfo

- name: integratedbills
- name: mcollectbills
isCustomerRowMapEnabled: true
rowMapperKey: billsearch
query:
baseQuery: with bill_data as (
SELECT conn.status as conn_status,conn.property_id as pid,conn.oldConnectionNo as oldpid,conn.additionaldetails as conn_add,b.id AS b_id, b.mobilenumber,
SELECT b.id AS b_id, b.mobilenumber,
b.tenantid AS b_tenantid, b.payername AS b_payername,
b.payeraddress AS b_payeraddress, b.payeremail AS b_payeremail,
b.isactive AS b_isactive, b.iscancelled AS b_iscancelled,
Expand All @@ -367,18 +372,16 @@ SearchDefinitions:
ad.taxheadcode AS ad_taxheadcode, ad.demanddetailid,
ad.isactualdemand AS ad_isactualdemand, ad.purpose AS ad_purpose,
ad.additionaldetails as ad_additionaldetails,
ptadd.doorNo as ptadd_doorNo, ptadd.landmark as ptadd_landmark,
ptadd.city as ptadd_city, ptadd.pincode as ptadd_pincode,
ptadd.locality as ptadd_locality, ptown.userid as ptown_userid
challanadd.doorNo as ptadd_doorNo, challanadd.landmark as ptadd_landmark,
challanadd.city as ptadd_city, challanadd.pincode as ptadd_pincode,
challanadd.locality as ptadd_locality, challan.accountid as ptown_userid , challan.createdtime

FROM egbs_bill_v1 b INNER JOIN egbs_billdetail_v1 bd ON b.id = bd.billid AND b.tenantid = bd.tenantid AND b.status='ACTIVE'
FROM egbs_bill_v1 b INNER JOIN egbs_billdetail_v1 bd ON b.id = bd.billid AND b.tenantid = bd.tenantid and bd.totalamount > 0
INNER JOIN egbs_billaccountdetail_v1 ad ON bd.id = ad.billdetail AND bd.tenantid = ad.tenantid
INNER JOIN eg_ws_connection conn ON bd.consumercode = conn.connectionno
INNER JOIN eg_pt_property pt ON conn.property_id = pt.propertyid
INNER JOIN eg_pt_address ptadd ON ptadd.propertyid = pt.id
INNER JOIN eg_pt_owner ptown ON ptown.propertyid = pt.id $where AND bd.businessservice IN ('WS', 'SW') order by conn.property_id asc)
INNER JOIN eg_echallan challan ON bd.consumercode = challan.challanno AND b.status!='CANCELLED'
INNER JOIN eg_challan_address challanadd ON challanadd.eChallanId = challan.id $where )

select * from bill_data inner join (select max(b_createddate) as maxcreateddate,bd_businessservice as business from bill_data group by bd_businessservice) as max ON max.business=bd_businessservice
select * from bill_data inner join (select max(b_createddate) as maxcreateddate, bd_consumercode from bill_data group by bd_consumercode) as max ON max.maxcreateddate=b_createddate
searchParams:
condition: AND
params:
Expand All @@ -389,13 +392,17 @@ SearchDefinitions:
isMandatory: false
jsonPath: $.searchCriteria.consumerCode
operator: ILIKE
- name: bd.businessservice
isMandatory: false
jsonPath: $.searchCriteria.businesService
- name: b.mobilenumber
isMandatory: false
jsonPath: $.searchCriteria.mobileNumber
- name: bd.billno
isMandatory: false
operator: ILIKE
jsonPath: $.searchCriteria.billNo
- name: ptadd.locality
- name: challanadd.locality
isMandatory: false
jsonPath: $.searchCriteria.locality
- name: fromperiod
Expand Down