Merge pull request #321 from Kitzanos/added-pec-csv-prod
Cherry-pick (Added field PEC in csv)
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user