Commit 54072a5c authored by Rajeshekar's avatar Rajeshekar

MT-55[Rajeshekar]: Fixed active status issue while import

parent cdca4b29
...@@ -111,7 +111,20 @@ public class UserServiceImpl implements UserService { ...@@ -111,7 +111,20 @@ public class UserServiceImpl implements UserService {
public EmployeeRoles assigingEmployeeRole(EmployeeRoles employeeRoles) public EmployeeRoles assigingEmployeeRole(EmployeeRoles employeeRoles)
throws MyTimeException { throws MyTimeException {
employeeRoles.setCreatedOn(new Date()); employeeRoles.setCreatedOn(new Date());
if (employeeRoles.getEmploymentType() != null
&& !employeeRoles.getEmploymentType().isEmpty()
&& !employeeRoles.getEmploymentType()
.equalsIgnoreCase("Full Time")) {
employeeRoles.setEmploymentType(employeeRoles.getEmploymentType());
} else {
employeeRoles.setEmploymentType("Full Time");
}
if (employeeRoles.getEmpStatus() != null
&& employeeRoles.getEmpStatus().equalsIgnoreCase("In Active")) {
employeeRoles.setEmpStatus("In Active");
} else {
employeeRoles.setEmpStatus("Active");
}
ProjectTeamMate newBenchAllocation = new ProjectTeamMate(); ProjectTeamMate newBenchAllocation = new ProjectTeamMate();
newBenchAllocation.setAccount("Nisum"); newBenchAllocation.setAccount("Nisum");
...@@ -123,7 +136,8 @@ public class UserServiceImpl implements UserService { ...@@ -123,7 +136,8 @@ public class UserServiceImpl implements UserService {
newBenchAllocation.setEmployeeName(employeeRoles.getEmployeeName()); newBenchAllocation.setEmployeeName(employeeRoles.getEmployeeName());
newBenchAllocation.setProjectId("Nisum0000"); newBenchAllocation.setProjectId("Nisum0000");
newBenchAllocation.setStartDate(employeeRoles.getDateOfJoining() != null newBenchAllocation.setStartDate(employeeRoles.getDateOfJoining() != null
? employeeRoles.getDateOfJoining() : new Date()); ? employeeRoles.getDateOfJoining()
: new Date());
Project p = projectRepo.findByProjectId("Nisum0000"); Project p = projectRepo.findByProjectId("Nisum0000");
newBenchAllocation.setProjectName(p.getProjectName()); newBenchAllocation.setProjectName(p.getProjectName());
newBenchAllocation.setManagerId(p.getManagerId()); newBenchAllocation.setManagerId(p.getManagerId());
......
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