Fixed bugs and cleanup

This commit is contained in:
2026-08-12 20:27:20 +05:30
parent c308171de5
commit 2c5a7f0311
21 changed files with 12 additions and 1551 deletions

View File

@@ -1,238 +0,0 @@
package matrix.nimble.edp.cutoff.model;
import java.util.ArrayList;
import java.util.List;
import matrix.nimble.utilities.DBFunctions;
import matrix.nimble.utilities.GlobalClass;
import matrix.nimble.utilities.StringFunctions;
import org.apache.commons.collections.FactoryUtils;
import org.apache.commons.collections.list.LazyList;
public class Allocation {
private List<CutOffRecord> allocationlist = LazyList.decorate(new ArrayList(),FactoryUtils.instantiateFactory(CutOffRecord.class));
private String AllocTime;
private String ErrMsg;
private String ErrDesc;
private String ErrCode;
private String SessUUID;
private boolean ProcessFlag;
public List<CutOffRecord> getAllocationlist() {
return allocationlist;
}
public String getAllocTime() {
return AllocTime;
}
public void setAllocTime(String allocTime) {
AllocTime = allocTime;
}
public void setAllocationlist(List<CutOffRecord> allocationlist) {
this.allocationlist = allocationlist;
}
public String getSessUUID() {
return SessUUID;
}
public void setSessUUID(String sessUUID) {
SessUUID = sessUUID;
}
public String getErrMsg() {
return ErrMsg;
}
public void setErrMsg(String errMsg) {
ErrMsg = errMsg;
}
public String getErrDesc() {
return ErrDesc;
}
public void setErrDesc(String errDesc) {
ErrDesc = errDesc;
}
public String getErrCode() {
return ErrCode;
}
public void setErrCode(String errCode) {
ErrCode = errCode;
}
public boolean isProcessFlag() {
return ProcessFlag;
}
public void setProcessFlag(boolean processFlag) {
ProcessFlag = processFlag;
}
public Allocation getAllocList(String CompanyId,String BranchId,String UserId)
{
Allocation AList=new Allocation();
StringFunctions StrFunc=new StringFunctions(getErrCode());
setAllocTime(StrFunc.FormatDate("yyyy/MM/dd HH:mm:ss", new java.util.Date()));
DBFunctions DBF=new DBFunctions(getErrCode());
DBF.setProcessFlag(true);
String [] Vals=(CompanyId+GlobalClass.ColDelim+BranchId+GlobalClass.ColDelim+UserId+GlobalClass.ColDelim).split(GlobalClass.ColDelim);
DBF.FetchRunQuery(27, Vals);
if(DBF.isProcessFlag())
{
String ResultData=DBF.FetchRunQuery(28, Vals); //Generating list of portfolios to be allocated
if(DBF.isProcessFlag())
{
String [][] AllocListData=StrFunc.ConverTo2DArray(ResultData, GlobalClass.RowDelim, GlobalClass.ColDelim);
ArrayList<CutOffRecord> Record=new ArrayList<CutOffRecord>();
for(int RecCount=0;RecCount<AllocListData.length;RecCount++)
{
DBF.setProcessFlag(true);
CutOffRecord CORec=new CutOffRecord();
CORec.setPortfolioid(AllocListData[RecCount][0]);
CORec.setPortname(AllocListData[RecCount][1]);
CORec.setTotrv(Integer.parseInt(AllocListData[RecCount][2]));
CORec.setTotov(Integer.parseInt(AllocListData[RecCount][3]));
CORec.setTotpv(Integer.parseInt(AllocListData[RecCount][4]));
CORec.setIslocked(Integer.parseInt(AllocListData[RecCount][5]));
if(CORec.getIslocked()>0)
{
CORec.setAllocation(false);
}
else
{
CORec.setAllocation(Integer.parseInt(AllocListData[RecCount][6])<=0 ? false:true);
}
CORec.setLockedby(AllocListData[RecCount][7]);
//Collecting records for sublist
String [] Vals1=(CompanyId+GlobalClass.ColDelim+BranchId+GlobalClass.ColDelim+UserId+GlobalClass.ColDelim+CORec.getPortfolioid()+GlobalClass.ColDelim).split(GlobalClass.ColDelim);
String ResultData1=DBF.FetchRunQuery(29, Vals1); //Generating sublist records
if(DBF.isProcessFlag())
{
String [][] SubListData=StrFunc.ConverTo2DArray(ResultData1, GlobalClass.RowDelim, GlobalClass.ColDelim);
ArrayList<CutOffRecord> SubRecord=new ArrayList<CutOffRecord>();
for(int ListCount=0;ListCount<SubListData.length;ListCount++)
{
CutOffRecord SCORec=new CutOffRecord();
SCORec.setMvcode(SubListData[ListCount][0]);
SCORec.setApplno(SubListData[ListCount][1]);
SCORec.setCustomername(SubListData[ListCount][2]);
SCORec.setApptype(SubListData[ListCount][3]);
SCORec.setTotrv(Integer.parseInt(SubListData[ListCount][4]));
SCORec.setTotov(Integer.parseInt(SubListData[ListCount][5]));
SCORec.setTotpv(Integer.parseInt(SubListData[ListCount][6]));
SCORec.setIslocked(Integer.parseInt(SubListData[ListCount][7]));
SCORec.setLockedby(SubListData[ListCount][8]);
SCORec.setAllocation(Integer.parseInt(SubListData[ListCount][9])<=0 ? false:true);
SCORec.setResiloc(SubListData[ListCount][10]);
SCORec.setOffloc(SubListData[ListCount][11]);
SCORec.setProploc(SubListData[ListCount][12]);
SCORec.setUuid(SubListData[ListCount][13]);
SCORec.setPortgroup(SubListData[ListCount][14]);
SubRecord.add(SCORec);
}
CORec.setSublist(SubRecord);
}
Record.add(CORec);
}
AList.setAllocTime(getAllocTime());
AList.setAllocationlist(Record);
AList.setSessUUID(getSessUUID());
AList.setErrCode(getErrCode());
}
else
{
setProcessFlag(false);
setErrDesc(DBF.getErrDesc());
setErrMsg(DBF.getErrMsg());
AList.setErrDesc(DBF.getErrDesc());
AList.setErrMsg(DBF.getErrMsg());
AList.setErrCode(getErrCode());
}
}
else
{
setProcessFlag(false);
setErrDesc(DBF.getErrDesc());
setErrMsg(DBF.getErrMsg());
AList.setErrDesc(DBF.getErrDesc());
AList.setErrMsg(DBF.getErrMsg());
AList.setErrCode(getErrCode());
}
return AList;
}
public void FinalizeAllocation(String UserId,String CompanyId,String BranchId)
{
setProcessFlag(true);
//---> Allocation status
int TotRv=0;
int TotOv=0;
int TotPv=0;
int TotRvAlloc=0;
int TotOvAlloc=0;
int TotPvAlloc=0;
int TotRvFailed=0;
int TotOvFailed=0;
int TotPvFailed=0;
setAllocTime(new StringFunctions(getErrCode()).FormatDate("yyyy/MM/dd HH:mm:ss", new java.util.Date()));
//<--- Allocation status ends
DBFunctions DBF=new DBFunctions(getErrCode());
int PortList=getAllocationlist().size();
for(int LIndx=0;LIndx<PortList;LIndx++)
{
CutOffRecord AllocRec=(CutOffRecord)getAllocationlist().get(LIndx);
/*if (AllocRec.getIslocked()==0 && AllocRec.isAllocation())
{*/
String Portfolioid=AllocRec.getPortfolioid();
int SubList=AllocRec.getSublist().size();
for(int SIndx=0;SIndx<SubList;SIndx++)
{
CutOffRecord SubRec=(CutOffRecord)AllocRec.getSublist().get(SIndx);
if(SubRec.isAllocation())
{
TotRv=TotRv+SubRec.getTotrv();
TotOv=TotOv+SubRec.getTotov();
TotPv=TotPv+SubRec.getTotpv();
}
DBF.setProcessFlag(true);
String Query="";
Query=Query+""+SubRec.getUuid()+""+GlobalClass.ColDelim;
Query=Query+""+(SubRec.isAllocation() ? 1:0)+""+GlobalClass.ColDelim;
Query=Query+""+SubRec.getTotrv()+""+GlobalClass.ColDelim;
Query=Query+""+SubRec.getTotov()+""+GlobalClass.ColDelim;
Query=Query+""+SubRec.getTotpv()+""+GlobalClass.ColDelim;
Query=Query+""+SubRec.getResiloc()+""+GlobalClass.ColDelim;
Query=Query+""+SubRec.getOffloc()+""+GlobalClass.ColDelim;
Query=Query+""+SubRec.getProploc()+""+GlobalClass.ColDelim;
Query=Query+""+getAllocTime()+""+GlobalClass.ColDelim;
Query=Query+""+CompanyId+""+GlobalClass.ColDelim;
Query=Query+""+BranchId+""+GlobalClass.ColDelim;
Query=Query+""+Portfolioid+""+GlobalClass.ColDelim;
Query=Query+""+SubRec.getPortgroup()+""+GlobalClass.ColDelim;
String Temp=DBF.FetchRunQuery(30, Query.split(GlobalClass.ColDelim));
if(DBF.isProcessFlag())
{
if(SubRec.isAllocation())
{
TotRvAlloc=TotRvAlloc+SubRec.getTotrv();
TotOvAlloc=TotOvAlloc+SubRec.getTotov();
TotPvAlloc=TotPvAlloc+SubRec.getTotpv();
}
}
else
{
if(SubRec.isAllocation())
{
TotRvFailed=TotRvFailed+SubRec.getTotrv();;
TotOvFailed=TotOvFailed+SubRec.getTotov();;
TotPvFailed=TotPvFailed+SubRec.getTotpv();;
}
}
}
/*}*/
}
if(TotRvAlloc>0 || TotOvAlloc >0 || TotPvAlloc >0)
{
setErrMsg(getErrCode()+"ALFAIL:Info:Total ("+TotRvAlloc+" / "+TotRv+")-RV, ("+TotOvAlloc+" / "+TotOv+")-OV, ("+TotPvAlloc+" / "+TotPv+")-PV allocated successfully.");
}
else
{
setErrMsg(getErrCode()+"ALFAIL:Error:Allocation failed please try again.");
}
}
}

