Commit bd868f83 authored by sghate's avatar sghate

Updated component ReportToChangeIC.java


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@216300 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 29177e12
......@@ -192,14 +192,14 @@ public class ReportToChangeIC extends ValidatorEJB implements ReportToChangeLoca
cnt = 0;
/*sql = "select count(*) as cnt from employee where emp_code = ?";*/
//sql = "select count(*) as cnt,status,relieve_date from employee where emp_code = ? group by STATUS,RELIEVE_DATE"; //Added by Shital on 08/01/2020
sql = "select status,relieve_date from employee where emp_code = ?"; //Added by Shital on 08/01/2020
sql = "select count(*) as cnt,status,relieve_date from employee where emp_code = ? group by STATUS,RELIEVE_DATE"; //Added by Shital on 08/01/2020
//sql = "select status,relieve_date from employee where emp_code = ?"; //Added by Shital on 08/01/2020
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, empCodeTo);
rs = pstmt.executeQuery();
if (rs.next())
{
//cnt = rs.getInt("cnt");
cnt = rs.getInt("cnt");
status = checkNull(rs.getString("status"));
relieveDate = rs.getTimestamp("relieve_date"); //Added by Shital on 08/01/2020
}
......@@ -216,11 +216,11 @@ public class ReportToChangeIC extends ValidatorEJB implements ReportToChangeLoca
pstmt.close();
pstmt = null;
}
/*if(cnt != 1)
if(cnt != 1) //Modified by Shital on 07/02/2020
{
errList.add("VMEMP20");
errList.add("VMEMP20");
errFields.add(childNodeName.toLowerCase());
}*/
}
if("S".equalsIgnoreCase(status)) //Added by Shital on 08/01/2020
{
System.out.println("::::#Status::::");
......@@ -232,7 +232,8 @@ public class ReportToChangeIC extends ValidatorEJB implements ReportToChangeLoca
if(relieveDate != null && relieveDate.before(currentDate)) //Added by Shital on 08/01/2020
{
System.out.println("::::#relieveDate::::");
errList.add("VMEMPREP0"); //Relieve date of Report To should not less than Current date.
//errList.add("VMEMPREP0"); //Modified by Shital on 07/02/2020
errList.add("VMEMPREP04"); //Relieve date of Report To should not less than Current date.
errFields.add(childNodeName.toLowerCase());
}
}
......@@ -282,17 +283,18 @@ public class ReportToChangeIC extends ValidatorEJB implements ReportToChangeLoca
cnt = 0;
/*sql = "select count(*) as cnt from employee where emp_code = ?";*/
sql = "select status,relieve_date from employee where emp_code = ?"; //Added by Shital on 08/01/2020
sql = "select count(*) as cnt,status,relieve_date from employee where emp_code = ? group by STATUS,RELIEVE_DATE"; //Added by Shital on 08/01/2020
//sql = "select status,relieve_date from employee where emp_code = ?"; //Added by Shital on 08/01/2020
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, empCodeAdminTo);
rs = pstmt.executeQuery();
if (rs.next())
{
//cnt = rs.getInt("cnt");
cnt = rs.getInt("cnt");
status = checkNull(rs.getString("status"));
relieveDate = rs.getTimestamp("relieve_date"); //Added by Shital on 08/01/2020
}
//System.out.println("cnt2:::: " + cnt);
System.out.println("cnt2:::: " + cnt);
System.out.println("status2:::: " + status);
System.out.println("relieveDate2:::: " + relieveDate);
if (rs != null)
......@@ -305,11 +307,11 @@ public class ReportToChangeIC extends ValidatorEJB implements ReportToChangeLoca
pstmt.close();
pstmt = null;
}
/*if(cnt != 1)
if(cnt != 1) //Modified by Shital on 07/02/2020
{
errList.add("VMEMP20");
errFields.add(childNodeName.toLowerCase());
}*/
}
if("S".equalsIgnoreCase(status)) //Added by Shital on 08/01/2020
{
System.out.println("::::#Status###::::");
......
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