Added field pec in csv

This commit is contained in:
rajesh
2025-07-03 15:01:31 +05:30
parent e4cd66247e
commit cbd06770fd
2 changed files with 10 additions and 4 deletions

View File

@@ -219,6 +219,9 @@ public class ApplicationDao {
@Autowired
private EvaluationCriteriaRepository evaluationCriteriaRepository;
@Autowired
private CallRepository callRepository;
public final Random random = new Random();
public ApplicationResponseBean createApplication(HttpServletRequest request, ApplicationRequestBean applicationRequestBean, Long formId, Long applicationId) {
@@ -2420,8 +2423,9 @@ public class ApplicationDao {
emailNotificationDao.sendMail(hub.getId(), subject, body, List.of(GepafinConstant.RINALDO_EMAIL),emailLogRequest);
}
public byte[] downloadRankingCsv(Long callId) {
CallEntity callEntity = callService.validateCall(callId);
public byte[] downloadRankingCsv(Long callId,UserEntity userEntity) {
CallEntity callEntity = validator.validateUserWithCall(userEntity,callId);
List<ApplicationEntity> applications =
applicationRepository.findByCallIdAndIsDeletedFalseAndStatusIn(
@@ -2489,7 +2493,7 @@ public class ApplicationDao {
// Build headers dynamically
List<String> headers = new ArrayList<>(List.of(
"ApplicationID","Application VatNumber", "VatNumber", "Company Name", "Protocol", "Requested Amount", "Status","Instructor Name", "Total Score"
"ApplicationID","Application VatNumber", "VatNumber", "Company Name", "Protocol", "Requested Amount", "Status","Instructor Name","Application PEC","Company PEC","Total Score"
));
headers.addAll(dynamicLabels);
@@ -2511,6 +2515,8 @@ public class ApplicationDao {
row.add(formattedAmount);
row.add(app.getStatus());
row.add(appInstructorMap.getOrDefault(appId, ""));
row.add(app.getPecEmail());
row.add(company.getPec());
row.add(appTotalScoreMap.get(appId));
Map<String, String> scores = appLabelScoresMap.getOrDefault(appId, Collections.emptyMap());

View File

@@ -180,6 +180,6 @@ public class ApplicationServiceImpl implements ApplicationService {
@Override
public byte[] downloadRankingCsv(HttpServletRequest request, Long callId) {
UserEntity userEntity = validator.validateUser(request);
return applicationDao.downloadRankingCsv(callId);
return applicationDao.downloadRankingCsv(callId,userEntity);
}
}