Merge pull request #164 from Kitzanos/fixed-application-evaluation-issue-prod
Errror Ateco accepted amount
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user