Commit 7605f64d authored by dkasliwal's avatar dkasliwal

Modify code for check condition employee in out time . correct date unparseable problem


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@102469 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 00be84a1
......@@ -291,7 +291,7 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
rs = null;
// --- Count without a promised date
System.out.println("***** SQL Start for Count without a promised date**** ");
//sql = "select count(1) cnt_wit_prom from ser_request where emp_code__assign = ? and EXP_END_DATE is null";
/* [START] Modify SQL By sachin on 20-JAN-16 For Adding Ticket data*/
sql = "select sum(cnt_wit_prom) AS cnt_wit_prom from (select count(1) as cnt_wit_prom " +
......@@ -1549,6 +1549,7 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
String empName="";
SimpleDateFormat simpleDateFormat=null;
SimpleDateFormat convertToDbDate = null;
SimpleDateFormat sqlDateFormat = null;
try
{
conn = connDriver.getConnectDB(dataSourceName);
......@@ -1559,6 +1560,7 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
convrtToTimStmDate = new SimpleDateFormat( genericUtility.getDBDateFormat());
convertToDbDate = new SimpleDateFormat(genericUtility.getDBDateFormat());
gridDateFormat = new SimpleDateFormat("dd/MMM");
sqlDateFormat = new SimpleDateFormat("dd-MMM-yy");
System.out.println("In Employee Dashboard Missing FeedBack: "+empCode);
if((fromDate==null) ||(fromDate.equals("")) && (toDate==null) || (toDate.equals("")))
{
......@@ -1688,12 +1690,11 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
/*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");
String attdDate = sqlDateFormat.format(convrtToTimStmDate.parse(executeDayList.get(keyCtr)));
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);
pstmt.setString(2,attdDate);
rs = pstmt.executeQuery();
if(rs.next())
......@@ -1705,7 +1706,7 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
pstmt.close();
pstmt=null;
if(presentCnt == 0)
if(presentCnt == 1)
{
cnt++;
......
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