Alteração do cadastro de ponto de venda (agencia)
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@22268 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
86693139d9
commit
ea58d7b75b
|
@ -5,15 +5,19 @@
|
|||
package com.rjconsultores.ventaboletos.entidad;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import javax.persistence.Basic;
|
||||
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.NamedQueries;
|
||||
import javax.persistence.NamedQuery;
|
||||
import javax.persistence.SequenceGenerator;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
|
@ -23,13 +27,14 @@ import javax.persistence.TemporalType;
|
|||
* @author Rafael
|
||||
*/
|
||||
@Entity
|
||||
@SequenceGenerator(name = "PTOVTA_ANTECIPACOMISSAO_SEQ", sequenceName = "PTOVTA_ANTECIPACOMISSAO_SEQ", allocationSize = 1)
|
||||
@Table(name = "PTOVTA_ANTECIPACOMISSAO")
|
||||
@NamedQueries({
|
||||
@NamedQuery(name = "PtovtaAntecipacomissao.findAll", query = "SELECT p FROM PtovtaAntecipacomissao p")})
|
||||
|
||||
public class PtovtaAntecipacomissao implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "PTOVTA_ANTECIPACOMISSAO_SEQ")
|
||||
@Column(name = "ID")
|
||||
private Integer id;
|
||||
|
||||
|
@ -38,10 +43,10 @@ public class PtovtaAntecipacomissao implements Serializable {
|
|||
private Date data;
|
||||
|
||||
@Column(name = "RETEM")
|
||||
private int retem;
|
||||
private BigDecimal retem;
|
||||
@Basic(optional = false)
|
||||
@Column(name = "PERCENTUAL")
|
||||
private int percentual;
|
||||
private BigDecimal percentual;
|
||||
|
||||
@Column(name = "ACTIVO")
|
||||
private Boolean activo;
|
||||
|
@ -63,7 +68,7 @@ public class PtovtaAntecipacomissao implements Serializable {
|
|||
this.id = id;
|
||||
}
|
||||
|
||||
public PtovtaAntecipacomissao(Integer id, Date data, int retem, int percentual, Boolean activo, Date fecmodif, int usuarioId) {
|
||||
public PtovtaAntecipacomissao(Integer id, Date data, BigDecimal retem, BigDecimal percentual, Boolean activo, Date fecmodif, int usuarioId) {
|
||||
this.id = id;
|
||||
this.data = data;
|
||||
this.retem = retem;
|
||||
|
@ -89,19 +94,19 @@ public class PtovtaAntecipacomissao implements Serializable {
|
|||
this.data = data;
|
||||
}
|
||||
|
||||
public int getRetem() {
|
||||
public BigDecimal getRetem() {
|
||||
return retem;
|
||||
}
|
||||
|
||||
public void setRetem(int retem) {
|
||||
public void setRetem(BigDecimal retem) {
|
||||
this.retem = retem;
|
||||
}
|
||||
|
||||
public int getPercentual() {
|
||||
public BigDecimal getPercentual() {
|
||||
return percentual;
|
||||
}
|
||||
|
||||
public void setPercentual(int percentual) {
|
||||
public void setPercentual(BigDecimal percentual) {
|
||||
this.percentual = percentual;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,10 @@
|
|||
package com.rjconsultores.ventaboletos.entidad;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
|
@ -65,6 +68,18 @@ public class PtovtaEstoque implements Serializable {
|
|||
public PtovtaEstoque(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
private static List<String> formList = new ArrayList<String>();
|
||||
private static List<String> loteList = new ArrayList<String>();
|
||||
|
||||
static{
|
||||
formList.add("SIM");
|
||||
formList.add("NÃO");
|
||||
|
||||
loteList.add("SIM");
|
||||
loteList.add("NÃO");
|
||||
}
|
||||
|
||||
public PtovtaEstoque(Integer id, String especie, short formCont, long quantidade, long loteform, Boolean activo, Date fecmodif, int usuarioId) {
|
||||
this.id = id;
|
||||
|
@ -148,8 +163,26 @@ public class PtovtaEstoque implements Serializable {
|
|||
public void setPuntoventaId(PuntoVenta puntoventaId) {
|
||||
this.puntoventaId = puntoventaId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public static List<String> getFormList() {
|
||||
return formList;
|
||||
}
|
||||
|
||||
public static void setFormList(List<String> formList) {
|
||||
PtovtaEstoque.formList = formList;
|
||||
}
|
||||
|
||||
public static List<String> getLoteList() {
|
||||
return loteList;
|
||||
}
|
||||
|
||||
public static void setLoteList(List<String> loteList) {
|
||||
PtovtaEstoque.loteList = loteList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
hash += (id != null ? id.hashCode() : 0);
|
||||
|
|
|
@ -9,11 +9,14 @@ import java.util.Date;
|
|||
import javax.persistence.Basic;
|
||||
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.NamedQueries;
|
||||
import javax.persistence.NamedQuery;
|
||||
import javax.persistence.SequenceGenerator;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
|
@ -23,13 +26,14 @@ import javax.persistence.TemporalType;
|
|||
* @author Rafael
|
||||
*/
|
||||
@Entity
|
||||
@SequenceGenerator(name = "PTOVTA_HORARIO_SEQ", sequenceName = "PTOVTA_HORARIO_SEQ", allocationSize = 1)
|
||||
@Table(name = "PTOVTA_HORARIO")
|
||||
@NamedQueries({
|
||||
@NamedQuery(name = "PtovtaHorario.findAll", query = "SELECT p FROM PtovtaHorario p")})
|
||||
|
||||
public class PtovtaHorario implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "PTOVTA_HORARIO_SEQ")
|
||||
@Column(name = "ID")
|
||||
private Integer id;
|
||||
|
||||
|
|
|
@ -6,7 +6,10 @@ package com.rjconsultores.ventaboletos.entidad;
|
|||
|
||||
import java.io.Serializable;
|
||||
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;
|
||||
|
@ -17,6 +20,7 @@ import javax.persistence.Lob;
|
|||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.NamedQueries;
|
||||
import javax.persistence.NamedQuery;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.SequenceGenerator;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
|
@ -61,10 +65,9 @@ public class PtovtaTitular implements Serializable {
|
|||
private Date fecmodif;
|
||||
|
||||
@Column(name = "USUARIO_ID")
|
||||
private int usuarioId;
|
||||
@JoinColumn(name = "PUNTOVENTA_ID", referencedColumnName = "PUNTOVENTA_ID")
|
||||
@ManyToOne
|
||||
private PuntoVenta puntoventaId;
|
||||
private int usuarioId;
|
||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "titularId")
|
||||
private List<PuntoVenta> puntoVentaList;
|
||||
|
||||
public PtovtaTitular() {
|
||||
}
|
||||
|
@ -156,15 +159,16 @@ public class PtovtaTitular implements Serializable {
|
|||
this.usuarioId = usuarioId;
|
||||
}
|
||||
|
||||
public PuntoVenta getPuntoventaId() {
|
||||
return puntoventaId;
|
||||
}
|
||||
|
||||
public List<PuntoVenta> getPuntoVentaList() {
|
||||
return puntoVentaList;
|
||||
}
|
||||
|
||||
public void setPuntoventaId(PuntoVenta puntoventaId) {
|
||||
this.puntoventaId = puntoventaId;
|
||||
}
|
||||
public void setPuntoVentaList(List<PuntoVenta> puntoVentaList) {
|
||||
this.puntoVentaList = puntoVentaList;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
hash += (id != null ? id.hashCode() : 0);
|
||||
|
|
|
@ -110,18 +110,14 @@ public class PuntoVenta implements Serializable {
|
|||
private String compl;
|
||||
// @OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
||||
// private List<PtovtaEstoque> ptovtaEstoqueList;
|
||||
// @OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
||||
// private List<PtovtaTitular> ptovtaTitularList;
|
||||
// @OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
||||
// private List<PtovtaHorario> ptovtaHorarioList;
|
||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
||||
private List<PtovtaHorario> ptovtaHorarioList;
|
||||
// @OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
||||
// private List<PtovtaComissao> ptovtaComissaoList;
|
||||
// @OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
||||
// private List<PtovtaDiversos> ptovtaDiversosList;
|
||||
// @OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
||||
// private List<PtovtaAgenciaBancaria> ptovtaAgenciaList;
|
||||
// @OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
||||
// private List<PtovtaAntecipacomissao> ptovtaAntecipacomissaoList;
|
||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
||||
private List<PtovtaAntecipacomissao> ptovtaAntecipacomissaoList;
|
||||
|
||||
|
||||
//@JoinColumn(name = "AGENCIA_ID", referencedColumnName = "ID")
|
||||
|
@ -153,6 +149,9 @@ public class PuntoVenta implements Serializable {
|
|||
}
|
||||
|
||||
public PuntoVenta() {
|
||||
this.colonia = new Colonia();
|
||||
this.agenciaId = new PtovtaAgenciaBancaria();
|
||||
this.titularId = new PtovtaTitular();
|
||||
}
|
||||
|
||||
public PuntoVenta(Integer puntoventaId) {
|
||||
|
@ -378,21 +377,27 @@ public class PuntoVenta implements Serializable {
|
|||
// this.ptovtaEstoqueList = ptovtaEstoqueList;
|
||||
// }
|
||||
//
|
||||
// public List<PtovtaTitular> getPtovtaTitularList() {
|
||||
// return ptovtaTitularList;
|
||||
// }
|
||||
//
|
||||
// public void setPtovtaTitularList(List<PtovtaTitular> ptovtaTitularList) {
|
||||
// this.ptovtaTitularList = ptovtaTitularList;
|
||||
// }
|
||||
//
|
||||
// public List<PtovtaHorario> getPtovtaHorarioList() {
|
||||
// return ptovtaHorarioList;
|
||||
// }
|
||||
//
|
||||
// public void setPtovtaHorarioList(List<PtovtaHorario> ptovtaHorarioList) {
|
||||
// this.ptovtaHorarioList = ptovtaHorarioList;
|
||||
// }
|
||||
|
||||
public List<PtovtaHorario> getPtovtaHorarioList() {
|
||||
|
||||
List<PtovtaHorario> tmp = new ArrayList<PtovtaHorario>();
|
||||
if (this.ptovtaHorarioList != null) {
|
||||
for (PtovtaHorario ddab : this.ptovtaHorarioList) {
|
||||
if (ddab.getActivo()) {
|
||||
tmp.add(ddab);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.ptovtaHorarioList = tmp;
|
||||
|
||||
return tmp;
|
||||
|
||||
}
|
||||
|
||||
public void setPtovtaHorarioList(List<PtovtaHorario> ptovtaHorarioList) {
|
||||
this.ptovtaHorarioList = ptovtaHorarioList;
|
||||
}
|
||||
//
|
||||
// public List<PtovtaComissao> getPtovtaComissaoList() {
|
||||
// return ptovtaComissaoList;
|
||||
|
@ -418,13 +423,27 @@ public class PuntoVenta implements Serializable {
|
|||
// this.ptovtaAgenciaList = ptovtaAgenciaList;
|
||||
// }
|
||||
//
|
||||
// public List<PtovtaAntecipacomissao> getPtovtaAntecipacomissaoList() {
|
||||
// return ptovtaAntecipacomissaoList;
|
||||
// }
|
||||
//
|
||||
// public void setPtovtaAntecipacomissaoList(List<PtovtaAntecipacomissao> ptovtaAntecipacomissaoList) {
|
||||
// this.ptovtaAntecipacomissaoList = ptovtaAntecipacomissaoList;
|
||||
// }
|
||||
public List<PtovtaAntecipacomissao> getPtovtaAntecipacomissaoList() {
|
||||
|
||||
List<PtovtaAntecipacomissao> tmp = new ArrayList<PtovtaAntecipacomissao>();
|
||||
if (this.ptovtaAntecipacomissaoList != null) {
|
||||
for (PtovtaAntecipacomissao ddab : this.ptovtaAntecipacomissaoList) {
|
||||
if (ddab.getActivo()) {
|
||||
tmp.add(ddab);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.ptovtaAntecipacomissaoList = tmp;
|
||||
|
||||
return tmp;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void setPtovtaAntecipacomissaoList(List<PtovtaAntecipacomissao> ptovtaAntecipacomissaoList) {
|
||||
this.ptovtaAntecipacomissaoList = ptovtaAntecipacomissaoList;
|
||||
}
|
||||
|
||||
public void setLsPtovtaUsuarioBancario(List<PtoVtaUsuarioBancario> lsPtovtaUsuarioBancario) {
|
||||
this.lsPtovtaUsuarioBancario = lsPtovtaUsuarioBancario;
|
||||
|
|
Loading…
Reference in New Issue