Record Class ProcessamentoDetalheResponse

java.lang.Object
java.lang.Record
br.com.vantroba.bi.transporte.processamento.ProcessamentoDetalheResponse
Record Components:
id - identificador
recebidoEm - data/hora de recebimento
dataReferencia - data de referência informada
horaReferencia - hora de referência informada
checksumSha256 - checksum SHA-256
nomeArquivo - nome do arquivo
status - status
periodoInicial - período inicial extraído do XLS
periodoFinal - período final extraído do XLS
iniciadoEm - início do processamento
concluidoEm - conclusão do processamento
tempoMs - tempo de processamento em ms
erroMensagem - mensagem de erro, se houver
registrosFaturamento - quantidade total de registros de faturamento no upload
registrosMovimento - quantidade total de registros de movimento no upload
faturamentoInseridas - faturamento — linhas novas (INSERT puro no UPSERT)
faturamentoAtualizadas - faturamento — linhas pré-existentes que mudaram (UPDATE in-place, id preservado)
faturamentoInalteradas - faturamento — linhas inalteradas (filtradas por IS DISTINCT FROM, zero WAL)
faturamentoRemovidas - faturamento — linhas removidas pelo DELETE seletivo (sumiram do upload)
movimentoInseridas - movimento — linhas novas (INSERT puro no UPSERT)
movimentoAtualizadas - movimento — linhas pré-existentes que mudaram (UPDATE in-place, id preservado)
movimentoInalteradas - movimento — linhas inalteradas (filtradas por IS DISTINCT FROM, zero WAL)
movimentoRemovidas - movimento — linhas removidas pelo DELETE seletivo (sumiram do upload)
logArquivo - caminho do arquivo de log da execução
defesaMarcaAusenteQtd - defesa — chaves MARCA_AUSENTE distintas (placa+motivo) nesse upload
defesaModeloAusenteQtd - defesa — chaves MODELO_AUSENTE distintas
defesaAnoInvalidoQtd - defesa — chaves ANO_INVALIDO distintas
defesaTipoFrotaAusenteQtd - defesa — chaves TIPO_FROTA_AUSENTE distintas
defesaPlacaMalformadaQtd - defesa — chaves PLACA_MALFORMADA distintas
xlsLegado - true se ≥80% das linhas estavam sem cadastro veicular (XLS pré-2025-Q4)

