Commit e3d77a40 authored by Vijay Akula's avatar Vijay Akula

Modified the code for shift details

parent 9355be90
...@@ -7,7 +7,6 @@ import com.nisum.myteam.model.dao.Project; ...@@ -7,7 +7,6 @@ import com.nisum.myteam.model.dao.Project;
import com.nisum.myteam.service.IEmployeeService; import com.nisum.myteam.service.IEmployeeService;
import com.nisum.myteam.service.IMailService; import com.nisum.myteam.service.IMailService;
import com.nisum.myteam.service.IProjectService; import com.nisum.myteam.service.IProjectService;
import com.nisum.myteam.utils.DateUtils;
import com.nisum.myteam.utils.MyTeamDateUtils; import com.nisum.myteam.utils.MyTeamDateUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
......
...@@ -592,7 +592,7 @@ public class ResourceAllocationService implements IResourceAllocationService { ...@@ -592,7 +592,7 @@ public class ResourceAllocationService implements IResourceAllocationService {
// //
// } // }
if (resource.getBillingEndDate().compareTo(new Date()) >= 0) {
Employee employee = employeeService.getEmployeeById(resource.getEmployeeId()); Employee employee = employeeService.getEmployeeById(resource.getEmployeeId());
EmployeeShiftsVO shiftsVO = new EmployeeShiftsVO(); EmployeeShiftsVO shiftsVO = new EmployeeShiftsVO();
...@@ -605,11 +605,12 @@ public class ResourceAllocationService implements IResourceAllocationService { ...@@ -605,11 +605,12 @@ public class ResourceAllocationService implements IResourceAllocationService {
if (employee != null) { if (employee != null) {
if (shift.equalsIgnoreCase(employee.getShift())) if (shift.equalsIgnoreCase(employee.getShift()))
resourcesList.add(shiftsVO); resourcesList.add(shiftsVO);
else if (employee.getShift() == null && Shifts.SHIFT1.getShiftType().equalsIgnoreCase(shift)) else if (employee.getShift() == null && Shifts.SHIFT1.getShiftType().equalsIgnoreCase(shift))
resourcesList.add(shiftsVO); resourcesList.add(shiftsVO);
} }
}
}//for }//for
} }
......
package com.nisum.myteam.utils;
import lombok.extern.slf4j.Slf4j;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.Calendar;
import java.util.Date;
@Slf4j
public class DateUtils {
}
...@@ -32,9 +32,9 @@ public class MyTeamDateUtils { ...@@ -32,9 +32,9 @@ public class MyTeamDateUtils {
return yesterday; return yesterday;
} }
public static void main(String[] args) //public static void main(String[] args)
{ //{
MyTeamDateUtils.getDayLessThanDate(new Date()); // MyTeamDateUtils.getDayLessThanDate(new Date());
} // }
} }
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