Commit 073a3756 authored by pbhosale's avatar pbhosale

Updated on [03-01-2020]

PerkClaimCancelProcess.java
A19JSUN001.sql


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@214541 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 14bcdd5d
Insert into MESSAGES (MSG_NO,MSG_STR,MSG_DESCR,MSG_TYPE,MSG_OPT,MSG_TIME,ALARM,ERR_SOURCE,CHG_DATE,CHG_USER,CHG_TERM,OVERRIDE_INPUT,MAIL_OPTION) values ('VPPRKCAN01','Perk claim can not be done','You can not claimed this perk AD code in this loan ammount already adjusted','E','Y',null,null,null,to_date('18-05-11','DD-MM-RR'),'VISHAL ','VISHAL ',null,'0');
......@@ -295,7 +295,10 @@ public class PerkClaimCancelProcess extends ProcessEJB implements PerkClaimCance
if((confirmed.trim().length() >0 && confirmed.trim().equalsIgnoreCase("Y"))
&& (loanAdjamount != null && loanAdjamount >0.0d))
{
errorString = itmDBAccess.getErrorString("", "VPPERKAD1", "");
// Added By Poonam B[03-01-2020][START][CCF No: IT2016-05][A19JSUN001]
//errorString = itmDBAccess.getErrorString("", "VPPERKAD1", "");
errorString = itmDBAccess.getErrorString("", "VPPRKCAN01", "");
// Added By Poonam B[03-01-2020][END][CCF No: IT2016-05][A19JSUN001]
return errorString;
}
else if(checkCancelStatus) /* START >> Added by vinay c 11/11/2019 [ To check in Perk Claim Load tran id is already cancelled ] */
......@@ -526,8 +529,28 @@ public class PerkClaimCancelProcess extends ProcessEJB implements PerkClaimCance
System.out.println("EMP_ADCLAIMHDR Updated with tran Id >> "+ tranId);
}
close(adclaimhdrPstmt,rs);
}
// Added By Poonam B[03-01-2020][START][CCF No: IT2016-05][A19JSUN001]
sqlUpdateEmpAdClaimHDR = "UPDATE EMP_ADCLAIMHDR SET REF_STATUS =?,REF_ID__REV = ?"
+ " WHERE TRAN_ID = ?";
adclaimhdrPstmt = conn.prepareStatement(sqlUpdateEmpAdClaimHDR);
adclaimhdrPstmt.setString(1,"C");
adclaimhdrPstmt.setString(2, tranId);
adclaimhdrPstmt.setString(3,tranIdNew);
updateCnt = adclaimhdrPstmt.executeUpdate();
if(updateCnt >0)
{
msgType.append("adclaimhdr");
System.out.println("EMP_ADCLAIMHDR Updated with tran Id >> "+ tranId);
}
close(adclaimhdrPstmt,rs);
// Added By Poonam B[03-01-2020][END][CCF No: IT2016-05][A19JSUN001]
}
empAdclaimSql = "select count(*) as cnt,eff_date from EMP_ADCLAIM where tran_id = ? group by eff_date";
adClaimPstmt = conn.prepareStatement(empAdclaimSql);
adClaimPstmt.setString(1,tranId);
......@@ -1112,9 +1135,29 @@ public class PerkClaimCancelProcess extends ProcessEJB implements PerkClaimCance
if(updateCnt >0)
System.out.println("EMP_ADCLAIMHDR Updated with tran Id >> "+ tranId);
System.out.println("EMP_ADCLAIMHDR Updated with tran Id >> "+ tranIdNew);
}
close(adclaimhdrPstmt,rs);
// Modified By Poonam B[03-01-2020][START][CCF No: IT2016-05][A19JSUN001]
close(adclaimhdrPstmt,rs);
sqlUpdateEmpAdClaimHDR = "UPDATE EMP_ADCLAIMHDR SET REF_STATUS =?,REF_ID__REV = ?"
+ " WHERE TRAN_ID = ?";
adclaimhdrPstmt = conn.prepareStatement(sqlUpdateEmpAdClaimHDR);
adclaimhdrPstmt.setString(1,"C");
adclaimhdrPstmt.setString(2, tranId);
adclaimhdrPstmt.setString(3,tranIdNew);
updateCnt = adclaimhdrPstmt.executeUpdate();
if(updateCnt >0)
{
msgType.append("adclaimhdr");
System.out.println("EMP_ADCLAIMHDR Updated with tran Id >> "+ tranId);
}
close(adclaimhdrPstmt,rs);
}
//close(adclaimhdrPstmt,rs);
// Modified By Poonam B[03-01-2020][END][CCF No: IT2016-05][A19JSUN001]
/*empAdclaimSql = "select count(*) as cnt from EMP_ADCLAIM where tran_id = ?";
adClaimPstmt = conn.prepareStatement(empAdclaimSql);
adClaimPstmt.setString(1,tranId);
......@@ -1643,7 +1686,10 @@ public class PerkClaimCancelProcess extends ProcessEJB implements PerkClaimCance
}
System.out.println("return String >> "+ errString);
} /* START >> Added by vinay c 20/11/2019 When Payroll Voucher Type is Lapse */
else
// Modified By Poonam B[03-01-2020][START][CCF No: IT2016-05][A19JSUN001]
//else
else if(payrollVoucher.equalsIgnoreCase("L"))
// Modified By Poonam B[03-01-2020][END][CCF No: IT2016-05][A19JSUN001]
{
/**If Payroll voucher type is Lapse
* will inserted records into tables
......@@ -1698,9 +1744,29 @@ public class PerkClaimCancelProcess extends ProcessEJB implements PerkClaimCance
System.out.println("EMP_ADCLAIMHDR Updated with tran Id >> "+ tranId);
System.out.println("EMP_ADCLAIMHDR Updated with tran Id >> "+ tranIdNew);
}
}
close(adclaimhdrPstmt,rs);
// Modified By Poonam B[03-01-2020][START][CCF No: IT2016-05][A19JSUN001]
close(adclaimhdrPstmt,rs);
sqlUpdateEmpAdClaimHDR = "UPDATE EMP_ADCLAIMHDR SET REF_STATUS =?,REF_ID__REV = ?"
+ " WHERE TRAN_ID = ?";
adclaimhdrPstmt = conn.prepareStatement(sqlUpdateEmpAdClaimHDR);
adclaimhdrPstmt.setString(1,"C");
adclaimhdrPstmt.setString(2, tranId);
adclaimhdrPstmt.setString(3,tranIdNew);
updateCnt = adclaimhdrPstmt.executeUpdate();
if(updateCnt >0)
{
msgType.append("adclaimhdr");
System.out.println("EMP_ADCLAIMHDR Updated with tran Id >> "+ tranId);
}
close(adclaimhdrPstmt,rs);
}
//close(adclaimhdrPstmt,rs);
// Modified By Poonam B[03-01-2020][END][CCF No: IT2016-05][A19JSUN001]
sql="SELECT tran_date,emp_code,claim_amt,loan_adjamt,payroll_voucher,prd_code__payroll,"
+ " ad_code,confirmed,udf_type FROM EMP_ADCLAIMHDR where tran_id=? ";
adClaimPstmthdr = conn.prepareStatement(sql);
......@@ -2168,7 +2234,11 @@ public class PerkClaimCancelProcess extends ProcessEJB implements PerkClaimCance
refStatus=checkNull(rs.getString("ref_status"));
refIdRev=checkNull(rs.getString("ref_id__rev"));
System.out.println("@vinay::refStatus>>"+refStatus+"\trefIdRev>>"+refIdRev);
if((refStatus!=null && refStatus.trim().length()>0 && refStatus.equals("Y")) && (refIdRev!=null && refIdRev.trim().length()>0 ))
// Modified By Poonam B[03-01-2020][START][CCF No: IT2016-05][A19JSUN001]
//if((refStatus!=null && refStatus.trim().length()>0 && refStatus.equals("Y")) && (refIdRev!=null && refIdRev.trim().length()>0 ))
if((refStatus!=null && refStatus.trim().length()>0 && (refStatus.equals("Y") || refStatus.equals("C"))) && (refIdRev!=null && refIdRev.trim().length()>0 ))
// Modified By Poonam B[03-01-2020][END][CCF No: IT2016-05][A19JSUN001]
{
status=true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment