Catalogo Conf. OCD bug #5415
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@36212 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
f8f107d2c4
commit
2b56a20195
|
@ -0,0 +1,12 @@
|
||||||
|
package com.rjconsultores.ventaboletos.dao;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.OCDParam;
|
||||||
|
|
||||||
|
public interface OCDParamDAO extends GenericDAO<OCDParam, Integer> {
|
||||||
|
|
||||||
|
public OCDParam buscaOCDParamPorEmpresa(Empresa empresa);
|
||||||
|
public List<OCDParam> buscaOCDParams(Empresa empresa);
|
||||||
|
}
|
|
@ -0,0 +1,52 @@
|
||||||
|
package com.rjconsultores.ventaboletos.dao.hibernate;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.hibernate.Criteria;
|
||||||
|
import org.hibernate.Session;
|
||||||
|
import org.hibernate.SessionFactory;
|
||||||
|
import org.hibernate.criterion.Restrictions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.dao.OCDParamDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.AbastoCentral;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ControleEstoqueMigracao;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.OCDParam;
|
||||||
|
|
||||||
|
@Repository("ocdParamDAO")
|
||||||
|
public class OCDParamHibernateDAO extends GenericHibernateDAO<OCDParam, Integer> implements OCDParamDAO {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public OCDParamHibernateDAO(
|
||||||
|
@Qualifier("sessionFactory") SessionFactory factory) {
|
||||||
|
setSessionFactory(factory);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<OCDParam> obtenerTodos() {
|
||||||
|
List<OCDParam> params = findByCriteria(Restrictions.eq("activo", Boolean.TRUE));
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OCDParam buscaOCDParamPorEmpresa(Empresa empresa) {
|
||||||
|
|
||||||
|
Criteria c = makeCriteria();
|
||||||
|
c.add(Restrictions.eq("empresa", empresa));
|
||||||
|
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||||
|
|
||||||
|
return (OCDParam)c.uniqueResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<OCDParam> buscaOCDParams(Empresa empresa) {
|
||||||
|
List<OCDParam> params = findByCriteria(Restrictions.eq("empresa", empresa), Restrictions.eq("activo", Boolean.TRUE));
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,244 @@
|
||||||
|
package com.rjconsultores.ventaboletos.entidad;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
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.ManyToOne;
|
||||||
|
import javax.persistence.SequenceGenerator;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import javax.persistence.Temporal;
|
||||||
|
import javax.persistence.TemporalType;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "OCD")
|
||||||
|
public class OCD implements java.io.Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private Long ocdId;
|
||||||
|
|
||||||
|
private Long boletoId;
|
||||||
|
private PuntoVenta puntoVenta;
|
||||||
|
|
||||||
|
private String numoperacion;
|
||||||
|
|
||||||
|
private Date fecpagar;
|
||||||
|
private BigDecimal valorPagar;
|
||||||
|
private BigDecimal penalizacion;
|
||||||
|
|
||||||
|
private Integer usuarioIncId;
|
||||||
|
private Date fecinc;
|
||||||
|
|
||||||
|
private Boolean indpago;
|
||||||
|
private Integer usuarioPagoId;
|
||||||
|
private Date fecpago;
|
||||||
|
private PuntoVenta puntoVentaPago;
|
||||||
|
|
||||||
|
private Date fecmodif;
|
||||||
|
private Integer usuarioId;
|
||||||
|
private Boolean activo;
|
||||||
|
|
||||||
|
public OCD(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public OCD(Long ocdId, Long boletoId, PuntoVenta puntoVenta,
|
||||||
|
String numoperacion, Date fecpagar, BigDecimal valorPagar,
|
||||||
|
BigDecimal penalizacion, Integer usuarioIncId, Date fecinc,
|
||||||
|
Boolean indpago, Integer usuarioPagoId, Date fecpago,
|
||||||
|
PuntoVenta puntoVentaPago, Date fecmodif, Integer usuarioId,
|
||||||
|
Boolean activo) {
|
||||||
|
super();
|
||||||
|
this.ocdId = ocdId;
|
||||||
|
this.setBoletoId(boletoId);
|
||||||
|
this.puntoVenta = puntoVenta;
|
||||||
|
this.numoperacion = numoperacion;
|
||||||
|
this.fecpagar = fecpagar;
|
||||||
|
this.valorPagar = valorPagar;
|
||||||
|
this.penalizacion = penalizacion;
|
||||||
|
this.usuarioIncId = usuarioIncId;
|
||||||
|
this.fecinc = fecinc;
|
||||||
|
this.indpago = indpago;
|
||||||
|
this.usuarioPagoId = usuarioPagoId;
|
||||||
|
this.fecpago = fecpago;
|
||||||
|
this.puntoVentaPago = puntoVentaPago;
|
||||||
|
this.fecmodif = fecmodif;
|
||||||
|
this.usuarioId = usuarioId;
|
||||||
|
this.activo = activo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public OCD(Long ocdId, Long boletoId, PuntoVenta puntoVenta,
|
||||||
|
String numoperacion, Date fecpagar, BigDecimal valorPagar,
|
||||||
|
BigDecimal penalizacion, Integer usuarioIncId) {
|
||||||
|
super();
|
||||||
|
this.ocdId = ocdId;
|
||||||
|
this.setBoletoId(boletoId);
|
||||||
|
this.puntoVenta = puntoVenta;
|
||||||
|
this.numoperacion = numoperacion;
|
||||||
|
this.fecpagar = fecpagar;
|
||||||
|
this.valorPagar = valorPagar;
|
||||||
|
this.penalizacion = penalizacion;
|
||||||
|
this.usuarioIncId = usuarioIncId;
|
||||||
|
|
||||||
|
this.fecinc = new Date();
|
||||||
|
this.indpago = Boolean.FALSE;
|
||||||
|
|
||||||
|
this.fecmodif = new Date();
|
||||||
|
this.usuarioId = usuarioIncId;
|
||||||
|
this.activo = Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SequenceGenerator(name = "OCD_SEQ", sequenceName = "OCD_SEQ", allocationSize = 1)
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.AUTO, generator = "OCD_SEQ")
|
||||||
|
@Column(name = "OCD_ID", unique = true, nullable = false, precision = 15, scale = 0)
|
||||||
|
public Long getOcdId() {
|
||||||
|
return ocdId;
|
||||||
|
}
|
||||||
|
public void setOcdId(Long ocdId) {
|
||||||
|
this.ocdId = ocdId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "NUMOPERACION", precision = 7, scale = 0)
|
||||||
|
public String getNumoperacion() {
|
||||||
|
return numoperacion;
|
||||||
|
}
|
||||||
|
public void setNumoperacion(String numoperacion) {
|
||||||
|
this.numoperacion = numoperacion;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Temporal(TemporalType.DATE)
|
||||||
|
@Column(name = "FECPAGAR", length = 7)
|
||||||
|
public Date getFecpagar() {
|
||||||
|
return fecpagar;
|
||||||
|
}
|
||||||
|
public void setFecpagar(Date fecpagar) {
|
||||||
|
this.fecpagar = fecpagar;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "VALOR_PAGAR", precision = 7, scale = 2)
|
||||||
|
public BigDecimal getValorPagar() {
|
||||||
|
return valorPagar;
|
||||||
|
}
|
||||||
|
public void setValorPagar(BigDecimal valorPagar) {
|
||||||
|
this.valorPagar = valorPagar;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "PENALIZACION", precision = 7, scale = 2)
|
||||||
|
public BigDecimal getPenalizacion() {
|
||||||
|
return penalizacion;
|
||||||
|
}
|
||||||
|
public void setPenalizacion(BigDecimal penalizacion) {
|
||||||
|
this.penalizacion = penalizacion;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "USUARIOINC_ID", precision = 7, scale = 0)
|
||||||
|
public Integer getUsuarioIncId() {
|
||||||
|
return usuarioIncId;
|
||||||
|
}
|
||||||
|
public void setUsuarioIncId(Integer usuarioIncId) {
|
||||||
|
this.usuarioIncId = usuarioIncId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Temporal(TemporalType.DATE)
|
||||||
|
@Column(name = "FECINC", length = 7)
|
||||||
|
public Date getFecinc() {
|
||||||
|
return fecinc;
|
||||||
|
}
|
||||||
|
public void setFecinc(Date fecinc) {
|
||||||
|
this.fecinc = fecinc;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "INDPAGO", precision = 1, scale = 0)
|
||||||
|
public Boolean getIndpago() {
|
||||||
|
return indpago;
|
||||||
|
}
|
||||||
|
public void setIndpago(Boolean indpago) {
|
||||||
|
this.indpago = indpago;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "USUARIOPAGO_ID", precision = 7, scale = 0)
|
||||||
|
public Integer getUsuarioPagoId() {
|
||||||
|
return usuarioPagoId;
|
||||||
|
}
|
||||||
|
public void setUsuarioPagoId(Integer usuarioPagoId) {
|
||||||
|
this.usuarioPagoId = usuarioPagoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Temporal(TemporalType.DATE)
|
||||||
|
@Column(name = "FECPAGO", length = 7)
|
||||||
|
public Date getFecpago() {
|
||||||
|
return fecpago;
|
||||||
|
}
|
||||||
|
public void setFecpago(Date fecpago) {
|
||||||
|
this.fecpago = fecpago;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JoinColumn(name = "PUNTOVENTA_ID")
|
||||||
|
@ManyToOne
|
||||||
|
public PuntoVenta getPuntoVenta() {
|
||||||
|
return puntoVenta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPuntoVenta(PuntoVenta puntoVenta) {
|
||||||
|
this.puntoVenta = puntoVenta;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JoinColumn(name = "PUNTOVENTAPAGO_ID")
|
||||||
|
@ManyToOne
|
||||||
|
public PuntoVenta getPuntoVentaPago() {
|
||||||
|
return puntoVentaPago;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPuntoVentaPago(PuntoVenta puntoVentaPago) {
|
||||||
|
this.puntoVentaPago = puntoVentaPago;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "BOLETO_ID", precision = 15, scale = 0)
|
||||||
|
public Long getBoletoId() {
|
||||||
|
return boletoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBoletoId(Long boletoId) {
|
||||||
|
this.boletoId = boletoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "ACTIVO", precision = 1, scale = 0)
|
||||||
|
public Boolean getActivo() {
|
||||||
|
return activo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setActivo(Boolean activo) {
|
||||||
|
this.activo = activo;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Temporal(TemporalType.DATE)
|
||||||
|
@Column(name = "FECMODIF", length = 7)
|
||||||
|
public Date getFecmodif() {
|
||||||
|
return fecmodif;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFecmodif(Date fecmodif) {
|
||||||
|
this.fecmodif = fecmodif;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "USUARIO_ID", precision = 7, scale = 0)
|
||||||
|
public Integer getUsuarioId() {
|
||||||
|
return usuarioId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUsuarioId(Integer usuarioId) {
|
||||||
|
this.usuarioId = usuarioId;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,143 @@
|
||||||
|
package com.rjconsultores.ventaboletos.entidad;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
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.ManyToOne;
|
||||||
|
import javax.persistence.SequenceGenerator;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import javax.persistence.Temporal;
|
||||||
|
import javax.persistence.TemporalType;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "OCD_PARAM")
|
||||||
|
public class OCDParam implements java.io.Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
private Long ocdparamId;
|
||||||
|
private BigDecimal penalizacion;
|
||||||
|
private Integer diasPagar;
|
||||||
|
private PuntoVenta puntoventa;
|
||||||
|
private Empresa empresa;
|
||||||
|
private Estado estado;
|
||||||
|
private Boolean activo;
|
||||||
|
private Date fecmodif;
|
||||||
|
private Integer usuarioId;
|
||||||
|
|
||||||
|
public OCDParam(Long ocdparamId, BigDecimal penalizacion,
|
||||||
|
Integer diasPagar, PuntoVenta puntoventa, Empresa empresa,
|
||||||
|
Estado estado, Boolean activo, Date fecmodif, Integer usuarioId) {
|
||||||
|
super();
|
||||||
|
this.ocdparamId = ocdparamId;
|
||||||
|
this.penalizacion = penalizacion;
|
||||||
|
this.diasPagar = diasPagar;
|
||||||
|
this.puntoventa = puntoventa;
|
||||||
|
this.empresa = empresa;
|
||||||
|
this.estado = estado;
|
||||||
|
this.activo = activo;
|
||||||
|
this.fecmodif = fecmodif;
|
||||||
|
this.usuarioId = usuarioId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OCDParam() {/*...*/}
|
||||||
|
|
||||||
|
@SequenceGenerator(name = "OCD_PARAM_SEQ", sequenceName = "OCD_PARAM_SEQ", allocationSize = 1)
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.AUTO, generator = "OCD_PARAM_SEQ")
|
||||||
|
@Column(name = "OCDPARAM_ID", unique = true, nullable = false, precision = 15, scale = 0)
|
||||||
|
public Long getOcdparamId() {
|
||||||
|
return ocdparamId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOcdparamId(Long ocdparamId) {
|
||||||
|
this.ocdparamId = ocdparamId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "PENALIZACION", length = 10)
|
||||||
|
public BigDecimal getPenalizacion() {
|
||||||
|
return penalizacion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPenalizacion(BigDecimal penalizacion) {
|
||||||
|
this.penalizacion = penalizacion;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "DIAS_PAGAR", length = 10)
|
||||||
|
public Integer getDiasPagar() {
|
||||||
|
return diasPagar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDiasPagar(Integer diasPagar) {
|
||||||
|
this.diasPagar = diasPagar;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JoinColumn(name = "PUNTOVENTA_ID")
|
||||||
|
@ManyToOne
|
||||||
|
public PuntoVenta getPuntoventa() {
|
||||||
|
return puntoventa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPuntoventa(PuntoVenta puntoventa) {
|
||||||
|
this.puntoventa = puntoventa;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JoinColumn(name = "EMPRESA_ID")
|
||||||
|
@ManyToOne
|
||||||
|
public Empresa getEmpresa() {
|
||||||
|
return empresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEmpresa(Empresa empresa) {
|
||||||
|
this.empresa = empresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JoinColumn(name = "ESTADO_ID")
|
||||||
|
@ManyToOne
|
||||||
|
public Estado getEstado() {
|
||||||
|
return estado;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEstado(Estado estado) {
|
||||||
|
this.estado = estado;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "ACTIVO", precision = 1, scale = 0)
|
||||||
|
public Boolean getActivo() {
|
||||||
|
return activo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setActivo(Boolean activo) {
|
||||||
|
this.activo = activo;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Temporal(TemporalType.DATE)
|
||||||
|
@Column(name = "FECMODIF", length = 7)
|
||||||
|
public Date getFecmodif() {
|
||||||
|
return fecmodif;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFecmodif(Date fecmodif) {
|
||||||
|
this.fecmodif = fecmodif;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "USUARIO_ID", precision = 7, scale = 0)
|
||||||
|
public Integer getUsuarioId() {
|
||||||
|
return usuarioId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUsuarioId(Integer usuarioId) {
|
||||||
|
this.usuarioId = usuarioId;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.rjconsultores.ventaboletos.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.OCDParam;
|
||||||
|
|
||||||
|
public interface OCDParamService extends GenericService<OCDParam, Integer> {
|
||||||
|
|
||||||
|
public OCDParam buscaOCDParamPorEmpresa(Empresa empresa);
|
||||||
|
public List<OCDParam> buscaOCDParams(Empresa empresa);
|
||||||
|
}
|
|
@ -0,0 +1,72 @@
|
||||||
|
package com.rjconsultores.ventaboletos.service.impl;
|
||||||
|
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.dao.OCDParamDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.OCDParam;
|
||||||
|
import com.rjconsultores.ventaboletos.service.OCDParamService;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
|
|
||||||
|
@Service("ocdParamService")
|
||||||
|
public class OCDParamServiceImpl implements OCDParamService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private OCDParamDAO ocdParamDAO;
|
||||||
|
|
||||||
|
private void setUsuarioFecmodifActivoOCD(OCDParam entidad){
|
||||||
|
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
|
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||||
|
entidad.setActivo(Boolean.TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<OCDParam> obtenerTodos() {
|
||||||
|
List<OCDParam> params = ocdParamDAO.obtenerTodos();
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OCDParam obtenerID(Integer id) {
|
||||||
|
OCDParam param = ocdParamDAO.obtenerID(id);
|
||||||
|
return param;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public OCDParam suscribir(OCDParam entidad) {
|
||||||
|
setUsuarioFecmodifActivoOCD(entidad);
|
||||||
|
OCDParam param = ocdParamDAO.suscribir(entidad);
|
||||||
|
return param;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public OCDParam actualizacion(OCDParam entidad) {
|
||||||
|
setUsuarioFecmodifActivoOCD(entidad);
|
||||||
|
OCDParam param = ocdParamDAO.actualizacion(entidad);
|
||||||
|
return param;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public void borrar(OCDParam entidad) {
|
||||||
|
setUsuarioFecmodifActivoOCD(entidad);
|
||||||
|
entidad.setActivo(Boolean.FALSE);
|
||||||
|
ocdParamDAO.borrar(entidad);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OCDParam buscaOCDParamPorEmpresa(Empresa empresa) {
|
||||||
|
OCDParam param = ocdParamDAO.buscaOCDParamPorEmpresa(empresa);
|
||||||
|
return param;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<OCDParam> buscaOCDParams(Empresa empresa) {
|
||||||
|
List<OCDParam> params = ocdParamDAO.buscaOCDParams(empresa);
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue