-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
60dcebe
commit 073fdd0
Showing
25 changed files
with
337 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,13 +20,16 @@ | |
import javax.xml.bind.JAXBException; | ||
import javax.xml.stream.XMLStreamException; | ||
import java.rmi.RemoteException; | ||
import java.util.Objects; | ||
|
||
/** | ||
* @author Samuel Oliveira - [email protected] - www.swconsultoria.com.br | ||
*/ | ||
@Log | ||
class DistribuicaoDFe { | ||
|
||
private DistribuicaoDFe() {} | ||
|
||
/** | ||
* Classe Reponsavel Por Consultar as CTE na SEFAZ | ||
* | ||
|
@@ -54,17 +57,14 @@ static RetDistDFeInt consultaCte(ConfiguracoesCte config, PessoaEnum tipoPessoa, | |
distDFeInt.setCPF(cpfCnpj); | ||
} | ||
|
||
switch (tipoConsulta) { | ||
case NSU: | ||
DistDFeInt.DistNSU distNSU = new DistDFeInt.DistNSU(); | ||
distNSU.setUltNSU(nsuChave); | ||
distDFeInt.setDistNSU(distNSU); | ||
break; | ||
case NSU_UNICO: | ||
DistDFeInt.ConsNSU consNSU = new DistDFeInt.ConsNSU(); | ||
consNSU.setNSU(nsuChave); | ||
distDFeInt.setConsNSU(consNSU); | ||
break; | ||
if (Objects.requireNonNull(tipoConsulta) == ConsultaDFeEnum.NSU) { | ||
DistDFeInt.DistNSU distNSU = new DistDFeInt.DistNSU(); | ||
distNSU.setUltNSU(nsuChave); | ||
distDFeInt.setDistNSU(distNSU); | ||
} else if (tipoConsulta == ConsultaDFeEnum.NSU_UNICO) { | ||
DistDFeInt.ConsNSU consNSU = new DistDFeInt.ConsNSU(); | ||
consNSU.setNSU(nsuChave); | ||
distDFeInt.setConsNSU(consNSU); | ||
} | ||
|
||
String xml = XmlCteUtil.objectToXml(distDFeInt); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.