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

Dev #5

Open
wants to merge 8 commits into
base: DEV
Choose a base branch
from
Open
Show file tree
Hide file tree
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
169 changes: 169 additions & 0 deletions configs/egov-searcher/inboxTLSearch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
SearchDefinitions:
moduleName: tl-services
summary: Trade License Services Inbox API
version: 1.0.0
definitions:
- name: inboxtlsearch
query:
baseQuery: Select row_to_json(result) from
(
select DISTINCT(tl.applicationNumber) as applicationnumber,tl.applicationdate as createdtime from eg_tl_tradelicense as tl
INNER JOIN eg_tl_tradelicensedetail tld ON tl.id = tld.tradelicenseid
INNER JOIN eg_tl_owner owner ON tld.id = owner.tradelicensedetailid
INNER JOIN eg_tl_address tladd ON tladd.tradelicensedetailid = tld.id
INNER JOIN eg_wf_processinstance_v2 pi ON pi.businessid = tl.applicationNumber
LEFT JOIN eg_wf_assignee_v2 assg ON pi.id = assg.processinstanceid
$where
AND pi.createdtime IN (select max(createdtime) from eg_wf_processinstance_v2 wf where wf.businessid = tl.applicationNumber GROUP BY wf.businessid)
order by tl.applicationdate asc $pagination
) result
groupBy:
orderBy:
searchParams:
condition: AND
params:
- name: tl.tenantid
isMandatory: true
jsonPath: $.searchCriteria.tenantId
- name: tl.licenseNumber
isMandatory: false
jsonPath: $.searchCriteria.licenseNumber
- name: tl.oldlicensenumber
isMandatory: false
jsonPath: $.searchCriteria.oldlicensenumber
- name: tladd.locality
isMandatory: false
jsonPath: $.searchCriteria.locality
- name: assg.assignee
isMandatory: false
jsonPath: $.searchCriteria.assignee
- name: pi.status
isMandatory: false
jsonPath: $.searchCriteria.status
- name: tl.applicationNumber
isMandatory: false
jsonPath: $.searchCriteria.applicationNumber
- name: owner.id
isMandatory: false
jsonPath: $.searchCriteria.userid
- name: pi.businessservice
isMandatory: false
jsonPath: $.searchCriteria.businessservice
pagination:
noOfRecords: $.searchCriteria.noOfRecords
offset: $.searchCriteria.offset

output:
jsonFormat: {"ResponseInfo": {},"Licenses": []}
outJsonPath: $.Licenses
responseInfoPath: $.ResponseInfo

- name: inboxtlsearchcount
query:
baseQuery: SELECT row_to_json(TotalCount) from (SELECT COUNT(result) from
(
select DISTINCT(tl.applicationNumber) as applicationnumber,tl.applicationdate as createdtime from eg_tl_tradelicense as tl
INNER JOIN eg_tl_tradelicensedetail tld ON tl.id = tld.tradelicenseid
INNER JOIN eg_tl_owner owner ON tld.id = owner.tradelicensedetailid
INNER JOIN eg_tl_address tladd ON tladd.tradelicensedetailid = tld.id
INNER JOIN eg_wf_processinstance_v2 pi ON pi.businessid = tl.applicationNumber
LEFT JOIN eg_wf_assignee_v2 assg ON pi.id = assg.processinstanceid
$where
AND pi.createdtime IN (select max(createdtime) from eg_wf_processinstance_v2 wf where wf.businessid = tl.applicationNumber GROUP BY wf.businessid)
order by tl.applicationdate asc
) result) TotalCount
groupBy:
orderBy:
searchParams:
condition: AND
params:
- name: tl.tenantid
isMandatory: true
jsonPath: $.searchCriteria.tenantId
- name: tl.licenseNumber
isMandatory: false
jsonPath: $.searchCriteria.licenseNumber
- name: tl.oldlicensenumber
isMandatory: false
jsonPath: $.searchCriteria.oldlicensenumber
- name: tladd.locality
isMandatory: false
jsonPath: $.searchCriteria.locality
- name: assg.assignee
isMandatory: false
jsonPath: $.searchCriteria.assignee
- name: pi.status
isMandatory: false
jsonPath: $.searchCriteria.status
- name: tl.applicationNumber
isMandatory: false
jsonPath: $.searchCriteria.applicationNumber
- name: owner.id
isMandatory: false
jsonPath: $.searchCriteria.userid
- name: pi.businessservice
isMandatory: false
jsonPath: $.searchCriteria.businessservice
pagination:
noOfRecords: $.searchCriteria.noOfRecords
offset: $.searchCriteria.offset

output:
jsonFormat: {"ResponseInfo": {},"TotalCount": {}}
outJsonPath: $.TotalCount
responseInfoPath: $.ResponseInfo

- name: inboxtlsearchdesc
query:
baseQuery: Select row_to_json(result) from
(
select DISTINCT(tl.applicationNumber) as applicationnumber,tl.applicationdate as createdtime from eg_tl_tradelicense as tl
INNER JOIN eg_tl_tradelicensedetail tld ON tl.id = tld.tradelicenseid
INNER JOIN eg_tl_owner owner ON tld.id = owner.tradelicensedetailid
INNER JOIN eg_tl_address tladd ON tladd.tradelicensedetailid = tld.id
INNER JOIN eg_wf_processinstance_v2 pi ON pi.businessid = tl.applicationNumber
LEFT JOIN eg_wf_assignee_v2 assg ON pi.id = assg.processinstanceid
$where
AND pi.createdtime IN (select max(createdtime) from eg_wf_processinstance_v2 wf where wf.businessid = tl.applicationNumber GROUP BY wf.businessid)
order by tl.applicationdate desc $pagination
) result
groupBy:
orderBy:
searchParams:
condition: AND
params:
- name: tl.tenantid
isMandatory: true
jsonPath: $.searchCriteria.tenantId
- name: tl.licenseNumber
isMandatory: false
jsonPath: $.searchCriteria.licenseNumber
- name: tl.oldlicensenumber
isMandatory: false
jsonPath: $.searchCriteria.oldlicensenumber
- name: tladd.locality
isMandatory: false
jsonPath: $.searchCriteria.locality
- name: assg.assignee
isMandatory: false
jsonPath: $.searchCriteria.assignee
- name: pi.status
isMandatory: false
jsonPath: $.searchCriteria.status
- name: tl.applicationNumber
isMandatory: false
jsonPath: $.searchCriteria.applicationNumber
- name: owner.id
isMandatory: false
jsonPath: $.searchCriteria.userid
- name: pi.businessservice
isMandatory: false
jsonPath: $.searchCriteria.businessservice
pagination:
noOfRecords: $.searchCriteria.noOfRecords
offset: $.searchCriteria.offset

output:
jsonFormat: {"ResponseInfo": {},"Licenses": []}
outJsonPath: $.Licenses
responseInfoPath: $.ResponseInfo
Loading