fixes bug#24428
qua: dev: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@112030 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
3276e48111
commit
7a8c4d22c2
|
@ -21,10 +21,12 @@ import org.zkoss.zul.Textbox;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.Categoria;
|
import com.rjconsultores.ventaboletos.entidad.Categoria;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||||
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
||||||
import com.rjconsultores.ventaboletos.service.CategoriaService;
|
import com.rjconsultores.ventaboletos.service.CategoriaService;
|
||||||
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||||
|
import com.rjconsultores.ventaboletos.service.OrgaoConcedenteService;
|
||||||
import com.rjconsultores.ventaboletos.service.RelatorioAgepanService;
|
import com.rjconsultores.ventaboletos.service.RelatorioAgepanService;
|
||||||
import com.rjconsultores.ventaboletos.service.RutaService;
|
import com.rjconsultores.ventaboletos.service.RutaService;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar;
|
||||||
|
@ -48,6 +50,8 @@ public class RelatorioGratuidadeAGEPANController extends MyGenericForwardCompose
|
||||||
private RutaService rutaService;
|
private RutaService rutaService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private RelatorioAgepanService relatorioAgepanService;
|
private RelatorioAgepanService relatorioAgepanService;
|
||||||
|
@Autowired
|
||||||
|
private OrgaoConcedenteService orgaoConcedenteService;
|
||||||
|
|
||||||
private Datebox datInicialVenda;
|
private Datebox datInicialVenda;
|
||||||
private Datebox datFinalVenda;
|
private Datebox datFinalVenda;
|
||||||
|
@ -64,6 +68,8 @@ public class RelatorioGratuidadeAGEPANController extends MyGenericForwardCompose
|
||||||
|
|
||||||
private List<Categoria> listSelectedTipoGratuidade;
|
private List<Categoria> listSelectedTipoGratuidade;
|
||||||
|
|
||||||
|
private Integer orgaoConcendenteAgepan =null;
|
||||||
|
|
||||||
public void onClick$btnRemoveTipoGratuidade(Event ev) throws InterruptedException {
|
public void onClick$btnRemoveTipoGratuidade(Event ev) throws InterruptedException {
|
||||||
Categoria categoria = (Categoria) selectedTipoGratuidadeList.getSelectedItem().getValue();
|
Categoria categoria = (Categoria) selectedTipoGratuidadeList.getSelectedItem().getValue();
|
||||||
listSelectedTipoGratuidade.remove(categoria);
|
listSelectedTipoGratuidade.remove(categoria);
|
||||||
|
@ -195,6 +201,8 @@ public class RelatorioGratuidadeAGEPANController extends MyGenericForwardCompose
|
||||||
parametros.put("nomb_empresa", "Todas" );
|
parametros.put("nomb_empresa", "Todas" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
parametros.put("orgaoConcendenteAgepanId", orgaoConcendenteAgepan );
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
InputStream arquivo = relatorioAgepanService.gerarArquivoGratuidadeAgepan(parametros);
|
InputStream arquivo = relatorioAgepanService.gerarArquivoGratuidadeAgepan(parametros);
|
||||||
|
@ -221,12 +229,20 @@ public class RelatorioGratuidadeAGEPANController extends MyGenericForwardCompose
|
||||||
@Override
|
@Override
|
||||||
public void doAfterCompose(Component comp) throws Exception {
|
public void doAfterCompose(Component comp) throws Exception {
|
||||||
super.doAfterCompose(comp);
|
super.doAfterCompose(comp);
|
||||||
lsEmpresas = empresaService.obtenerTodos();
|
List<OrgaoConcedente> lsOrgaosConcedentes = orgaoConcedenteService.buscar("%AGEPAN%");
|
||||||
lsCategorias = categoriaService.obtenerTodos();
|
if (lsOrgaosConcedentes.isEmpty()) {
|
||||||
listSelectedTipoGratuidade = new ArrayList<Categoria>();
|
Messagebox.show(Labels.getLabel("MSG.Error").concat(" - ").concat("Orgão Concendente AGEPAN não cadastrado"),
|
||||||
|
Labels.getLabel("relatorioGratuidadeAGEPANController.window.title"),
|
||||||
linhaList.setItemRenderer(new RenderRelatorioLinhaHorario());
|
Messagebox.OK, Messagebox.ERROR);
|
||||||
linhaListSelList.setItemRenderer(new RenderRelatorioLinhaHorario());
|
} else {
|
||||||
|
orgaoConcendenteAgepan = lsOrgaosConcedentes.get(0).getOrgaoConcedenteId();
|
||||||
|
lsEmpresas = empresaService.obtenerTodos();
|
||||||
|
lsCategorias = categoriaService.obtenerTodos();
|
||||||
|
listSelectedTipoGratuidade = new ArrayList<Categoria>();
|
||||||
|
|
||||||
|
linhaList.setItemRenderer(new RenderRelatorioLinhaHorario());
|
||||||
|
linhaListSelList.setItemRenderer(new RenderRelatorioLinhaHorario());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Categoria> getLsCategorias() {
|
public List<Categoria> getLsCategorias() {
|
||||||
|
|
Loading…
Reference in New Issue