View File

@@ -1,58 +0,0 @@
package matrix.nimble.edp.cutoff.model;
import matrix.nimble.utilities.DBFunctions;
import matrix.nimble.utilities.GlobalClass;
public class AutoCutThread extends Thread {
private String uuid;
private String portfolioid;
private String userid;
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
public String getPortfolioid() {
return portfolioid;
}
public void setPortfolioid(String portfolioid) {
this.portfolioid = portfolioid;
}
public String getUserid() {
return userid;
}
public void setUserid(String userid) {
this.userid = userid;
}
public void run(){
DBFunctions dbf=new DBFunctions("3600");
dbf.setProcessFlag(true);
String [] Qvals=(getPortfolioid()+GlobalClass.ColDelim+getUuid()+GlobalClass.ColDelim+getUserid()+GlobalClass.ColDelim).split(GlobalClass.ColDelim);
dbf.FetchRunQuery(475, Qvals);
if(dbf.isProcessFlag())
{
System.out.println(dbf.getProcResult());
}
else
{
System.out.println(dbf.getErrDesc());
}
}
}

View File

@@ -1,196 +0,0 @@
package matrix.nimble.edp.cutoff.model;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.collections.FactoryUtils;
import org.apache.commons.collections.list.LazyList;
import matrix.nimble.utilities.DBFunctions;
import matrix.nimble.utilities.GlobalClass;
import matrix.nimble.utilities.StringFunctions;
public class CutOffList {
private List<CutOffRecord> cofflist = LazyList.decorate(new ArrayList(),FactoryUtils.instantiateFactory(CutOffRecord.class));
private String CutoffTime;
private String Batch;
private String ErrMsg;
private String ErrDesc;
private String ErrCode;
private String SessUUID;
private boolean ProcessFlag;
public List<CutOffRecord> getCofflist() {
return cofflist;
}
public void setCofflist(List<CutOffRecord> cofflist) {
this.cofflist = cofflist;
}
public String getCutoffTime() {
return CutoffTime;
}
public void setCutoffTime(String cutoffTime) {
CutoffTime = cutoffTime;
}
public String getBatch() {
return Batch;
}
public void setBatch(String batch) {
Batch = batch;
}
public String getSessUUID() {
return SessUUID;
}
public void setSessUUID(String sessUUID) {
SessUUID = sessUUID;
}
public String getErrMsg() {
return ErrMsg;
}
public void setErrMsg(String errMsg) {
ErrMsg = errMsg;
}
public String getErrDesc() {
return ErrDesc;
}
public void setErrDesc(String errDesc) {
ErrDesc = errDesc;
}
public String getErrCode() {
return ErrCode;
}
public void setErrCode(String errCode) {
ErrCode = errCode;
}
public boolean isProcessFlag() {
return ProcessFlag;
}
public void setProcessFlag(boolean processFlag) {
ProcessFlag = processFlag;
}
public CutOffList getCutOffList(String CompanyId,String BranchId,String UserId)
{
CutOffList CList=new CutOffList();
StringFunctions StrFunc=new StringFunctions(getErrCode());
String CutTime=StrFunc.FormatDate("yyyy/MM/dd HH:mm:ss", new java.util.Date());
DBFunctions DBF=new DBFunctions(getErrCode());
DBF.setProcessFlag(true);
String [] Vals=(CutTime+GlobalClass.ColDelim+CompanyId+GlobalClass.ColDelim+BranchId+GlobalClass.ColDelim+UserId+GlobalClass.ColDelim).split(GlobalClass.ColDelim);
DBF.FetchRunQuery(17, Vals); //Updating enabled process in cutoff table
if(DBF.isProcessFlag())
{
String ResultData=DBF.FetchRunQuery(18, Vals);
if(DBF.isProcessFlag())
{
String [][] COffListData=StrFunc.ConverTo2DArray(ResultData, GlobalClass.RowDelim, GlobalClass.ColDelim);
ArrayList<CutOffRecord> Record=new ArrayList<CutOffRecord>();
for(int RecCount=0;RecCount<COffListData.length;RecCount++)
{
CutOffRecord CORec=new CutOffRecord();
CORec.setPortfolioid(COffListData[RecCount][0]);
CORec.setPortname(COffListData[RecCount][1]);
CORec.setAllocation(COffListData[RecCount][2].equals("1") ? true:false);
CORec.setSms(COffListData[RecCount][3].equals("1") ? true:false);
CORec.setTelesheet(COffListData[RecCount][4].equals("1") ? true:false);
CORec.setEarlier(COffListData[RecCount][5].equals("1") ? true:false);
CORec.setNegative(COffListData[RecCount][6].equals("1") ? true:false);
CORec.setIslocked(Integer.parseInt(COffListData[RecCount][7]));
CORec.setLockedby(COffListData[RecCount][8]);
CORec.setDocut(CORec.getIslocked()==0 ? true:false);
Record.add(CORec);
}
CList.setCutoffTime(CutTime);
CList.setCofflist(Record);
CList.setSessUUID(getSessUUID());
CList.setErrCode(getErrCode());
}
else
{
setProcessFlag(false);
setErrDesc(DBF.getErrDesc());
setErrMsg(DBF.getErrMsg());
}
}
else
{
setProcessFlag(false);
setErrDesc(DBF.getErrDesc());
setErrMsg(DBF.getErrMsg());
}
return CList;
}
public void FinalizeCutoffList(String UserId,String CompanyId,String BranchId)
{
setProcessFlag(true);
int Listcount=getCofflist().size();
String Query="";
for(int Indx=0;Indx<Listcount;Indx++)
{
CutOffRecord CRec=(CutOffRecord)getCofflist().get(Indx);
if(CRec.isDocut())
{
Query=Query+"update main_operations set ";
Query=Query+"allocation="+(CRec.isAllocation()? "1":"-2")+",";
Query=Query+"sms="+(CRec.isSms()? "1":"-2")+",";
if(!CRec.isSms())
{
Query=Query+"smsby="+UserId+",";
}
Query=Query+"telesheet=(case when telesheet=0 then 0 else "+(CRec.isTelesheet()? "1":"-2")+" end),";
if(!CRec.isTelesheet())
{
Query=Query+"telesheetby="+UserId+",";
}
Query=Query+"earlier="+(CRec.isEarlier()? "1":"-2")+",";
if(!CRec.isEarlier())
{
Query=Query+"earlierby="+UserId+",";
}
Query=Query+"negative="+(CRec.isNegative()? "1":"-2")+",";
if(!CRec.isNegative())
{
Query=Query+"negativeby="+UserId+",";
}
Query=Query+"cutoffby="+UserId+",";
Query=Query+"islocked=0,";
Query=Query+"batch=''"+getBatch()+"'' ";
Query=Query+"where (cutoffby is null or cutoffby=0) and cutoffon=''"+getCutoffTime()+"'' and islocked="+UserId+" ";
Query=Query+"and company_id="+CompanyId+" and branch_id="+BranchId+" and portfolio_id="+CRec.getPortfolioid()+";";
}
else
{
Query=Query+"update main_operations set ";
Query=Query+"cutoffon=NULL,";
Query=Query+"islocked=0 ";
Query=Query+"where (cutoffby is null or cutoffby=0) and cutoffon=''"+getCutoffTime()+"'' and islocked="+UserId+" ";
Query=Query+"and company_id="+CompanyId+" and branch_id="+BranchId+" and portfolio_id="+CRec.getPortfolioid()+";";
}
}
if(Query.length()>0)
{
DBFunctions DBF=new DBFunctions(getErrCode());
DBF.setProcessFlag(true);
DBF.FetchRunQuery(26, (Query+GlobalClass.ColDelim).split(GlobalClass.ColDelim));
if(DBF.isProcessFlag())
{
setProcessFlag(true);
setErrMsg(getErrCode()+"STCUT:Info:Cut List is now ready to be processed.");
}
else
{
setProcessFlag(false);
setErrMsg(DBF.getErrMsg());
setErrDesc(DBF.getErrDesc());
}
}
else
{
setProcessFlag(false);
setErrMsg(getErrCode()+"STCUT:Info:Please select atleast one portfolio for Cut-Off Process.");
}
}
}

