|
|
|
@ -179,25 +179,25 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|
|
|
|
super.doAfterCompose(comp);
|
|
|
|
|
logsConferenciaList.setItemRenderer(new RenderLogConferencia());
|
|
|
|
|
|
|
|
|
|
ocdsList.setItemRenderer(new RenderOcd(){
|
|
|
|
|
ocdsList.setItemRenderer(new RenderOcd() {
|
|
|
|
|
@Override
|
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
|
public void render(Listitem lstm, Object o) throws Exception {
|
|
|
|
|
super.render(lstm, o);
|
|
|
|
|
final OcdVO ocd = (OcdVO) o;
|
|
|
|
|
List<Component> com = lstm.getChildren();
|
|
|
|
|
for (Component component: com) {
|
|
|
|
|
for (Component component : com) {
|
|
|
|
|
Listcell listCell = (Listcell) component;
|
|
|
|
|
if(listCell.getFirstChild() instanceof Checkbox) {
|
|
|
|
|
Checkbox chk = (Checkbox)component.getFirstChild();
|
|
|
|
|
if (listCell.getFirstChild() instanceof Checkbox) {
|
|
|
|
|
Checkbox chk = (Checkbox) component.getFirstChild();
|
|
|
|
|
chk.setDisabled(isExibirBotaoReabrirMovimento());
|
|
|
|
|
chk.addEventListener("onCheck", new EventListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onEvent(Event event) throws Exception {
|
|
|
|
|
CheckEvent checkEvent = (CheckEvent) event;
|
|
|
|
|
if(checkEvent.isChecked() && ocd.getLogconferenciaId() == null) {
|
|
|
|
|
if (checkEvent.isChecked() && ocd.getLogconferenciaId() == null) {
|
|
|
|
|
gravarLogConferenciaOcd(ocd);
|
|
|
|
|
} else if(!checkEvent.isChecked() && ocd.getLogconferenciaId() != null) {
|
|
|
|
|
} else if (!checkEvent.isChecked() && ocd.getLogconferenciaId() != null) {
|
|
|
|
|
removerLogConferenciaOcd(ocd);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -214,25 +214,25 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
eventosFinanceirosList.setItemRenderer(new RenderEventosFinanceiros(){
|
|
|
|
|
eventosFinanceirosList.setItemRenderer(new RenderEventosFinanceiros() {
|
|
|
|
|
@Override
|
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
|
public void render(Listitem lstm, Object o) throws Exception {
|
|
|
|
|
super.render(lstm, o);
|
|
|
|
|
final EventosFinanceirosVO eventoFinanceiro = (EventosFinanceirosVO) o;
|
|
|
|
|
List<Component> com = lstm.getChildren();
|
|
|
|
|
for (Component component: com) {
|
|
|
|
|
for (Component component : com) {
|
|
|
|
|
Listcell listCell = (Listcell) component;
|
|
|
|
|
if(listCell.getFirstChild() instanceof Checkbox) {
|
|
|
|
|
Checkbox chk = (Checkbox)component.getFirstChild();
|
|
|
|
|
if (listCell.getFirstChild() instanceof Checkbox) {
|
|
|
|
|
Checkbox chk = (Checkbox) component.getFirstChild();
|
|
|
|
|
chk.setDisabled(isExibirBotaoReabrirMovimento());
|
|
|
|
|
chk.addEventListener("onCheck", new EventListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onEvent(Event event) throws Exception {
|
|
|
|
|
CheckEvent checkEvent = (CheckEvent) event;
|
|
|
|
|
if(checkEvent.isChecked() && eventoFinanceiro.getLogconferenciaId() == null) {
|
|
|
|
|
if (checkEvent.isChecked() && eventoFinanceiro.getLogconferenciaId() == null) {
|
|
|
|
|
gravarLogConferenciaEventoFinanceiro(eventoFinanceiro);
|
|
|
|
|
} else if(!checkEvent.isChecked() && eventoFinanceiro.getLogconferenciaId() != null) {
|
|
|
|
|
} else if (!checkEvent.isChecked() && eventoFinanceiro.getLogconferenciaId() != null) {
|
|
|
|
|
removerLogConferenciaEventoFinanceiro(eventoFinanceiro);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -243,22 +243,22 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
eventosFinanceirosList.addEventListener("onDoubleClick", new EventListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onEvent(Event event) throws Exception {
|
|
|
|
|
EventosFinanceirosVO eventosFinanceiros = (EventosFinanceirosVO) eventosFinanceirosList.getSelected();
|
|
|
|
|
lancarLogConferenciaEventosFinanceiros(eventosFinanceiros, eventosFinanceirosList);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
@Override
|
|
|
|
|
public void onEvent(Event event) throws Exception {
|
|
|
|
|
EventosFinanceirosVO eventosFinanceiros = (EventosFinanceirosVO) eventosFinanceirosList.getSelected();
|
|
|
|
|
lancarLogConferenciaEventosFinanceiros(eventosFinanceiros, eventosFinanceirosList);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
cmbSituacaoLog.addEventListener("onSelect", new EventListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onEvent(Event event) throws Exception {
|
|
|
|
|
StatusLogConferencia status = StatusLogConferencia.getStatusLogConferencia((Integer)cmbSituacaoLog.getSelectedItem().getValue());
|
|
|
|
|
if(StatusLogConferencia.CONFERIDO.equals(status)) {
|
|
|
|
|
StatusLogConferencia status = StatusLogConferencia.getStatusLogConferencia((Integer) cmbSituacaoLog.getSelectedItem().getValue());
|
|
|
|
|
if (StatusLogConferencia.CONFERIDO.equals(status)) {
|
|
|
|
|
txtPrecoLog.setDisabled(true);
|
|
|
|
|
rDebito.setDisabled(true);
|
|
|
|
|
rCredito.setDisabled(true);
|
|
|
|
|
} else if(StatusLogConferencia.PENDENCIA.equals(status)) {
|
|
|
|
|
} else if (StatusLogConferencia.PENDENCIA.equals(status)) {
|
|
|
|
|
txtPrecoLog.setDisabled(false);
|
|
|
|
|
rDebito.setDisabled(false);
|
|
|
|
|
rCredito.setDisabled(false);
|
|
|
|
@ -278,25 +278,25 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void ajustarListsBilhetes() {
|
|
|
|
|
bilhetesManualList.setItemRenderer(new RenderBoletoComissao(){
|
|
|
|
|
bilhetesManualList.setItemRenderer(new RenderBoletoComissao() {
|
|
|
|
|
@Override
|
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
|
public void render(Listitem lstm, Object o) throws Exception {
|
|
|
|
|
super.render(lstm, o);
|
|
|
|
|
final BoletoComissao boletoComissao = (BoletoComissao) o;
|
|
|
|
|
List<Component> com = lstm.getChildren();
|
|
|
|
|
for (Component component: com) {
|
|
|
|
|
for (Component component : com) {
|
|
|
|
|
Listcell listCell = (Listcell) component;
|
|
|
|
|
if(listCell.getFirstChild() instanceof Checkbox) {
|
|
|
|
|
Checkbox chk = (Checkbox)component.getFirstChild();
|
|
|
|
|
if (listCell.getFirstChild() instanceof Checkbox) {
|
|
|
|
|
Checkbox chk = (Checkbox) component.getFirstChild();
|
|
|
|
|
chk.setDisabled(isExibirBotaoReabrirMovimento());
|
|
|
|
|
chk.addEventListener("onCheck", new EventListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onEvent(Event event) throws Exception {
|
|
|
|
|
CheckEvent checkEvent = (CheckEvent) event;
|
|
|
|
|
if(checkEvent.isChecked() && boletoComissao.getLogconferenciaId() == null) {
|
|
|
|
|
if (checkEvent.isChecked() && boletoComissao.getLogconferenciaId() == null) {
|
|
|
|
|
gravarLogConferenciaBilhete(bilhetesManualList, boletoComissao);
|
|
|
|
|
} else if(!checkEvent.isChecked() && boletoComissao.getLogconferenciaId() != null) {
|
|
|
|
|
} else if (!checkEvent.isChecked() && boletoComissao.getLogconferenciaId() != null) {
|
|
|
|
|
removerLogConferenciaBilhete(bilhetesManualList, boletoComissao);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -313,25 +313,25 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
bilhetesList.setItemRenderer(new RenderBoletoComissao(){
|
|
|
|
|
bilhetesList.setItemRenderer(new RenderBoletoComissao() {
|
|
|
|
|
@Override
|
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
|
public void render(Listitem lstm, Object o) throws Exception {
|
|
|
|
|
super.render(lstm, o);
|
|
|
|
|
final BoletoComissao boletoComissao = (BoletoComissao) o;
|
|
|
|
|
List<Component> com = lstm.getChildren();
|
|
|
|
|
for (Component component: com) {
|
|
|
|
|
for (Component component : com) {
|
|
|
|
|
Listcell listCell = (Listcell) component;
|
|
|
|
|
if(listCell.getFirstChild() instanceof Checkbox) {
|
|
|
|
|
Checkbox chk = (Checkbox)component.getFirstChild();
|
|
|
|
|
if (listCell.getFirstChild() instanceof Checkbox) {
|
|
|
|
|
Checkbox chk = (Checkbox) component.getFirstChild();
|
|
|
|
|
chk.setDisabled(isExibirBotaoReabrirMovimento());
|
|
|
|
|
chk.addEventListener("onCheck", new EventListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onEvent(Event event) throws Exception {
|
|
|
|
|
CheckEvent checkEvent = (CheckEvent) event;
|
|
|
|
|
if(checkEvent.isChecked() && boletoComissao.getLogconferenciaId() == null) {
|
|
|
|
|
if (checkEvent.isChecked() && boletoComissao.getLogconferenciaId() == null) {
|
|
|
|
|
gravarLogConferenciaBilhete(bilhetesList, boletoComissao);
|
|
|
|
|
} else if(!checkEvent.isChecked() && boletoComissao.getLogconferenciaId() != null) {
|
|
|
|
|
} else if (!checkEvent.isChecked() && boletoComissao.getLogconferenciaId() != null) {
|
|
|
|
|
removerLogConferenciaBilhete(bilhetesList, boletoComissao);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -348,25 +348,25 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
bilhetesCanceladosList.setItemRenderer(new RenderBoletoComissao(){
|
|
|
|
|
bilhetesCanceladosList.setItemRenderer(new RenderBoletoComissao() {
|
|
|
|
|
@Override
|
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
|
public void render(Listitem lstm, Object o) throws Exception {
|
|
|
|
|
super.render(lstm, o);
|
|
|
|
|
final BoletoComissao boletoComissao = (BoletoComissao) o;
|
|
|
|
|
List<Component> com = lstm.getChildren();
|
|
|
|
|
for (Component component: com) {
|
|
|
|
|
for (Component component : com) {
|
|
|
|
|
Listcell listCell = (Listcell) component;
|
|
|
|
|
if(listCell.getFirstChild() instanceof Checkbox) {
|
|
|
|
|
Checkbox chk = (Checkbox)component.getFirstChild();
|
|
|
|
|
if (listCell.getFirstChild() instanceof Checkbox) {
|
|
|
|
|
Checkbox chk = (Checkbox) component.getFirstChild();
|
|
|
|
|
chk.setDisabled(isExibirBotaoReabrirMovimento());
|
|
|
|
|
chk.addEventListener("onCheck", new EventListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onEvent(Event event) throws Exception {
|
|
|
|
|
CheckEvent checkEvent = (CheckEvent) event;
|
|
|
|
|
if(checkEvent.isChecked() && boletoComissao.getLogconferenciaId() == null) {
|
|
|
|
|
if (checkEvent.isChecked() && boletoComissao.getLogconferenciaId() == null) {
|
|
|
|
|
gravarLogConferenciaBilhete(bilhetesCanceladosList, boletoComissao);
|
|
|
|
|
} else if(!checkEvent.isChecked() && boletoComissao.getLogconferenciaId() != null) {
|
|
|
|
|
} else if (!checkEvent.isChecked() && boletoComissao.getLogconferenciaId() != null) {
|
|
|
|
|
removerLogConferenciaBilhete(bilhetesCanceladosList, boletoComissao);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -376,32 +376,32 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
bilhetesCanceladosList.addEventListener("onDoubleClick", new EventListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onEvent(Event event) throws Exception {
|
|
|
|
|
BoletoComissao boletoComissao = (BoletoComissao) bilhetesCanceladosList.getSelected();
|
|
|
|
|
lancarLogConferenciaBilhete(boletoComissao, bilhetesCanceladosList);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
@Override
|
|
|
|
|
public void onEvent(Event event) throws Exception {
|
|
|
|
|
BoletoComissao boletoComissao = (BoletoComissao) bilhetesCanceladosList.getSelected();
|
|
|
|
|
lancarLogConferenciaBilhete(boletoComissao, bilhetesCanceladosList);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
bilhetesDevolvidosList.setItemRenderer(new RenderBoletoComissao(){
|
|
|
|
|
bilhetesDevolvidosList.setItemRenderer(new RenderBoletoComissao() {
|
|
|
|
|
@Override
|
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
|
public void render(Listitem lstm, Object o) throws Exception {
|
|
|
|
|
super.render(lstm, o);
|
|
|
|
|
final BoletoComissao boletoComissao = (BoletoComissao) o;
|
|
|
|
|
List<Component> com = lstm.getChildren();
|
|
|
|
|
for (Component component: com) {
|
|
|
|
|
for (Component component : com) {
|
|
|
|
|
Listcell listCell = (Listcell) component;
|
|
|
|
|
if(listCell.getFirstChild() instanceof Checkbox) {
|
|
|
|
|
Checkbox chk = (Checkbox)component.getFirstChild();
|
|
|
|
|
if (listCell.getFirstChild() instanceof Checkbox) {
|
|
|
|
|
Checkbox chk = (Checkbox) component.getFirstChild();
|
|
|
|
|
chk.setDisabled(isExibirBotaoReabrirMovimento());
|
|
|
|
|
chk.addEventListener("onCheck", new EventListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onEvent(Event event) throws Exception {
|
|
|
|
|
CheckEvent checkEvent = (CheckEvent) event;
|
|
|
|
|
if(checkEvent.isChecked() && boletoComissao.getLogconferenciaId() == null) {
|
|
|
|
|
if (checkEvent.isChecked() && boletoComissao.getLogconferenciaId() == null) {
|
|
|
|
|
gravarLogConferenciaBilhete(bilhetesDevolvidosList, boletoComissao);
|
|
|
|
|
} else if(!checkEvent.isChecked() && boletoComissao.getLogconferenciaId() != null) {
|
|
|
|
|
} else if (!checkEvent.isChecked() && boletoComissao.getLogconferenciaId() != null) {
|
|
|
|
|
removerLogConferenciaBilhete(bilhetesDevolvidosList, boletoComissao);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -411,32 +411,32 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
bilhetesDevolvidosList.addEventListener("onDoubleClick", new EventListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onEvent(Event event) throws Exception {
|
|
|
|
|
BoletoComissao boletoComissao = (BoletoComissao) bilhetesDevolvidosList.getSelected();
|
|
|
|
|
lancarLogConferenciaBilhete(boletoComissao, bilhetesDevolvidosList);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
@Override
|
|
|
|
|
public void onEvent(Event event) throws Exception {
|
|
|
|
|
BoletoComissao boletoComissao = (BoletoComissao) bilhetesDevolvidosList.getSelected();
|
|
|
|
|
lancarLogConferenciaBilhete(boletoComissao, bilhetesDevolvidosList);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
bilhetesGapList.setItemRenderer(new RenderBoletoComissao(){
|
|
|
|
|
bilhetesGapList.setItemRenderer(new RenderBoletoComissao() {
|
|
|
|
|
@Override
|
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
|
public void render(Listitem lstm, Object o) throws Exception {
|
|
|
|
|
super.render(lstm, o);
|
|
|
|
|
final BoletoComissao boletoComissao = (BoletoComissao) o;
|
|
|
|
|
List<Component> com = lstm.getChildren();
|
|
|
|
|
for (Component component: com) {
|
|
|
|
|
for (Component component : com) {
|
|
|
|
|
Listcell listCell = (Listcell) component;
|
|
|
|
|
if(listCell.getFirstChild() instanceof Checkbox) {
|
|
|
|
|
Checkbox chk = (Checkbox)component.getFirstChild();
|
|
|
|
|
if (listCell.getFirstChild() instanceof Checkbox) {
|
|
|
|
|
Checkbox chk = (Checkbox) component.getFirstChild();
|
|
|
|
|
chk.setDisabled(isExibirBotaoReabrirMovimento());
|
|
|
|
|
chk.addEventListener("onCheck", new EventListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onEvent(Event event) throws Exception {
|
|
|
|
|
CheckEvent checkEvent = (CheckEvent) event;
|
|
|
|
|
if(checkEvent.isChecked() && boletoComissao.getLogconferenciaId() == null) {
|
|
|
|
|
if (checkEvent.isChecked() && boletoComissao.getLogconferenciaId() == null) {
|
|
|
|
|
gravarLogConferenciaBilhete(bilhetesGapList, boletoComissao);
|
|
|
|
|
} else if(!checkEvent.isChecked() && boletoComissao.getLogconferenciaId() != null) {
|
|
|
|
|
} else if (!checkEvent.isChecked() && boletoComissao.getLogconferenciaId() != null) {
|
|
|
|
|
removerLogConferenciaBilhete(bilhetesGapList, boletoComissao);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -446,32 +446,32 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
bilhetesGapList.addEventListener("onDoubleClick", new EventListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onEvent(Event event) throws Exception {
|
|
|
|
|
BoletoComissao boletoComissao = (BoletoComissao) bilhetesGapList.getSelected();
|
|
|
|
|
lancarLogConferenciaBilhete(boletoComissao, bilhetesGapList);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
@Override
|
|
|
|
|
public void onEvent(Event event) throws Exception {
|
|
|
|
|
BoletoComissao boletoComissao = (BoletoComissao) bilhetesGapList.getSelected();
|
|
|
|
|
lancarLogConferenciaBilhete(boletoComissao, bilhetesGapList);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
bilhetesGapCanceladosList.setItemRenderer(new RenderBoletoComissao(){
|
|
|
|
|
bilhetesGapCanceladosList.setItemRenderer(new RenderBoletoComissao() {
|
|
|
|
|
@Override
|
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
|
public void render(Listitem lstm, Object o) throws Exception {
|
|
|
|
|
super.render(lstm, o);
|
|
|
|
|
final BoletoComissao boletoComissao = (BoletoComissao) o;
|
|
|
|
|
List<Component> com = lstm.getChildren();
|
|
|
|
|
for (Component component: com) {
|
|
|
|
|
for (Component component : com) {
|
|
|
|
|
Listcell listCell = (Listcell) component;
|
|
|
|
|
if(listCell.getFirstChild() instanceof Checkbox) {
|
|
|
|
|
Checkbox chk = (Checkbox)component.getFirstChild();
|
|
|
|
|
if (listCell.getFirstChild() instanceof Checkbox) {
|
|
|
|
|
Checkbox chk = (Checkbox) component.getFirstChild();
|
|
|
|
|
chk.setDisabled(isExibirBotaoReabrirMovimento());
|
|
|
|
|
chk.addEventListener("onCheck", new EventListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onEvent(Event event) throws Exception {
|
|
|
|
|
CheckEvent checkEvent = (CheckEvent) event;
|
|
|
|
|
if(checkEvent.isChecked() && boletoComissao.getLogconferenciaId() == null) {
|
|
|
|
|
if (checkEvent.isChecked() && boletoComissao.getLogconferenciaId() == null) {
|
|
|
|
|
gravarLogConferenciaBilhete(bilhetesGapCanceladosList, boletoComissao);
|
|
|
|
|
} else if(!checkEvent.isChecked() && boletoComissao.getLogconferenciaId() != null) {
|
|
|
|
|
} else if (!checkEvent.isChecked() && boletoComissao.getLogconferenciaId() != null) {
|
|
|
|
|
removerLogConferenciaBilhete(bilhetesGapCanceladosList, boletoComissao);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -481,32 +481,32 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
bilhetesGapCanceladosList.addEventListener("onDoubleClick", new EventListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onEvent(Event event) throws Exception {
|
|
|
|
|
BoletoComissao boletoComissao = (BoletoComissao) bilhetesGapCanceladosList.getSelected();
|
|
|
|
|
lancarLogConferenciaBilhete(boletoComissao, bilhetesCanceladosList);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
@Override
|
|
|
|
|
public void onEvent(Event event) throws Exception {
|
|
|
|
|
BoletoComissao boletoComissao = (BoletoComissao) bilhetesGapCanceladosList.getSelected();
|
|
|
|
|
lancarLogConferenciaBilhete(boletoComissao, bilhetesCanceladosList);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
bilhetesGapDevolvidosList.setItemRenderer(new RenderBoletoComissao(){
|
|
|
|
|
bilhetesGapDevolvidosList.setItemRenderer(new RenderBoletoComissao() {
|
|
|
|
|
@Override
|
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
|
public void render(Listitem lstm, Object o) throws Exception {
|
|
|
|
|
super.render(lstm, o);
|
|
|
|
|
final BoletoComissao boletoComissao = (BoletoComissao) o;
|
|
|
|
|
List<Component> com = lstm.getChildren();
|
|
|
|
|
for (Component component: com) {
|
|
|
|
|
for (Component component : com) {
|
|
|
|
|
Listcell listCell = (Listcell) component;
|
|
|
|
|
if(listCell.getFirstChild() instanceof Checkbox) {
|
|
|
|
|
Checkbox chk = (Checkbox)component.getFirstChild();
|
|
|
|
|
if (listCell.getFirstChild() instanceof Checkbox) {
|
|
|
|
|
Checkbox chk = (Checkbox) component.getFirstChild();
|
|
|
|
|
chk.setDisabled(isExibirBotaoReabrirMovimento());
|
|
|
|
|
chk.addEventListener("onCheck", new EventListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onEvent(Event event) throws Exception {
|
|
|
|
|
CheckEvent checkEvent = (CheckEvent) event;
|
|
|
|
|
if(checkEvent.isChecked() && boletoComissao.getLogconferenciaId() == null) {
|
|
|
|
|
if (checkEvent.isChecked() && boletoComissao.getLogconferenciaId() == null) {
|
|
|
|
|
gravarLogConferenciaBilhete(bilhetesGapDevolvidosList, boletoComissao);
|
|
|
|
|
} else if(!checkEvent.isChecked() && boletoComissao.getLogconferenciaId() != null) {
|
|
|
|
|
} else if (!checkEvent.isChecked() && boletoComissao.getLogconferenciaId() != null) {
|
|
|
|
|
removerLogConferenciaBilhete(bilhetesGapDevolvidosList, boletoComissao);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -516,12 +516,12 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
bilhetesGapDevolvidosList.addEventListener("onDoubleClick", new EventListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onEvent(Event event) throws Exception {
|
|
|
|
|
BoletoComissao boletoComissao = (BoletoComissao) bilhetesGapDevolvidosList.getSelected();
|
|
|
|
|
lancarLogConferenciaBilhete(boletoComissao, bilhetesDevolvidosList);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
@Override
|
|
|
|
|
public void onEvent(Event event) throws Exception {
|
|
|
|
|
BoletoComissao boletoComissao = (BoletoComissao) bilhetesGapDevolvidosList.getSelected();
|
|
|
|
|
lancarLogConferenciaBilhete(boletoComissao, bilhetesDevolvidosList);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void popularCombobox() {
|
|
|
|
@ -644,7 +644,7 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|
|
|
|
totalDebitosEventoFinanceiros = BigDecimal.ZERO;
|
|
|
|
|
|
|
|
|
|
for (EventosFinanceirosVO eventoFinanceiro : lsEventosFinanceiros) {
|
|
|
|
|
if(eventoFinanceiro.isCredito()) {
|
|
|
|
|
if (eventoFinanceiro.isCredito()) {
|
|
|
|
|
totalCreditosEventoFinanceiros = totalCreditosEventoFinanceiros.add(eventoFinanceiro.getImpingreso());
|
|
|
|
|
} else {
|
|
|
|
|
totalDebitosEventoFinanceiros = totalDebitosEventoFinanceiros.add(eventoFinanceiro.getImpingreso());
|
|
|
|
@ -660,7 +660,7 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|
|
|
|
lsOcds = conferenciaComissaoService.carregarOcds(conferencia);
|
|
|
|
|
ocdTotal = conferenciaComissaoService.totalizarOcd(lsOcds);
|
|
|
|
|
|
|
|
|
|
if(ocdTotal != null) {
|
|
|
|
|
if (ocdTotal != null) {
|
|
|
|
|
txtTotalOcdValorPagar.setValue(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(ocdTotal.getValorPagar(), LocaleUtil.getLocale()));
|
|
|
|
|
txtQtdeTotalOcd.setValue(String.valueOf(lsOcds.size()));
|
|
|
|
|
}
|
|
|
|
@ -671,42 +671,49 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|
|
|
|
try {
|
|
|
|
|
conferencia = conferenciaComissaoService.confirmarChegadaMalote(conferencia);
|
|
|
|
|
|
|
|
|
|
Messagebox.show(Labels.getLabel("conferenciaController.msg.confirmarChegadaMalote"),
|
|
|
|
|
Labels.getLabel("conferenciaController.window.title"),
|
|
|
|
|
Messagebox.OK,Messagebox.INFORMATION);
|
|
|
|
|
Messagebox.show(Labels.getLabel("conferenciaController.msg.confirmarChegadaMalote"),
|
|
|
|
|
Labels.getLabel("conferenciaController.window.title"),
|
|
|
|
|
Messagebox.OK, Messagebox.INFORMATION);
|
|
|
|
|
|
|
|
|
|
closeWindow();
|
|
|
|
|
closeWindow();
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.error(e.getMessage(), e);
|
|
|
|
|
Messagebox.show(Labels.getLabel("MSG.Error"),
|
|
|
|
|
Labels.getLabel("conferenciaController.window.title"),
|
|
|
|
|
Messagebox.OK,Messagebox.ERROR);
|
|
|
|
|
Messagebox.show(Labels.getLabel("MSG.Error"),
|
|
|
|
|
Labels.getLabel("conferenciaController.window.title"),
|
|
|
|
|
Messagebox.OK, Messagebox.ERROR);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void onClick$btnEncerrarMovimentoDiario(Event event) throws InterruptedException {
|
|
|
|
|
try {
|
|
|
|
|
if(isConferenciaPendente()) {
|
|
|
|
|
if (isConferenciaPendente()) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
conferencia = conferenciaComissaoService.encerrarMovimentoDiario(conferencia);
|
|
|
|
|
|
|
|
|
|
Messagebox.show(Labels.getLabel("conferenciaController.msg.encerrarMovimentoDiario"),
|
|
|
|
|
Labels.getLabel("conferenciaController.window.title"),
|
|
|
|
|
Messagebox.OK,Messagebox.INFORMATION);
|
|
|
|
|
Messagebox.show(Labels.getLabel("conferenciaController.msg.encerrarMovimentoDiario"),
|
|
|
|
|
Labels.getLabel("conferenciaController.window.title"),
|
|
|
|
|
Messagebox.OK, Messagebox.INFORMATION);
|
|
|
|
|
|
|
|
|
|
closeWindow();
|
|
|
|
|
closeWindow();
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.error(e.getMessage(), e);
|
|
|
|
|
Messagebox.show(Labels.getLabel("MSG.Error"),
|
|
|
|
|
Labels.getLabel("conferenciaController.window.title"),
|
|
|
|
|
Messagebox.OK,Messagebox.ERROR);
|
|
|
|
|
Messagebox.show(Labels.getLabel("MSG.Error"),
|
|
|
|
|
Labels.getLabel("conferenciaController.window.title"),
|
|
|
|
|
Messagebox.OK, Messagebox.ERROR);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void onClick$btnIrregularidade(Event event) throws InterruptedException {
|
|
|
|
|
Map<String, Object> args = new HashMap<String, Object>();
|
|
|
|
|
args.put("puntoVentaId", puntoventaId);
|
|
|
|
|
openWindow("/gui/comissao/informeIrregularidadeComissao.zul",
|
|
|
|
|
Labels.getLabel("informeIrregularidadeController.window.title"), args);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private boolean isConferenciaPendente() throws InterruptedException, BusinessException {
|
|
|
|
|
List<BoletoComissao> lsBoletoComissao = new ArrayList<BoletoComissao>();
|
|
|
|
|
lsBoletoComissao.addAll(lsBilhetesManual);
|
|
|
|
@ -717,24 +724,24 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|
|
|
|
lsBoletoComissao.addAll(lsBilhetesGapCancelados);
|
|
|
|
|
lsBoletoComissao.addAll(lsBilhetesGapDevolvidos);
|
|
|
|
|
|
|
|
|
|
if(conferenciaComissaoService.isBilhetesSemConferencia(lsBoletoComissao)) {
|
|
|
|
|
Messagebox.show(Labels.getLabel("conferenciaController.MSG.bilheteSemConferenciaFormapagoCategoria"),
|
|
|
|
|
Labels.getLabel("conferenciaController.window.title"),
|
|
|
|
|
Messagebox.OK,Messagebox.EXCLAMATION);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(conferenciaComissaoService.isEventosFinanceirosSemConferencia(lsEventosFinanceiros)) {
|
|
|
|
|
Messagebox.show(Labels.getLabel("conferenciaController.MSG.eventosFinanceirosSemConferenciaFormapago"),
|
|
|
|
|
if (conferenciaComissaoService.isBilhetesSemConferencia(lsBoletoComissao)) {
|
|
|
|
|
Messagebox.show(Labels.getLabel("conferenciaController.MSG.bilheteSemConferenciaFormapagoCategoria"),
|
|
|
|
|
Labels.getLabel("conferenciaController.window.title"),
|
|
|
|
|
Messagebox.OK,Messagebox.EXCLAMATION);
|
|
|
|
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(conferenciaComissaoService.isOcdSemConferencia(lsOcds)) {
|
|
|
|
|
if (conferenciaComissaoService.isEventosFinanceirosSemConferencia(lsEventosFinanceiros)) {
|
|
|
|
|
Messagebox.show(Labels.getLabel("conferenciaController.MSG.eventosFinanceirosSemConferenciaFormapago"),
|
|
|
|
|
Labels.getLabel("conferenciaController.window.title"),
|
|
|
|
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (conferenciaComissaoService.isOcdSemConferencia(lsOcds)) {
|
|
|
|
|
Messagebox.show(Labels.getLabel("conferenciaController.MSG.ocdSemConferencia"),
|
|
|
|
|
Labels.getLabel("conferenciaController.window.title"),
|
|
|
|
|
Messagebox.OK,Messagebox.EXCLAMATION);
|
|
|
|
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -747,7 +754,7 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|
|
|
|
|
|
|
|
|
Messagebox.show(Labels.getLabel("conferenciaController.msg.reabrirMovimentoDiario"),
|
|
|
|
|
Labels.getLabel("conferenciaController.window.title"),
|
|
|
|
|
Messagebox.OK,Messagebox.INFORMATION);
|
|
|
|
|
Messagebox.OK, Messagebox.INFORMATION);
|
|
|
|
|
|
|
|
|
|
closeWindow();
|
|
|
|
|
|
|
|
|
@ -755,20 +762,20 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|
|
|
|
log.error(e.getMessage(), e);
|
|
|
|
|
Messagebox.show(Labels.getLabel("MSG.Error"),
|
|
|
|
|
Labels.getLabel("conferenciaController.window.title"),
|
|
|
|
|
Messagebox.OK,Messagebox.ERROR);
|
|
|
|
|
Messagebox.OK, Messagebox.ERROR);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void recuperarConferencia(Long conferenciaId) throws ParseException, BusinessException {
|
|
|
|
|
if(conferenciaId != null) {
|
|
|
|
|
if (conferenciaId != null) {
|
|
|
|
|
conferencia = conferenciaComissaoService.obtenerID(conferenciaId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(conferencia == null) {
|
|
|
|
|
if (conferencia == null) {
|
|
|
|
|
conferencia = conferenciaComissaoService.obtenerConferenciaDataMovimento(DateUtil.getDateFromString(datamovimento, "dd/MM/yyyy"), puntoventaId, empresa.getEmpresaId());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(conferencia == null) {
|
|
|
|
|
if (conferencia == null) {
|
|
|
|
|
conferencia = new Conferencia();
|
|
|
|
|
conferencia.setActivo(Boolean.TRUE);
|
|
|
|
|
conferencia.setFecmodif(new Date());
|
|
|
|
@ -781,46 +788,46 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|
|
|
|
|
|
|
|
|
public void onClick$btnAdicionarObservacaoLog(Event event) throws InterruptedException {
|
|
|
|
|
try {
|
|
|
|
|
if(validarCamposObservacao()) {
|
|
|
|
|
if (validarCamposObservacao()) {
|
|
|
|
|
|
|
|
|
|
LogConferencia logConferencia = new LogConferencia();
|
|
|
|
|
logConferencia.setPreco(txtPrecoLog.getValueDecimal());
|
|
|
|
|
logConferencia.setObservacao(txtObservacaoLog.getValue());
|
|
|
|
|
logConferencia.setConferencia(conferencia);
|
|
|
|
|
logConferencia.setStatus(StatusLogConferencia.getStatusLogConferencia((Integer)cmbSituacaoLog.getSelectedItem().getValue()));
|
|
|
|
|
logConferencia.setStatus(StatusLogConferencia.getStatusLogConferencia((Integer) cmbSituacaoLog.getSelectedItem().getValue()));
|
|
|
|
|
logConferencia.setTipo(TipoLogConferencia.AVULSO);
|
|
|
|
|
logConferencia.setIndcredito(!rDebito.isChecked());
|
|
|
|
|
conferenciaComissaoService.suscribirLogConferencia(logConferencia);
|
|
|
|
|
|
|
|
|
|
carregarLogsConferencia();
|
|
|
|
|
|
|
|
|
|
Messagebox.show(Labels.getLabel("conferenciaController.msg.adicionarLogConferencia"),
|
|
|
|
|
Labels.getLabel("conferenciaController.window.title"),
|
|
|
|
|
Messagebox.OK,Messagebox.INFORMATION);
|
|
|
|
|
Messagebox.show(Labels.getLabel("conferenciaController.msg.adicionarLogConferencia"),
|
|
|
|
|
Labels.getLabel("conferenciaController.window.title"),
|
|
|
|
|
Messagebox.OK, Messagebox.INFORMATION);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.error(e.getMessage(), e);
|
|
|
|
|
Messagebox.show(Labels.getLabel("MSG.Error"),
|
|
|
|
|
Labels.getLabel("conferenciaController.window.title"),
|
|
|
|
|
Messagebox.OK,Messagebox.ERROR);
|
|
|
|
|
Messagebox.show(Labels.getLabel("MSG.Error"),
|
|
|
|
|
Labels.getLabel("conferenciaController.window.title"),
|
|
|
|
|
Messagebox.OK, Messagebox.ERROR);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private boolean validarCamposObservacao() throws InterruptedException {
|
|
|
|
|
try {
|
|
|
|
|
if(StringUtils.isBlank(txtObservacaoLog.getValue())) {
|
|
|
|
|
if (StringUtils.isBlank(txtObservacaoLog.getValue())) {
|
|
|
|
|
Messagebox.show(Labels.getLabel("conferenciaController.MSG.observacaoObrigatorio"),
|
|
|
|
|
Labels.getLabel("conferenciaController.window.title"),
|
|
|
|
|
Messagebox.OK,Messagebox.ERROR);
|
|
|
|
|
Messagebox.OK, Messagebox.ERROR);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
Messagebox.show(Labels.getLabel("conferenciaController.MSG.observacaoObrigatorio"),
|
|
|
|
|
Labels.getLabel("conferenciaController.window.title"),
|
|
|
|
|
Messagebox.OK,Messagebox.ERROR);
|
|
|
|
|
return false;
|
|
|
|
|
Messagebox.show(Labels.getLabel("conferenciaController.MSG.observacaoObrigatorio"),
|
|
|
|
|
Labels.getLabel("conferenciaController.window.title"),
|
|
|
|
|
Messagebox.OK, Messagebox.ERROR);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
@ -839,67 +846,67 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|
|
|
|
|
|
|
|
|
carregarDados();
|
|
|
|
|
|
|
|
|
|
Messagebox.show(Labels.getLabel("conferenciaController.msg.removerLogConferencia"),
|
|
|
|
|
Labels.getLabel("conferenciaController.window.title"),
|
|
|
|
|
Messagebox.OK,Messagebox.INFORMATION);
|
|
|
|
|
Messagebox.show(Labels.getLabel("conferenciaController.msg.removerLogConferencia"),
|
|
|
|
|
Labels.getLabel("conferenciaController.window.title"),
|
|
|
|
|
Messagebox.OK, Messagebox.INFORMATION);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.error(e.getMessage(), e);
|
|
|
|
|
Messagebox.show(Labels.getLabel("MSG.Error"),
|
|
|
|
|
Labels.getLabel("conferenciaController.window.title"),
|
|
|
|
|
Messagebox.OK,Messagebox.ERROR);
|
|
|
|
|
Messagebox.show(Labels.getLabel("MSG.Error"),
|
|
|
|
|
Labels.getLabel("conferenciaController.window.title"),
|
|
|
|
|
Messagebox.OK, Messagebox.ERROR);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void lancarLogConferenciaBilhete(BoletoComissao boletoComissao, MyListbox localBilhetesList) {
|
|
|
|
|
if (boletoComissao == null || isObservacaoLancada(boletoComissao) || isMovimentoEncerrado()) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map<String, Object> args = new HashMap<String, Object>();
|
|
|
|
|
args.put("boletoComissao", boletoComissao);
|
|
|
|
|
args.put("logsConferenciaList", logsConferenciaList);
|
|
|
|
|
args.put("bilhetesList", localBilhetesList);
|
|
|
|
|
args.put("conferencia", conferencia);
|
|
|
|
|
Map<String, Object> args = new HashMap<String, Object>();
|
|
|
|
|
args.put("boletoComissao", boletoComissao);
|
|
|
|
|
args.put("logsConferenciaList", logsConferenciaList);
|
|
|
|
|
args.put("bilhetesList", localBilhetesList);
|
|
|
|
|
args.put("conferencia", conferencia);
|
|
|
|
|
|
|
|
|
|
openWindow("/gui/comissao/editarLogConferenciaComissao.zul",
|
|
|
|
|
Labels.getLabel("editarLogConferenciaComissaoController.window.title"), args, MODAL);
|
|
|
|
|
}
|
|
|
|
|
openWindow("/gui/comissao/editarLogConferenciaComissao.zul",
|
|
|
|
|
Labels.getLabel("editarLogConferenciaComissaoController.window.title"), args, MODAL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void lancarLogConferenciaEventosFinanceiros(EventosFinanceirosVO eventosFinanceiros, MyListbox eventosFinanceirosList) {
|
|
|
|
|
if (eventosFinanceiros == null || isObservacaoLancada(eventosFinanceiros) || isMovimentoEncerrado()) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (eventosFinanceiros == null || isObservacaoLancada(eventosFinanceiros) || isMovimentoEncerrado()) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map<String, Object> args = new HashMap<String, Object>();
|
|
|
|
|
args.put("eventosFinanceiros", eventosFinanceiros);
|
|
|
|
|
args.put("logsConferenciaList", logsConferenciaList);
|
|
|
|
|
args.put("eventosFinanceirosList", eventosFinanceirosList);
|
|
|
|
|
args.put("conferencia", conferencia);
|
|
|
|
|
Map<String, Object> args = new HashMap<String, Object>();
|
|
|
|
|
args.put("eventosFinanceiros", eventosFinanceiros);
|
|
|
|
|
args.put("logsConferenciaList", logsConferenciaList);
|
|
|
|
|
args.put("eventosFinanceirosList", eventosFinanceirosList);
|
|
|
|
|
args.put("conferencia", conferencia);
|
|
|
|
|
|
|
|
|
|
openWindow("/gui/comissao/editarLogConferenciaComissao.zul",
|
|
|
|
|
Labels.getLabel("editarLogConferenciaComissaoController.window.title"), args, MODAL);
|
|
|
|
|
openWindow("/gui/comissao/editarLogConferenciaComissao.zul",
|
|
|
|
|
Labels.getLabel("editarLogConferenciaComissaoController.window.title"), args, MODAL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void lancarLogConferenciaOcd(OcdVO ocd, MyListbox ocdsList) {
|
|
|
|
|
if (ocd == null || isObservacaoLancada(ocd) || isMovimentoEncerrado()) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (ocd == null || isObservacaoLancada(ocd) || isMovimentoEncerrado()) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map<String, Object> args = new HashMap<String, Object>();
|
|
|
|
|
args.put("ocd", ocd);
|
|
|
|
|
args.put("logsConferenciaList", logsConferenciaList);
|
|
|
|
|
args.put("ocdsList", ocdsList);
|
|
|
|
|
args.put("conferencia", conferencia);
|
|
|
|
|
Map<String, Object> args = new HashMap<String, Object>();
|
|
|
|
|
args.put("ocd", ocd);
|
|
|
|
|
args.put("logsConferenciaList", logsConferenciaList);
|
|
|
|
|
args.put("ocdsList", ocdsList);
|
|
|
|
|
args.put("conferencia", conferencia);
|
|
|
|
|
|
|
|
|
|
openWindow("/gui/comissao/editarLogConferenciaComissao.zul",
|
|
|
|
|
Labels.getLabel("editarLogConferenciaComissaoController.window.title"), args, MODAL);
|
|
|
|
|
openWindow("/gui/comissao/editarLogConferenciaComissao.zul",
|
|
|
|
|
Labels.getLabel("editarLogConferenciaComissaoController.window.title"), args, MODAL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private boolean isObservacaoLancada(BoletoComissao boletoComissao) {
|
|
|
|
|
for (LogConferenciaVO logConferencia : lsLogsConferencia) {
|
|
|
|
|
if(boletoComissao.getBoletoId().equals(logConferencia.getBoletoId())) {
|
|
|
|
|
if (boletoComissao.getBoletoId().equals(logConferencia.getBoletoId())) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -908,7 +915,7 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|
|
|
|
|
|
|
|
|
private boolean isObservacaoLancada(EventosFinanceirosVO eventosFinanceiros) {
|
|
|
|
|
for (LogConferenciaVO logConferencia : lsLogsConferencia) {
|
|
|
|
|
if(eventosFinanceiros.getEventoextraId().equals(logConferencia.getEventoextraId())) {
|
|
|
|
|
if (eventosFinanceiros.getEventoextraId().equals(logConferencia.getEventoextraId())) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -917,7 +924,7 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|
|
|
|
|
|
|
|
|
private boolean isObservacaoLancada(OcdVO ocd) {
|
|
|
|
|
for (LogConferenciaVO logConferencia : lsLogsConferencia) {
|
|
|
|
|
if(ocd.getOcdId().equals(logConferencia.getOcdId())) {
|
|
|
|
|
if (ocd.getOcdId().equals(logConferencia.getOcdId())) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -927,9 +934,9 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|
|
|
|
private void carregarDadosConferencia() {
|
|
|
|
|
try {
|
|
|
|
|
DiaConferenciaComissaoVO diaConferenciaComissao = conferenciaComissaoService.carregarConferenciaRegistrada(conferencia.getDatamovimento(), conferencia.getEmpresa(), puntoventaFiltro);
|
|
|
|
|
if(diaConferenciaComissao != null) {
|
|
|
|
|
if (diaConferenciaComissao != null) {
|
|
|
|
|
for (DiaConferenciaComissaoVO diaConferenciaComissaoAux : conferenciaComissao.getDiasOrdenado()) {
|
|
|
|
|
if(diaConferenciaComissao.equals(diaConferenciaComissaoAux)) {
|
|
|
|
|
if (diaConferenciaComissao.equals(diaConferenciaComissaoAux)) {
|
|
|
|
|
diaConferenciaComissaoAux.setIndboletogerado(diaConferenciaComissao.getIndboletogerado());
|
|
|
|
|
diaConferenciaComissaoAux.setIndconferido(diaConferenciaComissao.getIndconferido());
|
|
|
|
|
diaConferenciaComissaoAux.setIndmaloterecebido(diaConferenciaComissao.getIndmaloterecebido());
|
|
|
|
@ -946,13 +953,9 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|
|
|
|
|
|
|
|
|
public void onClick$btnPesquisaBoletoDevolvido(Event event) throws InterruptedException {
|
|
|
|
|
try {
|
|
|
|
|
/* 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);
|
|
|
|
|
|
|
|
|
|
Map<BoletoStatusComissao, BigDecimal> totais = conferenciaComissaoService.totalizarBoletoComissaoDevolvidosTrocaOcd(lsBilhetesDevolvidos);
|
|
|
|
@ -1038,9 +1041,9 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|
|
|
|
validarOcds();
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.error(e.getMessage(), e);
|
|
|
|
|
Messagebox.show(Labels.getLabel("MSG.Error"),
|
|
|
|
|
Labels.getLabel("conferenciaController.window.title"),
|
|
|
|
|
Messagebox.OK,Messagebox.ERROR);
|
|
|
|
|
Messagebox.show(Labels.getLabel("MSG.Error"),
|
|
|
|
|
Labels.getLabel("conferenciaController.window.title"),
|
|
|
|
|
Messagebox.OK, Messagebox.ERROR);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1051,40 +1054,16 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void validarBilhetes() throws BusinessException {
|
|
|
|
|
/*validarListBilhetes(bilhetesManualList);
|
|
|
|
|
validarListBilhetes(bilhetesList);
|
|
|
|
|
validarListBilhetes(bilhetesCanceladosList);
|
|
|
|
|
validarListBilhetes(bilhetesDevolvidosList);
|
|
|
|
|
validarListBilhetes(bilhetesGapCanceladosList);
|
|
|
|
|
validarListBilhetes(bilhetesGapDevolvidosList);
|
|
|
|
|
validarListBilhetes(bilhetesGapList);*/
|
|
|
|
|
/*
|
|
|
|
|
* validarListBilhetes(bilhetesManualList); validarListBilhetes(bilhetesList); validarListBilhetes(bilhetesCanceladosList); validarListBilhetes(bilhetesDevolvidosList); validarListBilhetes(bilhetesGapCanceladosList); validarListBilhetes(bilhetesGapDevolvidosList); validarListBilhetes(bilhetesGapList);
|
|
|
|
|
*/
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*@SuppressWarnings("unchecked")
|
|
|
|
|
private void validarListBilhetes(MyListbox bilhetes) throws BusinessException {
|
|
|
|
|
int index = 0;
|
|
|
|
|
List<Listitem> itens = bilhetes.getItems();
|
|
|
|
|
List<BoletoComissao> boletoComissaos = bilhetes.getListData();
|
|
|
|
|
for (Listitem item: itens) {
|
|
|
|
|
BoletoComissao boletoComissao = boletoComissaos.get(index++);
|
|
|
|
|
boletoComissao.setConferido(validarListitemMarcado(item, boletoComissao));
|
|
|
|
|
if(boletoComissao.isConferido() && boletoComissao.getLogconferenciaId() == null) {
|
|
|
|
|
LogConferencia logConferencia = gravarLogConferencia(TipoLogConferencia.BOLETO, boletoComissao.getBoletoId(), boletoComissao.getNumFolioSistema());
|
|
|
|
|
boletoComissao.setLogconferenciaId(logConferencia.getLogconferenciaId());
|
|
|
|
|
boletoComissao.setStatus(logConferencia.getStatus().getValue());
|
|
|
|
|
boletoComissao.setConferido(Boolean.TRUE);
|
|
|
|
|
bilhetes.updateItem(boletoComissao);
|
|
|
|
|
} else if(!boletoComissao.isConferido() && boletoComissao.getLogconferenciaId() != null) {
|
|
|
|
|
LogConferencia logConferencia = conferenciaComissaoService.obtenerLogConferenciaID(boletoComissao.getLogconferenciaId());
|
|
|
|
|
conferenciaComissaoService.borrarLogConferencia(logConferencia);
|
|
|
|
|
boletoComissao.setLogconferenciaId(null);
|
|
|
|
|
boletoComissao.setStatus(null);
|
|
|
|
|
boletoComissao.setConferido(Boolean.FALSE);
|
|
|
|
|
removerLogConferencia(logConferencia);
|
|
|
|
|
bilhetes.updateItem(boletoComissao);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}*/
|
|
|
|
|
/*
|
|
|
|
|
* @SuppressWarnings("unchecked") private void validarListBilhetes(MyListbox bilhetes) throws BusinessException { int index = 0; List<Listitem> itens = bilhetes.getItems(); List<BoletoComissao> boletoComissaos = bilhetes.getListData(); for (Listitem item: itens) { BoletoComissao boletoComissao = boletoComissaos.get(index++); boletoComissao.setConferido(validarListitemMarcado(item, boletoComissao)); if(boletoComissao.isConferido() && boletoComissao.getLogconferenciaId() ==
|
|
|
|
|
* null) { LogConferencia logConferencia = gravarLogConferencia(TipoLogConferencia.BOLETO, boletoComissao.getBoletoId(), boletoComissao.getNumFolioSistema()); boletoComissao.setLogconferenciaId(logConferencia.getLogconferenciaId()); boletoComissao.setStatus(logConferencia.getStatus().getValue()); boletoComissao.setConferido(Boolean.TRUE); bilhetes.updateItem(boletoComissao); } else if(!boletoComissao.isConferido() && boletoComissao.getLogconferenciaId() != null) {
|
|
|
|
|
* LogConferencia logConferencia = conferenciaComissaoService.obtenerLogConferenciaID(boletoComissao.getLogconferenciaId()); conferenciaComissaoService.borrarLogConferencia(logConferencia); boletoComissao.setLogconferenciaId(null); boletoComissao.setStatus(null); boletoComissao.setConferido(Boolean.FALSE); removerLogConferencia(logConferencia); bilhetes.updateItem(boletoComissao); } } }
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
private void removerLogConferencia(Long logconferenciaId) {
|
|
|
|
|
LogConferenciaVO log = new LogConferenciaVO(logconferenciaId);
|
|
|
|
@ -1100,13 +1079,13 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|
|
|
|
logConferencia.setTipo(tipo);
|
|
|
|
|
logConferencia.setIndcredito(Boolean.TRUE);
|
|
|
|
|
|
|
|
|
|
if(tipo.equals(TipoLogConferencia.BOLETO)) {
|
|
|
|
|
if (tipo.equals(TipoLogConferencia.BOLETO)) {
|
|
|
|
|
logConferencia.setBoletoId(id);
|
|
|
|
|
}
|
|
|
|
|
if(tipo.equals(TipoLogConferencia.OCD)) {
|
|
|
|
|
if (tipo.equals(TipoLogConferencia.OCD)) {
|
|
|
|
|
logConferencia.setOcdId(id);
|
|
|
|
|
}
|
|
|
|
|
if(tipo.equals(TipoLogConferencia.EVENTO_FINANCEIRO)) {
|
|
|
|
|
if (tipo.equals(TipoLogConferencia.EVENTO_FINANCEIRO)) {
|
|
|
|
|
logConferencia.setEventoextraId(id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1133,29 +1112,12 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|
|
|
|
lsLogsConferencia.add(logConferenciaVO);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*@SuppressWarnings("unchecked")
|
|
|
|
|
private void addCheckboxEventListenerBilhetes(MyListbox bilhetes) {
|
|
|
|
|
int index = 0;
|
|
|
|
|
List<Listitem> itens = bilhetes.getItems();
|
|
|
|
|
List<BoletoComissao> boletoComissaos = bilhetes.getListData();
|
|
|
|
|
for (Listitem item: itens) {
|
|
|
|
|
List<Component> com = item.getChildren();
|
|
|
|
|
for (Component component: com) {
|
|
|
|
|
Listcell listCell = (Listcell) component;
|
|
|
|
|
System.out.println(listCell.getFirstChild());
|
|
|
|
|
if(listCell.getFirstChild() instanceof Checkbox) {
|
|
|
|
|
Checkbox chk = (Checkbox)component.getFirstChild();
|
|
|
|
|
chk.setId(boletoComissaos.get(index++).getBoletoId()+"");
|
|
|
|
|
chk.addEventListener("onCheck", new EventListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onEvent(Event arg0) throws Exception {
|
|
|
|
|
System.out.println("EXECUTOU");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}*/
|
|
|
|
|
/*
|
|
|
|
|
* @SuppressWarnings("unchecked") private void addCheckboxEventListenerBilhetes(MyListbox bilhetes) { int index = 0; List<Listitem> itens = bilhetes.getItems(); List<BoletoComissao> boletoComissaos = bilhetes.getListData(); for (Listitem item: itens) { List<Component> com = item.getChildren(); for (Component component: com) { Listcell listCell = (Listcell) component; System.out.println(listCell.getFirstChild()); if(listCell.getFirstChild() instanceof Checkbox) { Checkbox
|
|
|
|
|
* chk = (Checkbox)component.getFirstChild(); chk.setId(boletoComissaos.get(index++).getBoletoId()+""); chk.addEventListener("onCheck", new EventListener() {
|
|
|
|
|
*
|
|
|
|
|
* @Override public void onEvent(Event arg0) throws Exception { System.out.println("EXECUTOU"); } }); } } } }
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
private void gravarLogConferenciaBilhete(MyListbox bilhetes, BoletoComissao boletoComissao) {
|
|
|
|
|
try {
|
|
|
|
|