fixes bug#24428

qua:
dev:

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@112030 d1611594-4594-4d17-8e1d-87c2c4800839
master
aristides 2022-04-26 21:38:41 +00:00
parent 3276e48111
commit 7a8c4d22c2
1 changed files with 22 additions and 6 deletions

View File

@ -21,10 +21,12 @@ import org.zkoss.zul.Textbox;
import com.rjconsultores.ventaboletos.entidad.Categoria;
import com.rjconsultores.ventaboletos.entidad.Empresa;
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
import com.rjconsultores.ventaboletos.entidad.Ruta;
import com.rjconsultores.ventaboletos.exception.BusinessException;
import com.rjconsultores.ventaboletos.service.CategoriaService;
import com.rjconsultores.ventaboletos.service.EmpresaService;
import com.rjconsultores.ventaboletos.service.OrgaoConcedenteService;
import com.rjconsultores.ventaboletos.service.RelatorioAgepanService;
import com.rjconsultores.ventaboletos.service.RutaService;
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar;
@ -48,6 +50,8 @@ public class RelatorioGratuidadeAGEPANController extends MyGenericForwardCompose
private RutaService rutaService;
@Autowired
private RelatorioAgepanService relatorioAgepanService;
@Autowired
private OrgaoConcedenteService orgaoConcedenteService;
private Datebox datInicialVenda;
private Datebox datFinalVenda;
@ -64,6 +68,8 @@ public class RelatorioGratuidadeAGEPANController extends MyGenericForwardCompose
private List<Categoria> listSelectedTipoGratuidade;
private Integer orgaoConcendenteAgepan =null;
public void onClick$btnRemoveTipoGratuidade(Event ev) throws InterruptedException {
Categoria categoria = (Categoria) selectedTipoGratuidadeList.getSelectedItem().getValue();
listSelectedTipoGratuidade.remove(categoria);
@ -195,6 +201,8 @@ public class RelatorioGratuidadeAGEPANController extends MyGenericForwardCompose
parametros.put("nomb_empresa", "Todas" );
}
parametros.put("orgaoConcendenteAgepanId", orgaoConcendenteAgepan );
try {
InputStream arquivo = relatorioAgepanService.gerarArquivoGratuidadeAgepan(parametros);
@ -221,6 +229,13 @@ public class RelatorioGratuidadeAGEPANController extends MyGenericForwardCompose
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
List<OrgaoConcedente> lsOrgaosConcedentes = orgaoConcedenteService.buscar("%AGEPAN%");
if (lsOrgaosConcedentes.isEmpty()) {
Messagebox.show(Labels.getLabel("MSG.Error").concat(" - ").concat("Orgão Concendente AGEPAN não cadastrado"),
Labels.getLabel("relatorioGratuidadeAGEPANController.window.title"),
Messagebox.OK, Messagebox.ERROR);
} else {
orgaoConcendenteAgepan = lsOrgaosConcedentes.get(0).getOrgaoConcedenteId();
lsEmpresas = empresaService.obtenerTodos();
lsCategorias = categoriaService.obtenerTodos();
listSelectedTipoGratuidade = new ArrayList<Categoria>();
@ -228,6 +243,7 @@ public class RelatorioGratuidadeAGEPANController extends MyGenericForwardCompose
linhaList.setItemRenderer(new RenderRelatorioLinhaHorario());
linhaListSelList.setItemRenderer(new RenderRelatorioLinhaHorario());
}
}
public List<Categoria> getLsCategorias() {
return lsCategorias;