Package it.pdor.gestionePratica.exception

Examples of it.pdor.gestionePratica.exception.TrancheSalException


  public void controlliPreInserimentoTranche(List<TrancheMutuoSal> tranches, int codiceStato)
      throws TrancheSalException {
    // Controllo che non sia stata inserita l'ultima tranche
    for (TrancheMutuoSal tr : tranches) {
      if (tr.getLastTrancheBoolean() && tr.getRiferimentoMovimentoStorno() == null) {
        throw new TrancheSalException(
            messages.getMessage("gestionePratica.inserimentoTranche.noTranchePossibili"));
      }
    }
    if (!STATO_DEFINITIVO.equals(getStatoMutuo(codiceStato).getCodiceTipoStato())) {
      throw new TrancheSalException(messages.getMessage("gestionePratica.inserimentoTranche.mutuoStatoNoValido"));
    }
    if (tranches.size() == numeroMaxTranche) {
      throw new TrancheSalException(messages.getMessage("gestionePratica.inserimentoTranche.noTranchePossibili"));
    }
  }
View Full Code Here


  }

  @Override
  public void controlliPreGenerazionePamNuovaTranche(TrancheMutuoSal tranche) throws TrancheSalException {
    if (tranche.getDataRegistrazione() == null) {
      throw new TrancheSalException(messages.getMessage("gestionePratica.inserimentoTranche.noDataRegistrazione"));
    }

    if (tranche.getDataMovimento() == null) {
      throw new TrancheSalException(messages.getMessage("gestionePratica.inserimentoTranche.noDataRiferimento"));
    }

    if (tranche.getImportoMovimento() == null || tranche.getImportoMovimento() == 0d) {
      throw new TrancheSalException(messages.getMessage("gestionePratica.inserimentoTranche.noImportoTranche"));
    }

    if (tranche.getPercentualeImpostaSostitutiva() == null || tranche.getPercentualeImpostaSostitutiva() == 0d) {
      throw new TrancheSalException(
          messages.getMessage("gestionePratica.inserimentoTranche.noImpostaSostitutiva"));
    }

    Date dtScadenzaUltimaRata = gestionePraticaDao.getDataScadenzaUltimaRataPrePiano(tranche.getNumeroMutuo());
    if ( dtScadenzaUltimaRata!= null && tranche.getDataRegistrazione().after(dtScadenzaUltimaRata)) {
      throw new TrancheSalException(messages.getMessage("gestionePratica.inserimentoTranche.ratePreNoTranche"));
    }

    // AGGIUNGO IL CONTROLLO CHE LA NUOVA TRANCHE SIA DOPO L'ULTIMA PRESENTE
    List<TrancheMutuoSal> listaTranche = getTranchesMutuoSal(tranche.getNumeroMutuo());
    for (TrancheMutuoSal tms : listaTranche) {
      if (tms.getDataMovimento().after(tranche.getDataMovimento())
          || tms.getDataMovimento().equals(tranche.getDataMovimento())) {
        throw new TrancheSalException(
            messages.getMessage("gestionePratica.inserimentoTranche.noDataTranchePosteriore"));
      }
    }
    //AGGIUNGO IL CONTROLLO CHE SE HO ASSICURAZIONE INCENDIO SUL MUTUO DEVO AVERE ASSICURAZIONE INCENDIO NELLA TRANCHE
    List<AssicurazioneMutuo> assicurazioni = getAssicurazioniMutuoNoSurroga(tranche.getNumeroMutuo(), 270551, "I");
    if(assicurazioni.size() > 0 && NumberUtils.checkNull(tranche.getImportoAssicurazioneCasa()) == 0){
      throw new TrancheSalException(messages.getMessage("gestionePratica.inserimentoTranche.assicurazioneCasaObbligatoria"));
    }

  }
View Full Code Here

  @Override
  public void controlliConfermaNuovaTranche(TrancheMutuoSal tranche, Double importoResiduo)
      throws TrancheSalException, TassoUsuraException {
    if (tranche.getProgressivoMovimento() == numeroMaxTranche) {
      throw new TrancheSalException(messages.getMessage("gestionePratica.inserimentoTranche.ultimaTranche"));
    }

    if (tranche.getImportoMovimento().compareTo(importoResiduo) == 0) {
      throw new TrancheSalException(messages.getMessage("gestionePratica.inserimentoTranche.residuoEsaurito"));
    }
   
    //BARBARA Aggiungo controllo tasso usura
    List<TassiRiferimento> tassi = getTassiRiferimento("GRAD", "I", tranche.getImportoMovimento(), tranche.getDataMovimento());
    if(tassi != null){
View Full Code Here

TOP

Related Classes of it.pdor.gestionePratica.exception.TrancheSalException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.