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

wmixvideo / nfe / #6582

17 Jul 2025 09:30PM UTC coverage: 51.231% (+24.2%) from 26.996%
#6582

push

web-flow
Adequação do mapeamento de infLocalCarrega e infLocalDescarrega ao xs:choice do schema MDF-e (#1054)

* Adequação do mapeamento de infLocalCarrega e infLocalDescarrega ao xs:choice do schema MDF-e

* Adequação do mapeamento de infLocalCarrega e infLocalDescarrega ao xs:choice do schema MDF-e

14006 of 27339 relevant lines covered (51.23%)

0.51 hits per line

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

82.05
/src/main/java/com/fincatto/documentofiscal/nfe400/classes/NFProtocoloInfo.java
1
package com.fincatto.documentofiscal.nfe400.classes;
2

3
import com.fincatto.documentofiscal.DFAmbiente;
4
import com.fincatto.documentofiscal.DFBase;
5
import org.apache.commons.lang3.ObjectUtils;
6
import org.apache.commons.lang3.StringUtils;
7
import org.simpleframework.xml.Attribute;
8
import org.simpleframework.xml.Element;
9

10
import java.time.LocalDateTime;
11
import java.time.format.DateTimeFormatter;
12

13
public class NFProtocoloInfo extends DFBase {
1✔
14
    private static final long serialVersionUID = -7256753142051587115L;
15

16
    @Attribute(name = "Id", required = false)
17
    private String identificador;
18
    
19
    @Element(name = "tpAmb")
20
    private DFAmbiente ambiente;
21
    
22
    @Element(name = "verAplic")
23
    private String versaoAplicacao;
24
    
25
    @Element(name = "chNFe")
26
    private String chave;
27
    
28
    @Element(name = "dhRecbto")
29
    private String dataRecebimento;
30

31
    @Element(name = "nProt", required = false)
32
    private String numeroProtocolo;
33

34
    @Element(name = "digVal", required = false)
35
    private String validador;
36
    
37
    @Element(name = "cStat")
38
    private String status;
39

40
    @Element(name = "xMotivo", required = false)
41
    private String motivo;
42

43
    @Element(name = "cMsg", required = false)
44
    private String codigoMessage;
45

46
    @Element(name = "xMsg", required = false)
47
    private String mensagem;
48

49
    public void setAmbiente(final DFAmbiente ambiente) {
50
        this.ambiente = ambiente;
1✔
51
    }
1✔
52

53
    public void setVersaoAplicacao(final String versaoAplicacao) {
54
        this.versaoAplicacao = versaoAplicacao;
1✔
55
    }
1✔
56

57
    public void setChave(final String chave) {
58
        this.chave = chave;
1✔
59
    }
1✔
60

61
    public void setDataRecebimento(final String dataRecebimento) {
62
        this.dataRecebimento = dataRecebimento;
1✔
63
    }
1✔
64

65
    public void setNumeroProtocolo(final String numeroProtocolo) {
66
        this.numeroProtocolo = numeroProtocolo;
1✔
67
    }
1✔
68

69
    public void setValidador(final String validador) {
70
        this.validador = validador;
1✔
71
    }
1✔
72

73
    public void setStatus(final String status) {
74
        this.status = status;
1✔
75
    }
1✔
76

77
    public void setMotivo(final String motivo) {
78
        this.motivo = motivo;
1✔
79
    }
1✔
80

81
    public DFAmbiente getAmbiente() {
82
        return this.ambiente;
1✔
83
    }
84

85
    public String getVersaoAplicacao() {
86
        return this.versaoAplicacao;
1✔
87
    }
88

89
    public String getChave() {
90
        return this.chave;
1✔
91
    }
92

93
    public LocalDateTime getDataRecebimento() {
94
        try {
95
            return LocalDateTime.parse(this.dataRecebimento, DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"));
1✔
96
        } catch (final Exception e) {
1✔
97
            return LocalDateTime.from(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssXXX")
1✔
98
                    .parse(this.dataRecebimento));
1✔
99
        }
100
    }
101

102
    public String getNumeroProtocolo() {
103
        return this.numeroProtocolo;
1✔
104
    }
105

106
    public String getValidador() {
107
        return this.validador;
1✔
108
    }
109

110
    public String getStatus() {
111
        return this.status;
1✔
112
    }
113

114
    public String getMotivo() {
115
            if (StringUtils.isBlank(this.motivo))
1✔
116
                //quando nao tiver um retorno, usa o motivo padrao identificado pelo cStat
117
            return ObjectUtils.defaultIfNull(NFRetornoStatus.valueOfCodigo(this.status), NFRetornoStatus.CODIGO_999 ).getMotivo();
×
118
        return this.motivo;
1✔
119
    }
120

121
    public String getIdentificador() {
122
        return this.identificador;
1✔
123
    }
124

125
    public void setIdentificador(final String identificador) {
126
        this.identificador = identificador;
1✔
127
    }
1✔
128

129
    public String getCodigoMessage() {
130
        return codigoMessage;
×
131
    }
132

133
    public void setCodigoMessage(String codigoMessage) {
134
        this.codigoMessage = codigoMessage;
×
135
    }
×
136

137
    public String getMensagem() {
138
        return mensagem;
×
139
    }
140

141
    public void setMensagem(String mensagem) {
142
        this.mensagem = mensagem;
×
143
    }
×
144
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc