Commit 6aa9ac0bde2513575c7606e53874ef2a35d15b96

Authored by Santos
1 parent e54034c9

Alteação de texto da ocorrência de início de fornecimento

src/main/java/br/com/ggas/medicao/leitura/impl/ControladorLeituraMovimentoImpl.java
... ... @@ -44,6 +44,55 @@
44 44  
45 45 package br.com.ggas.medicao.leitura.impl;
46 46  
  47 +import static br.com.ggas.util.Constantes.ATRIBUTO_USUARIO_LOGADO;
  48 +
  49 +import java.io.ByteArrayInputStream;
  50 +import java.io.File;
  51 +import java.io.IOException;
  52 +import java.io.InputStream;
  53 +import java.math.BigDecimal;
  54 +import java.math.RoundingMode;
  55 +import java.text.SimpleDateFormat;
  56 +import java.time.LocalDateTime;
  57 +import java.util.ArrayList;
  58 +import java.util.Arrays;
  59 +import java.util.Calendar;
  60 +import java.util.Collection;
  61 +import java.util.Date;
  62 +import java.util.HashMap;
  63 +import java.util.HashSet;
  64 +import java.util.Iterator;
  65 +import java.util.List;
  66 +import java.util.Map;
  67 +import java.util.Objects;
  68 +import java.util.Optional;
  69 +import java.util.Properties;
  70 +import java.util.ResourceBundle;
  71 +import java.util.SortedMap;
  72 +import java.util.TreeMap;
  73 +
  74 +import javax.servlet.http.HttpServletRequest;
  75 +
  76 +import org.apache.commons.collections.CollectionUtils;
  77 +import org.apache.commons.lang.StringUtils;
  78 +import org.apache.log4j.Logger;
  79 +import org.hibernate.Criteria;
  80 +import org.hibernate.FetchMode;
  81 +import org.hibernate.NonUniqueResultException;
  82 +import org.hibernate.Query;
  83 +import org.hibernate.SQLQuery;
  84 +import org.hibernate.criterion.CriteriaSpecification;
  85 +import org.hibernate.criterion.Order;
  86 +import org.hibernate.criterion.ProjectionList;
  87 +import org.hibernate.criterion.Projections;
  88 +import org.hibernate.criterion.Restrictions;
  89 +import org.joda.time.DateMidnight;
  90 +import org.joda.time.DateTime;
  91 +import org.springframework.web.context.request.RequestContextHolder;
  92 +import org.springframework.web.context.request.ServletRequestAttributes;
  93 +
  94 +import com.google.common.collect.ImmutableMap;
  95 +
47 96 import br.com.ggas.batch.ControladorProcesso;
48 97 import br.com.ggas.batch.ControladorProcessoDocumento;
49 98 import br.com.ggas.batch.Processo;
... ... @@ -127,52 +176,6 @@ import br.com.ggas.util.Util;
127 176 import br.com.ggas.web.faturamento.leitura.dto.AnormalidadeDTO;
128 177 import br.com.ggas.web.faturamento.leitura.dto.LeituraMovimentoDTO;
129 178 import br.com.ggas.web.faturamento.leitura.dto.PesquisaLeituraMovimento;
130   -import com.google.common.collect.ImmutableMap;
131   -import org.apache.commons.collections.CollectionUtils;
132   -import org.apache.commons.lang.StringUtils;
133   -import org.apache.log4j.Logger;
134   -import org.hibernate.Criteria;
135   -import org.hibernate.FetchMode;
136   -import org.hibernate.NonUniqueResultException;
137   -import org.hibernate.Query;
138   -import org.hibernate.SQLQuery;
139   -import org.hibernate.criterion.CriteriaSpecification;
140   -import org.hibernate.criterion.Order;
141   -import org.hibernate.criterion.ProjectionList;
142   -import org.hibernate.criterion.Projections;
143   -import org.hibernate.criterion.Restrictions;
144   -import org.joda.time.DateMidnight;
145   -import org.joda.time.DateTime;
146   -import org.springframework.web.context.request.RequestContextHolder;
147   -import org.springframework.web.context.request.ServletRequestAttributes;
148   -
149   -import javax.servlet.http.HttpServletRequest;
150   -import java.io.ByteArrayInputStream;
151   -import java.io.File;
152   -import java.io.IOException;
153   -import java.io.InputStream;
154   -import java.math.BigDecimal;
155   -import java.math.RoundingMode;
156   -import java.text.SimpleDateFormat;
157   -import java.time.LocalDateTime;
158   -import java.util.ArrayList;
159   -import java.util.Arrays;
160   -import java.util.Calendar;
161   -import java.util.Collection;
162   -import java.util.Date;
163   -import java.util.HashMap;
164   -import java.util.HashSet;
165   -import java.util.Iterator;
166   -import java.util.List;
167   -import java.util.Map;
168   -import java.util.Objects;
169   -import java.util.Optional;
170   -import java.util.Properties;
171   -import java.util.ResourceBundle;
172   -import java.util.SortedMap;
173   -import java.util.TreeMap;
174   -
175   -import static br.com.ggas.util.Constantes.ATRIBUTO_USUARIO_LOGADO;
176 179  
177 180 /**
178 181 * The Class ControladorLeituraMovimentoImpl.
... ... @@ -2481,7 +2484,7 @@ class ControladorLeituraMovimentoImpl extends ControladorNegocioImpl implements
2481 2484 || (historicoMedicao.getConsumoInformado().compareTo(leituraMovimento.getValorLeitura()) != 0)
2482 2485 && leituraMovimento.getPontoConsumo().getSituacaoConsumo().getChavePrimaria() == Long.parseLong(cAtivo
2483 2486 .getValor()) && contratoPontoConsumo == null) {
2484   - String ocorrencia = "Início de Consumo.";
  2487 + String ocorrencia = "Ocorreu um erro durante o processamento, verifique o status do ponto de consumo e do contrato";
2485 2488 this.setarInformacoesRelatorio(leituraMovimento, relatorios, ocorrencia);
2486 2489 temErro = true;
2487 2490 break;
... ... @@ -2500,7 +2503,7 @@ class ControladorLeituraMovimentoImpl extends ControladorNegocioImpl implements
2500 2503 && leituraMovimento.getValorLeitura().compareTo(BigDecimal.valueOf(0)) > 0) && leituraMovimento
2501 2504 .getPontoConsumo().getSituacaoConsumo().getChavePrimaria() == Long.parseLong(cAtivo.getValor())) {
2502 2505  
2503   - String ocorrencia = "Início de Consumo.";
  2506 + String ocorrencia = "Ocorreu um erro durante o processamento, verifique o status do ponto de consumo e do contrato";
2504 2507 this.setarInformacoesRelatorio(leituraMovimento, relatorios, ocorrencia);
2505 2508 temErro = true;
2506 2509 }
... ...