Commit b89d7cdd3fdc4d2f8963c3727cb9dc5c7f90c728
Exists in
master
Merge branch 'tarefa-268' into desenvolvimento
Conflicts: cit-ecm-api/src/main/java/br/com/centralit/api/dao/impl/UnidadeProcessoDaoHibernate.java cit-ecm-api/src/main/java/br/com/centralit/api/model/HipoteseLegal.java cit-ecm-api/src/main/java/br/com/centralit/api/model/InteressadoProcesso.java cit-ecm-api/src/main/java/br/com/centralit/api/model/NivelAcessoTipoProcesso.java cit-ecm-api/src/main/java/br/com/centralit/api/model/PlanoClassificacao.java cit-ecm-api/src/main/java/br/com/centralit/api/model/Processo.java cit-ecm-api/src/main/java/br/com/centralit/api/model/TipoProcesso.java cit-ecm-api/src/main/java/br/com/centralit/api/service/impl/ProcessoServiceImpl.java cit-ecm-web/src/main/java/br/com/centralit/listener/StartupListenerEcm.java cit-ecm-web/src/main/webapp/assets/js/angular/custom/controller/GerenciarProcessoController.js cit-ecm-web/src/main/webapp/assets/js/angular/custom/repository/UnidadeProcessoRepository.js
Showing
37 changed files
with
923 additions
and
96 deletions
Show diff stats
cit-ecm-api/src/main/java/br/com/centralit/api/dao/UnidadeProcessoDao.java
... | ... | @@ -180,4 +180,23 @@ public interface UnidadeProcessoDao extends CitGenericDAO { |
180 | 180 | */ |
181 | 181 | Boolean isProcessoEnviado(Long idProcesso); |
182 | 182 | |
183 | + /** | |
184 | + * <p> | |
185 | + * <b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a> | |
186 | + * </p> | |
187 | + * | |
188 | + * <p> | |
189 | + * <b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a> | |
190 | + * </p> | |
191 | + * | |
192 | + * Método responsável por verificar se o processo pertence a unidade | |
193 | + * | |
194 | + * @author rogerio.costa | |
195 | + * | |
196 | + * @param idProcesso | |
197 | + * @param idUnidade | |
198 | + * @return boolean | |
199 | + */ | |
200 | + boolean isProcessoNaUnidadeUsuarioLogado(Long idProcesso, Long idUnidade); | |
201 | + | |
183 | 202 | } | ... | ... |
cit-ecm-api/src/main/java/br/com/centralit/api/dao/impl/UnidadeProcessoDaoHibernate.java
... | ... | @@ -353,4 +353,37 @@ public class UnidadeProcessoDaoHibernate extends CitGenericDAOImpl implements Un |
353 | 353 | |
354 | 354 | return this.searchUnique(searchSeven); |
355 | 355 | } |
356 | + | |
357 | + | |
358 | + /** | |
359 | + * <p> | |
360 | + * <b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a> | |
361 | + * </p> | |
362 | + * | |
363 | + * <p> | |
364 | + * <b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a> | |
365 | + * </p> | |
366 | + * | |
367 | + * Método responsável por verificar se o processo pertence a unidade | |
368 | + * | |
369 | + * @author rogerio.costa | |
370 | + * | |
371 | + * @param idProcesso | |
372 | + * @param idUnidade | |
373 | + * @return boolean | |
374 | + */ | |
375 | + public boolean isProcessoNaUnidadeUsuarioLogado(Long idProcesso, Long idUnidade) { | |
376 | + | |
377 | + Criteria criteria = this.newCriteria(); | |
378 | + | |
379 | + criteria.setProjection(Projections.id()); | |
380 | + criteria.add(Restrictions.eq("processo.id", idProcesso)); | |
381 | + criteria.add(Restrictions.eq("unidade.id", idUnidade)); | |
382 | + criteria.add(Restrictions.isNull("dataInativo")); | |
383 | + criteria.setMaxResults(1); | |
384 | + | |
385 | + return UtilObjeto.isReferencia(criteria.uniqueResult()); | |
386 | + | |
387 | + | |
388 | + } | |
356 | 389 | } | ... | ... |
cit-ecm-api/src/main/java/br/com/centralit/api/model/AnexoGed.java
... | ... | @@ -94,7 +94,7 @@ public class AnexoGed extends PersistentObjectUnidade implements DocumentoGedInt |
94 | 94 | |
95 | 95 | /** Atributo dominioTipoAnexo. */ |
96 | 96 | @ManyToOne(fetch = FetchType.EAGER, optional = true) |
97 | - @JsonView({ ViewsEcm.DocumentoGedEdit.class, Views.ProcessoEdit.class }) | |
97 | + @JsonView({ ViewsEcm.DocumentoGedEdit.class, Views.ProcessoEdit.class, Views.ProcessoVHView.class}) | |
98 | 98 | private Dominio dominioTipoAnexo; |
99 | 99 | |
100 | 100 | /** Atributo MultipartFile. */ | ... | ... |
cit-ecm-api/src/main/java/br/com/centralit/api/model/DocumentoGed.java
... | ... | @@ -79,11 +79,11 @@ public class DocumentoGed extends PersistentObjectUnidade implements Cloneable { |
79 | 79 | private Long id; |
80 | 80 | |
81 | 81 | /** Atributo assuntoComplementar. */ |
82 | - @JsonView({ ViewsEcm.DocumentoGedEdit.class, Views.ProcessoEdit.class, ViewsEcm.ClassificacaoDocumentoGedView.class }) | |
82 | + @JsonView({ ViewsEcm.DocumentoGedEdit.class, Views.ProcessoEdit.class, ViewsEcm.ClassificacaoDocumentoGedView.class, Views.ProcessoVHView.class}) | |
83 | 83 | private String assuntoComplementar; |
84 | 84 | |
85 | 85 | /** Atributo numero. */ |
86 | - @JsonView({ ViewsEcm.DocumentoGedEdit.class, Views.ProcessoEdit.class, ViewsEcm.ClassificacaoDocumentoGedView.class }) | |
86 | + @JsonView({ ViewsEcm.DocumentoGedEdit.class, Views.ProcessoEdit.class, ViewsEcm.ClassificacaoDocumentoGedView.class, Views.ProcessoVHView.class}) | |
87 | 87 | private String numero; |
88 | 88 | |
89 | 89 | /** Atributo idRaiz. */ |
... | ... | @@ -95,23 +95,23 @@ public class DocumentoGed extends PersistentObjectUnidade implements Cloneable { |
95 | 95 | private Boolean novaVersao; |
96 | 96 | |
97 | 97 | /** Atributo versaoDocumento. */ |
98 | - @JsonView({ Views.DocumentoGedEdit.class, Views.ProcessoEdit.class }) | |
98 | + @JsonView({ Views.DocumentoGedEdit.class, Views.ProcessoEdit.class, Views.ProcessoVHView.class}) | |
99 | 99 | private Double versaoDocumento; |
100 | 100 | |
101 | 101 | /** Atributo cancelado. */ |
102 | - @JsonView({ Views.ProcessoEdit.class }) | |
102 | + @JsonView({ Views.ProcessoEdit.class, Views.ProcessoVHView.class}) | |
103 | 103 | private Boolean cancelado; |
104 | 104 | |
105 | 105 | @JsonView({ Views.DocumentoGedEdit.class }) |
106 | 106 | private String localizacao; |
107 | 107 | |
108 | 108 | /** Atributo conteudo. */ |
109 | - @JsonView({ ViewsEcm.DocumentoGedEdit.class }) | |
109 | + @JsonView({ ViewsEcm.DocumentoGedEdit.class, Views.ProcessoVHView.class}) | |
110 | 110 | @Transient |
111 | 111 | private String conteudo; |
112 | 112 | |
113 | 113 | /** Atributo tipoAssunto. */ |
114 | - @JsonView({ Views.DocumentoGedEdit.class }) | |
114 | + @JsonView({ Views.DocumentoGedEdit.class, Views.ProcessoVHView.class }) | |
115 | 115 | private String tipoAssunto; |
116 | 116 | |
117 | 117 | /** Atributo conteudoCriptografado. */ |
... | ... | @@ -121,7 +121,7 @@ public class DocumentoGed extends PersistentObjectUnidade implements Cloneable { |
121 | 121 | private byte[] conteudoCriptografado; |
122 | 122 | |
123 | 123 | /** Atributo icon. */ |
124 | - @JsonView({ ViewsEcm.DocumentoGedEdit.class, Views.ProcessoEdit.class, ViewsEcm.ClassificacaoDocumentoGedView.class }) | |
124 | + @JsonView({ ViewsEcm.DocumentoGedEdit.class, Views.ProcessoEdit.class, ViewsEcm.ClassificacaoDocumentoGedView.class, Views.ProcessoVHView.class}) | |
125 | 125 | private String icon; |
126 | 126 | |
127 | 127 | @Temporal(TemporalType.TIMESTAMP) |
... | ... | @@ -143,7 +143,7 @@ public class DocumentoGed extends PersistentObjectUnidade implements Cloneable { |
143 | 143 | |
144 | 144 | /** Atributo formaCriacao. */ |
145 | 145 | @ManyToOne(fetch = FetchType.LAZY) |
146 | - @JsonView({ ViewsEcm.DocumentoGedEdit.class, Views.ProcessoEdit.class }) | |
146 | + @JsonView({ ViewsEcm.DocumentoGedEdit.class, Views.ProcessoEdit.class, Views.ProcessoVHView.class}) | |
147 | 147 | private Dominio formaCriacao; |
148 | 148 | |
149 | 149 | /** Atributo status. */ |
... | ... | @@ -177,12 +177,12 @@ public class DocumentoGed extends PersistentObjectUnidade implements Cloneable { |
177 | 177 | |
178 | 178 | /** Atributo tipoDocumento. */ |
179 | 179 | @ManyToOne(fetch = FetchType.LAZY) |
180 | - @JsonView({ ViewsEcm.DocumentoGedEdit.class, Views.ProcessoEdit.class }) | |
180 | + @JsonView({ ViewsEcm.DocumentoGedEdit.class, Views.ProcessoEdit.class, Views.ProcessoVHView.class}) | |
181 | 181 | private TipoDocumento tipoDocumento; |
182 | 182 | |
183 | 183 | /** Atributo nivelAcesso. */ |
184 | 184 | @ManyToOne(fetch = FetchType.EAGER) |
185 | - @JsonView({ ViewsEcm.DocumentoGedEdit.class, Views.ProcessoEdit.class, ViewsEcm.ClassificacaoDocumentoGedView.class }) | |
185 | + @JsonView({ ViewsEcm.DocumentoGedEdit.class, Views.ProcessoEdit.class, ViewsEcm.ClassificacaoDocumentoGedView.class, Views.ProcessoVHView.class }) | |
186 | 186 | private NivelAcessoTipoDocumento nivelAcesso; |
187 | 187 | |
188 | 188 | @ManyToOne(fetch = FetchType.EAGER) |
... | ... | @@ -191,7 +191,7 @@ public class DocumentoGed extends PersistentObjectUnidade implements Cloneable { |
191 | 191 | |
192 | 192 | /** Atributo sigilo. */ |
193 | 193 | @ManyToOne(fetch = FetchType.LAZY) |
194 | - @JsonView({ ViewsEcm.DocumentoGedEdit.class, Views.ProcessoEdit.class, ViewsEcm.ClassificacaoDocumentoGedView.class }) | |
194 | + @JsonView({ ViewsEcm.DocumentoGedEdit.class, Views.ProcessoEdit.class, ViewsEcm.ClassificacaoDocumentoGedView.class, Views.ProcessoVHView.class}) | |
195 | 195 | private Sigilo sigilo; |
196 | 196 | |
197 | 197 | @ManyToOne(fetch = FetchType.LAZY) |
... | ... | @@ -220,7 +220,7 @@ public class DocumentoGed extends PersistentObjectUnidade implements Cloneable { |
220 | 220 | |
221 | 221 | /** Atributo anexo. */ |
222 | 222 | @OneToOne(mappedBy = "documentoGed", fetch = FetchType.EAGER) |
223 | - @JsonView({ ViewsEcm.DocumentoGedEdit.class, Views.ProcessoEdit.class, ViewsEcm.ClassificacaoDocumentoGedView.class }) | |
223 | + @JsonView({ ViewsEcm.DocumentoGedEdit.class, Views.ProcessoEdit.class, ViewsEcm.ClassificacaoDocumentoGedView.class, Views.ProcessoVHView.class}) | |
224 | 224 | private AnexoGed anexo; |
225 | 225 | |
226 | 226 | /** Atributo versaoAnterior. */ | ... | ... |
cit-ecm-api/src/main/java/br/com/centralit/api/model/HipoteseLegal.java
... | ... | @@ -69,7 +69,8 @@ public class HipoteseLegal extends PersistentObjectAudit { |
69 | 69 | private String descricao; |
70 | 70 | |
71 | 71 | /** Atributo nome. */ |
72 | - @JsonView({ ViewsEcm.HipoteseLegalList.class, ViewsEcm.TipoProcessoList.class, ViewsEcm.TipoDocumentoEdit.class, ViewsEcm.NivelAcessoTipoDocumentoEdit.class, ViewsEcm.DocumentoGedEdit.class, ViewsEcm.ProcessoEdit.class, ViewsEcm.NivelAcessoTipoProcessoEdit.class, ViewsEcm.MetadadoProcessoView.class }) | |
72 | + @JsonView({ ViewsEcm.HipoteseLegalList.class, ViewsEcm.TipoProcessoList.class, ViewsEcm.TipoDocumentoEdit.class, ViewsEcm.NivelAcessoTipoDocumentoEdit.class, ViewsEcm.DocumentoGedEdit.class, ViewsEcm.ProcessoEdit.class, ViewsEcm.NivelAcessoTipoProcessoEdit.class, ViewsEcm.MetadadoProcessoView.class, | |
73 | + Views.ProcessoVHView.class}) | |
73 | 74 | private String nome; |
74 | 75 | |
75 | 76 | /** Atributo fundamentacaoLegal. */ | ... | ... |
cit-ecm-api/src/main/java/br/com/centralit/api/model/InteressadoProcesso.java
... | ... | @@ -63,7 +63,7 @@ public class InteressadoProcesso extends PersistentObjectAudit { |
63 | 63 | |
64 | 64 | /** Atributo interessado. */ |
65 | 65 | @ManyToOne(fetch = FetchType.LAZY) |
66 | - @JsonView({ ViewsEcm.ProcessoEdit.class, ViewsEcm.MetadadoProcessoView.class }) | |
66 | + @JsonView({ ViewsEcm.ProcessoEdit.class, ViewsEcm.MetadadoProcessoView.class, Views.ProcessoVHView.class }) | |
67 | 67 | private Pessoa interessado; |
68 | 68 | |
69 | 69 | /** | ... | ... |
cit-ecm-api/src/main/java/br/com/centralit/api/model/NivelAcessoTipoDocumento.java
... | ... | @@ -64,7 +64,7 @@ public class NivelAcessoTipoDocumento extends PersistentObjectAudit { |
64 | 64 | |
65 | 65 | /** Atributo tipoAcesso. */ |
66 | 66 | @ManyToOne(fetch = FetchType.LAZY) |
67 | - @JsonView({ ViewsEcm.TipoDocumentoEdit.class, ViewsEcm.NivelAcessoTipoDocumentoEdit.class, ViewsEcm.DocumentoGedEdit.class, Views.ProcessoEdit.class }) | |
67 | + @JsonView({ ViewsEcm.TipoDocumentoEdit.class, ViewsEcm.NivelAcessoTipoDocumentoEdit.class, ViewsEcm.DocumentoGedEdit.class, Views.ProcessoEdit.class, Views.ProcessoVHView.class }) | |
68 | 68 | private Dominio nivelAcesso; |
69 | 69 | |
70 | 70 | /** Atributo tipoDocumento. */ | ... | ... |
cit-ecm-api/src/main/java/br/com/centralit/api/model/NivelAcessoTipoProcesso.java
... | ... | @@ -72,7 +72,7 @@ public class NivelAcessoTipoProcesso extends PersistentObjectAudit { |
72 | 72 | |
73 | 73 | /** Atributo tipoAcesso. */ |
74 | 74 | @ManyToOne(fetch = FetchType.LAZY) |
75 | - @JsonView({ ViewsEcm.TipoProcessoEdit.class, ViewsEcm.NivelAcessoTipoProcessoEdit.class, Views.ProcessoList.class, Views.UnidadeProcessoListView.class, ViewsEcm.MetadadoProcessoView.class }) | |
75 | + @JsonView({ ViewsEcm.TipoProcessoEdit.class, ViewsEcm.NivelAcessoTipoProcessoEdit.class, Views.ProcessoList.class, Views.UnidadeProcessoListView.class, ViewsEcm.MetadadoProcessoView.class, Views.ProcessoVHView.class}) | |
76 | 76 | private Dominio nivelAcesso; |
77 | 77 | |
78 | 78 | @OneToMany(fetch = FetchType.LAZY, mappedBy = "nivelAcessoTipoProcesso", cascade = CascadeType.ALL) | ... | ... |
cit-ecm-api/src/main/java/br/com/centralit/api/model/PlanoClassificacao.java
... | ... | @@ -77,7 +77,7 @@ public class PlanoClassificacao extends PersistentObjectAuditOrganizacao impleme |
77 | 77 | private String codigo; |
78 | 78 | |
79 | 79 | /** Atributo nome. */ |
80 | - @JsonView({ ViewsEcm.PlanoClassificacaoListView.class, ViewsEcm.PlanoClassificacaoParent.class, ViewsEcm.PlanoClassificacaoAutocompleteRecursive.class, ViewsEcm.PlanoCLassificacaoAutoComplete.class, ViewsEcm.TipoDocumentoEdit.class, ViewsEcm.PlanoCLassificacaoAutoComplete.class, ViewsEcm.TipoProcessoEdit.class, ViewsEcm.DocumentoGedEdit.class, ViewsEcm.ProcessoEdit.class }) | |
80 | + @JsonView({ ViewsEcm.PlanoClassificacaoListView.class, ViewsEcm.PlanoClassificacaoParent.class, ViewsEcm.PlanoClassificacaoAutocompleteRecursive.class, ViewsEcm.PlanoCLassificacaoAutoComplete.class, ViewsEcm.TipoDocumentoEdit.class, ViewsEcm.PlanoCLassificacaoAutoComplete.class, ViewsEcm.TipoProcessoEdit.class, ViewsEcm.DocumentoGedEdit.class, ViewsEcm.ProcessoEdit.class, Views.ProcessoVHView.class }) | |
81 | 81 | private String nome; |
82 | 82 | |
83 | 83 | /** Atributo observacao. */ |
... | ... | @@ -99,8 +99,9 @@ public class PlanoClassificacao extends PersistentObjectAuditOrganizacao impleme |
99 | 99 | @JsonView({ ViewsEcm.PlanoClassificacaoEditView.class }) |
100 | 100 | private Boolean permitirUsarComoClassificacao; |
101 | 101 | |
102 | + /** Atributo assunto. */ | |
102 | 103 | @Transient |
103 | - @JsonView({ ViewsEcm.PlanoCLassificacaoAutoComplete.class, ViewsEcm.TipoDocumentoEdit.class, ViewsEcm.TipoProcessoEdit.class, Views.ProcessoList.class, Views.DocumentoGedEdit.class, ViewsEcm.TipoDocumentoPlanoClassificacaoAutoCompleteView.class, Views.UnidadeProcessoListView.class, ViewsEcm.MetadadoProcessoView.class }) | |
104 | + @JsonView({ ViewsEcm.PlanoCLassificacaoAutoComplete.class, ViewsEcm.TipoDocumentoEdit.class, ViewsEcm.TipoProcessoEdit.class, Views.ProcessoList.class, Views.DocumentoGedEdit.class, ViewsEcm.TipoDocumentoPlanoClassificacaoAutoCompleteView.class, Views.UnidadeProcessoListView.class, ViewsEcm.MetadadoProcessoView.class, Views.ProcessoVHView.class }) | |
104 | 105 | private String assunto; |
105 | 106 | |
106 | 107 | /** Atributo tipoDestinacao. */ |
... | ... | @@ -361,9 +362,9 @@ public class PlanoClassificacao extends PersistentObjectAuditOrganizacao impleme |
361 | 362 | public String getAssunto() { |
362 | 363 | |
363 | 364 | StringBuilder sb = new StringBuilder(); |
364 | - | |
365 | + | |
365 | 366 | sb.append(this.getCodigo()).append(" - "); |
366 | - | |
367 | + | |
367 | 368 | setAssunto(this, sb); |
368 | 369 | |
369 | 370 | assunto = sb.toString().substring(0, sb.toString().length() - 2); | ... | ... |
cit-ecm-api/src/main/java/br/com/centralit/api/model/Processo.java
... | ... | @@ -80,11 +80,11 @@ public class Processo extends PersistentObjectUnidade { |
80 | 80 | /** Atributo id. */ |
81 | 81 | @Id |
82 | 82 | @GeneratedValue(strategy = GenerationType.AUTO) |
83 | - @JsonView({ Views.GenericView.class, Views.UnidadeProcessoListView.class }) | |
83 | + @JsonView({ Views.GenericView.class }) | |
84 | 84 | private Long id; |
85 | 85 | |
86 | 86 | /** Atributo assuntoComplementar. */ |
87 | - @JsonView({ Views.ProcessoList.class, Views.UnidadeProcessoListView.class, ViewsEcm.MetadadoProcessoView.class }) | |
87 | + @JsonView({ Views.ProcessoList.class, Views.UnidadeProcessoListView.class, ViewsEcm.MetadadoProcessoView.class, Views.ProcessoVHView.class }) | |
88 | 88 | private String assuntoComplementar; |
89 | 89 | |
90 | 90 | /** Atributo dataReferencia. */ |
... | ... | @@ -101,7 +101,7 @@ public class Processo extends PersistentObjectUnidade { |
101 | 101 | private Calendar dataConclusao; |
102 | 102 | |
103 | 103 | /** Atributo nup. */ |
104 | - @JsonView({ Views.ProcessoList.class, Views.ProcessoRelacionadoList.class, Views.AnexarProcesso.class, Views.ProcessoAutoCompleteView.class, Views.UnidadeProcessoListView.class, ViewsEcm.MetadadoProcessoView.class }) | |
104 | + @JsonView({ Views.ProcessoList.class, Views.ProcessoRelacionadoList.class, Views.AnexarProcesso.class, Views.ProcessoAutoCompleteView.class, Views.UnidadeProcessoListView.class, ViewsEcm.MetadadoProcessoView.class, Views.ProcessoVHView.class }) | |
105 | 105 | private String nup; |
106 | 106 | |
107 | 107 | /** Atributo nome. */ |
... | ... | @@ -115,14 +115,14 @@ public class Processo extends PersistentObjectUnidade { |
115 | 115 | private Boolean aprovado; |
116 | 116 | |
117 | 117 | /** Atributo observacaoGeral. */ |
118 | - @JsonView({ Views.ProcessoEdit.class, ViewsEcm.MetadadoProcessoView.class }) | |
118 | + @JsonView({ Views.ProcessoEdit.class, ViewsEcm.MetadadoProcessoView.class, Views.ProcessoVHView.class }) | |
119 | 119 | private String observacaoGeral; |
120 | 120 | |
121 | 121 | @JsonView({ Views.ProcessoEdit.class }) |
122 | 122 | private String tipoAssunto; |
123 | 123 | |
124 | 124 | /** Atributo idProcessInstance. */ |
125 | - @JsonView({ Views.ProcessoList.class, Views.UnidadeProcessoListView.class }) | |
125 | + @JsonView({ Views.ProcessoList.class, Views.UnidadeProcessoListView.class, Views.ProcessoVHView.class }) | |
126 | 126 | private Long idProcessInstance; |
127 | 127 | |
128 | 128 | /** Atributo aprovado. */ |
... | ... | @@ -143,7 +143,7 @@ public class Processo extends PersistentObjectUnidade { |
143 | 143 | |
144 | 144 | /** Atributo status. */ |
145 | 145 | @ManyToOne(fetch = FetchType.LAZY) |
146 | - @JsonView({ Views.ProcessoEdit.class, Views.UnidadeProcessoListView.class, Views.ProcessoAutoCompleteView.class, ViewsEcm.MetadadoProcessoView.class }) | |
146 | + @JsonView({ Views.ProcessoEdit.class, Views.UnidadeProcessoListView.class, Views.ProcessoAutoCompleteView.class, ViewsEcm.MetadadoProcessoView.class, Views.ProcessoVHView.class }) | |
147 | 147 | private Dominio status; |
148 | 148 | |
149 | 149 | /** Atributo tramitarDocumento. */ |
... | ... | @@ -152,18 +152,18 @@ public class Processo extends PersistentObjectUnidade { |
152 | 152 | private TramitarDocumento tramitarDocumento; |
153 | 153 | |
154 | 154 | /** Atributo tipoProcesso. */ |
155 | - @JsonView({ Views.ProcessoList.class, Views.ProcessoRelacionadoList.class, Views.AnexarProcesso.class, Views.UnidadeProcessoListView.class, ViewsEcm.MetadadoProcessoView.class, Views.ProcessoAutoCompleteView.class }) | |
155 | + @JsonView({ Views.ProcessoList.class, Views.ProcessoRelacionadoList.class, Views.AnexarProcesso.class, Views.UnidadeProcessoListView.class, ViewsEcm.MetadadoProcessoView.class, Views.ProcessoAutoCompleteView.class, Views.ProcessoVHView.class }) | |
156 | 156 | @ManyToOne(fetch = FetchType.LAZY) |
157 | 157 | private TipoProcesso tipoProcesso; |
158 | 158 | |
159 | 159 | /** Atributo assunto. */ |
160 | 160 | @ManyToOne(fetch = FetchType.LAZY) |
161 | - @JsonView({ Views.ProcessoList.class, Views.UnidadeProcessoListView.class, ViewsEcm.MetadadoProcessoView.class }) | |
161 | + @JsonView({ Views.ProcessoList.class, Views.UnidadeProcessoListView.class, ViewsEcm.MetadadoProcessoView.class, Views.ProcessoVHView.class }) | |
162 | 162 | private PlanoClassificacao assunto; |
163 | 163 | |
164 | 164 | /** Atributo nivelAcesso. */ |
165 | 165 | @ManyToOne(fetch = FetchType.LAZY) |
166 | - @JsonView({ Views.ProcessoList.class, Views.UnidadeProcessoListView.class, ViewsEcm.MetadadoProcessoView.class }) | |
166 | + @JsonView({ Views.ProcessoList.class, Views.UnidadeProcessoListView.class, ViewsEcm.MetadadoProcessoView.class, Views.ProcessoVHView.class }) | |
167 | 167 | private NivelAcessoTipoProcesso nivelAcesso; |
168 | 168 | |
169 | 169 | @ManyToOne(fetch = FetchType.LAZY) |
... | ... | @@ -177,7 +177,7 @@ public class Processo extends PersistentObjectUnidade { |
177 | 177 | |
178 | 178 | /** Atributo hipoteseLegal. */ |
179 | 179 | @ManyToOne(fetch = FetchType.LAZY) |
180 | - @JsonView({ Views.ProcessoEdit.class, ViewsEcm.MetadadoProcessoView.class }) | |
180 | + @JsonView({ Views.ProcessoEdit.class, ViewsEcm.MetadadoProcessoView.class, Views.ProcessoVHView.class }) | |
181 | 181 | private HipoteseLegal hipoteseLegal; |
182 | 182 | |
183 | 183 | /** Atributo cienciaProcesso. */ |
... | ... | @@ -202,12 +202,12 @@ public class Processo extends PersistentObjectUnidade { |
202 | 202 | |
203 | 203 | /** Atributo Interessados. */ |
204 | 204 | @OneToMany(fetch = FetchType.LAZY, mappedBy = "processo", cascade = CascadeType.ALL, orphanRemoval = true) |
205 | - @JsonView({ Views.ProcessoEdit.class, ViewsEcm.MetadadoProcessoView.class }) | |
205 | + @JsonView({ Views.ProcessoEdit.class, ViewsEcm.MetadadoProcessoView.class, Views.ProcessoVHView.class }) | |
206 | 206 | private Collection<InteressadoProcesso> interessados; |
207 | 207 | |
208 | 208 | /** Atributo documentos. */ |
209 | 209 | @OneToMany(fetch = FetchType.LAZY, mappedBy = "processo", cascade = CascadeType.ALL) |
210 | - @JsonView({ Views.ProcessoEdit.class }) | |
210 | + @JsonView({ Views.ProcessoEdit.class, Views.ProcessoVHView.class }) | |
211 | 211 | private Collection<DocumentoGed> documentos; |
212 | 212 | |
213 | 213 | /** Atributo relacionados. */ |
... | ... | @@ -229,9 +229,10 @@ public class Processo extends PersistentObjectUnidade { |
229 | 229 | private Collection<CredencialProcesso> credenciais; |
230 | 230 | |
231 | 231 | /** Atributo unidadesProcesso. */ |
232 | + @JsonView({ Views.ProcessoVHView.class }) | |
232 | 233 | @OneToMany(fetch = FetchType.LAZY, mappedBy = "processo", cascade = CascadeType.ALL) |
233 | 234 | private Collection<UnidadeProcesso> unidadesProcesso; |
234 | - | |
235 | + | |
235 | 236 | @Transient |
236 | 237 | @JsonView({ Views.ProcessoEdit.class }) |
237 | 238 | private boolean tramitado; |
... | ... | @@ -867,7 +868,6 @@ public class Processo extends PersistentObjectUnidade { |
867 | 868 | this.unidadesProcesso = unidadesProcesso; |
868 | 869 | } |
869 | 870 | |
870 | - | |
871 | 871 | /** |
872 | 872 | * <p> |
873 | 873 | * <b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a> |
... | ... | @@ -884,10 +884,8 @@ public class Processo extends PersistentObjectUnidade { |
884 | 884 | * @return boolean |
885 | 885 | */ |
886 | 886 | public boolean getTramitado() { |
887 | - | |
887 | + | |
888 | 888 | return !UtilColecao.isVazio(this.getUnidadesProcesso()) && this.getUnidadesProcesso().size() > 1; |
889 | 889 | } |
890 | - | |
891 | - | |
892 | 890 | |
893 | 891 | } | ... | ... |
cit-ecm-api/src/main/java/br/com/centralit/api/model/TipoDocumento.java
... | ... | @@ -67,7 +67,7 @@ public class TipoDocumento extends PersistentObjectAudit { |
67 | 67 | private String descricao; |
68 | 68 | |
69 | 69 | /** Atributo nome. */ |
70 | - @JsonView({ ViewsEcm.TipoDocumentoList.class, ViewsEcm.DocumentoGedEdit.class, Views.ProcessoEdit.class }) | |
70 | + @JsonView({ ViewsEcm.TipoDocumentoList.class, ViewsEcm.DocumentoGedEdit.class, Views.ProcessoEdit.class, Views.ProcessoVHView.class }) | |
71 | 71 | private String nome; |
72 | 72 | |
73 | 73 | /** Atributo formaCriacao. */ | ... | ... |
cit-ecm-api/src/main/java/br/com/centralit/api/model/TipoProcesso.java
... | ... | @@ -63,11 +63,11 @@ public class TipoProcesso extends PersistentObjectUnidade { |
63 | 63 | private Long id; |
64 | 64 | |
65 | 65 | /** Atributo descricao. */ |
66 | - @JsonView({ ViewsEcm.TipoProcessoList.class, Views.UnidadeProcessoListView.class }) | |
66 | + @JsonView({ ViewsEcm.TipoProcessoList.class, Views.UnidadeProcessoListView.class}) | |
67 | 67 | private String descricao; |
68 | 68 | |
69 | 69 | /** Atributo nome. */ |
70 | - @JsonView({ ViewsEcm.TipoProcessoList.class, Views.ProcessoList.class, Views.ProcessoRelacionadoList.class, ViewsEcm.MetadadoProcessoView.class }) | |
70 | + @JsonView({ ViewsEcm.TipoProcessoList.class, Views.ProcessoList.class, Views.ProcessoRelacionadoList.class, ViewsEcm.MetadadoProcessoView.class, Views.ProcessoVHView.class}) | |
71 | 71 | private String nome; |
72 | 72 | |
73 | 73 | /** Atributo nome. */ | ... | ... |
cit-ecm-api/src/main/java/br/com/centralit/api/model/UnidadeProcesso.java
... | ... | @@ -77,12 +77,12 @@ public class UnidadeProcesso extends PersistentObjectAudit { |
77 | 77 | |
78 | 78 | /** Atributo grupo. */ |
79 | 79 | @ManyToOne(fetch = FetchType.LAZY) |
80 | - @JsonView({ Views.EnviarProcessoView.class}) | |
80 | + @JsonView({ Views.EnviarProcessoView.class, Views.ProcessoVHView.class}) | |
81 | 81 | private Unidade unidade; |
82 | 82 | |
83 | 83 | /** Atributo usuarioResponsavel. */ |
84 | 84 | @ManyToOne(fetch = FetchType.LAZY) |
85 | - @JsonView({ Views.EnviarProcessoView.class, Views.UnidadeProcessoListView.class }) | |
85 | + @JsonView({ Views.EnviarProcessoView.class, Views.UnidadeProcessoListView.class, Views.ProcessoVHView.class}) | |
86 | 86 | private Usuario usuarioResponsavel; |
87 | 87 | |
88 | 88 | /** | ... | ... |
cit-ecm-api/src/main/java/br/com/centralit/api/security/CustomWebSecurityExpresssionRoot.java
... | ... | @@ -100,5 +100,27 @@ public class CustomWebSecurityExpresssionRoot extends WebSecurityExpressionRoot |
100 | 100 | |
101 | 101 | return this.credencialProcessoService.permiteRenunciar(idProcesso); |
102 | 102 | } |
103 | + | |
104 | + /** | |
105 | + * <p> | |
106 | + * <b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a> | |
107 | + * </p> | |
108 | + * | |
109 | + * <p> | |
110 | + * <b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a> | |
111 | + * </p> | |
112 | + * | |
113 | + * Método responsável por verificar se o usuario tem permissão para executar o processo | |
114 | + * | |
115 | + * @author rogerio.costa | |
116 | + * | |
117 | + * @return boolean | |
118 | + */ | |
119 | + public boolean permiteExecutar() { | |
120 | + | |
121 | + Long idProcesso = (Long) this.request.getSession().getAttribute("idProcesso"); | |
122 | + | |
123 | + return this.credencialProcessoService.permiteExecutar(idProcesso); | |
124 | + } | |
103 | 125 | |
104 | 126 | } | ... | ... |
cit-ecm-api/src/main/java/br/com/centralit/api/service/CredencialProcessoService.java
... | ... | @@ -221,4 +221,40 @@ public interface CredencialProcessoService extends GenericService<CredencialProc |
221 | 221 | */ |
222 | 222 | Collection<Grupo> findGrupoPorSigilo(Sigilo sigilo); |
223 | 223 | |
224 | + /** | |
225 | + * <p> | |
226 | + * <b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a> | |
227 | + * </p> | |
228 | + * | |
229 | + * <p> | |
230 | + * <b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a> | |
231 | + * </p> | |
232 | + * | |
233 | + * Método responsável por validar acesso para o processo | |
234 | + * | |
235 | + * @author rogerio.costa | |
236 | + * | |
237 | + * @param idProcessInstance | |
238 | + */ | |
239 | + void validarAcessoPesquisa(Long idProcessInstance); | |
240 | + | |
241 | + /** | |
242 | + * <p> | |
243 | + * <b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a> | |
244 | + * </p> | |
245 | + * | |
246 | + * <p> | |
247 | + * <b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a> | |
248 | + * </p> | |
249 | + * | |
250 | + * Método responsável por verificar se o usuario tem permissão para executar o processo | |
251 | + * | |
252 | + * @author rogerio.costa | |
253 | + * | |
254 | + * @param idProcesso | |
255 | + * | |
256 | + * @return Boolean | |
257 | + */ | |
258 | + Boolean permiteExecutar(Long idProcesso); | |
259 | + | |
224 | 260 | } | ... | ... |
cit-ecm-api/src/main/java/br/com/centralit/api/service/ProcessoService.java
... | ... | @@ -4,6 +4,7 @@ import java.util.Collection; |
4 | 4 | |
5 | 5 | import br.com.centralit.api.model.PlanoClassificacao; |
6 | 6 | import br.com.centralit.api.model.Processo; |
7 | +import br.com.centralit.api.viewHelper.ProcessoVH; | |
7 | 8 | import br.com.centralit.framework.service.arquitetura.GenericService; |
8 | 9 | |
9 | 10 | import com.googlecode.genericdao.search.ISearch; |
... | ... | @@ -238,4 +239,22 @@ public interface ProcessoService extends GenericService<Processo, Long> { |
238 | 239 | */ |
239 | 240 | Collection<Processo> autoCompleteProcessoEmAndametoByNup(String nup); |
240 | 241 | |
242 | + /** | |
243 | + * <p> | |
244 | + * <b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a> | |
245 | + * </p> | |
246 | + * | |
247 | + * <p> | |
248 | + * <b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a> | |
249 | + * </p> | |
250 | + * | |
251 | + * Método responsável por obter o processo. | |
252 | + * | |
253 | + * @author rogerio.costa | |
254 | + * | |
255 | + * @param id | |
256 | + * @return | |
257 | + */ | |
258 | + ProcessoVH getProcessoView(Long id); | |
259 | + | |
241 | 260 | } | ... | ... |
cit-ecm-api/src/main/java/br/com/centralit/api/service/UnidadeProcessoService.java
... | ... | @@ -229,4 +229,23 @@ public interface UnidadeProcessoService extends GenericService<UnidadeProcesso, |
229 | 229 | */ |
230 | 230 | Boolean isProcessoEnviado(Long idProcesso); |
231 | 231 | |
232 | + /** | |
233 | + * <p> | |
234 | + * <b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a> | |
235 | + * </p> | |
236 | + * | |
237 | + * <p> | |
238 | + * <b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a> | |
239 | + * </p> | |
240 | + * | |
241 | + * Método responsável por verificar se o processo pertence a unidade | |
242 | + * | |
243 | + * @author rogerio.costa | |
244 | + * | |
245 | + * @param idProcesso | |
246 | + * @param idUnidade | |
247 | + * @return boolean | |
248 | + */ | |
249 | + boolean isProcessoNaUnidadeUsuarioLogado(Long idProcesso); | |
250 | + | |
232 | 251 | } | ... | ... |
cit-ecm-api/src/main/java/br/com/centralit/api/service/impl/CredencialProcessoServiceImpl.java
... | ... | @@ -5,6 +5,8 @@ import java.util.Collection; |
5 | 5 | import java.util.LinkedList; |
6 | 6 | import java.util.List; |
7 | 7 | |
8 | +import javax.servlet.http.HttpServletRequest; | |
9 | + | |
8 | 10 | import org.springframework.beans.factory.annotation.Autowired; |
9 | 11 | import org.springframework.stereotype.Service; |
10 | 12 | |
... | ... | @@ -19,6 +21,7 @@ import br.com.centralit.api.service.GrupoService; |
19 | 21 | import br.com.centralit.api.service.HistoricoCredencialProcessoService; |
20 | 22 | import br.com.centralit.api.service.ProcessoService; |
21 | 23 | import br.com.centralit.api.service.SigiloService; |
24 | +import br.com.centralit.api.service.UnidadeProcessoService; | |
22 | 25 | import br.com.centralit.api.service.UsuarioService; |
23 | 26 | import br.com.centralit.api.viewHelper.GrupoUsuarioVH; |
24 | 27 | import br.com.centralit.api.viewHelper.HerancaSistemaVH; |
... | ... | @@ -89,6 +92,14 @@ public class CredencialProcessoServiceImpl extends GenericServiceImpl<Credencial |
89 | 92 | @Autowired |
90 | 93 | private SigiloService sigiloService; |
91 | 94 | |
95 | + /** Atributo unidadeProcessoService. */ | |
96 | + @Autowired | |
97 | + private UnidadeProcessoService unidadeProcessoService; | |
98 | + | |
99 | + /** Atributo request. */ | |
100 | + @Autowired | |
101 | + private HttpServletRequest request; | |
102 | + | |
92 | 103 | /** |
93 | 104 | * Responsável pela criação de novas instâncias desta classe. |
94 | 105 | * |
... | ... | @@ -812,4 +823,44 @@ public class CredencialProcessoServiceImpl extends GenericServiceImpl<Credencial |
812 | 823 | return Boolean.FALSE; |
813 | 824 | } |
814 | 825 | |
826 | + @Override | |
827 | + public void validarAcessoPesquisa(Long idProcessInstance) { | |
828 | + | |
829 | + Processo processo = (Processo) this.processoService.findByKeyValueUnique("idProcessInstance", idProcessInstance.toString()); | |
830 | + | |
831 | + this.request.getSession().setAttribute("idProcesso", processo.getId()); | |
832 | + | |
833 | + } | |
834 | + | |
835 | + /** | |
836 | + * <p> | |
837 | + * <b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a> | |
838 | + * </p> | |
839 | + * | |
840 | + * <p> | |
841 | + * <b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a> | |
842 | + * </p> | |
843 | + * | |
844 | + * Método responsável por verificar se o usuario tem permissão para executar o processo | |
845 | + * | |
846 | + * @author rogerio.costa | |
847 | + * | |
848 | + * @param idProcesso | |
849 | + * | |
850 | + * @return Boolean | |
851 | + */ | |
852 | + public Boolean permiteExecutar(Long idProcesso) { | |
853 | + | |
854 | + Processo processo = this.processoService.find(idProcesso); | |
855 | + | |
856 | + if (processo.getNivelAcesso().getNivelAcesso().getCodigo().equals(2L)) { | |
857 | + | |
858 | + return Boolean.TRUE; | |
859 | + | |
860 | + } | |
861 | + | |
862 | + return this.unidadeProcessoService.isProcessoNaUnidadeUsuarioLogado(idProcesso); | |
863 | + | |
864 | + } | |
865 | + | |
815 | 866 | } | ... | ... |
cit-ecm-api/src/main/java/br/com/centralit/api/service/impl/ProcessoServiceImpl.java
... | ... | @@ -46,6 +46,7 @@ import br.com.centralit.api.service.SolrService; |
46 | 46 | import br.com.centralit.api.service.TemporalidadeService; |
47 | 47 | import br.com.centralit.api.service.UnidadeProcessoService; |
48 | 48 | import br.com.centralit.api.service.UnidadeService; |
49 | +import br.com.centralit.api.viewHelper.ProcessoVH; | |
49 | 50 | import br.com.centralit.framework.esi.enumerated.VariableTypeEnum; |
50 | 51 | import br.com.centralit.framework.esi.environment.EnvironmentOutput; |
51 | 52 | import br.com.centralit.framework.esi.environment.EnvironmentVariable; |
... | ... | @@ -99,6 +100,8 @@ import com.googlecode.genericdao.search.SearchResult; |
99 | 100 | @Service("processoService") |
100 | 101 | public class ProcessoServiceImpl extends GenericServiceImpl<Processo, Long> implements ProcessoService { |
101 | 102 | |
103 | + private static final String ECM_VALIDACAO_PERMISSAO_OPERACAO = "ECM.VALIDACAO.PERMISSAO_OPERACAO"; | |
104 | + | |
102 | 105 | /** Cosntante VALIDAR_OUTRAS_UNIDADES. */ |
103 | 106 | private static final String VALIDAR_OUTRAS_UNIDADES = "ECM.VALIDACAO.VALIDAR_ALTERACAO_NIVEL_ACESSO_OUTRAS_UNIDADES"; |
104 | 107 | |
... | ... | @@ -153,7 +156,7 @@ public class ProcessoServiceImpl extends GenericServiceImpl<Processo, Long> impl |
153 | 156 | /** Atributo notificacaoService. */ |
154 | 157 | @Autowired |
155 | 158 | private NotificacaoService notificacaoService; |
156 | - | |
159 | + | |
157 | 160 | @Autowired |
158 | 161 | private HistoricoAlteracaoProcessoService historicoAlteracaoProcessoService; |
159 | 162 | |
... | ... | @@ -176,25 +179,24 @@ public class ProcessoServiceImpl extends GenericServiceImpl<Processo, Long> impl |
176 | 179 | entity.setNivelAcessoOriginal(entity.getNivelAcesso()); |
177 | 180 | |
178 | 181 | Processo processo = super.save(entity); |
179 | - | |
182 | + | |
180 | 183 | if (processo.getTipoProtocolo().getCodigo().equals(1L)) { |
181 | 184 | this.gerarNUP(processo); |
182 | 185 | } |
183 | - | |
186 | + | |
184 | 187 | this.historicoAlteracaoProcessoService.gerarHistoricoIniciacaoProcesso(processo); |
185 | 188 | |
186 | 189 | this.unidadeProcessoService.saveUnidadeProcesso(processo); |
187 | - | |
188 | - | |
189 | - this.saveSolr(processo); | |
190 | 190 | |
191 | 191 | // Verifica se o processo é sigiloso, verdadeiro sejá estarta o businessProcess, falso envia uma notificação para os grupos responsáeis. |
192 | 192 | if (!UtilObjeto.isReferencia(processo.getSigilo())) { |
193 | - | |
193 | + | |
194 | 194 | entity.setStatus(this.dominioService.findByChaveAndCodigo(Dominio.TIPO_STATUS_PROCESSO_ECM, Dominio.TIPO_STATUS_PROCESSO_ECM_EM_ANDAMENTO)); |
195 | - | |
195 | + | |
196 | 196 | this.startBusinessProcess(processo); |
197 | - | |
197 | + | |
198 | + this.saveSolr(processo); | |
199 | + | |
198 | 200 | } else { |
199 | 201 | |
200 | 202 | this.enviarNotificacaoProcessoSigiloso(processo); |
... | ... | @@ -288,10 +290,7 @@ public class ProcessoServiceImpl extends GenericServiceImpl<Processo, Long> impl |
288 | 290 | |
289 | 291 | try { |
290 | 292 | |
291 | - if (!UtilObjeto.isReferencia(processo.getSigilo())) { | |
292 | - | |
293 | - this.solrService.addProcesso(processo); | |
294 | - } | |
293 | + this.solrService.addProcesso(processo); | |
295 | 294 | |
296 | 295 | } catch (final Exception e) { |
297 | 296 | |
... | ... | @@ -710,6 +709,72 @@ public class ProcessoServiceImpl extends GenericServiceImpl<Processo, Long> impl |
710 | 709 | * <b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a> |
711 | 710 | * </p> |
712 | 711 | * |
712 | + * Método responsável por obter o processo. | |
713 | + * | |
714 | + * @author rogerio.costa | |
715 | + * | |
716 | + * @param id | |
717 | + * @return | |
718 | + */ | |
719 | + public ProcessoVH getProcessoView(Long id) { | |
720 | + | |
721 | + Processo processo = super.getReference(id); | |
722 | + | |
723 | + this.verificarPermissaoAcessoProcesso(id, processo); | |
724 | + | |
725 | + processo.setDocumentos(this.documentoGedService.findByIdProcessoUltimaVersao(id)); | |
726 | + | |
727 | + ProcessoVH processoVH = new ProcessoVH(); | |
728 | + | |
729 | + processoVH.setProcesso(processo); | |
730 | + | |
731 | + return processoVH; | |
732 | + } | |
733 | + | |
734 | + /** | |
735 | + * <p> | |
736 | + * <b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a> | |
737 | + * </p> | |
738 | + * | |
739 | + * <p> | |
740 | + * <b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a> | |
741 | + * </p> | |
742 | + * | |
743 | + * Método responsável por verificar se o usuario contem permissão para acessar o processo | |
744 | + * | |
745 | + * @author rogerio.costa | |
746 | + * | |
747 | + * @param id | |
748 | + * @param processo | |
749 | + */ | |
750 | + private void verificarPermissaoAcessoProcesso(Long id, Processo processo) { | |
751 | + | |
752 | + if (processo.getNivelAcesso().getNivelAcesso().getCodigo().equals(0L)) { | |
753 | + | |
754 | + if (!this.credencialProcessoService.contemPermissaoProcesso(id)) { | |
755 | + | |
756 | + throw new BusinessException(ECM_VALIDACAO_PERMISSAO_OPERACAO, CodigoErro.REGRA_NEGOCIO.getValue()); | |
757 | + } | |
758 | + | |
759 | + } else if (processo.getNivelAcesso().getNivelAcesso().getCodigo().equals(1L)) { | |
760 | + | |
761 | + if (!this.unidadeProcessoService.isProcessoNaUnidadeUsuarioLogado(id)) { | |
762 | + | |
763 | + throw new BusinessException(ECM_VALIDACAO_PERMISSAO_OPERACAO, CodigoErro.REGRA_NEGOCIO.getValue()); | |
764 | + | |
765 | + } | |
766 | + } | |
767 | + } | |
768 | + | |
769 | + /** | |
770 | + * <p> | |
771 | + * <b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a> | |
772 | + * </p> | |
773 | + * | |
774 | + * <p> | |
775 | + * <b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a> | |
776 | + * </p> | |
777 | + * | |
713 | 778 | * Método responsável por iniciar o gerenciamento do processo |
714 | 779 | * |
715 | 780 | * @author rogerio.costa |
... | ... | @@ -759,7 +824,7 @@ public class ProcessoServiceImpl extends GenericServiceImpl<Processo, Long> impl |
759 | 824 | unidadeProcesso.setPrimeiroAcesso(Boolean.FALSE); |
760 | 825 | |
761 | 826 | this.historicoAtribuicaoProcessoService.saveHistorico(unidadeProcesso); |
762 | - | |
827 | + | |
763 | 828 | this.historicoAlteracaoProcessoService.gerarHistoricoCapturaDeProcesso(unidadeProcesso); |
764 | 829 | |
765 | 830 | return Boolean.TRUE; |
... | ... | @@ -1200,14 +1265,14 @@ public class ProcessoServiceImpl extends GenericServiceImpl<Processo, Long> impl |
1200 | 1265 | |
1201 | 1266 | return this.processoDao.getProcessoByProtocolo(nup); |
1202 | 1267 | } |
1203 | - | |
1268 | + | |
1204 | 1269 | /** |
1205 | 1270 | * |
1206 | 1271 | */ |
1207 | - public Collection<Processo> autoCompleteProcessoEmAndametoByNup(String nup){ | |
1208 | - | |
1209 | - return this.processoDao.autoCompleteProcessoEmAndamentoByNup(nup ); | |
1210 | - | |
1272 | + public Collection<Processo> autoCompleteProcessoEmAndametoByNup(String nup) { | |
1273 | + | |
1274 | + return this.processoDao.autoCompleteProcessoEmAndamentoByNup(nup); | |
1275 | + | |
1211 | 1276 | } |
1212 | 1277 | |
1213 | 1278 | } | ... | ... |
cit-ecm-api/src/main/java/br/com/centralit/api/service/impl/SolrServiceImpl.java
... | ... | @@ -78,7 +78,7 @@ public class SolrServiceImpl implements SolrService { |
78 | 78 | |
79 | 79 | // Add some example docs |
80 | 80 | SolrInputDocument processoDoc = new SolrInputDocument(); |
81 | - processoDoc.setField("id", "proc_" + processo.getId()); | |
81 | + processoDoc.setField("id", processo.getId()); | |
82 | 82 | processoDoc.setField("nup", processo.getNup()); |
83 | 83 | processoDoc.setField("objeto", "Processo"); |
84 | 84 | processoDoc.setField("tipoProcesso", processo.getTipoProcesso().getNome()); |
... | ... | @@ -93,6 +93,7 @@ public class SolrServiceImpl implements SolrService { |
93 | 93 | processoDoc.setField("situacao", ""); |
94 | 94 | processoDoc.setField("nivelAcesso", processo.getNivelAcesso().getNivelAcesso().getDescricao()); |
95 | 95 | processoDoc.setField("formatoDocumento", ""); |
96 | + processoDoc.setField("idProcessInstance", processo.getIdProcessInstance().toString()); | |
96 | 97 | |
97 | 98 | solrClient.add(processoDoc); |
98 | 99 | |
... | ... | @@ -117,7 +118,7 @@ public class SolrServiceImpl implements SolrService { |
117 | 118 | |
118 | 119 | sb.append("doc_").append(documentoGed.getIdRaiz() != null ? documentoGed.getIdRaiz() : documentoGed.getId()); |
119 | 120 | |
120 | - documentoDoc.setField("id", "doc_" + sb.toString()); | |
121 | + documentoDoc.setField("id", sb.toString()); | |
121 | 122 | documentoDoc.setField("nup", documentoGed.getNumero()); |
122 | 123 | documentoDoc.setField("objeto", "Documento"); |
123 | 124 | documentoDoc.setField("tipoDocumento", documentoGed.getTipoDocumento().getNome()); |
... | ... | @@ -131,6 +132,8 @@ public class SolrServiceImpl implements SolrService { |
131 | 132 | documentoDoc.setField("situacao", ""); |
132 | 133 | documentoDoc.setField("nivelAcesso", documentoGed.getNivelAcesso().getNivelAcesso().getDescricao()); |
133 | 134 | documentoDoc.setField("formatoDocumento", documentoGed.getFormaCriacao().getDescricao()); |
135 | + documentoDoc.setField("idProcessInstance", documentoGed.getProcesso().getIdProcessInstance().toString()); | |
136 | + documentoDoc.setField("idProcesso", documentoGed.getProcesso().getId().toString()); | |
134 | 137 | // verifica se o nivel de acesso é restrito |
135 | 138 | if (!documentoGed.getNivelAcesso().getNivelAcesso().getCodigo().equals(1L)) { |
136 | 139 | ... | ... |
cit-ecm-api/src/main/java/br/com/centralit/api/service/impl/UnidadeProcessoServiceImpl.java
... | ... | @@ -390,4 +390,32 @@ public class UnidadeProcessoServiceImpl extends GenericServiceImpl<UnidadeProces |
390 | 390 | |
391 | 391 | } |
392 | 392 | |
393 | + /** | |
394 | + * <p> | |
395 | + * <b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a> | |
396 | + * </p> | |
397 | + * | |
398 | + * <p> | |
399 | + * <b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a> | |
400 | + * </p> | |
401 | + * | |
402 | + * Método responsável por verificar se o processo pertence a unidade | |
403 | + * | |
404 | + * @author rogerio.costa | |
405 | + * | |
406 | + * @param idProcesso | |
407 | + * @param idUnidade | |
408 | + * @return boolean | |
409 | + */ | |
410 | + public boolean isProcessoNaUnidadeUsuarioLogado(Long idProcesso) { | |
411 | + | |
412 | + if (UtilObjeto.isReferencia(this.getUsuario().getUnidade())) { | |
413 | + | |
414 | + return this.unidadeProcessoDao.isProcessoNaUnidadeUsuarioLogado(idProcesso, this.getUsuario().getUnidade().getId()); | |
415 | + } | |
416 | + | |
417 | + return Boolean.FALSE; | |
418 | + | |
419 | + } | |
420 | + | |
393 | 421 | } | ... | ... |
cit-ecm-api/src/main/java/br/com/centralit/api/viewHelper/ProcessoVH.java
0 → 100644
... | ... | @@ -0,0 +1,71 @@ |
1 | +package br.com.centralit.api.viewHelper; | |
2 | + | |
3 | +import java.io.Serializable; | |
4 | + | |
5 | +import br.com.centralit.api.model.Processo; | |
6 | +import br.com.centralit.framework.json.Views; | |
7 | + | |
8 | +import com.fasterxml.jackson.annotation.JsonView; | |
9 | + | |
10 | +/** | |
11 | + * <p> | |
12 | + * <img src="http://centralit.com.br/images/logo_central.png"> | |
13 | + * </p> | |
14 | + * | |
15 | + * <p> | |
16 | + * <b>Company: </b> Central IT - Governança Corporativa - | |
17 | + * </p> | |
18 | + * | |
19 | + * <p> | |
20 | + * <b>Title: </b> | |
21 | + * </p> | |
22 | + * | |
23 | + * <p> | |
24 | + * <b>Description: </b> | |
25 | + * </p> | |
26 | + * | |
27 | + * <p> | |
28 | + * <b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a> | |
29 | + * </p> | |
30 | + * | |
31 | + * <p> | |
32 | + * <b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a> | |
33 | + * </p> | |
34 | + * | |
35 | + * @since 28/04/2016 - 17:27:03 | |
36 | + * | |
37 | + * @version 1.0.0 | |
38 | + * | |
39 | + * @author rogerio.costa | |
40 | + * | |
41 | + */ | |
42 | +public class ProcessoVH implements Serializable { | |
43 | + | |
44 | + /** Atributo serialVersionUID. */ | |
45 | + private static final long serialVersionUID = 8493356167825021268L; | |
46 | + | |
47 | + /** Atributo processo. */ | |
48 | + @JsonView({ Views.ProcessoVHView.class }) | |
49 | + private Processo processo; | |
50 | + | |
51 | + /** | |
52 | + * Retorna o valor do atributo <code>processo</code> | |
53 | + * | |
54 | + * @return <code>Processo</code> | |
55 | + */ | |
56 | + public Processo getProcesso() { | |
57 | + | |
58 | + return processo; | |
59 | + } | |
60 | + | |
61 | + /** | |
62 | + * Define o valor do atributo <code>processo</code>. | |
63 | + * | |
64 | + * @param processo | |
65 | + */ | |
66 | + public void setProcesso(Processo processo) { | |
67 | + | |
68 | + this.processo = processo; | |
69 | + } | |
70 | + | |
71 | +} | ... | ... |
cit-ecm-api/src/main/resources/scripts/v1.0.0-alpha9/01-cit-ecm-1.0.0-ALFA-3-postgres.sql
... | ... | @@ -36,4 +36,9 @@ INSERT INTO tarjaassinatura(id, databloqueio, datainativo, datacriacao, dataedic |
36 | 36 | VALUES (NEXTVAL('hibernate_sequence'), LOCALTIMESTAMP, NULL, LOCALTIMESTAMP, LOCALTIMESTAMP, 0, '', '', null, (select id from seguranca_usuario where username = 'admin'), null, null, (select id from dominio where chave = 'tipoAssinatura' and codigo = 1)); |
37 | 37 | INSERT INTO tarjaassinatura(id, databloqueio, datainativo, datacriacao, dataedicao, version, conteudo, descricao, inativador_id, autor_id, editor_id, anexoimagem_id, tipoassinatura_id) |
38 | 38 | VALUES (NEXTVAL('hibernate_sequence'), LOCALTIMESTAMP, NULL, LOCALTIMESTAMP, LOCALTIMESTAMP, 0, '', '', null, (select id from seguranca_usuario where username = 'admin'), null, null, (select id from dominio where chave = 'tipoAssinatura' and codigo = 2)); |
39 | --- CIRO - 18/04/2016 - FIM | |
40 | 39 | \ No newline at end of file |
40 | + | |
41 | +update dominio set chave='estadoDocumentoGed' where chave = 'statusDocumentoGed'; | |
42 | +-- CIRO - 18/04/2016 - FIM | |
43 | + | |
44 | + | |
45 | + | ... | ... |
cit-ecm-web/src/main/java/br/com/centralit/controller/CredencialProcessoController.java
... | ... | @@ -11,7 +11,6 @@ import org.springframework.web.bind.annotation.RequestMethod; |
11 | 11 | import org.springframework.web.bind.annotation.RequestParam; |
12 | 12 | import org.springframework.web.bind.annotation.ResponseBody; |
13 | 13 | |
14 | -import br.com.centralit.api.framework.json.ViewsEcm; | |
15 | 14 | import br.com.centralit.api.model.CredencialProcesso; |
16 | 15 | import br.com.centralit.api.service.CredencialProcessoService; |
17 | 16 | import br.com.centralit.api.viewHelper.GrupoUsuarioVH; |
... | ... | @@ -167,6 +166,18 @@ public class CredencialProcessoController extends GenericController<CredencialPr |
167 | 166 | return responseBody; |
168 | 167 | } |
169 | 168 | |
169 | + @RequestMapping(method = RequestMethod.POST, value = "/validarAcessoPesquisa") | |
170 | + @ResponseBody | |
171 | + public ResponseBodyWrapper validarAcessoPesquisa(@RequestBody String idProcessInstance) { | |
172 | + | |
173 | + this.credencialProcessoService.validarAcessoPesquisa(Long.parseLong(idProcessInstance)); | |
174 | + | |
175 | + ResponseBodyWrapper responseBody = new ResponseBodyWrapper(Boolean.TRUE, Views.GenericView.class); | |
176 | + | |
177 | + return responseBody; | |
178 | + | |
179 | + } | |
180 | + | |
170 | 181 | @Override |
171 | 182 | public Class<Views.CredencialProcessoView> getEditView() { |
172 | 183 | ... | ... |
cit-ecm-web/src/main/java/br/com/centralit/controller/ProcessoController.java
... | ... | @@ -148,6 +148,15 @@ public class ProcessoController extends GenericController<Processo> { |
148 | 148 | return responseBody; |
149 | 149 | } |
150 | 150 | |
151 | + @RequestMapping(method = RequestMethod.GET, value = "/getProcessoVH") | |
152 | + @ResponseBody | |
153 | + public ResponseBodyWrapper getProcessoVH(@RequestParam(value = "idProcesso") Long idProcesso) { | |
154 | + | |
155 | + ResponseBodyWrapper responseBody = new ResponseBodyWrapper(this.processoService.getProcessoView(idProcesso), Views.ProcessoVHView.class); | |
156 | + | |
157 | + return responseBody; | |
158 | + } | |
159 | + | |
151 | 160 | /** |
152 | 161 | * <p> |
153 | 162 | * <b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a> |
... | ... | @@ -185,9 +194,9 @@ public class ProcessoController extends GenericController<Processo> { |
185 | 194 | search.setResultMode(Search.RESULT_MAP); |
186 | 195 | |
187 | 196 | SearchResult searchResult = null; |
188 | - | |
197 | + | |
189 | 198 | String nomeGrid = UtilString.isNullOrEmpty(searchParams.getNome()) ? "" : searchParams.getNome(); |
190 | - | |
199 | + | |
191 | 200 | switch (nomeGrid) { |
192 | 201 | case Processo.GRID_CLASSIFICACAO_PROCESSO_DOCUMENTO: |
193 | 202 | searchResult = this.processoService.searchAndCountPorSigilo(search); | ... | ... |
cit-ecm-web/src/main/java/br/com/centralit/controller/UnidadeProcessoController.java
... | ... | @@ -58,7 +58,7 @@ import br.com.centralit.framework.view.ResultResponseVH; |
58 | 58 | * @author rogerio.costa |
59 | 59 | * |
60 | 60 | */ |
61 | -@SuppressWarnings({"unchecked", "rawtypes"}) | |
61 | +@SuppressWarnings({ "unchecked", "rawtypes" }) | |
62 | 62 | @Controller |
63 | 63 | @RequestMapping("/rest/unidadeProcesso") |
64 | 64 | public class UnidadeProcessoController extends GenericController<UnidadeProcesso> { |
... | ... | @@ -150,6 +150,32 @@ public class UnidadeProcessoController extends GenericController<UnidadeProcesso |
150 | 150 | return responseBody; |
151 | 151 | } |
152 | 152 | |
153 | + /** | |
154 | + * <p> | |
155 | + * <b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a> | |
156 | + * </p> | |
157 | + * | |
158 | + * <p> | |
159 | + * <b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a> | |
160 | + * </p> | |
161 | + * | |
162 | + * Método responsável por | |
163 | + * | |
164 | + * @author rogerio.costa | |
165 | + * | |
166 | + * @param idProcesso | |
167 | + * @param idUnidade | |
168 | + * @return | |
169 | + */ | |
170 | + @RequestMapping(value = "/isProcessoNaUnidadeUsuarioLogado", method = RequestMethod.GET, produces = "application/json") | |
171 | + @ResponseBody | |
172 | + public ResponseBodyWrapper isProcessoNaUnidadeUsuarioLogado(@RequestParam(value = "idProcesso") Long idProcesso) { | |
173 | + | |
174 | + ResponseBodyWrapper responseBody = new ResponseBodyWrapper(this.unidadeProcessoService.isProcessoNaUnidadeUsuarioLogado(idProcesso), Views.GenericView.class); | |
175 | + | |
176 | + return responseBody; | |
177 | + } | |
178 | + | |
153 | 179 | @RequestMapping(value = "/getPage", method = RequestMethod.POST) |
154 | 180 | @ResponseBody |
155 | 181 | public ResponseBodyWrapper findGrid(@RequestBody SearchParams searchParams) { |
... | ... | @@ -161,13 +187,13 @@ public class UnidadeProcessoController extends GenericController<UnidadeProcesso |
161 | 187 | search.setResultMode(Search.RESULT_MAP); |
162 | 188 | |
163 | 189 | SearchResult searchResult = null; |
164 | - | |
190 | + | |
165 | 191 | String nomeGrid = UtilString.isNullOrEmpty(searchParams.getNome()) ? "" : searchParams.getNome(); |
166 | - | |
192 | + | |
167 | 193 | switch (nomeGrid) { |
168 | 194 | case Processo.GRID_PROCESSO_NA_UNIDADE: |
169 | - searchResult = this.unidadeProcessoService.searchAndCountPorUnidade(search); | |
170 | - break; | |
195 | + searchResult = this.unidadeProcessoService.searchAndCountPorUnidade(search); | |
196 | + break; | |
171 | 197 | default: |
172 | 198 | searchResult = genericService.searchAndCount(search); |
173 | 199 | break; |
... | ... | @@ -185,7 +211,6 @@ public class UnidadeProcessoController extends GenericController<UnidadeProcesso |
185 | 211 | return responseBody; |
186 | 212 | } |
187 | 213 | |
188 | - | |
189 | 214 | @Override |
190 | 215 | public Class<Views.EnviarProcessoView> getEditView() { |
191 | 216 | ... | ... |
cit-ecm-web/src/main/java/br/com/centralit/listener/StartupListenerEcm.java
... | ... | @@ -458,7 +458,7 @@ public class StartupListenerEcm extends UtilStartup implements ApplicationListen |
458 | 458 | internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.ASSINATURA_DO_DOCUMENTO", "Assinatura do Documento", dominio, modulo)); |
459 | 459 | internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.DOCUMENTO_SEM_ASSINATURA", "Documento sem assinaturas!", dominio, modulo)); |
460 | 460 | internacionalizacaoList.add(new Internacionalizacao("ECM.LABEL.DADOS_PROCESSO_ANEXADO", "Dados do Processo Anexado", dominio, modulo)); |
461 | - | |
461 | + | |
462 | 462 | } |
463 | 463 | |
464 | 464 | /** |
... | ... | @@ -578,5 +578,6 @@ public class StartupListenerEcm extends UtilStartup implements ApplicationListen |
578 | 578 | internacionalizacaoList.add(new Internacionalizacao("ECM.MSG.USUARIO_SEM_PESSOA", "Usuário não está presente no Cadastro de Pessoa!", dominio, modulo)); |
579 | 579 | internacionalizacaoList.add(new Internacionalizacao("ECM.MSG.DOCUMENTO_SEM_ASSINATURAS", "Esta versão do Documento não possui assinaturas!", dominio, modulo)); |
580 | 580 | internacionalizacaoList.add(new Internacionalizacao("ECM.MSG.DOCUMENTO_JA_ASSINADO", "Documento já foi assinado por este usuário!", dominio, modulo)); |
581 | + internacionalizacaoList.add(new Internacionalizacao("ECM.MSG.INFORMACAO_RESTRITA", "Informação restrita", dominio, modulo)); | |
581 | 582 | } |
582 | 583 | } | ... | ... |
cit-ecm-web/src/main/webapp/assets/js/angular/custom/controller/GerenciarProcessoController.js
... | ... | @@ -694,6 +694,29 @@ citApp.controller('GerenciarProcessoController', [ '$scope', '$translate', '$tim |
694 | 694 | |
695 | 695 | }; |
696 | 696 | |
697 | + //Obter o processoVH | |
698 | + $scope.getProcessoVH = function (idProcesso) { | |
699 | + | |
700 | + $scope.setLoadingGet(true); | |
701 | + | |
702 | + ProcessoRepository.getProcessoVH(idProcesso).then(function(result) { | |
703 | + //Processo do scopo do gerenciamento | |
704 | + $scope.processoVH = result.originalElement; | |
705 | + | |
706 | + $scope.processo = $scope.processoVH.processo; | |
707 | + $scope.idProcesso = $scope.processo.id; | |
708 | + | |
709 | + $scope.fecharPagina(); | |
710 | + | |
711 | + $scope.apresentarCabecalho = true; | |
712 | + | |
713 | + $scope.widgetExemploIsCollapsed = false; | |
714 | + | |
715 | + $scope.setLoading(false); | |
716 | + }); | |
717 | + | |
718 | + }; | |
719 | + | |
697 | 720 | $scope.atualizarAtribuicaoProcesso = function (idProcesso){ |
698 | 721 | |
699 | 722 | ProcessoRepository.verificarAtribuicaoProcessoPrimeiroAcesso(idProcesso).then( function ( result ) { |
... | ... | @@ -718,7 +741,7 @@ citApp.controller('GerenciarProcessoController', [ '$scope', '$translate', '$tim |
718 | 741 | }); |
719 | 742 | |
720 | 743 | }); |
721 | - } | |
744 | + }; | |
722 | 745 | |
723 | 746 | }); |
724 | 747 | }; | ... | ... |
cit-ecm-web/src/main/webapp/assets/js/angular/custom/controller/SolrSearchController.js
... | ... | @@ -26,11 +26,13 @@ |
26 | 26 | * @param Utils |
27 | 27 | */ |
28 | 28 | |
29 | -citApp.controller('SolrSearchController', ['$scope','$attrs','$location','$route','$routeParams','$window','$timeout','SolrSearchService','Utils', "$compile", 'DominioRepository', '$filter', | |
30 | - function SolrSearchController($scope, $attrs, $location, $route, $routeParams, $window, $timeout, SolrSearchService, Utils, $compile, DominioRepository, $filter) { | |
29 | +citApp.controller('SolrSearchController', ['$scope','$attrs','$location','$route','$routeParams','$window','$timeout','SolrSearchService','Utils', "$compile", 'DominioRepository', '$filter', "workflowFilterCriteriaService", | |
30 | + "BusinessProcessRepository", "appService", "$rootScope", "$translate", 'UnidadeProcessoRepository', 'CredencialProcessoRepository', | |
31 | + function SolrSearchController($scope, $attrs, $location, $route, $routeParams, $window, $timeout, SolrSearchService, Utils, $compile, DominioRepository, $filter, workflowFilterCriteriaService, BusinessProcessRepository, | |
32 | + appService, $rootScope, $translate, UnidadeProcessoRepository, CredencialProcessoRepository) { | |
31 | 33 | |
32 | 34 | $scope.searchHintsField = 'tipoProcesso,tipoDocumento,objeto,assunto,autor,atribuidoA,destinatario,unidadeGeradora,situacao,nivelAcesso,dataCriacao'; |
33 | - | |
35 | + | |
34 | 36 | // instructional message to aid the user in constructing a query |
35 | 37 | $scope.messages = [ |
36 | 38 | "Enter one or more search terms. Press Enter to search.", |
... | ... | @@ -123,7 +125,7 @@ citApp.controller('SolrSearchController', ['$scope','$attrs','$location','$route |
123 | 125 | $scope.handleSetPage = function() { |
124 | 126 | |
125 | 127 | $scope.timeout = $timeout(function () { |
126 | - var query = SolrSearchService.createQuery("https://172.20.0.74:8983/solr/jcg"); | |
128 | + var query = SolrSearchService.createQuery("https://localhost:8983/solr/jcg"); | |
127 | 129 | query.setOption("rows", "10"); |
128 | 130 | query.setOption("facet", "true"); |
129 | 131 | query.setOption("facet.limit", $scope.maxHints); |
... | ... | @@ -187,6 +189,8 @@ citApp.controller('SolrSearchController', ['$scope','$attrs','$location','$route |
187 | 189 | results.docs[i].conteudo = results.docs[i].conteudo + item; |
188 | 190 | }); |
189 | 191 | |
192 | + }else{ | |
193 | + results.docs[i].conteudo = ""; | |
190 | 194 | } |
191 | 195 | } |
192 | 196 | |
... | ... | @@ -330,7 +334,7 @@ citApp.controller('SolrSearchController', ['$scope','$attrs','$location','$route |
330 | 334 | if ($scope.userQuery && $scope.userQuery.length >= $scope.minSearchLength) { |
331 | 335 | if ($scope.timeout) $timeout.cancel($scope.timeout); |
332 | 336 | $scope.timeout = $timeout(function () { |
333 | - var query = SolrSearchService.createQuery("https://172.20.0.74:8983/solr/jcg"); | |
337 | + var query = SolrSearchService.createQuery("https://localhost:8983/solr/jcg"); | |
334 | 338 | query.setOption("rows", "10"); |
335 | 339 | query.setOption("facet", "true"); |
336 | 340 | query.setOption("facet.limit", $scope.maxHints); |
... | ... | @@ -409,7 +413,7 @@ citApp.controller('SolrSearchController', ['$scope','$attrs','$location','$route |
409 | 413 | $scope.userQuery = "*:*"; |
410 | 414 | } |
411 | 415 | $scope.timeout = $timeout(function () { |
412 | - var query = SolrSearchService.createQuery("https://172.20.0.74:8983/solr/jcg"); | |
416 | + var query = SolrSearchService.createQuery("https://localhost:8983/solr/jcg"); | |
413 | 417 | query.setOption("rows", "10"); |
414 | 418 | query.setOption("facet", "true"); |
415 | 419 | query.setOption("facet.limit", $scope.maxHints); |
... | ... | @@ -440,7 +444,7 @@ citApp.controller('SolrSearchController', ['$scope','$attrs','$location','$route |
440 | 444 | valueFilter = "*:*"; |
441 | 445 | } |
442 | 446 | $scope.timeout = $timeout(function () { |
443 | - var query = SolrSearchService.createQuery("https://172.20.0.74:8983/solr/jcg"); | |
447 | + var query = SolrSearchService.createQuery("https://localhost:8983/solr/jcg"); | |
444 | 448 | query.setOption("rows", "10"); |
445 | 449 | query.setOption("facet", "true"); |
446 | 450 | query.setOption("facet.limit", $scope.maxHints); |
... | ... | @@ -600,8 +604,162 @@ citApp.controller('SolrSearchController', ['$scope','$attrs','$location','$route |
600 | 604 | $scope.parameterDatePesquisa = $.grep($scope.filtroDateList, function(e){ return e.codigo == 0; })[0].originalElement; |
601 | 605 | |
602 | 606 | }); |
603 | - | |
604 | - | |
607 | + | |
608 | + $scope.obterTransclude = function(doc) { | |
609 | + | |
610 | + doc.$show = !doc.$show; | |
611 | + $scope.documents.forEach(function(item){ | |
612 | + if(item.id != doc.id){ | |
613 | + item.$expandido = false; | |
614 | + item.$show = false; | |
615 | + } | |
616 | + }); | |
617 | + | |
618 | + $scope.docSelecionado = doc; | |
619 | + if(doc.$show){ | |
620 | + _getFilterCriteriaTarefa(); | |
621 | + _fetchBusinessProcess(doc); | |
622 | + }else{ | |
623 | + doc.$expandido = false; | |
624 | + doc.$show = false; | |
625 | + }; | |
626 | + }; | |
627 | + | |
628 | + function _getFilterCriteriaTarefa(){ | |
629 | + var filterService = workflowFilterCriteriaService.getDefaultFilterCriteria(); | |
630 | + $scope.filterCriteriaBusinessProcess = { | |
631 | + start : 1, | |
632 | + sort : 'workItem.processInstance.id', | |
633 | + limit : 10, | |
634 | + deadline : 1, | |
635 | + processDeadline : 1, | |
636 | + timeManagementStatus : "", | |
637 | + fields : [ 'workItem.id', 'workItem.processInstance.id'], | |
638 | + filters : [{type: 'numeric', field: 'workItem.processInstance.id', value : $scope.docSelecionado.idProcessInstance} | |
639 | + , {type: 'string', field: 'workItem.flowElement.name'} | |
640 | + , {type: 'string', field: 'workItem.processInstance.businessProcess.description'} | |
641 | + , {type: 'string', field: 'workItem.processInstance.flowStatus.name'}] | |
642 | + }; | |
643 | + $scope.filterCriteriaBusinessProcess.username = filterService.username; | |
644 | + $scope.filterCriteriaBusinessProcess.groups = filterService.groups; | |
645 | + } | |
646 | + | |
647 | + function _fetchBusinessProcess(doc) { | |
648 | + $scope.assignments = []; | |
649 | + $scope.btnAction = false; | |
650 | + $scope.workItem = null; | |
651 | + $scope.setLoadingGet(true); | |
652 | + BusinessProcessRepository.tasksByParam($scope.filterCriteriaBusinessProcess).then(function(result) { | |
653 | + $scope.assignments = result.originalElement.objects; | |
654 | + | |
655 | + if($scope.docSelecionado.idProcessInstance){ | |
656 | + CredencialProcessoRepository.validarAcessoPesquisa($scope.docSelecionado.idProcessInstance).then(function(result) { | |
657 | + | |
658 | + $scope.urlInclude= '/cit-ecm-web/html/pesquisa/tarefasProcesso.jsp?i=' + $scope.docSelecionado.id; | |
659 | + doc.$expandido = !doc.$expandido; | |
660 | + }); | |
661 | + | |
662 | + } | |
663 | + if($scope.assignments.length > 0){ | |
664 | + _recuperarPermissoes($scope.assignments[0].id, doc); | |
665 | + }; | |
666 | + $scope.setLoadingGet(false); | |
667 | + }); | |
668 | + }; | |
669 | + | |
670 | + function _recuperarPermissoes(idAssignment, doc){ | |
671 | + BusinessProcessRepository.getPermissions({id: idAssignment}).then(function(result) { | |
672 | + $scope.workItem = result.originalElement; | |
673 | + vincularWorkItemAssignments(); | |
674 | + $scope.btnAction = !(!$scope.workItem.execute && !$scope.workItem.suspend && !$scope.workItem.delegate && !$scope.workItem.restart && !$scope.workItem.visualize); | |
675 | + $scope.docSelecionado.workItem = $scope.workItem; | |
676 | + $scope.setLoadingGet(false); | |
677 | + }); | |
678 | + }; | |
679 | + | |
680 | + function vincularWorkItemAssignments(){ | |
681 | + $scope.assignments.forEach(function(assignment){ | |
682 | + assignment.workItem = $scope.workItem; | |
683 | + assignment.checked = false; | |
684 | + }); | |
685 | + if($scope.assignments.length > 0){ | |
686 | + $scope.assignments[0].checked = true; | |
687 | + } | |
688 | + }; | |
689 | + | |
690 | + $scope.executarTarefa = function(){ | |
691 | + _getAssignmentSelected(); | |
692 | + if($scope.workItem){ | |
693 | + var pagina = '/cit-esi-web/assets/js/angular/custom/directive/html/userTask.html'; | |
694 | + if ($scope.workItem.flowElement.userInterface && $scope.workItem.flowElement.userInterface.executeCustomPage) { | |
695 | + pagina = $scope.workItem.flowElement.userInterface.URLCustomPage; | |
696 | + _abrirPaginaTarefa(pagina); | |
697 | + }else if ($scope.workItem.flowElement.userInterface && $scope.workItem.flowElement.userInterface.resource && $scope.workItem.flowElement.userInterface.resourceName) { | |
698 | + FormBuilderRepository.getByName($scope.workItem.flowElement.userInterface.resourceName).then(function(result) { | |
699 | + pagina = '/cit-esi-web/forms/'+result.originalElement.path+'/'+result.originalElement.resource.name+"_task.html"; | |
700 | + _abrirPaginaTarefa(pagina); | |
701 | + }); | |
702 | + }else{ | |
703 | + _abrirPaginaTarefa(pagina); | |
704 | + } | |
705 | + } | |
706 | + }; | |
707 | + | |
708 | + function _abrirPaginaTarefa(pagina){ | |
709 | + if (appService.existsWorkspace(pagina)) { | |
710 | + $scope.showAlert('warning', $translate.instant('ESI.MSG.JA_EXISTE_TELA_TAREFA')); | |
711 | + return ; | |
712 | + } | |
713 | + $scope.processInstance = $scope.docSelecionado.workItem.processInstance; | |
714 | + $scope.processInstance.collapsed = true; | |
715 | + $scope.processInstance.collapsedError = true; | |
716 | + $rootScope.task = $scope.workItem; | |
717 | + $rootScope.processInstance = $scope.processInstance; | |
718 | + $rootScope.controllerScope = $scope; | |
719 | + | |
720 | + var nome = $scope.task.flowElement.description; | |
721 | + if (!nome || nome == '') | |
722 | + nome = $scope.workItem.flowElement.name; | |
723 | + | |
724 | + $scope.addNewWorkspace($translate.instant('ESI.PERMISSAO.EXECUTAR')+" "+$translate.instant('ESI.TAREFA').toLowerCase()+" '"+nome+"'", pagina, true, 'mod-red-dark', $scope.workItem); | |
725 | + }; | |
726 | + | |
727 | + function _getAssignmentSelected() { | |
728 | + for(var pos = 0; pos < $scope.assignments.length; pos++){ | |
729 | + if($scope.assignments[pos].checked){ | |
730 | + $scope.docSelecionado.workItem = $scope.assignments[pos]; | |
731 | + break; | |
732 | + } | |
733 | + } | |
734 | + }; | |
735 | + | |
736 | + //Abre a tela de visualização de processo e documentos | |
737 | + $scope.abreVisualizar = function(){ | |
738 | + | |
739 | + var pagina = '/cit-ecm-web/html/processoVisualizacao/processoView.html'; | |
740 | + | |
741 | + var paginaGerenciamento = '/cit-ecm-web/html/gerenciarProcesso/gerenciarProcesso.html'; | |
742 | + | |
743 | + if (appService.existsWorkspace(paginaGerenciamento)) { | |
744 | + $scope.$openModalConfirm({message:$translate.instant('ECM.MSG.EXISTE_PROCESSO_ABERTO'), callback: function(){ | |
745 | + $scope.$modalConfirmInstance.dismiss('cancel'); | |
746 | + $scope.setLoading(true); | |
747 | + $scope.openWorkspaceIfNotOpen($translate.instant('ECM.LABEL.PROCESSO'), pagina, 'mod-orange'); | |
748 | + $timeout(function() { | |
749 | + angular.element('#visualizarGerenciarProcesso').scope().getProcessoVH($scope.docSelecionado.objeto === 'Processo'? $scope.docSelecionado.id : $scope.docSelecionado.idProcesso); | |
750 | + | |
751 | + }, 100); | |
752 | + $scope.setLoading(false); | |
753 | + }}); | |
754 | + }else{ | |
755 | + $scope.openWorkspaceIfNotOpen($translate.instant('ECM.LABEL.PROCESSO'), pagina, 'mod-orange'); | |
756 | + $timeout(function() { | |
757 | + angular.element('#visualizarGerenciarProcesso').scope().getProcessoVH($scope.docSelecionado.objeto === 'Processo'? $scope.docSelecionado.id : $scope.docSelecionado.idProcesso); | |
758 | + | |
759 | + }, 100); | |
760 | + }; | |
761 | + }; | |
762 | + | |
605 | 763 | $scope.init(); |
606 | 764 | }]); |
607 | 765 | ... | ... |
cit-ecm-web/src/main/webapp/assets/js/angular/custom/repository/CredencialProcessoRepository.js
... | ... | @@ -21,8 +21,12 @@ citApp.factory('CredencialProcessoRepository', ['RestangularEcm', 'AbstractRepos |
21 | 21 | return restangularEcm.one(this.route).getList("findByIdProcesso", {idProcesso : idProcesso}).then(); |
22 | 22 | }; |
23 | 23 | |
24 | - this.renunciar = function (idProcesso) { | |
25 | - return restangularEcm.one(this.route + "/renunciar", idProcesso).remove(); | |
24 | + this.findByIdProcesso = function(idProcesso) { | |
25 | + return restangularEcm.one(this.route).getList("findByIdProcesso", {idProcesso : idProcesso}).then(); | |
26 | + }; | |
27 | + | |
28 | + this.validarAcessoPesquisa = function (idProcessInstance) { | |
29 | + return restangularEcm.all(this.route + '/validarAcessoPesquisa').post(idProcessInstance); | |
26 | 30 | }; |
27 | 31 | |
28 | 32 | } | ... | ... |
cit-ecm-web/src/main/webapp/assets/js/angular/custom/repository/ProcessoRepository.js
... | ... | @@ -32,6 +32,11 @@ citApp.factory('ProcessoRepository', ['RestangularEcm', 'AbstractRepository', fu |
32 | 32 | |
33 | 33 | }; |
34 | 34 | |
35 | + this.getProcessoVH = function (idProcesso){ | |
36 | + return restangularEcm.one(this.route + '/getProcessoVH').get({"idProcesso": idProcesso}); | |
37 | + | |
38 | + }; | |
39 | + | |
35 | 40 | this.verificarAtribuicaoProcessoPrimeiroAcesso = function (idProcesso){ |
36 | 41 | return restangularEcm.one(this.route + '/verificarAtribuicaoProcessoPrimeiroAcesso').get({"idProcesso": idProcesso}); |
37 | 42 | ... | ... |
cit-ecm-web/src/main/webapp/assets/js/angular/custom/repository/UnidadeProcessoRepository.js
... | ... | @@ -23,6 +23,11 @@ citApp.factory('UnidadeProcessoRepository', ['RestangularEcm', 'AbstractReposito |
23 | 23 | }; |
24 | 24 | |
25 | 25 | |
26 | + this.isProcessoNaUnidadeUsuarioLogado = function(idProcesso) { | |
27 | + return restangularEcm.one(this.route + "/isProcessoNaUnidadeUsuarioLogado").get({"idProcesso" : idProcesso}); | |
28 | + | |
29 | + }; | |
30 | + | |
26 | 31 | } |
27 | 32 | |
28 | 33 | AbstractRepository.extend(UnidadeProcessoRepository); | ... | ... |
cit-ecm-web/src/main/webapp/html/gerenciarProcesso/includeInformacaoProcesso.html
... | ... | @@ -141,12 +141,18 @@ |
141 | 141 | </div> |
142 | 142 | <div class="profile-info-value"> |
143 | 143 | <br> |
144 | - <div class="row"> | |
144 | + <div class="row" ng-if="processoUnidades.length > 0"> | |
145 | 145 | <ul style="list-style-type: disc; margin-bottom: 3px" ng-repeat="processoUnidade in processoUnidades"> |
146 | 146 | <li>{{processoUnidade.unidade.sigla}} <span ng-if="processoUnidade.usuarioResponsavel">- {{processoUnidade.usuarioResponsavel.username}}</span></li> |
147 | 147 | </ul> |
148 | 148 | |
149 | 149 | </div> |
150 | + <div class="row" ng-if="processo.unidadesProcesso.length > 0"> | |
151 | + <ul style="list-style-type: disc; margin-bottom: 3px" ng-repeat="processoUnidade in processo.unidadesProcesso"> | |
152 | + <li>{{processoUnidade.unidade.sigla}} <span ng-if="processoUnidade.usuarioResponsavel">- {{processoUnidade.usuarioResponsavel.username}}</span></li> | |
153 | + </ul> | |
154 | + | |
155 | + </div> | |
150 | 156 | </div> |
151 | 157 | </div> |
152 | 158 | </div> | ... | ... |
cit-ecm-web/src/main/webapp/html/pesquisa/pesquisa.html
... | ... | @@ -22,8 +22,7 @@ |
22 | 22 | <div class="row"> |
23 | 23 | <div class="col-sm-10"> |
24 | 24 | <div class="input-group" id="inputs"> |
25 | - <input type="text" class="form-control" id="query" type="text" placeholder="{{$translate.instant('ECM.LABEL.PLACEHOLDER_PESQUISA')}}" ng-model="userQuery" autocomplete="off" ng-focus="onfocus()" | |
26 | - ng-keyup="onkeyup($event)"> | |
25 | + <input type="text" class="form-control" id="query" type="text" placeholder="{{$translate.instant('ECM.LABEL.PLACEHOLDER_PESQUISA')}}" ng-model="userQuery" autocomplete="off" ng-keyup="onkeyup($event)"> | |
27 | 26 | <div class="input-group-btn"> |
28 | 27 | <button class="btn btn-default" type="button" id="submit" name="submit" ng-click="handleSubmit()"> |
29 | 28 | <i class="ace-icon fa fa-search icon-on-right bigger-110"></i> |
... | ... | @@ -75,8 +74,10 @@ |
75 | 74 | <b translate>ECM.LABEL.TIPODOCUMENTO</b> |
76 | 75 | </h5> |
77 | 76 | <ul class="filters_list"> |
78 | - <li ng-repeat="hint in hints['tipoDocumento']" ng-class="{'selected' : hint.selected}"><a href="javascript: return false" ng-click="selectHint('tipoDocumento',$index);" class="filters"> | |
79 | - <span class="itens" ng-show="hint.quantidade > 0">{{hint.title}}</span> <span class="qtd" ng-show="hint.quantidade > 0">{{hint.quantidade}}</span> | |
77 | + <li ng-repeat="hint in hints['tipoDocumento']" ng-class="{'selected' : hint.selected}"> | |
78 | + <a href="javascript: return false" ng-click="selectHint('tipoDocumento',$index);" class="filters"> | |
79 | + <span class="itens" ng-show="hint.quantidade > 0">{{hint.title}}</span> | |
80 | + <span class="qtd" ng-show="hint.quantidade > 0">{{hint.quantidade}}</span> | |
80 | 81 | </a></li> |
81 | 82 | </ul> |
82 | 83 | </li> |
... | ... | @@ -86,9 +87,12 @@ |
86 | 87 | <b translate>ECM.LABEL.ASSUNTO</b> |
87 | 88 | </h5> |
88 | 89 | <ul class="filters_list"> |
89 | - <li ng-repeat="hint in hints['assunto']" ng-class="{'selected' : hint.selected}"><a href="javascript: return false" ng-click="selectHint('assunto',$index)" class="filters"> <span | |
90 | - class="itens" ng-show="hint.quantidade > 0">{{hint.title}}</span> <span class="qtd" ng-show="hint.quantidade > 0">{{hint.quantidade}}</span> | |
91 | - </a></li> | |
90 | + <li ng-repeat="hint in hints['assunto']" ng-class="{'selected' : hint.selected}"> | |
91 | + <a href="javascript: return false" ng-click="selectHint('assunto',$index)" class="filters"> | |
92 | + <span class="itens" ng-show="hint.quantidade > 0">{{hint.title}}</span> | |
93 | + <span class="qtd" ng-show="hint.quantidade > 0">{{hint.quantidade}}</span> | |
94 | + </a> | |
95 | + </li> | |
92 | 96 | </ul> |
93 | 97 | </li> |
94 | 98 | |
... | ... | @@ -232,13 +236,23 @@ |
232 | 236 | <label class="result_metadado">{{doc.assunto}}</label> |
233 | 237 | </div> |
234 | 238 | </div> |
235 | - <div class="row"> | |
239 | + <div class="row" ng-show="doc.assuntoComplementar.length > 0 || doc.conteudo.length > 0"> | |
236 | 240 | <div class="col-md-12"> |
237 | 241 | <div ng-show="doc.objeto == 'Processo'">{{doc.assuntoComplementar}}</div> |
238 | 242 | |
239 | 243 | <div class="result_pesquisa" id="{{doc.id}}"></div> |
240 | 244 | </div> |
241 | 245 | </div> |
246 | + | |
247 | + <div class="row" style="padding-bottom: 15px;"> | |
248 | + <div class="col-md-12"> | |
249 | + <hr style="margin-top: 8px; margin-bottom: -6px; border: 0; border-bottom: 1px dotted #aaa; margin-left: 22px;"> | |
250 | + <a href="javascript: return false" class="green" title="{{$translate.instant('LABEL.EXPANDIR')}}" ng-click="obterTransclude(doc)"> | |
251 | + <i class="ace-icon fa fa-2x" ng-class="{'fa-angle-double-down': doc.$expandido, 'fa-angle-double-right': !doc.$expandido}"></i> | |
252 | + </a> | |
253 | + <div ng-if="doc.$expandido" ng-include src="urlInclude"></div> | |
254 | + </div> | |
255 | + </div> | |
242 | 256 | |
243 | 257 | <div class="row"> |
244 | 258 | <div class="col-md-6"> | ... | ... |
cit-ecm-web/src/main/webapp/html/pesquisa/tarefasProcesso.jsp
0 → 100644
... | ... | @@ -0,0 +1,79 @@ |
1 | +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> | |
2 | +<%@taglib prefix="sec" uri="http://www.springframework.org/security/tags"%> | |
3 | + | |
4 | +<fieldset style="margin-left: 5%; width: 90%; margin-top: 10px;"> | |
5 | + | |
6 | + <div ng-if="assignments.length < 1 && doc.nivelAcesso == 'Restrito'" style="text-align: center;" class="alert alert-warning ng-scope" role="alert"> | |
7 | + <span class="small" style="font-size: 122%"><translate>ECM.MSG.INFORMACAO_RESTRITA</translate></span> | |
8 | + </div> | |
9 | + | |
10 | + <div ng-if="doc.nivelAcesso== 'Público' || assignments.length > 0" class="row" style="margin-top: 6px; margin-bottom: -25px;"> | |
11 | + <div class="panel panel-default"> | |
12 | + <sec:authorize access="permiteExecutar()"> | |
13 | + <div class="panel-heading clearfix" style="background-color: rgba(170, 170, 170, 0.34); border-color: rgba(170, 170, 170, 0.78);"> | |
14 | + <button class="btn btn-clear" title="{{$translate.instant('LABEL.EXECUTAR')}}" alt="{{$translate.instant('LABEL.EXECUTAR')}}" type="button" ng-click="executarTarefa();" | |
15 | + ng-if="btnAction && doc.workItem.processInstance.status != 'SUSPENDED'"> | |
16 | + <i class="fa fa-play-circle-o green"></i> | |
17 | + <translate>LABEL.EXECUTAR</translate> | |
18 | + </button> | |
19 | + <button class="btn btn-clear" title="{{$translate.instant('LABEL.VISUALIZAR')}}" alt="{{$translate.instant('LABEL.VISUALIZAR')}}" type="button" ng-click="abreVisualizar();"> | |
20 | + <i class="fa fa-search blue"></i> | |
21 | + <translate>LABEL.VISUALIZAR</translate> | |
22 | + </button> | |
23 | + <button class="btn btn-clear" title="{{$translate.instant('ECM.LABEL.SOBRESTAR_SEM')}}" alt="{{$translate.instant('ECM.LABEL.SOBRESTAR_SEM')}}" type="button" ng-click="suspenderProcesso();" | |
24 | + ng-if="btnAction &&modelSelecionado.workItem.processInstance.status != 'SUSPENDED'"> | |
25 | + <i class="fa fa-pause red"></i> | |
26 | + <translate>ECM.LABEL.SOBRESTAR_SEM</translate> | |
27 | + </button> | |
28 | + <button class="btn btn-clear" title="{{$translate.instant('LABEL.REATIVAR')}}" alt="{{$translate.instant('LABEL.REATIVAR')}}" type="button" ng-click="reativarProcesso();" | |
29 | + ng-if="btnAction && modelSelecionado.workItem.processInstance.status == 'SUSPENDED'"> | |
30 | + <i class="fa fa-play green"></i> | |
31 | + <translate>LABEL.REATIVAR</translate> | |
32 | + </button> | |
33 | + <button class="btn btn-clear" title="{{$translate.instant('PORTAL.LABEL.VISUALIZAR_FLUXO')}}" alt="{{$translate.instant('PORTAL.LABEL.VISUALIZAR_FLUXO')}}" type="button" | |
34 | + ng-click="visualizarFluxo();" ng-if="btnAction"> | |
35 | + <i class="fa fa-search blue"></i> | |
36 | + <translate>PORTAL.LABEL.VISUALIZAR_FLUXO</translate> | |
37 | + </button> | |
38 | + <button class="btn btn-clear" ng-if="btnAction" title="{{$translate.instant('ESI.LOG.CONSULTA_LOG')}}" alt="{{$translate.instant('ESI.LOG.CONSULTA_LOG')}}" type="button" | |
39 | + ng-click="consultarHistorico();"> | |
40 | + <i class="fa fa-history yellow-dark"></i> | |
41 | + <translate>ESI.LOG.CONSULTA_LOG</translate> | |
42 | + </button> | |
43 | + </div> | |
44 | + </sec:authorize> | |
45 | + <div class="panel-body"> | |
46 | + | |
47 | + <table class="table table-striped table-bordered table-hover" style="width: 100%; margin-left: 0%; margin-right: 1%; margin-bottom: 1%; margin-top: 1%"> | |
48 | + <thead> | |
49 | + <tr> | |
50 | + <th style="width: 5%;"></th> | |
51 | + <th colspan="2" style="width: 60%;"><small><translate>ESI.TAREFA</translate></small></th> | |
52 | + <th style="align: center;"><small><translate>ECM.LABEL.SITUACAO_INSTANCIA_TAREFA</translate></small></th> | |
53 | + </tr> | |
54 | + </thead> | |
55 | + <tbody> | |
56 | + <tr ng-repeat="assignment in assignments"> | |
57 | + <td class="text-center" style="width: 5%;"><input type="radio" id="{{assignment.id}}" name="assignments" ng-checked="assignment.checked === true" ng-click="selectAssignment(assignment);" /> | |
58 | + </td> | |
59 | + <td class="text-center" style="width: 5%;"><span class="small green">{{assignment.id}}</span></td> | |
60 | + <td><span class="small green">{{assignment.flowElement.name}}</span></td> | |
61 | + <td><label ng-show="assignment.workItem.processInstance.status != 'SUSPENDED' && assignment.workItem.processInstance.flowStatus"> <span class="small badge black" | |
62 | + style="background-color: {{assignment.workItem.processInstance.flowStatus.backgroundColor"> <b><font color="{{assignment.workItem.processInstance.flowStatus.textColor}}"> <translate>{{assignment.workItem.processInstance.flowStatus.name}}</translate></b></font> | |
63 | + </span> | |
64 | + </label> <label ng-show="assignment.workItem.processInstance.status == 'SUSPENDED'"> <span class="small badge black" style="background-color: red !important"> <b><font color="white"> | |
65 | + <translate>ECM.LABEL.SOBRESTADA</translate></b></font> | |
66 | + </span> | |
67 | + </label></td> | |
68 | + </tr> | |
69 | + <tr ng-show="assignments.length <= 0"> | |
70 | + <td colspan="4"><strong><translate>ECM.MSG.NAO_EXISTE_TAREFA_EXECUTAR</translate></strong></td> | |
71 | + </tr> | |
72 | + </tbody> | |
73 | + </table> | |
74 | + | |
75 | + </div> | |
76 | + </div> | |
77 | + </div> | |
78 | + | |
79 | +</fieldset> | |
0 | 80 | \ No newline at end of file | ... | ... |
cit-ecm-web/src/main/webapp/html/processoVisualizacao/documentosView.html
0 → 100644
... | ... | @@ -0,0 +1,47 @@ |
1 | +<div class="itemdiv commentdiv" ng-repeat="documento in processo.documentos | orderBy:'-dataCriacao'"> | |
2 | + | |
3 | + <div class="user"> | |
4 | + <i class="{{documento.icon}}" title="{{documento.anexo.dominioTipoAnexo.descricao}}"></i> | |
5 | + </div> | |
6 | + | |
7 | + <div class="body"> | |
8 | + <div class="text ellipsis" tooltip="{{documento.tipoDocumento.nome}} - {{documento.numero}}"> | |
9 | + <a ng-show='!documento.cancelado' href="#void" ng-click="editDocument(documento, false)">{{documento.tipoDocumento.nome}} - {{documento.numero}}</a> <a ng-show='documento.cancelado' href="#void" | |
10 | + ng-click="getCancelamentoDocumento(documento);"> {{documento.tipoDocumento.nome}} - {{documento.numero}}</a> | |
11 | + </div> | |
12 | + | |
13 | + <div class="time hidden-md"> | |
14 | + <i class="ace-icon fa fa-clock-o"></i> <span class="blue">{{documento.dataCriacao | date: 'dd/MM/yyyy HH:mm:ss'}} </span> | |
15 | + </div> | |
16 | + | |
17 | + <div class="text ellipsis" tooltip="{{documento.assuntoComplementar}}">{{documento.assuntoComplementar}}</div> | |
18 | + | |
19 | + <div class="itemdiv-informacoes"> | |
20 | + <span class="label label-gray" ng-show="documento.sigilo.tipoSigilo.codigo == 0 ">{{documento.sigilo.tipoSigilo.descricao}}</span> <span class="label label-danger" | |
21 | + ng-show="documento.sigilo.tipoSigilo.codigo == 1 ">{{documento.sigilo.tipoSigilo.descricao}}</span> <span class="label label-black" ng-show="documento.sigilo.tipoSigilo.codigo == 2 ">{{documento.sigilo.tipoSigilo.descricao}}</span> | |
22 | + <span class="label label-warning" ng-show="documento.nivelAcesso.nivelAcesso.codigo == 1">{{documento.nivelAcesso.nivelAcesso.descricao}}</span> <span class="label label-success" | |
23 | + ng-show="documento.nivelAcesso.nivelAcesso.codigo == 2">{{documento.nivelAcesso.nivelAcesso.descricao}}</span> <span class="label label-info" ng-show="documento.origem">Anexado</span> <span | |
24 | + class="label label-info" ng-show="documento.assinaturas && documento.assinaturas.length > 0">Assinado</span> <span class="label label-success" ng-show="false">Habilitado</span> <span class="label label-warning" ng-show="false">Ciência</span> <span | |
25 | + class="label label-danger" ng-show="documento.cancelado">Cancelado</span> | |
26 | + | |
27 | + </div> | |
28 | + | |
29 | + </div> | |
30 | + | |
31 | + <div class="tools btn-group dropdown" role="group" dropdown> | |
32 | + <button type="button" class="btn btn-success btn-xs" dropdown-toggle> | |
33 | + <translate>LABEL.ACOES</translate> | |
34 | + <span class="fa fa-caret-down icon-on-right"></span> | |
35 | + </button> | |
36 | + | |
37 | + <ul class="dropdown-menu-center dropdown-menu dropdown-caret" role="menu"> | |
38 | + <li ng-if='!documento.cancelado'><a href="#void" ng-click="visualizarVersoes(documento);"> <translate>ECM.LABEL.VERSOESDODOCUMENTO</translate></a></li> | |
39 | + <li ><a ng-if='documento.cancelado'href="#void" ng-click="getCancelamentoDocumento(documento);"> <translate>ECM.LABEL.JUSTIFICATIVA_CANCELAMENTO</translate></a></li> | |
40 | + </ul> | |
41 | + | |
42 | + </div> | |
43 | + | |
44 | + <div class="versoes"> | |
45 | + <span><translate>ECM.LABEL.VERSAO_ATUAL</translate>: {{documento.versaoDocumento | limitTo:3}}</span> | |
46 | + </div> | |
47 | +</div> | |
0 | 48 | \ No newline at end of file | ... | ... |
cit-ecm-web/src/main/webapp/html/processoVisualizacao/processoView.html
0 → 100644
... | ... | @@ -0,0 +1,69 @@ |
1 | +<link rel="stylesheet" href="/cit-ecm-web/assets/css/gerenciarProcesso.css" /> | |
2 | + | |
3 | +<div id="visualizarGerenciarProcesso" class="page-content" ng-controller="GerenciarProcessoController"> | |
4 | + <div class="bar-buttons-action fixed"> | |
5 | + <span class="divider-vertical"></span> | |
6 | + </div> | |
7 | + | |
8 | + <div id="informacaoProcesso"> | |
9 | + <div class="row"> | |
10 | + <div class="col-md-12"> | |
11 | + <div class="row"> | |
12 | + <div class="col-md-12"> | |
13 | + <div class="widget-box margin-bottom"> | |
14 | + <div class="widget-header"> | |
15 | + <h2 class="widget-title"> | |
16 | + <translate>ECM.LABEL.INFORMACAODOPROCESSO</translate> | |
17 | + - {{processo.nup}} | |
18 | + </h2> | |
19 | + | |
20 | + <div class="widget-toolbar"> | |
21 | + <a href="#void" ng-click="widgetExemploIsCollapsed = !widgetExemploIsCollapsed"> <i class="fa" | |
22 | + ng-class="{'fa-chevron-up': !widgetExemploIsCollapsed, 'fa-chevron-down': widgetExemploIsCollapsed}"></i> | |
23 | + </a> | |
24 | + </div> | |
25 | + </div> | |
26 | + <div collapse="widgetExemploIsCollapsed" class="widget-body"> | |
27 | + <div ng-include src="'/cit-ecm-web/html/gerenciarProcesso/includeInformacaoProcesso.html'" /> | |
28 | + </div> | |
29 | + </div> | |
30 | + </div> | |
31 | + </div> | |
32 | + </div> | |
33 | + </div> | |
34 | + </div> | |
35 | + | |
36 | + <div class="row"> | |
37 | + <div class="col-md-4"> | |
38 | + | |
39 | + <div class="widget-box documentos margin-bottom"> | |
40 | + <div class="widget-header"> | |
41 | + <h2 class="widget-title"> | |
42 | + <translate>ECM.LABEL.DOCUMENTOS</translate> | |
43 | + </h2> | |
44 | + | |
45 | + </div> | |
46 | + <div class="widget-body"> | |
47 | + <div class="widget-main clearfix"> | |
48 | + <div id="documentosProcesso"> | |
49 | + <div ng-include src="'/cit-ecm-web/html/processoVisualizacao/documentosView.html'" /> | |
50 | + </div> | |
51 | + </div> | |
52 | + </div> | |
53 | + </div> | |
54 | + </div> | |
55 | + | |
56 | + <div id="content-container" class="col-md-8"> | |
57 | + | |
58 | + <div ng-include src="'/cit-ecm-web/html/documentoGed/documentoGedView.html'" ng-show="isDocumentoEdit"/> | |
59 | + | |
60 | + <div ng-include src="'/cit-ecm-web/html/documentoGed/cancelarDocumentoView.html'" ng-show="isCancelarDocumento"/> | |
61 | + | |
62 | + <div ng-include src="'/cit-ecm-web/html/historicoAlteracaoProcesso/historicoAlteracaoProcesso.html'" ng-show="isHistoricoProcesso" /> | |
63 | + | |
64 | + <div ng-include src="'/cit-ecm-web/html/versaoDocumentoGed/versaoDocumentoGedList.html'" ng-show="isVersoesDocumento" /> | |
65 | + | |
66 | + </div> | |
67 | + | |
68 | + </div> | |
69 | +</div> | |
0 | 70 | \ No newline at end of file | ... | ... |