Commit 3b2a8e02 authored by sanashaikh's avatar sanashaikh

Sana S : Modified on 14/01/2020

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@215101 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 5c12a1fc
......@@ -185,12 +185,12 @@ public class GradeWisePerkIC extends ValidatorEJB implements GradeWisePerkLocal,
mval1 = checkNull(genericUtility.getColumnValue("ad_code__main",dom));
String payTable=checkNull(genericUtility.getColumnValue("pay_table",dom));
String gradeCode=checkNull(genericUtility.getColumnValue("grade_code",dom));
// effDateStr = checkNull(genericUtility.getColumnValue("eff_date",dom));
// effDateStr = checkNull(genericUtility.getColumnValue("eff_date",dom));
System.out.print("effDateStr at 433:"+effDateStr);
//sql="select count(1) as cnt from cadre_perk where ad_code= ? and ad_code__main=? and pay_table = ? and cadre_code= ? and eff_date = ?";
sql="select count(1) as cnt from grade_perk where ad_code= ? and ad_code__main=? and pay_table = ? and grade_code= ?";
pstmt = conn.prepareStatement(sql);
......@@ -221,14 +221,14 @@ public class GradeWisePerkIC extends ValidatorEJB implements GradeWisePerkLocal,
/*errCode="VTDUPREC";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());*/
errString = itmDbAcess.getErrorString("", "VTDUPREC" , userId, "", conn);
return errString;
}
mval = checkNull(genericUtility.getColumnValue("ad_code__main",dom));
mval1 = checkNull(genericUtility.getColumnValue("ad_code",dom));
if(mval.equals(mval1))
{
sql="select payable as mtype from allwdedn where ad_code=?";
......@@ -302,7 +302,10 @@ public class GradeWisePerkIC extends ValidatorEJB implements GradeWisePerkLocal,
if (rs.next())
{
ls_accfilt = rs.getString("ls_accfilt");
//Modified by Sana S on 14/01/2020 [start]
//ls_accfilt = rs.getString("ls_accfilt");
ls_accfilt = checkNull(rs.getString("ls_accfilt"));
//Modified by Sana S on 14/01/2020 [end]
}
if (rs != null)
{
......@@ -315,8 +318,10 @@ public class GradeWisePerkIC extends ValidatorEJB implements GradeWisePerkLocal,
pstmt = null;
}
System.out.print("ls_accfilt:"+ls_accfilt);
//if(!ls_accfilt.equals("") && ls_accfilt.trim().length() > 0)
if(ls_accfilt != null && ls_accfilt.trim().length() > 0) //Modified by Shital on 13/01/2020
//Modified by Sana S on 14/01/2020 [start]
if(!ls_accfilt.equals("") && ls_accfilt.trim().length() > 0)
//if(ls_accfilt != null && ls_accfilt.trim().length() > 0) //Modified by Shital on 13/01/2020
//Modified by Sana S on 14/01/2020 [end]
{
System.out.print("U R IN");
sql="select count(1) from allwdedn where ad_code = ? and " + ls_accfilt;
......@@ -440,7 +445,7 @@ public class GradeWisePerkIC extends ValidatorEJB implements GradeWisePerkLocal,
mval = checkNull(genericUtility.getColumnValue("ad_code",dom));
mval1 = checkNull(genericUtility.getColumnValue("ad_code__main",dom));
cycleStart=Integer.parseInt(checkInt(genericUtility.getColumnValue("cycle_start", dom)));
if(mval.equals(mval1))
{
if(cycleStart < 0 || cycleStart > 12 || cycleStart == 0)
......@@ -471,7 +476,7 @@ public class GradeWisePerkIC extends ValidatorEJB implements GradeWisePerkLocal,
}
}
}
else if ("amount".equalsIgnoreCase(childNodeName))
{
amount = Double.parseDouble(genericUtility.getColumnValue("amount",dom));
......@@ -501,7 +506,7 @@ public class GradeWisePerkIC extends ValidatorEJB implements GradeWisePerkLocal,
return errString;
}
}
else if ("validity_period".equalsIgnoreCase(childNodeName))
{
validityPrd = Integer.parseInt(checkInt(genericUtility.getColumnValue("validity_period",dom)));
......@@ -651,6 +656,10 @@ public class GradeWisePerkIC extends ValidatorEJB implements GradeWisePerkLocal,
UtilMethods utilMethods=new UtilMethods();
SimpleDateFormat sdf=new SimpleDateFormat("dd/MM/yy");
//Added by Sana S on 14/01/2020 [start]
String amount="";
//Added by Sana S on 14/01/2020 [end]
try
{
genericUtility = new E12GenericUtility();
......@@ -704,7 +713,7 @@ public class GradeWisePerkIC extends ValidatorEJB implements GradeWisePerkLocal,
lastProcDate =sdf.format(new Date());
valueXmlString.append("<last_proc_for ><![CDATA[").append(lastProcDate).append("]]></last_proc_for>\r\n");
AdmCommon.setNodeValue(dom, "last_proc_for", lastProcDate);
proccFor=sdf.parse(lastProcDate);
cycleTime=Integer.parseInt(checkInt(genericUtility.getColumnValue("cycle_time", dom)));
......@@ -739,6 +748,18 @@ public class GradeWisePerkIC extends ValidatorEJB implements GradeWisePerkLocal,
valueXmlString.append("<allwdedn_descr ><![CDATA[").append(descr).append("]]></allwdedn_descr>\r\n");
AdmCommon.setNodeValue(dom, "allwdedn_descr", descr);
}
//Added by Sana S on 14/01/2020 [start]
else if ("amount".equalsIgnoreCase(currentColumn))
{
amount=checkNull(genericUtility.getColumnValue("amount", dom));
if(amount.equals(null) || amount.length() == 0 || amount.equals(""))
{
valueXmlString.append("<amount><![CDATA[").append("0").append("]]></amount>\r\n");
}
}
//Added by Sana S on 14/01/2020 [end]
else if ("last_proc_for".equalsIgnoreCase(currentColumn))
{
lastProcFor=checkNull(genericUtility.getColumnValue("last_proc_for", dom));
......
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