Done ticket GEPAFINBE-76

This commit is contained in:
nisha
2025-03-10 20:02:37 +05:30
parent f272d6508b
commit 1c330ff713
21 changed files with 152 additions and 49 deletions

View File

@@ -128,7 +128,12 @@ public class DelegationDao {
CompanyEntity companyEntity = companyDao.validateCompany(companyId);
companyDao.getUserWithCompany(userEntity.getId(), companyId);
updatePlaceholdersForDelegation(user, companyEntity, placeholders, companyDelegationRequest);
DocumentEntity documentEntity = documentRepository.findBySource(GepafinConstant.DELEGATION_TEMPLATE).get(0);
DocumentEntity documentEntity =null;
if(Boolean.TRUE.equals(validator.checkIsConfidi())){
documentEntity = documentRepository.findBySource(GepafinConstant.DELEGATION_TEMPLATE_CONFIDI).get(0);
}else {
documentEntity = documentRepository.findBySource(GepafinConstant.DELEGATION_TEMPLATE).get(0);
}
return generateDocument(placeholders, documentEntity.getFilePath());
}
@@ -293,7 +298,7 @@ public class DelegationDao {
if (validator.checkIsPreInstructor()) {
ApplicationEvaluationEntity applicationEvaluationEntity = applicationEvaluationService.validateApplicationEvaluationByApplicationId(applicationId);
validator.validatePreInstructor(request, applicationEvaluationEntity.getUserId());
} else if (validator.checkIsBeneficiary()) {
} else if (Boolean.TRUE.equals(validator.checkIsBeneficiary()) || Boolean.TRUE.equals(validator.checkIsConfidi())) {
userId = validator.validateUser(request).getId();
}
return companyService.getUserWithCompany(userId, companyId);