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

MT -5 Changes deployed

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