Commit 0c77c0b4 authored by sanashaikh's avatar sanashaikh

Sana S: Modified on 27/01/2020

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@215744 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 0c384896
......@@ -90,6 +90,8 @@ public class CadreWisePerkIC extends ValidatorEJB implements CadreWisePerkLocal,
int cycleTime = 0;
String mtype= "",loginCode="",profileId="";
Date effDate=null,expDate = null;
String payTable="";// added by sana s on 27/01/2020
E12GenericUtility genericUtility = null;
errStringXml = new StringBuffer("<?xml version=\"1.0\"?>\r\n<Root><Errors>");
......@@ -180,7 +182,7 @@ public class CadreWisePerkIC extends ValidatorEJB implements CadreWisePerkLocal,
mval = checkNull(genericUtility.getColumnValue("ad_code",dom));
mval1 = checkNull(genericUtility.getColumnValue("ad_code__main",dom));
String payTable=checkNull(genericUtility.getColumnValue("pay_table",dom));
payTable=checkNull(genericUtility.getColumnValue("pay_table",dom));
cadreCode=checkNull(genericUtility.getColumnValue("cadre_code",dom));
//effDateStr = checkNull(genericUtility.getColumnValue("eff_date",dom));
......@@ -558,6 +560,46 @@ public class CadreWisePerkIC extends ValidatorEJB implements CadreWisePerkLocal,
}
}
//Added by Sana S on 24/01/2020 [end] [validate empty/null/wrong cadre code]
//Added by Sana S on 27/01/2020 [start] [validate empty/null/wrong paytable]
else if ("pay_table".equalsIgnoreCase(childNodeName))
{
payTable=checkNull(genericUtility.getColumnValue("pay_table",dom));
if(payTable.equals("") || payTable.trim().length() == 0)
{
errString = itmDbAcess.getErrorString("", "PAYTBLNULL" , userId, "", conn);
return errString;
}
sql="select count(1) as cnt from PAYTABLE where PAY_TABLE= ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, payTable);
rs = pstmt.executeQuery();
if (rs.next())
{
cnt = rs.getInt("cnt");
}
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(cnt==0)
{
errString = itmDbAcess.getErrorString("", "PAYINVAILD" , userId, "", conn);
return errString;
}
}
//Added by Sana S on 27/01/2020 [end] [validate empty/null/wrong paytable]
}
break;
......@@ -729,16 +771,23 @@ public class CadreWisePerkIC extends ValidatorEJB implements CadreWisePerkLocal,
System.out.println("=========================================Case1============================");
valueXmlString.append("<Detail1>\r\n");
System.out.println("Xtra Params>>"+xtraParams);
if ("itm_default".equalsIgnoreCase(currentColumn))
{
System.out.print("Profile ID:::"+genericUtility.getValueFromXTRA_PARAMS(xtraParams, "profile_id"));
payTable = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "pay_table");
// Modified by sana s on 27/01/20[start]
//payTable = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "pay_table");
payTable = checkNull(genericUtility.getValueFromXTRA_PARAMS(xtraParams, "pay_table"));
// Modified by sana s on 27/01/20 [end]
valueXmlString.append("<pay_table ><![CDATA[").append(payTable).append("]]></pay_table>\r\n");
AdmCommon.setNodeValue(dom, "pay_table", payTable);
cadreCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "cadre_code");
// Modified by sana s on 27/01/20[start]
//cadreCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "cadre_code");
cadreCode = checkNull(genericUtility.getValueFromXTRA_PARAMS(xtraParams, "cadre_code"));
// Modified by sana s on 27/01/20[end]
valueXmlString.append("<cadre_code ><![CDATA[").append(cadreCode).append("]]></cadre_code>\r\n");
AdmCommon.setNodeValue(dom, "cadre_code", cadreCode);
......
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