Commit e2030ba936a3bcb03fb176d430957d51942f880d
Exists in
master
Merge remote-tracking branch 'remotes/origin/adm-1.15.0'
Showing
32 changed files
with
2285 additions
and
702 deletions
Show diff stats
cit-adm-materiais-api/src/main/java/br/com/centralit/api/dao/UnidadeMedidaDao.java
cit-adm-materiais-api/src/main/java/br/com/centralit/api/dao/impl/UnidadeMedidaDaoHibernate.java
... | ... | @@ -1,14 +0,0 @@ |
1 | -package br.com.centralit.api.dao.impl; | |
2 | - | |
3 | -import br.com.centralit.api.model.UnidadeMedida; | |
4 | -import br.com.centralit.api.dao.UnidadeMedidaDao; | |
5 | - | |
6 | -import org.springframework.stereotype.Repository; | |
7 | -import br.com.centralit.framework.dao.arquitetura.CitGenericDAOImpl; | |
8 | - | |
9 | -@Repository("unidadeMedidaDao") | |
10 | -public class UnidadeMedidaDaoHibernate extends CitGenericDAOImpl implements UnidadeMedidaDao { | |
11 | - public UnidadeMedidaDaoHibernate() { | |
12 | - super(UnidadeMedida.class); | |
13 | - } | |
14 | -} |
cit-adm-materiais-api/src/main/java/br/com/centralit/api/framework/json/ViewsAdmMateriais.java
1 | 1 | package br.com.centralit.api.framework.json; |
2 | 2 | |
3 | 3 | import br.com.centralit.framework.json.Views; |
4 | +import br.com.centralit.framework.json.Views.GenericView; | |
4 | 5 | |
5 | 6 | /** |
6 | 7 | * <p> |
... | ... | @@ -90,5 +91,11 @@ public class ViewsAdmMateriais extends Views { |
90 | 91 | public static class TransferenciaContaContabilListView extends Views.GenericView{}; |
91 | 92 | |
92 | 93 | public static class TransferenciaContaContabilEditView extends TransferenciaContaContabilListView{}; |
94 | + | |
95 | + public static class EnderecoEstoqueView extends GenericView{}; | |
96 | + | |
97 | + public static class AutoCompleteEnderecoEstoqueView extends GenericView{}; | |
98 | + | |
99 | + public static class TransferenciaEnderecoEstoqueView extends GenericView{}; | |
93 | 100 | |
94 | 101 | } | ... | ... |
cit-adm-materiais-api/src/main/java/br/com/centralit/api/model/DominioMaterial.java
... | ... | @@ -108,7 +108,13 @@ public class DominioMaterial { |
108 | 108 | public static final String REFERENCIA_ATENDIMENTO_ALMOXARIFADO_ITEM_NOME = "ATENDIMENTO_ALMOXARIFADO_ITEM"; |
109 | 109 | |
110 | 110 | /** Atributo REFERENCIA_BAIXA_ALMOXARIFADO_ITEM. */ |
111 | - public static final Long REFERENCIA_ATENDIMENTO_ALMOXARIFADO_ITEM = 14l; | |
111 | + public static final Long REFERENCIA_ATENDIMENTO_ALMOXARIFADO_ITEM = 14l; | |
112 | + | |
113 | + /** Atributo REFERENCIA_ENTRADA_ALMOXARIFADO_NOME. */ | |
114 | + public static final String REFERENCIA_ENTRADA_ALMOXARIFADO_NOME = "ENTRADA_ALMOXARIFADO"; | |
115 | + | |
116 | + /** Atributo REFERENCIA_ENTRADA_ALMOXARIFADO. */ | |
117 | + public static final Long REFERENCIA_ENTRADA_ALMOXARIFADO = 15l; | |
112 | 118 | |
113 | 119 | /** Atributo PERIODO_RELATORIO. */ |
114 | 120 | public static final String PERIODO_RELATORIO = "periodoRelatorio"; | ... | ... |
cit-adm-materiais-api/src/main/java/br/com/centralit/api/model/Material.java
... | ... | @@ -61,7 +61,7 @@ import com.fasterxml.jackson.annotation.JsonView; |
61 | 61 | @Audited |
62 | 62 | @Entity |
63 | 63 | @Inheritance(strategy = InheritanceType.JOINED) |
64 | -@JsonIgnoreProperties({"unidadeMedida"}) | |
64 | +@JsonIgnoreProperties({"unidadeMedida", "unidadeArmazenamento", "tiposUnidadeMedidaEntrada"}) | |
65 | 65 | public class Material extends PersistentObjectAuditOrganizacao { |
66 | 66 | |
67 | 67 | /** Atributo id. */ |
... | ... | @@ -86,7 +86,7 @@ public class Material extends PersistentObjectAuditOrganizacao { |
86 | 86 | ViewsAdmMateriais.DevolucaoEditView.class, ViewsAdmMateriais.ConfiguracaoRessuprimentoListView.class, ViewsAdmMateriais.ConfiguracaoRessuprimentoEditView.class, |
87 | 87 | ViewsAdmMateriais.RequisicaoConsumoEditView.class, ViewsAdmMateriais.TransferenciaContaContabilEditView.class, ViewsAdmMateriais.CatalogoMaterialItemEditView.class, Views.InventarioMobileCompleto.class, Views.InventarioMobile.class, |
88 | 88 | Views.DefinicaoDetentorEditView.class, Views.InventarioMobileJEDI.class, Views.BemPatrimonialListView.class, Views.SelecaoBemPatrimonialEditView.class, Views.EntradaItemEditView.class, ViewsAdmMateriais.MaterialConsultaInfo.class, |
89 | - ViewsAdmMateriais.RequisicaoConsumo.class}) | |
89 | + ViewsAdmMateriais.RequisicaoConsumo.class, ViewsAdmMateriais.TransferenciaEnderecoEstoqueView.class, ViewsAdmMateriais.EntradaAlmoxarifadoEditView.class }) | |
90 | 90 | private String descricao; |
91 | 91 | |
92 | 92 | /** Atributo dominioTipoMaterial. */ |
... | ... | @@ -118,6 +118,7 @@ public class Material extends PersistentObjectAuditOrganizacao { |
118 | 118 | |
119 | 119 | /** Atributo codigo. */ |
120 | 120 | @Column(length = 30) |
121 | + @JsonView({ Views.MaterialEditView.class, ViewsAdmMateriais.MaterialConsultaInfo.class }) | |
121 | 122 | private String codigo; |
122 | 123 | |
123 | 124 | |
... | ... | @@ -133,6 +134,16 @@ public class Material extends PersistentObjectAuditOrganizacao { |
133 | 134 | Views.DefinicaoDetentorEditView.class, Views.InventarioMobileJEDI.class, Views.BemPatrimonialListView.class, Views.EntradaItemEditView.class, ViewsAdmMateriais.MaterialConsultaInfo.class}) |
134 | 135 | @Transient |
135 | 136 | private String codigoEDescricao; |
137 | + | |
138 | + @JsonView({ Views.BemPatrimonialAutoCompleteSimplesView.class, Views.MaterialAutoCompleteView.class, Views.MaterialEditView.class, Views.AdicaoBemPatrimonialView.class, Views.TransferenciaEditView.class, Views.EntradaEditView.class, | |
139 | + Views.SaidaTemporariaEditView.class, Views.BaixaEditView.class, Views.DepreciacaoView.class, Views.SaidaTemporariaItemListView.class, Views.DadosBemPatrimonialEditView.class, Views.BemPatrimonialInventarioAutoCompleteView.class, | |
140 | + ViewsAdmMateriais.MaterialConsumoAutoCompleteView.class, ViewsAdmMateriais.MaterialConsumoAutoCompleteRequisicao.class, ViewsAdmMateriais.AtendimentoRequisicaoConsumoItemView.class, | |
141 | + ViewsAdmMateriais.MaterialConsumoBaixaAutoCompleteView.class, ViewsAdmMateriais.CatalogoMaterialEditView.class, ViewsAdmMateriais.BaixaAlmoxarifadoEditView.class, | |
142 | + ViewsAdmMateriais.DevolucaoEditView.class, ViewsAdmMateriais.ConfiguracaoRessuprimentoListView.class, ViewsAdmMateriais.ConfiguracaoRessuprimentoEditView.class, | |
143 | + ViewsAdmMateriais.RequisicaoConsumoEditView.class, ViewsAdmMateriais.TransferenciaContaContabilEditView.class, ViewsAdmMateriais.CatalogoMaterialItemEditView.class, Views.InventarioMobileCompleto.class, Views.InventarioMobile.class, | |
144 | + Views.DefinicaoDetentorEditView.class, Views.InventarioMobileJEDI.class, Views.BemPatrimonialListView.class, Views.EntradaItemEditView.class, ViewsAdmMateriais.MaterialConsultaInfo.class}) | |
145 | + @Transient | |
146 | + private String codigoDescricaoCodigoCC; | |
136 | 147 | |
137 | 148 | /** |
138 | 149 | * Retorna o valor do atributo <code>id</code> |
... | ... | @@ -343,4 +354,27 @@ public class Material extends PersistentObjectAuditOrganizacao { |
343 | 354 | public void setCodigoEDescricao(String codigoEDescricao) { |
344 | 355 | this.codigoEDescricao = codigoEDescricao; |
345 | 356 | } |
357 | + | |
358 | + public String getCodigoDescricaoCodigoCC() { | |
359 | + | |
360 | + if (this.codigoDescricaoCodigoCC == null) { | |
361 | + if (this.classificacaoMaterial == null) { | |
362 | + codigoDescricaoCodigoCC = this.descricao; | |
363 | + } else { | |
364 | + codigoDescricaoCodigoCC = this.classificacaoMaterial.getCodigo().concat(" - ").concat(this.descricao); | |
365 | + } | |
366 | + | |
367 | + if(this.contaContabil != null){ | |
368 | + codigoDescricaoCodigoCC += " - " + contaContabil.getCodigo(); | |
369 | + } | |
370 | + } | |
371 | + | |
372 | + return codigoDescricaoCodigoCC; | |
373 | + } | |
374 | + | |
375 | + public void setCodigoDescricaoCodigoCC(String codigoDescricaoCodigoCC) { | |
376 | + this.codigoDescricaoCodigoCC = codigoDescricaoCodigoCC; | |
377 | + } | |
378 | + | |
379 | + | |
346 | 380 | } | ... | ... |
cit-adm-materiais-api/src/main/java/br/com/centralit/api/model/MaterialCaracteristica.java
... | ... | @@ -11,6 +11,7 @@ import javax.persistence.ManyToOne; |
11 | 11 | import org.hibernate.envers.AuditTable; |
12 | 12 | import org.hibernate.envers.Audited; |
13 | 13 | |
14 | +import br.com.centralit.api.framework.json.ViewsAdmMateriais; | |
14 | 15 | import br.com.centralit.framework.json.Views; |
15 | 16 | import br.com.centralit.framework.model.arquitetura.PersistentObjectAudit; |
16 | 17 | |
... | ... | @@ -89,6 +90,7 @@ public class MaterialCaracteristica extends PersistentObjectAudit { |
89 | 90 | |
90 | 91 | /** Atributo material. */ |
91 | 92 | @ManyToOne(fetch = FetchType.LAZY) |
93 | + @JsonView({ ViewsAdmMateriais.EntradaAlmoxarifadoEditView.class }) | |
92 | 94 | private Material material; |
93 | 95 | |
94 | 96 | /** Atributo materialRemocao. */ | ... | ... |
cit-adm-materiais-api/src/main/java/br/com/centralit/api/model/MaterialConsumo.java
... | ... | @@ -7,6 +7,7 @@ import javax.persistence.Entity; |
7 | 7 | import javax.persistence.FetchType; |
8 | 8 | import javax.persistence.ManyToOne; |
9 | 9 | import javax.persistence.OneToMany; |
10 | +import javax.persistence.Table; | |
10 | 11 | |
11 | 12 | import org.hibernate.envers.Audited; |
12 | 13 | |
... | ... | @@ -50,6 +51,7 @@ import com.fasterxml.jackson.annotation.JsonView; |
50 | 51 | */ |
51 | 52 | @Audited |
52 | 53 | @Entity |
54 | +@Table(name="alm_materialconsumo") | |
53 | 55 | @JsonIgnoreProperties({ "dominioUnidadeMedida", "materiaisConsumo" }) |
54 | 56 | public class MaterialConsumo extends Material { |
55 | 57 | ... | ... |
cit-adm-materiais-api/src/main/java/br/com/centralit/api/model/MaterialConsumoTipoUnidadeMedidaEntrada.java
1 | 1 | package br.com.centralit.api.model; |
2 | 2 | |
3 | +import javax.persistence.Column; | |
3 | 4 | import javax.persistence.Entity; |
4 | 5 | import javax.persistence.FetchType; |
5 | 6 | import javax.persistence.GeneratedValue; |
... | ... | @@ -8,7 +9,6 @@ import javax.persistence.Id; |
8 | 9 | import javax.persistence.ManyToOne; |
9 | 10 | import javax.persistence.Table; |
10 | 11 | |
11 | -import org.hibernate.envers.AuditTable; | |
12 | 12 | import org.hibernate.envers.Audited; |
13 | 13 | |
14 | 14 | import br.com.centralit.api.framework.json.ViewsAdmMateriais; |
... | ... | @@ -19,9 +19,8 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
19 | 19 | import com.fasterxml.jackson.annotation.JsonView; |
20 | 20 | |
21 | 21 | @Audited |
22 | -@AuditTable(value = "MatConsTpUnEntrada_aud") | |
23 | 22 | @Entity |
24 | -@Table(name="MatConsumoTipoUnidadeEntrada") | |
23 | +@Table(name="alm_mc_unidmedidaentrada") | |
25 | 24 | @JsonIgnoreProperties({ "$edit", "$checked" }) |
26 | 25 | public class MaterialConsumoTipoUnidadeMedidaEntrada extends PersistentObject { |
27 | 26 | |
... | ... | @@ -45,6 +44,11 @@ public class MaterialConsumoTipoUnidadeMedidaEntrada extends PersistentObject { |
45 | 44 | @JsonView({ Views.MaterialEditView.class, ViewsAdmMateriais.MaterialConsumoAutoCompleteView.class, ViewsAdmMateriais.EntradaAlmoxarifadoEditView.class, Views.MaterialConsultaInfo.class }) |
46 | 45 | private UnidadeMedida unidadeMedida; |
47 | 46 | |
47 | + | |
48 | + @Column | |
49 | + @JsonView({ Views.GenericView.class }) | |
50 | + private Boolean isPadrao; | |
51 | + | |
48 | 52 | /** |
49 | 53 | * Retorna o valor do atributo <code>materialConsumo</code> |
50 | 54 | * |
... | ... | @@ -125,4 +129,11 @@ public class MaterialConsumoTipoUnidadeMedidaEntrada extends PersistentObject { |
125 | 129 | this.materialConsumoRemocao = materialConsumoRemocao; |
126 | 130 | } |
127 | 131 | |
132 | + public Boolean getIsPadrao() { | |
133 | + return isPadrao; | |
134 | + } | |
135 | + | |
136 | + public void setIsPadrao(Boolean isPadrao) { | |
137 | + this.isPadrao = isPadrao; | |
138 | + } | |
128 | 139 | } | ... | ... |
cit-adm-materiais-api/src/main/java/br/com/centralit/api/model/MaterialPermanenteConsumo.java
... | ... | @@ -6,8 +6,8 @@ import javax.persistence.GeneratedValue; |
6 | 6 | import javax.persistence.GenerationType; |
7 | 7 | import javax.persistence.Id; |
8 | 8 | import javax.persistence.ManyToOne; |
9 | +import javax.persistence.Table; | |
9 | 10 | |
10 | -import org.hibernate.envers.AuditTable; | |
11 | 11 | import org.hibernate.envers.Audited; |
12 | 12 | |
13 | 13 | import br.com.centralit.framework.json.Views; |
... | ... | @@ -49,8 +49,8 @@ import com.fasterxml.jackson.annotation.JsonView; |
49 | 49 | * |
50 | 50 | */ |
51 | 51 | @Audited |
52 | -@AuditTable(value = "MatPermanCons_aud") | |
53 | 52 | @Entity |
53 | +@Table(name = "mat_matpermanenteconsumo") | |
54 | 54 | @JsonIgnoreProperties({ "$checked" }) |
55 | 55 | public class MaterialPermanenteConsumo extends PersistentObjectAudit { |
56 | 56 | ... | ... |
cit-adm-materiais-api/src/main/java/br/com/centralit/api/model/UnidadeMedida.java
... | ... | @@ -1,238 +0,0 @@ |
1 | -package br.com.centralit.api.model; | |
2 | - | |
3 | -import java.math.BigDecimal; | |
4 | - | |
5 | -import javax.persistence.Column; | |
6 | -import javax.persistence.Entity; | |
7 | -import javax.persistence.FetchType; | |
8 | -import javax.persistence.GeneratedValue; | |
9 | -import javax.persistence.GenerationType; | |
10 | -import javax.persistence.Id; | |
11 | -import javax.persistence.ManyToOne; | |
12 | - | |
13 | -import org.hibernate.envers.Audited; | |
14 | - | |
15 | -import br.com.centralit.api.framework.json.ViewsAdmMateriais; | |
16 | -import br.com.centralit.framework.json.Views; | |
17 | -import br.com.centralit.framework.model.Dominio; | |
18 | -import br.com.centralit.framework.model.arquitetura.PersistentObject; | |
19 | - | |
20 | -import com.fasterxml.jackson.annotation.JsonView; | |
21 | - | |
22 | -/** | |
23 | - * <p> | |
24 | - * <img src="http://centralit.com.br/images/logo_central.png"> | |
25 | - * </p> | |
26 | - * | |
27 | - * <p> | |
28 | - * <b>Company: </b> Central IT - Governança Corporativa - | |
29 | - * </p> | |
30 | - * | |
31 | - * <p> | |
32 | - * <b>Title: </b> | |
33 | - * </p> | |
34 | - * | |
35 | - * <p> | |
36 | - * <b>Description: </b> | |
37 | - * </p> | |
38 | - * | |
39 | - * <p> | |
40 | - * <b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a> | |
41 | - * </p> | |
42 | - * | |
43 | - * <p> | |
44 | - * <b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a> | |
45 | - * </p> | |
46 | - * | |
47 | - * @since 29/05/2015 - 15:41:54 | |
48 | - * | |
49 | - * @version 1.0.0 | |
50 | - * | |
51 | - * @author rogerio.costa | |
52 | - * | |
53 | - */ | |
54 | -@Audited | |
55 | -@Entity | |
56 | -public class UnidadeMedida extends PersistentObject { | |
57 | - | |
58 | - /** Atributo serialVersionUID. */ | |
59 | - private static final long serialVersionUID = -7573208249312737668L; | |
60 | - | |
61 | - /** Atributo id. */ | |
62 | - @Id | |
63 | - @GeneratedValue(strategy = GenerationType.AUTO) | |
64 | - @JsonView({ Views.GenericView.class }) | |
65 | - private Long id; | |
66 | - | |
67 | - @Column(length = 30) | |
68 | - @JsonView({ ViewsAdmMateriais.UnidadeMedidaListView.class, ViewsAdmMateriais.MaterialConsumoAutoCompleteView.class, | |
69 | - ViewsAdmMateriais.EntradaAlmoxarifadoEditView.class, Views.MaterialEditView.class, Views.MaterialConsultaInfo.class, ViewsAdmMateriais.RequisicaoConsumo.class }) | |
70 | - private String codigo; | |
71 | - | |
72 | - @JsonView({ ViewsAdmMateriais.UnidadeMedidaListView.class, ViewsAdmMateriais.MaterialConsumoAutoCompleteView.class, | |
73 | - ViewsAdmMateriais.EntradaAlmoxarifadoEditView.class, Views.MaterialEditView.class, Views.MaterialConsultaInfo.class, ViewsAdmMateriais.RequisicaoConsumo.class }) | |
74 | - private String sigla; | |
75 | - | |
76 | - @JsonView({ ViewsAdmMateriais.RequisicaoConsumoEditView.class, ViewsAdmMateriais.MaterialConsumoAutoCompleteView.class, | |
77 | - ViewsAdmMateriais.EntradaAlmoxarifadoEditView.class, ViewsAdmMateriais.UnidadeMedidaListView.class, Views.MaterialEditView.class, | |
78 | - ViewsAdmMateriais.MaterialConsumoBaixaAutoCompleteView.class, ViewsAdmMateriais.BaixaAlmoxarifadoEditView.class, Views.EntradaItemEditView.class, | |
79 | - Views.MaterialAutoCompleteView.class, Views.MaterialConsultaInfo.class, ViewsAdmMateriais.RequisicaoConsumo.class }) | |
80 | - private String descricao; | |
81 | - | |
82 | - /** Atributo tipoNumerico. */ | |
83 | - @ManyToOne(fetch = FetchType.LAZY) | |
84 | - @JsonView({ ViewsAdmMateriais.UnidadeMedidaListView.class, ViewsAdmMateriais.MaterialConsumoAutoCompleteView.class, | |
85 | - ViewsAdmMateriais.EntradaAlmoxarifadoEditView.class, Views.MaterialEditView.class, ViewsAdmMateriais.RequisicaoConsumoEditView.class, Views.MaterialConsultaInfo.class }) | |
86 | - private Dominio tipoNumerico; | |
87 | - | |
88 | - @Column(name = "quantidadePadrao") | |
89 | - @JsonView({ ViewsAdmMateriais.UnidadeMedidaListView.class, ViewsAdmMateriais.MaterialConsumoAutoCompleteView.class, | |
90 | - ViewsAdmMateriais.EntradaAlmoxarifadoEditView.class, Views.MaterialEditView.class, ViewsAdmMateriais.RequisicaoConsumoEditView.class }) | |
91 | - private BigDecimal quantidadePadrao; | |
92 | - | |
93 | - @Column(name = "isUnidadePadrao") | |
94 | - @JsonView({ ViewsAdmMateriais.UnidadeMedidaListView.class }) | |
95 | - private Boolean isUnidadePadrao; | |
96 | - | |
97 | - /** | |
98 | - * Responsável pela criação de novas instâncias desta classe. | |
99 | - */ | |
100 | - public UnidadeMedida() { | |
101 | - | |
102 | - super(); | |
103 | - } | |
104 | - | |
105 | - /** | |
106 | - * Responsável pela criação de novas instâncias desta classe. | |
107 | - * | |
108 | - * @param tipoNumerico | |
109 | - * @param tipoUnidadeMedida | |
110 | - */ | |
111 | - public UnidadeMedida( String sigla, Dominio tipoNumerico, String descricao, String codigo ) { | |
112 | - | |
113 | - this.tipoNumerico = tipoNumerico; | |
114 | - | |
115 | - this.descricao = descricao; | |
116 | - | |
117 | - this.sigla = sigla; | |
118 | - | |
119 | - this.codigo = codigo; | |
120 | - } | |
121 | - | |
122 | - /** | |
123 | - * Retorna o valor do atributo <code>id</code> | |
124 | - * | |
125 | - * @return <code>Long</code> | |
126 | - */ | |
127 | - public Long getId() { | |
128 | - | |
129 | - return id; | |
130 | - } | |
131 | - | |
132 | - /** | |
133 | - * Define o valor do atributo <code>id</code>. | |
134 | - * | |
135 | - * @param id | |
136 | - */ | |
137 | - public void setId(Long id) { | |
138 | - | |
139 | - this.id = id; | |
140 | - } | |
141 | - | |
142 | - /** | |
143 | - * Retorna o valor do atributo <code>tipoNumerico</code> | |
144 | - * | |
145 | - * @return <code>Dominio</code> | |
146 | - */ | |
147 | - public Dominio getTipoNumerico() { | |
148 | - | |
149 | - return tipoNumerico; | |
150 | - } | |
151 | - | |
152 | - /** | |
153 | - * Define o valor do atributo <code>tipoNumerico</code>. | |
154 | - * | |
155 | - * @param tipoNumerico | |
156 | - */ | |
157 | - public void setTipoNumerico(Dominio tipoNumerico) { | |
158 | - | |
159 | - this.tipoNumerico = tipoNumerico; | |
160 | - } | |
161 | - | |
162 | - /** | |
163 | - * Retorna o valor do atributo <code>descricao</code> | |
164 | - * | |
165 | - * @return <code>String</code> | |
166 | - */ | |
167 | - public String getDescricao() { | |
168 | - | |
169 | - return descricao; | |
170 | - } | |
171 | - | |
172 | - /** | |
173 | - * Define o valor do atributo <code>descricao</code>. | |
174 | - * | |
175 | - * @param descricao | |
176 | - */ | |
177 | - public void setDescricao(String descricao) { | |
178 | - | |
179 | - this.descricao = descricao; | |
180 | - } | |
181 | - | |
182 | - /** | |
183 | - * Retorna o valor do atributo <code>sigla</code> | |
184 | - * | |
185 | - * @return <code>String</code> | |
186 | - */ | |
187 | - public String getSigla() { | |
188 | - | |
189 | - return sigla; | |
190 | - } | |
191 | - | |
192 | - /** | |
193 | - * Define o valor do atributo <code>sigla</code>. | |
194 | - * | |
195 | - * @param sigla | |
196 | - */ | |
197 | - public void setSigla(String sigla) { | |
198 | - | |
199 | - this.sigla = sigla; | |
200 | - } | |
201 | - | |
202 | - /** | |
203 | - * Retorna o valor do atributo <code>codigo</code> | |
204 | - * | |
205 | - * @return <code>String</code> | |
206 | - */ | |
207 | - public String getCodigo() { | |
208 | - | |
209 | - return codigo; | |
210 | - } | |
211 | - | |
212 | - /** | |
213 | - * Define o valor do atributo <code>codigo</code>. | |
214 | - * | |
215 | - * @param codigo | |
216 | - */ | |
217 | - public void setCodigo(String codigo) { | |
218 | - | |
219 | - this.codigo = codigo; | |
220 | - } | |
221 | - | |
222 | - public BigDecimal getQuantidadePadrao() { | |
223 | - return quantidadePadrao; | |
224 | - } | |
225 | - | |
226 | - public void setQuantidadePadrao(BigDecimal quantidadePadrao) { | |
227 | - this.quantidadePadrao = quantidadePadrao; | |
228 | - } | |
229 | - | |
230 | - public Boolean getIsUnidadePadrao() { | |
231 | - return isUnidadePadrao; | |
232 | - } | |
233 | - | |
234 | - public void setIsUnidadePadrao(Boolean isUnidadePadrao) { | |
235 | - this.isUnidadePadrao = isUnidadePadrao; | |
236 | - } | |
237 | - | |
238 | -} |
cit-adm-materiais-api/src/main/java/br/com/centralit/api/service/ContaContabilMovimentoService.java
... | ... | @@ -279,11 +279,10 @@ public interface ContaContabilMovimentoService extends GenericService<ContaConta |
279 | 279 | * @param conta |
280 | 280 | * @param valor |
281 | 281 | * @param idEntradaItem |
282 | - * @param entrada | |
283 | 282 | * @param dominioTipoEntrada |
284 | 283 | * @return |
285 | 284 | */ |
286 | - public ContaContabilMovimento salvaMovimentoEntradaAlmoxarifado(ContaContabil conta, BigDecimal valor, Long idEntradaItem, Entrada entrada, Dominio dominioTipoEntrada); | |
285 | + public ContaContabilMovimento salvaMovimentoEntradaAlmoxarifado(ContaContabil conta, BigDecimal valor, Long idEntradaItem, Dominio dominioTipoEntrada); | |
287 | 286 | |
288 | 287 | /** |
289 | 288 | * <p><b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a></p> |
... | ... | @@ -358,5 +357,18 @@ public interface ContaContabilMovimentoService extends GenericService<ContaConta |
358 | 357 | * @param idAtendimentoItem |
359 | 358 | */ |
360 | 359 | public void removerMovimentosDevolucao(Long idAtendimentoItem); |
360 | + | |
361 | + /** | |
362 | + * <p><b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a></p> | |
363 | + * | |
364 | + * <p><b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a></p> | |
365 | + * | |
366 | + * Método responsável por remover movimentos de entrada de materiais (almoxarifado) | |
367 | + * | |
368 | + * @author geovane.filho | |
369 | + * | |
370 | + * @param idEntradaAlmoxarifado | |
371 | + */ | |
372 | + public void removerMovimentosEntradaAlmoxarifado(Long idEntradaAlmoxarifado); | |
361 | 373 | |
362 | 374 | } | ... | ... |
cit-adm-materiais-api/src/main/java/br/com/centralit/api/service/UnidadeMedidaService.java
cit-adm-materiais-api/src/main/java/br/com/centralit/api/service/impl/ContaContabilMovimentoServiceImpl.java
... | ... | @@ -159,8 +159,8 @@ public class ContaContabilMovimentoServiceImpl extends GenericServiceImpl<ContaC |
159 | 159 | } |
160 | 160 | |
161 | 161 | @Override |
162 | - public ContaContabilMovimento salvaMovimentoEntradaAlmoxarifado(ContaContabil conta, BigDecimal valor, Long idEntradaItem, Entrada entrada, Dominio dominioTipoEntrada) { | |
163 | - ContaContabilMovimento movimentoEntrada = criaMovimentoEntradaAlmoxarifado(conta, valor, idEntradaItem, entrada, dominioTipoEntrada); | |
162 | + public ContaContabilMovimento salvaMovimentoEntradaAlmoxarifado(ContaContabil conta, BigDecimal valor, Long idEntradaItem, Dominio dominioTipoEntrada) { | |
163 | + ContaContabilMovimento movimentoEntrada = criaMovimentoEntradaAlmoxarifado(conta, valor, idEntradaItem, dominioTipoEntrada); | |
164 | 164 | return this.save(movimentoEntrada); |
165 | 165 | } |
166 | 166 | |
... | ... | @@ -193,7 +193,7 @@ public class ContaContabilMovimentoServiceImpl extends GenericServiceImpl<ContaC |
193 | 193 | * @param baixa |
194 | 194 | * @return |
195 | 195 | */ |
196 | - private ContaContabilMovimento criaMovimentoEntradaAlmoxarifado(ContaContabil conta, BigDecimal valor, Long idEntradaItem, Entrada entrada, Dominio dominioTipoEntrada) { | |
196 | + private ContaContabilMovimento criaMovimentoEntradaAlmoxarifado(ContaContabil conta, BigDecimal valor, Long idEntradaItem, Dominio dominioTipoEntrada) { | |
197 | 197 | Dominio classeReferencia = this.dominioService.findByChaveAndCodigo(DominioMaterial.CLASSE_REFERENCIA, DominioMaterial.REFERENCIA_ENTRADA_ALMOXARIFADO_ITEM); |
198 | 198 | ContaContabilMovimento movimentoEntrada; |
199 | 199 | if (valor.compareTo(BigDecimal.ZERO) >= 0) { |
... | ... | @@ -201,7 +201,6 @@ public class ContaContabilMovimentoServiceImpl extends GenericServiceImpl<ContaC |
201 | 201 | } else { |
202 | 202 | movimentoEntrada = criaContaContabilMovimento(conta, valor.negate(), dominioTipoEntrada); |
203 | 203 | } |
204 | - movimentoEntrada.setEntrada(entrada); | |
205 | 204 | movimentoEntrada.setDominioClasseReferencia(classeReferencia); |
206 | 205 | movimentoEntrada.setIdClasseReferencia(idEntradaItem); |
207 | 206 | return movimentoEntrada; |
... | ... | @@ -421,4 +420,14 @@ public class ContaContabilMovimentoServiceImpl extends GenericServiceImpl<ContaC |
421 | 420 | public void removeMovimentosPorEntradaItem(List<Long> bens){ |
422 | 421 | this.removeList(this.contaContabilMovimentoDao.buscaContasContabeisMovimentoEntradaItem(bens)); |
423 | 422 | } |
423 | + | |
424 | + @Override | |
425 | + public void removerMovimentosEntradaAlmoxarifado(Long idEntradaAlmoxarifado) { | |
426 | + Dominio dominioClasseReferencia = this.dominioService.findByChaveAndCodigo(DominioMaterial.CLASSE_REFERENCIA, DominioMaterial.REFERENCIA_ENTRADA_ALMOXARIFADO); | |
427 | + | |
428 | + if (UtilObjeto.isReferencia(dominioClasseReferencia)){ | |
429 | + List<ContaContabilMovimento> movimentosAtendimento = this.contaContabilMovimentoDao.listarMovimentosPorClasseRefIdRef(idEntradaAlmoxarifado, dominioClasseReferencia.getId()); | |
430 | + this.removeList(movimentosAtendimento); | |
431 | + } | |
432 | + } | |
424 | 433 | } | ... | ... |
cit-adm-materiais-api/src/main/java/br/com/centralit/api/service/impl/InicializarAdmMateriaisServiceImpl.java
... | ... | @@ -77,8 +77,11 @@ public class InicializarAdmMateriaisServiceImpl extends UtilStartup { |
77 | 77 | filesMenuFileMaterial.add(new MenuFile(CIT_ADM_MATERIAIS_WEB_ANGULAR_CUSTOM + "repository/MaterialPermanenteRepository.min.js", dominioJS, menuMaterial)); |
78 | 78 | filesMenuFileMaterial.add(new MenuFile(CIT_ADM_MATERIAIS_WEB_ANGULAR_CUSTOM + "repository/MaterialConsumoTipoUnidadeMedidaEntradaRepository.js", dominioJS, menuMaterial)); |
79 | 79 | filesMenuFileMaterial.add(new MenuFile(CIT_ADM_MATERIAIS_WEB_ANGULAR_CUSTOM + "repository/MaterialConsumoTipoUnidadeMedidaEntradaRepository.min.js", dominioJS, menuMaterial)); |
80 | - filesMenuFileMaterial.add(new MenuFile(CIT_ADM_MATERIAIS_WEB_ANGULAR_CUSTOM + "repository/UnidadeMedidaRepository.js", dominioJS, menuMaterial)); | |
81 | - filesMenuFileMaterial.add(new MenuFile(CIT_ADM_MATERIAIS_WEB_ANGULAR_CUSTOM + "repository/UnidadeMedidaRepository.min.js", dominioJS, menuMaterial)); | |
80 | + filesMenuFileMaterial.add(new MenuFile(CIT_ALMOXARIFADO_WEB_ANGULAR_CUSTOM + "repository/MaterialLocalEstoqueRepository.js", dominioJS, menuMaterial)); | |
81 | + filesMenuFileMaterial.add(new MenuFile(CIT_ALMOXARIFADO_WEB_ANGULAR_CUSTOM + "repository/MaterialLocalEstoqueRepository.min.js", dominioJS, menuMaterial)); | |
82 | + filesMenuFileMaterial.add(new MenuFile(CIT_ALMOXARIFADO_WEB_ANGULAR_CUSTOM + "repository/MaterialEnderecoEstoqueRepository.js", dominioJS, menuMaterial)); | |
83 | + filesMenuFileMaterial.add(new MenuFile(CIT_ALMOXARIFADO_WEB_ANGULAR_CUSTOM + "repository/MaterialEnderecoEstoqueRepository.min.js", dominioJS, menuMaterial)); | |
84 | + | |
82 | 85 | menuMaterial.setIncludes(filesMenuFileMaterial); |
83 | 86 | this.menuService.mergeIfNotExist(menuMaterial); |
84 | 87 | // Menu Classificação de materiais |
... | ... | @@ -87,12 +90,6 @@ public class InicializarAdmMateriaisServiceImpl extends UtilStartup { |
87 | 90 | Menu menuClassificacao = new Menu("Classificação de materiais", pgClassificacaoMaterial, menuMateriais, null, 2, null, null, null, null, moduloSelecionado); |
88 | 91 | menuClassificacao.setIncludes(this.gerarArquivosMenu(menuClassificacao, CIT_ADM_MATERIAIS_WEB_ANGULAR_CUSTOM, "ClassificacaoMaterial", true, false, true)); |
89 | 92 | this.menuService.mergeIfNotExist(menuClassificacao); |
90 | - // Menu Unidade de medida | |
91 | - Pagina pgUnidadeMedida = new Pagina("Unidade de medida", "/cit-adm-materiais-web/html/unidadeMedida/unidadeMedida.html"); | |
92 | - pgUnidadeMedida = this.paginaService.saveIfNotExist(pgUnidadeMedida); | |
93 | - Menu menuUnidadeMedida = new Menu("Unidade de medida", pgUnidadeMedida, menuMateriais, null, 3, null, null, null, null, moduloSelecionado); | |
94 | - menuUnidadeMedida.setIncludes(this.gerarArquivosMenu(menuUnidadeMedida, CIT_ADM_MATERIAIS_WEB_ANGULAR_CUSTOM, "UnidadeMedida", true, true, true)); | |
95 | - this.menuService.mergeIfNotExist(menuUnidadeMedida); | |
96 | 93 | |
97 | 94 | // Submenu Financeiro |
98 | 95 | Menu menuFinanceiro = new Menu("Financeiro", null, menuAdmMaterial, 2, 0, null, null, null, null, moduloSelecionado); | ... | ... |
cit-adm-materiais-api/src/main/java/br/com/centralit/api/service/impl/MaterialServiceImpl.java
... | ... | @@ -13,7 +13,6 @@ import org.springframework.stereotype.Service; |
13 | 13 | import org.springframework.validation.Validator; |
14 | 14 | |
15 | 15 | import br.com.centralit.api.dao.MaterialDao; |
16 | -import br.com.centralit.api.model.Bairro; | |
17 | 16 | import br.com.centralit.api.model.Material; |
18 | 17 | import br.com.centralit.api.model.MaterialCaracteristica; |
19 | 18 | import br.com.centralit.api.model.MaterialConsumo; |
... | ... | @@ -183,7 +182,9 @@ public class MaterialServiceImpl extends GenericServiceImpl<Material, Long> impl |
183 | 182 | if (!UtilColecao.isVazio(entity.getMaterialCaracteristicas())) { |
184 | 183 | // Percorre a lista de MaterialCaracteristica para setar o material |
185 | 184 | for (MaterialCaracteristica materialCaracteristica : entity.getMaterialCaracteristicas()) { |
186 | - | |
185 | + if(entity.getDominioTipoMaterial().getCodigo() == Dominio.TIPO_MATERIAL_CONSUMO){ | |
186 | + materialCaracteristica.setGenerico(Boolean.TRUE); | |
187 | + } | |
187 | 188 | materialCaracteristica.setMaterial(entity); |
188 | 189 | } |
189 | 190 | ... | ... |
cit-adm-materiais-api/src/main/java/br/com/centralit/api/service/validation/UnidadeMedidaValidator.java
... | ... | @@ -1,31 +0,0 @@ |
1 | -package br.com.centralit.api.service.validation; | |
2 | - | |
3 | -import br.com.centralit.api.model.UnidadeMedida; | |
4 | -import org.springframework.stereotype.Component; | |
5 | -import org.springframework.validation.Errors; | |
6 | -import org.springframework.validation.ValidationUtils; | |
7 | -import org.springframework.validation.Validator; | |
8 | - | |
9 | -import br.com.centralit.framework.exception.CodigoErro; | |
10 | - | |
11 | -@Component("unidadeMedidaValidator") | |
12 | -public class UnidadeMedidaValidator implements Validator { | |
13 | - | |
14 | - @Override | |
15 | - public boolean supports(Class<?> clazz) { | |
16 | - | |
17 | - return UnidadeMedida.class.isAssignableFrom(clazz); | |
18 | - } | |
19 | - | |
20 | - @Override | |
21 | - public void validate(Object target, Errors errors) { | |
22 | - | |
23 | - ValidationUtils.rejectIfEmpty(errors, "descricao", CodigoErro.VALIDACAO_CAMPOS_OBRIGATORIOS.getValue().toString(), "LABEL.DESCRICAO"); | |
24 | - | |
25 | - ValidationUtils.rejectIfEmpty(errors, "codigo", CodigoErro.VALIDACAO_CAMPOS_OBRIGATORIOS.getValue().toString(), "LABEL.DESCRICAO"); | |
26 | - | |
27 | - ValidationUtils.rejectIfEmpty(errors, "tipoNumerico", CodigoErro.VALIDACAO_CAMPOS_OBRIGATORIOS.getValue().toString(), "ADMINISTRACAODEMATERIAIS.LABEL.TIPO_NUMERICO"); | |
28 | - | |
29 | - } | |
30 | -} | |
31 | - |
cit-adm-materiais-api/src/main/resources/scripts-bd/postgres/v1.15.0/01-cit-adm-materiais-v1.15.0-postgres.sql
0 → 100644
... | ... | @@ -0,0 +1,1688 @@ |
1 | +-- GEOVANE INICIO 03/05/2016 | |
2 | + | |
3 | +DROP TABLE movimentoestoque; | |
4 | +DROP TABLE materialestoquesaldo; | |
5 | +DROP TABLE materialpermanenteconsumo; | |
6 | +DROP TABLE matpermancons_aud; | |
7 | +DROP TABLE atendimentoreqconsumoitem; | |
8 | +DROP TABLE atendimentorequisicaoconsumo; | |
9 | +DROP TABLE baixaalmoxarifadoitem; | |
10 | +DROP TABLE baixaalmoxarifado; | |
11 | +DROP TABLE baixaalmoxarifado_aud; | |
12 | +DROP TABLE bemalmoxarifadocaracteristica; | |
13 | +DROP TABLE bemalmoxcaract_aud; | |
14 | +DROP TABLE catalogomaterialitem; | |
15 | +DROP TABLE catmaterialunidadeconsreqitem; | |
16 | +DROP TABLE catalogomaterial; | |
17 | +DROP TABLE confignotificacaoressupgrupo; | |
18 | +DROP TABLE confignotificacaoressupusuario; | |
19 | +DROP TABLE confignotificacaoressuprimento; | |
20 | +DROP TABLE devolucaodocumento; | |
21 | +DROP TABLE devolucaoitem; | |
22 | +DROP TABLE devolucaoobservacao; | |
23 | +DROP TABLE devolucao; | |
24 | +DROP TABLE localestoque; | |
25 | +DROP TABLE entradaalmoxarifadoitem; | |
26 | +DROP TABLE entradaalmoxarifadoitem_aud; | |
27 | +DROP TABLE entradaalmoxarifado; | |
28 | +DROP TABLE entradaalmoxarifado_aud; | |
29 | +DROP TABLE requisicaoconsumoitem; | |
30 | +DROP TABLE requisicaoobservacao; | |
31 | +DROP TABLE requisicaoconsumo; | |
32 | +DROP TABLE matconsumotipounidadeentrada; | |
33 | +DROP TABLE matconstpunentrada_aud; | |
34 | +DROP TABLE materialconsumo; | |
35 | +DROP TABLE materialconsumo_aud; | |
36 | +DROP TABLE materialestoquesaldomedio; | |
37 | + | |
38 | +-- GEOVANE FIM 03/05/2016 | |
39 | + | |
40 | +-- GEOVANE INICIO 04/05/2016 | |
41 | + | |
42 | +CREATE TABLE alm_entrada | |
43 | +( | |
44 | + id bigint NOT NULL, | |
45 | + databloqueio date, | |
46 | + datainativo date, | |
47 | + datacriacao timestamp without time zone NOT NULL, | |
48 | + dataedicao timestamp without time zone NOT NULL, | |
49 | + version bigint, | |
50 | + codigo character varying(30), | |
51 | + codigoasi character varying(30), | |
52 | + datacontabil timestamp without time zone, | |
53 | + datarecebimento timestamp without time zone, | |
54 | + datareferencia timestamp without time zone NOT NULL, | |
55 | + iscontabilizada boolean, | |
56 | + isentradaconcluida boolean, | |
57 | + notarecebimento character varying(30), | |
58 | + valortotalnota numeric(20,2), | |
59 | + inativador_id bigint, | |
60 | + autor_id bigint, | |
61 | + editor_id bigint, | |
62 | + organizacao_id bigint, | |
63 | + almoxarifado_id bigint NOT NULL, | |
64 | + dominiofinalidade_id bigint NOT NULL, | |
65 | + dominiotipoentrada_id bigint NOT NULL, | |
66 | + dominiotiporecebimento_id bigint NOT NULL, | |
67 | + fornecedor_id bigint NOT NULL, | |
68 | + unidaderequisitante_id bigint, | |
69 | + CONSTRAINT alm_entrada_pkey PRIMARY KEY (id), | |
70 | + CONSTRAINT fk_1xygnb9br1ecqq6s6o0kxrh2b FOREIGN KEY (autor_id) | |
71 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
72 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
73 | + CONSTRAINT fk_38pxy1g1lvmp75l7t5q89xct9 FOREIGN KEY (fornecedor_id) | |
74 | + REFERENCES parceiro (id) MATCH SIMPLE | |
75 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
76 | + CONSTRAINT fk_3om2l7txfuhrmx9x0gjpqqkrt FOREIGN KEY (organizacao_id) | |
77 | + REFERENCES organizacao (id) MATCH SIMPLE | |
78 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
79 | + CONSTRAINT fk_brn5q96f4hisac0125u7dohkb FOREIGN KEY (inativador_id) | |
80 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
81 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
82 | + CONSTRAINT fk_gh15cehetkf5hhevjhwxf8the FOREIGN KEY (dominiotipoentrada_id) | |
83 | + REFERENCES dominio (id) MATCH SIMPLE | |
84 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
85 | + CONSTRAINT fk_ho50jimfjlhdyitgeatjn7vbq FOREIGN KEY (dominiofinalidade_id) | |
86 | + REFERENCES dominio (id) MATCH SIMPLE | |
87 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
88 | + CONSTRAINT fk_ijnhgxj6ypv2vw0v7dnunhdmn FOREIGN KEY (editor_id) | |
89 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
90 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
91 | + CONSTRAINT fk_je6bgbo1bdcqjsmi063lwwnke FOREIGN KEY (dominiotiporecebimento_id) | |
92 | + REFERENCES dominio (id) MATCH SIMPLE | |
93 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
94 | + CONSTRAINT fk_lk0uf0t7k7x4jjayurj2dsjpn FOREIGN KEY (almoxarifado_id) | |
95 | + REFERENCES estruturaorganizacional (id) MATCH SIMPLE | |
96 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
97 | + CONSTRAINT fk_r86yecl4llcsqej7tpu16wutp FOREIGN KEY (unidaderequisitante_id) | |
98 | + REFERENCES estruturaorganizacional (id) MATCH SIMPLE | |
99 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
100 | +); | |
101 | + | |
102 | +CREATE TABLE alm_entrada_aud | |
103 | +( | |
104 | + id bigint NOT NULL, | |
105 | + rev integer NOT NULL, | |
106 | + revtype smallint, | |
107 | + databloqueio date, | |
108 | + datainativo date, | |
109 | + datacriacao timestamp without time zone, | |
110 | + dataedicao timestamp without time zone, | |
111 | + codigo character varying(30), | |
112 | + codigoasi character varying(30), | |
113 | + datacontabil timestamp without time zone, | |
114 | + datarecebimento timestamp without time zone, | |
115 | + datareferencia timestamp without time zone, | |
116 | + iscontabilizada boolean, | |
117 | + isentradaconcluida boolean, | |
118 | + notarecebimento character varying(30), | |
119 | + valortotalnota numeric(20,2), | |
120 | + autor_id bigint, | |
121 | + editor_id bigint, | |
122 | + almoxarifado_id bigint, | |
123 | + dominiofinalidade_id bigint, | |
124 | + dominiotipoentrada_id bigint, | |
125 | + dominiotiporecebimento_id bigint, | |
126 | + unidaderequisitante_id bigint, | |
127 | + CONSTRAINT alm_entrada_aud_pkey PRIMARY KEY (id, rev) | |
128 | +); | |
129 | + | |
130 | +CREATE TABLE alm_en_documento | |
131 | +( | |
132 | + id bigint NOT NULL, | |
133 | + entrada_id bigint, | |
134 | + entradainativo_id bigint, | |
135 | + CONSTRAINT alm_en_documento_pkey PRIMARY KEY (id), | |
136 | + CONSTRAINT fk_8fru5v03lyhh1vwyvlmov1bxy FOREIGN KEY (entrada_id) | |
137 | + REFERENCES alm_entrada (id) MATCH SIMPLE | |
138 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
139 | + CONSTRAINT fk_j00m6e8exawjgnu94fnpul4dd FOREIGN KEY (entradainativo_id) | |
140 | + REFERENCES alm_entrada (id) MATCH SIMPLE | |
141 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
142 | + CONSTRAINT fk_mr2s56cixxm14rusoc1y2fvhx FOREIGN KEY (id) | |
143 | + REFERENCES documento (id) MATCH SIMPLE | |
144 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
145 | +); | |
146 | + | |
147 | +CREATE TABLE alm_en_documento_aud | |
148 | +( | |
149 | + id bigint NOT NULL, | |
150 | + rev integer NOT NULL, | |
151 | + entrada_id bigint, | |
152 | + entradainativo_id bigint, | |
153 | + CONSTRAINT alm_en_documento_aud_pkey PRIMARY KEY (id, rev), | |
154 | + CONSTRAINT fk_3212ajd7yw50pajor8ka9h52j FOREIGN KEY (id, rev) | |
155 | + REFERENCES documento_aud (id, rev) MATCH SIMPLE | |
156 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
157 | +); | |
158 | + | |
159 | +CREATE TABLE alm_en_observacao | |
160 | +( | |
161 | + id bigint NOT NULL, | |
162 | + entrada_id bigint NOT NULL, | |
163 | + CONSTRAINT alm_en_observacao_pkey PRIMARY KEY (id), | |
164 | + CONSTRAINT fk_9dk6k1lcoebg1bpfh3n1tw0cj FOREIGN KEY (entrada_id) | |
165 | + REFERENCES alm_entrada (id) MATCH SIMPLE | |
166 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
167 | + CONSTRAINT fk_r89ae877jbrenwo0c9s1gv83n FOREIGN KEY (id) | |
168 | + REFERENCES observacao (id) MATCH SIMPLE | |
169 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
170 | +); | |
171 | + | |
172 | +CREATE TABLE alm_estoque | |
173 | +( | |
174 | + id bigint NOT NULL, | |
175 | + databloqueio date, | |
176 | + datainativo date, | |
177 | + datacriacao timestamp without time zone NOT NULL, | |
178 | + dataedicao timestamp without time zone NOT NULL, | |
179 | + version bigint, | |
180 | + inativador_id bigint, | |
181 | + autor_id bigint, | |
182 | + editor_id bigint, | |
183 | + organizacao_id bigint, | |
184 | + almoxarifado_id bigint NOT NULL, | |
185 | + CONSTRAINT alm_estoque_pkey PRIMARY KEY (id), | |
186 | + CONSTRAINT fk_1cljoqca3xplogdvv46oa9kax FOREIGN KEY (autor_id) | |
187 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
188 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
189 | + CONSTRAINT fk_2s26akyafrcm2sctj0klh94h4 FOREIGN KEY (editor_id) | |
190 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
191 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
192 | + CONSTRAINT fk_7v1dej078tr18555baf3e9n54 FOREIGN KEY (inativador_id) | |
193 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
194 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
195 | + CONSTRAINT fk_hgv7qtgwqcd7nnkyxg3e5yws6 FOREIGN KEY (almoxarifado_id) | |
196 | + REFERENCES estruturaorganizacional (id) MATCH SIMPLE | |
197 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
198 | + CONSTRAINT fk_mcf55ysgw173k86e686tbgx6n FOREIGN KEY (organizacao_id) | |
199 | + REFERENCES organizacao (id) MATCH SIMPLE | |
200 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
201 | + CONSTRAINT uk_hgv7qtgwqcd7nnkyxg3e5yws6 UNIQUE (almoxarifado_id) | |
202 | +); | |
203 | + | |
204 | +CREATE TABLE alm_estoque_aud | |
205 | +( | |
206 | + id bigint NOT NULL, | |
207 | + rev integer NOT NULL, | |
208 | + revtype smallint, | |
209 | + databloqueio date, | |
210 | + datainativo date, | |
211 | + datacriacao timestamp without time zone, | |
212 | + dataedicao timestamp without time zone, | |
213 | + autor_id bigint, | |
214 | + editor_id bigint, | |
215 | + almoxarifado_id bigint, | |
216 | + CONSTRAINT alm_estoque_aud_pkey PRIMARY KEY (id, rev) | |
217 | +); | |
218 | + | |
219 | +CREATE TABLE alm_es_enderecoestoque | |
220 | +( | |
221 | + id bigint NOT NULL, | |
222 | + databloqueio date, | |
223 | + datainativo date, | |
224 | + datacriacao timestamp without time zone NOT NULL, | |
225 | + dataedicao timestamp without time zone NOT NULL, | |
226 | + version bigint, | |
227 | + acomodamaterial boolean, | |
228 | + codigo character varying(30) NOT NULL, | |
229 | + descricao character varying(400) NOT NULL, | |
230 | + endertodomaterial boolean, | |
231 | + sigla character varying(30), | |
232 | + inativador_id bigint, | |
233 | + autor_id bigint, | |
234 | + editor_id bigint, | |
235 | + organizacao_id bigint, | |
236 | + endeestoqsuperior_id bigint, | |
237 | + estoque_id bigint, | |
238 | + estoqueinativo_id bigint, | |
239 | + CONSTRAINT alm_es_enderecoestoque_pkey PRIMARY KEY (id), | |
240 | + CONSTRAINT fk_6m42m9ufi8e091yhslto1xynw FOREIGN KEY (endeestoqsuperior_id) | |
241 | + REFERENCES alm_es_enderecoestoque (id) MATCH SIMPLE | |
242 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
243 | + CONSTRAINT fk_7cque00jpsdib3vrm26xkusdd FOREIGN KEY (inativador_id) | |
244 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
245 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
246 | + CONSTRAINT fk_7ndaljqilpb1onj3i47ay28vr FOREIGN KEY (autor_id) | |
247 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
248 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
249 | + CONSTRAINT fk_b8va70srt4c9cyd2r3flqy3ts FOREIGN KEY (estoqueinativo_id) | |
250 | + REFERENCES alm_estoque (id) MATCH SIMPLE | |
251 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
252 | + CONSTRAINT fk_lun8xpext1c1biblsrjhxhiip FOREIGN KEY (estoque_id) | |
253 | + REFERENCES alm_estoque (id) MATCH SIMPLE | |
254 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
255 | + CONSTRAINT fk_mj0n25iy613xq928u7u31jjvk FOREIGN KEY (editor_id) | |
256 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
257 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
258 | + CONSTRAINT fk_npvxsokt3fcl4rl1v3ik2ky2k FOREIGN KEY (organizacao_id) | |
259 | + REFERENCES organizacao (id) MATCH SIMPLE | |
260 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
261 | + CONSTRAINT uk_3tn2a36j7pjrt90mvi3o06drp UNIQUE (codigo) | |
262 | +); | |
263 | + | |
264 | +CREATE TABLE alm_es_enderecoestoque_aud | |
265 | +( | |
266 | + id bigint NOT NULL, | |
267 | + rev integer NOT NULL, | |
268 | + revtype smallint, | |
269 | + databloqueio date, | |
270 | + datainativo date, | |
271 | + datacriacao timestamp without time zone, | |
272 | + dataedicao timestamp without time zone, | |
273 | + acomodamaterial boolean, | |
274 | + codigo character varying(30), | |
275 | + descricao character varying(400), | |
276 | + endertodomaterial boolean, | |
277 | + sigla character varying(30), | |
278 | + autor_id bigint, | |
279 | + editor_id bigint, | |
280 | + endeestoqsuperior_id bigint, | |
281 | + estoque_id bigint, | |
282 | + estoqueinativo_id bigint, | |
283 | + CONSTRAINT alm_es_enderecoestoque_aud_pkey PRIMARY KEY (id, rev) | |
284 | +); | |
285 | + | |
286 | +CREATE TABLE alm_materialconsumo | |
287 | +( | |
288 | + elementodespesa character varying(255), | |
289 | + id bigint NOT NULL, | |
290 | + unidadearmazenamento_id bigint NOT NULL, | |
291 | + CONSTRAINT alm_materialconsumo_pkey PRIMARY KEY (id), | |
292 | + CONSTRAINT fk_ng0jkg3o090umwff3jeio9jdf FOREIGN KEY (unidadearmazenamento_id) | |
293 | + REFERENCES unidademedida (id) MATCH SIMPLE | |
294 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
295 | + CONSTRAINT fk_nv4tvt10k4j217w2v3uc7v9cv FOREIGN KEY (id) | |
296 | + REFERENCES material (id) MATCH SIMPLE | |
297 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
298 | +); | |
299 | + | |
300 | +CREATE TABLE alm_materialconsumo_aud | |
301 | +( | |
302 | + id bigint NOT NULL, | |
303 | + rev integer NOT NULL, | |
304 | + elementodespesa character varying(255), | |
305 | + unidadearmazenamento_id bigint, | |
306 | + CONSTRAINT alm_materialconsumo_aud_pkey PRIMARY KEY (id, rev), | |
307 | + CONSTRAINT fk_4tpas7nd065uq1w936621s597 FOREIGN KEY (id, rev) | |
308 | + REFERENCES material_aud (id, rev) MATCH SIMPLE | |
309 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
310 | +); | |
311 | + | |
312 | +CREATE TABLE alm_materialestoque | |
313 | +( | |
314 | + id bigint NOT NULL, | |
315 | + databloqueio date, | |
316 | + datainativo date, | |
317 | + datacriacao timestamp without time zone NOT NULL, | |
318 | + dataedicao timestamp without time zone NOT NULL, | |
319 | + version bigint, | |
320 | + restomedio numeric(20,4), | |
321 | + valorunitariomedio numeric(20,4), | |
322 | + inativador_id bigint, | |
323 | + autor_id bigint, | |
324 | + editor_id bigint, | |
325 | + organizacao_id bigint, | |
326 | + material_id bigint NOT NULL, | |
327 | + CONSTRAINT alm_materialestoque_pkey PRIMARY KEY (id), | |
328 | + CONSTRAINT fk_8uu05hib97ph5fx849uneyb1x FOREIGN KEY (organizacao_id) | |
329 | + REFERENCES organizacao (id) MATCH SIMPLE | |
330 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
331 | + CONSTRAINT fk_dmmv4h2uxjke1xmcaaq0cxpbe FOREIGN KEY (material_id) | |
332 | + REFERENCES alm_materialconsumo (id) MATCH SIMPLE | |
333 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
334 | + CONSTRAINT fk_m6nafjqbl1qve5m6w19namkev FOREIGN KEY (inativador_id) | |
335 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
336 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
337 | + CONSTRAINT fk_n9vlft46032ua66eao1iy1i6k FOREIGN KEY (autor_id) | |
338 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
339 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
340 | + CONSTRAINT fk_nhxlxgb6h6c3m1okq1vohfge FOREIGN KEY (editor_id) | |
341 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
342 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
343 | + CONSTRAINT uk_dmmv4h2uxjke1xmcaaq0cxpbe UNIQUE (material_id) | |
344 | +); | |
345 | + | |
346 | +CREATE TABLE alm_materialestoque_aud | |
347 | +( | |
348 | + id bigint NOT NULL, | |
349 | + rev integer NOT NULL, | |
350 | + revtype smallint, | |
351 | + databloqueio date, | |
352 | + datainativo date, | |
353 | + datacriacao timestamp without time zone, | |
354 | + dataedicao timestamp without time zone, | |
355 | + restomedio numeric(20,4), | |
356 | + valorunitariomedio numeric(20,4), | |
357 | + autor_id bigint, | |
358 | + editor_id bigint, | |
359 | + material_id bigint, | |
360 | + CONSTRAINT alm_materialestoque_aud_pkey PRIMARY KEY (id, rev) | |
361 | +); | |
362 | + | |
363 | +CREATE TABLE alm_me_localestoque | |
364 | +( | |
365 | + id bigint NOT NULL, | |
366 | + databloqueio date, | |
367 | + datainativo date, | |
368 | + datacriacao timestamp without time zone NOT NULL, | |
369 | + dataedicao timestamp without time zone NOT NULL, | |
370 | + version bigint, | |
371 | + quantidade numeric(19,2), | |
372 | + inativador_id bigint, | |
373 | + autor_id bigint, | |
374 | + editor_id bigint, | |
375 | + organizacao_id bigint, | |
376 | + endereco_id bigint NOT NULL, | |
377 | + enderecoinativo_id bigint, | |
378 | + materialestoque_id bigint NOT NULL, | |
379 | + materialestoqueinativo_id bigint, | |
380 | + unidademedidaentrada_id bigint NOT NULL, | |
381 | + CONSTRAINT alm_me_localestoque_pkey PRIMARY KEY (id), | |
382 | + CONSTRAINT fk_438teo7y89v821sfi61hm127g FOREIGN KEY (unidademedidaentrada_id) | |
383 | + REFERENCES unidademedida (id) MATCH SIMPLE | |
384 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
385 | + CONSTRAINT fk_edahikxmns0vs1pnoa6ovod82 FOREIGN KEY (materialestoqueinativo_id) | |
386 | + REFERENCES alm_materialestoque (id) MATCH SIMPLE | |
387 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
388 | + CONSTRAINT fk_foifpbnon1jfcybg9dlsro9c FOREIGN KEY (editor_id) | |
389 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
390 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
391 | + CONSTRAINT fk_i4iuf17nxlo7t9v26ejvlr6ud FOREIGN KEY (enderecoinativo_id) | |
392 | + REFERENCES alm_es_enderecoestoque (id) MATCH SIMPLE | |
393 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
394 | + CONSTRAINT fk_jsrcjmbvm7pnw3ql1hoiyhamj FOREIGN KEY (materialestoque_id) | |
395 | + REFERENCES alm_materialestoque (id) MATCH SIMPLE | |
396 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
397 | + CONSTRAINT fk_owi6smnhuil706bc0ahndgo89 FOREIGN KEY (organizacao_id) | |
398 | + REFERENCES organizacao (id) MATCH SIMPLE | |
399 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
400 | + CONSTRAINT fk_qm5wppxgajf0asko3ov9ykn07 FOREIGN KEY (autor_id) | |
401 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
402 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
403 | + CONSTRAINT fk_qnx0r3sv9yxte5bholpq15k4p FOREIGN KEY (endereco_id) | |
404 | + REFERENCES alm_es_enderecoestoque (id) MATCH SIMPLE | |
405 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
406 | + CONSTRAINT fk_rqrp8dor6nqoh91p9bv9u9yyi FOREIGN KEY (inativador_id) | |
407 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
408 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
409 | + CONSTRAINT uk_jsrcjmbvm7pnw3ql1hoiyhamj UNIQUE (materialestoque_id), | |
410 | + CONSTRAINT uk_qnx0r3sv9yxte5bholpq15k4p UNIQUE (endereco_id) | |
411 | +); | |
412 | + | |
413 | +CREATE TABLE alm_me_localestoque_aud | |
414 | +( | |
415 | + id bigint NOT NULL, | |
416 | + rev integer NOT NULL, | |
417 | + revtype smallint, | |
418 | + databloqueio date, | |
419 | + datainativo date, | |
420 | + datacriacao timestamp without time zone, | |
421 | + dataedicao timestamp without time zone, | |
422 | + quantidade numeric(19,2), | |
423 | + autor_id bigint, | |
424 | + editor_id bigint, | |
425 | + endereco_id bigint, | |
426 | + enderecoinativo_id bigint, | |
427 | + materialestoque_id bigint, | |
428 | + materialestoqueinativo_id bigint, | |
429 | + unidademedidaentrada_id bigint, | |
430 | + CONSTRAINT alm_me_localestoque_aud_pkey PRIMARY KEY (id, rev) | |
431 | +); | |
432 | + | |
433 | +CREATE TABLE alm_me_fifoitem | |
434 | +( | |
435 | + id bigint NOT NULL, | |
436 | + databloqueio date, | |
437 | + datainativo date, | |
438 | + datacriacao timestamp without time zone NOT NULL, | |
439 | + dataedicao timestamp without time zone NOT NULL, | |
440 | + version bigint, | |
441 | + quantidadeinicial numeric(20,4) NOT NULL, | |
442 | + quantidaderestante numeric(20,4) NOT NULL, | |
443 | + valorsobra numeric(20,4) NOT NULL, | |
444 | + valortotal numeric(20,4) NOT NULL, | |
445 | + valorunitario numeric(20,4) NOT NULL, | |
446 | + inativador_id bigint, | |
447 | + autor_id bigint, | |
448 | + editor_id bigint, | |
449 | + organizacao_id bigint, | |
450 | + material_id bigint NOT NULL, | |
451 | + materialestoque_id bigint, | |
452 | + materialestoqueinativo_id bigint, | |
453 | + CONSTRAINT alm_me_fifoitem_pkey PRIMARY KEY (id), | |
454 | + CONSTRAINT fk_22i3rv27hwchu5hqbcua33dj4 FOREIGN KEY (editor_id) | |
455 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
456 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
457 | + CONSTRAINT fk_3pa241s7brr43ml1kgvlrb9e8 FOREIGN KEY (material_id) | |
458 | + REFERENCES alm_materialconsumo (id) MATCH SIMPLE | |
459 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
460 | + CONSTRAINT fk_c1aff1rb22jk8rxfyjw2ahp6p FOREIGN KEY (materialestoque_id) | |
461 | + REFERENCES alm_materialestoque (id) MATCH SIMPLE | |
462 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
463 | + CONSTRAINT fk_dr3ga3srn18drk0qykl00mr5 FOREIGN KEY (inativador_id) | |
464 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
465 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
466 | + CONSTRAINT fk_k80jc3a46c8i36hhbppqy2t7i FOREIGN KEY (materialestoqueinativo_id) | |
467 | + REFERENCES alm_materialestoque (id) MATCH SIMPLE | |
468 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
469 | + CONSTRAINT fk_mc0i03d1p7s6ney7y1hnwulbo FOREIGN KEY (organizacao_id) | |
470 | + REFERENCES organizacao (id) MATCH SIMPLE | |
471 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
472 | + CONSTRAINT fk_t03lnpymhj4fxcvtwg3rs1st9 FOREIGN KEY (autor_id) | |
473 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
474 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
475 | + CONSTRAINT uk_3pa241s7brr43ml1kgvlrb9e8 UNIQUE (material_id) | |
476 | +); | |
477 | + | |
478 | +CREATE TABLE alm_me_fifoitem_aud | |
479 | +( | |
480 | + id bigint NOT NULL, | |
481 | + rev integer NOT NULL, | |
482 | + revtype smallint, | |
483 | + databloqueio date, | |
484 | + datainativo date, | |
485 | + datacriacao timestamp without time zone, | |
486 | + dataedicao timestamp without time zone, | |
487 | + quantidadeinicial numeric(20,4), | |
488 | + quantidaderestante numeric(20,4), | |
489 | + valorsobra numeric(20,4), | |
490 | + valortotal numeric(20,4), | |
491 | + valorunitario numeric(20,4), | |
492 | + autor_id bigint, | |
493 | + editor_id bigint, | |
494 | + material_id bigint, | |
495 | + materialestoque_id bigint, | |
496 | + materialestoqueinativo_id bigint, | |
497 | + CONSTRAINT alm_me_fifoitem_aud_pkey PRIMARY KEY (id, rev) | |
498 | +); | |
499 | + | |
500 | +CREATE TABLE alm_me_movimentoestoque | |
501 | +( | |
502 | + id bigint NOT NULL, | |
503 | + databloqueio date, | |
504 | + datainativo date, | |
505 | + datacriacao timestamp without time zone NOT NULL, | |
506 | + dataedicao timestamp without time zone NOT NULL, | |
507 | + version bigint, | |
508 | + datamovimento timestamp without time zone NOT NULL, | |
509 | + idclassereferencia bigint, | |
510 | + quantidade numeric(19,2), | |
511 | + valorfifo numeric(20,4), | |
512 | + valormedia numeric(20,4), | |
513 | + inativador_id bigint, | |
514 | + autor_id bigint, | |
515 | + editor_id bigint, | |
516 | + organizacao_id bigint, | |
517 | + dominioclassereferencia_id bigint, | |
518 | + material_id bigint NOT NULL, | |
519 | + materialestoque_id bigint, | |
520 | + materiallocalestoque_id bigint, | |
521 | + tipomovimento_id bigint NOT NULL, | |
522 | + CONSTRAINT alm_me_movimentoestoque_pkey PRIMARY KEY (id), | |
523 | + CONSTRAINT fk_2i23htrrm31ummfpwt5sf2bm9 FOREIGN KEY (autor_id) | |
524 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
525 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
526 | + CONSTRAINT fk_5c9filnq6hohatk9hgl4jv4gc FOREIGN KEY (organizacao_id) | |
527 | + REFERENCES organizacao (id) MATCH SIMPLE | |
528 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
529 | + CONSTRAINT fk_5vrvdeo94atx7eryndteynymr FOREIGN KEY (editor_id) | |
530 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
531 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
532 | + CONSTRAINT fk_aqnd3i2nqi2k6jty7k5jpa1v8 FOREIGN KEY (materialestoque_id) | |
533 | + REFERENCES alm_materialestoque (id) MATCH SIMPLE | |
534 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
535 | + CONSTRAINT fk_kaop9f8yojum5yn743s9ckyw9 FOREIGN KEY (materiallocalestoque_id) | |
536 | + REFERENCES alm_me_localestoque (id) MATCH SIMPLE | |
537 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
538 | + CONSTRAINT fk_npkk25ix0nqw69q74rm5fiiqu FOREIGN KEY (material_id) | |
539 | + REFERENCES alm_materialconsumo (id) MATCH SIMPLE | |
540 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
541 | + CONSTRAINT fk_o29xdmxcha63gb8re1m4htq1g FOREIGN KEY (inativador_id) | |
542 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
543 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
544 | + CONSTRAINT fk_piofgnndttb0j8y2akpotqgfv FOREIGN KEY (dominioclassereferencia_id) | |
545 | + REFERENCES dominio (id) MATCH SIMPLE | |
546 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
547 | + CONSTRAINT fk_sa7jtn7qy3my47jm1tglcdkh0 FOREIGN KEY (tipomovimento_id) | |
548 | + REFERENCES dominio (id) MATCH SIMPLE | |
549 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
550 | +); | |
551 | + | |
552 | +CREATE TABLE alm_me_movimentoestoque_aud | |
553 | +( | |
554 | + id bigint NOT NULL, | |
555 | + rev integer NOT NULL, | |
556 | + revtype smallint, | |
557 | + databloqueio date, | |
558 | + datainativo date, | |
559 | + datacriacao timestamp without time zone, | |
560 | + dataedicao timestamp without time zone, | |
561 | + datamovimento timestamp without time zone, | |
562 | + idclassereferencia bigint, | |
563 | + quantidade numeric(19,2), | |
564 | + valorfifo numeric(20,4), | |
565 | + valormedia numeric(20,4), | |
566 | + autor_id bigint, | |
567 | + editor_id bigint, | |
568 | + dominioclassereferencia_id bigint, | |
569 | + material_id bigint, | |
570 | + materialestoque_id bigint, | |
571 | + materiallocalestoque_id bigint, | |
572 | + tipomovimento_id bigint, | |
573 | + CONSTRAINT alm_me_movimentoestoque_aud_pkey PRIMARY KEY (id, rev) | |
574 | +); | |
575 | + | |
576 | +CREATE TABLE alm_me_saldo | |
577 | +( | |
578 | + id bigint NOT NULL, | |
579 | + databloqueio date, | |
580 | + datainativo date, | |
581 | + datacriacao timestamp without time zone NOT NULL, | |
582 | + dataedicao timestamp without time zone NOT NULL, | |
583 | + version bigint, | |
584 | + datareferencia timestamp without time zone, | |
585 | + quantidade numeric(19,2), | |
586 | + valorfechado numeric(20,4), | |
587 | + inativador_id bigint, | |
588 | + autor_id bigint, | |
589 | + editor_id bigint, | |
590 | + organizacao_id bigint, | |
591 | + localestoque_id bigint, | |
592 | + material_id bigint, | |
593 | + tipofechamento_id bigint, | |
594 | + unidademedidamaterial_id bigint, | |
595 | + CONSTRAINT alm_me_saldo_pkey PRIMARY KEY (id), | |
596 | + CONSTRAINT fk_589xlahkulrpqys29gclk6gni FOREIGN KEY (inativador_id) | |
597 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
598 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
599 | + CONSTRAINT fk_6g11acmoqci1mbj4a464l3v7 FOREIGN KEY (localestoque_id) | |
600 | + REFERENCES alm_me_localestoque (id) MATCH SIMPLE | |
601 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
602 | + CONSTRAINT fk_6gy8vmoy3wg8v7uhmqljoovqx FOREIGN KEY (editor_id) | |
603 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
604 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
605 | + CONSTRAINT fk_99mhx5drww5r99ykddu2tg7uc FOREIGN KEY (tipofechamento_id) | |
606 | + REFERENCES dominio (id) MATCH SIMPLE | |
607 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
608 | + CONSTRAINT fk_9jcyhumgfyuqoox02ug4sc431 FOREIGN KEY (unidademedidamaterial_id) | |
609 | + REFERENCES unidademedida (id) MATCH SIMPLE | |
610 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
611 | + CONSTRAINT fk_o6xycy6ped3gdsdcmchoyxl3y FOREIGN KEY (organizacao_id) | |
612 | + REFERENCES organizacao (id) MATCH SIMPLE | |
613 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
614 | + CONSTRAINT fk_p9a08mrh2jsn8d8hgn0y09iia FOREIGN KEY (autor_id) | |
615 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
616 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
617 | + CONSTRAINT fk_pvab6hxxw44jvhkjyx9smuv2o FOREIGN KEY (material_id) | |
618 | + REFERENCES alm_materialconsumo (id) MATCH SIMPLE | |
619 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
620 | +); | |
621 | + | |
622 | +CREATE TABLE alm_not_ressuprimento | |
623 | +( | |
624 | + id bigint NOT NULL, | |
625 | + databloqueio date, | |
626 | + datainativo date, | |
627 | + datacriacao timestamp without time zone NOT NULL, | |
628 | + dataedicao timestamp without time zone NOT NULL, | |
629 | + version bigint, | |
630 | + cronexpression character varying(255), | |
631 | + identificador character varying(255), | |
632 | + limiteestoque numeric(20,2), | |
633 | + milissegundocron bigint, | |
634 | + pontopedido integer, | |
635 | + inativador_id bigint, | |
636 | + autor_id bigint, | |
637 | + editor_id bigint, | |
638 | + organizacao_id bigint, | |
639 | + localestoque_id bigint NOT NULL, | |
640 | + materialconsumo_id bigint, | |
641 | + notificacao_id bigint NOT NULL, | |
642 | + CONSTRAINT alm_not_ressuprimento_pkey PRIMARY KEY (id), | |
643 | + CONSTRAINT fk_c7rvw5oa5yiunkyuq6hyr92id FOREIGN KEY (inativador_id) | |
644 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
645 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
646 | + CONSTRAINT fk_dvgtfsqpa4w9326sekcwf8hjn FOREIGN KEY (organizacao_id) | |
647 | + REFERENCES organizacao (id) MATCH SIMPLE | |
648 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
649 | + CONSTRAINT fk_dyj3xdj44hb6pcijjt9ka6u1n FOREIGN KEY (localestoque_id) | |
650 | + REFERENCES alm_me_localestoque (id) MATCH SIMPLE | |
651 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
652 | + CONSTRAINT fk_hfj922mlbpwp69umqesvsi9bh FOREIGN KEY (editor_id) | |
653 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
654 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
655 | + CONSTRAINT fk_jpv4gpk8kypfb2apegmm0pkoi FOREIGN KEY (notificacao_id) | |
656 | + REFERENCES notificacao (id) MATCH SIMPLE | |
657 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
658 | + CONSTRAINT fk_kpxb1byqsspecea7o10xw4ay9 FOREIGN KEY (autor_id) | |
659 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
660 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
661 | + CONSTRAINT fk_n97xunao8nboa082dnfr07jbx FOREIGN KEY (materialconsumo_id) | |
662 | + REFERENCES alm_materialconsumo (id) MATCH SIMPLE | |
663 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
664 | +); | |
665 | + | |
666 | +CREATE TABLE alm_en_entradaitem | |
667 | +( | |
668 | + id bigint NOT NULL, | |
669 | + databloqueio date, | |
670 | + datainativo date, | |
671 | + datacriacao timestamp without time zone NOT NULL, | |
672 | + dataedicao timestamp without time zone NOT NULL, | |
673 | + version bigint, | |
674 | + datavalidade timestamp without time zone, | |
675 | + numerolote character varying(255), | |
676 | + quantidade numeric(19,2), | |
677 | + valortotal numeric(20,4), | |
678 | + valorunitario numeric(20,4), | |
679 | + inativador_id bigint, | |
680 | + autor_id bigint, | |
681 | + editor_id bigint, | |
682 | + entrada_id bigint, | |
683 | + entradainativo_id bigint, | |
684 | + material_id bigint NOT NULL, | |
685 | + materiallocalestoque_id bigint NOT NULL, | |
686 | + unidademedidaentrada_id bigint NOT NULL, | |
687 | + CONSTRAINT alm_en_entradaitem_pkey PRIMARY KEY (id), | |
688 | + CONSTRAINT fk_51dvfphluspkpjev6p3brtmmw FOREIGN KEY (entrada_id) | |
689 | + REFERENCES alm_entrada (id) MATCH SIMPLE | |
690 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
691 | + CONSTRAINT fk_995rtumo5346s148w5q9qw8t6 FOREIGN KEY (inativador_id) | |
692 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
693 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
694 | + CONSTRAINT fk_ackxqpap8nt3qk6chb9onl4rj FOREIGN KEY (unidademedidaentrada_id) | |
695 | + REFERENCES unidademedida (id) MATCH SIMPLE | |
696 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
697 | + CONSTRAINT fk_ak8ldmlglxidulpw4e1qto3dp FOREIGN KEY (material_id) | |
698 | + REFERENCES alm_materialconsumo (id) MATCH SIMPLE | |
699 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
700 | + CONSTRAINT fk_n3hepobqcqgjqno0hcanw5era FOREIGN KEY (autor_id) | |
701 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
702 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
703 | + CONSTRAINT fk_opbnhs743oeshvg2tt4frjk4y FOREIGN KEY (entradainativo_id) | |
704 | + REFERENCES alm_entrada (id) MATCH SIMPLE | |
705 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
706 | + CONSTRAINT fk_r2m81bt0elxvncf8su58px08j FOREIGN KEY (materiallocalestoque_id) | |
707 | + REFERENCES alm_me_localestoque (id) MATCH SIMPLE | |
708 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
709 | + CONSTRAINT fk_rkae7uj2vji4kwqvkga7b7ige FOREIGN KEY (editor_id) | |
710 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
711 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
712 | +); | |
713 | + | |
714 | +CREATE TABLE alm_en_entradaitem_aud | |
715 | +( | |
716 | + id bigint NOT NULL, | |
717 | + rev integer NOT NULL, | |
718 | + revtype smallint, | |
719 | + databloqueio date, | |
720 | + datainativo date, | |
721 | + datacriacao timestamp without time zone, | |
722 | + dataedicao timestamp without time zone, | |
723 | + datavalidade timestamp without time zone, | |
724 | + numerolote character varying(255), | |
725 | + quantidade numeric(19,2), | |
726 | + valortotal numeric(20,4), | |
727 | + valorunitario numeric(20,4), | |
728 | + autor_id bigint, | |
729 | + editor_id bigint, | |
730 | + entrada_id bigint, | |
731 | + entradainativo_id bigint, | |
732 | + material_id bigint, | |
733 | + materiallocalestoque_id bigint, | |
734 | + unidademedidaentrada_id bigint, | |
735 | + CONSTRAINT alm_en_entradaitem_aud_pkey PRIMARY KEY (id, rev) | |
736 | +); | |
737 | + | |
738 | + | |
739 | + | |
740 | + | |
741 | + | |
742 | +CREATE TABLE alm_baixa | |
743 | +( | |
744 | + databaixa timestamp without time zone NOT NULL, | |
745 | + numerobaixa character varying(30), | |
746 | + id bigint NOT NULL, | |
747 | + almoxarifado_id bigint NOT NULL, | |
748 | + destino_id bigint, | |
749 | + dominiosituacaoestorno_id bigint NOT NULL, | |
750 | + dominiotipobaixa_id bigint NOT NULL, | |
751 | + CONSTRAINT alm_baixa_pkey PRIMARY KEY (id), | |
752 | + CONSTRAINT fk_3d9f7d4vwqobat8qo6r8jjnea FOREIGN KEY (almoxarifado_id) | |
753 | + REFERENCES estruturaorganizacional (id) MATCH SIMPLE | |
754 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
755 | + CONSTRAINT fk_6e4oev8qcuespbgavxe3wm73n FOREIGN KEY (dominiotipobaixa_id) | |
756 | + REFERENCES dominio (id) MATCH SIMPLE | |
757 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
758 | + CONSTRAINT fk_dkscfqr5g3ve84gt3sqahekn1 FOREIGN KEY (destino_id) | |
759 | + REFERENCES parceiro (id) MATCH SIMPLE | |
760 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
761 | + CONSTRAINT fk_grdxvkfwjpi56v6ps2xo2xfdq FOREIGN KEY (dominiosituacaoestorno_id) | |
762 | + REFERENCES dominio (id) MATCH SIMPLE | |
763 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
764 | + CONSTRAINT fk_j9jove8gg2oc5ba6bmtwbauv4 FOREIGN KEY (id) | |
765 | + REFERENCES baixa (id) MATCH SIMPLE | |
766 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
767 | +); | |
768 | + | |
769 | +CREATE TABLE alm_baixa_aud | |
770 | +( | |
771 | + id bigint NOT NULL, | |
772 | + rev integer NOT NULL, | |
773 | + databaixa timestamp without time zone, | |
774 | + numerobaixa character varying(30), | |
775 | + almoxarifado_id bigint, | |
776 | + destino_id bigint, | |
777 | + dominiosituacaoestorno_id bigint, | |
778 | + dominiotipobaixa_id bigint, | |
779 | + CONSTRAINT alm_baixa_aud_pkey PRIMARY KEY (id, rev), | |
780 | + CONSTRAINT fk_5ccgyy8rem29kelqvt82o67kj FOREIGN KEY (id, rev) | |
781 | + REFERENCES baixa_aud (id, rev) MATCH SIMPLE | |
782 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
783 | +); | |
784 | + | |
785 | +CREATE TABLE alm_bem_caracteristica | |
786 | +( | |
787 | + id bigint NOT NULL, | |
788 | + databloqueio date, | |
789 | + datainativo date, | |
790 | + datacriacao timestamp without time zone NOT NULL, | |
791 | + dataedicao timestamp without time zone NOT NULL, | |
792 | + version bigint, | |
793 | + valorcaracteristica character varying(255), | |
794 | + inativador_id bigint, | |
795 | + autor_id bigint, | |
796 | + editor_id bigint, | |
797 | + organizacao_id bigint, | |
798 | + caracteristica_id bigint NOT NULL, | |
799 | + entradaitem_id bigint NOT NULL, | |
800 | + materialcaracteristica_id bigint NOT NULL, | |
801 | + CONSTRAINT alm_bem_caracteristica_pkey PRIMARY KEY (id), | |
802 | + CONSTRAINT fk_9nevva15x4pp5wxkcscw7ycv3 FOREIGN KEY (materialcaracteristica_id) | |
803 | + REFERENCES materialcaracteristica (id) MATCH SIMPLE | |
804 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
805 | + CONSTRAINT fk_9o2lc892ugxi43qpfy340kvuf FOREIGN KEY (organizacao_id) | |
806 | + REFERENCES organizacao (id) MATCH SIMPLE | |
807 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
808 | + CONSTRAINT fk_a7yyeopuhh47j3qbm0hjjlsjy FOREIGN KEY (autor_id) | |
809 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
810 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
811 | + CONSTRAINT fk_cyqjy0cn0837xb7ns870qkrtn FOREIGN KEY (editor_id) | |
812 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
813 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
814 | + CONSTRAINT fk_pe6990bdkscpphicmmgoj51sh FOREIGN KEY (entradaitem_id) | |
815 | + REFERENCES alm_en_entradaitem (id) MATCH SIMPLE | |
816 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
817 | + CONSTRAINT fk_q6g8lkp1krshkcd4uaeobmkwp FOREIGN KEY (caracteristica_id) | |
818 | + REFERENCES caracteristica (id) MATCH SIMPLE | |
819 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
820 | + CONSTRAINT fk_r7m2dwpb6g78wftnvox1h4m7r FOREIGN KEY (inativador_id) | |
821 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
822 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
823 | +); | |
824 | + | |
825 | +CREATE TABLE alm_bem_caracteristica_aud | |
826 | +( | |
827 | + id bigint NOT NULL, | |
828 | + rev integer NOT NULL, | |
829 | + revtype smallint, | |
830 | + databloqueio date, | |
831 | + datainativo date, | |
832 | + datacriacao timestamp without time zone, | |
833 | + dataedicao timestamp without time zone, | |
834 | + valorcaracteristica character varying(255), | |
835 | + autor_id bigint, | |
836 | + editor_id bigint, | |
837 | + caracteristica_id bigint, | |
838 | + entradaitem_id bigint, | |
839 | + materialcaracteristica_id bigint, | |
840 | + CONSTRAINT bemalmoxcaract_aud_pkey PRIMARY KEY (id, rev) | |
841 | +); | |
842 | + | |
843 | +CREATE TABLE alm_bx_item | |
844 | +( | |
845 | + id bigint NOT NULL, | |
846 | + databloqueio date, | |
847 | + datainativo date, | |
848 | + datacriacao timestamp without time zone NOT NULL, | |
849 | + dataedicao timestamp without time zone NOT NULL, | |
850 | + version bigint, | |
851 | + dataestorno timestamp without time zone, | |
852 | + quantidade numeric(20,4), | |
853 | + total numeric(20,4), | |
854 | + inativador_id bigint, | |
855 | + autor_id bigint, | |
856 | + editor_id bigint, | |
857 | + baixaalmoxarifado_id bigint, | |
858 | + baixaremocao_id bigint, | |
859 | + materialconsumo_id bigint, | |
860 | + CONSTRAINT alm_bx_item_pkey PRIMARY KEY (id), | |
861 | + CONSTRAINT fk_3xs5ark9djrpghnk3vf07whxg FOREIGN KEY (baixaalmoxarifado_id) | |
862 | + REFERENCES alm_baixa (id) MATCH SIMPLE | |
863 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
864 | + CONSTRAINT fk_43k9gp25kqh95gyl84hnq30h FOREIGN KEY (baixaremocao_id) | |
865 | + REFERENCES alm_baixa (id) MATCH SIMPLE | |
866 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
867 | + CONSTRAINT fk_4rak32nl2kradw0c3p24shf1h FOREIGN KEY (materialconsumo_id) | |
868 | + REFERENCES alm_materialconsumo (id) MATCH SIMPLE | |
869 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
870 | + CONSTRAINT fk_c2x028qwptoypbiofjchc8tj9 FOREIGN KEY (inativador_id) | |
871 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
872 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
873 | + CONSTRAINT fk_d11fqh0tlvnrkgc2b6iei9mdl FOREIGN KEY (autor_id) | |
874 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
875 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
876 | + CONSTRAINT fk_hnvjoomhkyt6imnufbnj36egp FOREIGN KEY (editor_id) | |
877 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
878 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
879 | +); | |
880 | + | |
881 | +CREATE TABLE alm_catalogomaterial | |
882 | +( | |
883 | + id bigint NOT NULL, | |
884 | + databloqueio date, | |
885 | + datainativo date, | |
886 | + datacriacao timestamp without time zone NOT NULL, | |
887 | + dataedicao timestamp without time zone NOT NULL, | |
888 | + version bigint, | |
889 | + datafim timestamp without time zone, | |
890 | + datainicio timestamp without time zone, | |
891 | + nome character varying(255), | |
892 | + inativador_id bigint, | |
893 | + autor_id bigint, | |
894 | + editor_id bigint, | |
895 | + organizacao_id bigint, | |
896 | + CONSTRAINT alm_catalogomaterial_pkey PRIMARY KEY (id), | |
897 | + CONSTRAINT fk_2dhpq4fa38jam1bbvu37swmyn FOREIGN KEY (editor_id) | |
898 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
899 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
900 | + CONSTRAINT fk_8xum7fb3ob6gqgbmwmayq5cyv FOREIGN KEY (inativador_id) | |
901 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
902 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
903 | + CONSTRAINT fk_e8t6p872p7je4i4q38h9mv16a FOREIGN KEY (autor_id) | |
904 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
905 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
906 | + CONSTRAINT fk_hxf5rf6v640v3o8d457j7w7e7 FOREIGN KEY (organizacao_id) | |
907 | + REFERENCES organizacao (id) MATCH SIMPLE | |
908 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
909 | +); | |
910 | + | |
911 | +CREATE TABLE alm_cm_item | |
912 | +( | |
913 | + id bigint NOT NULL, | |
914 | + databloqueio date, | |
915 | + datainativo date, | |
916 | + datacriacao timestamp without time zone NOT NULL, | |
917 | + dataedicao timestamp without time zone NOT NULL, | |
918 | + version bigint, | |
919 | + inativador_id bigint, | |
920 | + autor_id bigint, | |
921 | + editor_id bigint, | |
922 | + organizacao_id bigint, | |
923 | + catalogomaterial_id bigint NOT NULL, | |
924 | + materialconsumo_id bigint NOT NULL, | |
925 | + CONSTRAINT alm_cm_item_pkey PRIMARY KEY (id), | |
926 | + CONSTRAINT fk_bnp4h6goh04umd2lvtetul8nh FOREIGN KEY (inativador_id) | |
927 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
928 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
929 | + CONSTRAINT fk_c5g3uvmexica8ughd7ykgfi1j FOREIGN KEY (catalogomaterial_id) | |
930 | + REFERENCES alm_catalogomaterial (id) MATCH SIMPLE | |
931 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
932 | + CONSTRAINT fk_cbhwaadbh34310mryn6dq9li3 FOREIGN KEY (organizacao_id) | |
933 | + REFERENCES organizacao (id) MATCH SIMPLE | |
934 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
935 | + CONSTRAINT fk_du9lemgnqhg77avdhujvxaanv FOREIGN KEY (autor_id) | |
936 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
937 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
938 | + CONSTRAINT fk_epelrqf3aktttgvyv53y1mvp FOREIGN KEY (materialconsumo_id) | |
939 | + REFERENCES alm_materialconsumo (id) MATCH SIMPLE | |
940 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
941 | + CONSTRAINT fk_inuk562194dnsmj58vbr3j126 FOREIGN KEY (editor_id) | |
942 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
943 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
944 | +); | |
945 | + | |
946 | +CREATE TABLE alm_cm_undreqitem | |
947 | +( | |
948 | + id bigint NOT NULL, | |
949 | + databloqueio date, | |
950 | + datainativo date, | |
951 | + datacriacao timestamp without time zone NOT NULL, | |
952 | + dataedicao timestamp without time zone NOT NULL, | |
953 | + version bigint, | |
954 | + inativador_id bigint, | |
955 | + autor_id bigint, | |
956 | + editor_id bigint, | |
957 | + organizacao_id bigint, | |
958 | + catalogomaterial_id bigint NOT NULL, | |
959 | + unidaderequisitante_id bigint NOT NULL, | |
960 | + CONSTRAINT alm_cm_undreqitem_pkey PRIMARY KEY (id), | |
961 | + CONSTRAINT fk_294s488hbmpuepd6wfls4t3i9 FOREIGN KEY (inativador_id) | |
962 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
963 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
964 | + CONSTRAINT fk_5oc7drk4gya0nu35dwqyhdhkr FOREIGN KEY (catalogomaterial_id) | |
965 | + REFERENCES alm_catalogomaterial (id) MATCH SIMPLE | |
966 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
967 | + CONSTRAINT fk_akj8kbr08hp3129lks0835e9s FOREIGN KEY (unidaderequisitante_id) | |
968 | + REFERENCES estruturaorganizacional (id) MATCH SIMPLE | |
969 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
970 | + CONSTRAINT fk_bahetq98ci8w12tmolm070a8o FOREIGN KEY (editor_id) | |
971 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
972 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
973 | + CONSTRAINT fk_j2cmc135l6whf86wt0g1el3qy FOREIGN KEY (organizacao_id) | |
974 | + REFERENCES organizacao (id) MATCH SIMPLE | |
975 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
976 | + CONSTRAINT fk_scl46678vlyuwbyubforgplhc FOREIGN KEY (autor_id) | |
977 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
978 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
979 | +); | |
980 | + | |
981 | +CREATE TABLE alm_requisicaoconsumo | |
982 | +( | |
983 | + id bigint NOT NULL, | |
984 | + databloqueio date, | |
985 | + datainativo date, | |
986 | + datacriacao timestamp without time zone NOT NULL, | |
987 | + dataedicao timestamp without time zone NOT NULL, | |
988 | + version bigint, | |
989 | + datafinalizacaoatendimento timestamp without time zone, | |
990 | + datarequisicao timestamp without time zone, | |
991 | + numerorequisicao character varying(30), | |
992 | + inativador_id bigint, | |
993 | + autor_id bigint, | |
994 | + editor_id bigint, | |
995 | + organizacao_id bigint, | |
996 | + almoxarifado_id bigint NOT NULL, | |
997 | + centrocusto_id bigint, | |
998 | + tipostatusrequisicao_id bigint NOT NULL, | |
999 | + unidaderequisitante_id bigint NOT NULL, | |
1000 | + CONSTRAINT alm_requisicaoconsumo_pkey PRIMARY KEY (id), | |
1001 | + CONSTRAINT fk_2rtcpbfu6j54ytvkrb9jtohif FOREIGN KEY (tipostatusrequisicao_id) | |
1002 | + REFERENCES dominio (id) MATCH SIMPLE | |
1003 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1004 | + CONSTRAINT fk_ar232n8scv6owg2ydek8380ou FOREIGN KEY (unidaderequisitante_id) | |
1005 | + REFERENCES estruturaorganizacional (id) MATCH SIMPLE | |
1006 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1007 | + CONSTRAINT fk_e81qkn4fox1hsih8b3v0y8x8o FOREIGN KEY (autor_id) | |
1008 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1009 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1010 | + CONSTRAINT fk_k3tw6c49ngn8xxy1dk9fgm5vy FOREIGN KEY (centrocusto_id) | |
1011 | + REFERENCES centrocusto (id) MATCH SIMPLE | |
1012 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1013 | + CONSTRAINT fk_ovunox81s57l0s2675w50yen FOREIGN KEY (organizacao_id) | |
1014 | + REFERENCES organizacao (id) MATCH SIMPLE | |
1015 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1016 | + CONSTRAINT fk_qpembuodsqupq67fdugrb0a53 FOREIGN KEY (almoxarifado_id) | |
1017 | + REFERENCES estruturaorganizacional (id) MATCH SIMPLE | |
1018 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1019 | + CONSTRAINT fk_rdap15k23q9l952qvjtwtm4h3 FOREIGN KEY (editor_id) | |
1020 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1021 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1022 | + CONSTRAINT fk_tcwvovj7uyyajiss78og4w1lf FOREIGN KEY (inativador_id) | |
1023 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1024 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
1025 | +); | |
1026 | + | |
1027 | +CREATE TABLE alm_devolucao | |
1028 | +( | |
1029 | + id bigint NOT NULL, | |
1030 | + databloqueio date, | |
1031 | + datainativo date, | |
1032 | + datacriacao timestamp without time zone NOT NULL, | |
1033 | + dataedicao timestamp without time zone NOT NULL, | |
1034 | + version bigint, | |
1035 | + codigo character varying(30), | |
1036 | + datadevolucao timestamp without time zone, | |
1037 | + justificativa character varying(500), | |
1038 | + inativador_id bigint, | |
1039 | + autor_id bigint, | |
1040 | + editor_id bigint, | |
1041 | + organizacao_id bigint, | |
1042 | + requisicao_id bigint NOT NULL, | |
1043 | + CONSTRAINT alm_devolucao_pkey PRIMARY KEY (id), | |
1044 | + CONSTRAINT fk_a0kk8jgf5w6gmv3fohw54ku5w FOREIGN KEY (organizacao_id) | |
1045 | + REFERENCES organizacao (id) MATCH SIMPLE | |
1046 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1047 | + CONSTRAINT fk_d63k1orwwrgpixvku8y6v0yqy FOREIGN KEY (autor_id) | |
1048 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1049 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1050 | + CONSTRAINT fk_edejl58jex7jfs18ue1ih1hir FOREIGN KEY (inativador_id) | |
1051 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1052 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1053 | + CONSTRAINT fk_h6xpqvti46xu1kqsqxra3lv2a FOREIGN KEY (editor_id) | |
1054 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1055 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1056 | + CONSTRAINT fk_idi0ykj68jgaen3msqtfvy8pd FOREIGN KEY (requisicao_id) | |
1057 | + REFERENCES alm_requisicaoconsumo (id) MATCH SIMPLE | |
1058 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
1059 | +); | |
1060 | + | |
1061 | +CREATE TABLE alm_dev_documento | |
1062 | +( | |
1063 | + id bigint NOT NULL, | |
1064 | + devolucao_id bigint, | |
1065 | + devolucaoinativo_id bigint, | |
1066 | + CONSTRAINT alm_dev_documento_pkey PRIMARY KEY (id), | |
1067 | + CONSTRAINT fk_jiakoxluai4y62voc6hpdpjw9 FOREIGN KEY (id) | |
1068 | + REFERENCES documento (id) MATCH SIMPLE | |
1069 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1070 | + CONSTRAINT fk_l782dfs40d95akv2qqlyplipc FOREIGN KEY (devolucao_id) | |
1071 | + REFERENCES alm_devolucao (id) MATCH SIMPLE | |
1072 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1073 | + CONSTRAINT fk_qtgqs6flkp5apqvj069rj77u6 FOREIGN KEY (devolucaoinativo_id) | |
1074 | + REFERENCES alm_devolucao (id) MATCH SIMPLE | |
1075 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
1076 | +); | |
1077 | + | |
1078 | +CREATE TABLE alm_dev_item | |
1079 | +( | |
1080 | + id bigint NOT NULL, | |
1081 | + databloqueio date, | |
1082 | + datainativo date, | |
1083 | + datacriacao timestamp without time zone NOT NULL, | |
1084 | + dataedicao timestamp without time zone NOT NULL, | |
1085 | + version bigint, | |
1086 | + quantidade numeric(19,2), | |
1087 | + inativador_id bigint, | |
1088 | + autor_id bigint, | |
1089 | + editor_id bigint, | |
1090 | + organizacao_id bigint, | |
1091 | + devolucao_id bigint NOT NULL, | |
1092 | + materialconsumo_id bigint NOT NULL, | |
1093 | + CONSTRAINT alm_dev_item_pkey PRIMARY KEY (id), | |
1094 | + CONSTRAINT fk_55xrqu0r4hurduwvvih7d0y26 FOREIGN KEY (autor_id) | |
1095 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1096 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1097 | + CONSTRAINT fk_5llj4rnuytri0v3ocn79f1mal FOREIGN KEY (materialconsumo_id) | |
1098 | + REFERENCES alm_materialconsumo (id) MATCH SIMPLE | |
1099 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1100 | + CONSTRAINT fk_81jtiv200et09uag46xocbqeq FOREIGN KEY (devolucao_id) | |
1101 | + REFERENCES alm_devolucao (id) MATCH SIMPLE | |
1102 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1103 | + CONSTRAINT fk_hwts3vbywpijv5k3gx9788xpw FOREIGN KEY (editor_id) | |
1104 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1105 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1106 | + CONSTRAINT fk_nxs5alywm29dc1f4n8ub4kp66 FOREIGN KEY (organizacao_id) | |
1107 | + REFERENCES organizacao (id) MATCH SIMPLE | |
1108 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1109 | + CONSTRAINT fk_sulau6l09s8xrduwxqyjoxmi2 FOREIGN KEY (inativador_id) | |
1110 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1111 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
1112 | +); | |
1113 | + | |
1114 | +CREATE TABLE alm_dev_observacao | |
1115 | +( | |
1116 | + id bigint NOT NULL, | |
1117 | + devolucao_id bigint NOT NULL, | |
1118 | + CONSTRAINT alm_dev_observacao_pkey PRIMARY KEY (id), | |
1119 | + CONSTRAINT fk_7smn823j6x5na4q53k7k96we3 FOREIGN KEY (id) | |
1120 | + REFERENCES observacao (id) MATCH SIMPLE | |
1121 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1122 | + CONSTRAINT fk_cuy6rqe0sod94y0kcjf04iqxv FOREIGN KEY (devolucao_id) | |
1123 | + REFERENCES alm_devolucao (id) MATCH SIMPLE | |
1124 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
1125 | +); | |
1126 | + | |
1127 | +CREATE TABLE alm_eo_almoxarifado | |
1128 | +( | |
1129 | + id bigint NOT NULL, | |
1130 | + databloqueio date, | |
1131 | + datainativo date, | |
1132 | + datacriacao timestamp without time zone NOT NULL, | |
1133 | + dataedicao timestamp without time zone NOT NULL, | |
1134 | + version bigint, | |
1135 | + diasrequisicao character varying(255), | |
1136 | + isalmoxarifado boolean, | |
1137 | + isalmoxarifadopadrao boolean, | |
1138 | + isundconsumidorarequisitante boolean, | |
1139 | + inativador_id bigint, | |
1140 | + autor_id bigint, | |
1141 | + editor_id bigint, | |
1142 | + centrocusto_id bigint, | |
1143 | + estruturaorganizacional_id bigint NOT NULL, | |
1144 | + CONSTRAINT alm_eo_almoxarifado_pkey PRIMARY KEY (id), | |
1145 | + CONSTRAINT fk_1a0puuipc4ocvdbq4h39fe3a6 FOREIGN KEY (centrocusto_id) | |
1146 | + REFERENCES centrocusto (id) MATCH SIMPLE | |
1147 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1148 | + CONSTRAINT fk_76mfsc24itxa4n5g1jtpesev1 FOREIGN KEY (estruturaorganizacional_id) | |
1149 | + REFERENCES estruturaorganizacional (id) MATCH SIMPLE | |
1150 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1151 | + CONSTRAINT fk_8getuf8eb63hauqr11k7tcw73 FOREIGN KEY (inativador_id) | |
1152 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1153 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1154 | + CONSTRAINT fk_d17lg502rqbgl26obix1bq2ho FOREIGN KEY (autor_id) | |
1155 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1156 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1157 | + CONSTRAINT fk_sd63g4y6t38ewo1v7m2s7vmbs FOREIGN KEY (editor_id) | |
1158 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1159 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1160 | + CONSTRAINT uk_76mfsc24itxa4n5g1jtpesev1 UNIQUE (estruturaorganizacional_id) | |
1161 | +); | |
1162 | + | |
1163 | +INSERT INTO alm_eo_almoxarifado(id, databloqueio, datainativo, datacriacao, dataedicao, version, diasrequisicao, isalmoxarifado, isalmoxarifadopadrao, isundconsumidorarequisitante, | |
1164 | + inativador_id, autor_id, editor_id, centrocusto_id, estruturaorganizacional_id) | |
1165 | + SELECT alm.id, alm.databloqueio, alm.datainativo, alm.datacriacao, alm.dataedicao, alm.version, alm.diasrequisicao, alm.isalmoxarifado, alm.isalmoxarifadopadrao, alm.isundconsumidorarequisitante, | |
1166 | + alm.inativador_id, alm.autor_id, alm.editor_id, alm.centrocusto_id, alm.estruturaorganizacional_id | |
1167 | + FROM estruturaorganizacionalalmox AS alm; | |
1168 | + | |
1169 | +DROP TABLE estruturaorganizacionalalmox; | |
1170 | + | |
1171 | +CREATE TABLE alm_mc_unidmedidaentrada | |
1172 | +( | |
1173 | + id bigint NOT NULL, | |
1174 | + databloqueio date, | |
1175 | + datainativo date, | |
1176 | + inativador_id bigint, | |
1177 | + materialconsumo_id bigint, | |
1178 | + materialconsumoremocao_id bigint, | |
1179 | + unidademedida_id bigint NOT NULL, | |
1180 | + CONSTRAINT alm_mc_unidmedidaentrada_pkey PRIMARY KEY (id), | |
1181 | + CONSTRAINT fk_dhm8t4yhha7dqv7pyyppbttkx FOREIGN KEY (unidademedida_id) | |
1182 | + REFERENCES unidademedida (id) MATCH SIMPLE | |
1183 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1184 | + CONSTRAINT fk_e04vl07hegumg3lodcu7g5bj8 FOREIGN KEY (materialconsumoremocao_id) | |
1185 | + REFERENCES alm_materialconsumo (id) MATCH SIMPLE | |
1186 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1187 | + CONSTRAINT fk_ja5nq76b6hs5wcdol4m5k38cj FOREIGN KEY (materialconsumo_id) | |
1188 | + REFERENCES alm_materialconsumo (id) MATCH SIMPLE | |
1189 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1190 | + CONSTRAINT fk_tou1ikcim2a2qec4bqr9gwp1v FOREIGN KEY (inativador_id) | |
1191 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1192 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
1193 | +); | |
1194 | + | |
1195 | +CREATE TABLE alm_mc_unidmedidaentrada_aud | |
1196 | +( | |
1197 | + id bigint NOT NULL, | |
1198 | + rev integer NOT NULL, | |
1199 | + revtype smallint, | |
1200 | + databloqueio date, | |
1201 | + datainativo date, | |
1202 | + materialconsumo_id bigint, | |
1203 | + materialconsumoremocao_id bigint, | |
1204 | + unidademedida_id bigint, | |
1205 | + CONSTRAINT alm_mc_unidmedidaentrada_aud_pkey PRIMARY KEY (id, rev) | |
1206 | +); | |
1207 | + | |
1208 | +CREATE TABLE alm_not_res_grupo | |
1209 | +( | |
1210 | + id bigint NOT NULL, | |
1211 | + databloqueio date, | |
1212 | + datainativo date, | |
1213 | + datacriacao timestamp without time zone NOT NULL, | |
1214 | + dataedicao timestamp without time zone NOT NULL, | |
1215 | + version bigint, | |
1216 | + inativador_id bigint, | |
1217 | + autor_id bigint, | |
1218 | + editor_id bigint, | |
1219 | + organizacao_id bigint, | |
1220 | + confignotificaressuprimento_id bigint, | |
1221 | + confignotificaressupremocao_id bigint, | |
1222 | + grupo_id bigint, | |
1223 | + CONSTRAINT alm_not_res_grupo_pkey PRIMARY KEY (id), | |
1224 | + CONSTRAINT fk_5i7ncxc578f98qp4iibtpnlmf FOREIGN KEY (confignotificaressuprimento_id) | |
1225 | + REFERENCES alm_not_ressuprimento (id) MATCH SIMPLE | |
1226 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1227 | + CONSTRAINT fk_8bm0o79i0mtdefjyjmddtlby4 FOREIGN KEY (inativador_id) | |
1228 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1229 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1230 | + CONSTRAINT fk_9y9ruw57i1i93qmxir7k1rnml FOREIGN KEY (confignotificaressupremocao_id) | |
1231 | + REFERENCES alm_not_ressuprimento (id) MATCH SIMPLE | |
1232 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1233 | + CONSTRAINT fk_c73ivikehs0i74nxihuk2rx08 FOREIGN KEY (organizacao_id) | |
1234 | + REFERENCES organizacao (id) MATCH SIMPLE | |
1235 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1236 | + CONSTRAINT fk_fvsnovw6rgkxxwg6ikrokqype FOREIGN KEY (grupo_id) | |
1237 | + REFERENCES grupo (id) MATCH SIMPLE | |
1238 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1239 | + CONSTRAINT fk_g939p30f7u1ghsurabnfkj1lc FOREIGN KEY (editor_id) | |
1240 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1241 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1242 | + CONSTRAINT fk_nnevrmdpskh6sh10ktwyiiq31 FOREIGN KEY (autor_id) | |
1243 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1244 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
1245 | +); | |
1246 | + | |
1247 | +CREATE TABLE alm_not_res_usuario | |
1248 | +( | |
1249 | + id bigint NOT NULL, | |
1250 | + databloqueio date, | |
1251 | + datainativo date, | |
1252 | + datacriacao timestamp without time zone NOT NULL, | |
1253 | + dataedicao timestamp without time zone NOT NULL, | |
1254 | + version bigint, | |
1255 | + inativador_id bigint, | |
1256 | + autor_id bigint, | |
1257 | + editor_id bigint, | |
1258 | + organizacao_id bigint, | |
1259 | + confignotificaressuprimento_id bigint, | |
1260 | + confignotificaressupremocao_id bigint, | |
1261 | + usuario_id bigint NOT NULL, | |
1262 | + CONSTRAINT alm_not_res_usuario_pkey PRIMARY KEY (id), | |
1263 | + CONSTRAINT fk_52tg7hip8g3qgsinkgf0b3e4 FOREIGN KEY (inativador_id) | |
1264 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1265 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1266 | + CONSTRAINT fk_e3m1xqkl5yvn074w024l1qpp2 FOREIGN KEY (usuario_id) | |
1267 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1268 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1269 | + CONSTRAINT fk_ey9q0b7ndugyy40i2o7udg4rp FOREIGN KEY (confignotificaressuprimento_id) | |
1270 | + REFERENCES alm_not_ressuprimento (id) MATCH SIMPLE | |
1271 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1272 | + CONSTRAINT fk_lyr3ju29kp99yav6t2qn9um1r FOREIGN KEY (organizacao_id) | |
1273 | + REFERENCES organizacao (id) MATCH SIMPLE | |
1274 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1275 | + CONSTRAINT fk_ns1p5keyn8j5clpllpcnmne1n FOREIGN KEY (confignotificaressupremocao_id) | |
1276 | + REFERENCES alm_not_ressuprimento (id) MATCH SIMPLE | |
1277 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1278 | + CONSTRAINT fk_q5151hj1hkal163spejidd6q FOREIGN KEY (autor_id) | |
1279 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1280 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1281 | + CONSTRAINT fk_ro30in3erb0p8jpwi65nrodq4 FOREIGN KEY (editor_id) | |
1282 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1283 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
1284 | +); | |
1285 | + | |
1286 | +CREATE TABLE alm_rc_item | |
1287 | +( | |
1288 | + id bigint NOT NULL, | |
1289 | + databloqueio date, | |
1290 | + datainativo date, | |
1291 | + datacriacao timestamp without time zone NOT NULL, | |
1292 | + dataedicao timestamp without time zone NOT NULL, | |
1293 | + version bigint, | |
1294 | + quantidade numeric(19,2), | |
1295 | + quantidadeatendida numeric(19,2), | |
1296 | + quantidadedevolvida numeric(19,2), | |
1297 | + inativador_id bigint, | |
1298 | + autor_id bigint, | |
1299 | + editor_id bigint, | |
1300 | + organizacao_id bigint, | |
1301 | + materialconsumo_id bigint NOT NULL, | |
1302 | + requisicaoconsumo_id bigint NOT NULL, | |
1303 | + CONSTRAINT alm_rc_item_pkey PRIMARY KEY (id), | |
1304 | + CONSTRAINT fk_3c8qistprafue9af90477bhme FOREIGN KEY (organizacao_id) | |
1305 | + REFERENCES organizacao (id) MATCH SIMPLE | |
1306 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1307 | + CONSTRAINT fk_c99x6hnjkd5usbsbou4qe40jo FOREIGN KEY (materialconsumo_id) | |
1308 | + REFERENCES alm_materialconsumo (id) MATCH SIMPLE | |
1309 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1310 | + CONSTRAINT fk_e20htn00lsgfi01p2gvrpdayt FOREIGN KEY (inativador_id) | |
1311 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1312 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1313 | + CONSTRAINT fk_l5qufoktjn1lq4qnkv4le13rj FOREIGN KEY (requisicaoconsumo_id) | |
1314 | + REFERENCES alm_requisicaoconsumo (id) MATCH SIMPLE | |
1315 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1316 | + CONSTRAINT fk_oqoo2q47mdi9lbeh99kmxjyis FOREIGN KEY (editor_id) | |
1317 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1318 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1319 | + CONSTRAINT fk_trrimun78xirbwnn8pdnnn1kj FOREIGN KEY (autor_id) | |
1320 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1321 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
1322 | +); | |
1323 | + | |
1324 | +CREATE TABLE alm_rc_observacao | |
1325 | +( | |
1326 | + id bigint NOT NULL, | |
1327 | + requisicaoconsumo_id bigint NOT NULL, | |
1328 | + CONSTRAINT alm_rc_observacao_pkey PRIMARY KEY (id), | |
1329 | + CONSTRAINT fk_1cd9vgprga28bm3go715m3eas FOREIGN KEY (id) | |
1330 | + REFERENCES observacao (id) MATCH SIMPLE | |
1331 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1332 | + CONSTRAINT fk_4cq3urvskeegc6dpjl86r96s2 FOREIGN KEY (requisicaoconsumo_id) | |
1333 | + REFERENCES alm_requisicaoconsumo (id) MATCH SIMPLE | |
1334 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
1335 | +); | |
1336 | + | |
1337 | +CREATE TABLE alm_rc_atendimento | |
1338 | +( | |
1339 | + id bigint NOT NULL, | |
1340 | + databloqueio date, | |
1341 | + datainativo date, | |
1342 | + datacriacao timestamp without time zone NOT NULL, | |
1343 | + dataedicao timestamp without time zone NOT NULL, | |
1344 | + version bigint, | |
1345 | + dataatendimento timestamp without time zone, | |
1346 | + numeroatendimento character varying(30), | |
1347 | + inativador_id bigint, | |
1348 | + autor_id bigint, | |
1349 | + editor_id bigint, | |
1350 | + organizacao_id bigint, | |
1351 | + requisicaoconsumo_id bigint NOT NULL, | |
1352 | + CONSTRAINT alm_rc_atendimento_pkey PRIMARY KEY (id), | |
1353 | + CONSTRAINT fk_7prcgcdeydc36hqgc9evkyodf FOREIGN KEY (requisicaoconsumo_id) | |
1354 | + REFERENCES alm_requisicaoconsumo (id) MATCH SIMPLE | |
1355 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1356 | + CONSTRAINT fk_bwo6wjnhmt3fpc5fnoq0rmv92 FOREIGN KEY (organizacao_id) | |
1357 | + REFERENCES organizacao (id) MATCH SIMPLE | |
1358 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1359 | + CONSTRAINT fk_c4ntew46noy16bo4yu2rh66tt FOREIGN KEY (editor_id) | |
1360 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1361 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1362 | + CONSTRAINT fk_j1ifnut4jmt2r73xmtqdkv4h2 FOREIGN KEY (inativador_id) | |
1363 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1364 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1365 | + CONSTRAINT fk_phc5l7oaasb3ym7cloij4lxv FOREIGN KEY (autor_id) | |
1366 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1367 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
1368 | +); | |
1369 | + | |
1370 | +CREATE TABLE alm_rc_atendimentoitem | |
1371 | +( | |
1372 | + id bigint NOT NULL, | |
1373 | + databloqueio date, | |
1374 | + datainativo date, | |
1375 | + datacriacao timestamp without time zone NOT NULL, | |
1376 | + dataedicao timestamp without time zone NOT NULL, | |
1377 | + version bigint, | |
1378 | + quantidade numeric(19,2), | |
1379 | + inativador_id bigint, | |
1380 | + autor_id bigint, | |
1381 | + editor_id bigint, | |
1382 | + organizacao_id bigint, | |
1383 | + atendimentoreqconsumo_id bigint NOT NULL, | |
1384 | + material_id bigint NOT NULL, | |
1385 | + requisicaoconsumoitem_id bigint NOT NULL, | |
1386 | + CONSTRAINT alm_rc_atendimentoitem_pkey PRIMARY KEY (id), | |
1387 | + CONSTRAINT fk_11fyc09hkikfrmktr7gxyduiy FOREIGN KEY (requisicaoconsumoitem_id) | |
1388 | + REFERENCES alm_rc_item (id) MATCH SIMPLE | |
1389 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1390 | + CONSTRAINT fk_6d4f0998i3ylo9n0p3db5yi4i FOREIGN KEY (autor_id) | |
1391 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1392 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1393 | + CONSTRAINT fk_a7putli22w7uxwjfcle7s3h8f FOREIGN KEY (inativador_id) | |
1394 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1395 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1396 | + CONSTRAINT fk_hhpk649se8vba32soog3esf2l FOREIGN KEY (atendimentoreqconsumo_id) | |
1397 | + REFERENCES alm_rc_atendimento (id) MATCH SIMPLE | |
1398 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1399 | + CONSTRAINT fk_jh7bb6ukkhhw29nc6kemyxiv2 FOREIGN KEY (editor_id) | |
1400 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1401 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1402 | + CONSTRAINT fk_or46npdrk4b7cxqn57scgitqt FOREIGN KEY (material_id) | |
1403 | + REFERENCES alm_materialconsumo (id) MATCH SIMPLE | |
1404 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1405 | + CONSTRAINT fk_pvuivwxu1td48cm0ciku678hn FOREIGN KEY (organizacao_id) | |
1406 | + REFERENCES organizacao (id) MATCH SIMPLE | |
1407 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
1408 | +); | |
1409 | + | |
1410 | +CREATE TABLE mat_matpermanenteconsumo | |
1411 | +( | |
1412 | + id bigint NOT NULL, | |
1413 | + databloqueio date, | |
1414 | + datainativo date, | |
1415 | + datacriacao timestamp without time zone NOT NULL, | |
1416 | + dataedicao timestamp without time zone NOT NULL, | |
1417 | + version bigint, | |
1418 | + inativador_id bigint, | |
1419 | + autor_id bigint, | |
1420 | + editor_id bigint, | |
1421 | + materialconsumo_id bigint, | |
1422 | + materialpermanente_id bigint, | |
1423 | + CONSTRAINT mat_matpermanenteconsumo_pkey PRIMARY KEY (id), | |
1424 | + CONSTRAINT fk_33w5ws6st88qm6jxro6dc64jf FOREIGN KEY (editor_id) | |
1425 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1426 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1427 | + CONSTRAINT fk_dk8utoxs4y4j7gl2wfefs671u FOREIGN KEY (inativador_id) | |
1428 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1429 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1430 | + CONSTRAINT fk_gl4xp5c57fd6h9s4tm8vts7lv FOREIGN KEY (materialconsumo_id) | |
1431 | + REFERENCES alm_materialconsumo (id) MATCH SIMPLE | |
1432 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1433 | + CONSTRAINT fk_hculumamc3oxvv8bjj1lywpea FOREIGN KEY (materialpermanente_id) | |
1434 | + REFERENCES materialpermanente (id) MATCH SIMPLE | |
1435 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1436 | + CONSTRAINT fk_olx53p76qqit7vcxis44iu2xp FOREIGN KEY (autor_id) | |
1437 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1438 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
1439 | +); | |
1440 | + | |
1441 | +CREATE TABLE mat_matpermanenteconsumo_aud | |
1442 | +( | |
1443 | + id bigint NOT NULL, | |
1444 | + rev integer NOT NULL, | |
1445 | + revtype smallint, | |
1446 | + databloqueio date, | |
1447 | + datainativo date, | |
1448 | + datacriacao timestamp without time zone, | |
1449 | + dataedicao timestamp without time zone, | |
1450 | + autor_id bigint, | |
1451 | + editor_id bigint, | |
1452 | + materialconsumo_id bigint, | |
1453 | + materialpermanente_id bigint, | |
1454 | + CONSTRAINT mat_matpermanenteconsumo_aud_pkey PRIMARY KEY (id, rev) | |
1455 | +); | |
1456 | + | |
1457 | +DELETE FROM materialcaracteristica WHERE material_id IN (SELECT id FROM material WHERE dominiotipomaterial_id = (SELECT id FROM dominio WHERE chave = 'tipoMaterial' AND codigo = 1)); | |
1458 | +DELETE FROM material WHERE dominiotipomaterial_id = (SELECT id FROM dominio WHERE chave = 'tipoMaterial' AND codigo = 1); | |
1459 | + | |
1460 | +DELETE FROM contacontabilmovimento WHERE entrada_id NOT IN (SELECT id FROM entradapatrimonio); | |
1461 | +DELETE FROM entradaobservacao WHERE entrada_id NOT IN (SELECT id FROM entradapatrimonio); | |
1462 | +DELETE FROM entradadocumento WHERE entrada_id IS NOT null AND entrada_id NOT IN (SELECT id FROM entradapatrimonio); | |
1463 | +DELETE FROM entradadocumento WHERE entrada_id IS NOT null AND entradainativo_id NOT IN (SELECT id FROM entradapatrimonio); | |
1464 | +DELETE FROM entrada WHERE id NOT IN (SELECT id FROM entradapatrimonio); | |
1465 | + | |
1466 | +-- GEOVANE FIM 04/05/2016 | |
1467 | + | |
1468 | +-- ERICK INICIO 04/05/2016 | |
1469 | + | |
1470 | +INSERT INTO menufile (id, datacriacao, dataedicao, version, ativo, caminho, dominiomenufile_id, menu_id) | |
1471 | +VALUES (NEXTVAL('hibernate_sequence'), LOCALTIMESTAMP, LOCALTIMESTAMP, 0, true, '/cit-almoxarifado-web/assets/js/angular/custom/repository/MaterialEnderecoEstoqueRepository.js', | |
1472 | + (SELECT id FROM dominio WHERE chave = 'tipoFile' AND codigo = 2), (SELECT id FROM menu WHERE chave = 'USUARIO')); | |
1473 | + | |
1474 | +INSERT INTO menufile (id, datacriacao, dataedicao, version, ativo, caminho, dominiomenufile_id, menu_id) | |
1475 | +VALUES (NEXTVAL('hibernate_sequence'), LOCALTIMESTAMP, LOCALTIMESTAMP, 0, true, '/cit-almoxarifado-web/assets/js/angular/custom/repository/MaterialEnderecoEstoqueRepository.min.js', | |
1476 | + (SELECT id FROM dominio WHERE chave = 'tipoFile' AND codigo = 2), (SELECT id FROM menu WHERE chave = 'USUARIO')); | |
1477 | + | |
1478 | +INSERT INTO menufile (id, datacriacao, dataedicao, version, ativo, caminho, dominiomenufile_id, menu_id) | |
1479 | +VALUES (NEXTVAL('hibernate_sequence'), LOCALTIMESTAMP, LOCALTIMESTAMP, 0, true, '/cit-almoxarifado-web/assets/js/angular/custom/repository/MaterialLocalEstoqueRepository.js', | |
1480 | + (SELECT id FROM dominio WHERE chave = 'tipoFile' AND codigo = 2), (SELECT id FROM menu WHERE chave = 'USUARIO')); | |
1481 | + | |
1482 | +INSERT INTO menufile (id, datacriacao, dataedicao, version, ativo, caminho, dominiomenufile_id, menu_id) | |
1483 | +VALUES (NEXTVAL('hibernate_sequence'), LOCALTIMESTAMP, LOCALTIMESTAMP, 0, true, '/cit-almoxarifado-web/assets/js/angular/custom/repository/MaterialLocalEstoqueRepository.min.js', | |
1484 | + (SELECT id FROM dominio WHERE chave = 'tipoFile' AND codigo = 2), (SELECT id FROM menu WHERE chave = 'USUARIO')); | |
1485 | + | |
1486 | + | |
1487 | +ALTER TABLE alm_me_localestoque ALTER COLUMN unidadeMedidaEntrada_id DROP NOT NULL; | |
1488 | +ALTER TABLE alm_me_localestoque ADD COLUMN localPrincipal BOOLEAN; | |
1489 | + | |
1490 | +ALTER TABLE alm_me_localestoque_aud ADD COLUMN localPrincipal BOOLEAN; | |
1491 | + | |
1492 | +ALTER TABLE alm_me_localestoque DROP CONSTRAINT uk_jsrcjmbvm7pnw3ql1hoiyhamj; | |
1493 | +ALTER TABLE alm_me_localestoque DROP CONSTRAINT uk_qnx0r3sv9yxte5bholpq15k4p; | |
1494 | +-- ERICK FIM 04/05/2016 | |
1495 | + | |
1496 | +-- JOYFAS INICIO 06/05/16 | |
1497 | +alter table alm_mc_unidmedidaentrada add isPadrao boolean; | |
1498 | + | |
1499 | +alter table alm_mc_unidmedidaentrada_aud add isPadrao boolean; | |
1500 | +-- JOYFAS FIM 06/05/16 | |
1501 | + | |
1502 | +-- THIAGO INICIO 09/05/2016 | |
1503 | +delete from menufile where menu_id = (select id from menu where chave = 'UNIDADE_DE_MEDIDA'); | |
1504 | +delete from menugrupo where menu_id = (select id from menu where chave = 'UNIDADE_DE_MEDIDA') OR menuremocao_id = (select id from menu where chave = 'UNIDADE_DE_MEDIDA'); | |
1505 | +delete from menu where chave = 'UNIDADE_DE_MEDIDA'; | |
1506 | +delete from pagina where nome = 'Unidade de medida'; | |
1507 | +-- THIAGO FIM 09/05/2016 | |
1508 | + | |
1509 | + | |
1510 | +-- Erick INICIO 09/05/2016 | |
1511 | + | |
1512 | +INSERT INTO menufile (id, datacriacao, dataedicao, version, ativo, caminho, dominiomenufile_id, menu_id) | |
1513 | +VALUES (NEXTVAL('hibernate_sequence'), LOCALTIMESTAMP, LOCALTIMESTAMP, 0, true, '/cit-almoxarifado-web/assets/js/angular/custom/repository/TransferenciaEnderecoEstoqueRepository.js', | |
1514 | + (SELECT id FROM dominio WHERE chave = 'tipoFile' AND codigo = 2), (SELECT id FROM menu WHERE chave = 'USUARIO')); | |
1515 | + | |
1516 | +INSERT INTO menufile (id, datacriacao, dataedicao, version, ativo, caminho, dominiomenufile_id, menu_id) | |
1517 | +VALUES (NEXTVAL('hibernate_sequence'), LOCALTIMESTAMP, LOCALTIMESTAMP, 0, true, '/cit-almoxarifado-web/assets/js/angular/custom/repository/TransferenciaEnderecoEstoqueRepository.min.js', | |
1518 | + (SELECT id FROM dominio WHERE chave = 'tipoFile' AND codigo = 2), (SELECT id FROM menu WHERE chave = 'USUARIO')); | |
1519 | + | |
1520 | +ALTER TABLE alm_me_localestoque ADD COLUMN capacidade NUMERIC(19,2); | |
1521 | + | |
1522 | +CREATE TABLE alm_ee_transferencia | |
1523 | +( | |
1524 | + id bigint NOT NULL, | |
1525 | + databloqueio date, | |
1526 | + datainativo date, | |
1527 | + datacriacao timestamp without time zone NOT NULL, | |
1528 | + dataedicao timestamp without time zone NOT NULL, | |
1529 | + version bigint, | |
1530 | + datatransferencia timestamp without time zone NOT NULL, | |
1531 | + quantidade numeric(19,2), | |
1532 | + inativador_id bigint, | |
1533 | + autor_id bigint, | |
1534 | + editor_id bigint, | |
1535 | + organizacao_id bigint, | |
1536 | + almoxarifado_id bigint NOT NULL, | |
1537 | + enderecoestoquedestino_id bigint NOT NULL, | |
1538 | + enderecoestoqueorigem_id bigint NOT NULL, | |
1539 | + material_id bigint NOT NULL, | |
1540 | + CONSTRAINT alm_ee_transferencia_pkey PRIMARY KEY (id), | |
1541 | + CONSTRAINT fk_21a1us9qpemu3lgu5jbqdisgu FOREIGN KEY (organizacao_id) | |
1542 | + REFERENCES organizacao (id) MATCH SIMPLE | |
1543 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1544 | + CONSTRAINT fk_2b2rfe5o4p8j8sic2kmxay32m FOREIGN KEY (editor_id) | |
1545 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1546 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1547 | + CONSTRAINT fk_9a6wpagfkhydwsdbsxq8gqd3q FOREIGN KEY (inativador_id) | |
1548 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1549 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1550 | + CONSTRAINT fk_d6dff7rdhktoxacwlveu0w6to FOREIGN KEY (enderecoestoquedestino_id) | |
1551 | + REFERENCES alm_me_localestoque (id) MATCH SIMPLE | |
1552 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1553 | + CONSTRAINT fk_fdpifqxokpxfbeqjsh21as37d FOREIGN KEY (almoxarifado_id) | |
1554 | + REFERENCES estruturaorganizacional (id) MATCH SIMPLE | |
1555 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1556 | + CONSTRAINT fk_fl7mat880ri95y9qg6q0rdc7y FOREIGN KEY (autor_id) | |
1557 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
1558 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1559 | + CONSTRAINT fk_kfotr1rwotdhx4xjj38yj8l72 FOREIGN KEY (enderecoestoqueorigem_id) | |
1560 | + REFERENCES alm_me_localestoque (id) MATCH SIMPLE | |
1561 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1562 | + CONSTRAINT fk_tou1v0a8mfd68auhh7imc6vw6 FOREIGN KEY (material_id) | |
1563 | + REFERENCES alm_materialconsumo (id) MATCH SIMPLE | |
1564 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
1565 | + CONSTRAINT uk_tou1v0a8mfd68auhh7imc6vw6 UNIQUE (material_id) | |
1566 | +); | |
1567 | + | |
1568 | +CREATE TABLE alm_ee_transferencia_aud | |
1569 | +( | |
1570 | + id bigint NOT NULL, | |
1571 | + rev integer NOT NULL, | |
1572 | + revtype smallint, | |
1573 | + databloqueio date, | |
1574 | + datainativo date, | |
1575 | + datacriacao timestamp without time zone, | |
1576 | + dataedicao timestamp without time zone, | |
1577 | + datatransferencia timestamp without time zone, | |
1578 | + quantidade numeric(19,2), | |
1579 | + autor_id bigint, | |
1580 | + editor_id bigint, | |
1581 | + almoxarifado_id bigint, | |
1582 | + enderecoestoquedestino_id bigint, | |
1583 | + enderecoestoqueorigem_id bigint, | |
1584 | + material_id bigint, | |
1585 | + CONSTRAINT alm_ee_transferencia_aud_pkey PRIMARY KEY (id, rev) | |
1586 | +); | |
1587 | + | |
1588 | + | |
1589 | +-- RONAN INICIO 09/05/2016 -- | |
1590 | +ALTER TABLE alm_me_localestoque_aud ADD COLUMN capacidade NUMERIC(19,2); | |
1591 | + | |
1592 | +update pessoa set email = null where email = ' '; | |
1593 | +-- RONAN FIM 09/05/2016 | |
1594 | + | |
1595 | +-- ERick INICIO 10/05/2016 | |
1596 | +/* | |
1597 | + * SCRIPT PARA REMOVER TERMO RESPONSABILIDADE GERADO PELA TRANSFERENCIA E RESET DA NUMERACAO DO TERMO RESPONSABILIDADE | |
1598 | + * | |
1599 | + * DE ACORDO COM HALINE: | |
1600 | + * [16:24:25] Haline Moreira: deixa que eu controlo em qual cliente vamos rodar. | |
1601 | + * | |
1602 | + | |
1603 | +DELETE from TermoResponsabilidade where numerotermo ilike '2016%' AND TRANSFERENCIA_ID IS NOT NULL; | |
1604 | + | |
1605 | +DO $$ | |
1606 | +DECLARE | |
1607 | +r record; | |
1608 | +BEGIN | |
1609 | + | |
1610 | +FOR r IN | |
1611 | + select id, row_number() OVER (ORDER BY ID) AS num from TermoResponsabilidade where numerotermo ilike '2016%' | |
1612 | +LOOP | |
1613 | + update TermoResponsabilidade | |
1614 | + set numerotermo = '2016'||lpad(r.num::text, 6, '0') | |
1615 | + where id = r.id; | |
1616 | + | |
1617 | +END LOOP; | |
1618 | +END$$; | |
1619 | + | |
1620 | +*/ | |
1621 | +-- ERICK FIM 10/05/2016 | |
1622 | +-- GEOVANE 10/05/2016 | |
1623 | +ALTER TABLE alm_me_fifoitem DROP CONSTRAINT IF EXISTS uk_3pa241s7brr43ml1kgvlrb9e8; | |
1624 | + | |
1625 | +ALTER TABLE alm_me_fifoitem ADD COLUMN entradaitem_id bigint, | |
1626 | + ADD CONSTRAINT fk_fifoitem_entradaalmoxarifadoitem FOREIGN KEY (entradaitem_id) | |
1627 | + REFERENCES alm_en_entradaitem (id) MATCH SIMPLE | |
1628 | + ON UPDATE NO ACTION ON DELETE NO ACTION; | |
1629 | + | |
1630 | +ALTER TABLE alm_me_movimentoestoque ADD COLUMN materialestoqueinativo_id bigint, | |
1631 | + ADD CONSTRAINT fk_movimentoestoque_materialestoqueinativo FOREIGN KEY (materialestoqueinativo_id) | |
1632 | + REFERENCES alm_materialestoque (id) MATCH SIMPLE | |
1633 | + ON UPDATE NO ACTION ON DELETE NO ACTION; | |
1634 | + | |
1635 | +ALTER TABLE alm_me_movimentoestoque_aud ADD COLUMN materialestoqueinativo_id bigint; | |
1636 | + | |
1637 | +-- GEOVANE FIM 10/05/2016 | |
1638 | + | |
1639 | + | |
1640 | +-- RONAN INICIO 12/05/2016 | |
1641 | +update historicobempatrimonial hbp set codigooperacao = e.codigo | |
1642 | + from entrada e | |
1643 | + where e.id = hbp.idclassereferencia and hbp.codigooperacao is null | |
1644 | + and hbp.dominioclassereferencia_id = ( | |
1645 | + select id from dominio where chave = 'classeReferencia' and codigo = 1); | |
1646 | + | |
1647 | +update historicobempatrimonial hbp set codigooperacao = b.codigo | |
1648 | + from baixapatrimonio b | |
1649 | + where b.id = hbp.idclassereferencia and hbp.codigooperacao is null | |
1650 | + and hbp.dominioclassereferencia_id = ( | |
1651 | + select id from dominio where chave = 'classeReferencia' and codigo = 2); | |
1652 | + | |
1653 | +update historicobempatrimonial hbp set codigooperacao = t.codigo | |
1654 | + from transferencia t | |
1655 | + where t.id = hbp.idclassereferencia and hbp.codigooperacao is null | |
1656 | + and hbp.dominioclassereferencia_id in ( | |
1657 | + select id from dominio where chave = 'classeReferencia' and (codigo = 3 or codigo = 4)); | |
1658 | + | |
1659 | +update historicobempatrimonial hbp set codigooperacao = s.codigo | |
1660 | + from saidatemporaria s | |
1661 | + where s.id = hbp.idclassereferencia and hbp.codigooperacao is null | |
1662 | + and hbp.dominioclassereferencia_id = ( | |
1663 | + select id from dominio where chave = 'classeReferencia' and codigo = 9); | |
1664 | + | |
1665 | +update historicobempatrimonial hbp set codigooperacao = d.codigo | |
1666 | + from definicaodetentor d | |
1667 | + where d.id = hbp.idclassereferencia and hbp.codigooperacao is null | |
1668 | + and hbp.dominioclassereferencia_id = ( | |
1669 | + select id from dominio where chave = 'classeReferencia' and codigo = 10); | |
1670 | +-- RONAN FIM 12/05/2016 | |
1671 | + | |
1672 | +-- ERICK INICIO 12/05/2016 | |
1673 | + | |
1674 | +ALTER TABLE alm_ee_transferencia DROP CONSTRAINT fk_tou1v0a8mfd68auhh7imc6vw6; | |
1675 | +-- ERICK FIM 12/05/2016 | |
1676 | + | |
1677 | +-- GEOVANE INICIO 13/05/2016 | |
1678 | +ALTER TABLE alm_me_fifoitem_aud ADD COLUMN entradaitem_id bigint; | |
1679 | +-- GEOVANE FIM 13/05/2016 | |
1680 | + | |
1681 | +-- ERICK INICIO 12/05/2016 | |
1682 | + | |
1683 | +ALTER TABLE alm_ee_transferencia DROP CONSTRAINT uk_tou1v0a8mfd68auhh7imc6vw6; | |
1684 | +-- ERICK FIM 12/05/2016 | |
1685 | + | |
1686 | +-- GEOVANE INICIO 14/05/2016 | |
1687 | +ALTER TABLE alm_en_entradaitem ALTER COLUMN materiallocalestoque_id DROP NOT NULL; | |
1688 | +-- GEOVANE FIM 14/05/2016 | |
0 | 1689 | \ No newline at end of file | ... | ... |
cit-adm-materiais-web/src/main/java/br/com/centralit/controller/UnidadeMedidaController.java
... | ... | @@ -1,48 +0,0 @@ |
1 | -package br.com.centralit.controller; | |
2 | - | |
3 | -import java.util.Collection; | |
4 | - | |
5 | -import org.springframework.beans.factory.annotation.Autowired; | |
6 | -import org.springframework.stereotype.Controller; | |
7 | -import org.springframework.web.bind.annotation.RequestMapping; | |
8 | -import org.springframework.web.bind.annotation.RequestMethod; | |
9 | -import org.springframework.web.bind.annotation.ResponseBody; | |
10 | - | |
11 | -import br.com.centralit.api.framework.json.ViewsAdmMateriais; | |
12 | -import br.com.centralit.api.model.UnidadeMedida; | |
13 | -import br.com.centralit.api.service.UnidadeMedidaService; | |
14 | -import br.com.centralit.framework.controller.GenericController; | |
15 | -import br.com.centralit.framework.json.ResponseBodyWrapper; | |
16 | - | |
17 | -@Controller | |
18 | -@RequestMapping("/rest/unidadeMedida") | |
19 | -public class UnidadeMedidaController extends GenericController<UnidadeMedida>{ | |
20 | - | |
21 | - @Autowired | |
22 | - public UnidadeMedidaController(UnidadeMedidaService unidadeMedidaService) { | |
23 | - super(unidadeMedidaService); | |
24 | - } | |
25 | - | |
26 | - @RequestMapping(method = RequestMethod.GET, produces = "application/json") | |
27 | - @ResponseBody | |
28 | - public ResponseBodyWrapper getList() { | |
29 | - | |
30 | - Collection<UnidadeMedida> listaUnidadeMedidas = this.genericService.findAll(); | |
31 | - | |
32 | - ResponseBodyWrapper responseBody = new ResponseBodyWrapper(listaUnidadeMedidas, ViewsAdmMateriais.UnidadeMedidaListView.class); | |
33 | - | |
34 | - return responseBody; | |
35 | - } | |
36 | - | |
37 | - @Override | |
38 | - public Class<ViewsAdmMateriais.UnidadeMedidaEditView> getEditView() { | |
39 | - | |
40 | - return ViewsAdmMateriais.UnidadeMedidaEditView.class; | |
41 | - } | |
42 | - | |
43 | - @Override | |
44 | - public Class<ViewsAdmMateriais.UnidadeMedidaListView> getListView() { | |
45 | - | |
46 | - return ViewsAdmMateriais.UnidadeMedidaListView.class; | |
47 | - } | |
48 | -} |
cit-adm-materiais-web/src/main/java/br/com/centralit/listener/StartupListenerAdmMaterial.java
... | ... | @@ -28,43 +28,43 @@ import br.com.centralit.framework.model.UtilStartup; |
28 | 28 | * <p><b>Title: </b></p> |
29 | 29 | * |
30 | 30 | * <p><b>Description: </b></p> |
31 | - * | |
31 | + * | |
32 | 32 | * <p><b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a></p> |
33 | 33 | * |
34 | - * <p><b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a></p> | |
35 | - * | |
34 | + * <p><b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a></p> | |
35 | + * | |
36 | 36 | * @since 22/02/2016 - 09:30:08 |
37 | 37 | * |
38 | 38 | * @version 1.0.0 |
39 | 39 | * |
40 | 40 | * @author rogerio.cassimiro |
41 | - * | |
41 | + * | |
42 | 42 | */ |
43 | 43 | @Component |
44 | 44 | public class StartupListenerAdmMaterial extends UtilStartup implements ApplicationListener<ContextRefreshedEvent>{ |
45 | 45 | |
46 | 46 | @Autowired |
47 | 47 | DefaultFileService defaultFileService; |
48 | - | |
48 | + | |
49 | 49 | @Autowired |
50 | 50 | private DominioService dominioService; |
51 | - | |
51 | + | |
52 | 52 | @Autowired |
53 | 53 | private ModuloService moduloService; |
54 | - | |
54 | + | |
55 | 55 | @Autowired |
56 | 56 | private InternacionalizacaoService internacionalizacaoService; |
57 | - | |
57 | + | |
58 | 58 | @Override |
59 | 59 | public void onApplicationEvent(ContextRefreshedEvent event) { |
60 | - criarDominios(); | |
60 | + criarDominios(); | |
61 | 61 | criarDefaultFile(); |
62 | 62 | gerarInternacionalizacao(); |
63 | 63 | } |
64 | - | |
64 | + | |
65 | 65 | private void criarDominios() { |
66 | 66 | List<Dominio> list = new ArrayList<Dominio>(); |
67 | - | |
67 | + | |
68 | 68 | list.add(new Dominio("tipoBem", "Próprio contabilizado", "PROPRIO_CONTABILIZADO", 1L, Boolean.FALSE)); |
69 | 69 | list.add(new Dominio("tipoBem", "Próprio controlado", "PROPRIO_CONTROLADO", 2L, Boolean.FALSE)); |
70 | 70 | list.add(new Dominio("tipoBem", "De terceiros", "DE_TERCEIROS", 3L, Boolean.FALSE)); |
... | ... | @@ -115,6 +115,21 @@ public class StartupListenerAdmMaterial extends UtilStartup implements Applicati |
115 | 115 | list.add(new Dominio("tipoDepReavaliacaoReducao", "Dar entrada da depreciação acumulada", "ENTRADA_DEPRECIACAO_ACUMULADA", 2L, Boolean.FALSE)); |
116 | 116 | list.add(new Dominio("tipoMovReavaliacaoReducao", "Dar saida de valor antigo e entrada de valor novo", "SAIDA_VALOR_ANTIGO_ENTRADA_VALOR_NOVO", 1L, Boolean.FALSE)); |
117 | 117 | list.add(new Dominio("tipoMovReavaliacaoReducao", "Dar entrada/saida da diferença entre valor antigo e novo", "ENTRADA_SAIDA_DIFERENCA_ENTRE_VALORES", 2L, Boolean.FALSE)); |
118 | + list.add(new Dominio("classeReferencia", "Entrada", "ENTRADA", 1L, Boolean.FALSE)); | |
119 | + list.add(new Dominio("classeReferencia", "Entrada de materiais (Almoxarifado)", "ENTRADA_ALMOXARIFADO", 15L, Boolean.FALSE)); | |
120 | + list.add(new Dominio("classeReferencia", "Baixa", "BAIXA", 2L, Boolean.FALSE)); | |
121 | + list.add(new Dominio("classeReferencia", "Transferência Interna", "TRANSFERENCIA_INTERNA", 3L, Boolean.FALSE)); | |
122 | + list.add(new Dominio("classeReferencia", "Transferência entre contas contábeis", "TRANSFERENCIA_ENTRE_CONTAS", 4L, Boolean.FALSE)); | |
123 | + list.add(new Dominio("classeReferencia", "Atendimento", "ATENDIMENTO", 5L, Boolean.FALSE)); | |
124 | + list.add(new Dominio("classeReferencia", "Devolução Item", "DEVOLUCAO_ITEM", 6L, Boolean.FALSE)); | |
125 | + list.add(new Dominio("classeReferencia", "Depreciação", "DEPRECIACAO", 7L, Boolean.FALSE)); | |
126 | + list.add(new Dominio("classeReferencia", "Alteração bem patrimonial", "ALTERACAO_BEM_PATRIMONIAL", 8L, Boolean.FALSE)); | |
127 | + list.add(new Dominio("classeReferencia", "Saída temporária", "SAIDA_TEMPORARIA", 9L, Boolean.FALSE)); | |
128 | + list.add(new Dominio("classeReferencia", "Definição detentor", "DEFINICAO_DETENTOR", 10L, Boolean.FALSE)); | |
129 | + list.add(new Dominio("classeReferencia", "Adição bem principal", "ADICAO_BEM_PRINCIPAL", 11L, Boolean.FALSE)); | |
130 | + list.add(new Dominio("classeReferencia", "Entrada Almoxarifado Item", "ENTRADA_ALMOXARIFADO_ITEM", 12L, Boolean.FALSE)); | |
131 | + list.add(new Dominio("classeReferencia", "Baixa Almoxarifado Item", "BAIXA_ALMOXARIFADO_ITEM", 13L, Boolean.FALSE)); | |
132 | + list.add(new Dominio("classeReferencia", "Atendimento Almoxarifado Item", "ATENDIMENTO_ALMOXARIFADO_ITEM", 14L, Boolean.FALSE)); | |
118 | 133 | |
119 | 134 | this.dominioService.saveListIfNotExist(list); |
120 | 135 | Logger.getLogger(StartupListenerAdmMaterial.class).info("Domínios executados - StartupListenerAdmMaterial!"); |
... | ... | @@ -134,30 +149,30 @@ public class StartupListenerAdmMaterial extends UtilStartup implements Applicati |
134 | 149 | list.add(new DefaultFile(CIT_ADM_MATERIAIS_WEB_ANGULAR_CUSTOM + "repository/ContaContabilMovimentoRepository.min.js", dominioJS, 147)); |
135 | 150 | this.defaultFileService.saveListIfNotExist(list); |
136 | 151 | } |
137 | - | |
152 | + | |
138 | 153 | /** |
139 | - * | |
154 | + * | |
140 | 155 | * Método responsável por gerar internacionalização do módulo administração de materiais |
141 | - * | |
156 | + * | |
142 | 157 | * @author rogerio.cassimiro |
143 | - * | |
158 | + * | |
144 | 159 | */ |
145 | 160 | private void gerarInternacionalizacao() { |
146 | 161 | |
147 | 162 | dominioPT_BR = this.dominioService.findByChaveAndCodigo(Dominio.TIPO_IDIOMA, Dominio.TIPO_IDIOMA_PT_BR_CODIGO); |
148 | 163 | moduloSelecionado = this.moduloService.getModuloPorBaseUrl(BASE_URL_ADM_MATERIAIS, null); |
149 | 164 | List<Internacionalizacao> internacionalizacaoList = new ArrayList<Internacionalizacao>(); |
150 | - | |
165 | + | |
151 | 166 | this.gerarLabel(dominioPT_BR, moduloSelecionado, internacionalizacaoList); |
152 | 167 | this.gerarValidacao(dominioPT_BR, moduloSelecionado, internacionalizacaoList); |
153 | 168 | this.gerarMensagem(dominioPT_BR, moduloSelecionado, internacionalizacaoList); |
154 | - | |
169 | + | |
155 | 170 | this.internacionalizacaoService.saveListIfNotExist(internacionalizacaoList); |
156 | 171 | Logger.getLogger(StartupListenerAdmMaterial.class).info("Internacionalização executada - StartupListenerAdmMaterial!"); |
157 | 172 | } |
158 | - | |
173 | + | |
159 | 174 | private void gerarLabel(Dominio dominio, Modulo modulo, List<Internacionalizacao> internacionalizacaoList) { |
160 | - | |
175 | + | |
161 | 176 | internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.LABEL.APRESENTAR_RELATORIO_DEPRECIACAO", "Apresentar no relatório de depreciação", dominio, modulo)); |
162 | 177 | internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.LABEL.APRESENTAR_RELATORIO_INVENTARIO", "Apresentar relatório inventário", dominio, modulo)); |
163 | 178 | internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.LABEL.APRESENTAR_RMA", "Apresentar no RMA", dominio, modulo)); |
... | ... | @@ -199,14 +214,17 @@ public class StartupListenerAdmMaterial extends UtilStartup implements Applicati |
199 | 214 | internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.LABEL.UNIDADE_MEDIDA_ARMAZENAMENTO", "Unidade de medida de armazenamento", dominio, modulo)); |
200 | 215 | internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.LABEL.APURACAO_FECHADA", "FECHADA", dominio, modulo)); |
201 | 216 | internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.LABEL.APURACAO_PARCIAL", "PARCIAL", dominio, modulo)); |
202 | - internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.LABEL.REFERENCIA_SUBSEQUENTE", "Referência Subsequente", dominio, modulo)); | |
217 | + internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.LABEL.REFERENCIA_SUBSEQUENTE", "Referência Subsequente", dominio, modulo)); | |
218 | + internacionalizacaoList.add(new Internacionalizacao("MSG.ALTERACAO_QUANTIDADE_PADRAO", "Alteração permitida somente para unidades de medidas que não são padrões do sistema", dominio, modulo)); | |
219 | + | |
203 | 220 | |
204 | 221 | } |
205 | - | |
222 | + | |
206 | 223 | private void gerarValidacao(Dominio dominio, Modulo modulo, List<Internacionalizacao> internacionalizacaoList) { |
207 | 224 | internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.VALIDACAO.DATA_TRANSFERENCIA_FORA_REFERENCIA", "A data de transferência deve estar dentro da referência vigente!", dominio, modulo)); |
225 | + internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.VALIDACAO.VALOR_TOTAL_MAIOR_ZERO", "Valor total deve ser maior que zero!", dominio, modulo)); | |
208 | 226 | } |
209 | - | |
227 | + | |
210 | 228 | private void gerarMensagem(Dominio dominio, Modulo modulo, List<Internacionalizacao> internacionalizacaoList) { |
211 | 229 | internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.MSG.CONFIRMA_EXCLUIR_CONTA_CONTABIL", "Confirma a exclusão da conta contábil?", dominio, modulo)); |
212 | 230 | internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.MSG.CONFIRMA_FECHAR_MES", "Tem certeza que deseja fechar o mês de referência? Fechamento de contas e depreciações de bens ocorrerão. Esta ação não poderá ser revertida. O processo será iniciado em segundo plano, quando o mesmo terminar, você será notificado.", dominio, modulo)); |
... | ... | @@ -220,9 +238,14 @@ public class StartupListenerAdmMaterial extends UtilStartup implements Applicati |
220 | 238 | internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.MSG.TRANSFERENCIA_SUCESS", "Transferência realizada com sucesso!", dominio, modulo)); |
221 | 239 | internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.MSG.INFO_EDICAO_MATERIAL", "Para a edição de outro material, localize o nível detalhe da classificação do material.", dominio, modulo)); |
222 | 240 | internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.MSG.FECHAMENTO_ENTRADAS_INCOMPLETAS", "Existem entradas de bens incompletas neste mês de referência! Por favor concluir as mesmas antes de realizar o fechamento do mês!", dominio, modulo)); |
223 | - | |
224 | 241 | internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.MSG.INFO_MSG_FECHAMENTO_MES_NOTIFICA_FIM", "Fechamento do mês de referência em execução. Quando o processo terminar, você será notificado!", dominio, modulo)); |
242 | + internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.MSG.CONFIRMA_ALTERAR_PADRAO", "Já foi definido uma unidade de medida de entrada como padrão. Deseja alterar?", dominio, modulo)); | |
225 | 243 | |
244 | + internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.MSG.REMOVER_LOCAL_ESTOQUE_MATERIAL_PRINCIPAL", "O endereço selecionado para remoção está definido como principal de um almoxarifado. Para remover este endereço de estoque, informe outro endereço de estoque como principal para o almoxarifado.", dominio, modulo)); | |
245 | + internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.MSG.EDITA_LOCAL_ESTOQUE_MATERIAL_PRINCIPAL", "Para definir esse endereço de estoque como não sendo principal, primeiramente informe outro endereço de estoque como principal para o almoxarifado.", dominio, modulo)); | |
246 | + internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.MSG.LOCAL_SALVA_ESTOQUE_MATERIAL_COMO_PRINCIPAL_PARA_ALMOXARIFADO", "Este endereço de estoque é o principal do almoxarifado ", dominio, modulo)); | |
247 | + internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.MSG.LOCAL_ESTOQUE_JA_VINCULADO_MATERIAL", "Este endereço de estoque já possui vínculo ao material.", dominio, modulo)); | |
248 | + internacionalizacaoList.add(new Internacionalizacao("ADMINISTRACAODEMATERIAIS.MSG.REMOVER_LOCAL_ESTOQUE_MATERIAL_VINCULADO_ENTRADA_ALMOX_ITEM", "Não é possível remover esse vínculo de endereço de estoque com o material, pois o endereço selecionado foi utilizado em um item de entrada do almoxarifado.", dominio, modulo)); | |
226 | 249 | } |
227 | - | |
250 | + | |
228 | 251 | } |
229 | 252 | \ No newline at end of file | ... | ... |
cit-adm-materiais-web/src/main/resources/reports/templatePaisagem.jrxml
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | +<!-- Created with Jaspersoft Studio version 6.2.2.final using JasperReports Library version 6.2.2 --> | |
3 | +<!-- 2016-05-12T10:58:45 --> | |
2 | 4 | <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="templatePaisagem" language="groovy" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="AllSectionsNoDetail" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="2a9bde7e-349d-4f0b-b96c-98310606be6f"> |
3 | 5 | <property name="ireport.zoom" value="1.5"/> |
4 | 6 | <property name="ireport.x" value="61"/> |
... | ... | @@ -26,12 +28,15 @@ from anexoimagem aImagem right join configuracao conf on aImagem.configuracao_id |
26 | 28 | <field name="logo" class="java.lang.Object"/> |
27 | 29 | <title> |
28 | 30 | <band height="130" splitType="Stretch"> |
29 | - <image> | |
30 | - <reportElement positionType="Float" x="23" y="20" width="85" height="60" uuid="21d967cf-a639-41a7-a0af-62fc1f113936"/> | |
31 | + <image hAlign="Center"> | |
32 | + <reportElement positionType="Float" x="23" y="20" width="140" height="75" uuid="21d967cf-a639-41a7-a0af-62fc1f113936"> | |
33 | + <property name="com.jaspersoft.studio.unit.height" value="pixel"/> | |
34 | + <property name="com.jaspersoft.studio.unit.width" value="pixel"/> | |
35 | + </reportElement> | |
31 | 36 | <imageExpression><![CDATA[new ByteArrayInputStream((byte[])$F{logo})]]></imageExpression> |
32 | 37 | </image> |
33 | 38 | <textField isBlankWhenNull="true"> |
34 | - <reportElement x="108" y="20" width="677" height="20" uuid="4e1c4a55-25b5-42c3-a656-feaaab3ee44c"/> | |
39 | + <reportElement x="163" y="20" width="617" height="20" uuid="4e1c4a55-25b5-42c3-a656-feaaab3ee44c"/> | |
35 | 40 | <box leftPadding="5"/> |
36 | 41 | <textElement verticalAlignment="Middle"> |
37 | 42 | <font size="12" isBold="true"/> |
... | ... | @@ -39,7 +44,7 @@ from anexoimagem aImagem right join configuracao conf on aImagem.configuracao_id |
39 | 44 | <textFieldExpression><![CDATA[$F{titulo1}]]></textFieldExpression> |
40 | 45 | </textField> |
41 | 46 | <textField isBlankWhenNull="true"> |
42 | - <reportElement x="108" y="40" width="677" height="20" uuid="7ce4c085-aea3-4ae6-83ae-0134ef022bd7"/> | |
47 | + <reportElement x="163" y="40" width="617" height="20" uuid="7ce4c085-aea3-4ae6-83ae-0134ef022bd7"/> | |
43 | 48 | <box leftPadding="5"/> |
44 | 49 | <textElement verticalAlignment="Middle"> |
45 | 50 | <font size="12" isBold="true"/> |
... | ... | @@ -47,7 +52,7 @@ from anexoimagem aImagem right join configuracao conf on aImagem.configuracao_id |
47 | 52 | <textFieldExpression><![CDATA[$F{titulo2}]]></textFieldExpression> |
48 | 53 | </textField> |
49 | 54 | <textField isBlankWhenNull="true"> |
50 | - <reportElement x="108" y="60" width="677" height="20" uuid="edd46a21-e588-4e52-8438-c70f2ede5324"/> | |
55 | + <reportElement x="163" y="60" width="617" height="20" uuid="edd46a21-e588-4e52-8438-c70f2ede5324"/> | |
51 | 56 | <box leftPadding="5"/> |
52 | 57 | <textElement verticalAlignment="Middle"> |
53 | 58 | <font size="12" isBold="true"/> | ... | ... |
cit-adm-materiais-web/src/main/resources/reports/templateRetrato.jrxml
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | +<!-- Created with Jaspersoft Studio version 6.2.2.final using JasperReports Library version 6.2.2 --> | |
3 | +<!-- 2016-05-12T10:58:26 --> | |
2 | 4 | <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="templateRetrato" language="groovy" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="2a9bde7e-349d-4f0b-b96c-98310606be6f"> |
3 | 5 | <property name="ireport.zoom" value="2.0"/> |
4 | 6 | <property name="ireport.x" value="25"/> |
... | ... | @@ -27,7 +29,7 @@ from anexoimagem aImagem right join configuracao conf on aImagem.configuracao_id |
27 | 29 | <title> |
28 | 30 | <band height="134" splitType="Stretch"> |
29 | 31 | <textField isBlankWhenNull="true"> |
30 | - <reportElement x="102" y="37" width="453" height="20" uuid="8b7353fa-6d6b-4b7d-bd04-2564491beff4"/> | |
32 | + <reportElement x="157" y="37" width="398" height="20" uuid="8b7353fa-6d6b-4b7d-bd04-2564491beff4"/> | |
31 | 33 | <box leftPadding="5"/> |
32 | 34 | <textElement verticalAlignment="Middle"> |
33 | 35 | <font size="12" isBold="true"/> |
... | ... | @@ -35,19 +37,22 @@ from anexoimagem aImagem right join configuracao conf on aImagem.configuracao_id |
35 | 37 | <textFieldExpression><![CDATA[$F{titulo2}]]></textFieldExpression> |
36 | 38 | </textField> |
37 | 39 | <textField isBlankWhenNull="true"> |
38 | - <reportElement x="102" y="17" width="453" height="20" uuid="0c63ef23-5e35-4c22-81ed-dbd9a2fac964"/> | |
40 | + <reportElement x="157" y="17" width="398" height="20" uuid="0c63ef23-5e35-4c22-81ed-dbd9a2fac964"/> | |
39 | 41 | <box leftPadding="5"/> |
40 | 42 | <textElement verticalAlignment="Middle"> |
41 | 43 | <font size="12" isBold="true"/> |
42 | 44 | </textElement> |
43 | 45 | <textFieldExpression><![CDATA[$F{titulo1}]]></textFieldExpression> |
44 | 46 | </textField> |
45 | - <image isUsingCache="true" onErrorType="Icon"> | |
46 | - <reportElement positionType="Float" x="17" y="17" width="85" height="60" uuid="d161cd66-d9ef-43e9-b70a-3fb2c8b4eba4"/> | |
47 | + <image hAlign="Center" isUsingCache="true" onErrorType="Icon"> | |
48 | + <reportElement positionType="Float" x="17" y="17" width="140" height="75" uuid="d161cd66-d9ef-43e9-b70a-3fb2c8b4eba4"> | |
49 | + <property name="com.jaspersoft.studio.unit.width" value="pixel"/> | |
50 | + <property name="com.jaspersoft.studio.unit.height" value="pixel"/> | |
51 | + </reportElement> | |
47 | 52 | <imageExpression><![CDATA[new ByteArrayInputStream((byte[])$F{logo})]]></imageExpression> |
48 | 53 | </image> |
49 | 54 | <textField isBlankWhenNull="true"> |
50 | - <reportElement x="102" y="57" width="453" height="20" uuid="7fc824c8-633f-40d4-8310-4d81780f2834"/> | |
55 | + <reportElement x="157" y="57" width="398" height="20" uuid="7fc824c8-633f-40d4-8310-4d81780f2834"/> | |
51 | 56 | <box leftPadding="5"/> |
52 | 57 | <textElement verticalAlignment="Middle"> |
53 | 58 | <font size="12" isBold="true"/> | ... | ... |
cit-adm-materiais-web/src/main/webapp/assets/js/angular/custom/controller/MaterialController.js
1 | 1 | 'use strict'; |
2 | 2 | citApp.controller('MaterialController', ['$scope', 'MaterialRepository', 'ClassificacaoMaterialRepository', 'CaracteristicaRepository', 'FileUploader', 'MaterialImagemRepository', |
3 | - '$timeout', 'MaterialCaracteristicaRepository', 'MaterialPermanenteConsumoRepository', 'ContaContabilRepository', 'DominioRepository', '$translate', '$filter', 'MaterialConsumoRepository', 'MaterialConsumoTipoUnidadeMedidaEntradaRepository', 'MaterialPermanenteRepository', 'UnidadeMedidaRepository', | |
3 | + '$timeout', 'MaterialCaracteristicaRepository', 'MaterialPermanenteConsumoRepository', 'ContaContabilRepository', 'DominioRepository', '$translate', '$filter', 'MaterialConsumoRepository', 'MaterialConsumoTipoUnidadeMedidaEntradaRepository', 'MaterialPermanenteRepository', 'UnidadeMedidaRepository', '$injector', | |
4 | 4 | function MaterialController($scope, MaterialRepository, ClassificacaoMaterialRepository, CaracteristicaRepository, FileUploader, MaterialImagemRepository, |
5 | - $timeout, MaterialCaracteristicaRepository, MaterialPermanenteConsumoRepository, ContaContabilRepository, DominioRepository, $translate, $filter, MaterialConsumoRepository, MaterialConsumoTipoUnidadeMedidaEntradaRepository, MaterialPermanenteRepository, UnidadeMedidaRepository) { | |
5 | + $timeout, MaterialCaracteristicaRepository, MaterialPermanenteConsumoRepository, ContaContabilRepository, DominioRepository, $translate, $filter, MaterialConsumoRepository, MaterialConsumoTipoUnidadeMedidaEntradaRepository, MaterialPermanenteRepository, UnidadeMedidaRepository, $injector) { | |
6 | 6 | |
7 | 7 | // CONSTANTES DOMINIO |
8 | 8 | var CODIGO_TIPO_CLASSIFICACAO_DETALHE = 4; |
9 | - | |
10 | 9 | $scope.edit = true; |
11 | 10 | |
12 | 11 | $scope.classificacaoMaterial; |
... | ... | @@ -29,6 +28,21 @@ citApp.controller('MaterialController', ['$scope', 'MaterialRepository', 'Classi |
29 | 28 | $scope.limpar(); |
30 | 29 | }; |
31 | 30 | |
31 | + function verificaMaterialConsumoSetGenerico(){ | |
32 | + if ($scope.material.dominioTipoMaterial && $scope.material.dominioTipoMaterial.codigo) { | |
33 | + if($scope.material.dominioTipoMaterial.codigo == 1){ | |
34 | + $scope.materialCaracteristica.generico = true; | |
35 | + $scope.bloquearMaterialConsumo = true; | |
36 | + }else{ | |
37 | + $scope.bloquearMaterialConsumo = false; | |
38 | + $scope.materialCaracteristica.generico = false; | |
39 | + } | |
40 | + }else{ | |
41 | + $scope.bloquearMaterialConsumo = false; | |
42 | + $scope.materialCaracteristica.generico = false; | |
43 | + } | |
44 | + } | |
45 | + | |
32 | 46 | $scope.getMaterial = function (material, edit) { |
33 | 47 | $scope.setLoadingSalva(true); |
34 | 48 | |
... | ... | @@ -42,6 +56,8 @@ citApp.controller('MaterialController', ['$scope', 'MaterialRepository', 'Classi |
42 | 56 | } |
43 | 57 | |
44 | 58 | configurarDadosClassificacaoMaterial(); |
59 | + verificaMaterialConsumoSetGenerico(); | |
60 | + $scope.verificaAlmoxarifadoAtivo(); | |
45 | 61 | $scope.setLoading(false); |
46 | 62 | }); |
47 | 63 | }; |
... | ... | @@ -114,7 +130,7 @@ citApp.controller('MaterialController', ['$scope', 'MaterialRepository', 'Classi |
114 | 130 | console.info('onCompleteItem', fileItem, response, status, headers); |
115 | 131 | }; |
116 | 132 | uploader.onCompleteAll = function() { |
117 | - //uploader.clearQueue(); | |
133 | + //uploader.clearQueue(); | |
118 | 134 | console.info('onCompleteAll'); |
119 | 135 | }; |
120 | 136 | |
... | ... | @@ -257,9 +273,14 @@ citApp.controller('MaterialController', ['$scope', 'MaterialRepository', 'Classi |
257 | 273 | if($scope.material.classificacaoMaterial){ |
258 | 274 | $scope.MaterialDadosDetalhe = $scope.material.classificacaoMaterial.codigo + ' - ' + $scope.material.classificacaoMaterial.descricao; |
259 | 275 | } |
260 | - } | |
276 | + } | |
261 | 277 | }; |
262 | 278 | |
279 | + $scope.$watch('material.dominioTipoMaterial.codigo', function() { | |
280 | + verificaMaterialConsumoSetGenerico(); | |
281 | + }); | |
282 | + | |
283 | + | |
263 | 284 | DominioRepository.findAllDominio('tipoMaterial').then(function(result) { |
264 | 285 | $scope.tiposMaterial = result; |
265 | 286 | }); |
... | ... | @@ -296,12 +317,18 @@ citApp.controller('MaterialController', ['$scope', 'MaterialRepository', 'Classi |
296 | 317 | $scope.unidadesMedida.push(item.originalElement); |
297 | 318 | $scope.unidadesMedidaMaterialConsumo.push(item.originalElement); |
298 | 319 | }); |
299 | - | |
320 | + | |
300 | 321 | $scope.unidadesMedidaMaterialConsumo.sort(function (a, b) { |
301 | 322 | return a.descricao.localeCompare(b.descricao); |
302 | 323 | }); |
303 | 324 | }); |
304 | 325 | |
326 | + function addTipoUnidadeMedida(unidadeMedidaEntradaTemp){ | |
327 | + unidadeMedidaEntradaTemp.isPadrao = angular.copy($scope.unidadeMedidaEntrada.isPadrao); | |
328 | + $scope.material.tiposUnidadeMedidaEntrada.push(unidadeMedidaEntradaTemp); | |
329 | + $scope.unidadesMedidaMaterialConsumo = $filter('idNotEqualUnidadeMedida')($scope.unidadesMedidaMaterialConsumo, $scope.material.tiposUnidadeMedidaEntrada); | |
330 | + $scope.unidadeMedidaEntrada = {}; | |
331 | + } | |
305 | 332 | //Método responsável por editar unidadeMedidaEntrada. |
306 | 333 | $scope.adicionarUnidadeMedidaEntrada = function() { |
307 | 334 | //Verifica se a lista tiposUnidadeMedidaEntrada não está vazia |
... | ... | @@ -314,11 +341,32 @@ citApp.controller('MaterialController', ['$scope', 'MaterialRepository', 'Classi |
314 | 341 | var unidadeMedidaEntradaTemp = {}; |
315 | 342 | angular.copy($scope.unidadeMedidaEntrada, unidadeMedidaEntradaTemp); |
316 | 343 | |
317 | - $scope.material.tiposUnidadeMedidaEntrada.push(unidadeMedidaEntradaTemp); | |
318 | - $scope.unidadesMedidaMaterialConsumo = $filter('idNotEqualUnidadeMedida')($scope.unidadesMedidaMaterialConsumo, $scope.material.tiposUnidadeMedidaEntrada); | |
319 | - } | |
344 | + if($scope.unidadeMedidaEntrada.isPadrao){ | |
345 | + var isPossuiPadrao = false; | |
320 | 346 | |
321 | - $scope.unidadeMedidaEntrada = {}; | |
347 | + angular.forEach($scope.material.tiposUnidadeMedidaEntrada, function(tipoUnidade) { | |
348 | + if(tipoUnidade.isPadrao){ | |
349 | + isPossuiPadrao = true; | |
350 | + } | |
351 | + }); | |
352 | + | |
353 | + if( isPossuiPadrao){ | |
354 | + $scope.$openModalConfirm({message: $translate.instant('ADMINISTRACAODEMATERIAIS.MSG.CONFIRMA_ALTERAR_PADRAO'), callback: | |
355 | + function(){ | |
356 | + angular.forEach($scope.material.tiposUnidadeMedidaEntrada, function(tipoUnidade) { | |
357 | + tipoUnidade.isPadrao = false; | |
358 | + }); | |
359 | + addTipoUnidadeMedida(unidadeMedidaEntradaTemp); | |
360 | + $scope.$modalConfirmInstance.dismiss('cancel'); | |
361 | + } | |
362 | + }); | |
363 | + }else{ | |
364 | + addTipoUnidadeMedida(unidadeMedidaEntradaTemp); | |
365 | + } | |
366 | + }else{ | |
367 | + addTipoUnidadeMedida(unidadeMedidaEntradaTemp); | |
368 | + } | |
369 | + } | |
322 | 370 | }; |
323 | 371 | |
324 | 372 | $scope.exibirDialogRemocaoUnidadeMedida = function() { |
... | ... | @@ -348,16 +396,16 @@ citApp.controller('MaterialController', ['$scope', 'MaterialRepository', 'Classi |
348 | 396 | $scope.$modalConfirmInstance.dismiss('cancel'); |
349 | 397 | }; |
350 | 398 | }); |
351 | - | |
399 | + | |
352 | 400 | $scope.unidadesMedidaMaterialConsumo.sort(function (a, b) { |
353 | 401 | return a.descricao.localeCompare(b.descricao); |
354 | 402 | }); |
355 | 403 | }; |
356 | - | |
404 | + | |
357 | 405 | $scope.getCheckUnidadeMedidaEntrada = function () { |
358 | 406 | $scope.material.tiposUnidadeMedidaEntrada.forEach(function (unidade) { |
359 | 407 | if(unidade.$checked){ |
360 | - $scope.unidadeMedidaSelecionada = unidade; | |
408 | + $scope.unidadeMedidaSelecionada = unidade; | |
361 | 409 | } |
362 | 410 | }); |
363 | 411 | }; |
... | ... | @@ -426,6 +474,7 @@ citApp.controller('MaterialController', ['$scope', 'MaterialRepository', 'Classi |
426 | 474 | |
427 | 475 | $scope.materialCaracteristica.$edit = false; |
428 | 476 | $scope.materialCaracteristica = {}; |
477 | + verificaMaterialConsumoSetGenerico(); | |
429 | 478 | }; |
430 | 479 | |
431 | 480 | $scope.editCaracteristica = function() { |
... | ... | @@ -459,11 +508,11 @@ citApp.controller('MaterialController', ['$scope', 'MaterialRepository', 'Classi |
459 | 508 | |
460 | 509 | MaterialCaracteristicaRepository.save(materialCaracteristica).then(function(result) { |
461 | 510 | $scope.showAlert("success", $translate.instant('MSG.SUCESSO_BLOQUEIO_CARACTERISTICA')); |
462 | - | |
511 | + | |
463 | 512 | materialCaracteristica.$checked = false; |
464 | 513 | |
465 | 514 | $scope.apresentarBloquearCaracteristica = false; |
466 | - | |
515 | + | |
467 | 516 | materialCaracteristica.version = result.originalElement.version; |
468 | 517 | }); |
469 | 518 | } |
... | ... | @@ -641,4 +690,182 @@ citApp.controller('MaterialController', ['$scope', 'MaterialRepository', 'Classi |
641 | 690 | } |
642 | 691 | }; |
643 | 692 | |
693 | + $scope.verificaAlmoxarifadoAtivo = function(){ | |
694 | + $scope.almoxarifadoAtivo = $scope.isModuloAtivo("/cit-almoxarifado-web"); | |
695 | + if($scope.almoxarifadoAtivo){ | |
696 | + $scope.MaterialLocalEstoqueRepository = $injector.get(["MaterialLocalEstoqueRepository"]); | |
697 | + $scope.EstruturaOrganizacionalAlmoxarifadoRepository = $injector.get(["EstruturaOrganizacionalAlmoxarifadoRepository"]); | |
698 | + $scope.EnderecoEstoqueRepository = $injector.get(["EnderecoEstoqueRepository"]); | |
699 | + $scope.EntradaAlmoxarifadoItemRepository = $injector.get(["EntradaAlmoxarifadoItemRepository"]); | |
700 | + | |
701 | + $scope.EstruturaOrganizacionalAlmoxarifadoRepository.getAlmoxarifadoPadrao($scope.usuarioLogado.organizacao.id).then(function(result){ | |
702 | + $scope.almoxarifadoTemp = result.originalElement.estruturaOrganizacional; | |
703 | + }); | |
704 | + if($scope.material && $scope.material.id){ | |
705 | + $scope.listaLocaisEstoqueMaterial(); | |
706 | + } | |
707 | + $scope.editEnderecoEstoque = false; | |
708 | + } | |
709 | + } | |
710 | + | |
711 | + | |
712 | + $scope.adicionarEnderecoEstoque = function(){ | |
713 | + $scope.materialLocalEstoque = {}; | |
714 | + $scope.$openModal('modal-material-endereco-estoque.html', 'lg'); | |
715 | + $scope.alternaTipoNumericoUnidadeMedida(); | |
716 | + }; | |
717 | + | |
718 | + $scope.editarEnderecoEstoque = function(){ | |
719 | + if(!$scope.matEndEstoqueCheck){ | |
720 | + $scope.showAlert("warning", $translate.instant('LABEL.SELECIONE_UM_ITEM')); | |
721 | + }else{ | |
722 | + $scope.editEnderecoEstoque = true; | |
723 | + $scope.materialLocalEstoque = $scope.matEndEstoqueCheck; | |
724 | + $scope.almoxarifadoTemp = $scope.materialLocalEstoque.endereco.estoque.almoxarifado; | |
725 | + $scope.$openModal('modal-material-endereco-estoque.html', 'lg'); | |
726 | + $scope.alternaTipoNumericoUnidadeMedida(); | |
727 | + } | |
728 | + }; | |
729 | + | |
730 | + $scope.removerEnderecoEstoque = function(){ | |
731 | + if(!$scope.matEndEstoqueCheck){ | |
732 | + $scope.showAlert("warning", $translate.instant('LABEL.SELECIONE_UM_ITEM')); | |
733 | + }else{ | |
734 | + $scope.$openModalConfirm({message: $translate.instant('LABEL.CONFIRMA_EXCLUSAO'), callback: function() { | |
735 | + $scope.setLoading(true); | |
736 | + $scope.MaterialLocalEstoqueRepository.buscarLocaisEstoquePorIdMaterialIdAlmoxarifado($scope.material.id, $scope.matEndEstoqueCheck.endereco.estoque.almoxarifado.id).then(function(result) { | |
737 | + if(result && result.length > 1){ | |
738 | + if($scope.matEndEstoqueCheck.localPrincipal){ | |
739 | + $scope.showAlert("warning", $translate.instant('ADMINISTRACAODEMATERIAIS.MSG.REMOVER_LOCAL_ESTOQUE_MATERIAL_PRINCIPAL')); | |
740 | + $scope.setLoading(false); | |
741 | + $scope.$modalConfirmInstance.dismiss('cancel'); | |
742 | + return; | |
743 | + } | |
744 | + } | |
745 | + | |
746 | + $scope.EntradaAlmoxarifadoItemRepository.existeItemVinculadoAMaterialLocalEstoque($scope.matEndEstoqueCheck.id).then(function(result) { | |
747 | + if(result){ | |
748 | + $scope.showAlert("warning", $translate.instant('ADMINISTRACAODEMATERIAIS.MSG.REMOVER_LOCAL_ESTOQUE_MATERIAL_VINCULADO_ENTRADA_ALMOX_ITEM')); | |
749 | + $scope.setLoading(false); | |
750 | + $scope.$modalConfirmInstance.dismiss('cancel'); | |
751 | + return; | |
752 | + } | |
753 | + | |
754 | + $scope.MaterialLocalEstoqueRepository.get($scope.matEndEstoqueCheck.id).then(function(result) { | |
755 | + if(result.quantidade > 0){ | |
756 | + $scope.showAlert("warning", $translate.instant('ADMINISTRACAODEMATERIAIS.MSG.REMOVER_LOCAL_ESTOQUE_MATERIAL_VINCULADO_ENTRADA_ALMOX_ITEM')); | |
757 | + $scope.setLoading(false); | |
758 | + $scope.$modalConfirmInstance.dismiss('cancel'); | |
759 | + return; | |
760 | + } | |
761 | + | |
762 | + $scope.MaterialLocalEstoqueRepository.remove($scope.matEndEstoqueCheck).then(function(result) { | |
763 | + $scope.listaLocaisEstoqueMaterial(); | |
764 | + $scope.setLoading(false); | |
765 | + }); | |
766 | + }); | |
767 | + | |
768 | + }); | |
769 | + | |
770 | + $scope.$modalConfirmInstance.dismiss('cancel'); | |
771 | + }); | |
772 | + } | |
773 | + }); | |
774 | + } | |
775 | + }; | |
776 | + | |
777 | + $scope.checkMatEndEstoque = function(materialLocalEstoque){ | |
778 | + $scope.matEndEstoqueCheck = materialLocalEstoque.originalElement; | |
779 | + }; | |
780 | + | |
781 | + $scope.findAutoCompleteAlmoxarifado = function(value){ | |
782 | + return $scope.EstruturaOrganizacionalAlmoxarifadoRepository.listarEstruturasOrganizacionaisAlmoxarifadoPorOrganizacao(value, $scope.usuarioLogado.organizacao.id).then(function(result) { | |
783 | + return result; | |
784 | + }); | |
785 | + }; | |
786 | + | |
787 | + $scope.findAutoCompleteEndereco = function(value, almoxarifado){ | |
788 | + var idAlmoxarifado = 0; | |
789 | + if(almoxarifado){ | |
790 | + idAlmoxarifado = almoxarifado.id; | |
791 | + } | |
792 | + return $scope.EnderecoEstoqueRepository.listarEnderecosEstoque(value, idAlmoxarifado).then(function(result) { | |
793 | + return result; | |
794 | + }); | |
795 | + }; | |
796 | + | |
797 | + $scope.salvarMaterialEnderecoEstoque = function(formDialogMaterialEnderecoEstoque, materialLocalEstoque, almoxarifadoTemp){ | |
798 | + formDialogMaterialEnderecoEstoque.$submitted = true; | |
799 | + if (formDialogMaterialEnderecoEstoque.$invalid) { | |
800 | + $scope.showAlert('error', $translate.instant('MSG.MN001')); | |
801 | + } else { | |
802 | + $scope.almoxarifadoTemp = almoxarifadoTemp; | |
803 | + $scope.setLoading(true); | |
804 | + if(!materialLocalEstoque.materialEstoque){ | |
805 | + materialLocalEstoque.materialEstoque = {material : $scope.material}; | |
806 | + } | |
807 | + materialLocalEstoque.endereco.estoque = {almoxarifado : $scope.almoxarifadoTemp}; | |
808 | + $scope.MaterialLocalEstoqueRepository.save(materialLocalEstoque).then(function(result) { | |
809 | + if( result.originalElement.localPrincipal){ | |
810 | + $scope.showAlert("warning", $translate.instant('ADMINISTRACAODEMATERIAIS.MSG.LOCAL_SALVA_ESTOQUE_MATERIAL_COMO_PRINCIPAL_PARA_ALMOXARIFADO') + $scope.almoxarifadoTemp.codigoENome); | |
811 | + } | |
812 | + $scope.$modalInstance.dismiss('cancel'); | |
813 | + $scope.listaLocaisEstoqueMaterial(); | |
814 | + $scope.editEnderecoEstoque = false; | |
815 | + $scope.setLoading(false); | |
816 | + }); | |
817 | + } | |
818 | + }; | |
819 | + | |
820 | + $scope.listaLocaisEstoqueMaterial = function(){ | |
821 | + $scope.setLoading(true); | |
822 | + $scope.listaMaterialEnderecoEstoque = []; | |
823 | + $scope.MaterialLocalEstoqueRepository.listarMaterialEstoquePorMaterial($scope.material.id).then(function(result) { | |
824 | + $scope.listaMaterialEnderecoEstoque = result; | |
825 | + $scope.matEndEstoqueCheck = null; | |
826 | + $scope.alternaTipoNumericoUnidadeMedida(); | |
827 | + $scope.setLoading(false); | |
828 | + }); | |
829 | + }; | |
830 | + | |
831 | + $scope.bloquearEnderecoEstoque = function(){ | |
832 | + if(!$scope.matEndEstoqueCheck){ | |
833 | + $scope.showAlert("warning", $translate.instant('LABEL.SELECIONE_UM_ITEM')); | |
834 | + }else{ | |
835 | + $scope.matEndEstoqueCheck.dataBloqueio = new Date(); | |
836 | + $scope.MaterialLocalEstoqueRepository.save($scope.matEndEstoqueCheck).then(function(result) { | |
837 | + $scope.listaLocaisEstoqueMaterial(); | |
838 | + }); | |
839 | + } | |
840 | + }; | |
841 | + | |
842 | + $scope.desbloquearEnderecoEstoque = function(){ | |
843 | + if(!$scope.matEndEstoqueCheck){ | |
844 | + $scope.showAlert("warning", $translate.instant('LABEL.SELECIONE_UM_ITEM')); | |
845 | + }else{ | |
846 | + $scope.matEndEstoqueCheck.dataBloqueio = null; | |
847 | + $scope.MaterialLocalEstoqueRepository.save($scope.matEndEstoqueCheck).then(function(result) { | |
848 | + $scope.listaLocaisEstoqueMaterial(); | |
849 | + }); | |
850 | + } | |
851 | + }; | |
852 | + | |
853 | + $scope.alternaTipoNumericoUnidadeMedida = function(){ | |
854 | + $timeout(function(){ | |
855 | + if($scope.material.unidadeArmazenamento.tipoNumerico.codigo){ | |
856 | + switch($scope.material.unidadeArmazenamento.tipoNumerico.codigo){ | |
857 | + case 1: | |
858 | + $scope.showInteiro= true; | |
859 | + $scope.showDecimal = false; | |
860 | + break; | |
861 | + | |
862 | + case 2: | |
863 | + $scope.showDecimal = true; | |
864 | + $scope.showInteiro= false; | |
865 | + break; | |
866 | + | |
867 | + } | |
868 | + } | |
869 | + }); | |
870 | + }; | |
644 | 871 | }]); |
645 | 872 | \ No newline at end of file | ... | ... |
cit-adm-materiais-web/src/main/webapp/assets/js/angular/custom/controller/UnidadeMedidaController.js
... | ... | @@ -1,82 +0,0 @@ |
1 | -'use strict'; | |
2 | - | |
3 | -citApp.controller('UnidadeMedidaController', ['$scope', 'UnidadeMedidaRepository', '$translate', '$timeout', 'DominioRepository', | |
4 | - function UnidadeMedidaController($scope, UnidadeMedidaRepository, $translate, $timeout, DominioRepository) { | |
5 | - | |
6 | - $scope.unidadeMedida = {}; | |
7 | - | |
8 | - // Limpa formulário para novo cadastro | |
9 | - $scope.resetForm = function() { | |
10 | - $scope.limparUnidadeMedida(); | |
11 | - $scope.edit = true; | |
12 | - $timeout(function(){ | |
13 | - $scope.unidadeMedidaForm.$submitted = false; | |
14 | - $scope.unidadeMedidaForm.$setPristine(); | |
15 | - }); | |
16 | - }; | |
17 | - | |
18 | - // Atualiza pagina de pesquisa | |
19 | - $scope.atualizaPaginaPesquisa = function () { | |
20 | - angular.element('#searchUnidadeMedida').scope().fetchResult(); | |
21 | - }; | |
22 | - | |
23 | - // MODAL QUE CONFIRMA REMOVER DA CIDADE | |
24 | - $scope.remove = function(unidadeMedida){ | |
25 | - $scope.unidadeMedida = unidadeMedida; | |
26 | - $scope.$openModalConfirm({ | |
27 | - message: $translate.instant('MSG.CONFIRMA_EXCLUSAO'), | |
28 | - callback: function () { | |
29 | - UnidadeMedidaRepository.remove($scope.unidadeMedida).then(function() { | |
30 | - | |
31 | - $scope.$modalConfirmInstance.dismiss('cancel'); | |
32 | - $scope.showAlert("success", $translate.instant('MSG.REGISTRO_EXCLUIDO')); | |
33 | - angular.element('#searchUnidadeMedida').scope().fetchResult(); | |
34 | - | |
35 | - $scope.resetForm(); | |
36 | - }); | |
37 | - } | |
38 | - }); | |
39 | - }; | |
40 | - | |
41 | - // SALVA O UnidadeMedida | |
42 | - $scope.saveOrUpdate = function(){ | |
43 | - $scope.unidadeMedidaForm.$submitted = true; | |
44 | - | |
45 | - //verifica se o formulario está valido para salvar | |
46 | - if($scope.unidadeMedidaForm.$valid){ | |
47 | - | |
48 | - $scope.setLoadingSalva(true); | |
49 | - | |
50 | - UnidadeMedidaRepository.save($scope.unidadeMedida).then(function(result) { | |
51 | - $scope.unidadeMedida = result.originalElement; | |
52 | - $scope.showAlert("success", $translate.instant('MSG.REGISTRO_SALVO')); | |
53 | - $scope.unidadeMedidaForm.$submitted = false; | |
54 | - }); | |
55 | - $scope.setLoading(false); | |
56 | - }else{ | |
57 | - //Mensagem de erro de campos obrigatorios não preenchidos | |
58 | - $scope.showAlert('error', $translate.instant('VALIDACAO.ALERTA_OBRIGATORIOS'), " ", false); | |
59 | - } | |
60 | - }; | |
61 | - | |
62 | - // Limpa o formulario preenchido | |
63 | - $scope.limparUnidadeMedida = function(){ | |
64 | - $scope.unidadeMedida = {}; | |
65 | - }; | |
66 | - | |
67 | - // Consulta entidade e mostra no formulario | |
68 | - $scope.getUnidadeMedida = function(unidadeMedida, edit){ | |
69 | - $scope.setLoadingGet(true); | |
70 | - | |
71 | - UnidadeMedidaRepository.get(unidadeMedida.id).then(function(result) { | |
72 | - $scope.unidadeMedida = result.originalElement; | |
73 | - $scope.edit = edit; | |
74 | - $scope.setLoading(false); | |
75 | - }); | |
76 | - }; | |
77 | - | |
78 | - DominioRepository.findAllDominio('tipoNumerico').then(function(result) { | |
79 | - $scope.tipoNumericoList = result; | |
80 | - }); | |
81 | - | |
82 | -}]); |
cit-adm-materiais-web/src/main/webapp/assets/js/angular/custom/controller/UnidadeMedidaListController.js
... | ... | @@ -1,43 +0,0 @@ |
1 | -'use strict'; | |
2 | - | |
3 | -citApp.controller('UnidadeMedidaListController', ['$scope', 'UnidadeMedidaRepository', '$translate', '$timeout', 'DominioRepository', | |
4 | - function UnidadeMedidaListController($scope, UnidadeMedidaRepository, $translate, $timeout, DominioRepository) { | |
5 | - $scope.$showAdvancedFilters = false; | |
6 | - | |
7 | - $scope.resetForm = function() { | |
8 | - angular.element("#editUnidadeMedida").scope().resetForm(); | |
9 | - }; | |
10 | - | |
11 | - $scope.headers = [ {title : $translate.instant('LABEL.CODIGO'), value : 'codigo' } , | |
12 | - {title : $translate.instant('LABEL.DESCRICAO'), value : 'descricao' } , | |
13 | - {title : $translate.instant('ADMINISTRACAODEMATERIAIS.LABEL.TIPO_NUMERICO'), value : 'tipoNumerico.descricao' } , | |
14 | - {title : $translate.instant('LABEL.SIGLA'), value : 'sigla' }]; | |
15 | - | |
16 | - $scope.filterCriteria = { | |
17 | - start : 1, | |
18 | - dir : 'asc', | |
19 | - sort : 'id', | |
20 | - limit : 10, | |
21 | - fields: ['id', 'codigo', 'descricao', 'tipoNumerico.descricao', 'sigla'], | |
22 | - filters : [ {type : 'string', field : 'codigo'} , | |
23 | - {type : 'string', field : 'descricao'} , | |
24 | - {type : 'string', field : 'tipoNumerico.descricao', listaDominio : [] } , | |
25 | - {type : 'string', field : 'sigla' }] | |
26 | - }; | |
27 | - | |
28 | - DominioRepository.findAllDominio('tipoNumerico').then(function(result) { | |
29 | - $scope.filterCriteria.filters[2].listaDominio = result; | |
30 | - }); | |
31 | - | |
32 | - // ABRI UnidadeMedida SELECIONADA | |
33 | - $scope.abrirVisualizar = function(edit){ | |
34 | - var unidadeMedida = $scope.unidadeMedidaChecked; | |
35 | - | |
36 | - if(!unidadeMedida) { | |
37 | - $scope.showAlert('warning', !edit ? $translate.instant('MSG.SELECIONE_UM_ITEM_PARA_VISUALIZACAO') : $translate.instant('MSG.SELECIONE_UM_ITEM_PARA_EDICAO')); | |
38 | - return; | |
39 | - } | |
40 | - angular.element('#editUnidadeMedida').scope().getUnidadeMedida(unidadeMedida, edit); | |
41 | - $scope.$showPageEditWorkspace($scope.workspace); | |
42 | - }; | |
43 | -}]); |
cit-adm-materiais-web/src/main/webapp/assets/js/angular/custom/repository/UnidadeMedidaRepository.js
... | ... | @@ -1,12 +0,0 @@ |
1 | -'use strict'; | |
2 | - | |
3 | -citApp.factory('UnidadeMedidaRepository', ['RestangularAdmMateriais', 'AbstractRepository', function (restangularAdmMateriais, AbstractRepository) { | |
4 | - | |
5 | - function UnidadeMedidaRepository() { | |
6 | - AbstractRepository.call(this, restangularAdmMateriais, 'rest/unidadeMedida'); | |
7 | - } | |
8 | - | |
9 | - AbstractRepository.extend(UnidadeMedidaRepository); | |
10 | - | |
11 | - return new UnidadeMedidaRepository(); | |
12 | -}]); |
cit-adm-materiais-web/src/main/webapp/html/material/materialCaracteristica.html
... | ... | @@ -31,7 +31,7 @@ |
31 | 31 | <div class="form-group no-label"> |
32 | 32 | <div class="input-group"> |
33 | 33 | <label> |
34 | - <input type="checkbox" ng-model="materialCaracteristica.generico" value="false" /> | |
34 | + <input type="checkbox" ng-model="materialCaracteristica.generico" value="false" ng-disabled="bloquearMaterialConsumo"/> | |
35 | 35 | <translate>ADMINISTRACAODEMATERIAIS.LABEL.GENERICO</translate> |
36 | 36 | </label> |
37 | 37 | </div> | ... | ... |
cit-adm-materiais-web/src/main/webapp/html/material/materialEdit.html
... | ... | @@ -59,6 +59,13 @@ |
59 | 59 | <div class="row"> |
60 | 60 | <div class="col-sm-12"> |
61 | 61 | |
62 | + <div class="row margin-top" ng-show="material.id && material.dominioTipoMaterial.codigo == 1 && almoxarifadoAtivo"> | |
63 | + <div class="col-sm-12"> | |
64 | + <div ng-include src="'/cit-adm-materiais-web/html/material/materialEnderecoEstoque.html'" /> | |
65 | + </div> | |
66 | + </div> | |
67 | + | |
68 | + | |
62 | 69 | <div class="row margin-top" ng-show="material.dominioTipoMaterial.codigo == 1"> |
63 | 70 | <div class="col-sm-12"> |
64 | 71 | <div ng-include src="'/cit-adm-materiais-web/html/material/materialTipoUnidadeMedidaEntrada.html'" /> | ... | ... |
cit-adm-materiais-web/src/main/webapp/html/material/materialEnderecoEstoque.html
0 → 100644
... | ... | @@ -0,0 +1,155 @@ |
1 | + <div class="widget-box margin-bottom"> | |
2 | + <div class="widget-header"> | |
3 | + <h4 class="widget-title"> | |
4 | + <translate>ALMOXARIFADO.LABEL.ENDERECO_ESTOQUE</translate> <translate>LABEL.DO</translate> <translate>LABEL.MATERIAL</translate> | |
5 | + </h4> | |
6 | + <div class="widget-toolbar"> | |
7 | + <a href="#void" ng-click="widgetEnderecoEstoqueMaterialIsCollapsed = !widgetEnderecoEstoqueMaterialIsCollapsed"> | |
8 | + <i class="fa" ng-class="{'fa-chevron-up': !widgetEnderecoEstoqueMaterialIsCollapsed, 'fa-chevron-down': widgetEnderecoEstoqueMaterialIsCollapsed}"></i> | |
9 | + </a> | |
10 | + </div> | |
11 | + </div> | |
12 | + <div collapse="widgetEnderecoEstoqueMaterialIsCollapsed" class="widget-body"> | |
13 | + <div class="widget-main clearfix"> | |
14 | + <div class="row"> | |
15 | + <div class="col-sm-12"> | |
16 | + <div class="panel panel-default"> | |
17 | + <div class="panel-heading clearfix"> | |
18 | + <button title="{{$translate.instant('LABEL.ADICIONAR')}}" alt="{{$translate.instant('LABEL.ADICIONAR')}}" class="btn btn-clear" ng-click="adicionarEnderecoEstoque()" type="button"> | |
19 | + <i class="fa fa-plus-circle yellow-dark"></i> | |
20 | + <translate>LABEL.ADICIONAR</translate> </a> | |
21 | + </button> | |
22 | + | |
23 | + <button title="{{$translate.instant('LABEL.EDITAR')}}" alt="{{$translate.instant('LABEL.EDITAR')}}" class="btn btn-clear" type="button" | |
24 | + ng-click="editarEnderecoEstoque()"> | |
25 | + <i class="fa fa-pencil blue"></i> | |
26 | + <translate>LABEL.EDITAR</translate> | |
27 | + </button> | |
28 | + | |
29 | + <button title="{{$translate.instant('LABEL.REMOVER')}}" alt="{{$translate.instant('LABEL.REMOVER')}}" class="btn btn-clear" ng-click="removerEnderecoEstoque()" type="button"> | |
30 | + <i class="fa fa-close red"></i> | |
31 | + <translate>LABEL.REMOVER</translate> </a> | |
32 | + </button> | |
33 | + | |
34 | + <button title="{{$translate.instant('PORTAL.LABEL.BLOQUEAR')}}" alt="{{$translate.instant('PORTAL.LABEL.BLOQUEAR')}}" class="btn btn-clear" ng-show="!matEndEstoqueCheck.dataBloqueio" ng-click="bloquearEnderecoEstoque()" type="button"> | |
35 | + <i class="fa fa-lock"></i> | |
36 | + <translate>PORTAL.LABEL.BLOQUEAR</translate> </a> | |
37 | + </button> | |
38 | + | |
39 | + <button type="button" title="{{$translate.instant('LABEL.DESBLOQUEAR')}}" alt="{{$translate.instant('LABEL.DESBLOQUEAR')}}" class="btn btn-clear" ng-show="matEndEstoqueCheck.dataBloqueio" ng-click="desbloquearEnderecoEstoque();"> | |
40 | + <i class="fa fa-unlock grey"></i> <translate>LABEL.DESBLOQUEAR</translate> | |
41 | + </button> | |
42 | + | |
43 | + </div> | |
44 | + | |
45 | + <table class="table table-bordered table-striped"> | |
46 | + <thead> | |
47 | + <tr> | |
48 | + <th class="text-center" style="width: 5%;"></th> | |
49 | + | |
50 | + <th style="width: 10%;"> | |
51 | + <translate>LABEL.CODIGO</translate> | |
52 | + </th> | |
53 | + <th style="width: 25%;"> | |
54 | + <translate>LABEL.DESCRICAO</translate> | |
55 | + </th> | |
56 | + <th style="width: 25%;"> | |
57 | + <translate>ALMOXARIFADO.LABEL.ALMOXARIFADO</translate> | |
58 | + </th> | |
59 | + <th style="width: 15%;"> | |
60 | + <translate>LABEL.CAPACIDADE</translate> | |
61 | + </th> | |
62 | + <th style="width: 10%;"> | |
63 | + <translate>LABEL.PRINCIPAL</translate> | |
64 | + </th> | |
65 | + <th style="width: 15%;"> | |
66 | + <translate>LABEL.DATA_BLOQUEIO</translate> | |
67 | + </th> | |
68 | + </tr> | |
69 | + </thead> | |
70 | + <tbody> | |
71 | + <tr ng-repeat="matEndEstoque in listaMaterialEnderecoEstoque"> | |
72 | + <td class="text-center"> | |
73 | + <input type="radio" name="matEndEstoqueSelect" ng-checked="matEndEstoque.$checked" ng-click="checkMatEndEstoque(matEndEstoque)" ng-disabled="!edit"/> | |
74 | + </td> | |
75 | + <td> | |
76 | + {{matEndEstoque.endereco.codigo}} | |
77 | + </td> | |
78 | + <td> | |
79 | + {{matEndEstoque.endereco.descricao}} | |
80 | + </td> | |
81 | + <td> | |
82 | + {{matEndEstoque.endereco.estoque.almoxarifado.codigoENome}} | |
83 | + </td> | |
84 | + <td ng-if="showInteiro"> | |
85 | + {{matEndEstoque.capacidade}} | |
86 | + </td> | |
87 | + <td ng-if="showDecimal"> | |
88 | + {{matEndEstoque.capacidade | number:2}} | |
89 | + </td> | |
90 | + <td> | |
91 | + {{matEndEstoque.localPrincipal | booleanSimNao}} | |
92 | + </td> | |
93 | + <td> | |
94 | + {{matEndEstoque.dataBloqueio | date : 'dd/MM/yyyy'}} | |
95 | + </td> | |
96 | + </tr> | |
97 | + </tbody> | |
98 | + </table> | |
99 | + | |
100 | + </div> | |
101 | + | |
102 | + </div> | |
103 | + </div><!-- .row --> | |
104 | + </div><!-- .widget-main --> | |
105 | + </div><!-- .widget-body --> | |
106 | +</div><!-- .widget-box --> | |
107 | + | |
108 | +<script type="text/ng-template" id="modal-material-endereco-estoque.html"> | |
109 | + <form name="formDialogMaterialEnderecoEstoque" novalidate > | |
110 | + <div class="modal-header"> | |
111 | + <button title="{{$translate.instant('LABEL.SALVAR')}}" alt="{{$translate.instant('LABEL.SALVAR')}}" ng-click="salvarMaterialEnderecoEstoque(formDialogMaterialEnderecoEstoque, materialLocalEstoque, almoxarifadoTemp)" class="btn btn-clear" type="button"> | |
112 | + <i class="fa fa-save green"></i> | |
113 | + <translate>LABEL.SALVAR</translate> | |
114 | + </button> | |
115 | + | |
116 | + <button title="{{$translate.instant('LABEL.CANCELAR')}}" alt="{{$translate.instant('LABEL.CANCELAR')}}" ng-click="$dismiss('cancel');" class="btn btn-clear" type="button"> | |
117 | + <i class="fa fa-times red"></i> | |
118 | + <translate>LABEL.CANCELAR</translate> | |
119 | + </button> | |
120 | + </div> | |
121 | + | |
122 | + <div class="modal-body"> | |
123 | + <div class="row"> | |
124 | + <div class="col-md-12"> | |
125 | + <auto-complete ng-id="almoxarifadoTemp" ng-label="ALMOXARIFADO.LABEL.ALMOXARIFADO" ng-model="almoxarifadoTemp" form="formDialogMaterialEnderecoEstoque" ng-obrigatorio="false" ng-find="findAutoCompleteAlmoxarifado(value)" ng-item="item.nome" /> | |
126 | + </div> | |
127 | + </div> | |
128 | + <div class="row"> | |
129 | + <div class="col-md-7"> | |
130 | + <auto-complete ng-id="materialLocalEstoque.endereco" ng-label="ALMOXARIFADO.LABEL.ENDERECO_ESTOQUE" ng-model="materialLocalEstoque.endereco" form="formDialogMaterialEnderecoEstoque" ng-obrigatorio="true" ng-find="findAutoCompleteEndereco(value, almoxarifadoTemp)" ng-item="item.descricao" /> | |
131 | + </div> | |
132 | + | |
133 | + <div class="col-md-5" ng-if="showInteiro"> | |
134 | + <label-input-number ng-id="materialLocalEstoque.capacidade" ng-model="materialLocalEstoque.capacidade" ng-custom-maxlength="4" ng-type="text" ng-label="LABEL.CAPACIDADE" ng-obrigatorio="showInteiro" form="formDialogMaterialEnderecoEstoque"/> | |
135 | + </div> | |
136 | + <div class="col-md-5" ng-if="showDecimal"> | |
137 | + <label-input-decimal ng-precisao="decimal" ng-custom-maxlength="7" ng-evento-blur="aplicarValidacaoDecimal" ng-id="materialLocalEstoque.capacidade" ng-model="materialLocalEstoque.capacidade" ng-label="LABEL.CAPACIDADE" ng-obrigatorio="showDecimal" form="formDialogMaterialEnderecoEstoque"/> | |
138 | + </div> | |
139 | + </div> | |
140 | + <div class="row"> | |
141 | + <div class="col-md-12"> | |
142 | + <label-input-checkbox ng-model="materialLocalEstoque.localPrincipal" ng-label="LABEL.PRINCIPAL" form="formDialogMaterialEnderecoEstoque"/> | |
143 | + </div> | |
144 | + </div> | |
145 | + </form> | |
146 | +</script> | |
147 | + | |
148 | + | |
149 | + | |
150 | + | |
151 | + | |
152 | + | |
153 | + | |
154 | + | |
155 | + | ... | ... |
cit-adm-materiais-web/src/main/webapp/html/material/materialTipoUnidadeMedidaEntrada.html
... | ... | @@ -16,6 +16,16 @@ |
16 | 16 | <label-select ng-id="unidadeMedidaEntrada.unidadeMedida" ng-model="unidadeMedidaEntrada.unidadeMedida" ng-label="ADMINISTRACAODEMATERIAIS.LABEL.TIPO_UNIDADE_MEDIDA_ENTRADA" ng-obrigatorio="false" ng-disabled="!edit" form="formMaterial" |
17 | 17 | ng-list="unidadesMedidaMaterialConsumo" ng-custom-options="unidadeMedidaEntrada as unidadeMedidaEntrada.descricao for unidadeMedidaEntrada" > </label-select> |
18 | 18 | </div> |
19 | + <div class="col-sm-2"> | |
20 | + <div class="form-group no-label"> | |
21 | + <div class="input-group"> | |
22 | + <label> | |
23 | + <input type="checkbox" ng-model="unidadeMedidaEntrada.isPadrao" ng-disabled="!edit"/> | |
24 | + <translate>LABEL.PADRAO</translate> | |
25 | + </label> | |
26 | + </div> | |
27 | + </div> | |
28 | + </div> | |
19 | 29 | </div> |
20 | 30 | <div class="row"> |
21 | 31 | <div class="col-sm-12"> |
... | ... | @@ -25,7 +35,7 @@ |
25 | 35 | <i class="fa fa-plus-circle yellow-dark"></i> |
26 | 36 | <translate>LABEL.ADICIONAR</translate> </a> |
27 | 37 | </button> |
28 | - | |
38 | + | |
29 | 39 | <button title="{{$translate.instant('LABEL.REMOVER')}}" alt="{{$translate.instant('LABEL.REMOVER')}}" class="btn btn-clear" ng-click="exibirDialogRemocaoUnidadeMedida()" ng-disabled="material.tiposUnidadeMedidaEntrada.length < 1 || !edit" type="button"> |
30 | 40 | <i class="fa fa-close red"></i> |
31 | 41 | <translate>LABEL.REMOVER</translate> </a> |
... | ... | @@ -35,13 +45,16 @@ |
35 | 45 | <thead> |
36 | 46 | <tr> |
37 | 47 | <th class="text-center" style="width: 5%;"></th> |
38 | - | |
48 | + | |
39 | 49 | <th style="width: 30%;"> |
40 | 50 | <translate>LABEL.UNIDADE_MEDIDA</translate> |
41 | 51 | </th> |
42 | 52 | <th style="width: 30%;"> |
43 | 53 | <translate>ADMINISTRACAODEMATERIAIS.LABEL.TIPO_NUMERICO</translate> |
44 | 54 | </th> |
55 | + <th style="width: 8%;"> | |
56 | + <translate>LABEL.PADRAO</translate> | |
57 | + </th> | |
45 | 58 | </tr> |
46 | 59 | </thead> |
47 | 60 | <tbody> |
... | ... | @@ -55,12 +68,15 @@ |
55 | 68 | <td> |
56 | 69 | {{medidaEntrada.unidadeMedida.tipoNumerico.descricao}} |
57 | 70 | </td> |
71 | + <td> | |
72 | + <input type="checkbox" ng-model="medidaEntrada.isPadrao" ng-disabled="true"/> | |
73 | + </td> | |
58 | 74 | </tr> |
59 | 75 | </tbody> |
60 | 76 | </table> |
61 | - | |
77 | + | |
62 | 78 | </div> |
63 | - | |
79 | + | |
64 | 80 | </div> |
65 | 81 | </div><!-- .row --> |
66 | 82 | </div><!-- .widget-main --> | ... | ... |
cit-adm-materiais-web/src/main/webapp/html/unidadeMedida/unidadeMedida.html
cit-adm-materiais-web/src/main/webapp/html/unidadeMedida/unidadeMedidaEdit.html
... | ... | @@ -1,97 +0,0 @@ |
1 | -<div id="editUnidadeMedida" class="page-content clearfix" ng-controller="UnidadeMedidaController"> | |
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> <translate>LABEL.SALVAR</translate> | |
8 | - </button> | |
9 | - | |
10 | - <button class="btn btn-clear" ng-click="limparUnidadeMedida()" ng-show="unidadeMedida.id === undefined"> | |
11 | - <i class="fa fa-eraser yellow-dark"></i> <translate>LABEL.LIMPAR</translate> | |
12 | - </button> | |
13 | - | |
14 | - <button class="btn btn-clear" ng-show="!edit" ng-click="edit = true"> | |
15 | - <i class="fa fa-pencil blue"></i> | |
16 | - <translate>LABEL.EDITAR</translate> | |
17 | - </button> | |
18 | - | |
19 | - <button class="btn btn-clear" ng-click="remove(unidadeMedida);" ng-show="unidadeMedida.id !== undefined"> | |
20 | - <i class="fa fa-times red"></i> <translate>LABEL.REMOVER</translate> | |
21 | - </button> | |
22 | - | |
23 | - <bloquear-desbloquear ng-model="unidadeMedida" ng-repository="UnidadeMedidaRepository" ng-edit="edit" form="unidadeMedidaForm"></bloquear-desbloquear> | |
24 | - | |
25 | - <button class="btn btn-clear" ng-click="$showPageSearchWorkspace(workspace); atualizaPaginaPesquisa();"> | |
26 | - <i class="fa fa-search"></i> <translate>LABEL.PESQUISAR</translate> | |
27 | - </button> | |
28 | - | |
29 | - </div><!-- .col --> | |
30 | - | |
31 | - <div class="col-sm-4 text-right"> | |
32 | - | |
33 | - <favorito/> | |
34 | - | |
35 | - <help-button workspace="workspace" /> | |
36 | - | |
37 | - </div><!-- .col --> | |
38 | - </div><!-- .row --> | |
39 | - </div><!-- .bar-buttons-action --> | |
40 | - | |
41 | - <breadcrumb ng-workspace="workspace"></breadcrumb> | |
42 | - | |
43 | - <form name="unidadeMedidaForm"> | |
44 | - <p> | |
45 | - <small>( <span class="red">*</span> ) <translate>LABEL.CAMPOS_OBRIGATORIOS</translate></small> | |
46 | - </p> | |
47 | - | |
48 | - <fieldset> | |
49 | - | |
50 | - <legend><translate>ADMINISTRACAODEMATERIAIS.LABEL.DADOS_UNIDADE_MEDIDA</translate></legend> | |
51 | - | |
52 | - <div class="row"> | |
53 | - | |
54 | - <div class="col-md-6"> | |
55 | - | |
56 | - <label-input-number ng-id="unidadeMedida.codigo" ng-label="LABEL.CODIGO" ng-obrigatorio="true" ng-disabled="!edit" form="unidadeMedidaForm" ng-model="unidadeMedida.codigo" ng-custom-maxlength="5"/> | |
57 | - | |
58 | - </div> | |
59 | - | |
60 | - <div class="col-md-6"> | |
61 | - | |
62 | - <label-input ng-id="unidadeMedida.descricao" ng-label="LABEL.DESCRICAO" ng-obrigatorio="true" ng-disabled="!edit" form="unidadeMedidaForm" ng-model="unidadeMedida.descricao" ng-custom-maxlength="100" /> | |
63 | - | |
64 | - </div> | |
65 | - </div> | |
66 | - <div class="row"> | |
67 | - <div class="col-md-4"> | |
68 | - | |
69 | - <label-select ng-id="unidadeMedida.tipoNumerico" ng-label="ADMINISTRACAODEMATERIAIS.LABEL.TIPO_NUMERICO" ng-model="unidadeMedida.tipoNumerico" form="unidadeMedidaForm" ng-obrigatorio="true" ng-disabled="!edit" ng-custom-options="dominio.originalElement as dominio.descricao for dominio" track-by="track by dominio.id" ng-list="tipoNumericoList" /> | |
70 | - | |
71 | - </div> | |
72 | - | |
73 | - <div class="col-md-4"> | |
74 | - | |
75 | - <label-input ng-id="unidadeMedida.sigla" ng-label="LABEL.SIGLA" ng-model="unidadeMedida.sigla" form="unidadeMedidaForm" ng-obrigatorio="true" ng-custom-maxlength="3" ng-type="text" ng-disabled="!edit" /> | |
76 | - | |
77 | - </div> | |
78 | - | |
79 | - <div class="col-md-4"> | |
80 | - | |
81 | - <i tooltip="{{$translate.instant('MSG.ALTERACAO_QUANTIDADE_PADRAO')}}"> | |
82 | - <label-input-number ng-id="unidadeMedida.quantidadePadrao" ng-label="ADMINISTRACAODEMATERIAIS.LABEL.QUANTIDADE_PADRAO" ng-model="unidadeMedida.quantidadePadrao" form="unidadeMedidaForm" ng-obrigatorio="false" ng-custom-maxlength="3" ng-type="text" ng-disabled="unidadeMedida.isUnidadePadrao || !edit"/> | |
83 | - </i> | |
84 | - </div> | |
85 | - | |
86 | - </div> | |
87 | - | |
88 | - </fieldset> | |
89 | - </form> | |
90 | -</div><!-- .page-content --> | |
91 | - | |
92 | - | |
93 | - | |
94 | - | |
95 | - | |
96 | - | |
97 | - |
cit-adm-materiais-web/src/main/webapp/html/unidadeMedida/unidadeMedidaList.html
... | ... | @@ -1,46 +0,0 @@ |
1 | -<div id="searchUnidadeMedida" class="page-content" ng-controller="UnidadeMedidaListController"> | |
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 | - <button class="btn btn-clear" ng-click="abrirVisualizar(true);"> | |
17 | - <i class="fa fa-pencil blue"></i> | |
18 | - <translate>LABEL.EDITAR</translate> | |
19 | - </button> | |
20 | - | |
21 | - <button class="btn btn-clear" ng-click="remove();"> | |
22 | - <i class="fa fa-times red"></i> | |
23 | - <translate>LABEL.REMOVER</translate> | |
24 | - </button> | |
25 | - | |
26 | - <span class="divider-vertical"></span> | |
27 | - | |
28 | - <filtros ng-filter="filterCriteria" ng-workspace="workspace"></filtros> | |
29 | - | |
30 | - </div><!-- .col --> | |
31 | - | |
32 | - <div class="col-sm-4 text-right"> | |
33 | - | |
34 | - <favorito/> | |
35 | - | |
36 | - <help-button workspace="workspace" /> | |
37 | - | |
38 | - </div><!-- .col --> | |
39 | - </div><!-- .row --> | |
40 | - </div><!-- .bar-buttons-action --> | |
41 | - | |
42 | - <breadcrumb ng-workspace="workspace"></breadcrumb> | |
43 | - | |
44 | - <list-view ng-lista="unidadeMedidaList" ng-repository="UnidadeMedidaRepository" ng-use-custom-remove="false" ng-headers="headers" ng-filter-criteria="filterCriteria" ng-item-selecionado="unidadeMedidaChecked"></list-view> | |
45 | - | |
46 | -</div><!-- .page-content --> |