fixes bug#8669
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@65896 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
c1518d6f51
commit
e5df95ef38
|
@ -28,6 +28,7 @@ import org.zkoss.zul.Radio;
|
||||||
import org.zkoss.zul.Tab;
|
import org.zkoss.zul.Tab;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.constantes.Constantes;
|
import com.rjconsultores.ventaboletos.constantes.Constantes;
|
||||||
|
import com.rjconsultores.ventaboletos.dao.EmpresaDAO;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Conferencia;
|
import com.rjconsultores.ventaboletos.entidad.Conferencia;
|
||||||
import com.rjconsultores.ventaboletos.entidad.ConferenciaPendencia;
|
import com.rjconsultores.ventaboletos.entidad.ConferenciaPendencia;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||||
|
@ -583,12 +584,12 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
private void carregarDados() {
|
private void carregarDados() {
|
||||||
try {
|
try {
|
||||||
List<BoletoComissao> boletosComissaos = conferenciaComissaoService.carregarBilhetesComissao(null, getConferencia(), null);
|
List<BoletoComissao> boletosComissaos = conferenciaComissaoService.carregarBilhetesComissao(null, getConferencia(), null, false);
|
||||||
|
|
||||||
carregarBilhetesManual(boletosComissaos);
|
carregarBilhetesManual(boletosComissaos);
|
||||||
carregarBilhetesVendidos(boletosComissaos);
|
carregarBilhetesVendidos(boletosComissaos, false);
|
||||||
carregarBilhetesCancelados(boletosComissaos);
|
carregarBilhetesCancelados(boletosComissaos, false);
|
||||||
carregarBilhetesDevolvidos(boletosComissaos);
|
carregarBilhetesDevolvidos(boletosComissaos, false);
|
||||||
carregarBilhetesGap(boletosComissaos);
|
carregarBilhetesGap(boletosComissaos);
|
||||||
carregarBilhetesGapCancelados(boletosComissaos);
|
carregarBilhetesGapCancelados(boletosComissaos);
|
||||||
carregarBilhetesGapDevolvidos(boletosComissaos);
|
carregarBilhetesGapDevolvidos(boletosComissaos);
|
||||||
|
@ -641,19 +642,21 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
vendidosAtualizado = true;
|
vendidosAtualizado = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//recarrega as informações
|
//recarrega as informações
|
||||||
if (vendidosAtualizado){
|
if (vendidosAtualizado){
|
||||||
this.carregarBilhetesVendidos();
|
this.carregarBilhetesVendidos(this.lsBilhetes,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//recarrega as informações
|
//recarrega as informações
|
||||||
if (canceladoAtualizado){
|
if (canceladoAtualizado){
|
||||||
this.carregarBilhetesCancelados();
|
this.carregarBilhetesCancelados(this.lsBilhetesCancelados,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//recarrega as informações
|
//recarrega as informações
|
||||||
if (devolvidoAtualizado){
|
if (devolvidoAtualizado){
|
||||||
this.carregarBilhetesDevolvidos();
|
this.carregarBilhetesDevolvidos(this.lsBilhetesDevolvidos,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -664,7 +667,7 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void carregarBilhetesManual(List<BoletoComissao> boletosComissaos) throws BusinessException {
|
private void carregarBilhetesManual(List<BoletoComissao> boletosComissaos) throws BusinessException {
|
||||||
lsBilhetesManual = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.BOLETO_MANUAL);
|
lsBilhetesManual = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.BOLETO_MANUAL, false);
|
||||||
totalBilhetesManual = conferenciaComissaoService.totalizarBoletoComissao(lsBilhetesManual, IndStatusBoleto.V);
|
totalBilhetesManual = conferenciaComissaoService.totalizarBoletoComissao(lsBilhetesManual, IndStatusBoleto.V);
|
||||||
txtTotalBilhetesManual.setValue(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(totalBilhetesManual, LocaleUtil.getLocale()));
|
txtTotalBilhetesManual.setValue(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(totalBilhetesManual, LocaleUtil.getLocale()));
|
||||||
txtQtdeTotalBilhetesManual.setValue(String.valueOf(lsBilhetesManual.size()));
|
txtQtdeTotalBilhetesManual.setValue(String.valueOf(lsBilhetesManual.size()));
|
||||||
|
@ -673,11 +676,8 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
verificarBilhetesSemConferencia(lsBilhetesManual, tabBilhetesManual);
|
verificarBilhetesSemConferencia(lsBilhetesManual, tabBilhetesManual);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void carregarBilhetesVendidos(List<BoletoComissao> boletosComissaos) throws BusinessException {
|
private void carregarBilhetesVendidos(List<BoletoComissao> boletosComissaos, boolean carregarDadosFaltantes) throws BusinessException {
|
||||||
|
lsBilhetes = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.BOLETOS_VENDIDOS, carregarDadosFaltantes);
|
||||||
if (boletosComissaos != null){
|
|
||||||
lsBilhetes = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.BOLETOS_VENDIDOS);
|
|
||||||
}
|
|
||||||
|
|
||||||
totalBilhetesVendidos = conferenciaComissaoService.totalizarBoletoComissao(lsBilhetes, IndStatusBoleto.V, IndStatusBoleto.T);
|
totalBilhetesVendidos = conferenciaComissaoService.totalizarBoletoComissao(lsBilhetes, IndStatusBoleto.V, IndStatusBoleto.T);
|
||||||
txtTotalBilhetes.setValue(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(totalBilhetesVendidos, LocaleUtil.getLocale()));
|
txtTotalBilhetes.setValue(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(totalBilhetesVendidos, LocaleUtil.getLocale()));
|
||||||
|
@ -687,17 +687,10 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
verificarBilhetesSemConferencia(lsBilhetes, tabBilhetesVenda);
|
verificarBilhetesSemConferencia(lsBilhetes, tabBilhetesVenda);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void carregarBilhetesVendidos() throws BusinessException {
|
private void carregarBilhetesCancelados(List<BoletoComissao> boletosComissaos, boolean carregarDadosFaltantes) throws BusinessException {
|
||||||
this.carregarBilhetesVendidos(null);
|
|
||||||
}
|
lsBilhetesCancelados = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.BOLETO_CANCELADO, carregarDadosFaltantes);
|
||||||
|
|
||||||
private void carregarBilhetesCancelados() throws BusinessException {
|
|
||||||
this.carregarBilhetesCancelados(null);
|
|
||||||
}
|
|
||||||
private void carregarBilhetesCancelados(List<BoletoComissao> boletosComissaos) throws BusinessException {
|
|
||||||
if (boletosComissaos != null){
|
|
||||||
lsBilhetesCancelados = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.BOLETO_CANCELADO);
|
|
||||||
}
|
|
||||||
|
|
||||||
totalBilhetesCancelados = conferenciaComissaoService.totalizarBoletoComissao(lsBilhetesCancelados);
|
totalBilhetesCancelados = conferenciaComissaoService.totalizarBoletoComissao(lsBilhetesCancelados);
|
||||||
txtTotalBilhetesCancelados.setValue(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(totalBilhetesCancelados, LocaleUtil.getLocale()));
|
txtTotalBilhetesCancelados.setValue(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(totalBilhetesCancelados, LocaleUtil.getLocale()));
|
||||||
|
@ -707,15 +700,11 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
verificarBilhetesSemConferencia(lsBilhetesCancelados, tabBilhetesCancelados);
|
verificarBilhetesSemConferencia(lsBilhetesCancelados, tabBilhetesCancelados);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void carregarBilhetesDevolvidos() throws BusinessException {
|
|
||||||
this.carregarBilhetesDevolvidos(null);
|
private void carregarBilhetesDevolvidos(List<BoletoComissao> boletosComissaos, boolean carregarDadosFaltantes) throws BusinessException {
|
||||||
}
|
|
||||||
private void carregarBilhetesDevolvidos(List<BoletoComissao> boletosComissaos) throws BusinessException {
|
|
||||||
totalBilhetesDevolvidos = BigDecimal.ZERO;
|
totalBilhetesDevolvidos = BigDecimal.ZERO;
|
||||||
|
|
||||||
if (boletosComissaos != null){
|
lsBilhetesDevolvidos = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.BOLETO_DEVOLVIDO, carregarDadosFaltantes);
|
||||||
lsBilhetesDevolvidos = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.BOLETO_DEVOLVIDO);
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<BoletoStatusComissao, BigDecimal> totais = conferenciaComissaoService.totalizarBoletoComissaoDevolvidosTrocaOcd(lsBilhetesDevolvidos);
|
Map<BoletoStatusComissao, BigDecimal> totais = conferenciaComissaoService.totalizarBoletoComissaoDevolvidosTrocaOcd(lsBilhetesDevolvidos);
|
||||||
|
|
||||||
|
@ -734,7 +723,7 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void carregarBilhetesGap(List<BoletoComissao> boletosComissaos) throws BusinessException {
|
private void carregarBilhetesGap(List<BoletoComissao> boletosComissaos) throws BusinessException {
|
||||||
lsBilhetesGap = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.GAP_VENDIDOS);
|
lsBilhetesGap = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.GAP_VENDIDOS, false);
|
||||||
totalBilhetesGap = conferenciaComissaoService.totalizarBoletoComissao(lsBilhetesGap, IndStatusBoleto.V, IndStatusBoleto.T);
|
totalBilhetesGap = conferenciaComissaoService.totalizarBoletoComissao(lsBilhetesGap, IndStatusBoleto.V, IndStatusBoleto.T);
|
||||||
txtTotalBilhetesGap.setValue(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(totalBilhetesGap, LocaleUtil.getLocale()));
|
txtTotalBilhetesGap.setValue(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(totalBilhetesGap, LocaleUtil.getLocale()));
|
||||||
txtQtdeTotalBilhetesGap.setValue(String.valueOf(lsBilhetesGap.size()));
|
txtQtdeTotalBilhetesGap.setValue(String.valueOf(lsBilhetesGap.size()));
|
||||||
|
@ -744,7 +733,7 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void carregarBilhetesGapCancelados(List<BoletoComissao> boletosComissaos) throws BusinessException {
|
private void carregarBilhetesGapCancelados(List<BoletoComissao> boletosComissaos) throws BusinessException {
|
||||||
lsBilhetesGapCancelados = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.GAP_CANCELADO);
|
lsBilhetesGapCancelados = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.GAP_CANCELADO, false);
|
||||||
totalBilhetesGapCancelados = conferenciaComissaoService.totalizarBoletoComissao(lsBilhetesGapCancelados);
|
totalBilhetesGapCancelados = conferenciaComissaoService.totalizarBoletoComissao(lsBilhetesGapCancelados);
|
||||||
txtTotalBilhetesGapCancelados.setValue(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(totalBilhetesGapCancelados, LocaleUtil.getLocale()));
|
txtTotalBilhetesGapCancelados.setValue(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(totalBilhetesGapCancelados, LocaleUtil.getLocale()));
|
||||||
txtQtdeTotalBilhetesGapCancelados.setValue(String.valueOf(lsBilhetesGapCancelados.size()));
|
txtQtdeTotalBilhetesGapCancelados.setValue(String.valueOf(lsBilhetesGapCancelados.size()));
|
||||||
|
@ -754,7 +743,7 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void carregarBilhetesGapDevolvidos(List<BoletoComissao> boletosComissaos) throws BusinessException {
|
private void carregarBilhetesGapDevolvidos(List<BoletoComissao> boletosComissaos) throws BusinessException {
|
||||||
lsBilhetesGapDevolvidos = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.GAP_DEVOLVIDO);
|
lsBilhetesGapDevolvidos = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.GAP_DEVOLVIDO, false);
|
||||||
|
|
||||||
Map<BoletoStatusComissao, BigDecimal> totais = conferenciaComissaoService.totalizarBoletoComissaoDevolvidosTrocaOcd(lsBilhetesGapDevolvidos);
|
Map<BoletoStatusComissao, BigDecimal> totais = conferenciaComissaoService.totalizarBoletoComissaoDevolvidosTrocaOcd(lsBilhetesGapDevolvidos);
|
||||||
|
|
||||||
|
@ -1146,7 +1135,7 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
/*
|
/*
|
||||||
* if((empresa.getIndcarboletosdevolvidosconf() == null || !empresa.getIndcarboletosdevolvidosconf()) && StringUtils.isBlank(conferencia.getNumfoliosistema())) { Messagebox.show(Labels.getLabel("conferenciaController.msg.numfoliosistemaNaoInformado"), Labels.getLabel("conferenciaController.window.title"), Messagebox.OK,Messagebox.INFORMATION); return; }
|
* if((empresa.getIndcarboletosdevolvidosconf() == null || !empresa.getIndcarboletosdevolvidosconf()) && StringUtils.isBlank(conferencia.getNumfoliosistema())) { Messagebox.show(Labels.getLabel("conferenciaController.msg.numfoliosistemaNaoInformado"), Labels.getLabel("conferenciaController.window.title"), Messagebox.OK,Messagebox.INFORMATION); return; }
|
||||||
*/
|
*/
|
||||||
lsBilhetesDevolvidos = conferenciaComissaoService.carregarBilhetesComissao(null, conferencia, BoletoStatusComissao.BOLETO_DEVOLVIDO);
|
lsBilhetesDevolvidos = conferenciaComissaoService.carregarBilhetesComissao(null, conferencia, BoletoStatusComissao.BOLETO_DEVOLVIDO, false);
|
||||||
|
|
||||||
Map<BoletoStatusComissao, BigDecimal> totais = conferenciaComissaoService.totalizarBoletoComissaoDevolvidosTrocaOcd(lsBilhetesDevolvidos);
|
Map<BoletoStatusComissao, BigDecimal> totais = conferenciaComissaoService.totalizarBoletoComissaoDevolvidosTrocaOcd(lsBilhetesDevolvidos);
|
||||||
totalBilhetesDevolvidos = totais.get(BoletoStatusComissao.BOLETO_DEVOLVIDO);
|
totalBilhetesDevolvidos = totais.get(BoletoStatusComissao.BOLETO_DEVOLVIDO);
|
||||||
|
|
Loading…
Reference in New Issue