View File

@@ -1,235 +0,0 @@
package matrix.nimble.edp.cutoff.model;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.collections.FactoryUtils;
import org.apache.commons.collections.list.LazyList;
public class CutOffRecord {
private List<CutOffRecord> sublist = LazyList.decorate(new ArrayList(),FactoryUtils.instantiateFactory(CutOffRecord.class));
private String portfolioid;
private String portname;
private String customername;
private String apptype;
private String mvcode;
private String applno;
private boolean allocation;
private boolean sms;
private boolean telesheet;
private boolean earlier;
private boolean negative;
private int islocked;
private String lockedby;
private boolean docut;
private int ischanged;
private int totrv;
private int totov;
private int totpv;
private int totrtv;
private int tototv;
private int totref;
private boolean tv;
private boolean oprsend;
private String resiloc;
private String offloc;
private String proploc;
private String uuid;
private String repformat;
private String repfunction;
private String message;
private String portgroup;
public List<CutOffRecord> getSublist() {
return sublist;
}
public String getCustomername() {
return customername;
}
public void setCustomername(String customername) {
this.customername = customername;
}
public String getApptype() {
return apptype;
}
public void setApptype(String apptype) {
this.apptype = apptype;
}
public String getMvcode() {
return mvcode;
}
public void setMvcode(String mvcode) {
this.mvcode = mvcode;
}
public String getApplno() {
return applno;
}
public void setApplno(String applno) {
this.applno = applno;
}
public void setSublist(List<CutOffRecord> sublist) {
this.sublist = sublist;
}
public String getPortfolioid() {
return portfolioid;
}
public void setPortfolioid(String portfolioid) {
this.portfolioid = portfolioid;
}
public String getPortname() {
return portname;
}
public void setPortname(String portname) {
this.portname = portname;
}
public boolean isAllocation() {
return allocation;
}
public void setAllocation(boolean allocation) {
this.allocation = allocation;
}
public boolean isSms() {
return sms;
}
public void setSms(boolean sms) {
this.sms = sms;
}
public boolean isTelesheet() {
return telesheet;
}
public void setTelesheet(boolean telesheet) {
this.telesheet = telesheet;
}
public boolean isEarlier() {
return earlier;
}
public void setEarlier(boolean earlier) {
this.earlier = earlier;
}
public boolean isNegative() {
return negative;
}
public void setNegative(boolean negative) {
this.negative = negative;
}
public int getIslocked() {
return islocked;
}
public void setIslocked(int islocked) {
this.islocked = islocked;
}
public String getLockedby() {
return lockedby;
}
public void setLockedby(String lockedby) {
this.lockedby = lockedby;
}
public int getIschanged() {
return ischanged;
}
public void setIschanged(int ischanged) {
this.ischanged = ischanged;
}
public boolean isDocut() {
return docut;
}
public void setDocut(boolean docut) {
this.docut = docut;
}
public int getTotrv() {
return totrv;
}
public void setTotrv(int totrv) {
this.totrv = totrv;
}
public int getTotov() {
return totov;
}
public void setTotov(int totov) {
this.totov = totov;
}
public int getTotpv() {
return totpv;
}
public void setTotpv(int totpv) {
this.totpv = totpv;
}
public int getTotrtv() {
return totrtv;
}
public void setTotrtv(int totrtv) {
this.totrtv = totrtv;
}
public int getTototv() {
return tototv;
}
public void setTototv(int tototv) {
this.tototv = tototv;
}
public int getTotref() {
return totref;
}
public void setTotref(int totref) {
this.totref = totref;
}
public boolean isTv() {
return tv;
}
public void setTv(boolean tv) {
this.tv = tv;
}
public boolean isOprsend() {
return oprsend;
}
public void setOprsend(boolean oprsend) {
this.oprsend = oprsend;
}
public String getResiloc() {
return resiloc;
}
public void setResiloc(String resiloc) {
this.resiloc = resiloc;
}
public String getOffloc() {
return offloc;
}
public void setOffloc(String offloc) {
this.offloc = offloc;
}
public String getProploc() {
return proploc;
}
public void setProploc(String proploc) {
this.proploc = proploc;
}
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
public String getRepformat() {
return repformat;
}
public void setRepformat(String repformat) {
this.repformat = repformat;
}
public String getRepfunction() {
return repfunction;
}
public void setRepfunction(String repfunction) {
this.repfunction = repfunction;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getPortgroup() {
return portgroup;
}
public void setPortgroup(String portgroup) {
this.portgroup = portgroup;
}
}

View File

@@ -1,83 +0,0 @@
package matrix.nimble.edp.cutoff.model;
import matrix.nimble.utilities.DBFunctions;
import matrix.nimble.utilities.GlobalClass;
public class PhotoCases {
private String ErrMsg;
private String ErrDesc;
private String ErrCode;
private String SessUUID;
private boolean ProcessFlag;
public String getErrMsg() {
return ErrMsg;
}
public void setErrMsg(String errMsg) {
ErrMsg = errMsg;
}
public String getErrDesc() {
return ErrDesc;
}
public void setErrDesc(String errDesc) {
ErrDesc = errDesc;
}
public String getErrCode() {
return ErrCode;
}
public void setErrCode(String errCode) {
ErrCode = errCode;
}
public String getSessUUID() {
return SessUUID;
}
public void setSessUUID(String sessUUID) {
SessUUID = sessUUID;
}
public boolean isProcessFlag() {
return ProcessFlag;
}
public void setProcessFlag(boolean processFlag) {
ProcessFlag = processFlag;
}
public String[][] getPhotoCaseList(String BranchId)
{
String [][] CaseList=null;
PhotoCases PC=new PhotoCases();
DBFunctions dbf=new DBFunctions(getErrCode());
dbf.setProcessFlag(true);
dbf.FetchRunQuery(303, (BranchId).split(GlobalClass.ColDelim));
if(dbf.isProcessFlag())
{
CaseList=dbf.getResultArray();
}
else
{
setProcessFlag(false);
setErrDesc(dbf.getErrDesc());
setErrMsg(dbf.getErrMsg());
PC.setErrCode(getErrCode());
PC.setErrDesc(getErrDesc());
PC.setErrMsg(getErrMsg());
}
return CaseList;
}
public String FinalizePhotoCaseList(String [] Qvals)
{
DBFunctions dbf=new DBFunctions(getErrCode());
dbf.setProcessFlag(true);
String Result=dbf.FetchRunQuery(300, Qvals);
if(dbf.isProcessFlag())
{
Result="success";
}
else
{
setProcessFlag(false);
setErrDesc(dbf.getErrDesc());
setErrMsg(dbf.getErrMsg());
Result=getErrMsg();
}
return Result;
}
}

View File

@@ -1,64 +0,0 @@
package matrix.nimble.edp.cutoff.model;
import java.util.ArrayList;
import java.util.List;
public class ReferenceSheet {
private List<CutOffRecord> tvrlist = new ArrayList<>();
private String TeleSheetTime;
private String ErrMsg;
private String ErrDesc;
private String ErrCode;
private String SessUUID;
private boolean ProcessFlag;
private String TelePDFLink;
public List<CutOffRecord> getTvrlist() {
return tvrlist;
}
public String getTeleSheetTime() {
return TeleSheetTime;
}
public void setTeleSheetTime(String teleSheetTime) {
TeleSheetTime = teleSheetTime;
}
public void setTvrlist(List<CutOffRecord> tvrlist) {
this.tvrlist = tvrlist;
}
public String getSessUUID() {
return SessUUID;
}
public void setSessUUID(String sessUUID) {
SessUUID = sessUUID;
}
public String getErrMsg() {
return ErrMsg;
}
public void setErrMsg(String errMsg) {
ErrMsg = errMsg;
}
public String getErrDesc() {
return ErrDesc;
}
public void setErrDesc(String errDesc) {
ErrDesc = errDesc;
}
public String getErrCode() {
return ErrCode;
}
public void setErrCode(String errCode) {
ErrCode = errCode;
}
public boolean isProcessFlag() {
return ProcessFlag;
}
public void setProcessFlag(boolean processFlag) {
ProcessFlag = processFlag;
}
public String getTelePDFLink() {
return TelePDFLink;
}
public void setTelePDFLink(String telePDFLink) {
TelePDFLink = telePDFLink;
}
}

View File

@@ -1,187 +0,0 @@
package matrix.nimble.edp.cutoff.model;
import java.util.ArrayList;
import java.util.List;
import matrix.nimble.utilities.DBFunctions;
import matrix.nimble.utilities.GlobalClass;
import matrix.nimble.utilities.StringFunctions;
import org.apache.commons.collections.FactoryUtils;
import org.apache.commons.collections.list.LazyList;
public class SendToOperation {
private List<CutOffRecord> caselist = LazyList.decorate(new ArrayList(),FactoryUtils.instantiateFactory(CutOffRecord.class));
private String SendTime;
private String ErrMsg;
private String ErrDesc;
private String ErrCode;
private String SessUUID;
private boolean ProcessFlag;
public List<CutOffRecord> getCaselist() {
return caselist;
}
public String getSendTime() {
return SendTime;
}
public void setSendTime(String sendTime) {
SendTime = sendTime;
}
public void setCaselist(List<CutOffRecord> caselist) {
this.caselist = caselist;
}
public String getSessUUID() {
return SessUUID;
}
public void setSessUUID(String sessUUID) {
SessUUID = sessUUID;
}
public String getErrMsg() {
return ErrMsg;
}
public void setErrMsg(String errMsg) {
ErrMsg = errMsg;
}
public String getErrDesc() {
return ErrDesc;
}
public void setErrDesc(String errDesc) {
ErrDesc = errDesc;
}
public String getErrCode() {
return ErrCode;
}
public void setErrCode(String errCode) {
ErrCode = errCode;
}
public boolean isProcessFlag() {
return ProcessFlag;
}
public void setProcessFlag(boolean processFlag) {
ProcessFlag = processFlag;
}
public SendToOperation getRecordList(String CompanyId,String BranchId,String UserId)
{
SendToOperation Sopr=new SendToOperation();
StringFunctions StrFunc=new StringFunctions(getErrCode());
setSendTime(StrFunc.FormatDate("yyyy/MM/dd HH:mm:ss", new java.util.Date()));
DBFunctions DBF=new DBFunctions(getErrCode());
DBF.setProcessFlag(true);
String [] Vals=(CompanyId+GlobalClass.ColDelim+BranchId+GlobalClass.ColDelim+UserId+GlobalClass.ColDelim).split(GlobalClass.ColDelim);
DBF.FetchRunQuery(44, Vals);
if(DBF.isProcessFlag())
{
String ResultData=DBF.FetchRunQuery(45, Vals); //Generating list of portfolios to be allocated
if(DBF.isProcessFlag())
{
String [][] SendListData=StrFunc.ConverTo2DArray(ResultData, GlobalClass.RowDelim, GlobalClass.ColDelim);
ArrayList<CutOffRecord> Record=new ArrayList<CutOffRecord>();
for(int RecCount=0;RecCount<SendListData.length;RecCount++)
{
DBF.setProcessFlag(true);
//mvcode,applno,customername,rv,ov,pv,islocked,lockedby
CutOffRecord CORec=new CutOffRecord();
CORec.setPortfolioid(SendListData[RecCount][0]);
CORec.setPortname(SendListData[RecCount][1]);
CORec.setTotrv(Integer.parseInt(SendListData[RecCount][2]));
CORec.setTotov(Integer.parseInt(SendListData[RecCount][3]));
CORec.setTotpv(Integer.parseInt(SendListData[RecCount][4]));
CORec.setTotrtv(Integer.parseInt(SendListData[RecCount][5]));
CORec.setTototv(Integer.parseInt(SendListData[RecCount][6]));
CORec.setTotref(Integer.parseInt(SendListData[RecCount][7]));
CORec.setIslocked(Integer.parseInt(SendListData[RecCount][8]));
if(CORec.getIslocked()>0)
{
CORec.setOprsend(false);
}
else
{
CORec.setOprsend(Integer.parseInt(SendListData[RecCount][9])<=0 ? false:true);
}
CORec.setLockedby(SendListData[RecCount][10]);
//Collecting records for sublist
String [] Vals1=(CompanyId+GlobalClass.ColDelim+BranchId+GlobalClass.ColDelim+UserId+GlobalClass.ColDelim+CORec.getPortfolioid()+GlobalClass.ColDelim).split(GlobalClass.ColDelim);
String ResultData1=DBF.FetchRunQuery(46, Vals1); //Generating sublist records
if(DBF.isProcessFlag())
{
String [][] SubListData=StrFunc.ConverTo2DArray(ResultData1, GlobalClass.RowDelim, GlobalClass.ColDelim);
ArrayList<CutOffRecord> SubRecord=new ArrayList<CutOffRecord>();
for(int ListCount=0;ListCount<SubListData.length;ListCount++)
{
CutOffRecord SCORec=new CutOffRecord();
SCORec.setMvcode(SubListData[ListCount][0]);
SCORec.setApplno(SubListData[ListCount][1]);
SCORec.setCustomername(SubListData[ListCount][2]);
SCORec.setApptype(SubListData[ListCount][3]);
SCORec.setTotrv(Integer.parseInt(SubListData[ListCount][4]));
SCORec.setTotov(Integer.parseInt(SubListData[ListCount][5]));
SCORec.setTotpv(Integer.parseInt(SubListData[ListCount][6]));
SCORec.setTotrtv(Integer.parseInt(SubListData[ListCount][7]));
SCORec.setTototv(Integer.parseInt(SubListData[ListCount][8]));
SCORec.setTotref(Integer.parseInt(SubListData[ListCount][9]));
SCORec.setIslocked(Integer.parseInt(SubListData[ListCount][10]));
SCORec.setLockedby(SubListData[ListCount][11]);
SCORec.setOprsend(Integer.parseInt(SubListData[ListCount][12])<=0 ? false:true);
SCORec.setUuid(SubListData[ListCount][13]);
SubRecord.add(SCORec);
}
CORec.setSublist(SubRecord);
}
Record.add(CORec);
}
Sopr.setSendTime(getSendTime());
Sopr.setCaselist(Record);
Sopr.setSessUUID(getSessUUID());
Sopr.setErrCode(getErrCode());
}
else
{
setProcessFlag(false);
setErrDesc(DBF.getErrDesc());
setErrMsg(DBF.getErrMsg());
Sopr.setErrDesc(DBF.getErrDesc());
Sopr.setErrMsg(DBF.getErrMsg());
Sopr.setErrCode(getErrCode());
}
}
else
{
setProcessFlag(false);
setErrDesc(DBF.getErrDesc());
setErrMsg(DBF.getErrMsg());
Sopr.setErrDesc(DBF.getErrDesc());
Sopr.setErrMsg(DBF.getErrMsg());
Sopr.setErrCode(getErrCode());
}
return Sopr;
}
public void SendToOpr(String UserId,String CompanyId,String BranchId)
{
setProcessFlag(true);
setSendTime(new StringFunctions(getErrCode()).FormatDate("yyyy/MM/dd HH:mm:ss", new java.util.Date()));
DBFunctions DBF=new DBFunctions(getErrCode());
int PortList=getCaselist().size();
for(int LIndx=0;LIndx<PortList;LIndx++)
{
CutOffRecord SendRec=(CutOffRecord)getCaselist().get(LIndx);
String Portfolioid=SendRec.getPortfolioid();
int SubList=SendRec.getSublist().size();
for(int SIndx=0;SIndx<SubList;SIndx++)
{
CutOffRecord SubRec=(CutOffRecord)SendRec.getSublist().get(SIndx);
DBF.setProcessFlag(true);
String Query="";
Query=Query+""+SubRec.getUuid()+""+GlobalClass.ColDelim;
Query=Query+""+(SubRec.isOprsend() ? 1:0)+""+GlobalClass.ColDelim;
Query=Query+""+getSendTime()+""+GlobalClass.ColDelim;
Query=Query+""+UserId+""+GlobalClass.ColDelim;
Query=Query+""+CompanyId+""+GlobalClass.ColDelim;
Query=Query+""+BranchId+""+GlobalClass.ColDelim;
Query=Query+""+Portfolioid+""+GlobalClass.ColDelim;
String Temp=DBF.FetchRunQuery(47, Query.split(GlobalClass.ColDelim));
}
}
}
}

View File

@@ -1,261 +0,0 @@
package matrix.nimble.edp.cutoff.model;
import java.util.ArrayList;
import java.util.List;
import matrix.nimble.edp.output.model.ReportOutput;
import matrix.nimble.utilities.DBFunctions;
import matrix.nimble.utilities.GlobalClass;
import matrix.nimble.utilities.StringFunctions;
import org.apache.commons.collections.FactoryUtils;
import org.apache.commons.collections.list.LazyList;
public class Telesheet {
private List<CutOffRecord> tvrlist = LazyList.decorate(new ArrayList(),FactoryUtils.instantiateFactory(CutOffRecord.class));
private String TeleSheetTime;
private String ErrMsg;
private String ErrDesc;
private String ErrCode;
private String SessUUID;
private boolean ProcessFlag;
private String TelePDFLink;
public List<CutOffRecord> getTvrlist() {
return tvrlist;
}
public String getTeleSheetTime() {
return TeleSheetTime;
}
public void setTeleSheetTime(String teleSheetTime) {
TeleSheetTime = teleSheetTime;
}
public void setTvrlist(List<CutOffRecord> tvrlist) {
this.tvrlist = tvrlist;
}
public String getSessUUID() {
return SessUUID;
}
public void setSessUUID(String sessUUID) {
SessUUID = sessUUID;
}
public String getErrMsg() {
return ErrMsg;
}
public void setErrMsg(String errMsg) {
ErrMsg = errMsg;
}
public String getErrDesc() {
return ErrDesc;
}
public void setErrDesc(String errDesc) {
ErrDesc = errDesc;
}
public String getErrCode() {
return ErrCode;
}
public void setErrCode(String errCode) {
ErrCode = errCode;
}
public boolean isProcessFlag() {
return ProcessFlag;
}
public void setProcessFlag(boolean processFlag) {
ProcessFlag = processFlag;
}
public String getTelePDFLink() {
return TelePDFLink;
}
public void setTelePDFLink(String telePDFLink) {
TelePDFLink = telePDFLink;
}
public Telesheet getTeleList(String CompanyId,String BranchId,String UserId)
{
Telesheet TList=new Telesheet();
StringFunctions StrFunc=new StringFunctions(getErrCode());
DBFunctions DBF=new DBFunctions(getErrCode());
DBF.setProcessFlag(true);
String [] Vals=(CompanyId+GlobalClass.ColDelim+BranchId+GlobalClass.ColDelim+UserId+GlobalClass.ColDelim).split(GlobalClass.ColDelim);
DBF.FetchRunQuery(31, Vals);
if(DBF.isProcessFlag())
{
String ResultData=DBF.FetchRunQuery(32, Vals); //Generating list of portfolios those telesheet to be generated
if(DBF.isProcessFlag())
{
String [][] TvrListData=StrFunc.ConverTo2DArray(ResultData, GlobalClass.RowDelim, GlobalClass.ColDelim);
ArrayList<CutOffRecord> Record=new ArrayList<CutOffRecord>();
for(int RecCount=0;RecCount<TvrListData.length;RecCount++)
{
DBF.setProcessFlag(true);
CutOffRecord CORec=new CutOffRecord();
CORec.setPortfolioid(TvrListData[RecCount][0]);
CORec.setPortname(TvrListData[RecCount][1]);
CORec.setTotrv(Integer.parseInt(TvrListData[RecCount][2]));
CORec.setTotov(Integer.parseInt(TvrListData[RecCount][3]));
CORec.setTotref(Integer.parseInt(TvrListData[RecCount][4]));
CORec.setIslocked(Integer.parseInt(TvrListData[RecCount][5]));
if(CORec.getIslocked() > 0)
{
CORec.setTv(false);
}
else
{
CORec.setTv(Integer.parseInt(TvrListData[RecCount][6])<=0 ? false:true);
}
CORec.setLockedby(TvrListData[RecCount][7]);
CORec.setRepformat(TvrListData[RecCount][8]);
CORec.setRepfunction(TvrListData[RecCount][9]);
//Collecting records for sublist
String [] Vals1=(CompanyId+GlobalClass.ColDelim+BranchId+GlobalClass.ColDelim+UserId+GlobalClass.ColDelim+CORec.getPortfolioid()+GlobalClass.ColDelim).split(GlobalClass.ColDelim);
String ResultData1=DBF.FetchRunQuery(33, Vals1); //Generating sublist records
if(DBF.isProcessFlag())
{
String [][] SubListData=StrFunc.ConverTo2DArray(ResultData1, GlobalClass.RowDelim, GlobalClass.ColDelim);
ArrayList<CutOffRecord> SubRecord=new ArrayList<CutOffRecord>();
for(int ListCount=0;ListCount<SubListData.length;ListCount++)
{
CutOffRecord SCORec=new CutOffRecord();
SCORec.setMvcode(SubListData[ListCount][0]);
SCORec.setApplno(SubListData[ListCount][1]);
SCORec.setCustomername(SubListData[ListCount][2]);
SCORec.setApptype(SubListData[ListCount][3]);
SCORec.setTotrv(Integer.parseInt(SubListData[ListCount][4]));
SCORec.setTotov(Integer.parseInt(SubListData[ListCount][5]));
SCORec.setTotref(Integer.parseInt(SubListData[ListCount][6]));
SCORec.setIslocked(Integer.parseInt(SubListData[ListCount][7]));
SCORec.setLockedby(SubListData[ListCount][8]);
SCORec.setTv(Integer.parseInt(SubListData[ListCount][9])<=0 ? false:true);
SCORec.setUuid(SubListData[ListCount][10]);
SubRecord.add(SCORec);
}
CORec.setSublist(SubRecord);
}
Record.add(CORec);
}
TList.setTvrlist(Record);
TList.setSessUUID(getSessUUID());
TList.setErrCode(getErrCode());
}
else
{
setProcessFlag(false);
setErrDesc(DBF.getErrDesc());
setErrMsg(DBF.getErrMsg());
TList.setErrDesc(DBF.getErrDesc());
TList.setErrMsg(DBF.getErrMsg());
TList.setErrCode(getErrCode());
}
}
else
{
setProcessFlag(false);
setErrDesc(DBF.getErrDesc());
setErrMsg(DBF.getErrMsg());
TList.setErrDesc(DBF.getErrDesc());
TList.setErrMsg(DBF.getErrMsg());
TList.setErrCode(getErrCode());
}
return TList;
}
public void FinalizeTeleSheet(String UserId,String CompanyId,String BranchId,String RootPath)
{
String TeleSheetLink="";
setTelePDFLink("");
setProcessFlag(true);
//---> TeleSheet status
int TotRtv=0;
int TotOtv=0;
int TotRef=0;
int TotRtvGen=0;
int TotOtvGen=0;
int TotRefGen=0;
int TotRtvFailed=0;
int TotOtvFailed=0;
int TotRefFailed=0;
setTeleSheetTime(new StringFunctions(getErrCode()).FormatDate("yyyy/MM/dd HH:mm:ss", new java.util.Date()));
//<--- TeleSheet status ends
DBFunctions DBF=new DBFunctions(getErrCode());
int PortList=getTvrlist().size();
String [][] TeleCutList=new String[PortList][6];
int CutListIndx=0;
for(int LIndx=0;LIndx<PortList;LIndx++)
{
CutOffRecord TvrRec=(CutOffRecord)getTvrlist().get(LIndx);
TeleCutList[LIndx][4]="empty";
if (TvrRec.getIslocked()==0 && TvrRec.isTv())
{
int SubList=TvrRec.getSublist().size();
// Filling list of portfolios and their respective tele format
TeleCutList[CutListIndx][0]=TvrRec.getPortfolioid();
TeleCutList[CutListIndx][1]=getTeleSheetTime();
TeleCutList[CutListIndx][2]=TvrRec.getRepformat();
TeleCutList[CutListIndx][3]=UserId;
TeleCutList[CutListIndx][5]=TvrRec.getRepfunction();
//<--- Ends
for(int SIndx=0;SIndx<SubList;SIndx++)
{
CutOffRecord SubRec=(CutOffRecord)TvrRec.getSublist().get(SIndx);
if(SubRec.isTv())
{
TeleCutList[CutListIndx][4]="notempty";
TotRtv=TotRtv+SubRec.getTotrv();
TotOtv=TotOtv+SubRec.getTotov();
TotRef=TotRef+SubRec.getTotref();
}
DBF.setProcessFlag(true);
String Query="";
Query=Query+""+(SubRec.isTv() ? UserId:0)+""+GlobalClass.ColDelim;
Query=Query+""+(SubRec.isTv() ? getTeleSheetTime():"NULL")+""+GlobalClass.ColDelim;
Query=Query+""+(SubRec.isTv() ? UserId:"NULL")+""+GlobalClass.ColDelim;
Query=Query+""+SubRec.getUuid()+""+GlobalClass.ColDelim;
String Temp=DBF.FetchRunQuery(34, Query.split(GlobalClass.ColDelim));
if(DBF.isProcessFlag())
{
if(SubRec.isTv())
{
TotRtvGen=TotRtvGen+SubRec.getTotrv();
TotOtvGen=TotOtvGen+SubRec.getTotov();
TotRefGen=TotRefGen+SubRec.getTotref();
}
}
else
{
if(SubRec.isTv())
{
TotRtvFailed=TotRtvFailed+SubRec.getTotrv();;
TotOtvFailed=TotOtvFailed+SubRec.getTotov();;
TotRefFailed=TotRefFailed+SubRec.getTotref();;
}
}
}
CutListIndx=CutListIndx+1;
}
}
if (TotRtvGen > 0 || TotOtvGen>0 || TotRefGen > 0)
{
ReportOutput TS=new ReportOutput();
TS.setProcessFlag(true);
TS.setErrCode(getErrCode());
TeleSheetLink=TS.GenerateCallingSheet(TeleCutList,GlobalClass.getStoragePath(),CompanyId,BranchId,"telesheet");
if(!TS.isProcessFlag())
{
setProcessFlag(false);
setErrMsg(TS.getErrMsg());
setErrDesc(TS.getErrDesc());
}
else
{
setProcessFlag(true);
setErrMsg(getErrCode()+"TSGEN:Info:Telesheet generated successfully. Please use link in a page to open Tele Sheet.");
setTelePDFLink(GlobalClass.DocServer+TeleSheetLink);
DBF.FetchRunQuery(103, (getTeleSheetTime()+GlobalClass.ColDelim+"telesheet"+GlobalClass.ColDelim+TeleSheetLink+GlobalClass.ColDelim+BranchId+GlobalClass.ColDelim).split(GlobalClass.ColDelim));
}
}
else
{
setProcessFlag(true);
setErrMsg(getErrCode()+"ETLST:Error:No records found to generate Tele Sheet.");
}
}
}

View File

@@ -1,47 +0,0 @@
package matrix.nimble.edp.punching.model;
public class CaseGrid {
private String ErrMsg;
private String ErrDesc;
private String ErrCode;
private boolean ProcessFlag;
private String PortfolioId;
private String CaseID;
public String getErrMsg() {
return ErrMsg;
}
public void setErrMsg(String errMsg) {
ErrMsg = errMsg;
}
public String getErrDesc() {
return ErrDesc;
}
public void setErrDesc(String errDesc) {
ErrDesc = errDesc;
}
public String getErrCode() {
return ErrCode;
}
public void setErrCode(String errCode) {
ErrCode = errCode;
}
public boolean isProcessFlag() {
return ProcessFlag;
}
public void setProcessFlag(boolean processFlag) {
ProcessFlag = processFlag;
}
public String getPortfolioId() {
return PortfolioId;
}
public void setPortfolioId(String portfolioId) {
PortfolioId = portfolioId;
}
public String getCaseID() {
return CaseID;
}
public void setCaseID(String caseID) {
CaseID = caseID;
}
}

View File

@@ -1,180 +0,0 @@
package matrix.nimble.edp.punching.model;
import matrix.nimble.utilities.CommonFunctions;
import matrix.nimble.utilities.DBFunctions;
import matrix.nimble.utilities.GlobalClass;
import matrix.nimble.utilities.StringFunctions;
public class PunchingHandler {
private String ErrMsg;
private String ErrDesc;
private String ErrCode;
private boolean ProcessFlag;
private String visiblecontents;
private String dynamicpanel;
private String dynamicsection;
private String dynamicfields;
private String portfolioid;
private String [][] optionvals;
public String getErrMsg() {
return ErrMsg;
}
public void setErrMsg(String errMsg) {
ErrMsg = errMsg;
}
public String getErrDesc() {
return ErrDesc;
}
public void setErrDesc(String errDesc) {
ErrDesc = errDesc;
}
public String getErrCode() {
return ErrCode;
}
public void setErrCode(String errCode) {
ErrCode = errCode;
}
public boolean isProcessFlag() {
return ProcessFlag;
}
public void setProcessFlag(boolean processFlag) {
ProcessFlag = processFlag;
}
public String getVisiblecontents() {
return visiblecontents;
}
public void setVisiblecontents(String visiblecontents) {
this.visiblecontents = visiblecontents;
}
public String getDynamicpanel() {
return dynamicpanel;
}
public void setDynamicpanel(String dynamicpanel) {
this.dynamicpanel = dynamicpanel;
}
public String getDynamicsection() {
return dynamicsection;
}
public void setDynamicsection(String dynamicsection) {
this.dynamicsection = dynamicsection;
}
public String getDynamicfields() {
return dynamicfields;
}
public void setDynamicfields(String dynamicfields) {
this.dynamicfields = dynamicfields;
}
public String getPortfolioid() {
return portfolioid;
}
public void setPortfolioid(String portfolioid) {
this.portfolioid = portfolioid;
}
public String[][] getOptionvals() {
return optionvals;
}
public void setOptionvals(String[][] optionvals) {
this.optionvals = optionvals;
}
public String GetVisibleSections()
{
DBFunctions dbf=new DBFunctions(getErrCode());
dbf.setProcessFlag(true);
setVisiblecontents("");
return dbf.FetchRunQuery(10, ("10"+GlobalClass.ColDelim+getPortfolioid()+GlobalClass.ColDelim).split(GlobalClass.ColDelim)).replace(GlobalClass.RowDelim, "");
}
public void GetDDValues(int QueryId,String [] Qvals)
{
DBFunctions dbf=new DBFunctions(getErrCode());
dbf.setProcessFlag(true);
dbf.FetchRunQuery(QueryId, Qvals);
if(dbf.isProcessFlag())
{
setOptionvals(dbf.getResultArray());
}
else
{
setOptionvals(null);
}
}
public void DynamicHtml(String pageId)
{
DBFunctions dbf=new DBFunctions(getErrCode());
StringFunctions StrFunc=new StringFunctions(getErrCode());
setDynamicpanel("");
setDynamicfields("");
dbf.setProcessFlag(true);
String ResultString=dbf.FetchRunQuery(74, (getPortfolioid()+GlobalClass.ColDelim+pageId+GlobalClass.ColDelim+"ADDCASE"+GlobalClass.ColDelim).split(GlobalClass.ColDelim));
if(dbf.isProcessFlag())
{
StrFunc=new StringFunctions(getErrCode());
CommonFunctions Cfunc=new CommonFunctions();
String [][] ResultSet=StrFunc.ConverTo2DArray(ResultString, GlobalClass.RowDelim, GlobalClass.ColDelim);
if(StrFunc.isProcessFlag())
{
if(ResultSet.length > 0)
{
setDynamicsection("section6"+GlobalClass.ColDelim);
Cfunc.setGeneratedHtml("");
Cfunc.setPrevControl("");
Cfunc.setDynamicCtrls("");
for(int indx=0;indx<ResultSet.length;indx++)
{
String ControlVal="";
String secContainer="";
String Temp="";
secContainer=Cfunc.DynamicControls(ResultSet[indx], ControlVal);
if(secContainer.equals("Othersec"))
{
Temp=getDynamicpanel();
if(Temp.endsWith("</select></div></div></div>") && Cfunc.getGeneratedHtml().endsWith("</select></div></div></div>"))
{
if(!Cfunc.getGeneratedHtml().startsWith("<div class='widget'>"))
{
Temp=Temp.substring(0,Temp.lastIndexOf("</select></div></div></div>"));
}
}
setDynamicpanel(Temp+""+Cfunc.getGeneratedHtml());
}
}
setDynamicfields(Cfunc.getDynamicCtrls());
}
}
else
{
setProcessFlag(false);
setErrMsg(dbf.getErrMsg());
setErrDesc(dbf.getErrDesc());
}
}
else
{
setProcessFlag(dbf.getErrMsg().toLowerCase().contains("no records found") ? true:false);
setErrMsg(dbf.getErrMsg().toLowerCase().contains("no records found") ? "" : dbf.getErrMsg());
setErrDesc(dbf.getErrDesc());
}
}
public String[][] loadCasesForAddrCorrection() {
String [][]resultArray = null;
DBFunctions dbf=new DBFunctions(getErrCode());
StringFunctions StrFunc=new StringFunctions(getErrCode());
setDynamicpanel("");
setDynamicfields("");
dbf.setProcessFlag(true);
dbf.FetchRunQuery(474, (getPortfolioid()+GlobalClass.ColDelim).split(GlobalClass.ColDelim));
if(dbf.isProcessFlag())
{
resultArray = dbf.getResultArray();
}
else
{
setProcessFlag(false);
setErrMsg(dbf.getErrMsg());
setErrDesc(dbf.getErrDesc());
}
return resultArray;
}
}

View File

@@ -0,0 +1,11 @@
-- Remove artifacts made obsolete by the migrated Punching/Cut-Off workflows.
UPDATE platform.application_query
SET query_text = 'SELECT m.uuid AS document_case_id, m.mvcode AS mv_code, UPPER(m.applno) AS file_number, UPPER(m.customername) AS customer_name, UPPER(m.apptype) AS application_type, UPPER(m.product) AS product, TO_CHAR(COALESCE(m.addedon, m.lasteditedon), ''DD-MON-YYYY HH24:MI:SS'') AS received_on, COALESCE(NULLIF(m.lasteditedbyuser, ''''), m.addedbyuser, '''') AS punched_by, b.bkbranchcode AS branch_code, m.portfolio_id FROM main m JOIN main_operations mo ON mo.case_id = m.case_id JOIN portfolio_bank_branch b ON b.portbranch_id = m.bank_branch_id WHERE mo.oprsend = 1 AND mo.sdone = 0 AND m.isdeleted = 0 AND m.portfolio_id = ? AND m.company_id = ? AND m.branch_id = ? ORDER BY COALESCE(m.addedon, m.lasteditedon), m.applno, m.apptype',
ismigrated = TRUE
WHERE query_id = 23;
DELETE FROM platform.application_query
WHERE query_id = 475;
DROP VIEW IF EXISTS public.editcasesgrid;

File diff suppressed because one or more lines are too long