Commit 125a898d authored by vikram singh's avatar vikram singh

MT -5 Changes deployed

parent c50a7a52
...@@ -345,8 +345,7 @@ public class ReportsController { ...@@ -345,8 +345,7 @@ public class ReportsController {
// float traineePer; // float traineePer;
float billper; float billper;
float nonBillPer; float nonBillPer;
List<Employee> employeeList = employeeService.getAllEmployees().stream(). List<Employee> employeeList = employeeService.getEmployeesByFunctionalGrp(functionalGroup);
filter(e -> e.getFunctionalGroup().equals(functionalGroup)).collect(Collectors.toList());
for(Employee employee:employeeList){ for(Employee employee:employeeList){
Resource resource = resourceService.getLatestResourceByEmpId(employee.getEmployeeId()); Resource resource = resourceService.getLatestResourceByEmpId(employee.getEmployeeId());
if(resource!=null && resource.getBillableStatus().equals("Billable")){ if(resource!=null && resource.getBillableStatus().equals("Billable")){
......
...@@ -843,9 +843,8 @@ public class ResourceService implements IResourceService { ...@@ -843,9 +843,8 @@ public class ResourceService implements IResourceService {
return allocationList; return allocationList;
} }
@Override @Override
public Set<Resource> findByBillableStatus(String billableStatus) { public Set<Resource> findByBillableStatus(String billableStatus) {
List<String> uniqueEmployeeIds=new ArrayList<>(); return resourceRepo.findByBillableStatus(billableStatus).stream().filter(r -> r.getBillingEndDate().after(new Date())).collect(Collectors.toSet());
return resourceRepo.findByBillableStatus(billableStatus).stream().filter(e->!uniqueEmployeeIds.contains(e.getEmployeeId())).map(e->{uniqueEmployeeIds.add(e.getEmployeeId()); return e;}).collect(Collectors.toSet());
} }
......
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