Commit 16134ac9f69ad3d67026efccffd7d0dc32ae3f5f
1 parent
aed984a1
Exists in
master
[Redmine Atendimento #4269]Correção mapeamento edit contratos
Showing
5 changed files
with
220 additions
and
188 deletions
Show diff stats
cit-contratos-api/src/main/java/br/com/centralit/api/model/EncerramentoContrato.java
... | ... | @@ -31,7 +31,7 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
31 | 31 | |
32 | 32 | |
33 | 33 | /** |
34 | - * | |
34 | + * | |
35 | 35 | * <p><img src="http://centralit.com.br/images/logo_central.png"></p> |
36 | 36 | * |
37 | 37 | * <p><b>Company: </b> Central IT - Governança Corporativa - </p> |
... | ... | @@ -39,11 +39,11 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
39 | 39 | * <p><b>Title: </b></p> |
40 | 40 | * |
41 | 41 | * <p><b>Description: </b></p> |
42 | - * | |
42 | + * | |
43 | 43 | * <p><b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a></p> |
44 | 44 | * |
45 | - * <p><b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a></p> | |
46 | - * | |
45 | + * <p><b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a></p> | |
46 | + * | |
47 | 47 | * @since 24/02/2016 - 09:03:01 |
48 | 48 | * |
49 | 49 | * @version 1.0.0 |
... | ... | @@ -74,45 +74,45 @@ public class EncerramentoContrato extends PersistentObjectAudit { |
74 | 74 | @ManyToOne(fetch = FetchType.LAZY, optional = false) |
75 | 75 | @JsonView({ ViewsContrato.EncerramentoContratoEditView.class }) |
76 | 76 | private Organizacao contratante; |
77 | - | |
77 | + | |
78 | 78 | /** Atributo codigo. */ |
79 | 79 | @Column(length = 30, unique = true, nullable = false) |
80 | 80 | @JsonView({ ViewsContrato.EncerramentoContratoEditView.class }) |
81 | 81 | private String numTermo; |
82 | - | |
82 | + | |
83 | 83 | /** Atributo numeroAnoContrato. */ |
84 | 84 | @Transient |
85 | 85 | @JsonView({ ViewsContrato.EncerramentoContratoListView.class }) |
86 | 86 | private String numTermoFormatado; |
87 | - | |
87 | + | |
88 | 88 | /** Atributo dataEmissao referente à dataEncerramento da tela de cadastro */ |
89 | 89 | @Column(nullable = false) |
90 | 90 | @Temporal(TemporalType.TIMESTAMP) |
91 | 91 | @JsonSerialize(using = JsonCalendarSimpleDateSerializer.class) |
92 | 92 | @JsonDeserialize(using = JsonCalendarSimpleDateDeserializer.class) |
93 | - @JsonView({ ViewsContrato.EncerramentoContratoListView.class }) | |
93 | + @JsonView({ ViewsContrato.EncerramentoContratoListView.class, ViewsContrato.ContratoEditView.class }) | |
94 | 94 | private Calendar dataEmissao; |
95 | - | |
95 | + | |
96 | 96 | @Column(length = 2000, nullable = false) |
97 | 97 | @JsonView({ ViewsContrato.EncerramentoContratoEditView.class }) |
98 | 98 | private String introducao; |
99 | - | |
99 | + | |
100 | 100 | @Column(length = 2000, nullable = false) |
101 | 101 | @JsonView({ ViewsContrato.EncerramentoContratoEditView.class }) |
102 | 102 | private String motivo; |
103 | - | |
103 | + | |
104 | 104 | @Column(length = 8000, nullable = false) |
105 | 105 | @JsonView({ ViewsContrato.EncerramentoContratoEditView.class }) |
106 | 106 | private String encaminhamentos; |
107 | - | |
107 | + | |
108 | 108 | @Column(length = 2000, nullable = true) |
109 | 109 | @JsonView({ ViewsContrato.EncerramentoContratoEditView.class }) |
110 | 110 | private String pendencias; |
111 | - | |
111 | + | |
112 | 112 | @Column(length = 2000, nullable = false) |
113 | 113 | @JsonView({ ViewsContrato.EncerramentoContratoEditView.class }) |
114 | 114 | private String decisao; |
115 | - | |
115 | + | |
116 | 116 | /** Atributo documentos. */ |
117 | 117 | @OneToMany(fetch = FetchType.LAZY, mappedBy = "encerramentoContrato", cascade = CascadeType.ALL, orphanRemoval = true) |
118 | 118 | @JsonView({ ViewsContrato.EncerramentoContratoEditView.class }) |
... | ... | @@ -122,7 +122,7 @@ public class EncerramentoContrato extends PersistentObjectAudit { |
122 | 122 | @OneToMany(fetch = FetchType.LAZY, mappedBy = "encerramentoContrato", cascade = CascadeType.ALL, orphanRemoval = true) |
123 | 123 | @JsonView({ ViewsContrato.EncerramentoContratoEditView.class }) |
124 | 124 | private Collection<EncerramentoContratoObservacao> observacoes; |
125 | - | |
125 | + | |
126 | 126 | /** |
127 | 127 | * Retorna o valor do atributo <code>id</code> |
128 | 128 | * |
... | ... | @@ -167,41 +167,41 @@ public class EncerramentoContrato extends PersistentObjectAudit { |
167 | 167 | } |
168 | 168 | |
169 | 169 | |
170 | - | |
170 | + | |
171 | 171 | /** |
172 | 172 | * Retorna o valor do atributo <code>contratante</code> |
173 | 173 | * |
174 | 174 | * @return <code>Organizacao</code> |
175 | 175 | */ |
176 | 176 | public Organizacao getContratante() { |
177 | - | |
177 | + | |
178 | 178 | return contratante; |
179 | 179 | } |
180 | 180 | |
181 | 181 | |
182 | - | |
182 | + | |
183 | 183 | /** |
184 | 184 | * Define o valor do atributo <code>contratante</code>. |
185 | 185 | * |
186 | - * @param contratante | |
186 | + * @param contratante | |
187 | 187 | */ |
188 | 188 | public void setContratante(Organizacao contratante) { |
189 | - | |
189 | + | |
190 | 190 | this.contratante = contratante; |
191 | 191 | } |
192 | 192 | |
193 | 193 | |
194 | - | |
194 | + | |
195 | 195 | /** |
196 | 196 | * Retorna o valor do atributo <code>numTermo</code> |
197 | 197 | * |
198 | 198 | * @return <code>String</code> |
199 | 199 | */ |
200 | 200 | public String getNumTermo() { |
201 | - | |
201 | + | |
202 | 202 | return numTermo; |
203 | 203 | } |
204 | - | |
204 | + | |
205 | 205 | /** |
206 | 206 | * Retorna o valor do atributo <code>numeroAnoContrato</code> formatado com máscara |
207 | 207 | * |
... | ... | @@ -215,206 +215,206 @@ public class EncerramentoContrato extends PersistentObjectAudit { |
215 | 215 | } |
216 | 216 | |
217 | 217 | |
218 | - | |
218 | + | |
219 | 219 | /** |
220 | 220 | * Define o valor do atributo <code>numTermo</code>. |
221 | 221 | * |
222 | - * @param numTermo | |
222 | + * @param numTermo | |
223 | 223 | */ |
224 | 224 | public void setNumTermo(String numTermo) { |
225 | - | |
225 | + | |
226 | 226 | this.numTermo = numTermo; |
227 | 227 | } |
228 | 228 | |
229 | 229 | |
230 | - | |
230 | + | |
231 | 231 | /** |
232 | 232 | * Retorna o valor do atributo <code>dataEmissao</code> |
233 | 233 | * |
234 | 234 | * @return <code>Calendar</code> |
235 | 235 | */ |
236 | 236 | public Calendar getDataEmissao() { |
237 | - | |
237 | + | |
238 | 238 | return dataEmissao; |
239 | 239 | } |
240 | 240 | |
241 | 241 | |
242 | - | |
242 | + | |
243 | 243 | /** |
244 | 244 | * Define o valor do atributo <code>dataEmissao</code>. |
245 | 245 | * |
246 | - * @param dataEmissao | |
246 | + * @param dataEmissao | |
247 | 247 | */ |
248 | 248 | public void setDataEmissao(Calendar dataEmissao) { |
249 | - | |
249 | + | |
250 | 250 | this.dataEmissao = dataEmissao; |
251 | 251 | } |
252 | 252 | |
253 | 253 | |
254 | - | |
254 | + | |
255 | 255 | /** |
256 | 256 | * Retorna o valor do atributo <code>introducao</code> |
257 | 257 | * |
258 | 258 | * @return <code>String</code> |
259 | 259 | */ |
260 | 260 | public String getIntroducao() { |
261 | - | |
261 | + | |
262 | 262 | return introducao; |
263 | 263 | } |
264 | 264 | |
265 | 265 | |
266 | - | |
266 | + | |
267 | 267 | /** |
268 | 268 | * Define o valor do atributo <code>introducao</code>. |
269 | 269 | * |
270 | - * @param introducao | |
270 | + * @param introducao | |
271 | 271 | */ |
272 | 272 | public void setIntroducao(String introducao) { |
273 | - | |
273 | + | |
274 | 274 | this.introducao = introducao; |
275 | 275 | } |
276 | 276 | |
277 | 277 | |
278 | - | |
278 | + | |
279 | 279 | /** |
280 | 280 | * Retorna o valor do atributo <code>motivo</code> |
281 | 281 | * |
282 | 282 | * @return <code>String</code> |
283 | 283 | */ |
284 | 284 | public String getMotivo() { |
285 | - | |
285 | + | |
286 | 286 | return motivo; |
287 | 287 | } |
288 | 288 | |
289 | 289 | |
290 | - | |
290 | + | |
291 | 291 | /** |
292 | 292 | * Define o valor do atributo <code>motivo</code>. |
293 | 293 | * |
294 | - * @param motivo | |
294 | + * @param motivo | |
295 | 295 | */ |
296 | 296 | public void setMotivo(String motivo) { |
297 | - | |
297 | + | |
298 | 298 | this.motivo = motivo; |
299 | 299 | } |
300 | 300 | |
301 | 301 | |
302 | - | |
302 | + | |
303 | 303 | /** |
304 | 304 | * Retorna o valor do atributo <code>encaminhamentos</code> |
305 | 305 | * |
306 | 306 | * @return <code>String</code> |
307 | 307 | */ |
308 | 308 | public String getEncaminhamentos() { |
309 | - | |
309 | + | |
310 | 310 | return encaminhamentos; |
311 | 311 | } |
312 | 312 | |
313 | 313 | |
314 | - | |
314 | + | |
315 | 315 | /** |
316 | 316 | * Define o valor do atributo <code>encaminhamentos</code>. |
317 | 317 | * |
318 | - * @param encaminhamentos | |
318 | + * @param encaminhamentos | |
319 | 319 | */ |
320 | 320 | public void setEncaminhamentos(String encaminhamentos) { |
321 | - | |
321 | + | |
322 | 322 | this.encaminhamentos = encaminhamentos; |
323 | 323 | } |
324 | 324 | |
325 | 325 | |
326 | - | |
326 | + | |
327 | 327 | /** |
328 | 328 | * Retorna o valor do atributo <code>pendencias</code> |
329 | 329 | * |
330 | 330 | * @return <code>String</code> |
331 | 331 | */ |
332 | 332 | public String getPendencias() { |
333 | - | |
333 | + | |
334 | 334 | return pendencias; |
335 | 335 | } |
336 | 336 | |
337 | 337 | |
338 | - | |
338 | + | |
339 | 339 | /** |
340 | 340 | * Define o valor do atributo <code>pendencias</code>. |
341 | 341 | * |
342 | - * @param pendencias | |
342 | + * @param pendencias | |
343 | 343 | */ |
344 | 344 | public void setPendencias(String pendencias) { |
345 | - | |
345 | + | |
346 | 346 | this.pendencias = pendencias; |
347 | 347 | } |
348 | 348 | |
349 | 349 | |
350 | - | |
350 | + | |
351 | 351 | /** |
352 | 352 | * Retorna o valor do atributo <code>decisao</code> |
353 | 353 | * |
354 | 354 | * @return <code>String</code> |
355 | 355 | */ |
356 | 356 | public String getDecisao() { |
357 | - | |
357 | + | |
358 | 358 | return decisao; |
359 | 359 | } |
360 | 360 | |
361 | 361 | |
362 | - | |
362 | + | |
363 | 363 | /** |
364 | 364 | * Define o valor do atributo <code>decisao</code>. |
365 | 365 | * |
366 | - * @param decisao | |
366 | + * @param decisao | |
367 | 367 | */ |
368 | 368 | public void setDecisao(String decisao) { |
369 | - | |
369 | + | |
370 | 370 | this.decisao = decisao; |
371 | 371 | } |
372 | 372 | |
373 | 373 | |
374 | - | |
374 | + | |
375 | 375 | /** |
376 | 376 | * Retorna o valor do atributo <code>documentos</code> |
377 | 377 | * |
378 | 378 | * @return <code>Collection<EncerramentoContratoDocumento></code> |
379 | 379 | */ |
380 | 380 | public Collection<EncerramentoContratoDocumento> getDocumentos() { |
381 | - | |
381 | + | |
382 | 382 | return documentos; |
383 | 383 | } |
384 | 384 | |
385 | 385 | |
386 | - | |
386 | + | |
387 | 387 | /** |
388 | 388 | * Define o valor do atributo <code>documentos</code>. |
389 | 389 | * |
390 | - * @param documentos | |
390 | + * @param documentos | |
391 | 391 | */ |
392 | 392 | public void setDocumentos(Collection<EncerramentoContratoDocumento> documentos) { |
393 | - | |
393 | + | |
394 | 394 | this.documentos = documentos; |
395 | 395 | } |
396 | 396 | |
397 | 397 | |
398 | - | |
398 | + | |
399 | 399 | /** |
400 | 400 | * Retorna o valor do atributo <code>observacoes</code> |
401 | 401 | * |
402 | 402 | * @return <code>Collection<EncerramentoContratoObservacao></code> |
403 | 403 | */ |
404 | 404 | public Collection<EncerramentoContratoObservacao> getObservacoes() { |
405 | - | |
405 | + | |
406 | 406 | return observacoes; |
407 | 407 | } |
408 | 408 | |
409 | 409 | |
410 | - | |
410 | + | |
411 | 411 | /** |
412 | 412 | * Define o valor do atributo <code>observacoes</code>. |
413 | 413 | * |
414 | - * @param observacoes | |
414 | + * @param observacoes | |
415 | 415 | */ |
416 | 416 | public void setObservacoes(Collection<EncerramentoContratoObservacao> observacoes) { |
417 | - | |
417 | + | |
418 | 418 | this.observacoes = observacoes; |
419 | 419 | } |
420 | 420 | ... | ... |
cit-contratos-api/src/main/java/br/com/centralit/api/model/EventoAditivo.java
... | ... | @@ -29,7 +29,7 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
29 | 29 | |
30 | 30 | |
31 | 31 | /** |
32 | - * | |
32 | + * | |
33 | 33 | * <p><img src="http://centralit.com.br/images/logo_central.png"></p> |
34 | 34 | * |
35 | 35 | * <p><b>Company: </b> Central IT - Governança Corporativa - </p> |
... | ... | @@ -37,11 +37,11 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
37 | 37 | * <p><b>Title: </b></p> |
38 | 38 | * |
39 | 39 | * <p><b>Description: </b></p> |
40 | - * | |
40 | + * | |
41 | 41 | * <p><b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a></p> |
42 | 42 | * |
43 | - * <p><b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a></p> | |
44 | - * | |
43 | + * <p><b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a></p> | |
44 | + * | |
45 | 45 | * @since 09/03/2016 - 16:40:20 |
46 | 46 | * |
47 | 47 | * @version 1.0.0 |
... | ... | @@ -56,7 +56,7 @@ public class EventoAditivo extends ContratoEvento { |
56 | 56 | |
57 | 57 | /** Atributo serialVersionUID. */ |
58 | 58 | private static final long serialVersionUID = 1L; |
59 | - | |
59 | + | |
60 | 60 | @Embedded |
61 | 61 | @JsonView({ Views.GenericView.class }) |
62 | 62 | private RegistroSequencial registroSequencial; |
... | ... | @@ -67,51 +67,51 @@ public class EventoAditivo extends ContratoEvento { |
67 | 67 | @JsonDeserialize(using = JsonCalendarSimpleDateDeserializer.class) |
68 | 68 | @JsonView({ ViewsContrato.EventoAditivoEditView.class, ViewsContrato.ContratoEventoEditView.class, ViewsContrato.ContratoEditView.class }) |
69 | 69 | private Calendar dataEmissao; |
70 | - | |
70 | + | |
71 | 71 | /** Atributo tipoAlteracao. */ |
72 | 72 | @ManyToOne(fetch = FetchType.LAZY, optional = false) |
73 | 73 | @JsonView({ ViewsContrato.EventoAditivoEditView.class, ViewsContrato.ContratoEventoEditView.class }) |
74 | 74 | private Dominio tipoAlteracao; |
75 | - | |
75 | + | |
76 | 76 | /** Atributo aditivoDePrazo. */ |
77 | 77 | @Column(nullable = false) |
78 | 78 | @JsonView({ Views.GenericView.class }) |
79 | 79 | private Boolean aditivoDePrazo = Boolean.FALSE; |
80 | - | |
80 | + | |
81 | 81 | /** Atributo aditivoDeValor. */ |
82 | 82 | @Column(nullable = false) |
83 | 83 | @JsonView({ Views.GenericView.class }) |
84 | 84 | private Boolean aditivoDeValor = Boolean.FALSE; |
85 | - | |
85 | + | |
86 | 86 | /** Atributo aditivoDeClausula. */ |
87 | 87 | @Column(nullable = false) |
88 | 88 | @JsonView({ Views.GenericView.class }) |
89 | 89 | private Boolean aditivoDeClausula = Boolean.FALSE; |
90 | - | |
90 | + | |
91 | 91 | /** Atributo dataEmissao. */ |
92 | 92 | @Temporal(TemporalType.TIMESTAMP) |
93 | 93 | @JsonSerialize(using = JsonCalendarSimpleDateSerializer.class) |
94 | 94 | @JsonDeserialize(using = JsonCalendarSimpleDateDeserializer.class) |
95 | 95 | @JsonView({ ViewsContrato.EventoAditivoEditView.class, ViewsContrato.ContratoEventoEditView.class }) |
96 | 96 | private Calendar dataInicio; |
97 | - | |
97 | + | |
98 | 98 | /** Atributo dataEmissao. */ |
99 | 99 | @Temporal(TemporalType.TIMESTAMP) |
100 | 100 | @JsonSerialize(using = JsonCalendarSimpleDateSerializer.class) |
101 | 101 | @JsonDeserialize(using = JsonCalendarSimpleDateDeserializer.class) |
102 | 102 | @JsonView({ ViewsContrato.EventoAditivoEditView.class, ViewsContrato.ContratoEventoEditView.class }) |
103 | 103 | private Calendar dataFim; |
104 | - | |
104 | + | |
105 | 105 | /** Atributo tipoObjeto. */ |
106 | 106 | @ManyToOne(fetch = FetchType.LAZY, optional = true) |
107 | 107 | @JsonView({ ViewsContrato.EventoAditivoEditView.class, ViewsContrato.ContratoEventoEditView.class }) |
108 | 108 | private Dominio tipoObjeto; |
109 | - | |
109 | + | |
110 | 110 | /** Atributo tipoAlteracaoValor. */ |
111 | 111 | @ManyToOne(fetch = FetchType.LAZY, optional = true) |
112 | 112 | @JsonView({ ViewsContrato.EventoAditivoEditView.class, ViewsContrato.ContratoEventoEditView.class }) |
113 | 113 | private Dominio tipoAlteracaoValor; |
114 | - | |
114 | + | |
115 | 115 | /** Atributo valorContrato. */ |
116 | 116 | @Column(precision = 20, scale = 4) |
117 | 117 | @JsonDeserialize(using = MoneyDeserializer.class) |
... | ... | @@ -123,32 +123,32 @@ public class EventoAditivo extends ContratoEvento { |
123 | 123 | @JsonDeserialize(using = MoneyDeserializer.class) |
124 | 124 | @JsonView({ ViewsContrato.EventoAditivoEditView.class, ViewsContrato.ContratoEventoEditView.class }) |
125 | 125 | private BigDecimal percentualAditivo; |
126 | - | |
126 | + | |
127 | 127 | /** Atributo descricaoAditivo. */ |
128 | 128 | @Column(length = 5000, nullable = true) |
129 | 129 | @JsonView({ ViewsContrato.EventoAditivoEditView.class }) |
130 | 130 | private String descricaoAditivo; |
131 | - | |
131 | + | |
132 | 132 | /** Atributo justificativa. */ |
133 | 133 | @Column(length = 2000, nullable = false) |
134 | 134 | @JsonView({ ViewsContrato.EventoAditivoEditView.class }) |
135 | 135 | private String justificativa; |
136 | - | |
136 | + | |
137 | 137 | /** Atributo manifestacaoContratada. */ |
138 | 138 | @Column(length = 2000, nullable = true) |
139 | 139 | @JsonView({ ViewsContrato.EventoAditivoEditView.class }) |
140 | 140 | private String manifestacaoContratada; |
141 | - | |
141 | + | |
142 | 142 | /** Atributo documentos. */ |
143 | 143 | @OneToMany(fetch = FetchType.LAZY, mappedBy = "eventoAditivo", cascade = CascadeType.ALL, orphanRemoval = true) |
144 | - @JsonView({ ViewsContrato.EventoAditivoEditView.class }) | |
144 | + @JsonView({ ViewsContrato.EventoAditivoEditView.class, ViewsContrato.ContratoEditView.class }) | |
145 | 145 | private Collection<EventoAditivoDocumento> documentos; |
146 | 146 | |
147 | 147 | /** Atributo observacoes. */ |
148 | 148 | @OneToMany(fetch = FetchType.LAZY, mappedBy = "eventoAditivo", cascade = CascadeType.ALL, orphanRemoval = true) |
149 | - @JsonView({ ViewsContrato.EventoAditivoEditView.class }) | |
149 | + @JsonView({ ViewsContrato.EventoAditivoEditView.class, ViewsContrato.ContratoEditView.class }) | |
150 | 150 | private Collection<EventoAditivoObservacao> observacoes; |
151 | - | |
151 | + | |
152 | 152 | /** Atributo contratoAditivo. */ |
153 | 153 | @ManyToOne(fetch = FetchType.LAZY, optional = true) |
154 | 154 | private Contrato contratoAditivo; |
... | ... | @@ -157,291 +157,291 @@ public class EventoAditivo extends ContratoEvento { |
157 | 157 | @ManyToOne(fetch = FetchType.LAZY, optional = true) |
158 | 158 | private Contrato contratoAditivoInativo; |
159 | 159 | |
160 | - | |
160 | + | |
161 | 161 | /** |
162 | 162 | * Retorna o valor do atributo <code>registroSequencial</code> |
163 | 163 | * |
164 | 164 | * @return <code>RegistroSequencial</code> |
165 | 165 | */ |
166 | 166 | public RegistroSequencial getRegistroSequencial() { |
167 | - | |
167 | + | |
168 | 168 | return registroSequencial; |
169 | 169 | } |
170 | 170 | |
171 | - | |
171 | + | |
172 | 172 | /** |
173 | 173 | * Define o valor do atributo <code>registroSequencial</code>. |
174 | 174 | * |
175 | - * @param registroSequencial | |
175 | + * @param registroSequencial | |
176 | 176 | */ |
177 | 177 | public void setRegistroSequencial(RegistroSequencial registroSequencial) { |
178 | - | |
178 | + | |
179 | 179 | this.registroSequencial = registroSequencial; |
180 | 180 | } |
181 | 181 | |
182 | - | |
182 | + | |
183 | 183 | /** |
184 | 184 | * Retorna o valor do atributo <code>dataEmissao</code> |
185 | 185 | * |
186 | 186 | * @return <code>Calendar</code> |
187 | 187 | */ |
188 | 188 | public Calendar getDataEmissao() { |
189 | - | |
189 | + | |
190 | 190 | return dataEmissao; |
191 | 191 | } |
192 | 192 | |
193 | - | |
193 | + | |
194 | 194 | /** |
195 | 195 | * Define o valor do atributo <code>dataEmissao</code>. |
196 | 196 | * |
197 | - * @param dataEmissao | |
197 | + * @param dataEmissao | |
198 | 198 | */ |
199 | 199 | public void setDataEmissao(Calendar dataEmissao) { |
200 | - | |
200 | + | |
201 | 201 | this.dataEmissao = dataEmissao; |
202 | 202 | } |
203 | 203 | |
204 | - | |
204 | + | |
205 | 205 | /** |
206 | 206 | * Retorna o valor do atributo <code>tipoAlteracao</code> |
207 | 207 | * |
208 | 208 | * @return <code>Dominio</code> |
209 | 209 | */ |
210 | 210 | public Dominio getTipoAlteracao() { |
211 | - | |
211 | + | |
212 | 212 | return tipoAlteracao; |
213 | 213 | } |
214 | 214 | |
215 | - | |
215 | + | |
216 | 216 | /** |
217 | 217 | * Define o valor do atributo <code>tipoAlteracao</code>. |
218 | 218 | * |
219 | - * @param tipoAlteracao | |
219 | + * @param tipoAlteracao | |
220 | 220 | */ |
221 | 221 | public void setTipoAlteracao(Dominio tipoAlteracao) { |
222 | - | |
222 | + | |
223 | 223 | this.tipoAlteracao = tipoAlteracao; |
224 | 224 | } |
225 | 225 | |
226 | - | |
226 | + | |
227 | 227 | /** |
228 | 228 | * Retorna o valor do atributo <code>aditivoDePrazo</code> |
229 | 229 | * |
230 | 230 | * @return <code>Boolean</code> |
231 | 231 | */ |
232 | 232 | public Boolean getAditivoDePrazo() { |
233 | - | |
233 | + | |
234 | 234 | return aditivoDePrazo; |
235 | 235 | } |
236 | 236 | |
237 | - | |
237 | + | |
238 | 238 | /** |
239 | 239 | * Define o valor do atributo <code>aditivoDePrazo</code>. |
240 | 240 | * |
241 | - * @param aditivoDePrazo | |
241 | + * @param aditivoDePrazo | |
242 | 242 | */ |
243 | 243 | public void setAditivoDePrazo(Boolean aditivoDePrazo) { |
244 | - | |
244 | + | |
245 | 245 | this.aditivoDePrazo = aditivoDePrazo; |
246 | 246 | } |
247 | 247 | |
248 | - | |
248 | + | |
249 | 249 | /** |
250 | 250 | * Retorna o valor do atributo <code>aditivoDeValor</code> |
251 | 251 | * |
252 | 252 | * @return <code>Boolean</code> |
253 | 253 | */ |
254 | 254 | public Boolean getAditivoDeValor() { |
255 | - | |
255 | + | |
256 | 256 | return aditivoDeValor; |
257 | 257 | } |
258 | 258 | |
259 | - | |
259 | + | |
260 | 260 | /** |
261 | 261 | * Define o valor do atributo <code>aditivoDeValor</code>. |
262 | 262 | * |
263 | - * @param aditivoDeValor | |
263 | + * @param aditivoDeValor | |
264 | 264 | */ |
265 | 265 | public void setAditivoDeValor(Boolean aditivoDeValor) { |
266 | - | |
266 | + | |
267 | 267 | this.aditivoDeValor = aditivoDeValor; |
268 | 268 | } |
269 | 269 | |
270 | - | |
270 | + | |
271 | 271 | /** |
272 | 272 | * Retorna o valor do atributo <code>aditivoDeClausula</code> |
273 | 273 | * |
274 | 274 | * @return <code>Boolean</code> |
275 | 275 | */ |
276 | 276 | public Boolean getAditivoDeClausula() { |
277 | - | |
277 | + | |
278 | 278 | return aditivoDeClausula; |
279 | 279 | } |
280 | 280 | |
281 | - | |
281 | + | |
282 | 282 | /** |
283 | 283 | * Define o valor do atributo <code>aditivoDeClausula</code>. |
284 | 284 | * |
285 | - * @param aditivoDeClausula | |
285 | + * @param aditivoDeClausula | |
286 | 286 | */ |
287 | 287 | public void setAditivoDeClausula(Boolean aditivoDeClausula) { |
288 | - | |
288 | + | |
289 | 289 | this.aditivoDeClausula = aditivoDeClausula; |
290 | 290 | } |
291 | 291 | |
292 | - | |
292 | + | |
293 | 293 | /** |
294 | 294 | * Retorna o valor do atributo <code>dataInicio</code> |
295 | 295 | * |
296 | 296 | * @return <code>Calendar</code> |
297 | 297 | */ |
298 | 298 | public Calendar getDataInicio() { |
299 | - | |
299 | + | |
300 | 300 | return dataInicio; |
301 | 301 | } |
302 | 302 | |
303 | - | |
303 | + | |
304 | 304 | /** |
305 | 305 | * Define o valor do atributo <code>dataInicio</code>. |
306 | 306 | * |
307 | - * @param dataInicio | |
307 | + * @param dataInicio | |
308 | 308 | */ |
309 | 309 | public void setDataInicio(Calendar dataInicio) { |
310 | - | |
310 | + | |
311 | 311 | this.dataInicio = dataInicio; |
312 | 312 | } |
313 | 313 | |
314 | - | |
314 | + | |
315 | 315 | /** |
316 | 316 | * Retorna o valor do atributo <code>dataFim</code> |
317 | 317 | * |
318 | 318 | * @return <code>Calendar</code> |
319 | 319 | */ |
320 | 320 | public Calendar getDataFim() { |
321 | - | |
321 | + | |
322 | 322 | return dataFim; |
323 | 323 | } |
324 | 324 | |
325 | - | |
325 | + | |
326 | 326 | /** |
327 | 327 | * Define o valor do atributo <code>dataFim</code>. |
328 | 328 | * |
329 | - * @param dataFim | |
329 | + * @param dataFim | |
330 | 330 | */ |
331 | 331 | public void setDataFim(Calendar dataFim) { |
332 | - | |
332 | + | |
333 | 333 | this.dataFim = dataFim; |
334 | 334 | } |
335 | 335 | |
336 | - | |
336 | + | |
337 | 337 | /** |
338 | 338 | * Retorna o valor do atributo <code>tipoObjeto</code> |
339 | 339 | * |
340 | 340 | * @return <code>Dominio</code> |
341 | 341 | */ |
342 | 342 | public Dominio getTipoObjeto() { |
343 | - | |
343 | + | |
344 | 344 | return tipoObjeto; |
345 | 345 | } |
346 | 346 | |
347 | - | |
347 | + | |
348 | 348 | /** |
349 | 349 | * Define o valor do atributo <code>tipoObjeto</code>. |
350 | 350 | * |
351 | - * @param tipoObjeto | |
351 | + * @param tipoObjeto | |
352 | 352 | */ |
353 | 353 | public void setTipoObjeto(Dominio tipoObjeto) { |
354 | - | |
354 | + | |
355 | 355 | this.tipoObjeto = tipoObjeto; |
356 | 356 | } |
357 | 357 | |
358 | - | |
358 | + | |
359 | 359 | /** |
360 | 360 | * Retorna o valor do atributo <code>tipoAlteracaoValor</code> |
361 | 361 | * |
362 | 362 | * @return <code>Dominio</code> |
363 | 363 | */ |
364 | 364 | public Dominio getTipoAlteracaoValor() { |
365 | - | |
365 | + | |
366 | 366 | return tipoAlteracaoValor; |
367 | 367 | } |
368 | 368 | |
369 | - | |
369 | + | |
370 | 370 | /** |
371 | 371 | * Define o valor do atributo <code>tipoAlteracaoValor</code>. |
372 | 372 | * |
373 | - * @param tipoAlteracaoValor | |
373 | + * @param tipoAlteracaoValor | |
374 | 374 | */ |
375 | 375 | public void setTipoAlteracaoValor(Dominio tipoAlteracaoValor) { |
376 | - | |
376 | + | |
377 | 377 | this.tipoAlteracaoValor = tipoAlteracaoValor; |
378 | 378 | } |
379 | 379 | |
380 | - | |
380 | + | |
381 | 381 | /** |
382 | 382 | * Retorna o valor do atributo <code>valorAditivo</code> |
383 | 383 | * |
384 | 384 | * @return <code>BigDecimal</code> |
385 | 385 | */ |
386 | 386 | public BigDecimal getValorAditivo() { |
387 | - | |
387 | + | |
388 | 388 | return valorAditivo; |
389 | 389 | } |
390 | 390 | |
391 | - | |
391 | + | |
392 | 392 | /** |
393 | 393 | * Define o valor do atributo <code>valorAditivo</code>. |
394 | 394 | * |
395 | - * @param valorAditivo | |
395 | + * @param valorAditivo | |
396 | 396 | */ |
397 | 397 | public void setValorAditivo(BigDecimal valorAditivo) { |
398 | - | |
398 | + | |
399 | 399 | this.valorAditivo = valorAditivo; |
400 | 400 | } |
401 | 401 | |
402 | - | |
402 | + | |
403 | 403 | /** |
404 | 404 | * Retorna o valor do atributo <code>percentualAditivo</code> |
405 | 405 | * |
406 | 406 | * @return <code>BigDecimal</code> |
407 | 407 | */ |
408 | 408 | public BigDecimal getPercentualAditivo() { |
409 | - | |
409 | + | |
410 | 410 | return percentualAditivo; |
411 | 411 | } |
412 | 412 | |
413 | - | |
413 | + | |
414 | 414 | /** |
415 | 415 | * Define o valor do atributo <code>percentualAditivo</code>. |
416 | 416 | * |
417 | - * @param percentualAditivo | |
417 | + * @param percentualAditivo | |
418 | 418 | */ |
419 | 419 | public void setPercentualAditivo(BigDecimal percentualAditivo) { |
420 | - | |
420 | + | |
421 | 421 | this.percentualAditivo = percentualAditivo; |
422 | 422 | } |
423 | 423 | |
424 | - | |
425 | - | |
424 | + | |
425 | + | |
426 | 426 | /** |
427 | 427 | * Retorna o valor do atributo <code>descricaoAditivo</code> |
428 | 428 | * |
429 | 429 | * @return <code>String</code> |
430 | 430 | */ |
431 | 431 | public String getDescricaoAditivo() { |
432 | - | |
432 | + | |
433 | 433 | return descricaoAditivo; |
434 | 434 | } |
435 | 435 | |
436 | 436 | |
437 | - | |
437 | + | |
438 | 438 | /** |
439 | 439 | * Define o valor do atributo <code>descricaoAditivo</code>. |
440 | 440 | * |
441 | - * @param descricaoAditivo | |
441 | + * @param descricaoAditivo | |
442 | 442 | */ |
443 | 443 | public void setDescricaoAditivo(String descricaoAditivo) { |
444 | - | |
444 | + | |
445 | 445 | this.descricaoAditivo = descricaoAditivo; |
446 | 446 | } |
447 | 447 | |
... | ... | @@ -452,133 +452,133 @@ public class EventoAditivo extends ContratoEvento { |
452 | 452 | * @return <code>String</code> |
453 | 453 | */ |
454 | 454 | public String getJustificativa() { |
455 | - | |
455 | + | |
456 | 456 | return justificativa; |
457 | 457 | } |
458 | 458 | |
459 | - | |
459 | + | |
460 | 460 | /** |
461 | 461 | * Define o valor do atributo <code>justificativa</code>. |
462 | 462 | * |
463 | - * @param justificativa | |
463 | + * @param justificativa | |
464 | 464 | */ |
465 | 465 | public void setJustificativa(String justificativa) { |
466 | - | |
466 | + | |
467 | 467 | this.justificativa = justificativa; |
468 | 468 | } |
469 | 469 | |
470 | - | |
470 | + | |
471 | 471 | /** |
472 | 472 | * Retorna o valor do atributo <code>manifestacaoContratada</code> |
473 | 473 | * |
474 | 474 | * @return <code>String</code> |
475 | 475 | */ |
476 | 476 | public String getManifestacaoContratada() { |
477 | - | |
477 | + | |
478 | 478 | return manifestacaoContratada; |
479 | 479 | } |
480 | 480 | |
481 | - | |
481 | + | |
482 | 482 | /** |
483 | 483 | * Define o valor do atributo <code>manifestacaoContratada</code>. |
484 | 484 | * |
485 | - * @param manifestacaoContratada | |
485 | + * @param manifestacaoContratada | |
486 | 486 | */ |
487 | 487 | public void setManifestacaoContratada(String manifestacaoContratada) { |
488 | - | |
488 | + | |
489 | 489 | this.manifestacaoContratada = manifestacaoContratada; |
490 | 490 | } |
491 | 491 | |
492 | - | |
492 | + | |
493 | 493 | /** |
494 | 494 | * Retorna o valor do atributo <code>documentos</code> |
495 | 495 | * |
496 | 496 | * @return <code>Collection<EventoAditivoDocumento></code> |
497 | 497 | */ |
498 | 498 | public Collection<EventoAditivoDocumento> getDocumentos() { |
499 | - | |
499 | + | |
500 | 500 | return documentos; |
501 | 501 | } |
502 | 502 | |
503 | - | |
503 | + | |
504 | 504 | /** |
505 | 505 | * Define o valor do atributo <code>documentos</code>. |
506 | 506 | * |
507 | - * @param documentos | |
507 | + * @param documentos | |
508 | 508 | */ |
509 | 509 | public void setDocumentos(Collection<EventoAditivoDocumento> documentos) { |
510 | - | |
510 | + | |
511 | 511 | this.documentos = documentos; |
512 | 512 | } |
513 | 513 | |
514 | - | |
514 | + | |
515 | 515 | /** |
516 | 516 | * Retorna o valor do atributo <code>observacoes</code> |
517 | 517 | * |
518 | 518 | * @return <code>Collection<EventoAditivoObservacao></code> |
519 | 519 | */ |
520 | 520 | public Collection<EventoAditivoObservacao> getObservacoes() { |
521 | - | |
521 | + | |
522 | 522 | return observacoes; |
523 | 523 | } |
524 | 524 | |
525 | - | |
525 | + | |
526 | 526 | /** |
527 | 527 | * Define o valor do atributo <code>observacoes</code>. |
528 | 528 | * |
529 | - * @param observacoes | |
529 | + * @param observacoes | |
530 | 530 | */ |
531 | 531 | public void setObservacoes(Collection<EventoAditivoObservacao> observacoes) { |
532 | - | |
532 | + | |
533 | 533 | this.observacoes = observacoes; |
534 | 534 | } |
535 | 535 | |
536 | 536 | |
537 | - | |
537 | + | |
538 | 538 | /** |
539 | 539 | * Retorna o valor do atributo <code>contratoAditivo</code> |
540 | 540 | * |
541 | 541 | * @return <code>Contrato</code> |
542 | 542 | */ |
543 | 543 | public Contrato getContratoAditivo() { |
544 | - | |
544 | + | |
545 | 545 | return contratoAditivo; |
546 | 546 | } |
547 | 547 | |
548 | 548 | |
549 | - | |
549 | + | |
550 | 550 | /** |
551 | 551 | * Define o valor do atributo <code>contratoAditivo</code>. |
552 | 552 | * |
553 | - * @param contratoAditivo | |
553 | + * @param contratoAditivo | |
554 | 554 | */ |
555 | 555 | public void setContratoAditivo(Contrato contratoAditivo) { |
556 | - | |
556 | + | |
557 | 557 | this.contratoAditivo = contratoAditivo; |
558 | 558 | } |
559 | 559 | |
560 | 560 | |
561 | - | |
561 | + | |
562 | 562 | /** |
563 | 563 | * Retorna o valor do atributo <code>contratoAditivoInativo</code> |
564 | 564 | * |
565 | 565 | * @return <code>Contrato</code> |
566 | 566 | */ |
567 | 567 | public Contrato getContratoAditivoInativo() { |
568 | - | |
568 | + | |
569 | 569 | return contratoAditivoInativo; |
570 | 570 | } |
571 | 571 | |
572 | 572 | |
573 | - | |
573 | + | |
574 | 574 | /** |
575 | 575 | * Define o valor do atributo <code>contratoAditivoInativo</code>. |
576 | 576 | * |
577 | - * @param contratoAditivoInativo | |
577 | + * @param contratoAditivoInativo | |
578 | 578 | */ |
579 | 579 | public void setContratoAditivoInativo(Contrato contratoAditivoInativo) { |
580 | - | |
580 | + | |
581 | 581 | this.contratoAditivoInativo = contratoAditivoInativo; |
582 | 582 | } |
583 | - | |
583 | + | |
584 | 584 | } | ... | ... |
cit-contratos-api/src/main/java/br/com/centralit/api/model/EventoApostilamento.java
... | ... | @@ -61,7 +61,7 @@ public class EventoApostilamento extends ContratoEvento { |
61 | 61 | @Temporal(TemporalType.TIMESTAMP) |
62 | 62 | @JsonSerialize(using = JsonCalendarSimpleDateSerializer.class) |
63 | 63 | @JsonDeserialize(using = JsonCalendarSimpleDateDeserializer.class) |
64 | - @JsonView({ ViewsContrato.EventoApostilamentoEditView.class }) | |
64 | + @JsonView({ ViewsContrato.EventoApostilamentoEditView.class, ViewsContrato.ContratoEditView.class }) | |
65 | 65 | private Calendar dataEmissao; |
66 | 66 | |
67 | 67 | /** Atributo justificativa. */ | ... | ... |
cit-contratos-api/src/main/java/br/com/centralit/api/model/OrdemFornecimento.java
... | ... | @@ -78,7 +78,7 @@ public class OrdemFornecimento extends PersistentObjectAuditOrganizacao { |
78 | 78 | @Column(name = "numOrdemFornecimento", length = 20, nullable = false) |
79 | 79 | @JsonView({ ViewsContrato.OrdemFornecimentoListView.class, |
80 | 80 | ViewsContrato.RegistroOcorrenciaEditView.class, |
81 | - ViewsContrato.EventoLiberacaoPagamentoView.class }) | |
81 | + ViewsContrato.EventoLiberacaoPagamentoView.class, ViewsContrato.ContratoEditView.class }) | |
82 | 82 | private String numOrdemFornecimento; |
83 | 83 | |
84 | 84 | /** Atributo dataEmissao. */ |
... | ... | @@ -87,7 +87,7 @@ public class OrdemFornecimento extends PersistentObjectAuditOrganizacao { |
87 | 87 | @JsonSerialize(using = JsonCalendarSimpleDateSerializer.class) |
88 | 88 | @JsonDeserialize(using = JsonCalendarSimpleDateDeserializer.class) |
89 | 89 | @JsonView({ ViewsContrato.OrdemFornecimentoListView.class, |
90 | - ViewsContrato.EventoLiberacaoPagamentoView.class }) | |
90 | + ViewsContrato.EventoLiberacaoPagamentoView.class, ViewsContrato.ContratoEditView.class }) | |
91 | 91 | private Calendar dataEmissao; |
92 | 92 | |
93 | 93 | /** Atributo dominioSituacao. */ |
... | ... | @@ -112,12 +112,12 @@ public class OrdemFornecimento extends PersistentObjectAuditOrganizacao { |
112 | 112 | |
113 | 113 | /** Atributo documentos. */ |
114 | 114 | @OneToMany(fetch = FetchType.LAZY, mappedBy = "ordemFornecimento", cascade = CascadeType.ALL, orphanRemoval = true) |
115 | - @JsonView({ ViewsContrato.OrdemFornecimentoEditView.class }) | |
115 | + @JsonView({ ViewsContrato.OrdemFornecimentoEditView.class, ViewsContrato.ContratoEditView.class }) | |
116 | 116 | private Collection<OrdemFornecimentoDocumento> documentos; |
117 | 117 | |
118 | 118 | /** Atributo observacoes. */ |
119 | 119 | @OneToMany(fetch = FetchType.LAZY, mappedBy = "ordemFornecimento", cascade = CascadeType.ALL, orphanRemoval = true) |
120 | - @JsonView({ ViewsContrato.OrdemFornecimentoEditView.class }) | |
120 | + @JsonView({ ViewsContrato.OrdemFornecimentoEditView.class, ViewsContrato.ContratoEditView.class }) | |
121 | 121 | private Collection<OrdemFornecimentoObservacao> observacoes; |
122 | 122 | |
123 | 123 | /** | ... | ... |
cit-contratos-api/src/main/java/br/com/centralit/api/service/impl/ContratoServiceImpl.java
... | ... | @@ -26,6 +26,8 @@ import br.com.centralit.api.model.ContratoItem; |
26 | 26 | import br.com.centralit.api.model.ContratoObservacao; |
27 | 27 | import br.com.centralit.api.model.ContratoValorPagamento; |
28 | 28 | import br.com.centralit.api.model.DominioContrato; |
29 | +import br.com.centralit.api.model.EventoAditivo; | |
30 | +import br.com.centralit.api.model.OrdemFornecimento; | |
29 | 31 | import br.com.centralit.api.service.AnexoService; |
30 | 32 | import br.com.centralit.api.service.ColaboradorService; |
31 | 33 | import br.com.centralit.api.service.ConfiguracaoParametroSistemaService; |
... | ... | @@ -33,8 +35,10 @@ import br.com.centralit.api.service.ContratoEmpenhoService; |
33 | 35 | import br.com.centralit.api.service.ContratoService; |
34 | 36 | import br.com.centralit.api.service.DominioService; |
35 | 37 | import br.com.centralit.api.service.EstudoTecnicoService; |
38 | +import br.com.centralit.api.service.EventoAditivoService; | |
36 | 39 | import br.com.centralit.api.service.FornecedorService; |
37 | 40 | import br.com.centralit.api.service.InternacionalizacaoService; |
41 | +import br.com.centralit.api.service.OrdemFornecimentoService; | |
38 | 42 | import br.com.centralit.api.service.ParceiroService; |
39 | 43 | import br.com.centralit.api.service.UsuarioService; |
40 | 44 | import br.com.centralit.framework.exception.CodigoErro; |
... | ... | @@ -108,6 +112,12 @@ public class ContratoServiceImpl extends GenericServiceImpl<Contrato, Long> impl |
108 | 112 | @Autowired |
109 | 113 | private ContratoEmpenhoService contratoEmpenhoService; |
110 | 114 | |
115 | + @Autowired | |
116 | + private EventoAditivoService aditivoService; | |
117 | + | |
118 | + @Autowired | |
119 | + private OrdemFornecimentoService ordemFornecimentoService; | |
120 | + | |
111 | 121 | /** |
112 | 122 | * Responsável pela criação de novas instâncias desta classe. |
113 | 123 | * @param contratoDao |
... | ... | @@ -286,6 +296,28 @@ public class ContratoServiceImpl extends GenericServiceImpl<Contrato, Long> impl |
286 | 296 | justificativa.setContrato(contrato); |
287 | 297 | } |
288 | 298 | } |
299 | + | |
300 | + if (!UtilColecao.isVazio(contrato.getAditivos())){ | |
301 | + for (EventoAditivo aditivo : contrato.getAditivos()) { | |
302 | + EventoAditivo eventoAd = this.aditivoService.find(aditivo.getId()); | |
303 | + aditivo.setDataEmissao(eventoAd.getDataEmissao()); | |
304 | + aditivo.setTipoAlteracao(eventoAd.getTipoAlteracao()); | |
305 | + aditivo.setJustificativa(eventoAd.getJustificativa()); | |
306 | + if(!UtilColecao.isVazio(eventoAd.getObservacoes())){ | |
307 | + aditivo.setObservacoes(eventoAd.getObservacoes()); | |
308 | + } | |
309 | + if(!UtilColecao.isVazio(eventoAd.getDocumentos())){ | |
310 | + aditivo.setDocumentos(eventoAd.getDocumentos()); | |
311 | + } | |
312 | + } | |
313 | + } | |
314 | + | |
315 | + if (!UtilColecao.isVazio(contrato.getOrdensFornecimento())){ | |
316 | + for (OrdemFornecimento ordem : contrato.getOrdensFornecimento()) { | |
317 | + ordem.setContrato(contrato); | |
318 | + } | |
319 | + } | |
320 | + | |
289 | 321 | } |
290 | 322 | |
291 | 323 | /** | ... | ... |