fixes bug#9119
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@69592 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
a3b0a4db98
commit
3f8417a026
|
@ -7,6 +7,7 @@ import java.sql.Connection;
|
|||
import javax.activation.MimetypesFileTypeMap;
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
|
@ -17,10 +18,13 @@ import org.zkoss.zk.ui.Component;
|
|||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zul.Datebox;
|
||||
import org.zkoss.zul.Filedownload;
|
||||
import org.zkoss.zul.Textbox;
|
||||
|
||||
import com.rjconsultores.integracaoreceitadespesa.BGMApplication;
|
||||
import com.rjconsultores.ventaboletos.entidad.Constante;
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||
import com.rjconsultores.ventaboletos.service.ConstanteService;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEmpresa;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
|
@ -36,6 +40,10 @@ public class RelatorioArquivoBGMController extends MyGenericForwardComposer {
|
|||
private MyComboboxPuntoVenta cmbPuntoVenta;
|
||||
private Datebox datInicial;
|
||||
private Datebox datFinal;
|
||||
private Textbox txtArquivo;
|
||||
|
||||
@Autowired
|
||||
private ConstanteService constanteService;
|
||||
|
||||
@Autowired
|
||||
private DataSource dataSource;
|
||||
|
@ -44,6 +52,13 @@ public class RelatorioArquivoBGMController extends MyGenericForwardComposer {
|
|||
public void doAfterCompose(Component comp) throws Exception {
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
String pathExternoGravacaoArquivo = this.getPathExternoGravacaoArquivo();
|
||||
|
||||
if (StringUtils.isNotBlank(pathExternoGravacaoArquivo)){
|
||||
txtArquivo.setText(pathExternoGravacaoArquivo);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void onClick$btnExecutarRelatorio(Event ev) throws Exception {
|
||||
|
@ -72,7 +87,7 @@ public class RelatorioArquivoBGMController extends MyGenericForwardComposer {
|
|||
Integer empresaId = ((Empresa)cmbEmpresa.getSelectedItem().getValue()).getEmpresaId();
|
||||
Connection con = dataSource.getConnection();
|
||||
String fileZip = BGMApplication.getInstance().executaExportacao(datInicial.getValue(), datFinal.getValue(),
|
||||
System.getProperty("jboss.server.log.dir") , empresaId, puntoVentaId, con);
|
||||
System.getProperty("jboss.server.log.dir") , empresaId, puntoVentaId, con,this.getPathExternoGravacaoArquivo());
|
||||
|
||||
try{
|
||||
FileInputStream inputStream;
|
||||
|
@ -90,7 +105,14 @@ public class RelatorioArquivoBGMController extends MyGenericForwardComposer {
|
|||
}
|
||||
}
|
||||
|
||||
private String getPathExternoGravacaoArquivo(){
|
||||
Constante path = constanteService.buscarPorNomeConstante("LOCALIZACAO_ARQUIVO_BGM");
|
||||
if (path == null){
|
||||
return null;
|
||||
}
|
||||
|
||||
return path.getValorconstante();
|
||||
}
|
||||
|
||||
public MyComboboxEmpresa getCmbEmpresa() {
|
||||
return cmbEmpresa;
|
||||
|
|
|
@ -6814,6 +6814,7 @@ relatorioArquivoBGMController.lbEmpresa.value = Empresa
|
|||
relatorioArquivoBGMController.lbPuntoVenta.value = Agencia
|
||||
relatorioArquivoBGMController.msg.erro.puntoventa = El Campo Agencia es Obligatório!
|
||||
relatorioArquivoBGMController.msg.erro.empresa = El Campo Empresa es Obligatório!
|
||||
relatorioArquivoBGMController.txtArquivo.value=Carpeta Servidor
|
||||
|
||||
# Recebimento Malote
|
||||
recebimentoMaloteController.window.title = Recibimento Malote
|
||||
|
|
|
@ -7010,6 +7010,7 @@ relatorioArquivoBGMController.lbEmpresa.value = Empresa
|
|||
relatorioArquivoBGMController.lbPuntoVenta.value = Agência
|
||||
relatorioArquivoBGMController.msg.erro.puntoventa = O Campo Agência é obrigatório!
|
||||
relatorioArquivoBGMController.msg.erro.empresa = O Campo Empresa é obrigatório!
|
||||
relatorioArquivoBGMController.txtArquivo.value=Local Arq. Servidor
|
||||
|
||||
# Recebimento Malote
|
||||
recebimentoMaloteController.window.title = Recebimento Malote
|
||||
|
|
|
@ -46,6 +46,12 @@
|
|||
mold="rounded" buttonVisible="true" constraint="no empty"
|
||||
width="70%" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('relatorioArquivoBGMController.txtArquivo.value')}" />
|
||||
|
||||
<textbox id="txtArquivo" disabled="true"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<toolbar>
|
||||
|
|
Loading…
Reference in New Issue