Fixes Bug #0009932 - Foram adicionadas lista auxiliares para impactar menos o código

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@75515 d1611594-4594-4d17-8e1d-87c2c4800839
master
alexandre.lima 2017-10-23 15:36:14 +00:00
parent 669dfae3b0
commit 9a5338fb26
4 changed files with 29 additions and 14 deletions

View File

@ -9,6 +9,7 @@ import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -210,6 +211,9 @@ public class ConferenciaController extends MyGenericForwardComposer {
@Override
public void doAfterCompose(Component comp) throws Exception {
conferenciaComissaoService.generacionAutomaticaConferencia();
isPeriodo = (Boolean) Executions.getCurrent().getArg().get("isPeriodo");
@ -257,11 +261,15 @@ public class ConferenciaController extends MyGenericForwardComposer {
super.render(lstm, o);
final OcdVO ocd = (OcdVO) o;
List<Component> com = lstm.getChildren();
Random gerador = new Random();
String name = gerador.nextInt() + "";
name = name.replace("-", "");
for (Component component : com) {
Listcell listCell = (Listcell) component;
if (listCell.getFirstChild() instanceof Checkbox) {
Checkbox chk = (Checkbox) component.getFirstChild();
chk.setDisabled(getEnableDisableCheckBox(ocd.getConferencia()));
chk.setId(name);
chk.addEventListener("onCheck", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
@ -293,9 +301,13 @@ public class ConferenciaController extends MyGenericForwardComposer {
List<Component> com = lstm.getChildren();
for (Component component : com) {
Listcell listCell = (Listcell) component;
Random gerador = new Random();
String name = gerador.nextInt() + "";
name = name.replace("-", "");
if (listCell.getFirstChild() instanceof Checkbox) {
Checkbox chk = (Checkbox) component.getFirstChild();
chk.setDisabled(getEnableDisableCheckBox(eventoFinanceiro.getConferencia()));
chk.setId(name);
chk.addEventListener("onCheck", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
@ -389,11 +401,15 @@ public class ConferenciaController extends MyGenericForwardComposer {
super.render(lstm, o);
final BoletoComissao boletoComissao = (BoletoComissao) o;
List<Component> com = lstm.getChildren();
Random gerador = new Random();
String name = gerador.nextInt() + "";
name = name.replace("-", "");
for (Component component : com) {
Listcell listCell = (Listcell) component;
if (listCell.getFirstChild() instanceof Checkbox) {
Checkbox chk = (Checkbox) component.getFirstChild();
chk.setDisabled(getEnableDisableCheckBox(boletoComissao.getConferencia()));
chk.setId(name);
chk.addEventListener("onCheck", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {

View File

@ -24,7 +24,6 @@ import org.zkoss.zul.Bandbox;
import org.zkoss.zul.Checkbox;
import org.zkoss.zul.Comboitem;
import org.zkoss.zul.ComboitemRenderer;
import org.zkoss.zul.Datebox;
import org.zkoss.zul.Paging;
import org.zkoss.zul.Radiogroup;
@ -38,6 +37,7 @@ import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar;
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada;
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParadaCve;
import com.rjconsultores.ventaboletos.web.utilerias.MyDatebox;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.MyTextbox;
@ -66,8 +66,8 @@ public class RelatorioTaxasLinhaController extends MyGenericForwardComposer {
private MyComboboxParadaCve cmbParadaOrigemCve;
private MyComboboxParada cmbParadaDestino;
private MyComboboxParadaCve cmbParadaDestinoCve;
private Datebox datInicial;
private Datebox datFinal;
private MyDatebox datInicial;
private MyDatebox datFinal;
private MyTextbox txtNombrePuntoVenta;
private Radiogroup rdGroupTipoData;
private Checkbox chkSubtrairIcms;

View File

@ -1,6 +1,7 @@
package com.rjconsultores.ventaboletos.web.utilerias.render;
import java.text.SimpleDateFormat;
import java.util.Random;
import org.zkoss.util.resource.Labels;
import org.zkoss.zul.Checkbox;
@ -18,11 +19,15 @@ public class RenderEventosFinanceiros implements ListitemRenderer {
public void render(Listitem lstm, Object o) throws Exception {
EventosFinanceirosVO eventosFinanceiros = (EventosFinanceirosVO) o;
eventosFinanceiros.setConferido(eventosFinanceiros.getLogconferenciaId() != null);
Random gerador = new Random();
String name = gerador.nextInt() + "";
name = name.replace("-", "");
Listcell lc = new Listcell();
if (eventosFinanceiros.getExigeConferenciaAba() || eventosFinanceiros.isExigeConferencia()) {
Checkbox chk = new Checkbox();
chk.setId(eventosFinanceiros.getEventoextraId() + "_" + eventosFinanceiros.getComempformapagoId());
chk.setId(eventosFinanceiros.getEventoextraId() + "_" + eventosFinanceiros.getComempformapagoId() != null ? "_"+ eventosFinanceiros.getComempformapagoId() + name : name);
chk.setChecked(eventosFinanceiros.isConferido());
chk.setParent(lc);
}

View File

@ -17,17 +17,11 @@
</columns>
<rows>
<row>
<label
value="${c:l('relatorioTaxasLinhaController.lbDatInicial.value')}" />
<datebox id="datInicial" format="dd/MM/yyyy"
mold="rounded" width="95%" constraint="no empty"
maxlength="10" />
<label value="${c:l('relatorioTaxasLinhaController.lbDatInicial.value')}" />
<datebox id="datInicial" width="95%" use="com.rjconsultores.ventaboletos.web.utilerias.MyDatebox" mold="rounded" lenient="true" />
<label
value="${c:l('relatorioTaxasLinhaController.lbDatFinal.value')}" />
<datebox id="datFinal" format="dd/MM/yyyy"
mold="rounded" width="95%" constraint="no empty"
maxlength="10" />
<label value="${c:l('relatorioTaxasLinhaController.lbDatFinal.value')}" />
<datebox id="datFinal" width="95%" use="com.rjconsultores.ventaboletos.web.utilerias.MyDatebox" mold="rounded" lenient="true" />
</row>
<row>
<label