Examples of Lotes


Examples of br.com.granja.dominio.Lotes

    public Integer countListLotes(Lotes lote){
      return dao.countListLotes(lote);
    }
   
    public List<Lotes> findByAtivos(){
      Lotes l = new Lotes();
      l.setAtivo(true);
     
      return findByAttributes(l);
    }
View Full Code Here

Examples of br.com.granja.dominio.Lotes

     
      return findByAttributes(l);
    }
   
    public  Integer countLotesByProduto(Produtos produto){
      Lotes l = new Lotes();
      l.setAtivo(true);
      l.setProduto(produto);
     
      return dao.countByAttributes(l);
    }
View Full Code Here

Examples of br.com.granja.dominio.Lotes

      super.insert(lote);
    }
   
    @Override
    public void update(Lotes lote) throws ServiceBusinessException {
      Lotes oldProd= dao.findById(lote.getId());
      lote.getProduto().setTipoMovimentacao(TipoMovimentacao.LOTES);
     
      Integer oldQuant = oldProd.getQuantidade().intValue();
      Integer newQuant = lote.getQuantidade().intValue();
      if(oldProd.getProduto().equals(lote.getProduto()))
        produtoService.update(lote.getProduto(),(oldQuant - newQuant), -1);
      else{
        oldProd.getProduto().setTipoMovimentacao(TipoMovimentacao.LOTES);
        produtoService.update(oldProd.getProduto(), oldQuant, -1);
        produtoService.update(lote.getProduto(), newQuant, 1);
      }
      lote.setAtivo(true);
      super.update(lote);
    }
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.