Commit 293fb8f3 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@215745 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 0c77c0b4
......@@ -89,6 +89,8 @@ public class GradeWisePerkIC extends ValidatorEJB implements GradeWisePerkLocal,
int validityPrd = 0;
int cycleTime = 0;
String mtype= "",loginCode="",profileId="";
String payTable="";//Added by Sana S on 27/01/2020
E12GenericUtility genericUtility = null;
errStringXml = new StringBuffer("<?xml version=\"1.0\"?>\r\n<Root><Errors>");
......@@ -183,7 +185,7 @@ public class GradeWisePerkIC extends ValidatorEJB implements GradeWisePerkLocal,
{
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));
gradeCode=checkNull(genericUtility.getColumnValue("grade_code",dom));
// effDateStr = checkNull(genericUtility.getColumnValue("eff_date",dom));
......@@ -547,7 +549,6 @@ public class GradeWisePerkIC extends ValidatorEJB implements GradeWisePerkLocal,
pstmt = null;
}
if(gradeCode.equals("") || gradeCode.trim().length() == 0 || cnt==0)
{
errString = itmDbAcess.getErrorString("", "VMGRADE" , userId, "", conn);
......@@ -555,6 +556,46 @@ public class GradeWisePerkIC extends ValidatorEJB implements GradeWisePerkLocal,
}
}
//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;
}
......@@ -719,12 +760,18 @@ public class GradeWisePerkIC extends ValidatorEJB implements GradeWisePerkLocal,
{
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);
gradeCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "grade_code");
// Modified by sana s on 27/01/20[start]
//gradeCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "grade_code");
gradeCode =checkNull(genericUtility.getValueFromXTRA_PARAMS(xtraParams, "grade_code"));
// Modified by sana s on 27/01/20[end]
valueXmlString.append("<grade_code ><![CDATA[").append(gradeCode).append("]]></grade_code>\r\n");
AdmCommon.setNodeValue(dom, "grade_code", gradeCode);
......
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