Skip to content

Commit

Permalink
Versão 1.04
Browse files Browse the repository at this point in the history
Arrumado alguns bugs, adicionado novas funcionalidades.
  • Loading branch information
pedrohlira committed Jan 13, 2014
1 parent 6970e08 commit cea0779
Show file tree
Hide file tree
Showing 104 changed files with 996 additions and 968 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@
/dist/
/src/META-INF/private.key
/teste.h2.db
/teste.trace.db
/teste.trace.db
/arquivos/modelo/mfd.txt
/arquivos/modelo/leitura.txt
/arquivos/modelo/rodape.txt
/arquivos/modelo/cabecalho.txt
Binary file added arquivos/importar/.DS_Store
Binary file not shown.
7 changes: 6 additions & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
<mkdir dir="${dist.jar.dir}/arquivos/exportar"/>
<mkdir dir="${dist.jar.dir}/arquivos/importar"/>
<mkdir dir="${dist.jar.dir}/arquivos/cat52"/>
<mkdir dir="${dist.jar.dir}/arquivos/modelo"/>
<mkdir dir="${dist.jar.dir}/db"/>
<mkdir dir="${dist.jar.dir}/dlls"/>
<mkdir dir="${dist.jar.dir}/logs"/>
Expand All @@ -93,7 +94,7 @@
</copy>

<copy todir="${dist.jar.dir}/conf">
<fileset dir="conf" includes="**" excludes="auxiliar.properties"/>
<fileset dir="conf" includes="**" excludes="auxiliar.properties,chave_privada.pcks8,chave_privada.rsa,modulos.key"/>
</copy>

<copy todir="${dist.jar.dir}/nfe">
Expand All @@ -103,6 +104,10 @@
<copy todir="${dist.jar.dir}/ACBrMonitor">
<fileset dir="ACBrMonitor" includes="**"/>
</copy>

<copy todir="${dist.jar.dir}/arquivos/modelo">
<fileset dir="arquivos/modelo" includes="**"/>
</copy>

<delete file="${dist.jar.dir}/README.TXT"/>
</target>
Expand Down
2 changes: 1 addition & 1 deletion conf/auxiliar.bak
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ozkd2dkMpGQ5e9FC5YjhKh+DZHnJsW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ition & 1 deletion conf/auxiliar.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
QQ0K92tjU6qHypGJq3iyIXOkKfV74/tFSmQ35/4X6V1G2Sw+8/bXIjH4LbMqmdExwB3aXnL3bMkjm8kn7Ns5a6DYtmZEWL0FNcM8v4Elx1iC51BKYj7ML0OKuAc1LOfsFfJzHaICQJAS0TBW8NifYeJtSRz1kYiQqFXgomWfJwqDbuz1kdXmgS/bBtjIYAz5jsWJUmL7l83uYRv+xI6Er0lHTa9rmTTDts8cn5jyNbp/86pMmpee3OYN4APsmpV/U0tm5pN43wmRrScdwTOYIOH/BO29XtUozhafNJeubH/dIGA47zJW3B4/d39zrE0TJcXbqYLxjAcJwdjOUfQ1HYIIqqoZYIJffYt3l4KpF73SU5pQQIcIVKk06m2ChkQ54EP67hfuFe4zuehLXN1RonIPcov1SJxJiav1setw4B14Y4a0050fgr4ahvNv4mIuOmgm6/Yfepm0vN1CaYymk8RQVWq1bgNDOklBbeS69M9CY7ttGAZ82CKCQ81hewUegLCt0mF5iw8KvVE9nRmV3ysWFRXSZissQAatlv4D1N3EhW028E/hjzgQsELZclxM+5h1TpDBJlYuE1IAywUzs1sAeUoJAGTkCyuvAMYXzhHXHhMVRJmRuCfVnf429ee9WwDrMxwRFxdfhPbl8cPy4oRhtemhW5+tMi4gGL2hz2mTjyg0IR4ScuTK77xJFV/ROtEv1fh55M2JaTtbjmVe5mhwkIDhDQmt5YzzpbMC88YpahYkOukc10j6UK2HWOK4ftJgPyEUE5Uh84G5Q5gLARMuIWKwKMWBkWUO2PsOZBksvdcBdd8BoKIcrXquYw6eE84fzkopZrgte0/YMajBAC6wkiXYDVCtnYxXJrclghERXYzEP4cpNVFDb8ZAfc2yVsrtLPn8eLjql8dCf/18IIKmjouawvWtlyGnpHb5UnesBf4BUCOoINC8nm3X1Tqh3GY8VFGsKaE5OrCdEZ7PTrfX7iZMLXLHldsHqCNPkqRRPnx7rn3MgRMkJG6nNWmxbDLjGtDKrrRO60wLe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HgIkGUUwbjxIN1F6sR8w0Ea6I0HNvndJaytaweMnTBig3V3l75GthQfturBzl/tiYqIbgfda4mrk2vpD1VjewB08hT7vi82mhdxvcomdtHr1anbV5WISfxIlvvm4DNySxtWMGzcJ+7d1fBy70w3kupe207YNypUEomtMdeWEpzEK6Z3cHXBUBrT5BzDHHf2heZHjnroE5yIxtgkBdWlkP8+rbPTD1l7Ds+nLFvE/9B/O4AhEPtwn+AejZtgT9I4AUdnYVjeUKeP61Ow7kDtNrB6OaoQsDz75ZFrfh0MKWcTK/zgRjc8g/OSNroTzva2J9qUmneKHOKNMvTZv8Cq6VbT1uru8qRGvCV+nrsHkzfnF7EqziWds3rnl4kiWAKsUMvQ7g2615JNd0+e4V7VuRtzUYkl3TGlQAik0LC9CACXAw==
14 changes: 9 additions & 5 deletions conf/config.properties
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,20 @@ pag.troca=true
pag.pos=true

