fixed bug #10328
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@79067 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
67501fee1c
commit
553ae0957b
|
@ -75,6 +75,7 @@ public class RelatorioHistoricoClientes extends Relatorio {
|
||||||
Date dataEmbarqueFinal = (Date) parametros.get("DATA_EMBARQUE_FINAL");
|
Date dataEmbarqueFinal = (Date) parametros.get("DATA_EMBARQUE_FINAL");
|
||||||
Integer empresaId = (Integer) parametros.get("EMPRESA_ID");
|
Integer empresaId = (Integer) parametros.get("EMPRESA_ID");
|
||||||
String puntoVentas = (String) parametros.get("NUMPUNTOVENTA");
|
String puntoVentas = (String) parametros.get("NUMPUNTOVENTA");
|
||||||
|
String rutas = (String) parametros.get("NUMRUTA");
|
||||||
|
|
||||||
sql.append("SELECT categoria.CVECATEGORIA AS sigla, ");
|
sql.append("SELECT categoria.CVECATEGORIA AS sigla, ");
|
||||||
sql.append("caja.NUMFOLIOSISTEMA AS bilhete, ");
|
sql.append("caja.NUMFOLIOSISTEMA AS bilhete, ");
|
||||||
|
@ -118,6 +119,9 @@ public class RelatorioHistoricoClientes extends Relatorio {
|
||||||
if (puntoVentas != null && !puntoVentas.isEmpty()) {
|
if (puntoVentas != null && !puntoVentas.isEmpty()) {
|
||||||
sql.append("AND caja.PUNTOVENTA_ID IN (" + puntoVentas + ") ");
|
sql.append("AND caja.PUNTOVENTA_ID IN (" + puntoVentas + ") ");
|
||||||
}
|
}
|
||||||
|
if (rutas != null && !rutas.isEmpty()) {
|
||||||
|
sql.append("AND caja.RUTA_ID IN (" + rutas + ") ");
|
||||||
|
}
|
||||||
if (dataVendaIncial != null && dataVendaFinal != null) {
|
if (dataVendaIncial != null && dataVendaFinal != null) {
|
||||||
sql.append("AND caja.FECHORVIAJE BETWEEN TO_DATE('" + formatSemHora.format(dataVendaIncial) + " 00:00:00', " + formatToDate + ") "
|
sql.append("AND caja.FECHORVIAJE BETWEEN TO_DATE('" + formatSemHora.format(dataVendaIncial) + " 00:00:00', " + formatToDate + ") "
|
||||||
+ "AND TO_DATE('" + formatSemHora.format(dataVendaFinal) + " 23:59:59', " + formatToDate + ") ");
|
+ "AND TO_DATE('" + formatSemHora.format(dataVendaFinal) + " 23:59:59', " + formatToDate + ") ");
|
||||||
|
|
Binary file not shown.
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="RelatorioHistoricoClientes" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="2de20ee0-535e-49d2-a7be-c24a30351d9f">
|
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="RelatorioHistoricoClientes" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="2de20ee0-535e-49d2-a7be-c24a30351d9f">
|
||||||
<property name="ireport.zoom" value="1.000000000000004"/>
|
<property name="ireport.zoom" value="1.000000000000004"/>
|
||||||
<property name="ireport.x" value="115"/>
|
<property name="ireport.x" value="0"/>
|
||||||
<property name="ireport.y" value="0"/>
|
<property name="ireport.y" value="0"/>
|
||||||
<property name="net.sf.jasperreports.export.xls.exclude.origin.band.1" value="title"/>
|
<property name="net.sf.jasperreports.export.xls.exclude.origin.band.1" value="title"/>
|
||||||
<property name="net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.2" value="columnHeader"/>
|
<property name="net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.2" value="columnHeader"/>
|
||||||
|
@ -290,7 +290,7 @@ $F{cpfCliente}.substring(0,3)
|
||||||
<line>
|
<line>
|
||||||
<reportElement uuid="3c577f75-c6d6-4c11-a846-bfe71a8a1b42" x="-1" y="58" width="802" height="1"/>
|
<reportElement uuid="3c577f75-c6d6-4c11-a846-bfe71a8a1b42" x="-1" y="58" width="802" height="1"/>
|
||||||
</line>
|
</line>
|
||||||
<textField>
|
<textField isStretchWithOverflow="true">
|
||||||
<reportElement uuid="aff6535e-c25b-4f31-ad3a-baacc52e4974" x="-1" y="59" width="803" height="15"/>
|
<reportElement uuid="aff6535e-c25b-4f31-ad3a-baacc52e4974" x="-1" y="59" width="803" height="15"/>
|
||||||
<textElement verticalAlignment="Middle">
|
<textElement verticalAlignment="Middle">
|
||||||
<font size="10"/>
|
<font size="10"/>
|
||||||
|
@ -298,7 +298,7 @@ $F{cpfCliente}.substring(0,3)
|
||||||
<textFieldExpression><![CDATA[$P{FILTROS}]]></textFieldExpression>
|
<textFieldExpression><![CDATA[$P{FILTROS}]]></textFieldExpression>
|
||||||
</textField>
|
</textField>
|
||||||
<line>
|
<line>
|
||||||
<reportElement uuid="84641d2c-21a5-47f0-b4a8-afe7bf700cb6" x="-1" y="78" width="802" height="1"/>
|
<reportElement uuid="84641d2c-21a5-47f0-b4a8-afe7bf700cb6" positionType="Float" x="-1" y="78" width="802" height="1"/>
|
||||||
</line>
|
</line>
|
||||||
</band>
|
</band>
|
||||||
</title>
|
</title>
|
||||||
|
|
|
@ -20,12 +20,15 @@ import org.zkoss.zul.Bandbox;
|
||||||
import org.zkoss.zul.Comboitem;
|
import org.zkoss.zul.Comboitem;
|
||||||
import org.zkoss.zul.Datebox;
|
import org.zkoss.zul.Datebox;
|
||||||
import org.zkoss.zul.Paging;
|
import org.zkoss.zul.Paging;
|
||||||
|
import org.zkoss.zul.Textbox;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||||
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioHistoricoClientes;
|
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioHistoricoClientes;
|
||||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||||
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||||
|
import com.rjconsultores.ventaboletos.service.RutaService;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||||
|
@ -33,6 +36,7 @@ import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyTextbox;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyTextbox;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
|
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper;
|
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderRelatorioLinhaHorario;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderRelatorioVendasBilheteiro;
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderRelatorioVendasBilheteiro;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderRelatorioVendasBilheteiroSelecionados;
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderRelatorioVendasBilheteiroSelecionados;
|
||||||
|
|
||||||
|
@ -58,10 +62,17 @@ public class RelatorioHistoricoClientesController extends MyGenericForwardCompos
|
||||||
private MyListbox puntoVentaList;
|
private MyListbox puntoVentaList;
|
||||||
private MyListbox puntoVentaSelList;
|
private MyListbox puntoVentaSelList;
|
||||||
|
|
||||||
|
private ArrayList<Ruta> lsNumLinha = new ArrayList<Ruta>();
|
||||||
|
private MyListbox linhaList;
|
||||||
|
private MyListbox linhaListSelList;
|
||||||
|
private Textbox txtPalavraPesquisaLinha;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private EmpresaService empresaService;
|
private EmpresaService empresaService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private DataSource dataSourceRead;
|
private DataSource dataSourceRead;
|
||||||
|
@Autowired
|
||||||
|
private RutaService rutaService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterCompose(Component comp) throws Exception {
|
public void doAfterCompose(Component comp) throws Exception {
|
||||||
|
@ -70,6 +81,9 @@ public class RelatorioHistoricoClientesController extends MyGenericForwardCompos
|
||||||
|
|
||||||
puntoVentaList.setItemRenderer(new RenderRelatorioVendasBilheteiro());
|
puntoVentaList.setItemRenderer(new RenderRelatorioVendasBilheteiro());
|
||||||
puntoVentaSelList.setItemRenderer(new RenderRelatorioVendasBilheteiroSelecionados());
|
puntoVentaSelList.setItemRenderer(new RenderRelatorioVendasBilheteiroSelecionados());
|
||||||
|
|
||||||
|
linhaList.setItemRenderer(new RenderRelatorioLinhaHorario());
|
||||||
|
linhaListSelList.setItemRenderer(new RenderRelatorioLinhaHorario());
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||||
|
@ -119,6 +133,26 @@ public class RelatorioHistoricoClientesController extends MyGenericForwardCompos
|
||||||
|
|
||||||
filtro.append(puntoVentas).append(";");
|
filtro.append(puntoVentas).append(";");
|
||||||
|
|
||||||
|
filtro.append("Linhas: ");
|
||||||
|
String linhaIds = "";
|
||||||
|
String linhas = "";
|
||||||
|
List<Ruta> lsLinhasSelecionadas = new ArrayList(Arrays.asList(linhaListSelList.getData()));
|
||||||
|
if (lsLinhasSelecionadas.size() > 0) {
|
||||||
|
for (int i = 0; i < lsLinhasSelecionadas.size(); i++) {
|
||||||
|
Ruta linha = lsLinhasSelecionadas.get(i);
|
||||||
|
linhas += linha.getDescruta() + ",";
|
||||||
|
linhaIds += linha.getRutaId() + ",";
|
||||||
|
}
|
||||||
|
|
||||||
|
linhaIds = linhaIds.substring(0, linhaIds.length() - 1);
|
||||||
|
linhas = linhas.substring(0, linhas.length() - 1);
|
||||||
|
parametros.put("NUMRUTA", linhaIds);
|
||||||
|
} else {
|
||||||
|
filtro.append("Todas ");
|
||||||
|
}
|
||||||
|
|
||||||
|
filtro.append(linhas).append(";");
|
||||||
|
|
||||||
parametros.put("DATA_VENDA_INICIAL", (java.util.Date) dtVendaInicial.getValue());
|
parametros.put("DATA_VENDA_INICIAL", (java.util.Date) dtVendaInicial.getValue());
|
||||||
parametros.put("DATA_VENDA_FINAL", (java.util.Date) dtVendaFinal.getValue());
|
parametros.put("DATA_VENDA_FINAL", (java.util.Date) dtVendaFinal.getValue());
|
||||||
parametros.put("DATA_EMBARQUE_INICIAL", (java.util.Date) dtEmbarqueInicial.getValue());
|
parametros.put("DATA_EMBARQUE_INICIAL", (java.util.Date) dtEmbarqueInicial.getValue());
|
||||||
|
@ -128,6 +162,9 @@ public class RelatorioHistoricoClientesController extends MyGenericForwardCompos
|
||||||
parametros.put("USUARIO", UsuarioLogado.getUsuarioLogado().getUsuarioId().toString());
|
parametros.put("USUARIO", UsuarioLogado.getUsuarioLogado().getUsuarioId().toString());
|
||||||
parametros.put("USUARIO_NOME", UsuarioLogado.getUsuarioLogado().getNombusuario());
|
parametros.put("USUARIO_NOME", UsuarioLogado.getUsuarioLogado().getNombusuario());
|
||||||
|
|
||||||
|
lsNumLinha = new ArrayList(Arrays.asList(linhaListSelList.getData()));
|
||||||
|
parametros.put("lsNumLinha", lsNumLinha);
|
||||||
|
|
||||||
filtro.append("Empresa: ");
|
filtro.append("Empresa: ");
|
||||||
Comboitem itemEmpresa = cmbEmpresa.getSelectedItem();
|
Comboitem itemEmpresa = cmbEmpresa.getSelectedItem();
|
||||||
if (itemEmpresa != null) {
|
if (itemEmpresa != null) {
|
||||||
|
@ -211,11 +248,40 @@ public class RelatorioHistoricoClientesController extends MyGenericForwardCompos
|
||||||
puntoVentaSelList.addItemNovo(puntoVenta);
|
puntoVentaSelList.addItemNovo(puntoVenta);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onDoubleClick$linhaList(Event ev) {
|
||||||
|
Ruta rutaAux = (Ruta) linhaList.getSelected();
|
||||||
|
linhaListSelList.addItemNovo(rutaAux);
|
||||||
|
}
|
||||||
|
|
||||||
public void onClick$btnLimpar(Event ev) {
|
public void onClick$btnLimpar(Event ev) {
|
||||||
puntoVentaList.setData(new ArrayList<PuntoVenta>());
|
puntoVentaList.setData(new ArrayList<PuntoVenta>());
|
||||||
bbPesquisaPuntoVenta.setText("");
|
bbPesquisaPuntoVenta.setText("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onClick$btnLimparLinha(Event ev) {
|
||||||
|
linhaList.setData(new ArrayList<Ruta>());
|
||||||
|
txtPalavraPesquisaLinha.setText("");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onClick$btnPesquisaLinha(Event ev) {
|
||||||
|
executarPesquisaLinha();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void executarPesquisaLinha() {
|
||||||
|
|
||||||
|
String palavraPesquisaRuta = txtPalavraPesquisaLinha.getText();
|
||||||
|
linhaList.setData(rutaService.buscaRuta(palavraPesquisaRuta));
|
||||||
|
|
||||||
|
if (linhaList.getData().length == 0) {
|
||||||
|
try {
|
||||||
|
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
|
||||||
|
Labels.getLabel("relatorioLinhasHorarioController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
} catch (InterruptedException ex) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public List<Empresa> getLsEmpresa() {
|
public List<Empresa> getLsEmpresa() {
|
||||||
return lsEmpresa;
|
return lsEmpresa;
|
||||||
}
|
}
|
||||||
|
@ -295,4 +361,6 @@ public class RelatorioHistoricoClientesController extends MyGenericForwardCompos
|
||||||
public void setDtEmbarqueFinal(Datebox dtEmbarqueFinal) {
|
public void setDtEmbarqueFinal(Datebox dtEmbarqueFinal) {
|
||||||
this.dtEmbarqueFinal = dtEmbarqueFinal;
|
this.dtEmbarqueFinal = dtEmbarqueFinal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,7 +166,6 @@ public class RelatorioLinhasHorarioController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnLimparLinha(Event ev) {
|
public void onClick$btnLimparLinha(Event ev) {
|
||||||
|
|
||||||
linhaList.clearSelection();
|
linhaList.clearSelection();
|
||||||
lsNumLinha.clear();
|
lsNumLinha.clear();
|
||||||
}
|
}
|
||||||
|
|
|
@ -238,6 +238,9 @@ public class EditarClienteController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
if (usaCPFComoFidelidade) {
|
if (usaCPFComoFidelidade) {
|
||||||
txtNumFidelidade.setDisabled(true);
|
txtNumFidelidade.setDisabled(true);
|
||||||
|
btnAdicionarFidelidade.setDisabled(true);
|
||||||
|
btnRemoverFidelidade.setDisabled(true);
|
||||||
|
cmbEmpresa.setDisabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
lsTipoIdentificacion = tipoIdentificacionService.obtenerTodos();
|
lsTipoIdentificacion = tipoIdentificacionService.obtenerTodos();
|
||||||
|
@ -300,12 +303,14 @@ public class EditarClienteController extends MyGenericForwardComposer {
|
||||||
clienteFidelidadeMyListBox.addEventListener("onDoubleClick", new EventListener() {
|
clienteFidelidadeMyListBox.addEventListener("onDoubleClick", new EventListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onEvent(Event arg0) throws Exception {
|
public void onEvent(Event arg0) throws Exception {
|
||||||
|
if (!usaCPFComoFidelidade) {
|
||||||
ClienteFidelidad clienteFidelidad = (ClienteFidelidad) clienteFidelidadeMyListBox
|
ClienteFidelidad clienteFidelidad = (ClienteFidelidad) clienteFidelidadeMyListBox
|
||||||
.getSelected();
|
.getSelected();
|
||||||
exibeClienteFidelidade(clienteFidelidad);
|
exibeClienteFidelidade(clienteFidelidad);
|
||||||
lsClienteFidelidad.remove(clienteFidelidad);
|
lsClienteFidelidad.remove(clienteFidelidad);
|
||||||
clienteFidelidadeMyListBox.setData(lsClienteFidelidad);
|
clienteFidelidadeMyListBox.setData(lsClienteFidelidad);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -412,12 +417,14 @@ public class EditarClienteController extends MyGenericForwardComposer {
|
||||||
new EventListener() {
|
new EventListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onEvent(Event arg0) throws Exception {
|
public void onEvent(Event arg0) throws Exception {
|
||||||
|
if (!usaCPFComoFidelidade) {
|
||||||
ClienteFidelidad clienteFidelidad = (ClienteFidelidad) clienteFidelidadeMyListBox
|
ClienteFidelidad clienteFidelidad = (ClienteFidelidad) clienteFidelidadeMyListBox
|
||||||
.getSelected();
|
.getSelected();
|
||||||
exibeClienteFidelidade(clienteFidelidad);
|
exibeClienteFidelidade(clienteFidelidad);
|
||||||
lsClienteFidelidad.remove(clienteFidelidad);
|
lsClienteFidelidad.remove(clienteFidelidad);
|
||||||
clienteFidelidadeMyListBox.setData(lsClienteFidelidad);
|
clienteFidelidadeMyListBox.setData(lsClienteFidelidad);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -789,7 +796,6 @@ public class EditarClienteController extends MyGenericForwardComposer {
|
||||||
cmbMotivacionViaje.getValue();
|
cmbMotivacionViaje.getValue();
|
||||||
cmbOcupacion.getValue();
|
cmbOcupacion.getValue();
|
||||||
|
|
||||||
|
|
||||||
List<Cliente> lsCliente = clienteService.buscarPorDocumento(txtNumRfc.getValue());
|
List<Cliente> lsCliente = clienteService.buscarPorDocumento(txtNumRfc.getValue());
|
||||||
if (lsCliente.size() > 1
|
if (lsCliente.size() > 1
|
||||||
|| (lsCliente.size() == 1 && !lsCliente.get(0).getClienteId().equals(cliente.getClienteId()))) {
|
|| (lsCliente.size() == 1 && !lsCliente.get(0).getClienteId().equals(cliente.getClienteId()))) {
|
||||||
|
@ -813,7 +819,6 @@ public class EditarClienteController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (StringUtils.isNotBlank(this.replaceTextbox(txtNumFax))) {
|
if (StringUtils.isNotBlank(this.replaceTextbox(txtNumFax))) {
|
||||||
cliente.setNumfax(txtNumFax.getValue().replace("_", ""));
|
cliente.setNumfax(txtNumFax.getValue().replace("_", ""));
|
||||||
}
|
}
|
||||||
|
@ -829,6 +834,11 @@ public class EditarClienteController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
setClienteDireccion();
|
setClienteDireccion();
|
||||||
cliente.setLsClienteDescuento(lsClienteDescuento);
|
cliente.setLsClienteDescuento(lsClienteDescuento);
|
||||||
|
|
||||||
|
if (usaCPFComoFidelidade) {
|
||||||
|
cliente.setListClienteFidelidad(criarFidelidadesTodasEmpresas(lsClienteFidelidad, lsEmpresas));
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
if (cliente.getClienteId() == null) {
|
if (cliente.getClienteId() == null) {
|
||||||
|
@ -873,6 +883,52 @@ public class EditarClienteController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<ClienteFidelidad> criarFidelidadesTodasEmpresas(List<ClienteFidelidad> fidelidades, List<Empresa> empresas) {
|
||||||
|
|
||||||
|
List<ClienteFidelidad> result = new ArrayList<ClienteFidelidad>();
|
||||||
|
Boolean achou = false;
|
||||||
|
|
||||||
|
if (fidelidades.isEmpty()) {
|
||||||
|
for (Empresa e : empresas) {
|
||||||
|
result.add(criarFidelidade(e));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (Empresa e : empresas) {
|
||||||
|
for (ClienteFidelidad f : fidelidades) {
|
||||||
|
if (f.getEmpresa().equals(e)) {
|
||||||
|
f.getTarjetaFidelidad().setNumTarjeta(txtNumFidelidade.getValue());
|
||||||
|
result.add(f);
|
||||||
|
achou = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!achou) {
|
||||||
|
result.add(criarFidelidade(e));
|
||||||
|
}
|
||||||
|
achou = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private ClienteFidelidad criarFidelidade(Empresa e) {
|
||||||
|
ClienteFidelidad clienteFidelidad = new ClienteFidelidad();
|
||||||
|
TarjetaFidelidad tarjetaFidelidad = new TarjetaFidelidad();
|
||||||
|
|
||||||
|
tarjetaFidelidad.setNumTarjeta(txtNumFidelidade.getValue());
|
||||||
|
tarjetaFidelidad.setActivo(true);
|
||||||
|
tarjetaFidelidad.setFecmodif(Calendar.getInstance().getTime());
|
||||||
|
tarjetaFidelidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
|
|
||||||
|
clienteFidelidad.setEmpresa(e);
|
||||||
|
clienteFidelidad.setActivo(true);
|
||||||
|
clienteFidelidad.setFecmodif(Calendar.getInstance().getTime());
|
||||||
|
clienteFidelidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
|
clienteFidelidad.setTarjetaFidelidad(tarjetaFidelidad);
|
||||||
|
|
||||||
|
return clienteFidelidad;
|
||||||
|
}
|
||||||
|
|
||||||
public MyComboboxEstandar getCmbLinha() {
|
public MyComboboxEstandar getCmbLinha() {
|
||||||
return cmbLinha;
|
return cmbLinha;
|
||||||
}
|
}
|
||||||
|
@ -1598,6 +1654,4 @@ public class EditarClienteController extends MyGenericForwardComposer {
|
||||||
this.cmbTipoIdentificacion2 = cmbTipoIdentificacion2;
|
this.cmbTipoIdentificacion2 = cmbTipoIdentificacion2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -7,7 +7,7 @@
|
||||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||||
<window id="winFiltroRelatorioHistoricoCliente" apply="${relatorioHistoricoClientesController}"
|
<window id="winFiltroRelatorioHistoricoCliente" apply="${relatorioHistoricoClientesController}"
|
||||||
contentStyle="overflow:auto"
|
contentStyle="overflow:auto"
|
||||||
height="350px" width="728px" border="normal">
|
height="460px" width="728px" border="normal">
|
||||||
<grid fixedLayout="true">
|
<grid fixedLayout="true">
|
||||||
<columns>
|
<columns>
|
||||||
<column width="25%" />
|
<column width="25%" />
|
||||||
|
@ -101,8 +101,82 @@
|
||||||
</listbox>
|
</listbox>
|
||||||
<paging id="pagingSelPuntoVenta" pageSize="10" />
|
<paging id="pagingSelPuntoVenta" pageSize="10" />
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<label
|
||||||
|
value="${c:l('relatorioLinhasHorarioController.lbLinha.label')}" />
|
||||||
|
|
||||||
|
<bandbox id="bbPesquisaLinha" width="100%"
|
||||||
|
mold="rounded" readonly="true">
|
||||||
|
<bandpopup>
|
||||||
|
<vbox>
|
||||||
|
<hbox>
|
||||||
|
<textbox
|
||||||
|
id="txtPalavraPesquisaLinha" />
|
||||||
|
<button id="btnPesquisaLinha"
|
||||||
|
image="/gui/img/find.png"
|
||||||
|
label="${c:l('relatorioLinhasHorarioController.btnPesquisa.label')}" />
|
||||||
|
<button id="btnLimparLinha"
|
||||||
|
image="/gui/img/eraser.png"
|
||||||
|
label="${c:l('relatorioLinhasHorarioController.btnLimpar.label')}" />
|
||||||
|
</hbox>
|
||||||
|
|
||||||
|
<listbox id="linhaList" mold="paging"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||||
|
vflex="true" multiple="false" height="60%" width="410px">
|
||||||
|
<listhead>
|
||||||
|
|
||||||
|
<listheader
|
||||||
|
label="${c:l('relatorioLinhasHorarioController.lbNumRuta.label')}"
|
||||||
|
width="18%" />
|
||||||
|
|
||||||
|
<listheader
|
||||||
|
label="${c:l('relatorioLinhasHorarioController.lbPrefixo.label')}"
|
||||||
|
width="20%" />
|
||||||
|
<listheader
|
||||||
|
label="${c:l('lb.dec')}" width="35%" />
|
||||||
|
<listheader
|
||||||
|
label="${c:l('relatorioLinhasHorarioController.lbOrgao.label')}"
|
||||||
|
width="27%" />
|
||||||
|
</listhead>
|
||||||
|
</listbox>
|
||||||
|
<paging id="pagingLinha" pageSize="10" />
|
||||||
|
</vbox>
|
||||||
|
</bandpopup>
|
||||||
|
</bandbox>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<cell colspan="4">
|
||||||
|
<borderlayout height="100px">
|
||||||
|
|
||||||
|
<center border="0">
|
||||||
|
<listbox id="linhaListSelList"
|
||||||
|
mold="paging"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||||
|
vflex="true" multiple="true" height="60%" width="100%">
|
||||||
|
<listhead>
|
||||||
|
<listheader
|
||||||
|
label="${c:l('relatorioLinhasHorarioController.lbNumRuta.label')}"
|
||||||
|
width="18%" />
|
||||||
|
<listheader
|
||||||
|
label="${c:l('relatorioLinhasHorarioController.lbPrefixo.label')}"
|
||||||
|
width="20%" />
|
||||||
|
<listheader
|
||||||
|
label="${c:l('lb.dec')}" width="30%" />
|
||||||
|
<listheader
|
||||||
|
label="${c:l('relatorioLinhasHorarioController.lbOrgao.label')}"
|
||||||
|
width="22%" />
|
||||||
|
<listheader width="10%" />
|
||||||
|
</listhead>
|
||||||
|
</listbox>
|
||||||
|
</center>
|
||||||
|
</borderlayout>
|
||||||
|
</cell>
|
||||||
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
|
|
||||||
<toolbar>
|
<toolbar>
|
||||||
<button id="btnExecutarRelatorio" image="/gui/img/find.png"
|
<button id="btnExecutarRelatorio" image="/gui/img/find.png"
|
||||||
label="${c:l('relatorio.lb.btnExecutarRelatorio')}" />
|
label="${c:l('relatorio.lb.btnExecutarRelatorio')}" />
|
||||||
|
|
Loading…
Reference in New Issue