fixes bug#al-1693

dev: Celio
qua:

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@115137 d1611594-4594-4d17-8e1d-87c2c4800839
master
fabio 2022-11-03 15:02:52 +00:00
parent a029612214
commit 357a1e9e33
2 changed files with 40 additions and 26 deletions

View File

@ -2,6 +2,16 @@ package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios;
import java.util.List; import java.util.List;
import com.rjconsultores.ventaboletos.entidad.Empresa;
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
import com.rjconsultores.ventaboletos.service.EmpresaService;
import com.rjconsultores.ventaboletos.service.SapService;
import com.rjconsultores.ventaboletos.vo.integracao.FechamentoCntCorrenteVO;
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderFechamentoCntcorrente;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope; import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
@ -16,16 +26,6 @@ import org.zkoss.zul.Comboitem;
import org.zkoss.zul.Datebox; import org.zkoss.zul.Datebox;
import org.zkoss.zul.Messagebox; import org.zkoss.zul.Messagebox;
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
import com.rjconsultores.ventaboletos.entidad.Empresa;
import com.rjconsultores.ventaboletos.service.EmpresaService;
import com.rjconsultores.ventaboletos.service.SapService;
import com.rjconsultores.ventaboletos.vo.integracao.FechamentoCntCorrenteVO;
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderFechamentoCntcorrente;
@Controller("relatorioSapController") @Controller("relatorioSapController")
@Scope("prototype") @Scope("prototype")
public class RelatorioSapController extends MyGenericForwardComposer { public class RelatorioSapController extends MyGenericForwardComposer {
@ -38,14 +38,18 @@ public class RelatorioSapController extends MyGenericForwardComposer {
private List<FechamentoCntCorrenteVO> lsFechamentoCntcorrente; private List<FechamentoCntCorrenteVO> lsFechamentoCntcorrente;
private Empresa empresa; private Empresa empresa;
private PuntoVenta puntoVenta; private PuntoVenta puntoVenta;
private Boolean reenviar;
private int qtdEnviar = 0; private int qtdEnviar = 0;
private String status;
private Combobox cmbEmpresa; private Combobox cmbEmpresa;
private MyComboboxPuntoVenta cmbPuntoVenta; private MyComboboxPuntoVenta cmbPuntoVenta;
private Datebox fecBoletoIni; private Datebox fecBoletoIni;
private Datebox fecBoletoFin; private Datebox fecBoletoFin;
private Checkbox chkReenviarGerados;
private Checkbox chkIntegrado;
private Checkbox chkNaoEnviado;
private Checkbox chkPendente;
private Checkbox chkRecusado;
@Autowired @Autowired
private EmpresaService empresaService; private EmpresaService empresaService;
@ -88,7 +92,10 @@ public class RelatorioSapController extends MyGenericForwardComposer {
} }
})); }));
this.chkReenviarGerados.setChecked(Boolean.FALSE); this.chkIntegrado.setChecked(Boolean.FALSE);
this.chkNaoEnviado.setChecked(Boolean.FALSE);
this.chkPendente.setChecked(Boolean.FALSE);
this.chkRecusado.setChecked(Boolean.FALSE);
} }
@ -105,7 +112,17 @@ public class RelatorioSapController extends MyGenericForwardComposer {
puntoVenta = (PuntoVenta) cmbPuntoVenta.getSelectedItem().getValue(); puntoVenta = (PuntoVenta) cmbPuntoVenta.getSelectedItem().getValue();
} }
this.lsFechamentoCntcorrente = sapService.obtenerTodosParaRemessa(empresa, this.fecBoletoIni.getValue(), this.fecBoletoFin.getValue(), chkReenviarGerados.isChecked(), puntoVenta); status = "";
status += chkIntegrado.isChecked()?"0,":"";
status += chkNaoEnviado.isChecked()?"1,":"";
status += chkPendente.isChecked()?"2,":"";
status += chkRecusado.isChecked()?"3,":"";
if(status.endsWith(",")) {
status = status.substring(0, status.length()-1);
}
this.lsFechamentoCntcorrente = sapService.obtenerTodosParaRemessa(empresa, this.fecBoletoIni.getValue(), this.fecBoletoFin.getValue(), status, puntoVenta);
this.boletoFechamentoList.setData(this.lsFechamentoCntcorrente); this.boletoFechamentoList.setData(this.lsFechamentoCntcorrente);
if(this.lsFechamentoCntcorrente.isEmpty()){ if(this.lsFechamentoCntcorrente.isEmpty()){
@ -152,12 +169,4 @@ public class RelatorioSapController extends MyGenericForwardComposer {
public void setEmpresa(Empresa empresa) { public void setEmpresa(Empresa empresa) {
this.empresa = empresa; this.empresa = empresa;
} }
public Boolean getReenviar() {
return reenviar;
}
public void setReenviar(Boolean reenviar) {
this.reenviar = reenviar;
}
} }

View File

@ -62,7 +62,12 @@
<label <label
value="${c:l('relatorioSapController.reenviarGerados.label')}" /> value="${c:l('relatorioSapController.reenviarGerados.label')}" />
<cell colspan="2"> <cell colspan="2">
<checkbox id="chkReenviarGerados" value="@{winFiltroRelatorioSap$composer.reenviar}" /> <hbox>
<checkbox id="chkIntegrado" label="Integrado" />
<checkbox id="chkNaoEnviado" label="Não Enviado" />
<checkbox id="chkPendente" label="Pendente" />
<checkbox id="chkRecusado" label="Recusado" />
</hbox>
</cell> </cell>
</row> </row>
</rows> </rows>