From 4e232848826a8392a957921d672599857ffd4175 Mon Sep 17 00:00:00 2001 From: kleryton.diego Date: Wed, 29 Jun 2016 11:48:53 -0300 Subject: [PATCH] retirando os codigos para a atualizacao dos fontes --- Gcom/.classpath | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Gcom/.project | 18 ++++++++++++++++++ Gcom/gcom/WEB-INF/arrecadacao/.struts-config-GerarArquivoBancosCarteira17.xml.strutsdia | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Gcom/gcom/WEB-INF/arrecadacao/.struts-config-GerarMovimentoDebitoAutomaticoBanco.xml.strutsdia | 44 ++++++++++++++++++++++++++++++++++++++++++++ Gcom/gcom/WEB-INF/atendimentopublico/.struts-config-EfetuarInstalacaoSubstituicaoRetiradaHidrometroLote.xml.strutsdia | 27 +++++++++++++++++++++++++++ Gcom/gcom/WEB-INF/atendimentopublico/.struts-config-InformarTramiteSituacaoCobranca.xml.strutsdia | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Gcom/gcom/WEB-INF/atualizacaocadastral/.struts-config-GerarRoteiroDispositivoMovel.xml.strutsdia | 23 +++++++++++++++++++++++ Gcom/gcom/WEB-INF/cobranca/.struts-config-FiltrarRelatorioDividaAtiva.xml.strutsdia | 30 ++++++++++++++++++++++++++++++ Gcom/gcom/WEB-INF/faturamento/.struts-config-ManterContaComunicado.xml.strutsdia | 14 ++++++++++++++ Gcom/gcom/WEB-INF/micromedicao/.struts-config-ProcessarRequisicaoDispositivoMovelAtualizacaoCadastralAction.xml.strutsdia | 8 ++++++++ Gcom/gcom/WEB-INF/mobile/execucaoordemservico/.struts-config-ConsultarDadosArquivoTextoOSCobrancaSmartphone.xml.strutsdia | 168 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Gcom/gcom/WEB-INF/portal/caer/.struts-config-ExibirCanaisAtendimentoCaer.xml.strutsdia | 29 +++++++++++++++++++++++++++++ Gcom/gcom/WEB-INF/portal/caer/.struts-config-ExibirLojasAtendimentoPresencialPortalCaer.xml.strutsdia | 34 ++++++++++++++++++++++++++++++++++ Gcom/gcom/WEB-INF/portal/caer/.struts-config-ExibirServicosPortalCaer.xml.strutsdia | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Gcom/gcom/WEB-INF/portal/saae/.struts-config-EmitirSegundaViaContaPortalSaae.xml.strutsdia | 41 +++++++++++++++++++++++++++++++++++++++++ Gcom/gcom/WEB-INF/relatorio/arrecadacao/.struts-config-GerarRelatorioPagamentoEntidadesBeneficentes.xml.strutsdia | 32 ++++++++++++++++++++++++++++++++ Gcom/src/gcom/gui/cobranca/spcserasa/ExibirConsultarNegativadorMovimentoAction.java.bak | 150 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Gcom/src/gcom/gui/cobranca/spcserasa/ExibirConsultarNegativadorMovimentoDadosAction.java.bak | 354 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 18 files changed, 1275 insertions(+), 0 deletions(-) create mode 100644 Gcom/.classpath create mode 100644 Gcom/.project create mode 100644 Gcom/gcom/WEB-INF/arrecadacao/.struts-config-GerarArquivoBancosCarteira17.xml.strutsdia create mode 100644 Gcom/gcom/WEB-INF/arrecadacao/.struts-config-GerarMovimentoDebitoAutomaticoBanco.xml.strutsdia create mode 100644 Gcom/gcom/WEB-INF/atendimentopublico/.struts-config-EfetuarInstalacaoSubstituicaoRetiradaHidrometroLote.xml.strutsdia create mode 100644 Gcom/gcom/WEB-INF/atendimentopublico/.struts-config-InformarTramiteSituacaoCobranca.xml.strutsdia create mode 100644 Gcom/gcom/WEB-INF/atualizacaocadastral/.struts-config-GerarRoteiroDispositivoMovel.xml.strutsdia create mode 100644 Gcom/gcom/WEB-INF/cobranca/.struts-config-FiltrarRelatorioDividaAtiva.xml.strutsdia create mode 100644 Gcom/gcom/WEB-INF/faturamento/.struts-config-ManterContaComunicado.xml.strutsdia create mode 100644 Gcom/gcom/WEB-INF/micromedicao/.struts-config-ProcessarRequisicaoDispositivoMovelAtualizacaoCadastralAction.xml.strutsdia create mode 100644 Gcom/gcom/WEB-INF/mobile/execucaoordemservico/.struts-config-ConsultarDadosArquivoTextoOSCobrancaSmartphone.xml.strutsdia create mode 100644 Gcom/gcom/WEB-INF/portal/caer/.struts-config-ExibirCanaisAtendimentoCaer.xml.strutsdia create mode 100644 Gcom/gcom/WEB-INF/portal/caer/.struts-config-ExibirLojasAtendimentoPresencialPortalCaer.xml.strutsdia create mode 100644 Gcom/gcom/WEB-INF/portal/caer/.struts-config-ExibirServicosPortalCaer.xml.strutsdia create mode 100644 Gcom/gcom/WEB-INF/portal/saae/.struts-config-EmitirSegundaViaContaPortalSaae.xml.strutsdia create mode 100644 Gcom/gcom/WEB-INF/relatorio/arrecadacao/.struts-config-GerarRelatorioPagamentoEntidadesBeneficentes.xml.strutsdia create mode 100644 Gcom/src/gcom/gui/cobranca/spcserasa/ExibirConsultarNegativadorMovimentoAction.java.bak create mode 100644 Gcom/src/gcom/gui/cobranca/spcserasa/ExibirConsultarNegativadorMovimentoDadosAction.java.bak diff --git a/Gcom/.classpath b/Gcom/.classpath new file mode 100644 index 0000000..39ff59b --- /dev/null +++ b/Gcom/.classpath @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Gcom/.project b/Gcom/.project new file mode 100644 index 0000000..76d4465 --- /dev/null +++ b/Gcom/.project @@ -0,0 +1,18 @@ + + + Gcom + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.jdt.core.javanature + + diff --git a/Gcom/gcom/WEB-INF/arrecadacao/.struts-config-GerarArquivoBancosCarteira17.xml.strutsdia b/Gcom/gcom/WEB-INF/arrecadacao/.struts-config-GerarArquivoBancosCarteira17.xml.strutsdia new file mode 100644 index 0000000..31cba02 --- /dev/null +++ b/Gcom/gcom/WEB-INF/arrecadacao/.struts-config-GerarArquivoBancosCarteira17.xml.strutsdia @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Gcom/gcom/WEB-INF/arrecadacao/.struts-config-GerarMovimentoDebitoAutomaticoBanco.xml.strutsdia b/Gcom/gcom/WEB-INF/arrecadacao/.struts-config-GerarMovimentoDebitoAutomaticoBanco.xml.strutsdia new file mode 100644 index 0000000..b87464c --- /dev/null +++ b/Gcom/gcom/WEB-INF/arrecadacao/.struts-config-GerarMovimentoDebitoAutomaticoBanco.xml.strutsdia @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + diff --git a/Gcom/gcom/WEB-INF/atendimentopublico/.struts-config-EfetuarInstalacaoSubstituicaoRetiradaHidrometroLote.xml.strutsdia b/Gcom/gcom/WEB-INF/atendimentopublico/.struts-config-EfetuarInstalacaoSubstituicaoRetiradaHidrometroLote.xml.strutsdia new file mode 100644 index 0000000..9e0e54d --- /dev/null +++ b/Gcom/gcom/WEB-INF/atendimentopublico/.struts-config-EfetuarInstalacaoSubstituicaoRetiradaHidrometroLote.xml.strutsdia @@ -0,0 +1,27 @@ + + + + + + + + diff --git a/Gcom/gcom/WEB-INF/atendimentopublico/.struts-config-InformarTramiteSituacaoCobranca.xml.strutsdia b/Gcom/gcom/WEB-INF/atendimentopublico/.struts-config-InformarTramiteSituacaoCobranca.xml.strutsdia new file mode 100644 index 0000000..f16e896 --- /dev/null +++ b/Gcom/gcom/WEB-INF/atendimentopublico/.struts-config-InformarTramiteSituacaoCobranca.xml.strutsdia @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + diff --git a/Gcom/gcom/WEB-INF/atualizacaocadastral/.struts-config-GerarRoteiroDispositivoMovel.xml.strutsdia b/Gcom/gcom/WEB-INF/atualizacaocadastral/.struts-config-GerarRoteiroDispositivoMovel.xml.strutsdia new file mode 100644 index 0000000..c4a5348 --- /dev/null +++ b/Gcom/gcom/WEB-INF/atualizacaocadastral/.struts-config-GerarRoteiroDispositivoMovel.xml.strutsdia @@ -0,0 +1,23 @@ + + + + + + + + + + diff --git a/Gcom/gcom/WEB-INF/cobranca/.struts-config-FiltrarRelatorioDividaAtiva.xml.strutsdia b/Gcom/gcom/WEB-INF/cobranca/.struts-config-FiltrarRelatorioDividaAtiva.xml.strutsdia new file mode 100644 index 0000000..a2de0cc --- /dev/null +++ b/Gcom/gcom/WEB-INF/cobranca/.struts-config-FiltrarRelatorioDividaAtiva.xml.strutsdia @@ -0,0 +1,30 @@ + + + + + + + + + + + diff --git a/Gcom/gcom/WEB-INF/faturamento/.struts-config-ManterContaComunicado.xml.strutsdia b/Gcom/gcom/WEB-INF/faturamento/.struts-config-ManterContaComunicado.xml.strutsdia new file mode 100644 index 0000000..a411733 --- /dev/null +++ b/Gcom/gcom/WEB-INF/faturamento/.struts-config-ManterContaComunicado.xml.strutsdia @@ -0,0 +1,14 @@ + + + + + + + diff --git a/Gcom/gcom/WEB-INF/micromedicao/.struts-config-ProcessarRequisicaoDispositivoMovelAtualizacaoCadastralAction.xml.strutsdia b/Gcom/gcom/WEB-INF/micromedicao/.struts-config-ProcessarRequisicaoDispositivoMovelAtualizacaoCadastralAction.xml.strutsdia new file mode 100644 index 0000000..e31ffb9 --- /dev/null +++ b/Gcom/gcom/WEB-INF/micromedicao/.struts-config-ProcessarRequisicaoDispositivoMovelAtualizacaoCadastralAction.xml.strutsdia @@ -0,0 +1,8 @@ + + + + diff --git a/Gcom/gcom/WEB-INF/mobile/execucaoordemservico/.struts-config-ConsultarDadosArquivoTextoOSCobrancaSmartphone.xml.strutsdia b/Gcom/gcom/WEB-INF/mobile/execucaoordemservico/.struts-config-ConsultarDadosArquivoTextoOSCobrancaSmartphone.xml.strutsdia new file mode 100644 index 0000000..da77cb9 --- /dev/null +++ b/Gcom/gcom/WEB-INF/mobile/execucaoordemservico/.struts-config-ConsultarDadosArquivoTextoOSCobrancaSmartphone.xml.strutsdia @@ -0,0 +1,168 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Gcom/gcom/WEB-INF/portal/caer/.struts-config-ExibirCanaisAtendimentoCaer.xml.strutsdia b/Gcom/gcom/WEB-INF/portal/caer/.struts-config-ExibirCanaisAtendimentoCaer.xml.strutsdia new file mode 100644 index 0000000..6286918 --- /dev/null +++ b/Gcom/gcom/WEB-INF/portal/caer/.struts-config-ExibirCanaisAtendimentoCaer.xml.strutsdia @@ -0,0 +1,29 @@ + + + + + + + + + + + diff --git a/Gcom/gcom/WEB-INF/portal/caer/.struts-config-ExibirLojasAtendimentoPresencialPortalCaer.xml.strutsdia b/Gcom/gcom/WEB-INF/portal/caer/.struts-config-ExibirLojasAtendimentoPresencialPortalCaer.xml.strutsdia new file mode 100644 index 0000000..417d12b --- /dev/null +++ b/Gcom/gcom/WEB-INF/portal/caer/.struts-config-ExibirLojasAtendimentoPresencialPortalCaer.xml.strutsdia @@ -0,0 +1,34 @@ + + + + + + + + + + + diff --git a/Gcom/gcom/WEB-INF/portal/caer/.struts-config-ExibirServicosPortalCaer.xml.strutsdia b/Gcom/gcom/WEB-INF/portal/caer/.struts-config-ExibirServicosPortalCaer.xml.strutsdia new file mode 100644 index 0000000..a0d7957 --- /dev/null +++ b/Gcom/gcom/WEB-INF/portal/caer/.struts-config-ExibirServicosPortalCaer.xml.strutsdia @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Gcom/gcom/WEB-INF/portal/saae/.struts-config-EmitirSegundaViaContaPortalSaae.xml.strutsdia b/Gcom/gcom/WEB-INF/portal/saae/.struts-config-EmitirSegundaViaContaPortalSaae.xml.strutsdia new file mode 100644 index 0000000..f7375d5 --- /dev/null +++ b/Gcom/gcom/WEB-INF/portal/saae/.struts-config-EmitirSegundaViaContaPortalSaae.xml.strutsdia @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + diff --git a/Gcom/gcom/WEB-INF/relatorio/arrecadacao/.struts-config-GerarRelatorioPagamentoEntidadesBeneficentes.xml.strutsdia b/Gcom/gcom/WEB-INF/relatorio/arrecadacao/.struts-config-GerarRelatorioPagamentoEntidadesBeneficentes.xml.strutsdia new file mode 100644 index 0000000..6c45019 --- /dev/null +++ b/Gcom/gcom/WEB-INF/relatorio/arrecadacao/.struts-config-GerarRelatorioPagamentoEntidadesBeneficentes.xml.strutsdia @@ -0,0 +1,32 @@ + + + + + + + + + diff --git a/Gcom/src/gcom/gui/cobranca/spcserasa/ExibirConsultarNegativadorMovimentoAction.java.bak b/Gcom/src/gcom/gui/cobranca/spcserasa/ExibirConsultarNegativadorMovimentoAction.java.bak new file mode 100644 index 0000000..6161e09 --- /dev/null +++ b/Gcom/src/gcom/gui/cobranca/spcserasa/ExibirConsultarNegativadorMovimentoAction.java.bak @@ -0,0 +1,150 @@ +/* +* Copyright (C) 2007-2007 the GSAN - Sistema Integrado de Gestão de Serviços de Saneamento +* +* This file is part of GSAN, an integrated service management system for Sanitation +* +* GSAN is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License. +* +* GSAN is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +*/ + +/* +* GSAN - Sistema Integrado de Gestão de Serviços de Saneamento +* Copyright (C) <2007> +* Adriano Britto Siqueira +* Alexandre Santos Cabral +* Ana Carolina Alves Breda +* Ana Maria Andrade Cavalcante +* Aryed Lins de Araújo +* Bruno Leonardo Rodrigues Barros +* Carlos Elmano Rodrigues Ferreira +* Cláudio de Andrade Lira +* Denys Guimarães Guenes Tavares +* Eduardo Breckenfeld da Rosa Borges +* Fabíola Gomes de Araújo +* Flávio Leonardo Cavalcanti Cordeiro +* Francisco do Nascimento Júnior +* Homero Sampaio Cavalcanti +* Ivan Sérgio da Silva Júnior +* José Edmar de Siqueira +* José Thiago Tenório Lopes +* Kássia Regina Silvestre de Albuquerque +* Leonardo Luiz Vieira da Silva +* Márcio Roberto Batista da Silva +* Maria de Fátima Sampaio Leite +* Micaela Maria Coelho de Araújo +* Nelson Mendonça de Carvalho +* Newton Morais e Silva +* Pedro Alexandre Santos da Silva Filho +* Rafael Corrêa Lima e Silva +* Rafael Francisco Pinto +* Rafael Koury Monteiro +* Rafael Palermo de Araújo +* Raphael Veras Rossiter +* Roberto Sobreira Barbalho +* Rodrigo Avellar Silveira +* Rosana Carvalho Barbosa +* Sávio Luiz de Andrade Cavalcante +* Tai Mu Shih +* Thiago Augusto Souza do Nascimento +* Tiago Moreno Rodrigues +* Vivianne Barbosa Sousa +* Yara Taciane de Souza +* +* Este programa é software livre; você pode redistribuí-lo e/ou +* modificá-lo sob os termos de Licença Pública Geral GNU, conforme +* publicada pela Free Software Foundation; versão 2 da +* Licença. +* Este programa é distribuído na expectativa de ser útil, mas SEM +* QUALQUER GARANTIA; sem mesmo a garantia implícita de +* COMERCIALIZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM +* PARTICULAR. Consulte a Licença Pública Geral GNU para obter mais +* detalhes. +* Você deve ter recebido uma cópia da Licença Pública Geral GNU +* junto com este programa; se não, escreva para Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +* 02111-1307, USA. +*/ +package gcom.gui.cobranca.spcserasa; + +import gcom.fachada.Fachada; +import gcom.gui.ActionServletException; +import gcom.gui.GcomAction; +import gcom.spcserasa.bean.NegativadorMovimentoHelper; + +import java.util.Collection; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; + +/** + * Action de exibir o resultado do filtro do Negativador Movimento + * @author Yara Taciane de Souza + * @created 21/01/2008 + */ + +public class ExibirConsultarNegativadorMovimentoAction extends GcomAction { + + public ActionForward execute(ActionMapping actionMapping, + ActionForm actionForm, HttpServletRequest httpServletRequest, + HttpServletResponse httpServletResponse) { + + + ActionForward retorno = actionMapping.findForward("consultarNegativadorMovimento"); + HttpSession sessao = httpServletRequest.getSession(false); + + NegativadorMovimentoHelper negativadorMovimentoHelper = null; + +// Verifica se o filtro foi informado pela página de filtragem do Negativador + if (sessao.getAttribute("negativadorMovimentoHelper") != null) { + negativadorMovimentoHelper = (NegativadorMovimentoHelper) sessao.getAttribute("negativadorMovimentoHelper"); + } + + Collection collectionNegativadorMovimento = Fachada.getInstancia().pesquisarNegativadorMovimento(negativadorMovimentoHelper); + + +// [FS0004] Nenhum registro encontrado + if (collectionNegativadorMovimento == null || collectionNegativadorMovimento.isEmpty()) { + // Nenhuma Contrato Negativador cadastrado + throw new ActionServletException( + "atencao.pesquisa.nenhumresultado"); + } + + + +// 1º Passo - Pegar o total de registros através de um count da consulta que aparecerá na tela + Integer totalRegistros = new Integer(collectionNegativadorMovimento.size()); + + // 2º Passo - Chamar a função de Paginação passando o total de registros + retorno = this.controlarPaginacao(httpServletRequest, retorno, totalRegistros); + + // 3º Passo - Obter a coleção da consulta que aparecerá na tela passando o numero de paginas + // da pesquisa que está no request + + collectionNegativadorMovimento = Fachada.getInstancia().pesquisarNegativadorMovimento(negativadorMovimentoHelper,(Integer) httpServletRequest + .getAttribute("numeroPaginasPesquisa")); + + sessao.setAttribute("collectionNegativadorMovimento", collectionNegativadorMovimento); + + sessao.setAttribute("negativadorMovimentoHelper", negativadorMovimentoHelper); + + + return retorno; + + } + +} \ No newline at end of file diff --git a/Gcom/src/gcom/gui/cobranca/spcserasa/ExibirConsultarNegativadorMovimentoDadosAction.java.bak b/Gcom/src/gcom/gui/cobranca/spcserasa/ExibirConsultarNegativadorMovimentoDadosAction.java.bak new file mode 100644 index 0000000..dfed4be --- /dev/null +++ b/Gcom/src/gcom/gui/cobranca/spcserasa/ExibirConsultarNegativadorMovimentoDadosAction.java.bak @@ -0,0 +1,354 @@ +/* + * Copyright (C) 2007-2007 the GSAN - Sistema Integrado de Gestão de Serviços de Saneamento + * + * This file is part of GSAN, an integrated service management system for Sanitation + * + * GSAN is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License. + * + * GSAN is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + */ + +/* + * GSAN - Sistema Integrado de Gestão de Serviços de Saneamento + * Copyright (C) <2007> + * Adriano Britto Siqueira + * Alexandre Santos Cabral + * Ana Carolina Alves Breda + * Ana Maria Andrade Cavalcante + * Aryed Lins de Araújo + * Bruno Leonardo Rodrigues Barros + * Carlos Elmano Rodrigues Ferreira + * Cláudio de Andrade Lira + * Denys Guimarães Guenes Tavares + * Eduardo Breckenfeld da Rosa Borges + * Fabíola Gomes de Araújo + * Flávio Leonardo Cavalcanti Cordeiro + * Francisco do Nascimento Júnior + * Homero Sampaio Cavalcanti + * Ivan Sérgio da Silva Júnior + * José Edmar de Siqueira + * José Thiago Tenório Lopes + * Kássia Regina Silvestre de Albuquerque + * Leonardo Luiz Vieira da Silva + * Márcio Roberto Batista da Silva + * Maria de Fátima Sampaio Leite + * Micaela Maria Coelho de Araújo + * Nelson Mendonça de Carvalho + * Newton Morais e Silva + * Pedro Alexandre Santos da Silva Filho + * Rafael Corrêa Lima e Silva + * Rafael Francisco Pinto + * Rafael Koury Monteiro + * Rafael Palermo de Araújo + * Raphael Veras Rossiter + * Roberto Sobreira Barbalho + * Rodrigo Avellar Silveira + * Rosana Carvalho Barbosa + * Sávio Luiz de Andrade Cavalcante + * Tai Mu Shih + * Thiago Augusto Souza do Nascimento + * Tiago Moreno Rodrigues + * Vivianne Barbosa Sousa + * Yara Taciane de Souza + * + * Este programa é software livre; você pode redistribuí-lo e/ou + * modificá-lo sob os termos de Licença Pública Geral GNU, conforme + * publicada pela Free Software Foundation; versão 2 da + * Licença. + * Este programa é distribuído na expectativa de ser útil, mas SEM + * QUALQUER GARANTIA; sem mesmo a garantia implícita de + * COMERCIALIZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM + * PARTICULAR. Consulte a Licença Pública Geral GNU para obter mais + * detalhes. + * Você deve ter recebido uma cópia da Licença Pública Geral GNU + * junto com este programa; se não, escreva para Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + * 02111-1307, USA. + */ +package gcom.gui.cobranca.spcserasa; + +import gcom.cobranca.FiltroNegativadorRegistroTipo; +import gcom.cobranca.NegativadorMovimento; +import gcom.fachada.Fachada; +import gcom.gui.GcomAction; +import gcom.spcserasa.FiltroNegativadorMovimento; +import gcom.spcserasa.bean.NegativadorMovimentoHelper; +import gcom.util.Util; +import gcom.util.filtro.ParametroSimples; + +import java.util.Collection; +import java.util.Date; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; + +/** + * Action de Exibir Atualizar Negativador Registro Tipo + * + * @author Yara Taciane + * @created 08/01/2008 + */ + +public class ExibirConsultarNegativadorMovimentoDadosAction extends GcomAction { + + public ActionForward execute(ActionMapping actionMapping, + ActionForm actionForm, HttpServletRequest httpServletRequest, + HttpServletResponse httpServletResponse) { + + // Inicializando Variaveis + ActionForward retorno = actionMapping.findForward("consultarNegativadorMovimentoDados"); + + ConsultarNegativadorMovimentoActionForm consultarNegativadorMovimentoActionForm = (ConsultarNegativadorMovimentoActionForm) actionForm; + Fachada fachada = Fachada.getInstancia(); + HttpSession sessao = httpServletRequest.getSession(false); + + // volta da msg de Negativador Exclusao Motivo já utilizado, não pode ser + // alterado nem excluído. + String confirmado = httpServletRequest.getParameter("confirmado"); + + String idNegativadorMovimento = null; + if (httpServletRequest.getParameter("reload") == null + || httpServletRequest.getParameter("reload").equalsIgnoreCase( + "") && (confirmado == null || confirmado.equals(""))) { + // Recupera o id do Negativador Motivo que vai ser atualizado + + if (httpServletRequest.getParameter("idRegistroInseridoAtualizar") != null) { + idNegativadorMovimento = httpServletRequest.getParameter("idRegistroInseridoAtualizar"); + httpServletRequest.setAttribute("voltar", "filtrar"); + sessao.setAttribute("idRegistroAtualizacao",idNegativadorMovimento); + + } else if (httpServletRequest.getParameter("idRegistroAtualizacao") == null) { + idNegativadorMovimento = (String) sessao.getAttribute("idRegistroAtualizacao"); + httpServletRequest.setAttribute("voltar", "filtrar"); + + } else if (httpServletRequest.getParameter("idRegistroAtualizacao") != null) { + idNegativadorMovimento = httpServletRequest.getParameter("idRegistroAtualizacao"); + httpServletRequest.setAttribute("voltar", "manter"); + sessao.setAttribute("idRegistroAtualizacao",idNegativadorMovimento); + } + } else { + idNegativadorMovimento = (String) sessao.getAttribute("idRegistroAtualizacao"); + } + + // Verifica se o usuário está selecionando o Negativador da + // página de manter + // Caso contrário o usuário está teclando enter na página de atualizar + if ((idNegativadorMovimento != null && !idNegativadorMovimento.equals("")) + && (httpServletRequest.getParameter("desfazer") == null) + && (httpServletRequest.getParameter("reload") == null || httpServletRequest + .getParameter("reload").equalsIgnoreCase(""))) { + exibirNegativadorMovimento(idNegativadorMovimento, + consultarNegativadorMovimentoActionForm, fachada, sessao, + httpServletRequest, retorno); + + } + Integer idNegativadorMov = Integer.parseInt(idNegativadorMovimento); + + NegativadorMovimentoHelper negativadorMovimentoHelper = null; + +// Verifica se o filtro foi informado pela página de filtragem do Negativador + if (sessao.getAttribute("negativadorMovimentoHelper") != null) { + negativadorMovimentoHelper = ((NegativadorMovimentoHelper) sessao.getAttribute("negativadorMovimentoHelper")).clone(); + negativadorMovimentoHelper.setIdNegativadorMovimento(idNegativadorMov); + + } + + + NegativadorMovimento nm = (NegativadorMovimento) sessao.getAttribute("negativadorMovimento"); + + if (consultarNegativadorMovimentoActionForm.getIdNegativador() == null || "".equals(consultarNegativadorMovimentoActionForm.getIdNegativador())){ + + if(nm!= null && nm.getNegativador()!= null){ + + Integer idNegativador = nm.getNegativador().getId(); + negativadorMovimentoHelper.setIdNegativador(idNegativador); + } + + } + + + + Collection collNegativadorMovimentoReg = fachada.pesquisarNegativadorMovimentoRegistroAceito(negativadorMovimentoHelper); + + if (!collNegativadorMovimentoReg.isEmpty()){ +// 1º Passo - Pegar o total de registros através de um count da consulta que aparecerá na tela + Integer totalRegistros = new Integer(collNegativadorMovimentoReg.size()); + + // 2º Passo - Chamar a função de Paginação passando o total de registros + retorno = this.controlarPaginacao(httpServletRequest, retorno, totalRegistros); + + // 3º Passo - Obter a coleção da consulta que aparecerá na tela passando o numero de paginas + // da pesquisa que está no request + + collNegativadorMovimentoReg = Fachada.getInstancia().pesquisarNegativadorMovimentoRegistroAceito(negativadorMovimentoHelper,(Integer) httpServletRequest + .getAttribute("numeroPaginasPesquisa")); + + sessao.setAttribute("collNegativadorMovimentoReg", collNegativadorMovimentoReg); + } + + + return retorno; + + } + + private void exibirNegativadorMovimento( + String idNegativadorMovimento, + ConsultarNegativadorMovimentoActionForm consultarNegativadorMovimentoActionForm, + Fachada fachada, HttpSession sessao, + HttpServletRequest httpServletRequest, + ActionForward retorno) { + + Integer idNegativadorMov = Integer.parseInt(idNegativadorMovimento); + + // Cria a variável que vai armazenar o negativador registro tipo para ser + // atualizado + NegativadorMovimento negativadorMovimento = null; + + + // Cria o filtro de NegativadorMovimento e seta o id do + // NegativadorMovimento para ser atualizado no filtro + // e indica quais objetos devem ser retornados pela pesquisa + + FiltroNegativadorMovimento filtroNegativadorMovimento = new FiltroNegativadorMovimento(); + filtroNegativadorMovimento.adicionarParametro(new ParametroSimples( + FiltroNegativadorRegistroTipo.ID, idNegativadorMovimento)); + + filtroNegativadorMovimento.adicionarCaminhoParaCarregamentoEntidade("negativador"); + filtroNegativadorMovimento.adicionarCaminhoParaCarregamentoEntidade("negativador.cliente"); + + Collection collectionNegativadorMovimento = fachada + .pesquisar(filtroNegativadorMovimento, NegativadorMovimento.class + .getName()); + + + + + // Caso a pesquisa tenha retornado o NegativadorMovimento + if (collectionNegativadorMovimento != null + && !collectionNegativadorMovimento.isEmpty()) { + + // Recupera da coleção o NegativadorMovimento que vai ser atualizado + negativadorMovimento = (NegativadorMovimento) Util + .retonarObjetoDeColecao(collectionNegativadorMovimento); + + + // Seta no form os dados de NegativadorMovimento + + if(negativadorMovimento.getNegativador()!= null && negativadorMovimento.getNegativador().getCliente()!= null){ + consultarNegativadorMovimentoActionForm.setNegativador(negativadorMovimento.getNegativador().getCliente().getNome()); + }else{ + consultarNegativadorMovimentoActionForm.setNegativador(""); + } + + if (negativadorMovimento.getNumeroSequencialEnvio() != null + && !negativadorMovimento.getNumeroSequencialEnvio().equals("")) { + + consultarNegativadorMovimentoActionForm.setNumeroSequencialEnvio("" + + negativadorMovimento.getNumeroSequencialEnvio()); + } else { + consultarNegativadorMovimentoActionForm + .setNumeroSequencialEnvio(""); + } + + + if (negativadorMovimento.getCodigoMovimento() != -1) { + + consultarNegativadorMovimentoActionForm.setCodigoMovimento("" + + negativadorMovimento.getCodigoMovimento()); + } else { + consultarNegativadorMovimentoActionForm + .setCodigoMovimento(""); + } + + if (negativadorMovimento.getCodigoMovimento() != -1) { + + consultarNegativadorMovimentoActionForm.setCodigoMovimento("" + + negativadorMovimento.getCodigoMovimento()); + } else { + consultarNegativadorMovimentoActionForm + .setCodigoMovimento(""); + } + + if (negativadorMovimento.getNumeroRegistrosEnvio() != null && !negativadorMovimento.getNumeroRegistrosEnvio().equals("")) { + + consultarNegativadorMovimentoActionForm.setNumeroRegistrosEnvio("" + + negativadorMovimento.getNumeroRegistrosEnvio()); + } else { + consultarNegativadorMovimentoActionForm + .setNumeroRegistrosEnvio(""); + } + + if (negativadorMovimento.getValorTotalEnvio() != null && !negativadorMovimento.getValorTotalEnvio().equals("")) { + + consultarNegativadorMovimentoActionForm.setValorTotalEnvio("" + + negativadorMovimento.getValorTotalEnvio()); + } else { + consultarNegativadorMovimentoActionForm + .setValorTotalEnvio(""); + } + + + if (negativadorMovimento.getDataProcessamentoEnvio() != null + && !negativadorMovimento.getDataProcessamentoEnvio() + .equals("")) { + + Date dataEnvio = Util.formatarDataSemHora(negativadorMovimento.getDataProcessamentoEnvio()); + consultarNegativadorMovimentoActionForm.setDataEnvio(Util.formatarData(dataEnvio)); + + String horaEnvio = Util.formatarHoraSemData(negativadorMovimento.getDataProcessamentoEnvio()); + consultarNegativadorMovimentoActionForm.setHoraEnvio(horaEnvio); + } else { + consultarNegativadorMovimentoActionForm.setDataEnvio(""); + consultarNegativadorMovimentoActionForm.setHoraEnvio(""); + } + + + if(negativadorMovimento.getNumeroRegistrosRetorno() != null && !negativadorMovimento.getNumeroRegistrosRetorno().equals("")){ + consultarNegativadorMovimentoActionForm.setSituacaoMovimento("Com Retorno"); + }else{ + consultarNegativadorMovimentoActionForm.setSituacaoMovimento("Sem Retorno"); + } + + //total de registros aceitos + Integer totalRegistrosAceitos= fachada.verificarTotalRegistrosAceitos(idNegativadorMov); + consultarNegativadorMovimentoActionForm.setTotalRegistrosAceitos(totalRegistrosAceitos.toString()); + + + if (negativadorMovimento.getDataProcessamentoRetorno() != null + && !negativadorMovimento.getDataProcessamentoRetorno() + .equals("")) { + + Date dataRetorno = Util + .formatarDataSemHora(negativadorMovimento + .getDataProcessamentoRetorno()); + consultarNegativadorMovimentoActionForm.setDataRetorno(Util + .formatarData(dataRetorno)); + + String horaRetorno = Util + .formatarHoraSemData(negativadorMovimento + .getDataProcessamentoRetorno()); + consultarNegativadorMovimentoActionForm + .setHoraRetorno(horaRetorno); + } else { + consultarNegativadorMovimentoActionForm.setDataRetorno(""); + consultarNegativadorMovimentoActionForm.setHoraRetorno(""); + } + + sessao.setAttribute("negativadorMovimento", negativadorMovimento); + } + } +} \ No newline at end of file -- libgit2 0.21.2