Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Path("/zip")
- public Download pdfReport() throws IOException, MessagingException {
- ReportsDownload download = new ReportsDownload();
- Negociacao negociacao = this.negociacaoDao.pegaPorId(1);
- contratoList = (List<ContratoDeVenda>) new GeradorContratoDeVenda(
- this.cabecaPedidoDAO).geraContrato(negociacao);
- for (ContratoDeVenda contrato : contratoList) {
- List<NegociacaoItens> negociacaoItensList = contrato.getItens();
- for (NegociacaoItens negociacaoItens : negociacaoItensList) {
- negociacaoItens.setQtdeCaixa();
- }
- Report<NegociacaoItens> report = new ContratoDeVendaReport(
- negociacaoItensList).addParameter("contrato", contrato);
- download.add(report, pdf());
- EnvioEmail enviadorEmail = new EnvioEmail();
- enviadorEmail.postMail(mensagem, destinatario, remetente, assunto, attach_file)
- }
- return download;
- }
Add Comment
Please, Sign In to add comment