## ECF ##
# ip ou url da maquina que esta com o ACBr rodando (padrao = localhost)
ecf.servidor=localhost
# porta onde o ACBr responde (padrao = 3434)
# nome da marca do ECF, se for acesso direto e fiscal [BEMATECH ou DARUMA], se for acesso direto e nao fiscal [BEMATECH_NF ou DARUMA_NF], se for fiscal com acesso pelo ACRRmonitor [ACBR]
ecf.marca=ACBR
# utilizar um numero para identificar o modelo usado, somente para as Nao Fiscal, veja a documentacao para saber qual numero usar
ecf.modelo=
# porta onde o ECF esta configurado [COM1, COM2, USB e etc], se ACBR usar 3434
ecf.porta=3434
# velocidade de comunicacao da porta [9600 ou 115200], se ACBR colocar o timeout 10000
ecf.velocidade=10000
# tempo em segundos de espera para recuperar a Z
ecf.tempo=30
# quantidade de tentativas de recuperar os dados da Z
ecf.tentativas=3
# gerar arquivo cat52 para NFA ou NFP
ecf.cat52=true
# gerar arquivo cat52 para NFA ou NFP, caso seja pra gerar colocar o nome do arquivo de acordo com o ECF.
ecf.cat52=
# nome de suprimento
ecf.suprimento=Suprimento
# nome de sangria
Expand Down
Binary file modified dlls/Bematech.zip
100755 → 100644
Binary file not shown.
Binary file modified dlls/Daruma.zip
100755 → 100644
Binary file not shown.
Binary file removed dlls/Elgin.zip
Binary file not shown.
Binary file removed dlls/Epson.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions dlls/Leiame.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Leiame ##

# Descompacte o zip correspondente da impressora que ira usar, e coloque todos os arquivos dentro da pasta ACBrMonitor.
# Descompacte o zip correspondente da impressora que ira usar, e coloque todos os arquivos dentro da pasta ACBrMonitor caso utilize o ACRB, se for usar acesso direto coloque os arquivos na pasta C:\Windows\system32\

# Caso nao tenha um zip para sua impressora entre no site do fabricante para fazer o download, ou melhor entre em contato conosco suporte@phdss.com.br
# Caso nao tenha um zip para sua impressora entre no site do fabricante para fazer o download, ou se desejar entre em contato conosco suporte@phdss.com.br
Binary file removed dlls/Sweda.zip
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added lib/ecf/BematechFrameworkJNA.jar
Binary file not shown.
Binary file added lib/ecf/DarumaFrameworkJNA.jar
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added lib/jaxb/.DS_Store
Binary file not shown.
Binary file added lib/jpa/.DS_Store
Binary file not shown.
30 changes: 18 additions & 12 deletions lib/libs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jersey-json-1.8.jar
jersey-multipart-1.8.jar
jersey-server-1.8.jar
jersey-simple-server-1.8.jar
simple-4.1.21.jar

