alexandre.lima 2017-10-24 17:12:39 +00:00
parent 03c5f9e41c
commit 803fc38897
1 changed files with 4 additions and 2 deletions

View File

@ -225,7 +225,8 @@ public class SisdapHibernateDAO implements SisdapDAO {
Boolean achou = Boolean.FALSE; Boolean achou = Boolean.FALSE;
if(isIda(ms)) { if(isIda(ms)) {
for (MovimentoSecoes ms2 : listResultConsulta) { for (MovimentoSecoes ms2 : listResultConsulta) {
if(ms.getLocalOrigem().equals(ms2.getLocalDestino()) && ms2.getLocalOrigem().equals(ms.getLocalDestino()) && !isIda(ms2) && ms2.getPrefixo().equals(ms.getPrefixo())) { if(ms != null && ms2 != null && ms.getLocalOrigem() != null && ms2.getLocalOrigem() != null &&
ms.getLocalOrigem().equals(ms2.getLocalDestino()) && ms2.getLocalOrigem().equals(ms.getLocalDestino()) && !isIda(ms2) && ms2.getPrefixo().equals(ms.getPrefixo())) {
ms.setDescontoIdosoVolta(ms2.getDescontoIdosoVolta()); ms.setDescontoIdosoVolta(ms2.getDescontoIdosoVolta());
ms.setGratuidadeIdosoVolta(ms2.getGratuidadeIdosoVolta()); ms.setGratuidadeIdosoVolta(ms2.getGratuidadeIdosoVolta());
ms.setDescontoIdosoIda(ms2.getDescontoIdosoIda()); ms.setDescontoIdosoIda(ms2.getDescontoIdosoIda());
@ -257,7 +258,8 @@ public class SisdapHibernateDAO implements SisdapDAO {
Boolean achou = Boolean.FALSE; Boolean achou = Boolean.FALSE;
for (MovimentoSecoes idaVolta : listResultIdaVoltaInvertida) { for (MovimentoSecoes idaVolta : listResultIdaVoltaInvertida) {
if(idaVolta.getLocalOrigem().equals(volta.getLocalDestino()) && volta.getLocalOrigem().equals(idaVolta.getLocalDestino()) && volta.getPrefixo().equals(idaVolta.getPrefixo())) { if(idaVolta != null && idaVolta.getLocalOrigem() != null && volta != null && volta.getLocalOrigem() != null && volta.getPrefixo() != null &&
idaVolta.getLocalOrigem().equals(volta.getLocalDestino()) && volta.getLocalOrigem().equals(idaVolta.getLocalDestino()) && volta.getPrefixo().equals(idaVolta.getPrefixo())) {
achou = Boolean.TRUE; achou = Boolean.TRUE;
} }
} }