fixes bug# AL-2328

dev:lucas
qua:
master
wallace.henrique 2023-04-20 19:50:01 -03:00
parent edd154ab8f
commit e48bcc11b1
59 changed files with 489 additions and 123 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.rjconsultores</groupId>
<artifactId>ModelWeb</artifactId>
<version>1.0.48</version>
<version>1.1.49</version>
<distributionManagement>
<repository>
<id>rj-releases</id>

View File

@ -42,7 +42,7 @@ import br.com.rjconsultores.auditador.interfaces.Auditavel;
*/
@Entity
@SequenceGenerator(name = "CATEGORIA_SEQ", sequenceName = "CATEGORIA_SEQ", allocationSize = 1)
@AuditarClasse(nome = "CATEGORIA", tela = "Altera<EFBFBD><EFBFBD>o de Categoria")
@AuditarClasse(nome = "CATEGORIA", tela = "auditarClasse.Categoria")
@Table(name = "CATEGORIA")
public class Categoria implements Serializable, Auditavel<Categoria>{

View File

@ -18,7 +18,7 @@ import br.com.rjconsultores.auditador.annotations.AuditarClasse;
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
import br.com.rjconsultores.auditador.interfaces.Auditavel;
@AuditarClasse(nome = "CategoriaBloqueioImpPosterior", tela = "Alteração Ponto de Venda/Categoria/Bloqueio/ImpPosterior")
@AuditarClasse(nome = "CategoriaBloqueioImpPosterior", tela = "auditarClasse.CategoriaBloqueioImpPosterior")
@Entity
@SequenceGenerator(name = "CAT_BLOQ_IMPPOSTERIOR_SEQ", sequenceName = "CAT_BLOQ_IMPPOSTERIOR_SEQ", allocationSize = 1)
@Table(name = "CATEGORIA_BLOQ_IMPPOSTERIOR")

View File

@ -32,7 +32,7 @@ import javax.persistence.SequenceGenerator;
* @author Administrador
*/
@Entity
@AuditarClasse(nome = "CategoriaClase", tela = "Alteraçăo de Categoria Classe")
@AuditarClasse(nome = "CategoriaClase", tela = "auditarClasse.CategoriaClasse")
@SequenceGenerator(name = "CATEGORIA_CLASE_SEQ", sequenceName = "CATEGORIA_CLASE_SEQ", allocationSize = 1)
@Table(name = "CATEGORIA_CLASE")
public class CategoriaClase implements Serializable, Auditavel<CategoriaClase> {

View File

@ -34,7 +34,7 @@ import br.com.rjconsultores.auditador.interfaces.Auditavel;
* @author Administrador
*/
@Entity
@AuditarClasse(nome = "CategoriaCorrida", tela = "Alteração de Categoria Corrida")
@AuditarClasse(nome = "CategoriaCorrida", tela = "auditarClasse.CategoriaCorrida")
@SequenceGenerator(name = "CATEGORIA_CORRIDA_SEQ", sequenceName = "CATEGORIA_CORRIDA_SEQ", allocationSize = 1)
@Table(name = "CATEGORIA_CORRIDA")
public class CategoriaCorrida implements Serializable, Auditavel<CategoriaCorrida> {

View File

@ -41,7 +41,7 @@ import br.com.rjconsultores.auditador.interfaces.Auditavel;
*/
@Entity
@SequenceGenerator(name = "CATEGORIA_CTRL_SEQ", sequenceName = "CATEGORIA_CTRL_SEQ", allocationSize = 1)
@AuditarClasse(nome = "CategoriaCtrl", tela = "Alteraçăo de Categoria")
@AuditarClasse(nome = "CategoriaCtrl", tela = "auditarClasse.CategoriaCtrl")
@Table(name = "CATEGORIA_CTRL")
public class CategoriaCtrl implements Serializable, Cloneable, Auditavel<CategoriaCtrl>{

View File

@ -47,7 +47,7 @@ import br.com.rjconsultores.auditador.interfaces.Auditavel;
* @author Administrador
*/
@Entity
@AuditarClasse(nome = "CategoriaDescuento", tela = "Alteração de Categoria Desconto")
@AuditarClasse(nome = "CategoriaDescuento", tela = "auditarClasse.CategoriaDescuento")
@SequenceGenerator(name = "CATEGORIA_DESCUENTO_SEQ", sequenceName = "CATEGORIA_DESCUENTO_SEQ", allocationSize = 1)
@Table(name = "CATEGORIA_DESCUENTO")
public class CategoriaDescuento implements Serializable, Auditavel<CategoriaDescuento> {

View File

@ -32,7 +32,7 @@ import javax.persistence.SequenceGenerator;
* @author Administrador
*/
@Entity
@AuditarClasse(nome = "ReservacionPuntoVenta", tela = "Alteração de Marca de Categoria")
@AuditarClasse(nome = "CategoriaMarca", tela = "auditarClasse.CategoriaMarca=")
@SequenceGenerator(name = "CATEGORIA_MARCA_SEQ", sequenceName = "CATEGORIA_MARCA_SEQ", allocationSize = 1)
@Table(name = "CATEGORIA_MARCA")
public class CategoriaMarca implements Serializable, Auditavel<CategoriaMarca> {

View File

@ -32,7 +32,7 @@ import br.com.rjconsultores.auditador.interfaces.Auditavel;
* @author Administrador
*/
@Entity
@AuditarClasse(nome = "CategoriaMercado", tela = "Alteração de Categoria Mercado")
@AuditarClasse(nome = "CategoriaMercado", tela = "auditarClasse.CategoriaMercado")
@SequenceGenerator(name = "CATEGORIA_MERCADO_SEQ", sequenceName = "CATEGORIA_MERCADO_SEQ", allocationSize = 1)
@Table(name = "CATEGORIA_MERCADO")
public class CategoriaMercado implements Serializable,Auditavel<CategoriaMercado> {

View File

@ -24,7 +24,7 @@ import br.com.rjconsultores.auditador.annotations.AuditarEntidade;
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
import br.com.rjconsultores.auditador.interfaces.Auditavel;
@AuditarClasse(nome = "CategoriaOrgao", tela = "Alteração de Categoria Orgao Concedente")
@AuditarClasse(nome = "CategoriaOrgao", tela = "auditarClasse.CategoriaOrgao")
@Entity
@SequenceGenerator(name = "CATEGORIA_ORGAO_SEQ", sequenceName = "CATEGORIA_ORGAO_SEQ", allocationSize = 1)
@Table(name = "CATEGORIA_ORGAO")

View File

@ -34,7 +34,7 @@ import javax.persistence.SequenceGenerator;
* @author Administrador
*/
@Entity
@AuditarClasse(nome = "CategoriaDescuento", tela = "Alteração de Categoria Descuento Periodo")
@AuditarClasse(nome = "CategoriaDescuento", tela = "auditarClasse.CategoriaPeriodo")
@SequenceGenerator(name = "CATEGORIA_PERIODO_SEQ", sequenceName = "CATEGORIA_PERIODO_SEQ", allocationSize = 1)
@Table(name = "CATEGORIA_PERIODO")
public class CategoriaPeriodo implements Serializable, Auditavel<CategoriaPeriodo>{

View File

@ -25,7 +25,7 @@ import br.com.rjconsultores.auditador.annotations.NaoAuditar;
import br.com.rjconsultores.auditador.interfaces.Auditavel;
@Entity
@AuditarClasse(nome = "CategoriaRuta", tela = "Alteração de Categoria de Linha")
@AuditarClasse(nome = "CategoriaRuta", tela = "auditarClasse.CategoriaRuta")
@SequenceGenerator(name = "CATEGORIA_RUTA_SEQ", sequenceName = "CATEGORIA_RUTA_SEQ", allocationSize = 1)
@Table(name = "CATEGORIA_RUTA")
public class CategoriaRuta implements Serializable, Auditavel<CategoriaRuta> {

View File

@ -24,7 +24,7 @@ import br.com.rjconsultores.auditador.annotations.NaoAuditar;
import br.com.rjconsultores.auditador.interfaces.Auditavel;
@Entity
@AuditarClasse(nome = "CategoriaRutaExcecao", tela = "Alteração de Categoria Eexceção de linha")
@AuditarClasse(nome = "CategoriaRutaExcecao", tela = "auditarClasse.CategoriaRutaExcecao")
@SequenceGenerator(name = "CATEGORIA_RUTA_EXCECAO_SEQ", sequenceName = "CATEGORIA_RUTA_EXCECAO_SEQ", allocationSize = 1)
@Table(name = "CATEGORIA_RUTA_EXCECAO")
public class CategoriaRutaExcecao implements Serializable, Auditavel<CategoriaRutaExcecao> {

View File

@ -37,7 +37,7 @@ import br.com.rjconsultores.auditador.interfaces.Auditavel;
* @author Administrador
*/
@Entity
@AuditarClasse(nome = "CategoriaDescuento", tela = "Alteração de Categoria Serviço")
@AuditarClasse(nome = "CategoriaDescuento", tela = "auditarClasse.ClaseServicio")
@SequenceGenerator(name = "CLASE_SERVICIO_SEQ", sequenceName = "CLASE_SERVICIO_SEQ", allocationSize = 1)
@Table(name = "CLASE_SERVICIO")
public class ClaseServicio implements Serializable, Auditavel<ClaseServicio> {

View File

@ -29,7 +29,7 @@ import br.com.rjconsultores.auditador.interfaces.Auditavel;
* @author vjcor
*
*/
@AuditarClasse(nome = "CobrancaAdcPuntoVenta", tela = "Alteração Cobrança de Ponto de Venda")
@AuditarClasse(nome = "CobrancaAdcPuntoVenta", tela = "auditarClasse.CobrancaAdcPuntoVenta")
@Entity
@SequenceGenerator(name = "COBRANCA_ADC_SEQ", sequenceName = "COBRANCA_ADC_SEQ", allocationSize = 1)
@Table(name = "COBRANCA_ADC_PUNTO_VENTA")

View File

@ -20,7 +20,7 @@ import br.com.rjconsultores.auditador.annotations.AuditarClasse;
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
import br.com.rjconsultores.auditador.interfaces.Auditavel;
@AuditarClasse(nome = "CoeficienteTarifa", tela = "Alteração de Coeficiente Tarifario")
@AuditarClasse(nome = "CoeficienteTarifa", tela = "auditarClasse.CoeficienteTarifa")
@Entity
@SequenceGenerator(name = "COEFICIENTE_TARIFA_SEQ", sequenceName = "COEFICIENTE_TARIFA_SEQ", allocationSize = 1)
@Table(name = "COEFICIENTE_TARIFA")

View File

@ -21,13 +21,21 @@ import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
import org.apache.commons.lang.BooleanUtils;
import org.hibernate.annotations.Where;
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
import br.com.rjconsultores.auditador.annotations.AuditarLista;
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
import br.com.rjconsultores.auditador.interfaces.Auditavel;
@Entity
@AuditarClasse(nome = "ConfRestricaoCanalVenta", tela = "auditarClasse.ConfRestricaoCanalVenta")
@SequenceGenerator(name = "CONF_RESTRICAO_CANALVENTA_SEQ", sequenceName = "CONF_RESTRICAO_CANALVENTA_SEQ", allocationSize = 1)
@Table(name = "CONF_RESTRICAO_CANALVENTA")
public class ConfRestricaoCanalVenta implements Serializable {
public class ConfRestricaoCanalVenta implements Serializable, Cloneable, Auditavel<ConfRestricaoCanalVenta>{
private static final long serialVersionUID = 1L;
@Id
@ -87,8 +95,10 @@ public class ConfRestricaoCanalVenta implements Serializable {
@OneToOne
@JoinColumn(name = "RUTA_ID")
private Ruta ruta;
@AuditarLista(auditarEntidades = true, nome = "lsConfRestricaoExcecao")
@OneToMany(mappedBy = "confRestricaoCanalVenta", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
private List<ConfRestricaoExcecao> lsConfRestricaoExcecao;
@AuditarLista(auditarEntidades = true, nome = "lsConfRestricaoPtovta")
@OneToMany(mappedBy = "confRestricaoCanalVenta", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
private List<ConfRestricaoPtovta> lsConfRestricaoPtovta;
@Column(name = "INDEXIBECONSULTAVENDAWEB")
@ -106,19 +116,23 @@ public class ConfRestricaoCanalVenta implements Serializable {
private Date fecfinvigencia;
@Column(name = "INDRESTRICAODINAMICA")
private Boolean indRestricaoDinamica;
@AuditarLista(auditarEntidades = true, nome = "lsConfRestricaoTramo")
@OneToMany(mappedBy = "confRestricaoCanalVenta", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@Where(clause="activo=1")
private List<ConfRestricaoTramo> lsConfRestricaoTramo;
@AuditarLista(auditarEntidades = true, nome = "lsConfRestricaoOrgaoConcedente")
@OneToMany(mappedBy = "confRestricaoCanalVenta", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
private List<ConfRestricaoOrgaoConcedente> lsConfRestricaoOrgaoConcedente;
@AuditarLista(auditarEntidades = true, nome = "lsConfRestricaoRutas")
@OneToMany(mappedBy = "confRestricaoCanalVenta", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
private List<ConfRestricaoRutas> lsConfRestricaoRutas;
@AuditarLista(auditarEntidades = true, nome = "lsConfRestricaoTramoOC")
@OneToMany(mappedBy = "confRestricaoCanalVenta", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
private List<ConfRestricaoTramoOC> lsConfRestricaoTramoOC;
@Transient
@NaoAuditar
private ConfRestricaoCanalVenta confRestricaoCanalVentaClone;
public ConfRestricaoCanalVenta() {
super();
@ -298,20 +312,17 @@ public class ConfRestricaoCanalVenta implements Serializable {
}
public List<ConfRestricaoExcecao> getLsConfRestricaoExcecao() {
if (this.lsConfRestricaoExcecao != null) {
List<ConfRestricaoExcecao> lsTemp = new ArrayList<ConfRestricaoExcecao>();
for (ConfRestricaoExcecao cre : this.lsConfRestricaoExcecao) {
if (cre.getActivo() == Boolean.TRUE) {
lsTemp.add(cre);
}
}
lsConfRestricaoExcecao = lsTemp;
return lsConfRestricaoExcecao;
}
return null;
List<ConfRestricaoExcecao> tmp = new ArrayList<ConfRestricaoExcecao>();
if (lsConfRestricaoExcecao != null) {
for (ConfRestricaoExcecao cm : this.lsConfRestricaoExcecao) {
if (cm.getActivo()) {
tmp.add(cm);
}
}
}
return tmp;
}
public void setLsConfRestricaoExcecao(List<ConfRestricaoExcecao> lsConfRestricaoExcecao) {
@ -320,19 +331,16 @@ public class ConfRestricaoCanalVenta implements Serializable {
public List<ConfRestricaoOrgaoConcedente> getLsConfRestricaoOrgaoConcedente() {
List<ConfRestricaoOrgaoConcedente> lsTemp = new ArrayList<ConfRestricaoOrgaoConcedente>();
if (this.lsConfRestricaoOrgaoConcedente != null) {
List<ConfRestricaoOrgaoConcedente> lsTemp = new ArrayList<ConfRestricaoOrgaoConcedente>();
for (ConfRestricaoOrgaoConcedente cre : this.lsConfRestricaoOrgaoConcedente) {
if (cre.getActivo() == Boolean.TRUE) {
lsTemp.add(cre);
}
}
lsConfRestricaoOrgaoConcedente = lsTemp;
return lsConfRestricaoOrgaoConcedente;
return lsTemp;
}
return null;
}
@ -428,10 +436,20 @@ public class ConfRestricaoCanalVenta implements Serializable {
}
public List<ConfRestricaoTramo> getLsConfRestricaoTramo() {
if(lsConfRestricaoTramo== null) {
lsConfRestricaoTramo = new ArrayList<ConfRestricaoTramo>();
}
return lsConfRestricaoTramo;
if (this.lsConfRestricaoTramo != null) {
List<ConfRestricaoTramo> lsTemp = new ArrayList<ConfRestricaoTramo>();
for (ConfRestricaoTramo cre : this.lsConfRestricaoTramo) {
if (cre.getActivo() == Boolean.TRUE) {
lsTemp.add(cre);
}
}
lsConfRestricaoTramo = lsTemp;
return lsConfRestricaoTramo;
}
return null;
}
public void setLsConfRestricaoTramo(List<ConfRestricaoTramo> lsConfRestricaoTramo) {
@ -506,4 +524,88 @@ public class ConfRestricaoCanalVenta implements Serializable {
return newConfRestricaoCanalVenda;
}
@Override
public void clonar() throws CloneNotSupportedException {
confRestricaoCanalVentaClone = new ConfRestricaoCanalVenta();
confRestricaoCanalVentaClone = (ConfRestricaoCanalVenta) this.clone();
if(this.getLsConfRestricaoTramo() != null) {
List<ConfRestricaoTramo> lsClones = new ArrayList<ConfRestricaoTramo>();
for (ConfRestricaoTramo confRestricaoTramo : this.getLsConfRestricaoTramo()) {
if(BooleanUtils.isTrue(confRestricaoTramo.getActivo())) {
confRestricaoTramo.clonar();
lsClones.add(confRestricaoTramo.getCloneObject());
}
}
confRestricaoCanalVentaClone.setLsConfRestricaoTramo(lsClones);
}
if(this.getLsConfRestricaoExcecao() != null) {
List<ConfRestricaoExcecao> lsClones = new ArrayList<ConfRestricaoExcecao>();
for (ConfRestricaoExcecao confRestricaoExcecao : this.getLsConfRestricaoExcecao()) {
if(BooleanUtils.isTrue(confRestricaoExcecao.getActivo())) {
confRestricaoExcecao.clonar();
lsClones.add(confRestricaoExcecao.getCloneObject());
}
}
confRestricaoCanalVentaClone.setLsConfRestricaoExcecao(lsClones);
}
if(this.getLsConfRestricaoOrgaoConcedente()!= null) {
List<ConfRestricaoOrgaoConcedente> lsClones = new ArrayList<ConfRestricaoOrgaoConcedente>();
for (ConfRestricaoOrgaoConcedente confRestricaoOrgaoConcedente : this.getLsConfRestricaoOrgaoConcedente()) {
if(BooleanUtils.isTrue(confRestricaoOrgaoConcedente.getActivo())) {
confRestricaoOrgaoConcedente.clonar();
lsClones.add(confRestricaoOrgaoConcedente.getCloneObject());
}
}
confRestricaoCanalVentaClone.setLsConfRestricaoOrgaoConcedente(lsClones);
}
if(this.getLsConfRestricaoPtovta()!= null) {
List<ConfRestricaoPtovta> lsClones = new ArrayList<ConfRestricaoPtovta>();
for (ConfRestricaoPtovta confRestricaoPtovta : this.getLsConfRestricaoPtovta()) {
if(BooleanUtils.isTrue(confRestricaoPtovta.getActivo())) {
confRestricaoPtovta.clonar();
lsClones.add(confRestricaoPtovta.getCloneObject());
}
}
confRestricaoCanalVentaClone.setLsConfRestricaoPtovta(lsClones);
}
if(this.getLsConfRestricaoRutas()!= null) {
List<ConfRestricaoRutas> lsClones = new ArrayList<ConfRestricaoRutas>();
for (ConfRestricaoRutas confRestricaoRutas : this.getLsConfRestricaoRutas()) {
if(BooleanUtils.isTrue(confRestricaoRutas.getActivo())) {
confRestricaoRutas.clonar();
lsClones.add(confRestricaoRutas.getCloneObject());
}
}
confRestricaoCanalVentaClone.setLsConfRestricaoRutas(lsClones);
}
if(this.getLsConfRestricaoTramoOC()!= null) {
List<ConfRestricaoTramoOC> lsClones = new ArrayList<ConfRestricaoTramoOC>();
for (ConfRestricaoTramoOC confRestricaoTramoOC : this.getLsConfRestricaoTramoOC()) {
if(BooleanUtils.isTrue(confRestricaoTramoOC.getActivo())) {
confRestricaoTramoOC.clonar();
lsClones.add(confRestricaoTramoOC.getCloneObject());
}
}
confRestricaoCanalVentaClone.setLsConfRestricaoTramoOC(lsClones);
}
}
@Override
public ConfRestricaoCanalVenta getCloneObject() throws CloneNotSupportedException {
return confRestricaoCanalVentaClone;
}
@Override
public String getTextoInclusaoExclusao() {
return String.format("ID [%s]", getConfRestricaoCanalVentaId());
}
}

View File

@ -16,11 +16,20 @@ import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
import org.hibernate.Hibernate;
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
import br.com.rjconsultores.auditador.annotations.AuditarEntidade;
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
import br.com.rjconsultores.auditador.interfaces.Auditavel;
@Entity
@AuditarClasse(nome = "ConfRestricaoExcecao", tela = "auditarClasse.ConfRestricaoExcecao")
@SequenceGenerator(name = "CONF_RESTRICAO_EXCECAO_SEQ", sequenceName = "CONF_RESTRICAO_EXCECAO_SEQ", allocationSize = 1)
@Table(name = "CONF_RESTRICAO_EXCECAO")
public class ConfRestricaoExcecao implements Serializable {
public class ConfRestricaoExcecao implements Serializable, Auditavel<ConfRestricaoExcecao> {
private static final long serialVersionUID = 1L;
@Id
@ -40,9 +49,13 @@ public class ConfRestricaoExcecao implements Serializable {
private Date fecmodif;
@Column(name = "USUARIO_ID")
private Integer usuarioId;
@NaoAuditar
@JoinColumn(name = "CONFRESTRICAOTRAMO_ID", referencedColumnName = "CONFRESTRICAOTRAMO_ID")
@OneToOne
private ConfRestricaoTramo confRestricaoTramo;
@NaoAuditar
@Transient
private ConfRestricaoExcecao confRestricaoExcecaoClone;
public Integer getConfRestricaoExcecaoId() {
@ -146,5 +159,23 @@ public class ConfRestricaoExcecao implements Serializable {
}
return true;
}
@Override
public void clonar() throws CloneNotSupportedException {
confRestricaoExcecaoClone = new ConfRestricaoExcecao();
confRestricaoExcecaoClone = (ConfRestricaoExcecao) this.clone();
Hibernate.initialize(confRestricaoExcecaoClone.getConfRestricaoCanalVenta());
}
@Override
public ConfRestricaoExcecao getCloneObject() throws CloneNotSupportedException {
return confRestricaoExcecaoClone;
}
@Override
public String getTextoInclusaoExclusao() {
return String.format("ID [%s]", getConfRestricaoTramo().getOrigem().getDescparada()+"-"+getConfRestricaoTramo().getDestino().getDescparada());
}
}

View File

@ -16,11 +16,19 @@ import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
import org.hibernate.Hibernate;
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
import br.com.rjconsultores.auditador.interfaces.Auditavel;
@Entity
@AuditarClasse(nome = "ConfRestricaoOrgaoConcedente", tela = "auditarClasse.ConfRestricaoOrgaoConcedente")
@SequenceGenerator(name = "CONF_REST_ORGAOCONCEDENTE_SEQ", sequenceName = "CONF_REST_ORGAOCONCEDENTE_SEQ", allocationSize = 1)
@Table(name = "CONF_REST_ORGAOCONCEDENTE")
public class ConfRestricaoOrgaoConcedente implements Serializable {
public class ConfRestricaoOrgaoConcedente implements Serializable, Auditavel<ConfRestricaoOrgaoConcedente>{
private static final long serialVersionUID = 1L;
@Id
@ -47,6 +55,10 @@ public class ConfRestricaoOrgaoConcedente implements Serializable {
@Column(name = "USUARIO_ID")
private Integer usuarioId;
@Transient
@NaoAuditar
private ConfRestricaoOrgaoConcedente confRestricaoOrgaoConcedenteClone;
public ConfRestricaoOrgaoConcedente() {
super();
}
@ -129,4 +141,22 @@ public class ConfRestricaoOrgaoConcedente implements Serializable {
return "ConfRestricaoOrgaoConcedente [confRestOrgaoConcedenteId=" + confRestOrgaoConcedenteId + ", orgaoConcedente=" + orgaoConcedente + ", confRestricaoCanalVenta=" + confRestricaoCanalVenta + ", activo=" + activo + ", fecmodif=" + fecmodif + ", usuarioId=" + usuarioId + "]";
}
@Override
public void clonar() throws CloneNotSupportedException {
confRestricaoOrgaoConcedenteClone = new ConfRestricaoOrgaoConcedente();
confRestricaoOrgaoConcedenteClone = (ConfRestricaoOrgaoConcedente) this.clone();
Hibernate.initialize(confRestricaoOrgaoConcedenteClone.getConfRestricaoCanalVenta());
}
@Override
public ConfRestricaoOrgaoConcedente getCloneObject() throws CloneNotSupportedException {
return confRestricaoOrgaoConcedenteClone;
}
@Override
public String getTextoInclusaoExclusao() {
return String.format("ID [%s]", getOrgaoConcedente().getDescOrgao());
}
}

View File

@ -16,11 +16,19 @@ import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
import org.hibernate.Hibernate;
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
import br.com.rjconsultores.auditador.interfaces.Auditavel;
@Entity
@AuditarClasse(nome = "ConfRestricaoOrgaoConcedente", tela = "auditarClasse.ConfRestricaoPtovta")
@SequenceGenerator(name = "CONF_RESTRICAO_PTOVTA_SEQ", sequenceName = "CONF_RESTRICAO_PTOVTA_SEQ", allocationSize = 1)
@Table(name = "CONF_RESTRICAO_PTOVTA")
public class ConfRestricaoPtovta implements Serializable {
public class ConfRestricaoPtovta implements Serializable, Auditavel<ConfRestricaoPtovta>{
private static final long serialVersionUID = 1L;
@Id
@ -44,6 +52,9 @@ public class ConfRestricaoPtovta implements Serializable {
@JoinColumn(name = "CONFRESTRICAOTRAMO_ID", referencedColumnName = "CONFRESTRICAOTRAMO_ID")
@OneToOne
private ConfRestricaoTramo confRestricaoTramo;
@Transient
@NaoAuditar
private ConfRestricaoPtovta confRestricaoPtovtaClone;
public Integer getConfRestricaoPtovtaId() {
return confRestricaoPtovtaId;
@ -153,5 +164,22 @@ public class ConfRestricaoPtovta implements Serializable {
public String toString() {
return "ConfRestricaoPtovta [confRestricaoPtovtaId=" + confRestricaoPtovtaId + ", confRestricaoCanalVenta=" + confRestricaoCanalVenta + ", puntoVenta=" + puntoVenta + ", activo=" + activo + ", fecmodif=" + fecmodif + ", usuarioId=" + usuarioId + "]";
}
@Override
public void clonar() throws CloneNotSupportedException {
confRestricaoPtovtaClone = new ConfRestricaoPtovta();
confRestricaoPtovtaClone = (ConfRestricaoPtovta) this.clone();
Hibernate.initialize(confRestricaoPtovtaClone.getConfRestricaoCanalVenta());
}
@Override
public ConfRestricaoPtovta getCloneObject() throws CloneNotSupportedException {
return confRestricaoPtovtaClone;
}
@Override
public String getTextoInclusaoExclusao() {
return String.format("ID [%s]", getPuntoVenta().getNombpuntoventa());
}
}

View File

@ -16,11 +16,19 @@ import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
import org.hibernate.Hibernate;
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
import br.com.rjconsultores.auditador.interfaces.Auditavel;
@Entity
@AuditarClasse(nome = "ConfRestricaoRutas", tela = "auditarClasse.ConfRestricaoRutas")
@SequenceGenerator(name = "CONF_REST_RUTAS_SEQ", sequenceName = "CONF_REST_RUTAS_SEQ", allocationSize = 1)
@Table(name = "CONF_REST_RUTAS")
public class ConfRestricaoRutas implements Serializable {
public class ConfRestricaoRutas implements Serializable, Auditavel<ConfRestricaoRutas>{
private static final long serialVersionUID = 1L;
@Id
@ -47,6 +55,10 @@ public class ConfRestricaoRutas implements Serializable {
@Column(name = "USUARIO_ID")
private Integer usuarioId;
@Transient
@NaoAuditar
private ConfRestricaoRutas confRestricaoRutasClone;
public ConfRestricaoRutas() {
super();
}
@ -128,5 +140,21 @@ public class ConfRestricaoRutas implements Serializable {
public String toString() {
return "ConfRestricaoRutas [confRestRutasId=" + confRestRutasId + ", ruta=" + ruta + ", confRestricaoCanalVenta=" + confRestricaoCanalVenta + ", activo=" + activo + ", fecmodif=" + fecmodif + ", usuarioId=" + usuarioId + "]";
}
@Override
public void clonar() throws CloneNotSupportedException {
confRestricaoRutasClone = new ConfRestricaoRutas();
confRestricaoRutasClone = (ConfRestricaoRutas) this.clone();
Hibernate.initialize(confRestricaoRutasClone.getConfRestricaoCanalVenta());
}
@Override
public ConfRestricaoRutas getCloneObject() throws CloneNotSupportedException {
return confRestricaoRutasClone;
}
@Override
public String getTextoInclusaoExclusao() {
return String.format("ID [%s]", getRuta().getDescruta());
}
}

View File

@ -16,11 +16,20 @@ import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
import org.hibernate.Hibernate;
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
import br.com.rjconsultores.auditador.annotations.AuditarEntidade;
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
import br.com.rjconsultores.auditador.interfaces.Auditavel;
@Entity
@AuditarClasse(nome = "ConfRestricaoTramo", tela = "auditarClasse.ConfRestricaoTramo")
@SequenceGenerator(name = "CONF_RESTRICAO_TRAMO_SEQ", sequenceName = "CONF_RESTRICAO_TRAMO_SEQ", allocationSize = 1)
@Table(name = "CONF_RESTRICAO_TRAMO")
public class ConfRestricaoTramo implements Serializable {
public class ConfRestricaoTramo implements Serializable, Auditavel<ConfRestricaoTramo> {
private static final long serialVersionUID = 1L;
@ -33,6 +42,7 @@ public class ConfRestricaoTramo implements Serializable {
@JoinColumn(name = "CONFRESTRICAOCANALVENTA_ID", referencedColumnName = "CONFRESTRICAOCANALVENTA_ID")
@ManyToOne
private ConfRestricaoCanalVenta confRestricaoCanalVenta;
@AuditarEntidade
@OneToOne
@JoinColumn(name = "TIPOPTOVTA_ID")
private TipoPuntoVenta tipoPuntoVenta;
@ -66,6 +76,9 @@ public class ConfRestricaoTramo implements Serializable {
private Date fecmodif;
@Column(name = "USUARIO_ID")
private Integer usuarioId;
@Transient
@NaoAuditar
private ConfRestricaoTramo confRestricaoTramoClone;
public Long getConfRestricaoTramoId() {
return confRestricaoTramoId;
@ -270,5 +283,24 @@ public class ConfRestricaoTramo implements Serializable {
}
return true;
}
@Override
public void clonar() throws CloneNotSupportedException {
confRestricaoTramoClone = new ConfRestricaoTramo();
confRestricaoTramoClone = (ConfRestricaoTramo) this.clone();
Hibernate.initialize(confRestricaoTramoClone.getConfRestricaoCanalVenta());
}
@Override
public ConfRestricaoTramo getCloneObject() throws CloneNotSupportedException {
return confRestricaoTramoClone;
}
@Override
public String getTextoInclusaoExclusao() {
return String.format("ID [%s]", getOrigem().getDescparada()+"-"+getDestino().getDescparada());
}
}

View File

@ -16,11 +16,19 @@ import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
import org.hibernate.Hibernate;
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
import br.com.rjconsultores.auditador.interfaces.Auditavel;
@Entity
@AuditarClasse(nome = "ConfRestricaoTramoOC", tela = "auditarClasse.ConfRestricaoTramoOC")
@SequenceGenerator(name = "CONF_REST_TRAMOOC_SEQ", sequenceName = "CONF_REST_TRAMOOC_SEQ", allocationSize = 1)
@Table(name = "CONF_REST_TRAMOOC")
public class ConfRestricaoTramoOC implements Serializable {
public class ConfRestricaoTramoOC implements Serializable, Auditavel<ConfRestricaoTramoOC> {
private static final long serialVersionUID = 1L;
@Id
@ -50,6 +58,10 @@ public class ConfRestricaoTramoOC implements Serializable {
@Column(name = "USUARIO_ID")
private Integer usuarioId;
@Transient
@NaoAuditar
private ConfRestricaoTramoOC confRestricaoTramoOCClone;
public ConfRestricaoTramoOC() {
super();
@ -146,4 +158,22 @@ public class ConfRestricaoTramoOC implements Serializable {
public String toString() {
return "ConfRestricaoTramoOC [confRestTramoOCId=" + confRestTramoOCId + ", origem=" + origem + ", destino=" + destino + ", confRestricaoCanalVenta=" + confRestricaoCanalVenta + ", activo=" + activo + ", fecmodif=" + fecmodif + ", usuarioId=" + usuarioId + "]";
}
@Override
public void clonar() throws CloneNotSupportedException {
confRestricaoTramoOCClone = new ConfRestricaoTramoOC();
confRestricaoTramoOCClone = (ConfRestricaoTramoOC) this.clone();
Hibernate.initialize(confRestricaoTramoOCClone.getConfRestricaoCanalVenta());
}
@Override
public ConfRestricaoTramoOC getCloneObject() throws CloneNotSupportedException {
return confRestricaoTramoOCClone;
}
@Override
public String getTextoInclusaoExclusao() {
return String.format("ID [%s]", getOrigem().getDescparada()+"-"+getDestino().getDescparada());
}
}

View File

@ -15,11 +15,17 @@ import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
import br.com.rjconsultores.auditador.interfaces.Auditavel;
@Entity
@AuditarClasse(nome = "ConfRestricaoVendaWeb", tela = "auditarClasse.ConfRestricaoVendaWeb")
@SequenceGenerator(name = "CONF_RESTRICAO_VENDAWEB_SEQ", sequenceName = "CONF_RESTRICAO_VENDAWEB_SEQ", allocationSize = 1)
@Table(name = "CONF_RESTRICAO_VENDAWEB")
public class ConfRestricaoVendaWeb implements Serializable {
public class ConfRestricaoVendaWeb implements Serializable, Auditavel<ConfRestricaoVendaWeb>{
private static final long serialVersionUID = 1L;
@Id
@ -40,6 +46,9 @@ public class ConfRestricaoVendaWeb implements Serializable {
private Date fecmodif;
@Column(name = "USUARIO_ID")
private Integer usuarioId;
@NaoAuditar
@Transient
private ConfRestricaoVendaWeb confRestricaoVendaWebClone;
public Integer getConfRestricaoVendaWebId() {
return confRestricaoVendaWebId;
@ -77,4 +86,23 @@ public class ConfRestricaoVendaWeb implements Serializable {
public void setUsuarioId(Integer usuarioId) {
this.usuarioId = usuarioId;
}
@Override
public void clonar() throws CloneNotSupportedException {
confRestricaoVendaWebClone = new ConfRestricaoVendaWeb();
confRestricaoVendaWebClone = (ConfRestricaoVendaWeb) this.clone();
}
@Override
public ConfRestricaoVendaWeb getCloneObject() throws CloneNotSupportedException {
return confRestricaoVendaWebClone;
}
@Override
public String getTextoInclusaoExclusao() {
return String.format("ID [%s]", "Empresa: "+getEmpresa().getNombempresa()+"- Valor: "+getValor());
}
}

View File

@ -40,7 +40,7 @@ import br.com.rjconsultores.auditador.interfaces.Auditavel;
@Entity
@SequenceGenerator(name = "ESQUEMA_CORRIDA_SEQ", sequenceName = "ESQUEMA_CORRIDA_SEQ", allocationSize = 1)
@Table(name = "ESQUEMA_CORRIDA")
@AuditarClasse(nome = "ESQUEMA_CORRIDA", tela = "Configuração de Serviços")
@AuditarClasse(nome = "ESQUEMA_CORRIDA", tela = "auditarClasse.EsquemaCorrida")
public class EsquemaCorrida implements Serializable, Auditavel<EsquemaCorrida> {
private static final long serialVersionUID = 1L;

View File

@ -37,7 +37,7 @@ import br.com.rjconsultores.auditador.interfaces.Auditavel;
*
* @author Administrador
*/
@AuditarClasse(nome = "Forma Pagamento", tela = "Forma Pagamento")
@AuditarClasse(nome = "Forma Pagamento", tela = "auditarClasse.FormaPago")
@Entity
@SequenceGenerator(name = "FORMA_PAGO_SEQ", sequenceName = "FORMA_PAGO_SEQ", allocationSize = 1)
@Table(name = "FORMA_PAGO")

View File

@ -33,7 +33,7 @@ import br.com.rjconsultores.auditador.interfaces.Auditavel;
*
* @author Administrador
*/
@AuditarClasse(nome = "FormaPagoDet", tela = "Alteração de Forma Pago Detalhe Ponto de Venda")
@AuditarClasse(nome = "FormaPagoDet", tela = "auditarClasse.FormaPagoDet")
@Entity
@SequenceGenerator(name = "FORMA_PAGO_DET_SEQ", sequenceName = "FORMA_PAGO_DET_SEQ", allocationSize = 1)
@Table(name = "FORMA_PAGO_DET")

View File

@ -23,7 +23,7 @@ import br.com.rjconsultores.auditador.annotations.AuditarClasse;
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
import br.com.rjconsultores.auditador.interfaces.Auditavel;
@AuditarClasse(nome = "HistoricoFormaPagoPuntoVenta", tela = "Alteracao Forma Pago Ponto de Venda/Historico")
@AuditarClasse(nome = "HistoricoFormaPagoPuntoVenta", tela = "auditarClasse.HistoricoFormaPagoPuntoVenta")
@Entity
@SequenceGenerator(name = "HIST_FORMAPAGOPUNTOVENTA_SEQ", sequenceName = "HIST_FORMAPAGOPUNTOVENTA_SEQ", allocationSize = 1)
@Table(name = "HIST_FORMAPAGO_PUNTOVENTA")

View File

@ -23,7 +23,7 @@ import br.com.rjconsultores.auditador.annotations.AuditarClasse;
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
import br.com.rjconsultores.auditador.interfaces.Auditavel;
@AuditarClasse(nome = "HistoricoPuntoVenta", tela = "Alteração Ponto de Venda/Historico")
@AuditarClasse(nome = "HistoricoPuntoVenta", tela = "auditarClasse.HistoricoPuntoVenta")
@Entity
@SequenceGenerator(name = "HIST_PUNTOVENTA_SEQ", sequenceName = "HIST_PUNTOVENTA_SEQ", allocationSize = 1)
@Table(name = "HIST_PUNTOVENTA")

View File

@ -24,7 +24,7 @@ import br.com.rjconsultores.auditador.annotations.AuditarClasse;
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
import br.com.rjconsultores.auditador.interfaces.Auditavel;
@AuditarClasse(nome = "ORGAO_CANCELACION", tela = "Alteração de Orgao Cancelamento")
@AuditarClasse(nome = "ORGAO_CANCELACION", tela = "auditarClasse.OrgaoCancelacion")
@Entity
@Table(name = "ORGAO_CANCELACION")
@SequenceGenerator(name = "ORGAO_CANCELACION_SEQ", sequenceName = "ORGAO_CANCELACION_SEQ", allocationSize = 1)

View File

@ -32,7 +32,7 @@ import br.com.rjconsultores.auditador.annotations.AuditarLista;
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
import br.com.rjconsultores.auditador.interfaces.Auditavel;
@AuditarClasse(nome = "OrgaoConcedente", tela = "Alteração de Orgao Concedente")
@AuditarClasse(nome = "OrgaoConcedente", tela = "auditarClasse.OrgaoConcedente")
@Entity
@SequenceGenerator(name = "ORGAO_CONCEDENTE_SEQ", sequenceName = "ORGAO_CONCEDENTE_SEQ", allocationSize = 1)
@Table(name = "ORGAO_CONCEDENTE")
@ -88,12 +88,12 @@ public class OrgaoConcedente implements Serializable, Auditavel<OrgaoConcedente>
private Boolean indValDocObligatorioMonitrip;
@Column(name = "INDVALDOCOBLIGATORIOEMBARCADA")
private Boolean indValDocObligatorioEmbarcada;
@Column(name = "TAXACONVENIENCIAPORC")
private BigDecimal taxaConvenienciaPorc;
@Column(name = "MAXTAXACONVENIENCIAPORTARIFA")
private BigDecimal maximoTaxaConvenienciaPorTarifa;
@Column(name = "MENSAGEMRECIBOTXCONVENIENCIA")
private String mensagemReciboTaxaDeConveniencia;
// @Column(name = "TAXACONVENIENCIAPORC")
// private BigDecimal taxaConvenienciaPorc;
// @Column(name = "MAXTAXACONVENIENCIAPORTARIFA")
// private BigDecimal maximoTaxaConvenienciaPorTarifa;
// @Column(name = "MENSAGEMRECIBOTXCONVENIENCIA")
// private String mensagemReciboTaxaDeConveniencia;
@ -320,21 +320,21 @@ public class OrgaoConcedente implements Serializable, Auditavel<OrgaoConcedente>
this.indValDocObligatorioEmbarcada = indValDocObligatorioEmbarcada;
}
public BigDecimal getTaxaConvenienciaPorc() {
return taxaConvenienciaPorc;
}
public void setTaxaConvenienciaPorc(BigDecimal taxaConvenienciaPorc) {
this.taxaConvenienciaPorc = taxaConvenienciaPorc;
}
public BigDecimal getMaximoTaxaConvenienciaPorTarifa() {
return maximoTaxaConvenienciaPorTarifa;
}
public void setMaximoTaxaConvenienciaPorTarifa(BigDecimal maximoTaxaConvenienciaPorTarifa) {
this.maximoTaxaConvenienciaPorTarifa = maximoTaxaConvenienciaPorTarifa;
}
// public BigDecimal getTaxaConvenienciaPorc() {
// return taxaConvenienciaPorc;
// }
//
// public void setTaxaConvenienciaPorc(BigDecimal taxaConvenienciaPorc) {
// this.taxaConvenienciaPorc = taxaConvenienciaPorc;
// }
//
// public BigDecimal getMaximoTaxaConvenienciaPorTarifa() {
// return maximoTaxaConvenienciaPorTarifa;
// }
//
// public void setMaximoTaxaConvenienciaPorTarifa(BigDecimal maximoTaxaConvenienciaPorTarifa) {
// this.maximoTaxaConvenienciaPorTarifa = maximoTaxaConvenienciaPorTarifa;
// }
@Override
public int hashCode() {
@ -377,13 +377,13 @@ public class OrgaoConcedente implements Serializable, Auditavel<OrgaoConcedente>
this.taxaConvenienciaSVI = taxaConvenienciaSVI;
}
public String getMensagemReciboTaxaDeConveniencia() {
return mensagemReciboTaxaDeConveniencia;
}
public void setMensagemReciboTaxaDeConveniencia(String mensagemReciboTaxaDeConveniencia) {
this.mensagemReciboTaxaDeConveniencia = mensagemReciboTaxaDeConveniencia;
}
// public String getMensagemReciboTaxaDeConveniencia() {
// return mensagemReciboTaxaDeConveniencia;
// }
//
// public void setMensagemReciboTaxaDeConveniencia(String mensagemReciboTaxaDeConveniencia) {
// this.mensagemReciboTaxaDeConveniencia = mensagemReciboTaxaDeConveniencia;
// }
@Override
public void clonar() throws CloneNotSupportedException {

View File

@ -22,7 +22,7 @@ import org.hibernate.Hibernate;
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
import br.com.rjconsultores.auditador.interfaces.Auditavel;
@AuditarClasse(nome = "OrgaoEmpParam", tela = "Alteração de Orgao Empresa Parametro")
@AuditarClasse(nome = "OrgaoEmpParam", tela = "auditarClasse.OrgaoEmpParam")
@Entity
@SequenceGenerator(name = "ORGAO_EMP_PARAM_SEQ", sequenceName = "ORGAO_EMP_PARAM_SEQ", allocationSize = 1)
@Table(name = "ORGAO_EMP_PARAM")

View File

@ -31,7 +31,7 @@ import br.com.rjconsultores.auditador.interfaces.Auditavel;
*
* @author Desenvolvimento
*/
@AuditarClasse(nome = "ParamRecoleccion", tela = "Alteração de Param Coleccion Pnoto de Venda")
@AuditarClasse(nome = "ParamRecoleccion", tela = "auditarClasse.ParamRecoleccion")
@Entity
@SequenceGenerator(name = "PARAM_RECOLECCION_SEQ", sequenceName = "PARAM_RECOLECCION_SEQ", allocationSize = 1)
@Table(name = "PARAM_RECOLECCION")

View File

@ -32,7 +32,7 @@ import br.com.rjconsultores.auditador.interfaces.Auditavel;
*
* @author RJ
*/
@AuditarClasse(nome = "PtoVtaCheckin", tela = "Alteração de Localidades/Permitidas/Checkin Ponto de Venda")
@AuditarClasse(nome = "PtoVtaCheckin", tela = "auditarClasse.PtoVtaCheckin")
@Entity
@SequenceGenerator(name = "PTOVTA_CHECKIN_SEQ", sequenceName = "PTOVTA_CHECKIN_SEQ", allocationSize = 1)
@Table(name = "PTOVTA_CHECKIN")

View File

@ -31,7 +31,7 @@ import br.com.rjconsultores.auditador.interfaces.Auditavel;
*
* @author RJ
*/
@AuditarClasse(nome = "PtoVtaSeguro", tela = "Alteração de Seguro no Ponto de Venda")
@AuditarClasse(nome = "PtoVtaSeguro", tela = "auditarClasse.PtoVtaSeguro")
@Entity
@SequenceGenerator(name = "PTOVTA_SEGURO_SEQ", sequenceName = "PTOVTA_SEGURO_SEQ", allocationSize = 1)
@Table(name = "PTOVTA_SEGURO")

View File

@ -29,7 +29,7 @@ import br.com.rjconsultores.auditador.interfaces.Auditavel;
*
* @author Desenvolvimento
*/
@AuditarClasse(nome = "PtoVtaUsuarioBancario", tela = "Alteração Ponto de Venda/Usuario Bancario")
@AuditarClasse(nome = "PtoVtaUsuarioBancario", tela = "auditarClasse.PtoVtaUsuarioBancario")
@Entity
@Table(name = "PTOVTA_USUARIO_BANCARIO")
public class PtoVtaUsuarioBancario implements Serializable, Auditavel<PtoVtaUsuarioBancario> {

View File

@ -32,7 +32,7 @@ import br.com.rjconsultores.auditador.interfaces.Auditavel;
*
* @author Rafael
*/
@AuditarClasse(nome = "PtovtaAntecipacomissao", tela = "Alteração Ponto de Venda/Antecipação Comissão")
@AuditarClasse(nome = "PtovtaAntecipacomissao", tela = "auditarClasse.PtovtaAntecipacomissao")
@Entity
@SequenceGenerator(name = "PTOVTA_ANTECIPACOMISSAO_SEQ", sequenceName = "PTOVTA_ANTECIPACOMISSAO_SEQ", allocationSize = 1)
@Table(name = "PTOVTA_ANTECIPACOMISSAO")

View File

@ -30,7 +30,7 @@ import br.com.rjconsultores.auditador.interfaces.Auditavel;
/**
* @author Wilian
*/
@AuditarClasse(nome = "PtovtaAntifraude", tela = "Alteração Ponto de Venda/Antifraude")
@AuditarClasse(nome = "PtovtaAntifraude", tela = "auditarClasse.PtovtaAntifraude")
@Entity
@SequenceGenerator(name = "PTOVTA_ANTIFRAUDE_SEQ", sequenceName = "PTOVTA_ANTIFRAUDE_SEQ", allocationSize = 1)
@Table(name = "PTOVTA_ANTIFRAUDE")

View File

@ -23,7 +23,7 @@ import br.com.rjconsultores.auditador.annotations.AuditarClasse;
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
import br.com.rjconsultores.auditador.interfaces.Auditavel;
@AuditarClasse(nome = "PtovtaCatInd", tela = "Alteração de Categoria Ponto de Venda")
@AuditarClasse(nome = "PtovtaCatInd", tela = "auditarClasse.PtovtaCatInd")
@Entity
@SequenceGenerator(name = "PTOVTA_CAT_IND_SEQ", sequenceName = "PTOVTA_CAT_IND_SEQ", allocationSize = 1)
@Table(name = "PTOVTA_CAT_IND")

View File

@ -37,7 +37,7 @@ import br.com.rjconsultores.auditador.interfaces.Auditavel;
*
* @author Rafael
*/
@AuditarClasse(nome = "PtovtaComissao", tela = "Alteração Ponto Veda/Comissão")
@AuditarClasse(nome = "PtovtaComissao", tela = "auditarClasse.PtovtaComissao")
@Entity
@SequenceGenerator(name = "PTOVTA_COMISSAO_SEQ", sequenceName = "PTOVTA_COMISSAO_SEQ", allocationSize = 1)
@Table(name = "PTOVTA_COMISSAO")

View File

@ -36,7 +36,7 @@ import br.com.rjconsultores.auditador.interfaces.Auditavel;
*
* @author Desenvolvimento
*/
@AuditarClasse(nome = "PtovtaEmpresa", tela = "Alteração Ponto de Venda/de Empresas/Venda")
@AuditarClasse(nome = "PtovtaEmpresa", tela = "auditarClasse.PtovtaEmpresa")
@Entity
@SequenceGenerator(name = "PTOVTA_EMPRESA_SEQ", sequenceName = "PTOVTA_EMPRESA_SEQ", allocationSize = 1)
@Table(name = "PTOVTA_EMPRESA")

View File

@ -23,7 +23,7 @@ import br.com.rjconsultores.auditador.annotations.AuditarClasse;
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
import br.com.rjconsultores.auditador.interfaces.Auditavel;
@AuditarClasse(nome = "PtovtaEmpresaBloqueada", tela = "Alteração Ponto de Venda/Empresa Bloqueada ")
@AuditarClasse(nome = "PtovtaEmpresaBloqueada", tela = "auditarClasse.PtovtaEmpresaBloqueada")
@Entity
@SequenceGenerator(name = "PTOVTA_EMP_BLOQUEADA_SEQ", sequenceName = "PTOVTA_EMP_BLOQUEADA_SEQ", allocationSize = 1)
@Table(name = "PTOVTA_EMP_BLOQUEADA")

View File

@ -31,7 +31,7 @@ import br.com.rjconsultores.auditador.interfaces.Auditavel;
*
* @author Rafael
*/
@AuditarClasse(nome = "PtoVtaUsuarioBancario", tela = "Alteração Estoque Ponto de Venda")
@AuditarClasse(nome = "PtoVtaUsuarioBancario", tela = "auditarClasse.PtovtaEstoque")
@Entity
@SequenceGenerator(name = "PTOVTA_ESTOQUE_SEQ ", sequenceName = "PTOVTA_ESTOQUE_SEQ ", allocationSize = 1)
@Table(name = "PTOVTA_ESTOQUE")

View File

@ -26,7 +26,7 @@ import br.com.rjconsultores.auditador.interfaces.Auditavel;
/**
* @author Valdevir
*/
@AuditarClasse(nome = "PtovtaExcecaoMultaCanc", tela = "Alteração Ponto de Venda/Excecao Multa Canc")
@AuditarClasse(nome = "PtovtaExcecaoMultaCanc", tela = "auditarClasse.PtovtaExcecaoMultaCanc")
@Entity
@SequenceGenerator(name = "PTOVTA_EXCECAO_MULTA_CANC_SEQ", sequenceName = "PTOVTA_EXCECAO_MULTA_CANC_SEQ", allocationSize = 1)
@Table(name = "PTOVTA_EXCECAO_MULTA_CANC")

View File

@ -31,7 +31,7 @@ import br.com.rjconsultores.auditador.interfaces.Auditavel;
*
* @author Rafael
*/
@AuditarClasse(nome = "PtovtaHorario", tela = "Alteração Ponto Venda/Horario")
@AuditarClasse(nome = "PtovtaHorario", tela = "auditarClasse.PtovtaHorario")
@Entity
@SequenceGenerator(name = "PTOVTA_HORARIO_SEQ", sequenceName = "PTOVTA_HORARIO_SEQ", allocationSize = 1)
@Table(name = "PTOVTA_HORARIO")

View File

@ -36,7 +36,7 @@ import br.com.rjconsultores.auditador.interfaces.Auditavel;
*
* @author Rafael
*/
@AuditarClasse(nome = "PtovtaTitular", tela = "Alteração Ponto Veda/Titular/Foto")
@AuditarClasse(nome = "PtovtaTitular", tela = "auditarClasse.PtovtaTitular")
@Entity
@Table(name = "PTOVTA_TITULAR")
@SequenceGenerator(name = "PTOVTA_TITULAR_SEQ ", sequenceName = "PTOVTA_TITULAR_SEQ ", allocationSize = 1)

View File

@ -52,7 +52,7 @@ import br.com.rjconsultores.auditador.interfaces.Auditavel;
*/
@Entity
@SequenceGenerator(name = "PUNTO_VENTA_SEQ", sequenceName = "PUNTO_VENTA_SEQ", allocationSize = 1)
@AuditarClasse(nome = "PuntoVenta", tela = "Alteracao de Ponto de Venda")
@AuditarClasse(nome = "PuntoVenta", tela = "auditarClasse.PuntoVenta")
@Table(name = "PUNTO_VENTA")
public class PuntoVenta implements Serializable, Auditavel<PuntoVenta> {

View File

@ -32,7 +32,7 @@ import javax.persistence.SequenceGenerator;
* @author Administrador
*/
@Entity
@AuditarClasse(nome = "ReservacionPuntoVenta", tela = "Alteração de Reserva Categoria")
@AuditarClasse(nome = "ReservacionPuntoVenta", tela = "auditarClasse.ReservacionCategoria")
@SequenceGenerator(name = "RESERVACION_CATEGORIA_SEQ", sequenceName = "RESERVACION_CATEGORIA_SEQ", allocationSize = 1)
@Table(name = "RESERVACION_CATEGORIA")
public class ReservacionCategoria implements Serializable, Auditavel<ReservacionCategoria> {

View File

@ -32,7 +32,7 @@ import javax.persistence.SequenceGenerator;
* @author Rafius
*/
@AuditarClasse(nome = "ReservacionPuntoVenta", tela = "Alteração de Reserva Punto Venta")
@AuditarClasse(nome = "ReservacionPuntoVenta", tela = "auditarClasse.ReservacionPuntoVenta")
@Entity
@SequenceGenerator(name = "RESERVACION_PUNTOVENTA_SEQ", sequenceName = "RESERVACION_PUNTOVENTA_SEQ", allocationSize = 1)
@Table(name = "RESERVACION_PUNTOVENTA")

View File

@ -40,7 +40,7 @@ import br.com.rjconsultores.auditador.interfaces.AuditavelTelaAlternativa;
@Entity
@SequenceGenerator(name = "TARIFA_SEQ", sequenceName = "TARIFA_SEQ", allocationSize = 1)
@Table(name = "TARIFA")
@AuditarClasse(nome = "TARIFA", tela = "Alteração de Preço")
@AuditarClasse(nome = "TARIFA", tela = "auditarClasse.Tarifa")
public class Tarifa implements Serializable, Auditavel<Tarifa>, AuditavelTelaAlternativa {
private static final long serialVersionUID = 1L;

View File

@ -27,7 +27,7 @@ import br.com.rjconsultores.auditador.interfaces.Auditavel;
@Entity
@SequenceGenerator(name = "TARIFA_OFICIAL_SEQ", sequenceName = "TARIFA_OFICIAL_SEQ", allocationSize = 1)
@Table(name = "TARIFA_OFICIAL")
@AuditarClasse(nome = "TARIFA", tela = "Alteração de Preço / Tarifa Oficial")
@AuditarClasse(nome = "TARIFA", tela = "auditarClasse.TarifaOficial")
public class TarifaOficial implements Serializable, Auditavel<TarifaOficial> {
private static final long serialVersionUID = 1L;

View File

@ -51,7 +51,7 @@ import br.com.rjconsultores.auditador.interfaces.Auditavel;
*
* @author rodrigo
*/
@AuditarClasse(nome = "USUARIO", tela = "Alteração de Usuário")
@AuditarClasse(nome = "USUARIO", tela = "auditarClasse.Usuario")
@Entity
@SequenceGenerator(name = "USUARIO_SEQ", sequenceName = "USUARIO_SEQ", allocationSize = 1)
@Table(name = "USUARIO")

View File

@ -30,7 +30,7 @@ import br.com.rjconsultores.auditador.interfaces.Auditavel;
*
* @author Rafius
*/
@AuditarClasse(nome = "USUARIO_PERFIL", tela = "Alteração de Usuário")
@AuditarClasse(nome = "USUARIO_PERFIL", tela = "auditarClasse.UsuarioPerfil")
@Entity
@SequenceGenerator(name = "USUARIO_PERFIL_SEQ", sequenceName = "USUARIO_PERFIL_SEQ", allocationSize = 1)
@Table(name = "USUARIO_PERFIL")

View File

@ -1,7 +1,11 @@
package com.rjconsultores.ventaboletos.service;
import java.util.List;
import com.rjconsultores.ventaboletos.entidad.ConfRestricaoTramo;
public interface ConfRestricaoTramoService extends GenericService<ConfRestricaoTramo, Long> {
void actualizacionAuditagem(List<ConfRestricaoTramo> lsConfRestricaoTramo);
}

View File

@ -5,6 +5,8 @@ import java.util.Calendar;
import java.util.List;
import java.util.Set;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -13,12 +15,17 @@ import com.rjconsultores.ventaboletos.dao.ConfRestricaoCanalVentaDAO;
import com.rjconsultores.ventaboletos.entidad.ConfRestricaoCanalVenta;
import com.rjconsultores.ventaboletos.exception.BusinessException;
import com.rjconsultores.ventaboletos.service.ConfRestricaoCanalVentaService;
import com.rjconsultores.ventaboletos.service.LogAuditoriaService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
@Service("confRestricaoCanalVentaService")
public class ConfRestricaoCanalVentaServiceImpl implements ConfRestricaoCanalVentaService {
@Autowired
private ConfRestricaoCanalVentaDAO confRestricaoCanalVentaDAO;
@Autowired
private LogAuditoriaService logAuditoriaService;
private static Logger log = LoggerFactory.getLogger(ConfRestricaoCanalVentaServiceImpl.class);
public ConfRestricaoCanalVenta obtenerID(Long id) {
@ -33,10 +40,22 @@ public class ConfRestricaoCanalVentaServiceImpl implements ConfRestricaoCanalVen
entidad.setFecmodif(Calendar.getInstance().getTime());
entidad.setActivo(Boolean.TRUE);
ConfRestricaoCanalVenta originalClone = null;
try {
originalClone = entidad.getCloneObject();
} catch (Exception e) {
log.error("Erro ao clonar CategoriaCtrl: ",e);
}
if (entidad.getConfRestricaoCanalVentaId() == null){
return confRestricaoCanalVentaDAO.suscribir(entidad);
confRestricaoCanalVentaDAO.suscribir(entidad);
logAuditoriaService.auditar(null, entidad, entidad.getEmpresa() != null ? entidad.getEmpresa().getEmpresaId() : null);
return entidad;
}else{
return confRestricaoCanalVentaDAO.actualizacion(entidad);
confRestricaoCanalVentaDAO.actualizacion(entidad);
logAuditoriaService.auditar(originalClone, entidad, null);
return entidad;
}
}
@Transactional
@ -46,6 +65,7 @@ public class ConfRestricaoCanalVentaServiceImpl implements ConfRestricaoCanalVen
entidad.setActivo(Boolean.FALSE);
confRestricaoCanalVentaDAO.actualizacion(entidad);
logAuditoriaService.auditarExclusao(entidad, entidad.getEmpresa() != null ? entidad.getEmpresa().getEmpresaId() : null);
}

View File

@ -76,5 +76,4 @@ public class ConfRestricaoOrgaoConcedenteServiceImpl implements ConfRestricaoOrg
confRestricaoOrgaoConcedenteDAO.actualizacion(entidad);
}
}

View File

@ -18,7 +18,7 @@ import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
public class ConfRestricaoRutasServiceImpl implements ConfRestricaoRutasService {
@Autowired
ConfRestricaoRutasDAO confRestricaoRutasDAO;
private ConfRestricaoRutasDAO confRestricaoRutasDAO;
@Autowired
private RutaService rutaService;
@ -75,6 +75,5 @@ public class ConfRestricaoRutasServiceImpl implements ConfRestricaoRutasService
confRestricaoRutasDAO.actualizacion(entidad);
}
}

View File

@ -10,13 +10,16 @@ import org.springframework.transaction.annotation.Transactional;
import com.rjconsultores.ventaboletos.dao.ConfRestricaoTramoDAO;
import com.rjconsultores.ventaboletos.entidad.ConfRestricaoTramo;
import com.rjconsultores.ventaboletos.service.ConfRestricaoTramoService;
import com.rjconsultores.ventaboletos.service.LogAuditoriaService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
@Service("confRestricaoTramoService")
public class ConfRestricaoTramoServiceImpl implements ConfRestricaoTramoService {
@Autowired
ConfRestricaoTramoDAO confRestricaoTramoDAO;
private ConfRestricaoTramoDAO confRestricaoTramoDAO;
@Autowired
private LogAuditoriaService logAuditoriaService;
@Override
public List<ConfRestricaoTramo> obtenerTodos() {
@ -54,7 +57,19 @@ public class ConfRestricaoTramoServiceImpl implements ConfRestricaoTramoService
entidad.setActivo(Boolean.FALSE);
confRestricaoTramoDAO.actualizacion(entidad);
// logAuditoriaService.auditarExclusao(entidad, null);
}
@Override
@Transactional
public void actualizacionAuditagem(List<ConfRestricaoTramo> lsConfRestricaoTramo) {
for (ConfRestricaoTramo cc : lsConfRestricaoTramo) {
if(Boolean.TRUE.equals(cc.getActivo())) {
continue;
}
confRestricaoTramoDAO.actualizacion(cc);
}
}
}

View File

@ -3,6 +3,8 @@ package com.rjconsultores.ventaboletos.service.impl;
import java.util.Calendar;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -10,6 +12,7 @@ import org.springframework.transaction.annotation.Transactional;
import com.rjconsultores.ventaboletos.dao.ConfRestricaoVendaWebDAO;
import com.rjconsultores.ventaboletos.entidad.ConfRestricaoVendaWeb;
import com.rjconsultores.ventaboletos.service.ConfRestricaoVendaWebService;
import com.rjconsultores.ventaboletos.service.LogAuditoriaService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
@ -17,7 +20,11 @@ import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
public class ConfRestricaoVendaWebServiceImpl implements ConfRestricaoVendaWebService{
@Autowired
ConfRestricaoVendaWebDAO confRestricaoVendaWebDAO;
private ConfRestricaoVendaWebDAO confRestricaoVendaWebDAO;
private static Logger log = LoggerFactory.getLogger(ConfRestricaoVendaWebServiceImpl.class);
@Autowired
private LogAuditoriaService logAuditoriaService;
@Override
@Transactional
@ -26,7 +33,9 @@ public class ConfRestricaoVendaWebServiceImpl implements ConfRestricaoVendaWebSe
entidad.setFecmodif(Calendar.getInstance().getTime());
entidad.setActivo(Boolean.TRUE);
return confRestricaoVendaWebDAO.suscribir(entidad);
confRestricaoVendaWebDAO.suscribir(entidad);
logAuditoriaService.auditar(null, entidad, entidad.getEmpresa() != null ? entidad.getEmpresa().getEmpresaId() : null);
return entidad;
}
@Override
@ -45,17 +54,28 @@ public class ConfRestricaoVendaWebServiceImpl implements ConfRestricaoVendaWebSe
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
entidad.setFecmodif(Calendar.getInstance().getTime());
entidad.setActivo(Boolean.FALSE);
confRestricaoVendaWebDAO.actualizacion(entidad);
logAuditoriaService.auditarExclusao(entidad, entidad.getEmpresa() != null && entidad.getEmpresa() != null ? entidad.getEmpresa().getEmpresaId() : null);
}
@Override
@Transactional
public ConfRestricaoVendaWeb actualizacion(ConfRestricaoVendaWeb entidad) {
ConfRestricaoVendaWeb originalClone = null;
try {
originalClone = entidad.getCloneObject();
} catch (Exception e) {
log.error("Erro ao clonar TitularId",e);
}
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
entidad.setFecmodif(Calendar.getInstance().getTime());
entidad.setActivo(Boolean.TRUE);
return confRestricaoVendaWebDAO.actualizacion(entidad);
confRestricaoVendaWebDAO.actualizacion(entidad);
logAuditoriaService.auditar(originalClone, entidad, null);
return entidad;
}
}