master
Gleison da Cruz 2022-12-19 11:58:13 -03:00
parent 1c28184b38
commit 87e0eafb64
12 changed files with 154 additions and 18 deletions

View File

@ -179,12 +179,12 @@ public class RelatorioBoletos extends Relatorio {
sql.append(" INNER JOIN empresa e ");
sql.append(" ON e.empresa_id = fcc.empresa_id ");
sql.append(" AND e.activo = 1 ");
sql.append(" WHERE fb.activo = 1 ");
sql.append(" INNER JOIN fechamento_paramptovta fppv ");
sql.append(" ON p.puntoventa_id = fppv.puntoventa_id ");
sql.append(" AND e.empresa_id = fppv.empresa_id ");
sql.append(" AND tipopagamento = 'B' ");
sql.append(" AND fppv.activo = 1 ");
sql.append(" WHERE fb.activo = 1 ");
if(fecInicio != null && fecFinal != null) {
sql.append(" AND fcc.fecfechamento BETWEEN :fecInicio AND :fecFinal ");

View File

@ -72,6 +72,7 @@ import com.rjconsultores.ventaboletos.entidad.ComEmpConferencia;
import com.rjconsultores.ventaboletos.entidad.ComEmpFormapago;
import com.rjconsultores.ventaboletos.entidad.ComEmpTipoEventoExtra;
import com.rjconsultores.ventaboletos.entidad.Empresa;
import com.rjconsultores.ventaboletos.entidad.EmpresaAdyenConfig;
import com.rjconsultores.ventaboletos.entidad.EmpresaContaBancaria;
import com.rjconsultores.ventaboletos.entidad.EmpresaEmail;
import com.rjconsultores.ventaboletos.entidad.EmpresaEmailConfig;
@ -91,6 +92,7 @@ import com.rjconsultores.ventaboletos.enums.TipoOperacaoECommerce;
import com.rjconsultores.ventaboletos.exception.BusinessException;
import com.rjconsultores.ventaboletos.service.CategoriaService;
import com.rjconsultores.ventaboletos.service.CiudadService;
import com.rjconsultores.ventaboletos.service.EmpresaAdyenConfigService;
import com.rjconsultores.ventaboletos.service.EmpresaEmailConfigService;
import com.rjconsultores.ventaboletos.service.EmpresaEmailEComerceService;
import com.rjconsultores.ventaboletos.service.EmpresaEmailFlexBusService;
@ -156,6 +158,8 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
private EmpresaEmailFlexBusService empresaEmailFlexBusService;
@Autowired
private EmpresaSaferConfigService empresaSaferConfigService;
@Autowired
private EmpresaAdyenConfigService empresaAdyenConfigService;
private Empresa empresa;
private EmpresaEmail empresaEmail;
@ -163,6 +167,7 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
private EmpresaEmailConfig empresaEmailConfig;
private EmpresaEmailFlexBus empresaEmailFlexBus;
private EmpresaSaferConfig empresaSaferConfig;
private EmpresaAdyenConfig empresaAdyenConfig;
private MyListbox empresaList;
private MyTextbox txtNome;
private MyTextbox txtCNPJ;
@ -182,6 +187,8 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
private Textbox textEmail;
private Checkbox chkAutenticacao;
private MyTextbox txtCodContPrevidencia;
private Textbox txtApiKeyAdyen;
private Radio indProducaoAdyenSim;
private MyComboboxEstandar cmbTipoAutorizacao;
//FlexBus
@ -417,6 +424,7 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
empresaEmail = empresaEmailService.buscarPorEmpresa(empresa);
empresaEmailConfig = empresaEmailConfigService.buscarPorEmpresa(empresa);
empresaSaferConfig = empresaSaferConfigService.buscarPorEmpresa(empresa);
empresaAdyenConfig = empresaAdyenConfigService.buscarPorEmpresa(empresa);
}
if (empresa != null && empresa.getEmpresaId() != null) {
@ -493,6 +501,17 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
mostrarAbaSafer();
if (empresaAdyenConfig != null) {
txtApiKeyAdyen.setText(empresaAdyenConfig.getApiKey());
if (empresaAdyenConfig.getIndProducao() == null) {
indProducaoAdyenSim.setChecked(Boolean.FALSE);
} else if (empresaAdyenConfig.getIndProducao()) {
indProducaoAdyenSim.setChecked(Boolean.TRUE);
} else {
indProducaoAdyenSim.setChecked(Boolean.FALSE);
}
}
if (empresa.getIndfechatarifa() == null) {
rdgFechaSalida.setChecked(Boolean.TRUE);
} else if (empresa.getIndfechatarifa()) {
@ -1034,6 +1053,19 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
empresaEmailEComerceService.actualizacion(empresaEmailEComerce);
}
if (empresaAdyenConfig == null) {
empresaAdyenConfig = new EmpresaAdyenConfig();
empresaAdyenConfig.setEmpresa(empresa);
empresaAdyenConfig.setApiKey(txtApiKeyAdyen.getValue());
empresaAdyenConfig.setIndProducao(indProducaoAdyenSim.isChecked());
empresaAdyenConfig = empresaAdyenConfigService.suscribir(empresaAdyenConfig);
} else {
empresaAdyenConfig.setEmpresa(empresa);
empresaAdyenConfig.setApiKey(txtApiKeyAdyen.getValue());
empresaAdyenConfig.setIndProducao(indProducaoAdyenSim.isChecked());
empresaAdyenConfigService.actualizacion(empresaAdyenConfig);
}
Messagebox.show(Labels.getLabel("editarEmpresaController.MSG.suscribirOK"),
Labels.getLabel("editarEmpresaController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);

View File

@ -98,6 +98,8 @@ public class EditarEstacionController extends MyGenericForwardComposer {
private Textbox txtNumPdv;
private Textbox txtSenhaConfig;
private Textbox txtOperadora;
private Textbox txtNumeroDeSerie;
private Textbox txtDescricao;
private List<Empresa> lsEmpresa;
private List<EstacionSitef> lsEstacionSitef;
private List<EstacionRioCard> lsEstacionRiocard;
@ -126,6 +128,11 @@ public class EditarEstacionController extends MyGenericForwardComposer {
private Listheader colunmNomeArquivoLayoutIternacional;
private Checkbox chkMapaViagemImpTermica;
private Row rowNumeroDeSerie;
private Row rowDescricao;
private Listheader colunmNumeroDeSerie;
private Listheader colunmDescricao;
public Estacion getEstacion() {
return estacion;
}
@ -448,7 +455,8 @@ public class EditarEstacionController extends MyGenericForwardComposer {
es.setTipoIntegracao(tipoIntegracaoTEF);
es.setCnpj(txtCnpjTef.getValue());
es.setSenhaConfig(txtSenhaConfig.getValue());
es.setNumeroDeSerie(txtNumeroDeSerie.getValue());
es.setDescricao(txtDescricao.getValue());
if (estacion.getPuntoVenta() == null){
Clients.alert(Labels.getLabel("editarEstacionController.MSG.sinPuntoVenta"), Labels.getLabel("editarEstacionController.window.title"), Messagebox.INFORMATION);
@ -837,4 +845,19 @@ public class EditarEstacionController extends MyGenericForwardComposer {
}
}
public void onChange$cmbIntegracaoTef(Event ev) {
TipoIntegracaoTEF tipoIntegracaoTEF = (TipoIntegracaoTEF) cmbIntegracaoTef.getSelectedItem().getValue();
if (tipoIntegracaoTEF != null && tipoIntegracaoTEF.equals(TipoIntegracaoTEF.ADYEN)) {
rowDescricao.setVisible(true);
rowNumeroDeSerie.setVisible(true);
colunmNumeroDeSerie.setVisible(true);
colunmDescricao.setVisible(true);
}else {
rowDescricao.setVisible(false);
rowNumeroDeSerie.setVisible(false);
colunmNumeroDeSerie.setVisible(false);
colunmDescricao.setVisible(false);
}
}
}

View File

@ -47,6 +47,8 @@ public class MyAppInit implements org.zkoss.zk.ui.util.WebAppInit {
private static final String HORA_EXEC_CONFERENCIA_MOVIMENTO = "HORA_EXEC_CONFERENCIA_MOVIMENTO";
private static final String HORA_EXEC_MONITORAMENTO_REDUCAOZ = "HORA_EXEC_MONITORAMENTO_REDUCAOZ";
private static final String HORA_INTEGRACAO_SAP = "HORA_INTEGRACAO_SAP";
final private static String AMBIENTE_DEV = "dev";
final private static String AMBIENTE_CONSULTA = "consulta";
private static Logger log = Logger.getLogger(MyAppInit.class);
SchedulerFactory schedFact = new StdSchedulerFactory();
Scheduler sched;
@ -97,9 +99,12 @@ public class MyAppInit implements org.zkoss.zk.ui.util.WebAppInit {
jobIntegracaoSap();
}
executeFlyway();
customToDatabase();
imageToDatabase();
String ambiente = System.getProperty("ambiente") ==null || System.getProperty("ambiente").isEmpty() ? "" : System.getProperty("ambiente");
if( !AMBIENTE_DEV.equals(ambiente.toLowerCase()) && !AMBIENTE_CONSULTA.equals(ambiente.toLowerCase()) ) {
executeFlyway();
customToDatabase();
imageToDatabase();
}
}
@ -160,17 +165,13 @@ public class MyAppInit implements org.zkoss.zk.ui.util.WebAppInit {
String ipConstanteExcepcion = constanteServidorException == null ? "" : constanteServidorException.getValorconstante();
String ipConstanteExclusivo = constanteServidorExclusivo == null ? "" : constanteServidorExclusivo.getValorconstante();
log.info(" IP Constante Excepcion: " + ipConstanteExcepcion);
log.info(" IP Constante Exclusivo: " + ipConstanteExclusivo);
if (StringUtils.isBlank(ipConstanteExclusivo) && StringUtils.isBlank(ipConstanteExcepcion)){
return false;
}
List<String> lsIps = getListIp();
if (StringUtils.isNotBlank(ipConstanteExclusivo)){
@ -189,7 +190,6 @@ public class MyAppInit implements org.zkoss.zk.ui.util.WebAppInit {
}
}
return false;
}
@ -244,7 +244,6 @@ public class MyAppInit implements org.zkoss.zk.ui.util.WebAppInit {
}
return arrayHoraMinuto;
}
private void jobGeneracionCorridas() {

View File

@ -49,6 +49,23 @@ public class EstacionSitefRender implements ListitemRenderer {
lc = new Listcell(es.getIpServidor());
lc.setParent(lstm);
lc = new Listcell(es.getSenhaConfig() != null ? es.getNumeroDeSerie().toString() : "");
lc.setParent(lstm);
lc = new Listcell(es.getSenhaConfig() != null ? es.getDescricao().toString() : "");
lc.setParent(lstm);
if(es.getNumeroDeSerie() != null) {
lc = new Listcell(es.getNumeroDeSerie());
lc.setParent(lstm);
}
if(es.getNumeroDeSerie() != null) {
lc = new Listcell(es.getDescricao());
lc.setParent(lstm);
}
lstm.setValue(es);
}
}

View File

@ -519,6 +519,8 @@
<value>com.rjconsultores.ventaboletos.entidad.PtovtaExcecaoMultaCanc</value>
<value>com.rjconsultores.ventaboletos.entidad.RedondeoOrgaoConcedente</value>
<value>com.rjconsultores.ventaboletos.entidad.HistoricoFormaPagoPuntoVenta</value>
<value>com.rjconsultores.ventaboletos.entidad.EmpresaAdyenConfig</value>
</list>
</property>

View File

@ -90,6 +90,7 @@ lb.btnPesquisa.label = Pesquisar
lb.btnLimpar.label = Limpar Seleção
lb.puntoVentaSelList.codigo = Código
lb.puntoVentaSelList.nome = Nome
lb.sigla = Currency
# Relatório
relatorio.lb.btnExecutarRelatorio = Executar Relatório
@ -1383,6 +1384,7 @@ editarFormaPagoController.lblSmartCard.label=SmartCard
editarFormaPagoController.lblLogpay.label=Logpay
editarFormaPagoController.lblTPI.label=TPI
editarFormaPagoController.lblMobiPix.label=MobiPix
editarFormaPagoController.lblAdyen.label=Adyen
editarFormaPagoController.lblAtivaProcessoEstorno.label=Ativa processo de estorno
editarFormaPagoController.lblVoucherRodoviaria.label=Voucher Rodoviária
editarFormaPagoController.lblTransferenciaReativacao.label=Utiliza na Transferência / Reativação
@ -1718,6 +1720,8 @@ editarEmpresaController.telefono.label = Telefone
editarEmpresaController.telefonoSACDef.label = SAC Deficiente Auditivo e de Fala
editarEmpresaController.restricaoZ.label= Restringe Venda se Red. Z não emitida
editarEmpresaController.utilizaFidelidade.label= Utiliza projeto fidelidade
editarEmpresaController.indProducao.label= Venda em Produção
editarEmpresaController.apiKey.label= API Key
editarEmpresaController.antiFraude.label = Antifraude
editarEmpresaController.antiFraude.chave.label = Chave Antifraude
editarEmpresaController.restricaoZ.sim=Sim
@ -1933,6 +1937,7 @@ editarEmpresaImpostoController.tributoEmissao.value = Tributa Emissão
editarEmpresaImpostoController.tributoViagem.value = Tributa Viagem
editarEmpresaController.lblSafer.value = Safer
editarEmpresaController.lblAdyen.value = Adyen
editarEmpresaController.lblCodigoSafer.value = Código do parceiro
editarEmpresaController.lblCodigoContratoSafer.value = Código do contrato
editarEmpresaController.lblInfoSafer.value = Informações Certificado
@ -5229,6 +5234,8 @@ editarEstacionController.numEmpresa.label=Cód. Empresa/Identificador do Usuári
editarEstacionController.numFilial.label=Cód. Filial
editarEstacionController.numPdv.label=Num. PDV/Ponto de Captura
editarEstacionController.txtIpServidor.value = Endereço TEF
editarEstacionController.txtSerie.value = Serie
editarEstacionController.txtDescricao.value = Descricao
editarEstacionController.txtTipoIntegracaoTef = Integração TEF
editarEstacionController.MSG.informarMACCompleto = Informe o MAC completo para filtro.
editarEstacionController.MSG.sinPuntoVenta = Ponto Venda obligatório

View File

@ -89,6 +89,7 @@ lb.btnPesquisa.label = Pesquisar
lb.btnLimpar.label = Limpar Seleção
lb.puntoVentaSelList.codigo = Código
lb.puntoVentaSelList.nome = Nome
lb.sigla = Sigla
# Reporte
relatorio.lb.btnExecutarRelatorio = Ejecutar reporte
@ -1205,6 +1206,7 @@ editarFormaPagoController.lblSmartCard.label=SmartCard
editarFormaPagoController.lblLogpay.label=Logpay
editarFormaPagoController.lblTPI.label=TPI
editarFormaPagoController.lblMobiPix.label=MobiPix
editarFormaPagoController.lblAdyen.label=Adyen
editarFormaPagoController.lblAtivaProcessoEstorno.label=Activa el proceso de contracargo
editarFormaPagoController.lblVoucherRodoviaria.label=Voucher Rodoviária
editarFormaPagoController.lblTransferenciaReativacao.label=Utiliza na Transferência / Reativação
@ -1514,6 +1516,8 @@ editarEmpresaController.telefono.label = Teléfono
editarEmpresaController.telefonoSACDef.label = SAC Deficiente Auditivo y de Habla
editarEmpresaController.restricaoZ.label= Restringe Venta se Red. Z no emitida
editarEmpresaController.utilizaFidelidade.label= Utiliza projeto fidelidade
editarEmpresaController.indProducao.label= Venda em Produção
editarEmpresaController.apiKey.label= API Key
editarEmpresaController.restricaoZ.sim=Si
editarEmpresaController.restricaoZ.nao=No
editarEmpresaController.generaNumfoliosistemaVtaInternetImp=Genera Folio Sistema Venta Internet e Impresión Posterior
@ -1710,6 +1714,7 @@ editarEmpresaImpostoController.tributoEmissao.value = Tributa Emissão
editarEmpresaImpostoController.tributoViagem.value = Tributa Viagem
editarEmpresaController.lblSafer.value = Safer
editarEmpresaController.lblAdyen.value = Adyen
editarEmpresaController.lblCodigoSafer.value = Código do parceiro
editarEmpresaController.lblCodigoContratoSafer.value = Código do contrato
editarEmpresaController.lblInfoSafer.value = Informações Certificado
@ -4903,6 +4908,8 @@ editarEstacionController.numEmpresa.label=Cód. Empresa/Identificador do Usuario
editarEstacionController.numFilial.label=Cód. Filial
editarEstacionController.numPdv.label=Num. PDV/Ponto de Captura
editarEstacionController.txtIpServidor.value = Dirección TEF
editarEstacionController.txtSerie.value = Serie
editarEstacionController.txtDescricao.value = Descricao
editarEstacionController.txtTipoIntegracaoTef = Integración TEF
editarEstacionController.MSG.informarMACCompleto = Informe o MAC completo para filtro.
editarEstacionController.MSG.sinPuntoVenta = Punto Venta obligatorio

View File

@ -90,6 +90,7 @@ lb.btnPesquisa.label = Pesquisar
lb.btnLimpar.label = Limpar Seleção
lb.puntoVentaSelList.codigo = Código
lb.puntoVentaSelList.nome = Nome
lb.sigla = Sigla
# Relatório
relatorio.lb.btnExecutarRelatorio = Executar Relatório
@ -1384,6 +1385,7 @@ editarFormaPagoController.lblSmartCard.label=SmartCard
editarFormaPagoController.lblLogpay.label=Logpay
editarFormaPagoController.lblTPI.label=TPI
editarFormaPagoController.lblMobiPix.label=MobiPix
editarFormaPagoController.lblAdyen.label=Adyen
editarFormaPagoController.lblAtivaProcessoEstorno.label=Ativa processo de estorno
editarFormaPagoController.lblVoucherRodoviaria.label=Voucher Rodoviária
editarFormaPagoController.lblTransferenciaReativacao.label=Utiliza na Transferência / Reativação
@ -1719,6 +1721,8 @@ editarEmpresaController.telefono.label = Telefone
editarEmpresaController.telefonoSACDef.label = SAC Deficiente Auditivo e de Fala
editarEmpresaController.restricaoZ.label= Restringe Venda se Red. Z não emitida
editarEmpresaController.utilizaFidelidade.label= Utiliza projeto fidelidade
editarEmpresaController.indProducao.label= Venda em Produção
editarEmpresaController.apiKey.label= API Key
editarEmpresaController.antiFraude.label = Antifraude
editarEmpresaController.antiFraude.chave.label = Chave Antifraude
editarEmpresaController.restricaoZ.sim=Sim
@ -1934,6 +1938,7 @@ editarEmpresaImpostoController.tributoEmissao.value = Tributa Emissão
editarEmpresaImpostoController.tributoViagem.value = Tributa Viagem
editarEmpresaController.lblSafer.value = Safer
editarEmpresaController.lblAdyen.value = Adyen
editarEmpresaController.lblCodigoSafer.value = Código do parceiro
editarEmpresaController.lblCodigoContratoSafer.value = Código do contrato
editarEmpresaController.lblInfoSafer.value = Informações Certificado
@ -5230,6 +5235,8 @@ editarEstacionController.numEmpresa.label=Cód. Empresa/Identificador do Usuári
editarEstacionController.numFilial.label=Cód. Filial
editarEstacionController.numPdv.label=Num. PDV/Ponto de Captura
editarEstacionController.txtIpServidor.value = Endereço TEF
editarEstacionController.txtSerie.value = Serie
editarEstacionController.txtDescricao.value = Descricao
editarEstacionController.txtTipoIntegracaoTef = Integração TEF
editarEstacionController.MSG.informarMACCompleto = Informe o MAC completo para filtro.
editarEstacionController.MSG.sinPuntoVenta = Ponto Venda obligatório

View File

@ -56,9 +56,10 @@
label="${c:l('editarEmpresaController.voucherPersonalizado.label')}" />
<tab
label="${c:l('editarEmpresaController.configuracaoFlexbus.label')}" />
<tab id="tabSafer" visible="false"
label="${c:l('editarEmpresaController.lblSafer.value')}" />
<tab id="tabAdyen"
label="${c:l('editarEmpresaController.lblAdyen.value')}" />
</tabs>
@ -2143,6 +2144,37 @@
</grid>
</tabpanel>
<tabpanel>
<grid fixedLayout="true">
<columns>
<column width="25%" />
<column width="75%" />
</columns>
<rows>
<row>
<label
value="${c:l('editarEmpresaController.indProducao.label')}" />
<radiogroup
id="indProducaoAdyen">
<radio
id="indProducaoAdyenSim"
label="${c:l('MSG.SI')}" />
<radio
id="indProducaoAdyenNao"
label="${c:l('MSG.NO')}"
checked="true" />
</radiogroup>
</row>
<row>
<label
value="${c:l('editarEmpresaController.apiKey.label')}" />
<textbox id="txtApiKeyAdyen" width="80%" maxlength="255"
value="@{winEditarEmpresa$composer.empresaAdyenConfig.apiKey}" />
</row>
</rows>
</grid>
</tabpanel>
</tabpanels>
</tabbox>

View File

@ -48,6 +48,12 @@
value="@{winEditarMoneda$composer.moneda.equivalenciaId}"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"/>
</row>
<row>
<label value="${c:l('lb.sigla')}"/>
<textbox id="txtSigla" width="50px" maxlength="3"
value="@{winEditarMoneda$composer.moneda.sigla}"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"/>
</row>
</rows>
</grid>
</window>

View File

@ -437,6 +437,10 @@
label="${c:l('busquedaEstacionController.nomeArquivoLayout.label')}" />
<listheader id="colunmNomeArquivoLayoutIternacional" image="/gui/img/create_doc.gif" visible="false"
label="${c:l('busquedaEstacionController.nomeArquivoLayoutInternacional.label')}" />
<listheader id="colunmNumeroDeSerie" image="/gui/img/create_doc.gif"
label="${c:l('editarEstacionController.txtSerie.value')}" />
<listheader id="colunmDescricao" image="/gui/img/create_doc.gif"
label="${c:l('editarEstacionController.txtDescricao.value')}" />
</listhead>
</listbox>
</tabpanel>