public record ProcessamentoDetalheResponse(Long id, LocalDateTime recebidoEm, LocalDate dataReferencia, LocalTime horaReferencia, String checksumSha256, String nomeArquivo, String status, LocalDate periodoInicial, LocalDate periodoFinal, LocalDateTime iniciadoEm, LocalDateTime concluidoEm, Long tempoMs, String erroMensagem, Integer registrosFaturamento, Integer registrosMovimento, Integer faturamentoInseridas, Integer faturamentoAtualizadas, Integer faturamentoInalteradas, Integer faturamentoRemovidas, Integer movimentoInseridas, Integer movimentoAtualizadas, Integer movimentoInalteradas, Integer movimentoRemovidas, String logArquivo, Integer defesaMarcaAusenteQtd, Integer defesaModeloAusenteQtd, Integer defesaAnoInvalidoQtd, Integer defesaTipoFrotaAusenteQtd, Integer defesaPlacaMalformadaQtd, Boolean xlsLegado) extends Record
Detalhe de um processamento para API e tela de detalhe (metadados, contagens e métricas de idempotência da spec 004; sem bytes do XLS).
  • Constructor Details

  • Method Details

    • totalAlteracoes

      public int totalAlteracoes()
      Soma de eventos de WAL (inseridas + atualizadas + removidas) em ambas as tabelas. Trata null como 0 (registros pré-spec 004 não têm métricas). Zero significa upload idempotente — bit-a-bit idêntico ao estado anterior.
      Returns:
      total de linhas inseridas, atualizadas e removidas em faturamento e movimento
    • temMetricas

      public boolean temMetricas()
      true se este processamento tem métricas de idempotência preenchidas (post-spec 004 V7). Registros antigos retornam false — o template/UI evita exibir "sem alterações" para eles, já que a comparação é desconhecida.
      Returns:
      true se há ao menos uma métrica de idempotência preenchida
    • temDefesaQuePreocupa

      public boolean temDefesaQuePreocupa()
      true se há ao menos uma contagem de defesa > 0. O card só renderiza nesse caso.
      Returns:
      true se alguma das 5 contagens é > 0.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public Long id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • recebidoEm

      public LocalDateTime recebidoEm()
      Returns the value of the recebidoEm record component.
      Returns:
      the value of the recebidoEm record component
    • dataReferencia

      public LocalDate dataReferencia()
      Returns the value of the dataReferencia record component.
      Returns:
      the value of the dataReferencia record component
    • horaReferencia

      public LocalTime horaReferencia()
      Returns the value of the horaReferencia record component.
      Returns:
      the value of the horaReferencia record component
    • checksumSha256

      public String checksumSha256()
      Returns the value of the checksumSha256 record component.
      Returns:
      the value of the checksumSha256 record component
    • nomeArquivo

      public String nomeArquivo()
      Returns the value of the nomeArquivo record component.
      Returns:
      the value of the nomeArquivo record component
    • status

      public String status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • periodoInicial

      public LocalDate periodoInicial()
      Returns the value of the periodoInicial record component.
      Returns:
      the value of the periodoInicial record component
    • periodoFinal

      public LocalDate periodoFinal()
      Returns the value of the periodoFinal record component.
      Returns:
      the value of the periodoFinal record component
    • iniciadoEm

      public LocalDateTime iniciadoEm()
      Returns the value of the iniciadoEm record component.
      Returns:
      the value of the iniciadoEm record component
    • concluidoEm

      public LocalDateTime concluidoEm()
      Returns the value of the concluidoEm record component.
      Returns:
      the value of the concluidoEm record component
    • tempoMs

      public Long tempoMs()
      Returns the value of the tempoMs record component.
      Returns:
      the value of the tempoMs record component
    • erroMensagem

      public String erroMensagem()
      Returns the value of the erroMensagem record component.
      Returns:
      the value of the erroMensagem record component
    • registrosFaturamento

      public Integer registrosFaturamento()
      Returns the value of the registrosFaturamento record component.
      Returns:
      the value of the registrosFaturamento record component
    • registrosMovimento

      public Integer registrosMovimento()
      Returns the value of the registrosMovimento record component.
      Returns:
      the value of the registrosMovimento record component
    • faturamentoInseridas

      public Integer faturamentoInseridas()
      Returns the value of the faturamentoInseridas record component.
      Returns:
      the value of the faturamentoInseridas record component
    • faturamentoAtualizadas

      public Integer faturamentoAtualizadas()
      Returns the value of the faturamentoAtualizadas record component.
      Returns:
      the value of the faturamentoAtualizadas record component
    • faturamentoInalteradas

      public Integer faturamentoInalteradas()
      Returns the value of the faturamentoInalteradas record component.
      Returns:
      the value of the faturamentoInalteradas record component
    • faturamentoRemovidas

      public Integer faturamentoRemovidas()
      Returns the value of the faturamentoRemovidas record component.
      Returns:
      the value of the faturamentoRemovidas record component
    • movimentoInseridas

      public Integer movimentoInseridas()
      Returns the value of the movimentoInseridas record component.
      Returns:
      the value of the movimentoInseridas record component
    • movimentoAtualizadas

      public Integer movimentoAtualizadas()
      Returns the value of the movimentoAtualizadas record component.
      Returns:
      the value of the movimentoAtualizadas record component
    • movimentoInalteradas

      public Integer movimentoInalteradas()
      Returns the value of the movimentoInalteradas record component.
      Returns:
      the value of the movimentoInalteradas record component
    • movimentoRemovidas

      public Integer movimentoRemovidas()
      Returns the value of the movimentoRemovidas record component.
      Returns:
      the value of the movimentoRemovidas record component
    • logArquivo

      public String logArquivo()
      Returns the value of the logArquivo record component.
      Returns:
      the value of the logArquivo record component
    • defesaMarcaAusenteQtd

      public Integer defesaMarcaAusenteQtd()
      Returns the value of the defesaMarcaAusenteQtd record component.
      Returns:
      the value of the defesaMarcaAusenteQtd record component
    • defesaModeloAusenteQtd

      public Integer defesaModeloAusenteQtd()
      Returns the value of the defesaModeloAusenteQtd record component.
      Returns:
      the value of the defesaModeloAusenteQtd record component
    • defesaAnoInvalidoQtd

      public Integer defesaAnoInvalidoQtd()
      Returns the value of the defesaAnoInvalidoQtd record component.
      Returns:
      the value of the defesaAnoInvalidoQtd record component
    • defesaTipoFrotaAusenteQtd

      public Integer defesaTipoFrotaAusenteQtd()
      Returns the value of the defesaTipoFrotaAusenteQtd record component.
      Returns:
      the value of the defesaTipoFrotaAusenteQtd record component
    • defesaPlacaMalformadaQtd

      public Integer defesaPlacaMalformadaQtd()
      Returns the value of the defesaPlacaMalformadaQtd record component.
      Returns:
      the value of the defesaPlacaMalformadaQtd record component
    • xlsLegado

      public Boolean xlsLegado()
      Returns the value of the xlsLegado record component.
      Returns:
      the value of the xlsLegado record component