Updated changes for GEPAFINBE-127
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package net.gepafin.tendermanagement.dao;
|
||||
|
||||
import net.gepafin.tendermanagement.constants.GepafinConstant;
|
||||
import net.gepafin.tendermanagement.entities.CompanyEntity;
|
||||
import net.gepafin.tendermanagement.entities.UserActionEntity;
|
||||
import net.gepafin.tendermanagement.entities.UserEntity;
|
||||
@@ -175,19 +176,19 @@ public class DashboardDao {
|
||||
|
||||
// Get applications per call
|
||||
List<Object[]> applicationsPerCall = applicationRepository.findApplicationsPerCallWithName(requestedUser.getHub().getId());
|
||||
stats.put("APPLICATION_PER_CALL", applicationsPerCall.stream().map(result -> {
|
||||
stats.put(GepafinConstant.APPLICATION_PER_CALL, applicationsPerCall.stream().map(result -> {
|
||||
Map<String, Object> callData = new HashMap<>();
|
||||
callData.put("CALL", result[0]); // Call name
|
||||
callData.put("APPLICATIONS", result[1]); // Application count
|
||||
callData.put(GepafinConstant.CALL_NAME, result[0]); // Call name
|
||||
callData.put(GepafinConstant.NUMBER_OF_APPLICATIONS, result[1]); // Application count
|
||||
return callData;
|
||||
}).toList());
|
||||
|
||||
// Get applications grouped by status
|
||||
List<Object[]> applicationsByStatus = applicationRepository.findApplicationsByStatus(requestedUser.getHub().getId());
|
||||
stats.put("APPLICATION_STATUSES", applicationsByStatus.stream().map(result -> {
|
||||
stats.put(GepafinConstant.APPLICATION_PER_STATUS, applicationsByStatus.stream().map(result -> {
|
||||
Map<String, Object> statusData = new HashMap<>();
|
||||
statusData.put("STATUS", result[0]); // Application status
|
||||
statusData.put("COUNT", result[1]); // Count of applications
|
||||
statusData.put(GepafinConstant.STATUS, result[0]); // Application status
|
||||
statusData.put(GepafinConstant.NUMBER_OF_APPLICATIONS, result[1]); // Count of applications
|
||||
return statusData;
|
||||
}).toList());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user