Merge pull request #164 from Kitzanos/fixed-application-evaluation-issue-prod

Errror Ateco accepted amount
This commit is contained in:
Rinaldo
2025-01-15 11:07:43 +01:00
committed by GitHub
2 changed files with 13 additions and 10 deletions

View File

@@ -618,7 +618,7 @@ public class ApplicationEvaluationDao {
entity.setIsDeleted(false);
setIfUpdated(entity::getNote, entity::setNote, req.getNote());
setIfUpdated(entity::getMotivation, entity::setMotivation, req.getMotivation());
if(Boolean.TRUE.equals(req.getApplicationStatus().equals(ApplicationStatusForEvaluation.APPROVED)) && (req.getAmountAccepted()==null || req.getAmountAccepted().compareTo(BigDecimal.ZERO) < 0)){
if(req.getApplicationStatus()!=null && (Boolean.TRUE.equals(req.getApplicationStatus().equals(ApplicationStatusForEvaluation.APPROVED)) && (req.getAmountAccepted()==null || req.getAmountAccepted().compareTo(BigDecimal.ZERO) < 0))){
throw new CustomValidationException(Status.BAD_REQUEST,Translator.toLocale(GepafinConstant.AMOUNT_ACCEPTED_REQUIRED_WHILE_APPROVING_APPLICATION));
}
if (req.getAmountAccepted() != null && req.getAmountAccepted().compareTo(BigDecimal.ZERO) > 0) {

View File

@@ -143,10 +143,12 @@ public class CompanyDao {
entity.setNumberOfEmployees(request.getNumberOfEmployees());
entity.setAnnualRevenue(request.getAnnualRevenue());
entity.setHub(userEntity.getHub());
Map<String, Object> vatCheckResponse = request.getVatCheckResponse();
if (request.getVatCheckResponse() != null) {
if (vatCheckResponse.containsKey("dettaglio")) {
Map<String, Object> dettaglio = (Map<String, Object>) vatCheckResponse.get("dettaglio");
Map<String, Object> vatCheckResponse = request.getVatCheckResponse();
Map<String, Object> data = (Map<String, Object>) vatCheckResponse.get("data");
if (data != null) {
if (data.containsKey("dettaglio")) {
Map<String, Object> dettaglio = (Map<String, Object>) data.get("dettaglio");
if (dettaglio != null) {
if (dettaglio.containsKey("codice_ateco")) {
Object codiceAtecoObj = dettaglio.get("codice_ateco");
@@ -159,6 +161,7 @@ public class CompanyDao {
}
}
}
}
return entity;
}