Commit 2dc3db0acff84546090efc2787e455c871b9912d

Authored by rogerio.costa
2 parents eb2a79fc 7141912c
Exists in master

Merge branch 'desenvolvimento' of http://ferramentasgo.centralit.com.br:8080/scm…

…/git/cit-grp-ecm into desenvolvimento
cit-ecm-api/src/main/java/br/com/centralit/api/service/impl/ProcessoServiceImpl.java
... ... @@ -165,13 +165,14 @@ public class ProcessoServiceImpl extends GenericServiceImpl<Processo, Long> impl
165 165  
166 166 try {
167 167  
168   - this.solrService.addProcesso(processo);
  168 + this.solrService.addProcesso(processo);
169 169 } catch (final Exception e) {
170 170  
171 171 e.printStackTrace();
172 172 }
173   -
174   - this.startBusinessProcess(processo);
  173 + if (entity.getSigilo() == null) {
  174 + this.startBusinessProcess(processo);
  175 + }
175 176  
176 177 return processo;
177 178 }
... ... @@ -212,8 +213,8 @@ public class ProcessoServiceImpl extends GenericServiceImpl<Processo, Long> impl
212 213 processo = super.merge(processo);
213 214  
214 215 this.documentoGedService.atualizarSigiloDocumentos(entity.getDocumentos());
215   -
216   - if(processo.getAprovado()){
  216 +
  217 + if (processo.getAprovado()) {
217 218 this.startBusinessProcess(processo);
218 219 }
219 220 return processo;
... ... @@ -318,17 +319,17 @@ public class ProcessoServiceImpl extends GenericServiceImpl<Processo, Long> impl
318 319 private Collection<Long> getPrivilegios(Sigilo sigilo) {
319 320  
320 321 Collection<Long> listIdsPrivilegio = new LinkedList<Long>();
321   -
  322 +
322 323 sigilo = this.sigiloService.getReference(sigilo.getId());
323   -
324   - if(!UtilColecao.isVazio(sigilo.getSigiloPrivilegios())){
  324 +
  325 + if (!UtilColecao.isVazio(sigilo.getSigiloPrivilegios())) {
325 326 // Cria uma lista de privilegios relacionados ao sigilo do processo
326 327 for (SigiloPrivilegio sigiloPrivilegio : sigilo.getSigiloPrivilegios()) {
327 328  
328 329 listIdsPrivilegio.add(sigiloPrivilegio.getPrivilegio().getId());
329 330 }
330 331 }
331   -
  332 +
332 333 return listIdsPrivilegio;
333 334 }
334 335  
... ...