git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@21656 d1611594-4594-4d17-8e1d-87c2c4800839
parent
62768b2673
commit
d4c0afe45c
|
@ -142,7 +142,15 @@ public class TarifaOficialHibernateDAO extends GenericHibernateDAO<TarifaOficial
|
|||
|
||||
@Override
|
||||
public void aplicarArredondamentoTarifa(Integer orgaoConcedenteId, Integer usuarioId) {
|
||||
Query query = getSession().createQuery("UPDATE TarifaOficial tao set tao.precio = FN_ARREDONDAMENTO_TARIFA(tao.precio,tao.orgaoConcedente.orgaoConcedenteId,tao.importeseguro,tao.importetaxaembarque,tao.importepedagio,tao.importeoutros), tao.activo = true , tao.fecmodif= CURRENT_TIMESTAMP(), tao.usuarioId =:usuarioId where tao.orgaoConcedente.orgaoConcedenteId = :orgao");
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.append(" UPDATE TarifaOficial tao ");
|
||||
sql.append(" SET tao.precio = FN_ARREDONDAMENTO_TARIFA(tao.precio,tao.orgaoConcedente.orgaoConcedenteId,tao.importeseguro,tao.importetaxaembarque,tao.importepedagio,tao.importeoutros), ");
|
||||
sql.append(" tao.activo = true , ");
|
||||
sql.append(" tao.fecmodif= CURRENT_TIMESTAMP(), ");
|
||||
sql.append(" tao.usuarioId =:usuarioId ");
|
||||
sql.append(" WHERE tao.orgaoConcedente.orgaoConcedenteId = :orgao ");
|
||||
|
||||
Query query = getSession().createQuery(sql.toString());
|
||||
query.setParameter("orgao", orgaoConcedenteId);
|
||||
query.setParameter("usuarioId", usuarioId);
|
||||
query.executeUpdate();
|
||||
|
|
|
@ -2,19 +2,15 @@ package com.rjconsultores.ventaboletos.entidad;
|
|||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.SequenceGenerator;
|
||||
import javax.persistence.Table;
|
||||
|
@ -83,12 +79,9 @@ public class TarifaOficial implements Serializable {
|
|||
@JoinColumn(name = "ORGAOCONCEDENTE_ID")
|
||||
private OrgaoConcedente orgaoConcedente;
|
||||
|
||||
|
||||
|
||||
public TarifaOficial() {
|
||||
}
|
||||
|
||||
|
||||
public OrgaoConcedente getOrgaoConcedente() {
|
||||
return orgaoConcedente;
|
||||
}
|
||||
|
@ -105,18 +98,14 @@ public class TarifaOficial implements Serializable {
|
|||
this.ruta = ruta;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Integer getTarifaOficialId() {
|
||||
return tarifaOficialId;
|
||||
}
|
||||
|
||||
|
||||
public void setTarifaOficialId(Integer tarifaOficialId) {
|
||||
this.tarifaOficialId = tarifaOficialId;
|
||||
}
|
||||
|
||||
|
||||
public BigDecimal getPrecio() {
|
||||
return precio;
|
||||
}
|
||||
|
@ -238,7 +227,6 @@ public class TarifaOficial implements Serializable {
|
|||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
// TODO: Warning - this method won't work in the case the id fields are not set
|
||||
if (!(object instanceof TarifaOficial)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -254,42 +242,34 @@ public class TarifaOficial implements Serializable {
|
|||
return "com.rjconsultores.ventaboletos.entidad.TarifaOficial[tarifaOficialId=" + tarifaOficialId + "]";
|
||||
}
|
||||
|
||||
|
||||
public BigDecimal getImportetaxaembarque() {
|
||||
return importetaxaembarque;
|
||||
}
|
||||
|
||||
|
||||
public void setImportetaxaembarque(BigDecimal importetaxaembarque) {
|
||||
this.importetaxaembarque = importetaxaembarque;
|
||||
}
|
||||
|
||||
|
||||
public BigDecimal getImportepedagio() {
|
||||
return importepedagio;
|
||||
}
|
||||
|
||||
|
||||
public void setImportepedagio(BigDecimal importepedagio) {
|
||||
this.importepedagio = importepedagio;
|
||||
}
|
||||
|
||||
|
||||
public BigDecimal getImporteoutros() {
|
||||
return importeoutros;
|
||||
}
|
||||
|
||||
|
||||
public void setImporteoutros(BigDecimal importeoutros) {
|
||||
this.importeoutros = importeoutros;
|
||||
}
|
||||
|
||||
|
||||
public BigDecimal getImporteseguro() {
|
||||
return importeseguro;
|
||||
}
|
||||
|
||||
|
||||
public void setImporteseguro(BigDecimal importeseguro) {
|
||||
this.importeseguro = importeseguro;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue