Skip to content

Commit

Permalink
RAIN-2768 Updated TL searcher for sort issue (#1071)
Browse files Browse the repository at this point in the history
  • Loading branch information
TruptiDadhich-eGov committed Jul 30, 2021
1 parent e52d787 commit ff58f0b
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions egov-searcher/inboxTLSearch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ SearchDefinitions:
query:
baseQuery: Select row_to_json(result) from
(
select DISTINCT(tl.applicationNumber),pi.createdtime from eg_tl_tradelicense as tl
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 pi.createdtime asc $pagination
order by tl.applicationdate asc $pagination
) result
groupBy:
orderBy:
Expand Down Expand Up @@ -62,15 +61,14 @@ SearchDefinitions:
query:
baseQuery: SELECT row_to_json(TotalCount) from (SELECT COUNT(result) from
(
select DISTINCT(tl.applicationNumber),pi.createdtime from eg_tl_tradelicense as tl
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 pi.createdtime asc
order by tl.applicationdate asc
) result) TotalCount
groupBy:
orderBy:
Expand Down Expand Up @@ -114,15 +112,14 @@ SearchDefinitions:
query:
baseQuery: Select row_to_json(result) from
(
select DISTINCT(tl.applicationNumber),pi.createdtime from eg_tl_tradelicense as tl
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 pi.createdtime desc $pagination
order by tl.applicationdate desc $pagination
) result
groupBy:
orderBy:
Expand Down

0 comments on commit ff58f0b

Please sign in to comment.