Commit a67b60bd authored by Md Suleman's avatar Md Suleman

Dashboard change for sub status

parent 75ca5ce0
package com.nisum.myteam.service.impl;
import com.nisum.myteam.exception.handler.MyTeamException;
import com.nisum.myteam.model.dao.Account;
import com.nisum.myteam.model.dao.Domain;
import com.nisum.myteam.model.dao.Employee;
import com.nisum.myteam.model.dao.Project;
import com.nisum.myteam.model.dao.Resource;
import com.nisum.myteam.model.dao.*;
import com.nisum.myteam.model.vo.EmployeeDashboardVO;
import com.nisum.myteam.model.vo.ResourceVO;
import com.nisum.myteam.service.IDashboardService;
......@@ -39,6 +35,9 @@ public class DashboardService implements IDashboardService {
@Autowired
private AccountService accountService;
@Autowired
private SubStatusService subStatusService;
@Override
public List<EmployeeDashboardVO> getEmployeesDashBoard() {
//List<Employee> allEmployees = employeeRepo.findAll();
......@@ -152,7 +151,10 @@ public class DashboardService implements IDashboardService {
for (Employee employee:allEmployees){
EmployeeDashboardVO employeeDashboardVO = new EmployeeDashboardVO();
EmployeeSubStatus subStatus = subStatusService.getCurrentSubStatus(employee.getEmployeeId());
BeanUtils.copyProperties(employee, employeeDashboardVO);
if(subStatus!=null)
employeeDashboardVO.setEmpSubStatus(subStatus.getSubStatus());
employeeDashboard.add(employeeDashboardVO);
}
......
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