• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wmixvideo / nfe / #9456

23 Jul 2026 08:27PM UTC coverage: 50.851% (-0.9%) from 51.794%
#9456

push

web-flow
Adiciona suporte ao CT-e Simplificado (tpCTe=5, NT 2024.002) (#1180)

* Adiciona suporte nativo ao CT-e Simplificado (tpCTe=5, NT 2024.002)
Implementa o Conhecimento de Transporte Eletrônico Simplificado (Ajuste
SINIEF 46/2023) como variante de modelo 57, seguindo o CT-e OS como molde
e a convenção de nomes = tags XML já usada no IBSCBS.
Classes de domínio (cte400/classes/simp/):
- CTeNotaSimp (raiz CTeSimp), CTeNotaSimpInfo, ...Identificacao, ...Tomador,
  ...Det (+ Comp, InfNFe, InfDocAnt, InfDocAntNFeParcial), ...Total
- Reutiliza emit, infModal, infCarga e imp do CT-e normal
- Raiz CTeSimp sem atributo versao (só infCte o possui)
Webservice e transporte:
- WSRecepcaoCTeSimp (assina infCte, GZip+Base64, síncrono sem lote)
- CTeRecepcaoSimpV4Stub — literais conferidos contra os WSDL reais de
  homologação de MT e SVRS (namespace, operação cteRecepcaoSimp, cteDadosMsg,
  cteRecepcaoSimpResult, soapAction)
- CTeSimpEnvioRetorno/...Dados e CTeSimpProcessado (cteSimpProc)
- Overload WSFacade.enviaCTe(CTeNotaSimp)
Autorizador e validação:
- CTAutorizador400.getCteRecepcaoSimp nos 8 autorizadores (produção +
  homologação); MT usa path atípico cte-ws/services/
- DFXMLValidador.validaNotaCteSimp400 (cteSimp_v4.00.xsd, RTC 1.14)
Teste:
- CTeNotaSimpTest faz round-trip serializa→valida contra o XSD; toda a
  estrutura de negócio valida (só falta Signature, aplicado no envio)

* Adiciona suporte nativo ao CT-e Simplificado (tpCTe=5, NT 2024.002)
Implementa o Conhecimento de Transporte Eletrônico Simplificado (Ajuste
SINIEF 46/2023) como variante de modelo 57, seguindo o CT-e OS como molde
e a convenção de nomes = tags XML já usada no IBSCBS.
Classes de domínio (cte400/classes/simp/):
- CTeNotaSimp (raiz CTeSimp), CTeNotaSimpInfo, ...Identificacao, ...Tomador,
  ...Det (+ Comp, InfNFe, InfDocAnt, InfDocAntNFeParcial), ...Total
- Reutiliza emit, infModal, infCarga e imp do CT-e normal
- Raiz CTeSimp sem atributo versao (só infCte o possui)
Webservice e transpor... (continued)

130 of 324 new or added lines in 15 files covered. (40.12%)

711 existing lines in 42 files now uncovered.

15094 of 29683 relevant lines covered (50.85%)

0.51 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

60.0
/src/main/java/com/fincatto/documentofiscal/cte400/classes/simp/CTeNotaSimpInfoDet.java
1
package com.fincatto.documentofiscal.cte400.classes.simp;
2

3
import com.fincatto.documentofiscal.DFBase;
4
import com.fincatto.documentofiscal.cte.CTeConfig;
5
import com.fincatto.documentofiscal.validadores.DFBigDecimalValidador;
6
import com.fincatto.documentofiscal.validadores.DFStringValidador;
7
import org.simpleframework.xml.Attribute;
8
import org.simpleframework.xml.Element;
9
import org.simpleframework.xml.ElementList;
10
import org.simpleframework.xml.Namespace;
11
import org.simpleframework.xml.Root;
12

13
import java.math.BigDecimal;
14
import java.util.List;
15

16
/**
17
 * Detalhamento das entregas / prestações do CT-e Simplificado (grupo det, 1-999).
18
 */
19
@Root(name = "det")
20
@Namespace(reference = CTeConfig.NAMESPACE)
21
public class CTeNotaSimpInfoDet extends DFBase {
1✔
22
    private static final long serialVersionUID = 1L;
23

24
    @Attribute(name = "nItem")
25
    private String nItem;
26

27
    @Element(name = "cMunIni")
28
    private String cMunIni;
29

30
    @Element(name = "xMunIni")
31
    private String xMunIni;
32

33
    @Element(name = "cMunFim")
34
    private String cMunFim;
35

36
    @Element(name = "xMunFim")
37
    private String xMunFim;
38

39
    @Element(name = "vPrest")
40
    private String vPrest;
41

42
    @Element(name = "vRec")
43
    private String vRec;
44

45
    @ElementList(name = "Comp", inline = true, required = false)
46
    private List<CTeNotaSimpInfoDetComp> comp;
47

48
    @ElementList(name = "infNFe", inline = true, required = false)
49
    private List<CTeNotaSimpInfoDetInfNFe> infNFe;
50

51
    @ElementList(name = "infDocAnt", inline = true, required = false)
52
    private List<CTeNotaSimpInfoDetInfDocAnt> infDocAnt;
53

54
    public String getNItem() {
NEW
55
        return this.nItem;
×
56
    }
57

58
    /**
59
     * Número identificador do item agrupador da prestação (1 a 990)
60
     */
61
    public void setNItem(final String nItem) {
62
        this.nItem = nItem;
1✔
63
    }
1✔
64

65
    public String getCMunIni() {
NEW
66
        return this.cMunIni;
×
67
    }
68

69
    /**
70
     * Código do Município de início da prestação (tabela IBGE; 9999999 para o exterior)
71
     */
72
    public void setCMunIni(final String cMunIni) {
73
        DFStringValidador.exatamente7N(cMunIni, "Codigo do Municipio de inicio da prestacao");
1✔
74
        this.cMunIni = cMunIni;
1✔
75
    }
1✔
76

77
    public String getXMunIni() {
NEW
78
        return this.xMunIni;
×
79
    }
80

81
    /**
82
     * Nome do Município do início da prestação ('EXTERIOR' para o exterior)
83
     */
84
    public void setXMunIni(final String xMunIni) {
85
        DFStringValidador.tamanho2ate60(xMunIni, "Nome do Municipio de inicio da prestacao");
1✔
86
        this.xMunIni = xMunIni;
1✔
87
    }
1✔
88

89
    public String getCMunFim() {
NEW
90
        return this.cMunFim;
×
91
    }
92

93
    /**
94
     * Código do Município de término da prestação (tabela IBGE; 9999999 para o exterior)
95
     */
96
    public void setCMunFim(final String cMunFim) {
97
        DFStringValidador.exatamente7N(cMunFim, "Codigo do Municipio de termino da prestacao");
1✔
98
        this.cMunFim = cMunFim;
1✔
99
    }
1✔
100

101
    public String getXMunFim() {
NEW
102
        return this.xMunFim;
×
103
    }
104

105
    /**
106
     * Nome do Município do término da prestação ('EXTERIOR' para o exterior)
107
     */
108
    public void setXMunFim(final String xMunFim) {
109
        DFStringValidador.tamanho2ate60(xMunFim, "Nome do Municipio de termino da prestacao");
1✔
110
        this.xMunFim = xMunFim;
1✔
111
    }
1✔
112

113
    public String getVPrest() {
NEW
114
        return this.vPrest;
×
115
    }
116

117
    /**
118
     * Valor da Prestação do Serviço
119
     */
120
    public void setVPrest(final BigDecimal vPrest) {
121
        this.vPrest = DFBigDecimalValidador.tamanho15Com2CasasDecimais(vPrest, "Valor da Prestacao do Servico");
1✔
122
    }
1✔
123

124
    public String getVRec() {
NEW
125
        return this.vRec;
×
126
    }
127

128
    /**
129
     * Valor a Receber
130
     */
131
    public void setVRec(final BigDecimal vRec) {
132
        this.vRec = DFBigDecimalValidador.tamanho15Com2CasasDecimais(vRec, "Valor a Receber");
1✔
133
    }
1✔
134

135
    public List<CTeNotaSimpInfoDetComp> getComp() {
NEW
136
        return this.comp;
×
137
    }
138

139
    public void setComp(final List<CTeNotaSimpInfoDetComp> comp) {
NEW
140
        this.comp = comp;
×
NEW
141
    }
×
142

143
    public List<CTeNotaSimpInfoDetInfNFe> getInfNFe() {
NEW
144
        return this.infNFe;
×
145
    }
146

147
    /**
148
     * Informações das NF-e. Exclusivo com infDocAnt (choice do XSD).
149
     */
150
    public void setInfNFe(final List<CTeNotaSimpInfoDetInfNFe> infNFe) {
151
        this.infNFe = infNFe;
1✔
152
    }
1✔
153

154
    public List<CTeNotaSimpInfoDetInfDocAnt> getInfDocAnt() {
NEW
155
        return this.infDocAnt;
×
156
    }
157

158
    /**
159
     * Documentos anteriores. Exclusivo com infNFe (choice do XSD).
160
     */
161
    public void setInfDocAnt(final List<CTeNotaSimpInfoDetInfDocAnt> infDocAnt) {
NEW
162
        this.infDocAnt = infDocAnt;
×
NEW
163
    }
×
164
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc