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
|
@Autowired
|
||||||
private EvaluationCriteriaRepository evaluationCriteriaRepository;
|
private EvaluationCriteriaRepository evaluationCriteriaRepository;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private CallRepository callRepository;
|
||||||
|
|
||||||
public final Random random = new Random();
|
public final Random random = new Random();
|
||||||
|
|
||||||
public ApplicationResponseBean createApplication(HttpServletRequest request, ApplicationRequestBean applicationRequestBean, Long formId, Long applicationId) {
|
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);
|
emailNotificationDao.sendMail(hub.getId(), subject, body, List.of(GepafinConstant.RINALDO_EMAIL),emailLogRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte[] downloadRankingCsv(Long callId) {
|
public byte[] downloadRankingCsv(Long callId,UserEntity userEntity) {
|
||||||
CallEntity callEntity = callService.validateCall(callId);
|
|
||||||
|
CallEntity callEntity = validator.validateUserWithCall(userEntity,callId);
|
||||||
|
|
||||||
List<ApplicationEntity> applications =
|
List<ApplicationEntity> applications =
|
||||||
applicationRepository.findByCallIdAndIsDeletedFalseAndStatusIn(
|
applicationRepository.findByCallIdAndIsDeletedFalseAndStatusIn(
|
||||||
@@ -2489,7 +2493,7 @@ public class ApplicationDao {
|
|||||||
|
|
||||||
// Build headers dynamically
|
// Build headers dynamically
|
||||||
List<String> headers = new ArrayList<>(List.of(
|
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);
|
headers.addAll(dynamicLabels);
|
||||||
|
|
||||||
@@ -2511,6 +2515,8 @@ public class ApplicationDao {
|
|||||||
row.add(formattedAmount);
|
row.add(formattedAmount);
|
||||||
row.add(app.getStatus());
|
row.add(app.getStatus());
|
||||||
row.add(appInstructorMap.getOrDefault(appId, ""));
|
row.add(appInstructorMap.getOrDefault(appId, ""));
|
||||||
|
row.add(app.getPecEmail());
|
||||||
|
row.add(company.getPec());
|
||||||
row.add(appTotalScoreMap.get(appId));
|
row.add(appTotalScoreMap.get(appId));
|
||||||
|
|
||||||
Map<String, String> scores = appLabelScoresMap.getOrDefault(appId, Collections.emptyMap());
|
Map<String, String> scores = appLabelScoresMap.getOrDefault(appId, Collections.emptyMap());
|
||||||
|
|||||||
@@ -180,6 +180,6 @@ public class ApplicationServiceImpl implements ApplicationService {
|
|||||||
@Override
|
@Override
|
||||||
public byte[] downloadRankingCsv(HttpServletRequest request, Long callId) {
|
public byte[] downloadRankingCsv(HttpServletRequest request, Long callId) {
|
||||||
UserEntity userEntity = validator.validateUser(request);
|
UserEntity userEntity = validator.validateUser(request);
|
||||||
return applicationDao.downloadRankingCsv(callId);
|
return applicationDao.downloadRankingCsv(callId,userEntity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user