Commit 985f8068 authored by sshinde's avatar sshinde

Change Date Logic Of Pending Request and Change logic of Missing feedback dashboard.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99909 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b6b58ebc
......@@ -443,14 +443,20 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
if((fromDate==null) ||(fromDate.equals("")) && (toDate==null) || (toDate.equals("")))
{
simpleDateFormat = new SimpleDateFormat( genericUtility.getApplDateFormat());
calendar = Calendar.getInstance();
toDate = simpleDateFormat.format(calendar.getTime());
calendar = Calendar.getInstance();
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMinimum(Calendar.DAY_OF_MONTH));
/* Start Modify by sachin on 14-JAN-16*/
calendar.add(Calendar.MONTH, -12);
/*End Modify by sachin on 14-JAN-16*/
fromDate = simpleDateFormat.format(calendar.getTime());
frmDateInTs = java.sql.Timestamp.valueOf(convertToDbDate.format(simpleDateFormat.parse(fromDate)).toString() + " 00:00:00.0");
toDateInTs = java.sql.Timestamp.valueOf(convertToDbDate.format(simpleDateFormat.parse(toDate)).toString() + " 00:00:00.0");
}
else
{
......@@ -1241,7 +1247,6 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
if((fromDateInTS!=null && fromDateInTS.toString().length()>0)
&& (toDateInTS!=null && toDateInTS.toString().length()>0)
&& (empCode!=null && empCode.trim().length()>0) )
{
......@@ -1308,14 +1313,17 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
}
rs.close();
pstmt.close();
for (String keyMap : empMap.keySet())
System.out.println("empMap in missing feedback : "+empMap);
for (String empCodeName : empMap.keySet())
{
System.out.println("empCodeName is= : "+empCodeName);
int cnt=0;
excDate=new StringBuilder();
valueList = new ArrayList<String>();
valueList = empMap.get(keyMap);
valueList = empMap.get(empCodeName);
rowData = new JSONObject();
String[] temp = keyMap.split("@");
String[] temp = empCodeName.split("@");
emp= temp[0];
empName= temp[1];
for(int keyCtr=0;keyCtr<executeDayList.size();keyCtr++)
......@@ -1323,8 +1331,6 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
if(!valueList.contains(executeDayList.get(keyCtr)))
{
cnt++;
rowData.put("emp_code", emp);
rowData.put("emp_name", empName);
if(excDate.length()==0)
{
......@@ -1336,11 +1342,20 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
}
}
}
rowData.put("emp_code", emp);
rowData.put("emp_name", empName);
rowData.put("missing_count",""+cnt );
rowData.put("missing_date",excDate.toString() );
/* Start Modify Code by sachin on 14-JAN-16*/
if(cnt>0)
{
rowDataMissingFeedbackJson.put(count, rowData);
count++;
}
/* End Modify Code by sachin on 14-JAN-16*/
}
System.out.println("rowDataMissingFeedbackJson in missing feedback: "+rowDataMissingFeedbackJson);
}
} catch (Exception e)
......
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