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;
|
package com.rjconsultores.ventaboletos.entidad;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import javax.persistence.Basic;
|
import javax.persistence.Basic;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.JoinColumn;
|
import javax.persistence.JoinColumn;
|
||||||
import javax.persistence.ManyToOne;
|
import javax.persistence.ManyToOne;
|
||||||
import javax.persistence.NamedQueries;
|
import javax.persistence.NamedQueries;
|
||||||
import javax.persistence.NamedQuery;
|
import javax.persistence.NamedQuery;
|
||||||
|
import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
@ -23,13 +27,14 @@ import javax.persistence.TemporalType;
|
||||||
* @author Rafael
|
* @author Rafael
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
|
@SequenceGenerator(name = "PTOVTA_ANTECIPACOMISSAO_SEQ", sequenceName = "PTOVTA_ANTECIPACOMISSAO_SEQ", allocationSize = 1)
|
||||||
@Table(name = "PTOVTA_ANTECIPACOMISSAO")
|
@Table(name = "PTOVTA_ANTECIPACOMISSAO")
|
||||||
@NamedQueries({
|
|
||||||
@NamedQuery(name = "PtovtaAntecipacomissao.findAll", query = "SELECT p FROM PtovtaAntecipacomissao p")})
|
|
||||||
public class PtovtaAntecipacomissao implements Serializable {
|
public class PtovtaAntecipacomissao implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@Basic(optional = false)
|
@Basic(optional = false)
|
||||||
|
@GeneratedValue(strategy = GenerationType.AUTO, generator = "PTOVTA_ANTECIPACOMISSAO_SEQ")
|
||||||
@Column(name = "ID")
|
@Column(name = "ID")
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
|
@ -38,10 +43,10 @@ public class PtovtaAntecipacomissao implements Serializable {
|
||||||
private Date data;
|
private Date data;
|
||||||
|
|
||||||
@Column(name = "RETEM")
|
@Column(name = "RETEM")
|
||||||
private int retem;
|
private BigDecimal retem;
|
||||||
@Basic(optional = false)
|
@Basic(optional = false)
|
||||||
@Column(name = "PERCENTUAL")
|
@Column(name = "PERCENTUAL")
|
||||||
private int percentual;
|
private BigDecimal percentual;
|
||||||
|
|
||||||
@Column(name = "ACTIVO")
|
@Column(name = "ACTIVO")
|
||||||
private Boolean activo;
|
private Boolean activo;
|
||||||
|
@ -63,7 +68,7 @@ public class PtovtaAntecipacomissao implements Serializable {
|
||||||
this.id = id;
|
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.id = id;
|
||||||
this.data = data;
|
this.data = data;
|
||||||
this.retem = retem;
|
this.retem = retem;
|
||||||
|
@ -89,19 +94,19 @@ public class PtovtaAntecipacomissao implements Serializable {
|
||||||
this.data = data;
|
this.data = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getRetem() {
|
public BigDecimal getRetem() {
|
||||||
return retem;
|
return retem;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRetem(int retem) {
|
public void setRetem(BigDecimal retem) {
|
||||||
this.retem = retem;
|
this.retem = retem;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getPercentual() {
|
public BigDecimal getPercentual() {
|
||||||
return percentual;
|
return percentual;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPercentual(int percentual) {
|
public void setPercentual(BigDecimal percentual) {
|
||||||
this.percentual = percentual;
|
this.percentual = percentual;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,10 @@
|
||||||
package com.rjconsultores.ventaboletos.entidad;
|
package com.rjconsultores.ventaboletos.entidad;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import javax.persistence.Basic;
|
import javax.persistence.Basic;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
@ -66,6 +69,18 @@ public class PtovtaEstoque implements Serializable {
|
||||||
this.id = 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) {
|
public PtovtaEstoque(Integer id, String especie, short formCont, long quantidade, long loteform, Boolean activo, Date fecmodif, int usuarioId) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.especie = especie;
|
this.especie = especie;
|
||||||
|
@ -149,6 +164,24 @@ public class PtovtaEstoque implements Serializable {
|
||||||
this.puntoventaId = puntoventaId;
|
this.puntoventaId = puntoventaId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
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
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int hash = 0;
|
int hash = 0;
|
||||||
|
|
|
@ -9,11 +9,14 @@ import java.util.Date;
|
||||||
import javax.persistence.Basic;
|
import javax.persistence.Basic;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.JoinColumn;
|
import javax.persistence.JoinColumn;
|
||||||
import javax.persistence.ManyToOne;
|
import javax.persistence.ManyToOne;
|
||||||
import javax.persistence.NamedQueries;
|
import javax.persistence.NamedQueries;
|
||||||
import javax.persistence.NamedQuery;
|
import javax.persistence.NamedQuery;
|
||||||
|
import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
@ -23,13 +26,14 @@ import javax.persistence.TemporalType;
|
||||||
* @author Rafael
|
* @author Rafael
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
|
@SequenceGenerator(name = "PTOVTA_HORARIO_SEQ", sequenceName = "PTOVTA_HORARIO_SEQ", allocationSize = 1)
|
||||||
@Table(name = "PTOVTA_HORARIO")
|
@Table(name = "PTOVTA_HORARIO")
|
||||||
@NamedQueries({
|
|
||||||
@NamedQuery(name = "PtovtaHorario.findAll", query = "SELECT p FROM PtovtaHorario p")})
|
|
||||||
public class PtovtaHorario implements Serializable {
|
public class PtovtaHorario implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@Basic(optional = false)
|
@Basic(optional = false)
|
||||||
|
@GeneratedValue(strategy = GenerationType.AUTO, generator = "PTOVTA_HORARIO_SEQ")
|
||||||
@Column(name = "ID")
|
@Column(name = "ID")
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,10 @@ package com.rjconsultores.ventaboletos.entidad;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import javax.persistence.Basic;
|
import javax.persistence.Basic;
|
||||||
|
import javax.persistence.CascadeType;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.GeneratedValue;
|
import javax.persistence.GeneratedValue;
|
||||||
|
@ -17,6 +20,7 @@ import javax.persistence.Lob;
|
||||||
import javax.persistence.ManyToOne;
|
import javax.persistence.ManyToOne;
|
||||||
import javax.persistence.NamedQueries;
|
import javax.persistence.NamedQueries;
|
||||||
import javax.persistence.NamedQuery;
|
import javax.persistence.NamedQuery;
|
||||||
|
import javax.persistence.OneToMany;
|
||||||
import javax.persistence.SequenceGenerator;
|
import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
|
@ -62,9 +66,8 @@ public class PtovtaTitular implements Serializable {
|
||||||
|
|
||||||
@Column(name = "USUARIO_ID")
|
@Column(name = "USUARIO_ID")
|
||||||
private int usuarioId;
|
private int usuarioId;
|
||||||
@JoinColumn(name = "PUNTOVENTA_ID", referencedColumnName = "PUNTOVENTA_ID")
|
@OneToMany(cascade = CascadeType.ALL, mappedBy = "titularId")
|
||||||
@ManyToOne
|
private List<PuntoVenta> puntoVentaList;
|
||||||
private PuntoVenta puntoventaId;
|
|
||||||
|
|
||||||
public PtovtaTitular() {
|
public PtovtaTitular() {
|
||||||
}
|
}
|
||||||
|
@ -156,12 +159,13 @@ public class PtovtaTitular implements Serializable {
|
||||||
this.usuarioId = usuarioId;
|
this.usuarioId = usuarioId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PuntoVenta getPuntoventaId() {
|
|
||||||
return puntoventaId;
|
public List<PuntoVenta> getPuntoVentaList() {
|
||||||
|
return puntoVentaList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPuntoventaId(PuntoVenta puntoventaId) {
|
public void setPuntoVentaList(List<PuntoVenta> puntoVentaList) {
|
||||||
this.puntoventaId = puntoventaId;
|
this.puntoVentaList = puntoVentaList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -110,18 +110,14 @@ public class PuntoVenta implements Serializable {
|
||||||
private String compl;
|
private String compl;
|
||||||
// @OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
// @OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
||||||
// private List<PtovtaEstoque> ptovtaEstoqueList;
|
// private List<PtovtaEstoque> ptovtaEstoqueList;
|
||||||
// @OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
@OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
||||||
// private List<PtovtaTitular> ptovtaTitularList;
|
private List<PtovtaHorario> ptovtaHorarioList;
|
||||||
// @OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
|
||||||
// private List<PtovtaHorario> ptovtaHorarioList;
|
|
||||||
// @OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
// @OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
||||||
// private List<PtovtaComissao> ptovtaComissaoList;
|
// private List<PtovtaComissao> ptovtaComissaoList;
|
||||||
// @OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
// @OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
||||||
// private List<PtovtaDiversos> ptovtaDiversosList;
|
// private List<PtovtaDiversos> ptovtaDiversosList;
|
||||||
// @OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
@OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
||||||
// private List<PtovtaAgenciaBancaria> ptovtaAgenciaList;
|
private List<PtovtaAntecipacomissao> ptovtaAntecipacomissaoList;
|
||||||
// @OneToMany(cascade = CascadeType.ALL, mappedBy = "puntoventaId")
|
|
||||||
// private List<PtovtaAntecipacomissao> ptovtaAntecipacomissaoList;
|
|
||||||
|
|
||||||
|
|
||||||
//@JoinColumn(name = "AGENCIA_ID", referencedColumnName = "ID")
|
//@JoinColumn(name = "AGENCIA_ID", referencedColumnName = "ID")
|
||||||
|
@ -153,6 +149,9 @@ public class PuntoVenta implements Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public PuntoVenta() {
|
public PuntoVenta() {
|
||||||
|
this.colonia = new Colonia();
|
||||||
|
this.agenciaId = new PtovtaAgenciaBancaria();
|
||||||
|
this.titularId = new PtovtaTitular();
|
||||||
}
|
}
|
||||||
|
|
||||||
public PuntoVenta(Integer puntoventaId) {
|
public PuntoVenta(Integer puntoventaId) {
|
||||||
|
@ -378,21 +377,27 @@ public class PuntoVenta implements Serializable {
|
||||||
// this.ptovtaEstoqueList = ptovtaEstoqueList;
|
// this.ptovtaEstoqueList = ptovtaEstoqueList;
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// public List<PtovtaTitular> getPtovtaTitularList() {
|
|
||||||
// return ptovtaTitularList;
|
public List<PtovtaHorario> getPtovtaHorarioList() {
|
||||||
// }
|
|
||||||
//
|
List<PtovtaHorario> tmp = new ArrayList<PtovtaHorario>();
|
||||||
// public void setPtovtaTitularList(List<PtovtaTitular> ptovtaTitularList) {
|
if (this.ptovtaHorarioList != null) {
|
||||||
// this.ptovtaTitularList = ptovtaTitularList;
|
for (PtovtaHorario ddab : this.ptovtaHorarioList) {
|
||||||
// }
|
if (ddab.getActivo()) {
|
||||||
//
|
tmp.add(ddab);
|
||||||
// public List<PtovtaHorario> getPtovtaHorarioList() {
|
}
|
||||||
// return ptovtaHorarioList;
|
}
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// public void setPtovtaHorarioList(List<PtovtaHorario> ptovtaHorarioList) {
|
this.ptovtaHorarioList = tmp;
|
||||||
// this.ptovtaHorarioList = ptovtaHorarioList;
|
|
||||||
// }
|
return tmp;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPtovtaHorarioList(List<PtovtaHorario> ptovtaHorarioList) {
|
||||||
|
this.ptovtaHorarioList = ptovtaHorarioList;
|
||||||
|
}
|
||||||
//
|
//
|
||||||
// public List<PtovtaComissao> getPtovtaComissaoList() {
|
// public List<PtovtaComissao> getPtovtaComissaoList() {
|
||||||
// return ptovtaComissaoList;
|
// return ptovtaComissaoList;
|
||||||
|
@ -418,13 +423,27 @@ public class PuntoVenta implements Serializable {
|
||||||
// this.ptovtaAgenciaList = ptovtaAgenciaList;
|
// this.ptovtaAgenciaList = ptovtaAgenciaList;
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// public List<PtovtaAntecipacomissao> getPtovtaAntecipacomissaoList() {
|
public List<PtovtaAntecipacomissao> getPtovtaAntecipacomissaoList() {
|
||||||
// return ptovtaAntecipacomissaoList;
|
|
||||||
// }
|
List<PtovtaAntecipacomissao> tmp = new ArrayList<PtovtaAntecipacomissao>();
|
||||||
//
|
if (this.ptovtaAntecipacomissaoList != null) {
|
||||||
// public void setPtovtaAntecipacomissaoList(List<PtovtaAntecipacomissao> ptovtaAntecipacomissaoList) {
|
for (PtovtaAntecipacomissao ddab : this.ptovtaAntecipacomissaoList) {
|
||||||
// this.ptovtaAntecipacomissaoList = 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) {
|
public void setLsPtovtaUsuarioBancario(List<PtoVtaUsuarioBancario> lsPtovtaUsuarioBancario) {
|
||||||
this.lsPtovtaUsuarioBancario = lsPtovtaUsuarioBancario;
|
this.lsPtovtaUsuarioBancario = lsPtovtaUsuarioBancario;
|
||||||
|
|
Loading…
Reference in New Issue