Commit 11a2e83aca8d3dba4dffeee099d85e80cfb22dea
Exists in
master
Merge remote-tracking branch 'remotes/origin/tarefa-285' into desenvolvimento
# Conflicts: # cit-ecm-api/src/main/java/br/com/centralit/api/dao/UnidadeProcessoDao.java # cit-ecm-api/src/main/java/br/com/centralit/api/framework/json/ViewsEcm.java # cit-ecm-api/src/main/java/br/com/centralit/api/model/Processo.java # cit-ecm-api/src/main/java/br/com/centralit/api/service/ProcessoService.java # cit-ecm-api/src/main/java/br/com/centralit/api/service/UnidadeProcessoService.java # cit-ecm-api/src/main/java/br/com/centralit/api/service/impl/ProcessoServiceImpl.java # cit-ecm-api/src/main/java/br/com/centralit/api/service/impl/UnidadeProcessoServiceImpl.java # cit-ecm-web/src/main/java/br/com/centralit/listener/StartupListenerEcm.java # cit-ecm-web/src/main/webapp/assets/js/angular/custom/controller/ProcessoController.js
Showing
17 changed files
with
1168 additions
and
0 deletions
Show diff stats
cit-ecm-api/src/main/java/br/com/centralit/api/dao/ReabrirProcessoDao.java
0 → 100644
@@ -0,0 +1,28 @@ | @@ -0,0 +1,28 @@ | ||
1 | +package br.com.centralit.api.dao; | ||
2 | + | ||
3 | +import br.com.centralit.framework.dao.arquitetura.CitGenericDAO; | ||
4 | + | ||
5 | + | ||
6 | +/** | ||
7 | + * <p><img src="http://centralit.com.br/images/logo_central.png"></p> | ||
8 | + * | ||
9 | + * <p><b>Company: </b> Central IT - Governança Corporativa - </p> | ||
10 | + * | ||
11 | + * <p><b>Title: </b></p> | ||
12 | + * | ||
13 | + * <p><b>Description: </b></p> | ||
14 | + * | ||
15 | + * <p><b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a></p> | ||
16 | + * | ||
17 | + * <p><b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a></p> | ||
18 | + * | ||
19 | + * @since 01/04/2016 - 19:13:13 | ||
20 | + * | ||
21 | + * @version 1.0.0 | ||
22 | + * | ||
23 | + * @author maycon.silva | ||
24 | + * | ||
25 | + */ | ||
26 | +public interface ReabrirProcessoDao extends CitGenericDAO { | ||
27 | + | ||
28 | +} |
cit-ecm-api/src/main/java/br/com/centralit/api/dao/impl/ReabrirProcessoDaoHibernate.java
0 → 100644
@@ -0,0 +1,41 @@ | @@ -0,0 +1,41 @@ | ||
1 | +package br.com.centralit.api.dao.impl; | ||
2 | + | ||
3 | +import org.springframework.stereotype.Repository; | ||
4 | + | ||
5 | +import br.com.centralit.api.dao.ReabrirProcessoDao; | ||
6 | +import br.com.centralit.api.model.ReabrirProcesso; | ||
7 | +import br.com.centralit.framework.dao.arquitetura.CitGenericDAOImpl; | ||
8 | + | ||
9 | + | ||
10 | +/** | ||
11 | + * <p><img src="http://centralit.com.br/images/logo_central.png"></p> | ||
12 | + * | ||
13 | + * <p><b>Company: </b> Central IT - Governança Corporativa - </p> | ||
14 | + * | ||
15 | + * <p><b>Title: </b></p> | ||
16 | + * | ||
17 | + * <p><b>Description: </b></p> | ||
18 | + * | ||
19 | + * <p><b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a></p> | ||
20 | + * | ||
21 | + * <p><b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a></p> | ||
22 | + * | ||
23 | + * @since 01/04/2016 - 19:13:47 | ||
24 | + * | ||
25 | + * @version 1.0.0 | ||
26 | + * | ||
27 | + * @author maycon.silva | ||
28 | + * | ||
29 | + */ | ||
30 | +@Repository("reabrirProcessoDao") | ||
31 | +public class ReabrirProcessoDaoHibernate extends CitGenericDAOImpl implements ReabrirProcessoDao{ | ||
32 | + | ||
33 | + /** | ||
34 | + * Responsável pela criação de novas instâncias desta classe. | ||
35 | + */ | ||
36 | + public ReabrirProcessoDaoHibernate() { | ||
37 | + | ||
38 | + super(ReabrirProcesso.class); | ||
39 | + } | ||
40 | + | ||
41 | +} |
cit-ecm-api/src/main/java/br/com/centralit/api/model/ReabrirProcesso.java
0 → 100644
@@ -0,0 +1,212 @@ | @@ -0,0 +1,212 @@ | ||
1 | +package br.com.centralit.api.model; | ||
2 | + | ||
3 | +import javax.persistence.Entity; | ||
4 | +import javax.persistence.FetchType; | ||
5 | +import javax.persistence.GeneratedValue; | ||
6 | +import javax.persistence.GenerationType; | ||
7 | +import javax.persistence.Id; | ||
8 | +import javax.persistence.ManyToOne; | ||
9 | +import javax.persistence.Transient; | ||
10 | + | ||
11 | +import br.com.centralit.framework.json.Views; | ||
12 | +import br.com.centralit.framework.model.Dominio; | ||
13 | + | ||
14 | +import com.fasterxml.jackson.annotation.JsonView; | ||
15 | + | ||
16 | +/** | ||
17 | + * <p> | ||
18 | + * <img src="http://centralit.com.br/images/logo_central.png"> | ||
19 | + * </p> | ||
20 | + * | ||
21 | + * <p> | ||
22 | + * <b>Company: </b> Central IT - Governança Corporativa - | ||
23 | + * </p> | ||
24 | + * | ||
25 | + * <p> | ||
26 | + * <b>Title: </b> | ||
27 | + * </p> | ||
28 | + * | ||
29 | + * <p> | ||
30 | + * <b>Description: </b> | ||
31 | + * </p> | ||
32 | + * | ||
33 | + * <p> | ||
34 | + * <b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a> | ||
35 | + * </p> | ||
36 | + * | ||
37 | + * <p> | ||
38 | + * <b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a> | ||
39 | + * </p> | ||
40 | + * | ||
41 | + * @since 01/04/2016 - 19:15:01 | ||
42 | + * | ||
43 | + * @version 1.0.0 | ||
44 | + * | ||
45 | + * @author maycon.silva | ||
46 | + * | ||
47 | + */ | ||
48 | +@Entity | ||
49 | +public class ReabrirProcesso extends PersistentObjectUnidade { | ||
50 | + | ||
51 | + /** Atributo serialVersionUID. */ | ||
52 | + private static final long serialVersionUID = 4660153373227383621L; | ||
53 | + | ||
54 | + /** Atributo id. */ | ||
55 | + @Id | ||
56 | + @GeneratedValue(strategy = GenerationType.AUTO) | ||
57 | + @JsonView({ Views.GenericView.class }) | ||
58 | + private Long id; | ||
59 | + | ||
60 | + /** Atributo justificativa. */ | ||
61 | + @JsonView({ Views.ReabrirProcessoListView.class }) | ||
62 | + private String justificativaSolicitacao; | ||
63 | + | ||
64 | + /** Atributo justificativa. */ | ||
65 | + @JsonView({ Views.ReabrirProcessoListView.class }) | ||
66 | + private String justificativaRejeicao; | ||
67 | + | ||
68 | + @ManyToOne(fetch = FetchType.LAZY, optional = true) | ||
69 | + @JsonView({ Views.ReabrirProcessoListView.class }) | ||
70 | + private Processo processo; | ||
71 | + | ||
72 | + /** Atributo status. */ | ||
73 | + @ManyToOne(fetch = FetchType.LAZY) | ||
74 | + @JsonView({ Views.ReabrirProcessoListView.class}) | ||
75 | + private Dominio status; | ||
76 | + | ||
77 | + @Transient | ||
78 | + private boolean validado; | ||
79 | + | ||
80 | + | ||
81 | + /** | ||
82 | + * Retorna o valor do atributo <code>id</code> | ||
83 | + * | ||
84 | + * @return <code>Long</code> | ||
85 | + */ | ||
86 | + @Override | ||
87 | + public Long getId() { | ||
88 | + | ||
89 | + return this.id; | ||
90 | + } | ||
91 | + | ||
92 | + /** | ||
93 | + * Define o valor do atributo <code>id</code>. | ||
94 | + * | ||
95 | + * @param id | ||
96 | + */ | ||
97 | + public void setId(Long id) { | ||
98 | + | ||
99 | + this.id = id; | ||
100 | + } | ||
101 | + | ||
102 | + | ||
103 | + /** | ||
104 | + * Retorna o valor do atributo <code>processo</code> | ||
105 | + * | ||
106 | + * @return <code>Processo</code> | ||
107 | + */ | ||
108 | + public Processo getProcesso() { | ||
109 | + | ||
110 | + return processo; | ||
111 | + } | ||
112 | + | ||
113 | + /** | ||
114 | + * Define o valor do atributo <code>processo</code>. | ||
115 | + * | ||
116 | + * @param processo | ||
117 | + */ | ||
118 | + public void setProcesso(Processo processo) { | ||
119 | + | ||
120 | + this.processo = processo; | ||
121 | + } | ||
122 | + | ||
123 | + | ||
124 | + /** | ||
125 | + * Retorna o valor do atributo <code>status</code> | ||
126 | + * | ||
127 | + * @return <code>Dominio</code> | ||
128 | + */ | ||
129 | + public Dominio getStatus() { | ||
130 | + | ||
131 | + return status; | ||
132 | + } | ||
133 | + | ||
134 | + | ||
135 | + /** | ||
136 | + * Define o valor do atributo <code>status</code>. | ||
137 | + * | ||
138 | + * @param status | ||
139 | + */ | ||
140 | + public void setStatus(Dominio status) { | ||
141 | + | ||
142 | + this.status = status; | ||
143 | + } | ||
144 | + | ||
145 | + | ||
146 | + /** | ||
147 | + * Retorna o valor do atributo <code>justificativaSolicitacao</code> | ||
148 | + * | ||
149 | + * @return <code>String</code> | ||
150 | + */ | ||
151 | + public String getJustificativaSolicitacao() { | ||
152 | + | ||
153 | + return justificativaSolicitacao; | ||
154 | + } | ||
155 | + | ||
156 | + | ||
157 | + /** | ||
158 | + * Define o valor do atributo <code>justificativaSolicitacao</code>. | ||
159 | + * | ||
160 | + * @param justificativaSolicitacao | ||
161 | + */ | ||
162 | + public void setJustificativaSolicitacao(String justificativaSolicitacao) { | ||
163 | + | ||
164 | + this.justificativaSolicitacao = justificativaSolicitacao; | ||
165 | + } | ||
166 | + | ||
167 | + | ||
168 | + /** | ||
169 | + * Retorna o valor do atributo <code>justificativaRejeicao</code> | ||
170 | + * | ||
171 | + * @return <code>String</code> | ||
172 | + */ | ||
173 | + public String getJustificativaRejeicao() { | ||
174 | + | ||
175 | + return justificativaRejeicao; | ||
176 | + } | ||
177 | + | ||
178 | + | ||
179 | + /** | ||
180 | + * Define o valor do atributo <code>justificativaRejeicao</code>. | ||
181 | + * | ||
182 | + * @param justificativaRejeicao | ||
183 | + */ | ||
184 | + public void setJustificativaRejeicao(String justificativaRejeicao) { | ||
185 | + | ||
186 | + this.justificativaRejeicao = justificativaRejeicao; | ||
187 | + } | ||
188 | + | ||
189 | + | ||
190 | + /** | ||
191 | + * Retorna o valor do atributo <code>validado</code> | ||
192 | + * | ||
193 | + * @return <code>boolean</code> | ||
194 | + */ | ||
195 | + @JsonView({ Views.ReabrirProcessoListView.class}) | ||
196 | + public boolean isValidado() { | ||
197 | + | ||
198 | + return validado; | ||
199 | + } | ||
200 | + | ||
201 | + | ||
202 | + /** | ||
203 | + * Define o valor do atributo <code>validado</code>. | ||
204 | + * | ||
205 | + * @param validado | ||
206 | + */ | ||
207 | + public void setValidado(boolean validado) { | ||
208 | + | ||
209 | + this.validado = validado; | ||
210 | + } | ||
211 | + | ||
212 | +} |
cit-ecm-api/src/main/java/br/com/centralit/api/service/ReabrirProcessoService.java
0 → 100644
@@ -0,0 +1,29 @@ | @@ -0,0 +1,29 @@ | ||
1 | +package br.com.centralit.api.service; | ||
2 | + | ||
3 | +import br.com.centralit.api.model.ReabrirProcesso; | ||
4 | +import br.com.centralit.framework.service.arquitetura.GenericService; | ||
5 | + | ||
6 | + | ||
7 | +/** | ||
8 | + * <p><img src="http://centralit.com.br/images/logo_central.png"></p> | ||
9 | + * | ||
10 | + * <p><b>Company: </b> Central IT - Governança Corporativa - </p> | ||
11 | + * | ||
12 | + * <p><b>Title: </b></p> | ||
13 | + * | ||
14 | + * <p><b>Description: </b></p> | ||
15 | + * | ||
16 | + * <p><b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a></p> | ||
17 | + * | ||
18 | + * <p><b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a></p> | ||
19 | + * | ||
20 | + * @since 01/04/2016 - 19:09:55 | ||
21 | + * | ||
22 | + * @version 1.0.0 | ||
23 | + * | ||
24 | + * @author maycon.silva | ||
25 | + * | ||
26 | + */ | ||
27 | +public interface ReabrirProcessoService extends GenericService<ReabrirProcesso, Long> { | ||
28 | + | ||
29 | +} |
cit-ecm-api/src/main/java/br/com/centralit/api/service/impl/ReabrirProcessoServiceImpl.java
0 → 100644
@@ -0,0 +1,151 @@ | @@ -0,0 +1,151 @@ | ||
1 | +package br.com.centralit.api.service.impl; | ||
2 | + | ||
3 | +import java.util.ArrayList; | ||
4 | +import java.util.LinkedList; | ||
5 | + | ||
6 | +import org.springframework.beans.factory.annotation.Autowired; | ||
7 | +import org.springframework.stereotype.Service; | ||
8 | + | ||
9 | +import br.com.centralit.api.dao.ReabrirProcessoDao; | ||
10 | +import br.com.centralit.api.model.ReabrirProcesso; | ||
11 | +import br.com.centralit.api.service.DominioService; | ||
12 | +import br.com.centralit.api.service.NotificacaoService; | ||
13 | +import br.com.centralit.api.service.ProcessoService; | ||
14 | +import br.com.centralit.api.service.ReabrirProcessoService; | ||
15 | +import br.com.centralit.api.service.TemporalidadeService; | ||
16 | +import br.com.centralit.api.service.UnidadeProcessoService; | ||
17 | +import br.com.centralit.api.service.UnidadeService; | ||
18 | +import br.com.centralit.framework.model.Dominio; | ||
19 | +import br.com.centralit.framework.model.Notificacao; | ||
20 | +import br.com.centralit.framework.model.NotificacaoUsuario; | ||
21 | +import br.com.centralit.framework.service.arquitetura.GenericServiceImpl; | ||
22 | + | ||
23 | +/** | ||
24 | + * <p> | ||
25 | + * <img src="http://centralit.com.br/images/logo_central.png"> | ||
26 | + * </p> | ||
27 | + * | ||
28 | + * <p> | ||
29 | + * <b>Company: </b> Central IT - Governança Corporativa - | ||
30 | + * </p> | ||
31 | + * | ||
32 | + * <p> | ||
33 | + * <b>Title: </b> | ||
34 | + * </p> | ||
35 | + * | ||
36 | + * <p> | ||
37 | + * <b>Description: </b> | ||
38 | + * </p> | ||
39 | + * | ||
40 | + * <p> | ||
41 | + * <b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a> | ||
42 | + * </p> | ||
43 | + * | ||
44 | + * <p> | ||
45 | + * <b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a> | ||
46 | + * </p> | ||
47 | + * | ||
48 | + * @since 01/04/2016 - 19:11:27 | ||
49 | + * | ||
50 | + * @version 1.0.0 | ||
51 | + * | ||
52 | + * @author maycon.silva | ||
53 | + * | ||
54 | + */ | ||
55 | +@Service("reabrirProcessoServiceImpl") | ||
56 | +public class ReabrirProcessoServiceImpl extends GenericServiceImpl<ReabrirProcesso, Long> implements ReabrirProcessoService { | ||
57 | + | ||
58 | + /** Atributo reabrirProcessoDao. */ | ||
59 | + private ReabrirProcessoDao reabrirProcessoDao; | ||
60 | + | ||
61 | + @Autowired | ||
62 | + private ProcessoService processoService; | ||
63 | + | ||
64 | + @Autowired | ||
65 | + private UnidadeService unidadeService; | ||
66 | + | ||
67 | + @Autowired | ||
68 | + private DominioService dominioService; | ||
69 | + | ||
70 | + @Autowired | ||
71 | + private UnidadeProcessoService unidadeProcessoService; | ||
72 | + | ||
73 | + @Autowired | ||
74 | + private TemporalidadeService temporalidadeService; | ||
75 | + | ||
76 | + @Autowired | ||
77 | + private NotificacaoService notificacaoService; | ||
78 | + | ||
79 | + @Autowired | ||
80 | + public ReabrirProcessoServiceImpl( ReabrirProcessoDao reabrirProcessoDao ) { | ||
81 | + | ||
82 | + this.dao = reabrirProcessoDao; | ||
83 | + | ||
84 | + this.reabrirProcessoDao = reabrirProcessoDao; | ||
85 | + | ||
86 | + } | ||
87 | + | ||
88 | + @Override | ||
89 | + public ReabrirProcesso save(ReabrirProcesso reabrirProcesso) { | ||
90 | + | ||
91 | + reabrirProcesso.setStatus(this.dominioService.findByChaveAndCodigo("statusSolicitaoProcesso", 1L)); | ||
92 | + | ||
93 | + reabrirProcesso.setValidado(false); | ||
94 | + | ||
95 | + reabrirProcesso = super.save(reabrirProcesso); | ||
96 | + | ||
97 | + return reabrirProcesso; | ||
98 | + } | ||
99 | + | ||
100 | + @Override | ||
101 | + public ReabrirProcesso merge(ReabrirProcesso reabrirProcesso) { | ||
102 | + | ||
103 | + reabrirProcesso = (ReabrirProcesso) this.reabrirProcessoDao.merge(reabrirProcesso); | ||
104 | + | ||
105 | + if (!reabrirProcesso.getStatus().getCodigo().equals(1L)) { | ||
106 | + | ||
107 | + reabrirProcesso.setValidado(true); | ||
108 | + | ||
109 | + if (reabrirProcesso.getStatus().getCodigo().equals(2L)) { | ||
110 | + | ||
111 | + this.processoService.reopenProcessIntance(reabrirProcesso.getProcesso(), reabrirProcesso.getUnidade()); | ||
112 | + } | ||
113 | + | ||
114 | + this.enviarNotificacaoReabertura(reabrirProcesso); | ||
115 | + | ||
116 | + } | ||
117 | + | ||
118 | + return reabrirProcesso; | ||
119 | + } | ||
120 | + | ||
121 | + private void enviarNotificacaoReabertura(ReabrirProcesso reabrirProcesso) { | ||
122 | + | ||
123 | + StringBuilder sb = new StringBuilder(); | ||
124 | + | ||
125 | + sb.append("A sua solicitação de reabertura para o proceso ").append(reabrirProcesso.getProcesso().getNup()).append(" foi "); | ||
126 | + | ||
127 | + if (reabrirProcesso.getStatus().getCodigo().equals(2L)) { | ||
128 | + | ||
129 | + sb.append("aprovada."); | ||
130 | + | ||
131 | + } else if (reabrirProcesso.getStatus().getCodigo().equals(3L)) { | ||
132 | + | ||
133 | + sb.append("rejeitada"); | ||
134 | + } | ||
135 | + | ||
136 | + Dominio tipoNotificacao = this.dominioService.findByChaveAndCodigo("tipoNotificacao", 4L); | ||
137 | + | ||
138 | + Dominio tipoPrioridade = this.dominioService.findByChaveAndCodigo("tipoPrioridade", 2L); | ||
139 | + | ||
140 | + Notificacao notificacao = new Notificacao("Reabertura de processo", sb.toString(), tipoNotificacao, tipoPrioridade, null, null, null); | ||
141 | + | ||
142 | + NotificacaoUsuario notificacaoUsuario = new NotificacaoUsuario(notificacao, reabrirProcesso.getAutor()); | ||
143 | + | ||
144 | + notificacao.setNotificacaoUsuarios(new ArrayList<NotificacaoUsuario>()); | ||
145 | + | ||
146 | + notificacao.getNotificacaoUsuarios().add(notificacaoUsuario); | ||
147 | + | ||
148 | + this.notificacaoService.save(notificacao); | ||
149 | + } | ||
150 | + | ||
151 | +} |
cit-ecm-web/src/main/java/br/com/centralit/controller/ReabrirProcessoController.java
0 → 100644
@@ -0,0 +1,66 @@ | @@ -0,0 +1,66 @@ | ||
1 | +package br.com.centralit.controller; | ||
2 | + | ||
3 | +import org.springframework.beans.factory.annotation.Autowired; | ||
4 | +import org.springframework.stereotype.Controller; | ||
5 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
6 | + | ||
7 | +import br.com.centralit.api.framework.json.ViewsEcm; | ||
8 | +import br.com.centralit.api.model.ReabrirProcesso; | ||
9 | +import br.com.centralit.api.service.ReabrirProcessoService; | ||
10 | +import br.com.centralit.framework.controller.GenericController; | ||
11 | + | ||
12 | +/** | ||
13 | + * <p><img src="http://centralit.com.br/images/logo_central.png"></p> | ||
14 | + * | ||
15 | + * <p><b>Company: </b> Central IT - Governança Corporativa - </p> | ||
16 | + * | ||
17 | + * <p><b>Title: </b></p> | ||
18 | + * | ||
19 | + * <p><b>Description: </b></p> | ||
20 | + * | ||
21 | + * <p><b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a></p> | ||
22 | + * | ||
23 | + * <p><b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a></p> | ||
24 | + * | ||
25 | + * @since 01/04/2016 - 19:06:06 | ||
26 | + * | ||
27 | + * @version 1.0.0 | ||
28 | + * | ||
29 | + * @author maycon.silva | ||
30 | + * | ||
31 | + */ | ||
32 | +@Controller | ||
33 | +@RequestMapping("/rest/reabrirProcesso") | ||
34 | +public class ReabrirProcessoController extends GenericController<ReabrirProcesso> { | ||
35 | + | ||
36 | + /** Atributo reabrirProcessoDao. */ | ||
37 | + private ReabrirProcessoService reabrirProcessoService; | ||
38 | + | ||
39 | + /** | ||
40 | + * Responsável pela criação de novas instâncias desta classe. | ||
41 | + * | ||
42 | + * @param reabrirProcessoService | ||
43 | + */ | ||
44 | + @Autowired | ||
45 | + public ReabrirProcessoController( ReabrirProcessoService reabrirProcessoService ) { | ||
46 | + | ||
47 | + super(reabrirProcessoService); | ||
48 | + | ||
49 | + this.reabrirProcessoService = reabrirProcessoService; | ||
50 | + } | ||
51 | + | ||
52 | + @Override | ||
53 | + public Class<ViewsEcm.ReabrirProcessoEditView> getEditView() { | ||
54 | + | ||
55 | + return ViewsEcm.ReabrirProcessoEditView.class; | ||
56 | + } | ||
57 | + | ||
58 | + @Override | ||
59 | + public Class<ViewsEcm.ReabrirProcessoListView> getListView() { | ||
60 | + | ||
61 | + return ViewsEcm.ReabrirProcessoListView.class; | ||
62 | + } | ||
63 | + | ||
64 | + | ||
65 | + | ||
66 | +} |
cit-ecm-web/src/main/webapp/assets/js/angular/custom/controller/ReabrirProcessoController.js
0 → 100644
@@ -0,0 +1,150 @@ | @@ -0,0 +1,150 @@ | ||
1 | +'use strict'; | ||
2 | + | ||
3 | +citApp.controller('ReabrirProcessoController', ['$scope', 'ReabrirProcessoRepository', 'ProcessoRepository', 'DominioRepository','$filter', '$translate', '$timeout', "appService", | ||
4 | + function ReabrirProcessoController($scope, ReabrirProcessoRepository, ProcessoRepository, DominioRepository, $filter, $translate, $timeout, appService) { | ||
5 | + $scope.reabrirProcesso = {}; | ||
6 | + | ||
7 | + // Limpa formulário para novo cadastro | ||
8 | + $scope.resetForm = function() { | ||
9 | + $scope.limparReabrirProcesso(); | ||
10 | + $scope.edit = true; | ||
11 | + $timeout(function(){ | ||
12 | + $scope.reabrirProcessoForm.$submitted = false; | ||
13 | + $scope.reabrirProcessoForm.$setPristine(); | ||
14 | + }); | ||
15 | + }; | ||
16 | + | ||
17 | + // Atualiza pagina de pesquisa | ||
18 | + $scope.atualizaPaginaPesquisa = function () { | ||
19 | + angular.element('#searchReabrirProcesso').scope().fetchResult(); | ||
20 | + }; | ||
21 | + | ||
22 | + // MODAL QUE CONFIRMA REMOVER DO PAIS | ||
23 | + $scope.remove = function(reabrirProcesso){ | ||
24 | + $scope.reabrirProcesso = reabrirProcesso; | ||
25 | + $scope.$openModalConfirm({ | ||
26 | + message: $translate.instant('MSG.CONFIRMA_EXCLUSAO'), | ||
27 | + callback: function () { | ||
28 | + ReabrirProcessoRepository.remove($scope.reabrirProcesso).then(function() { | ||
29 | + | ||
30 | + $scope.$modalConfirmInstance.dismiss('cancel'); | ||
31 | + $scope.showAlert("success", $translate.instant('MSG.REGISTRO_EXCLUIDO')); | ||
32 | + angular.element('#searchReabrirProcesso').scope().fetchResult(); | ||
33 | + | ||
34 | + $scope.resetForm(); | ||
35 | + | ||
36 | + $scope.edit = false; | ||
37 | + }); | ||
38 | + } | ||
39 | + }); | ||
40 | + }; | ||
41 | + | ||
42 | + // SALVA O PAIS | ||
43 | + $scope.saveOrUpdate = function(){ | ||
44 | + $scope.reabrirProcessoForm.$submitted = true; | ||
45 | + | ||
46 | + //verifica se o formulario está valido para salvar | ||
47 | + if($scope.reabrirProcessoForm.$valid){ | ||
48 | + | ||
49 | + $scope.setLoadingSalva(true); | ||
50 | + | ||
51 | + ReabrirProcessoRepository.save($scope.reabrirProcesso).then(function(result) { | ||
52 | + $scope.reabrirProcesso = result.originalElement; | ||
53 | + $scope.showAlert("success", $translate.instant('MSG.REGISTRO_SALVO')); | ||
54 | + $scope.reabrirProcessoForm.$submitted = false; | ||
55 | + $scope.setLoading(false); | ||
56 | + }); | ||
57 | + | ||
58 | + }else{ | ||
59 | + //Mensagem de erro de campos obrigatorios não preenchidos | ||
60 | + $scope.showAlert('error', $translate.instant('MSG.MN001'), " ", false); | ||
61 | + } | ||
62 | + | ||
63 | + }; | ||
64 | + | ||
65 | + // Limpa o formulario preenchido | ||
66 | + $scope.limparReabrirProcesso = function(){ | ||
67 | + $scope.reabrirProcesso = {}; | ||
68 | + }; | ||
69 | + | ||
70 | + | ||
71 | + $scope.findAutoCompleteProcesso = function(value){ | ||
72 | + | ||
73 | + return ProcessoRepository.findAutoComplete('nup', value).then(function(result) { | ||
74 | + | ||
75 | + return result; | ||
76 | + | ||
77 | + }); | ||
78 | + }; | ||
79 | + | ||
80 | + | ||
81 | + DominioRepository.findAllDominio('statusSolicitaoProcesso').then(function(result) { | ||
82 | + $scope.statusList = result; | ||
83 | + }); | ||
84 | + | ||
85 | + | ||
86 | + // Consulta entidade e mostra no formulario | ||
87 | + $scope.getReabrirProcesso = function(reabrirProcesso, edit){ | ||
88 | + | ||
89 | + $scope.setLoadingGet(true); | ||
90 | + ReabrirProcessoRepository.get(reabrirProcesso.id).then(function(result) { | ||
91 | + $scope.reabrirProcesso = result.originalElement; | ||
92 | + $scope.edit = edit; | ||
93 | + $scope.setLoading(false); | ||
94 | + }); | ||
95 | + }; | ||
96 | + | ||
97 | + $scope.visualizarProcesso = function (){ | ||
98 | + | ||
99 | + if($scope.reabrirProcesso.processo){ | ||
100 | + | ||
101 | + var pagina = '/cit-ecm-web/html/gerenciarProcessoView/gerenciarProcessoView.html'; | ||
102 | + | ||
103 | + $scope.openWorkspaceIfNotOpen($translate.instant('ECM.LABEL.PROCESSO'), pagina, 'mod-orange'); | ||
104 | + | ||
105 | + $timeout(function() { | ||
106 | + angular.element('#viewGerenciarProcesso').scope().getProcessoView($scope.reabrirProcesso.processo); | ||
107 | + | ||
108 | + }, 400); | ||
109 | + | ||
110 | + }else{ | ||
111 | + $scope.showAlert("success", "selecione um processo"); | ||
112 | + } | ||
113 | + }; | ||
114 | + | ||
115 | + | ||
116 | + | ||
117 | + // Abre a tela de visualização de processo e documentos | ||
118 | + $scope.visualizarProcesso = function () { | ||
119 | + | ||
120 | + var pagina = '/cit-ecm-web/html/processoVisualizacao/processoView.html'; | ||
121 | + | ||
122 | + var paginaGerenciamento = '/cit-ecm-web/html/gerenciarProcesso/gerenciarProcesso.html'; | ||
123 | + | ||
124 | + if ( appService.existsWorkspace( paginaGerenciamento ) ) { | ||
125 | + $scope.$openModalConfirm( { | ||
126 | + message : $translate.instant( 'ECM.MSG.EXISTE_PROCESSO_ABERTO' ), | ||
127 | + callback : function () { | ||
128 | + $scope.$modalConfirmInstance.dismiss( 'cancel' ); | ||
129 | + $scope.setLoading( true ); | ||
130 | + $scope.openWorkspaceIfNotOpen( $translate.instant( 'ECM.LABEL.PROCESSO' ), pagina, 'mod-orange' ); | ||
131 | + $timeout( function () { | ||
132 | + angular.element( '#visualizarGerenciarProcesso' ).scope().getProcessoVH( $scope.reabrirProcesso.processo.id); | ||
133 | + | ||
134 | + }, 100 ); | ||
135 | + $scope.setLoading( false ); | ||
136 | + } | ||
137 | + } ); | ||
138 | + } else { | ||
139 | + $scope.openWorkspaceIfNotOpen( $translate.instant( 'ECM.LABEL.PROCESSO' ), pagina, 'mod-orange' ); | ||
140 | + $timeout( function () { | ||
141 | + angular.element( '#visualizarGerenciarProcesso' ).scope().getProcessoVH($scope.reabrirProcesso.processo.id); | ||
142 | + | ||
143 | + }, 100 ); | ||
144 | + } | ||
145 | + ; | ||
146 | + }; | ||
147 | + | ||
148 | +}]); | ||
149 | + | ||
150 | + |
cit-ecm-web/src/main/webapp/assets/js/angular/custom/controller/ReabrirProcessoListController.js
0 → 100644
@@ -0,0 +1,47 @@ | @@ -0,0 +1,47 @@ | ||
1 | +'use strict'; | ||
2 | + | ||
3 | +citApp.controller('ReabrirProcessoListController', ['$scope', 'ReabrirProcessoRepository', '$translate', '$timeout', 'DominioRepository', function ReabrirProcessoListController($scope, ReabrirProcessoRepository, $translate, $timeout, DominioRepository) { | ||
4 | + $scope.$showAdvancedFilters = false; | ||
5 | + | ||
6 | + $scope.resetForm = function() { | ||
7 | + angular.element("#editReabrirProcesso").scope().resetForm(); | ||
8 | + }; | ||
9 | + | ||
10 | + | ||
11 | + $scope.headers = [ {title : $translate.instant('ECM.LABEL.PROTOCOLO'), value : 'processo.nup'}, | ||
12 | + {title : $translate.instant('ECM.LABEL.JUSTIFICATIVA'), value : 'justificativaSolicitacao' }, | ||
13 | + {title : $translate.instant('ECM.LABEL.STATUS'), value : 'status.descricao' }]; | ||
14 | + | ||
15 | + $scope.filterCriteria = { | ||
16 | + start : 1, | ||
17 | + dir : 'asc', | ||
18 | + sort : 'id', | ||
19 | + limit : 10, | ||
20 | + fields: ['id','processo.nup','justificativaSolicitacao','status.descricao'], | ||
21 | + filters : [ {type : 'string', field : 'processo.nup' }, | ||
22 | + {type : 'string', field : 'justificativaSolicitacao' }, | ||
23 | + {type : 'string', field : 'status.descricao', listaDominio : [] , comparison : 'eq', value: 'Em Aberto'}] | ||
24 | + | ||
25 | + }; | ||
26 | + | ||
27 | + | ||
28 | + | ||
29 | + DominioRepository.findAllDominioByCodigo('statusSolicitaoProcesso', 1).then(function(result) { | ||
30 | + | ||
31 | + $scope.filterCriteria.filters[2].listaDominio.push(result.originalElement); | ||
32 | + | ||
33 | + }); | ||
34 | + | ||
35 | + // ABRI Documento SELECIONADA | ||
36 | + $scope.abrirVisualizar = function(edit){ | ||
37 | + var reabrirProcesso = $scope.reabrirProcessoChecked; | ||
38 | + | ||
39 | + if(!reabrirProcesso) { | ||
40 | + $scope.showAlert('warning', !edit ? $translate.instant('MSG.SELECIONE_UM_ITEM_PARA_VISUALIZACAO') : $translate.instant('MSG.SELECIONE_UM_ITEM_PARA_EDICAO')); | ||
41 | + return; | ||
42 | + } | ||
43 | + angular.element('#editReabrirProcesso').scope().getReabrirProcesso(reabrirProcesso, edit); | ||
44 | + $scope.$showPageEditWorkspace($scope.workspace); | ||
45 | + }; | ||
46 | + | ||
47 | +}]); |
cit-ecm-web/src/main/webapp/assets/js/angular/custom/controller/SolicitacaoReaberturaProcessoController.js
0 → 100644
@@ -0,0 +1,130 @@ | @@ -0,0 +1,130 @@ | ||
1 | +'use strict'; | ||
2 | + | ||
3 | +citApp.controller('SolicitacaoReaberturaProcessoController', ['$scope','ReabrirProcessoRepository', 'ProcessoRepository','UnidadeRepository','$filter', '$translate', '$timeout',"appService", function SolicitacaoReaberturaProcessoController($scope, ReabrirProcessoRepository, ProcessoRepository, UnidadeRepository, $filter, $translate, $timeout, appService) { | ||
4 | + $scope.solicitacaoReaberturaProcesso = {}; | ||
5 | + | ||
6 | + // Limpa formulário para novo cadastro | ||
7 | + $scope.resetForm = function() { | ||
8 | + $scope.limparSolicitacaoReaberturaProcesso(); | ||
9 | + $scope.edit = true; | ||
10 | + $timeout(function(){ | ||
11 | + $scope.solicitacaoReaberturaProcessoForm.$submitted = false; | ||
12 | + $scope.solicitacaoReaberturaProcessoForm.$setPristine(); | ||
13 | + }); | ||
14 | + }; | ||
15 | + | ||
16 | + // Atualiza pagina de pesquisa | ||
17 | + $scope.atualizaPaginaPesquisa = function () { | ||
18 | + angular.element('#searchSolicitacaoReaberturaProcesso').scope().fetchResult(); | ||
19 | + }; | ||
20 | + | ||
21 | + // MODAL QUE CONFIRMA REMOVER DO PAIS | ||
22 | + $scope.remove = function(solicitacaoReaberturaProcesso){ | ||
23 | + $scope.solicitacaoReaberturaProcesso = solicitacaoReaberturaProcesso; | ||
24 | + $scope.$openModalConfirm({ | ||
25 | + message: $translate.instant('MSG.CONFIRMA_EXCLUSAO'), | ||
26 | + callback: function () { | ||
27 | + ReabrirProcessoRepository.remove($scope.solicitacaoReaberturaProcesso).then(function() { | ||
28 | + | ||
29 | + $scope.$modalConfirmInstance.dismiss('cancel'); | ||
30 | + $scope.showAlert("success", $translate.instant('MSG.REGISTRO_EXCLUIDO')); | ||
31 | + angular.element('#searchSolicitacaoReaberturaProcesso').scope().fetchResult(); | ||
32 | + | ||
33 | + $scope.resetForm(); | ||
34 | + }); | ||
35 | + } | ||
36 | + }); | ||
37 | + }; | ||
38 | + | ||
39 | + // SALVA O PAIS | ||
40 | + $scope.saveOrUpdate = function(){ | ||
41 | + | ||
42 | + $scope.solicitacaoReaberturaProcessoForm.$submitted = true; | ||
43 | + | ||
44 | + //verifica se o formulario está valido para salvar | ||
45 | + if($scope.solicitacaoReaberturaProcessoForm.$valid){ | ||
46 | + | ||
47 | + $scope.setLoadingSalva(true); | ||
48 | + | ||
49 | + ReabrirProcessoRepository.save($scope.solicitacaoReaberturaProcesso).then(function(result) { | ||
50 | + $scope.solicitacaoReaberturaProcesso = result.originalElement; | ||
51 | + $scope.showAlert("success", $translate.instant('MSG.REGISTRO_SALVO')); | ||
52 | + $scope.status = $scope.solicitacaoReaberturaProcesso.status.descricao; | ||
53 | + $scope.solicitacaoReaberturaProcessoForm.$submitted = false; | ||
54 | + $scope.edit = false; | ||
55 | + $scope.setLoading(false); | ||
56 | + }); | ||
57 | + | ||
58 | + }else{ | ||
59 | + //Mensagem de erro de campos obrigatorios não preenchidos | ||
60 | + $scope.showAlert('error', $translate.instant('MSG.MN001'), " ", false); | ||
61 | + } | ||
62 | + | ||
63 | + }; | ||
64 | + | ||
65 | + // Limpa o formulario preenchido | ||
66 | + $scope.limparSolicitacaoReaberturaProcesso = function(){ | ||
67 | + $scope.solicitacaoReaberturaProcesso = {}; | ||
68 | + $scope.status = null; | ||
69 | + }; | ||
70 | + | ||
71 | + | ||
72 | + $scope.findAutoCompleteProcesso = function(value){ | ||
73 | + | ||
74 | + return ProcessoRepository.autoCompleteProcessoConcluidoByNup( value).then(function(result) { | ||
75 | + | ||
76 | + return result; | ||
77 | + | ||
78 | + }); | ||
79 | + }; | ||
80 | + | ||
81 | + // Consulta entidade e mostra no formulario | ||
82 | + $scope.getSolicitacaoReaberturaProcesso = function(processo, edit){ | ||
83 | + | ||
84 | + $scope.setLoadingGet(true); | ||
85 | + ReabrirProcessoRepository.get(processo.id).then(function(result) { | ||
86 | + | ||
87 | + $scope.solicitacaoReaberturaProcesso = result.originalElement; | ||
88 | + | ||
89 | + $scope.status = $scope.solicitacaoReaberturaProcesso.status.descricao; | ||
90 | + | ||
91 | + $scope.edit = edit; | ||
92 | + | ||
93 | + $scope.setLoading(false); | ||
94 | + }); | ||
95 | + }; | ||
96 | + | ||
97 | + // Abre a tela de visualização de processo e documentos | ||
98 | + $scope.visualizarProcesso = function () { | ||
99 | + | ||
100 | + var pagina = '/cit-ecm-web/html/processoVisualizacao/processoView.html'; | ||
101 | + | ||
102 | + var paginaGerenciamento = '/cit-ecm-web/html/gerenciarProcesso/gerenciarProcesso.html'; | ||
103 | + | ||
104 | + if ( appService.existsWorkspace( paginaGerenciamento ) ) { | ||
105 | + $scope.$openModalConfirm( { | ||
106 | + message : $translate.instant( 'ECM.MSG.EXISTE_PROCESSO_ABERTO' ), | ||
107 | + callback : function () { | ||
108 | + $scope.$modalConfirmInstance.dismiss( 'cancel' ); | ||
109 | + $scope.setLoading( true ); | ||
110 | + $scope.openWorkspaceIfNotOpen( $translate.instant( 'ECM.LABEL.PROCESSO' ), pagina, 'mod-orange' ); | ||
111 | + $timeout( function () { | ||
112 | + angular.element( '#visualizarGerenciarProcesso' ).scope().getProcessoVH( $scope.solicitacaoReaberturaProcesso.processo.id); | ||
113 | + | ||
114 | + }, 100 ); | ||
115 | + $scope.setLoading( false ); | ||
116 | + } | ||
117 | + } ); | ||
118 | + } else { | ||
119 | + $scope.openWorkspaceIfNotOpen( $translate.instant( 'ECM.LABEL.PROCESSO' ), pagina, 'mod-orange' ); | ||
120 | + $timeout( function () { | ||
121 | + angular.element( '#visualizarGerenciarProcesso' ).scope().getProcessoVH($scope.solicitacaoReaberturaProcesso.processo.id); | ||
122 | + | ||
123 | + }, 100 ); | ||
124 | + } | ||
125 | + ; | ||
126 | + }; | ||
127 | + | ||
128 | +}]); | ||
129 | + | ||
130 | + |
cit-ecm-web/src/main/webapp/assets/js/angular/custom/controller/SolicitacaoReaberturaProcessoListController.js
0 → 100644
@@ -0,0 +1,38 @@ | @@ -0,0 +1,38 @@ | ||
1 | +'use strict'; | ||
2 | + | ||
3 | +citApp.controller('SolicitacaoReaberturaProcessoListController', ['$scope', 'ReabrirProcessoRepository', '$translate', '$timeout', 'DominioRepository', function SolicitacaoReaberturaProcessoListController($scope, ReabrirProcessoRepository, $translate, $timeout, DominioRepository) { | ||
4 | + $scope.$showAdvancedFilters = false; | ||
5 | + | ||
6 | + $scope.resetForm = function() { | ||
7 | + angular.element("#editSolicitacaoReaberturaProcesso").scope().resetForm(); | ||
8 | + }; | ||
9 | + | ||
10 | + | ||
11 | + $scope.headers = [ {title : $translate.instant('ECM.LABEL.PROTOCOLO'), value : 'processo.nup'}, | ||
12 | + {title : $translate.instant('ECM.LABEL.JUSTIFICATIVA'), value : 'justificativaSolicitacao' }, | ||
13 | + {title : $translate.instant('ECM.LABEL.STATUS'), value : 'status.descricao' }]; | ||
14 | + | ||
15 | + $scope.filterCriteria = { | ||
16 | + start : 1, | ||
17 | + dir : 'asc', | ||
18 | + sort : 'id', | ||
19 | + limit : 10, | ||
20 | + fields: ['id','processo.nup','justificativaSolicitacao', 'status.descricao'], | ||
21 | + filters : [ {type : 'string', field : 'processo.nup' }, | ||
22 | + {type : 'string', field : 'justificativaSolicitacao' }, | ||
23 | + {type : 'string', field : 'status.descricao'}] | ||
24 | + }; | ||
25 | + | ||
26 | + // ABRI Documento SELECIONADA | ||
27 | + $scope.abrirVisualizar = function(edit){ | ||
28 | + var solicitacaoReaberturaProcesso = $scope.solicitacaoReaberturaProcessoChecked; | ||
29 | + | ||
30 | + if(!solicitacaoReaberturaProcesso) { | ||
31 | + $scope.showAlert('warning', !edit ? $translate.instant('MSG.SELECIONE_UM_ITEM_PARA_VISUALIZACAO') : $translate.instant('MSG.SELECIONE_UM_ITEM_PARA_EDICAO')); | ||
32 | + return; | ||
33 | + } | ||
34 | + angular.element('#editSolicitacaoReaberturaProcesso').scope().getSolicitacaoReaberturaProcesso(solicitacaoReaberturaProcesso, edit); | ||
35 | + $scope.$showPageEditWorkspace($scope.workspace); | ||
36 | + }; | ||
37 | + | ||
38 | +}]); |
cit-ecm-web/src/main/webapp/assets/js/angular/custom/repository/ReabrirProcessoRepository.js
0 → 100644
@@ -0,0 +1,13 @@ | @@ -0,0 +1,13 @@ | ||
1 | +'use strict'; | ||
2 | + | ||
3 | +citApp.factory('ReabrirProcessoRepository', ['RestangularEcm', 'AbstractRepository', function (restangularEcm, AbstractRepository) { | ||
4 | + | ||
5 | + function ReabrirProcessoRepository() { | ||
6 | + AbstractRepository.call(this, restangularEcm, 'rest/reabrirProcesso'); | ||
7 | + | ||
8 | + } | ||
9 | + | ||
10 | + AbstractRepository.extend(ReabrirProcessoRepository); | ||
11 | + | ||
12 | + return new ReabrirProcessoRepository(); | ||
13 | +}]); |
cit-ecm-web/src/main/webapp/html/reabrirProcesso/reabrirProcesso.html
0 → 100644
cit-ecm-web/src/main/webapp/html/reabrirProcesso/reabrirProcessoEdit.html
0 → 100644
@@ -0,0 +1,87 @@ | @@ -0,0 +1,87 @@ | ||
1 | +<div id="editReabrirProcesso" class="page-content clearfix" ng-controller="ReabrirProcessoController"> | ||
2 | + <div class="bar-buttons-action fixed"> | ||
3 | + <div class="row"> | ||
4 | + <div class="col-sm-8 text-left"> | ||
5 | + | ||
6 | + <button class="btn btn-clear" ng-click="saveOrUpdate()" ng-show="edit"> | ||
7 | + <i class="fa fa-save green"></i> | ||
8 | + <translate>ECM.LABEL.REABRIR</translate> | ||
9 | + </button> | ||
10 | + | ||
11 | + <button class="btn btn-clear" ng-click="$showPageSearchWorkspace(workspace); atualizaPaginaPesquisa();"> | ||
12 | + <i class="fa fa-search"></i> | ||
13 | + <translate>LABEL.PESQUISAR</translate> | ||
14 | + </button> | ||
15 | + | ||
16 | + <button class="btn btn-clear" ng-click="visualizarProcesso();" > | ||
17 | + <i class="fa fa-eye"></i> | ||
18 | + <translate>ECM.LABEL.VISUALIZAR_PROCESSO</translate> | ||
19 | + </button> | ||
20 | + | ||
21 | + </div> | ||
22 | + <!-- .col --> | ||
23 | + | ||
24 | + <div class="col-sm-4 text-right"> | ||
25 | + | ||
26 | + <favorito /> | ||
27 | + | ||
28 | + <help-button workspace="workspace" /> | ||
29 | + | ||
30 | + </div> | ||
31 | + <!-- .col --> | ||
32 | + </div> | ||
33 | + <!-- .row --> | ||
34 | + </div> | ||
35 | + <!-- .bar-buttons-action --> | ||
36 | + | ||
37 | + <breadcrumb ng-workspace="workspace"></breadcrumb> | ||
38 | + | ||
39 | + <form name="reabrirProcessoForm"> | ||
40 | + <p> | ||
41 | + <small>( <span class="red">*</span> ) <translate>LABEL.CAMPOS_OBRIGATORIOS</translate></small> | ||
42 | + </p> | ||
43 | + | ||
44 | + <fieldset> | ||
45 | + | ||
46 | + <legend> | ||
47 | + <translate>ECM.LABEL.DADOS_REABERTURA</translate> | ||
48 | + </legend> | ||
49 | + | ||
50 | + </fieldset> | ||
51 | + | ||
52 | + <div class="row"> | ||
53 | + <div class="col-sm-8"> | ||
54 | + | ||
55 | + </div> | ||
56 | + </div> | ||
57 | + | ||
58 | + <div class="row"> | ||
59 | + <div class="col-sm-4"> | ||
60 | + <auto-complete ng-id="reabrirProcesso.processo" ng-disabled='reabrirProcesso.id' ng-obrigatorio='true' ng-label="ECM.LABEL.PROTOCOLO" ng-model="reabrirProcesso.processo" form='reabrirProcessoForm' ng-find="findAutoCompleteProcesso(value)" | ||
61 | + ng-item="item.nup" /> | ||
62 | + </div> | ||
63 | + </div> | ||
64 | + | ||
65 | + <div class="row" ng-if="reabrirProcesso.id"> | ||
66 | + <div class="col-md-4"> | ||
67 | + <label-select ng-id="reabrirProcesso.status" ng-model="reabrirProcesso.status" ng-label="ECM.LABEL.STATUS" ng-obrigatorio='reabrirProcesso.id' form="reabrirProcessoForm" ng-list="statusList" | ||
68 | + ng-custom-options="dominioStatus.originalElement as dominioStatus.descricao for dominioStatus" track-by="track by dominioStatus.id" ng-disabled='!edit && reabrirProcesso.id'> </label-select> | ||
69 | + </div> | ||
70 | + </div> | ||
71 | + | ||
72 | + <div class="row" ng-if="reabrirProcesso.id && reabrirProcesso.status.codigo == 3"> | ||
73 | + <div class="col-sm-8"> | ||
74 | + <label-text-area ng-id="reabrirProcesso.justificativaRejeicao" ng-disabled="!edit && reabrirProcesso.id" ng-typ="text" ng-obrigatorio='!edit && reabrirProcesso.id' ng-label="ECM.LABEL.JUSTIFICATIVAREJEICAO" form='reabrirProcessoForm' ng-model="reabrirProcesso.justificativaRejeicao" | ||
75 | + ng-custom-maxlength='255' /> | ||
76 | + </div> | ||
77 | + </div> | ||
78 | + | ||
79 | + <div class="row"> | ||
80 | + <div class="col-sm-8"> | ||
81 | + <label-text-area ng-id="reabrirProcesso.justificativaSolicitacao" ng-disabled='reabrirProcesso.id' ng-typ="text" ng-obrigatorio='true' ng-label="ECM.LABEL.MOTIVO" form='reabrirProcessoForm' ng-model="reabrirProcesso.justificativaSolicitacao" | ||
82 | + ng-custom-maxlength='255' /> | ||
83 | + </div> | ||
84 | + </div> | ||
85 | + </form> | ||
86 | +</div> | ||
87 | +<!-- .page-content --> |
cit-ecm-web/src/main/webapp/html/reabrirProcesso/reabrirProcessoList.html
0 → 100644
@@ -0,0 +1,40 @@ | @@ -0,0 +1,40 @@ | ||
1 | +<div id="searchProcesso" class="page-content" ng-controller="ReabrirProcessoListController"> | ||
2 | + <div class="bar-buttons-action fixed"> | ||
3 | + <div class="row"> | ||
4 | + <div class="col-sm-8 text-left"> | ||
5 | + | ||
6 | + <button class="btn btn-clear" ng-click="abrirVisualizar(false);"> | ||
7 | + <i class="fa fa-search blue"></i> | ||
8 | + <translate>LABEL.VISUALIZAR</translate> | ||
9 | + </button> | ||
10 | + | ||
11 | + <button class="btn btn-clear" ng-click="abrirVisualizar(true);"> | ||
12 | + <i class="fa fa-times red"></i> | ||
13 | + <translate>ECM.LABEL.REABRIR_PROCESSO</translate> | ||
14 | + </button> | ||
15 | + | ||
16 | + <span class="divider-vertical"></span> | ||
17 | + | ||
18 | + <filtros ng-filter="filterCriteria" ng-workspace="workspace"></filtros> | ||
19 | + | ||
20 | + </div> | ||
21 | + <!-- .col --> | ||
22 | + | ||
23 | + <div class="col-sm-4 text-right"> | ||
24 | + | ||
25 | + <favorito /> | ||
26 | + | ||
27 | + <help-button workspace="workspace" /> | ||
28 | + | ||
29 | + </div> | ||
30 | + <!-- .col --> | ||
31 | + </div> | ||
32 | + <!-- .row --> | ||
33 | + </div> | ||
34 | + <!-- .bar-buttons-action --> | ||
35 | + | ||
36 | + <breadcrumb ng-workspace="workspace"></breadcrumb> | ||
37 | + | ||
38 | + <list-view ng-lista="reabrirProcessoList" ng-repository="ReabrirProcessoRepository" ng-use-custom-remove="false" ng-headers="headers" ng-filter-criteria="filterCriteria" ng-item-selecionado="reabrirProcessoChecked"></list-view> | ||
39 | +</div> | ||
40 | +<!-- .page-content --> |
cit-ecm-web/src/main/webapp/html/solicitacaoReaberturaProcesso/solicitacaoReaberturaProcesso.html
0 → 100644
@@ -0,0 +1,2 @@ | @@ -0,0 +1,2 @@ | ||
1 | +<div ng-include src="'/cit-ecm-web/html/solicitacaoReaberturaProcesso/solicitacaoReaberturaProcessoList.html'" ng-show="workspace.$showSearch"></div> | ||
2 | +<div ng-include src="'/cit-ecm-web/html/solicitacaoReaberturaProcesso/solicitacaoReaberturaProcessoEdit.html'" ng-show="workspace.$showEdit"></div> |
cit-ecm-web/src/main/webapp/html/solicitacaoReaberturaProcesso/solicitacaoReaberturaProcessoEdit.html
0 → 100644
@@ -0,0 +1,91 @@ | @@ -0,0 +1,91 @@ | ||
1 | +<div id="editSolicitacaoReaberturaProcesso" class="page-content clearfix" ng-controller="SolicitacaoReaberturaProcessoController"> | ||
2 | + <div class="bar-buttons-action fixed"> | ||
3 | + <div class="row"> | ||
4 | + <div class="col-sm-8 text-left"> | ||
5 | + | ||
6 | + <button class="btn btn-clear" ng-click="saveOrUpdate()" ng-show="edit"> | ||
7 | + <i class="fa fa-save green"></i> | ||
8 | + <translate>ECM.LABEL.SOLICITAR_REABERTURA</translate> | ||
9 | + </button> | ||
10 | + | ||
11 | + <button class="btn btn-clear" ng-click="resetForm()" ng-show="edit"> | ||
12 | + <i class="fa fa-eraser yellow-dark"></i> | ||
13 | + <translate>LABEL.LIMPAR</translate> | ||
14 | + </button> | ||
15 | + | ||
16 | + | ||
17 | + <button class="btn btn-clear" ng-click="$showPageSearchWorkspace(workspace); atualizaPaginaPesquisa();"> | ||
18 | + <i class="fa fa-search"></i> | ||
19 | + <translate>LABEL.PESQUISAR</translate> | ||
20 | + </button> | ||
21 | + | ||
22 | + <button class="btn btn-clear" ng-click="visualizarProcesso();" ng-show="solicitacaoReaberturaProcesso.processo"> | ||
23 | + <i class="fa fa-eye "></i> | ||
24 | + <translate>ECM.LABEL.VISUALIZAR_PROCESSO</translate> | ||
25 | + </button> | ||
26 | + | ||
27 | + </div> | ||
28 | + <!-- .col --> | ||
29 | + | ||
30 | + <div class="col-sm-4 text-right"> | ||
31 | + | ||
32 | + <favorito /> | ||
33 | + | ||
34 | + <help-button workspace="workspace" /> | ||
35 | + | ||
36 | + </div> | ||
37 | + <!-- .col --> | ||
38 | + </div> | ||
39 | + <!-- .row --> | ||
40 | + </div> | ||
41 | + <!-- .bar-buttons-action --> | ||
42 | + | ||
43 | + <breadcrumb ng-workspace="workspace"></breadcrumb> | ||
44 | + | ||
45 | + <form name="solicitacaoReaberturaProcessoForm"> | ||
46 | + <p> | ||
47 | + <small>( <span class="red">*</span> ) <translate>LABEL.CAMPOS_OBRIGATORIOS</translate></small> | ||
48 | + </p> | ||
49 | + | ||
50 | + <fieldset> | ||
51 | + | ||
52 | + <legend> | ||
53 | + <translate>ECM.LABEL.DADOS_SOLICITACAO</translate> | ||
54 | + </legend> | ||
55 | + | ||
56 | + </fieldset> | ||
57 | + | ||
58 | + <div class="row"> | ||
59 | + <div class="col-sm-8"> | ||
60 | + <auto-complete ng-id="solicitacaoReaberturaProcesso.processo" ng-disabled='!edit' ng-obrigatorio='true' ng-label="ECM.LABEL.PROTOCOLO" ng-model="solicitacaoReaberturaProcesso.processo" form='solicitacaoReaberturaProcessoForm' ng-find="findAutoCompleteProcesso(value)" | ||
61 | + ng-item="item.nup" /> | ||
62 | + | ||
63 | + </div> | ||
64 | + | ||
65 | + </div> | ||
66 | + | ||
67 | + | ||
68 | + <div class="row"> | ||
69 | + <div class="col-sm-8"> | ||
70 | + <label-text-area ng-id="solicitacaoReaberturaProcesso.justificativaSolicitacao" ng-disabled="!edit" ng-typ="text" ng-obrigatorio='true' ng-label="ECM.LABEL.JUSTIFICATIVA" form='solicitacaoReaberturaProcessoForm' ng-model="solicitacaoReaberturaProcesso.justificativaSolicitacao" | ||
71 | + ng-custom-maxlength='255' /> | ||
72 | + </div> | ||
73 | + </div> | ||
74 | + | ||
75 | + <div ng-if= "solicitacaoReaberturaProcesso.id"> | ||
76 | + <div class="row" > | ||
77 | + <div class="col-sm-8"> | ||
78 | + <label-input ng-id="status" ng-label="ECM.LABEL.STATUS" ng-model="status" form="solicitacaoReaberturaProcessoForm" ng-obrigatorio="true" ng-custom-maxlength="255" ng-type="text" ng-disabled="solicitacaoReaberturaProcesso.id" /> | ||
79 | + </div> | ||
80 | + </div> | ||
81 | + | ||
82 | + <div class="row" ng-if="solicitacaoReaberturaProcesso.id && solicitacaoReaberturaProcesso.status.codigo == 3"> | ||
83 | + <div class="col-sm-8"> | ||
84 | + <label-text-area ng-id="solicitacaoReaberturaProcesso.justificativaRejeicao" ng-disabled="solicitacaoReaberturaProcesso.id" ng-typ="text" ng-obrigatorio='false' ng-label="ECM.LABEL.JUSTIFICATIVAREJEICAO" form='solicitacaoReaberturaProcessoForm' ng-model="solicitacaoReaberturaProcesso.justificativaRejeicao" | ||
85 | + ng-custom-maxlength='255' /> | ||
86 | + </div> | ||
87 | + </div> | ||
88 | + </div> | ||
89 | + </form> | ||
90 | +</div> | ||
91 | +<!-- .page-content --> |
cit-ecm-web/src/main/webapp/html/solicitacaoReaberturaProcesso/solicitacaoReaberturaProcessoList.html
0 → 100644
@@ -0,0 +1,41 @@ | @@ -0,0 +1,41 @@ | ||
1 | +<div id="searchProcesso" class="page-content" ng-controller="SolicitacaoReaberturaProcessoListController"> | ||
2 | + <div class="bar-buttons-action fixed"> | ||
3 | + <div class="row"> | ||
4 | + <div class="col-sm-8 text-left"> | ||
5 | + | ||
6 | + <button class="btn btn-clear" ng-click="$showPageEditWorkspace(workspace); resetForm();"> | ||
7 | + <i class="fa fa-plus-circle yellow-dark"></i> | ||
8 | + <translate>LABEL.CADASTRAR</translate> | ||
9 | + </button> | ||
10 | + | ||
11 | + <button class="btn btn-clear" ng-click="abrirVisualizar(false);"> | ||
12 | + <i class="fa fa-search blue"></i> | ||
13 | + <translate>LABEL.VISUALIZAR</translate> | ||
14 | + </button> | ||
15 | + | ||
16 | + <span class="divider-vertical"></span> | ||
17 | + | ||
18 | + <filtros ng-filter="filterCriteria" ng-workspace="workspace"></filtros> | ||
19 | + | ||
20 | + </div> | ||
21 | + <!-- .col --> | ||
22 | + | ||
23 | + <div class="col-sm-4 text-right"> | ||
24 | + | ||
25 | + <favorito /> | ||
26 | + | ||
27 | + <help-button workspace="workspace" /> | ||
28 | + | ||
29 | + </div> | ||
30 | + <!-- .col --> | ||
31 | + </div> | ||
32 | + <!-- .row --> | ||
33 | + </div> | ||
34 | + <!-- .bar-buttons-action --> | ||
35 | + | ||
36 | + <breadcrumb ng-workspace="workspace"></breadcrumb> | ||
37 | + | ||
38 | + <list-view ng-lista="reabrirProcessoList" ng-repository="ReabrirProcessoRepository" ng-use-custom-remove="false" ng-headers="headers" ng-filter-criteria="filterCriteria" ng-item-selecionado="solicitacaoReaberturaProcessoChecked"></list-view> | ||
39 | + | ||
40 | +</div> | ||
41 | +<!-- .page-content --> |