Examples of Historicomortalidade


Examples of br.com.granja.dominio.Historicomortalidade

    public void init() {
        setfornecedorList(this.pessoaService.findAllFornecedores());
        setgalpaoList(this.galpaoService.findByAtivos());
        produtoList = produtoService.findByNaoOvosAtivos();
        mortalidadeList = null;
        mortalidade = new Historicomortalidade();
    }
View Full Code Here

Examples of br.com.granja.dominio.Historicomortalidade

   
    public void iniciarHistoricoMortalidade(Lotes lote){
      loadViewMode(lote);
      mortalidadeList = mortalidadeService.findByLote(lote);
      alteracaoMortalidade = false;
      mortalidade = new Historicomortalidade();
    }
View Full Code Here

Examples of br.com.granja.dominio.Historicomortalidade

    mortalidadeBean.setAction(action);
    mortalidadeBean.save(mortalidade, Action.INSERT);
    Severity severityLevel = FacesUtil.getFacesContext().getMaximumSeverity();
      boolean notHasError = (severityLevel == null || (severityLevel != null && !severityLevel.equals(FacesMessage.SEVERITY_ERROR)));
      if(notHasError){
      mortalidade = new Historicomortalidade();
        this.alteracaoMortalidade= false;
      }
    }
View Full Code Here

Examples of br.com.granja.dominio.Historicomortalidade

   
    @Override
    public void update(Historicomortalidade hist)
        throws ServiceBusinessException {
     
      Historicomortalidade oldHist= dao.findById(hist.getId());
      hist.getLotes().getProduto().setTipoMovimentacao(TipoMovimentacao.HISTORICO_MORTALIDADE);
     
      Integer oldQuant = oldHist.getQuantidade().intValue();
      Integer newQuant = hist.getQuantidade().intValue();
      if(oldHist.getLotes().equals(hist.getLotes()))
        produtoService.update(hist.getLotes().getProduto(),(oldQuant - newQuant), 1);
      else{
        oldHist.getLotes().getProduto().setTipoMovimentacao(TipoMovimentacao.HISTORICO_MORTALIDADE);
        produtoService.update(oldHist.getLotes().getProduto(), oldQuant, 1);
        produtoService.update(hist.getLotes().getProduto(), newQuant, -1);
      }
     
      hist.setAtivo(true);
      super.update(hist);
View Full Code Here

Examples of br.com.granja.dominio.Historicomortalidade

      e.printStackTrace();
    }
    }
   
    public List<Historicomortalidade> findByLote(Lotes lote){
      Historicomortalidade hist = new Historicomortalidade();
      hist.setAtivo(true);
      hist.setLotes(lote);
     
      return findByAttributes(hist);     
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.