# NFe 2.00
nfexml2.jar
Expand Down Expand Up @@ -66,20 +67,25 @@ poi.jar
saaj.jar
xalan-2.7.0.jar

# Projetos
OpenECF.jar
OpenPAF.jar
OpenTEF.jar

# Outras
jasypt-1.9.0.jar
beanio.jar
ini4j-0.5.2.jar
# Bancos
h2-1.3.170.jar
mysql-connector-java-5.1.18-bin.jar
postgresql-9.2-1000.jdbc4.jar
simple-4.1.21.jar
loj4j-1.2.16.jar

# ECFs
jna.jar
plataform.jar
swing-layout-1.0.4.jar
BematechFrameworkJNA.jar
FrameworkJNA.jar

# Arquivos
jasypt-1.9.0.jar
beanio.jar
ini4j-0.5.2.jar
loj4j-1.2.16.jar
swing-layout-1.0.4.jar

# Projetos
OpenECF.jar
OpenPAF.jar
OpenTEF.jar
3 changes: 2 additions & 1 deletion lib/nblibraries.properties
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ libs.restlib.classpath=\
${base}/rest/jersey-json.jar:\
${base}/rest/jersey-multipart.jar:\
${base}/rest/jersey-server.jar:\
${base}/rest/jersey-simple-server.jar
${base}/rest/jersey-simple-server.jar:\
${base}/rest/simple.jar
libs.restlib.displayName=REST
libs.swing-layout.classpath=\
${base}/swing-layout/swing-layout-1.0.4.jar
Expand Down
Binary file added lib/rest/.DS_Store
Binary file not shown.
File renamed without changes.
Binary file added nbproject/.DS_Store
Binary file not shown.
14 changes: 14 additions & 0 deletions nbproject/build-impl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,13 @@ is divided into following sections:
<propertyfile file="${built-jar.properties}">
<entry key="${basedir}" value=""/>
</propertyfile>
<antcall target="-maybe-call-dep">
<param name="call.built.properties" value="${built-jar.properties}"/>
<param location="${project.AdmPDV}" name="call.subproject"/>
<param location="${project.AdmPDV}/build.xml" name="call.script"/>
<param name="call.target" value="jar"/>
<param name="transfer.built-jar.properties" value="${built-jar.properties}"/>
</antcall>
<antcall target="-maybe-call-dep">
<param name="call.built.properties" value="${built-jar.properties}"/>
<param location="${project.OpenECF}" name="call.subproject"/>
Expand Down Expand Up @@ -1421,6 +1428,13 @@ is divided into following sections:
<propertyfile file="${built-clean.properties}">
<entry key="${basedir}" value=""/>
</propertyfile>
<antcall target="-maybe-call-dep">
<param name="call.built.properties" value="${built-clean.properties}"/>
<param location="${project.AdmPDV}" name="call.subproject"/>
<param location="${project.AdmPDV}/build.xml" name="call.script"/>
<param name="call.target" value="clean"/>
<param name="transfer.built-clean.properties" value="${built-clean.properties}"/>
</antcall>
<antcall target="-maybe-call-dep">
<param name="call.built.properties" value="${built-clean.properties}"/>
<param location="${project.OpenECF}" name="call.subproject"/>
Expand Down
4 changes: 2 additions & 2 deletions nbproject/genfiles.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ build.xml.script.CRC32=9293e70a
build.xml.stylesheet.CRC32=28e38971@1.50.2.46
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=6a4ff81a
nbproject/build-impl.xml.script.CRC32=55f2abc8
nbproject/build-impl.xml.data.CRC32=c46a48d1
nbproject/build-impl.xml.script.CRC32=50a3ba7b
nbproject/build-impl.xml.stylesheet.CRC32=5a01deb7@1.68.1.46
Binary file added nbproject/private/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion nbproject/private/private.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<url>src/br/com/openpdv/visao/core/Caixa.java</url>
<bookmark id="2">
<name/>
<line>1453</line>
<line>1456</line>
<key/>
</bookmark>
</file>
Expand Down
35 changes: 20 additions & 15 deletions nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,18 @@ dist.jar=${dist.dir}/OpenPDV.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
file.reference.beanio.jar=lib/beanio.jar
file.reference.h2.jar=lib/h2.jar
file.reference.ini4j.jar=lib/ini4j.jar
file.reference.jasypt.jar=lib/jasypt.jar
file.reference.jna.jar=lib/jna.jar
file.reference.log4j.jar=lib/log4j.jar
file.reference.mysql.jar=lib/mysql.jar
file.reference.beanio.jar=lib/file/beanio.jar
file.reference.BematechFrameworkJNA.jar=lib/ecf/BematechFrameworkJNA.jar
file.reference.DarumaFrameworkJNA.jar=lib/ecf/DarumaFrameworkJNA.jar
file.reference.h2.jar=lib/db/h2.jar
file.reference.ini4j.jar=lib/file/ini4j.jar
file.reference.jasypt.jar=lib/file/jasypt.jar
file.reference.jna.jar=lib/ecf/jna.jar
file.reference.log4j.jar=lib/file/log4j.jar
file.reference.mysql.jar=lib/db/mysql.jar
file.reference.OpenPDV-conf=conf
file.reference.platform.jar=lib/platform.jar
file.reference.postgresql.jar=lib/postgresql.jar
file.reference.simple.jar=lib/simple.jar
file.reference.platform.jar=lib/ecf/platform.jar
file.reference.postgresql.jar=lib/db/postgresql.jar
includes=**
jar.archive.disabled=${jnlp.enabled}
jar.compress=true
Expand All @@ -51,20 +52,22 @@ javac.classpath=\
${libs.jaxb.classpath}:\
${libs.restlib.classpath}:\
${libs.NFe_2.0.classpath}:\
${libs.swing-layout.classpath}:\
${reference.AdmPDV.jar}:\
${reference.OpenECF.jar}:\
${reference.OpenPAF.jar}:\
${reference.OpenTEF.jar}:\
${file.reference.beanio.jar}:\
${file.reference.BematechFrameworkJNA.jar}:\
${file.reference.DarumaFrameworkJNA.jar}:\
${file.reference.jna.jar}:\
${file.reference.platform.jar}:\
${file.reference.ini4j.jar}:\
${file.reference.jasypt.jar}:\
${file.reference.jna.jar}:\
${file.reference.log4j.jar}:\
${file.reference.platform.jar}:\
${file.reference.simple.jar}:\
${file.reference.h2.jar}:\
${file.reference.mysql.jar}:\
${file.reference.postgresql.jar}:\
${libs.swing-layout.classpath}
${file.reference.postgresql.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=true
Expand Down Expand Up @@ -103,9 +106,11 @@ manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=false
platform.active=default_platform
project.AdmPDV=../AdmPDV
project.OpenECF=../OpenECF
project.OpenPAF=../OpenPAF
project.OpenTEF=../OpenTEF
reference.AdmPDV.jar=${project.AdmPDV}/dist/AdmPDV.jar
reference.OpenECF.jar=${project.OpenECF}/dist/OpenECF.jar
reference.OpenPAF.jar=${project.OpenPAF}/dist/OpenPAF.jar
reference.OpenTEF.jar=${project.OpenTEF}/dist/OpenTEF.jar
Expand Down
8 changes: 8 additions & 0 deletions nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@
<definitions>./lib/nblibraries.properties</definitions>
</libraries>
<references xmlns="http://www.netbeans.org/ns/ant-project-references/1">
<reference>
<foreign-project>AdmPDV</foreign-project>
<artifact-type>jar</artifact-type>
<script>build.xml</script>
<target>jar</target>
<clean-target>clean</clean-target>
<id>jar</id>
</reference>
<reference>
<foreign-project>OpenECF</foreign-project>
<artifact-type>jar</artifact-type>
Expand Down
Binary file added src/.DS_Store
Binary file not shown.
31 changes: 17 additions & 14 deletions src/br/com/openpdv/controlador/comandos/ComandoAbrirVenda.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
package br.com.openpdv.controlador.comandos;

import br.com.openpdv.controlador.core.CoreService;
import br.com.openpdv.controlador.core.Util;
import br.com.phdss.Util;
import br.com.openpdv.controlador.permissao.Login;
import br.com.openpdv.modelo.core.OpenPdvException;
import br.com.openpdv.modelo.ecf.EcfVenda;
import br.com.openpdv.modelo.ecf.EcfVendaProduto;
import br.com.openpdv.modelo.sistema.SisCliente;
import br.com.openpdv.visao.core.Caixa;
import br.com.phdss.ECF;
import br.com.phdss.EComandoECF;
import br.com.phdss.EComando;
import br.com.phdss.IECF;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
Expand All @@ -26,6 +27,7 @@ public class ComandoAbrirVenda implements IComando {
private Logger log;
private SisCliente cliente;
private String[] resp;
private IECF ecf;

/**
* Costrutor padrao.
Expand All @@ -42,6 +44,7 @@ public ComandoAbrirVenda() {
public ComandoAbrirVenda(SisCliente cliente) {
this.log = Logger.getLogger(ComandoAbrirVenda.class);
this.cliente = cliente;
this.ecf = ECF.getInstancia();
}

@Override
Expand All @@ -52,7 +55,7 @@ public void executar() throws OpenPdvException {
try {
AbrirVendaBanco();
} catch (OpenPdvException ex) {
ECF.enviar(EComandoECF.ECF_CancelaCupom);
ecf.enviar(EComando.ECF_CancelaCupom);
throw ex;
}
// coloca na tela
Expand All @@ -70,9 +73,9 @@ public void desfazer() throws OpenPdvException {
* @exception OpenPdvException dispara caso nao consiga executar.
*/
public void abrirVendaECF() throws OpenPdvException {
ECF.enviar(EComandoECF.ECF_CorrigeEstadoErro);
resp = ECF.enviar(EComandoECF.ECF_AbreCupom);
if (ECF.ERRO.equals(resp[0])) {
ecf.enviar(EComando.ECF_CorrigeEstadoErro);
resp = ecf.enviar(EComando.ECF_AbreCupom);
if (IECF.ERRO.equals(resp[0])) {
log.error("Erro ao abrir a venda no ECF. -> " + resp[1]);
throw new OpenPdvException(resp[1]);
}
Expand All @@ -96,24 +99,24 @@ public void AbrirVendaBanco() throws OpenPdvException {
venda.setSisCliente(cliente);
venda.setInformouCliente(cliente != null);
// ccf
resp = ECF.enviar(EComandoECF.ECF_NumCCF);
if (ECF.OK.equals(resp[0])) {
resp = ecf.enviar(EComando.ECF_NumCCF);
if (IECF.OK.equals(resp[0])) {
venda.setEcfVendaCcf(Integer.valueOf(resp[1]));
} else {
log.error("Erro ao abrir a venda no BD. -> " + resp[1]);
throw new OpenPdvException(resp[1]);
}
// coo
resp = ECF.enviar(EComandoECF.ECF_NumCupom);
if (ECF.OK.equals(resp[0])) {
resp = ecf.enviar(EComando.ECF_NumCupom);
if (IECF.OK.equals(resp[0])) {
venda.setEcfVendaCoo(Integer.valueOf(resp[1]));
} else {
log.error("Erro ao abrir a venda no BD. -> " + resp[1]);
throw new OpenPdvException(resp[1]);
}
// data
resp = ECF.enviar(EComandoECF.ECF_DataHora);
if (ECF.OK.equals(resp[0])) {
resp = ecf.enviar(EComando.ECF_DataHora);
if (IECF.OK.equals(resp[0])) {
Date data = null;
try {
data = new SimpleDateFormat("dd/MM/yy HH:mm:ss").parse(resp[1]);
Expand Down Expand Up @@ -147,7 +150,7 @@ public void AbrirVendaBanco() throws OpenPdvException {
*/
public void abrirVendaTela() throws OpenPdvException {
Caixa.getInstancia().getBobina().removeAllElements();
Caixa.getInstancia().getBobina().addElement(ECF.LS);
Caixa.getInstancia().getBobina().addElement(IECF.LS);
EcfVenda venda = Caixa.getInstancia().getVenda();
String data = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss").format(venda.getEcfVendaData());
Caixa.getInstancia().getBobina().addElement(data
Expand All @@ -158,7 +161,7 @@ public void abrirVendaTela() throws OpenPdvException {
Caixa.getInstancia().getBobina().addElement("ITEM CÓDIGO DESCRIÇÃO ");
// linha 2
Caixa.getInstancia().getBobina().addElement("QTD. UN VL.UNIT.(R$) ST VL.ITEM(R$)");
Caixa.getInstancia().getBobina().addElement(ECF.LS);
Caixa.getInstancia().getBobina().addElement(IECF.LS);
}

public SisCliente getCliente() {
Expand Down
Loading

0 comments on commit cea0779

Please sign in to comment.