Gerar lançamento comissão no conta corrente da agência (issue 8900)

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@69192 d1611594-4594-4d17-8e1d-87c2c4800839
master
alberto 2017-05-22 21:07:13 +00:00
parent 83edc2d646
commit 5cd5d52fe3
6 changed files with 14 additions and 9 deletions

View File

@ -8,6 +8,6 @@ import com.rjconsultores.ventaboletos.entidad.PtovtaAgencia;
public interface PtovtaAgenciaDAO extends GenericDAO<PtovtaAgencia, Integer> { public interface PtovtaAgenciaDAO extends GenericDAO<PtovtaAgencia, Integer> {
public List<PtovtaAgencia> buscar(String numagencia); public List<PtovtaAgencia> buscar(String numagencia);
public void borrarFisico(PtovtaAgencia pto);
} }

View File

@ -42,7 +42,12 @@ public class PtovtaAgenciaHibernateDAO extends GenericHibernateDAO<PtovtaAgencia
return c.list(); return c.list();
} }
public void borrarFisico(PtovtaAgencia pto) {
String hql = " delete from PtovtaAgencia "
+ " where ptovtaAgenciaId = " + pto.getPtovtaAgenciaId();
Query sq = getSession().createQuery(hql);
sq.executeUpdate();
}
} }

View File

@ -73,7 +73,6 @@ public class PtovtaAgencia implements Serializable {
@JoinColumn(name = "INSTIFINANCEIRA_ID", referencedColumnName = "INSTIFINANCEIRA_ID") @JoinColumn(name = "INSTIFINANCEIRA_ID", referencedColumnName = "INSTIFINANCEIRA_ID")
@ManyToOne @ManyToOne
private InstiFinanceira instiFinanceiraId; private InstiFinanceira instiFinanceiraId;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "agenciaId") @OneToMany(cascade = CascadeType.ALL, mappedBy = "agenciaId")
private List<PuntoVenta> puntoVentaList; private List<PuntoVenta> puntoVentaList;
@ -296,5 +295,4 @@ public class PtovtaAgencia implements Serializable {
public String toString() { public String toString() {
return "com.rjconsultores.ventaboletos.entidad.PtovtaAgencia[ ptovtaAgenciaId=" + ptovtaAgenciaId + " ]"; return "com.rjconsultores.ventaboletos.entidad.PtovtaAgencia[ ptovtaAgenciaId=" + ptovtaAgenciaId + " ]";
} }
} }

View File

@ -960,6 +960,4 @@ public class PuntoVenta implements Serializable {
public void setHistoricoPuntoVentaList(List<HistoricoPuntoVenta> historicoPuntoVentaList) { public void setHistoricoPuntoVentaList(List<HistoricoPuntoVenta> historicoPuntoVentaList) {
this.historicoPuntoVentaList = historicoPuntoVentaList; this.historicoPuntoVentaList = historicoPuntoVentaList;
} }
} }

View File

@ -12,5 +12,5 @@ import com.rjconsultores.ventaboletos.entidad.PtovtaAgencia;
public interface PtovtaAgenciaService extends GenericService<PtovtaAgencia, Integer> { public interface PtovtaAgenciaService extends GenericService<PtovtaAgencia, Integer> {
public List<PtovtaAgencia> buscar(String numagencia); public List<PtovtaAgencia> buscar(String numagencia);
public void borrarFisico(PtovtaAgencia pto);
} }

View File

@ -7,12 +7,14 @@ package com.rjconsultores.ventaboletos.service.impl;
import java.util.Calendar; import java.util.Calendar;
import java.util.List; import java.util.List;
import org.hibernate.Query;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import com.rjconsultores.ventaboletos.dao.PtovtaAgenciaDAO; import com.rjconsultores.ventaboletos.dao.PtovtaAgenciaDAO;
import com.rjconsultores.ventaboletos.entidad.PtovtaAgencia; import com.rjconsultores.ventaboletos.entidad.PtovtaAgencia;
import com.rjconsultores.ventaboletos.entidad.PtovtaEmpresa;
import com.rjconsultores.ventaboletos.service.PtovtaAgenciaService; import com.rjconsultores.ventaboletos.service.PtovtaAgenciaService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
@ -67,5 +69,7 @@ public class PtovtaAgenciaServiceImpl implements PtovtaAgenciaService {
return ptovtaBancoDAO.buscar(numagencia); return ptovtaBancoDAO.buscar(numagencia);
} }
public void borrarFisico(PtovtaAgencia pto) {
ptovtaBancoDAO.borrarFisico(pto);
}
} }