Migration of Process Panel Done

This commit is contained in:
2026-08-12 20:00:22 +05:30
parent 03dfdd6218
commit c308171de5
21 changed files with 417 additions and 546 deletions

View File

@@ -29,8 +29,8 @@ Query28!C0L!select!C0L!select portfolio_id,(portname||' <b>('||count(*)||')</b>'
Query29!C0L!select!C0L!select mvcode,applno,customername,apptype,rv,ov,pv,(case when islocked!=val2 then 1 else 0 end) as islocked,(select (loginid||' ('||displayname||')') from app_user where user_id=islocked) as lockedby,allocation,rcolony,ocolony,pcolony,uuid,portgroup from cutoff_operations where (allocatedby is null or allocatedby=0) and cutoffby>0 and islocked=val2 and company_id=val0 and branch_id=val1 and allocation=1 and portfolio_id=val3 and (rv=1 or ov=1 or pv=1) order by applno,apptype
Query30!C0L!procedure!C0L!select allocatecase('val0',val1,val2,val3,val4,val5,val6,val7,'val8',val9,val10,val11,'val12')
Query31!C0L!update!C0L!update main_operations set islocked=val2 where cutoffby > 0 and (islocked=0 or islocked=val2) and (telesheetby is null or telesheetby=0) and company_id=val0 and branch_id=val1 and telesheet=1
Query32!C0L!select!C0L!select c.portfolio_id,(c.portname||' <b>('||count(*)||')</b>') as portname,sum(c.rtv) as rtv,sum(c.otv) as otv,sum(c.refv) as refv,(case when c.islocked!=val2 then 1 else 0 end) as islocked,c.telesheet,(select (loginid||' ('||displayname||')') from app_user where user_id=c.islocked) as lockedby,pf.tsformat as outputformat, pf.tsfunction as outputfunction,0 as temp from cutoff_operations c,process_formats pf where (c.telesheetby is null or c.telesheetby=0) and c.cutoffby>0 and c.company_id=val0 and c.branch_id=val1 and c.telesheet=1 and (c.rtv>0 or c.otv>0) and pf.portfolio_id=c.portfolio_id group by c.portfolio_id,c.portname,c.islocked,c.telesheet,tsformat,tsfunction
Query33!C0L!select!C0L!select mvcode,applno,customername,apptype,rtv,otv,refv,(case when islocked!=val2 then 1 else 0 end) as islocked,(select (loginid||' ('||displayname||')') from app_user where user_id=islocked) as lockedby,telesheet,uuid from cutoff_operations where (telesheetby is null or telesheetby=0) and cutoffby>0 and islocked=val2 and company_id=val0 and branch_id=val1 and telesheet=1 and portfolio_id=val3 and (rtv=1 or otv=1) order by applno,apptype
Query32!C0L!select!C0L!select c.portfolio_id,(c.portname||' <b>('||count(*)||')</b>') as portname,sum(c.rtv) as rtv,sum(c.otv) as otv,sum(c.refv) as refv,(case when c.islocked!=val2 then 1 else 0 end) as islocked,c.telesheet,(select (loginid||' ('||displayname||')') from app_user where user_id=c.islocked) as lockedby,pf.tsformat as outputformat, pf.tsfunction as outputfunction,0 as temp from cutoff_operations c,process_formats pf where (c.telesheetby is null or c.telesheetby=0) and c.cutoffby>0 and c.company_id=val0 and c.branch_id=val1 and c.telesheet=1 and pf.portfolio_id=c.portfolio_id group by c.portfolio_id,c.portname,c.islocked,c.telesheet,tsformat,tsfunction
Query33!C0L!select!C0L!select mvcode,applno,customername,apptype,rtv,otv,refv,(case when islocked!=val2 then 1 else 0 end) as islocked,(select (loginid||' ('||displayname||')') from app_user where user_id=islocked) as lockedby,telesheet,uuid from cutoff_operations where (telesheetby is null or telesheetby=0) and cutoffby>0 and islocked=val2 and company_id=val0 and branch_id=val1 and telesheet=1 and portfolio_id=val3 order by applno,apptype
Query34!C0L!update!C0L!update main_operations set islocked=val0,telesheeton='val1',telesheetby=val2 where uuid='val3'
QueryXX35XX!C0L!select!C0L!select ('Tele Verification Report ( '||b.portname||' )') as title,'Received Date' as recdate,receivedate,'Branch' as region,upper(b.bkbranchname) as branchname,'Verification Code' as vercode,mvcode,'Application Ref. No.' as fileno,upper(applno),'Agency Name' as agname,upper(maincompany) as matrx,'RESIDENCE TELEPHONE' as ressec,'Name of Applicant' as appname,upper(customername),upper(apptype),'Resi Address of Applicant' as resadd,(upper(raddr1)||' '||upper(raddr2)||' '||upper(raddr3)||' '||(case when rcity='-1' then '' else upper(rcity) end)) as radd,'Permanent Add of Applicant' as permadd,'' as padd,'Contact Telephone Numbers' as ctel,(mobileno||','||rphone) as contactno,'Type of Residence' as restype,'Owned' as owned,'Rented' as rented,'Company Accomodation' as compacc,'With Parents' withpar,'With Relatives' as withrel,'With Friends' as withf,'Paying Guest' as withp,'Special Instructions' as splinst,upper(specialinst),'The following is based on Telephonic conversation :' as t1,'Name of the Person spoken to' as spkto,'' as spkto2,'Relation with application' as relwith,'' as relwith2,'The following is based on CD-ROM Check:' as t2,'Name of applicant confirmed at given telephone number' as t3,'Yes' as ys,'No' as no,'Telecalling Log' as t4,'Attempt' as atmp,'1st' as fst,'2nd' as iind,'3rd' as rd,'4th' as fth,'5th' as ffth,'Date & Time of Calling' as dtc,'' as dt1,'' as dt2,'' as dt3,'' as dt4,'' as dt5,'Other Remarks :' as othrem,'' as ln1,'' as ln2,'' as ln3,'' as ln4,'' as ln5,'Televerification Results' as rtr,'Positive' as pos,'Negative' as neg,'OFFICE TELEPHONE' as oftel,'Office Telephone Numbers' as oftelno,(mobileno||','||ophone) as ocontactno,'Extn. No.' as ext,extension,'Name of Applicant' as appname,upper(customername) as ocust,'Designation' as des,upper(designation),'Working Since' as wks,'' as wks1,'Department' as dept,upper(department) as department,'For Self employed-Type of organization' as t6,'Proprietorship' as propr,'Partnership' as partnr,'Pvt. Ltd.' as pvtld,'Public. Ltd.' as publtd,'Others' as othr,'Nature of Business' as nob,'Trading' as trd,'Manufacturing' as mfg,'Processing' as prcs,'Builder' as buildr,'Contractor' as contr,'' as nob1,'Brokerage' as brok,'Consultancy' as consult,'Professional' as profs,'Others' as othr,'' as blnk,'Nature of the Company' as noc,'' as noc1,'Office Address' as offad,(upper(oaddr1)||' '||upper(oaddr2)||' '||upper(oaddr3)||' '||(case when ocity='-1' then '' else upper(ocity) end)) as oaddr,'Landmarks' as lndm,'' as ldnmk,'Special Instructions' as sploins,upper(specialinst) as ospel,'The following is based on Telephonic conversation :' as t7,'Name of the person spoken to' as pspkto,'' as pspkt2,'Designation' as cdesig,'' as cdesig1,'Relationship with applicant' as orelwith,'Colleague' as ocoll,'Partner' as optnr,'Superior' as osup,'Relative' as orelv,'Others' as othro,'The following is based on CD-ROM Check:' as t8,'Name of applicant confirmed at given telephone number' as t9,'Yes' as oys,'No' as onso,'Telecalling Log' as t10,'Attempt' as oatmp,'1st' as of1,'2nd' as of2,'3rd' as of3,'4th' as of4,'5th' as of5,'Date & Time of Calling' as odt,'' as odt1,'' as odt2,'' as odt3,'' as odt4,'' as odt5,'Others Remarks :' as othrrem,'' as orm1,'' as orm2,'' as orm3,'' as orm4,'' as orm5,'Televerification Results' as otlst,'Positive' as opost,'Negative' as onegt,rtv,otv from cutoff_operations c,portfolio_bank_branch b where c.bank_branch_id=b.portbranch_id and c.portfolio_id=val0 and c.islocked=val1 and c.telesheeton='val2'
Query36!C0L!update!C0L!update main_operations set islocked=val2 where allocation=1 and allocatedby > 0 and (islocked=0 or islocked=val2) and company_id=val0 and branch_id=val1 and sms=1 and smson is null
@@ -46,9 +46,9 @@ Query45!C0L!select!C0L!select portfolio_id,(portname||' <b>('||count(*)||')</b>'
Query46!C0L!select!C0L!select mvcode,applno,customername,apptype,rv,ov,pv,rtv,otv,refv,(case when islocked!=val2 then 1 else 0 end) as islocked,(select (loginid||' ('||displayname||')') from app_user where user_id=islocked) as lockedby,1 as oprsend,uuid from cutoff_operations where (oprsendby is null or oprsendby=0) and cutoffby>0 and islocked=val2 and company_id=val0 and branch_id=val1 and oprsend!=1 and ((allocation=1 and allocatedby > 0) or allocation!=1 or (rv=0 and ov=0 and pv=0 and allocation=1)) and ((telesheet=1 and telesheetby>0) or telesheet!=1) and portfolio_id=val3 and (rv=1 or ov=1 or pv=1 or rtv=1 or otv=1) order by applno,apptype
Query47!C0L!procedure!C0L!select sendtooperation('val0',val1,'val2',val3,val4,val5,val6)
Query48!C0L!select!C0L!select displayname,receivedate,timeperiod,count(*) from edpoperator_mis where receivedate>='val2' and receivedate<='val3' and company_id=val0 and branch_id=val1 group by receivedate,timeperiod,displayname order by timeperiod
Query49!C0L!select!C0L!select cutoffon,count(uuid) as tot from cutoff_operations where oprsend!=1 and cutoffby > 0 and company_id=val0 and branch_id=val1 group by cutoffon order by cutoffon
Query50!C0L!select!C0L!select uuid,portname,customername,cutoffon from cutoff_operations where oprsend!=1 and cutoffby > 0 and company_id=val0 and branch_id=val1 group by cutoffon,uuid,portname,customername order by cutoffon,portname,customername
Query51!C0L!procedure!C0L!select cutoffpending('val0','val1','val2','val3','val4','val5','val6',val7)
Query49!C0L!select!C0L!SELECT mo.cutoffon,count(m.case_id) total FROM main m JOIN main_operations mo ON mo.case_id=m.case_id WHERE m.isdeleted=0 AND mo.sdone=0 AND mo.oprsend<>1 AND mo.cutoffby>0 AND m.company_id=? AND m.branch_id=? GROUP BY mo.cutoffon ORDER BY mo.cutoffon
Query50!C0L!select!C0L!SELECT m.uuid,p.portname,m.customername,mo.cutoffon FROM main m JOIN main_operations mo ON mo.case_id=m.case_id JOIN portfolio p ON p.portfolio_id=m.portfolio_id WHERE m.isdeleted=0 AND mo.sdone=0 AND mo.oprsend<>1 AND mo.cutoffby>0 AND m.company_id=? AND m.branch_id=? ORDER BY mo.cutoffon,p.portname,m.customername
Query51!C0L!update!C0L!UPDATE main_operations mo SET allocatedby=CASE WHEN mo.allocatedby>0 AND ?::integer=1 THEN NULL ELSE mo.allocatedby END,telesheetby=CASE WHEN mo.telesheetby>0 AND ?::integer=1 THEN NULL ELSE mo.telesheetby END,earlierby=CASE WHEN mo.earlierby>0 AND ?::integer=1 THEN NULL ELSE mo.earlierby END,negativeby=CASE WHEN mo.negativeby>0 AND ?::integer=1 THEN NULL ELSE mo.negativeby END,cutoffby=CASE WHEN mo.cutoffby>0 AND ?::integer=1 THEN 0 ELSE mo.cutoffby END FROM main m WHERE m.case_id=mo.case_id AND ((?::integer=0 AND m.uuid::text=?) OR (?::integer=1 AND mo.cutoffon=?::timestamp)) AND m.company_id=? AND m.branch_id=? AND m.isdeleted=0 AND mo.sdone=0
Query52!C0L!select!C0L!select c.uuid,c.portfolio_id,c.mvcode,c.applno,c.customername,c.apptype,(CASE WHEN c.rv = 1 THEN 'Y'::text ELSE 'N'::text END) AS rv,(CASE WHEN c.ov = 1 THEN 'Y'::text ELSE 'N'::text END) AS ov,(CASE WHEN c.pv = 1 THEN 'Y'::text ELSE 'N'::text END) AS pv,(CASE WHEN c.rtv = 1 THEN 'Y'::text ELSE 'N'::text END) AS rtv,(CASE WHEN c.otv = 1 THEN 'Y'::text ELSE 'N'::text END) AS otv,(CASE WHEN c.refv = 1 THEN 'Y'::text ELSE 'N'::text END) AS refv,(CASE WHEN c.docv = 1 THEN 'Y'::text ELSE 'N'::text END) AS docv, to_char(receivedate, 'DD/MM/YYYY') as receivedate,b.bkbranchname,'false' as delstat from cutoff_operations c,portfolio_bank_branch b where c.portfolio_id=val0 and c.branch_id=val1 and c.bank_branch_id=b.portbranch_id order by bkbranchname,customername
Query53!C0L!select!C0L!select uuid, portfolio_id, mvcode, applno, customername, apptype,rv,ov,pv, to_char(receivedate, 'DD/MM/YYYY') as receivedate,(case when (rv+ov+pv)=(rvdone+ovdone+pvdone) then 'Y' else 'N' end) as done from cutoff_operations where portfolio_id=val0 and (dedcutby is null or dedcutby=0) and ((earlierby>0 and earlier=1) or earlier=0) and ((negativeby>0 and negative=1) or negative=0) and (earlier=1 or negative=1) order by done desc,applno,apptype
Query54!C0L!select!C0L!select uuid, customername, mvcode, dob, mobileno,upper(raddr1||' '||raddr2||' '||raddr3) as resiaddr,upper(coalesce(companyname||' ','')||oaddr1||' '||oaddr2||' '||oaddr3) as offaddr,rphone,ophone,(case when category='-1' then 'NA' else upper(category) end) as category,0 as temp from main where uuid='val0' and isdeleted=0