Commit ce1db158 authored by dkasliwal's avatar dkasliwal

Check condition for employee is not present then do no add in missing feedback list

His in out time is 00.00


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@102388 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 644a10cb
...@@ -23,7 +23,7 @@ import org.json.simple.JSONObject; ...@@ -23,7 +23,7 @@ import org.json.simple.JSONObject;
@Stateless @Stateless
public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDashboardRemote public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDashboardRemote
{ {
GenericUtility genericUtility = new GenericUtility(); GenericUtility genericUtility = GenericUtility.getInstance();
SimpleDateFormat gridDateFormat=null; SimpleDateFormat gridDateFormat=null;
SimpleDateFormat convrtToTimStmDate=null; SimpleDateFormat convrtToTimStmDate=null;
public ManagmentDashboard() public ManagmentDashboard()
...@@ -1652,7 +1652,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas ...@@ -1652,7 +1652,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
} }
} }
rs.close(); rs.close();
rs=null;
pstmt.close(); pstmt.close();
pstmt=null;
System.out.println("empMap in missing feedback : "+empMap); System.out.println("empMap in missing feedback : "+empMap);
for (String empCodeName : empMap.keySet()) for (String empCodeName : empMap.keySet())
{ {
...@@ -1670,8 +1673,9 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas ...@@ -1670,8 +1673,9 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
{ {
if(!valueList.contains(executeDayList.get(keyCtr))) if(!valueList.contains(executeDayList.get(keyCtr)))
{ {
cnt++;
/*Start - Commnent code beacause add in condition by Dhanendra on date 08-07-2016*/
/*cnt++;
if(excDate.length()==0) if(excDate.length()==0)
{ {
excDate.append(gridDateFormat.format(convrtToTimStmDate.parse(executeDayList.get(keyCtr)))); excDate.append(gridDateFormat.format(convrtToTimStmDate.parse(executeDayList.get(keyCtr))));
...@@ -1679,7 +1683,42 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas ...@@ -1679,7 +1683,42 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
else else
{ {
excDate.append("; "+gridDateFormat.format(convrtToTimStmDate.parse(executeDayList.get(keyCtr)))); excDate.append("; "+gridDateFormat.format(convrtToTimStmDate.parse(executeDayList.get(keyCtr))));
}*/
/*End - Commnent code beacause add in condition by Dhanendra on date 08-07-2016*/
/*Add code emp is present by Dhanendra as per manohar sir observation on date 08-07-2016*/
int presentCnt = 0;
Timestamp attdDate= null;
attdDate= Timestamp.valueOf(genericUtility.getValidDateString(executeDayList.get(keyCtr), genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()) + " 00:00:00.0");
sql = "select count(1) as presentCnt from attendance_day where emp_code = ? and attd_date = ? and in_time <> '00:00' and out_time <> '00:00'";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,emp);
pstmt.setTimestamp(2,attdDate);
rs = pstmt.executeQuery();
if(rs.next())
{
presentCnt = rs.getInt("presentCnt");
}
rs.close();
rs=null;
pstmt.close();
pstmt=null;
if(presentCnt == 0)
{
cnt++;
if(excDate.length()==0)
{
excDate.append(gridDateFormat.format(convrtToTimStmDate.parse(executeDayList.get(keyCtr))));
}
else
{
excDate.append("; "+gridDateFormat.format(convrtToTimStmDate.parse(executeDayList.get(keyCtr))));
}
} }
/*End code emp is present by Dhanendra as per manohar sir observation on date 08-07-2016*/
} }
} }
rowData.put("emp_code", emp); rowData.put("emp_code", emp);
......
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