37 lines
1.3 KiB
Java
37 lines
1.3 KiB
Java
package com.rjconsultores.ventaboletos.service.impl;
|
|
|
|
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.CalcularPeajeDAO;
|
|
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
|
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
|
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
|
import com.rjconsultores.ventaboletos.service.CalcularPeajeService;
|
|
|
|
@Service("calcularPeajeService")
|
|
public class CalcularPeajeServiceImpl implements CalcularPeajeService{
|
|
|
|
@Autowired
|
|
private CalcularPeajeDAO calcularPeajeDAO;
|
|
|
|
@Override
|
|
public List<Object> buscarCasetasPeajeWithinTramo(Ruta ruta){
|
|
return calcularPeajeDAO.buscarCasetasPeajeWithinTramo(ruta);
|
|
}
|
|
|
|
@Override
|
|
public List<Ruta> buscarRutaWithCasetaPeajeFromOrgao(OrgaoConcedente oc){
|
|
return calcularPeajeDAO.buscarRutaWithCasetaPeajeFromOrgao(oc);
|
|
}
|
|
|
|
@Override
|
|
@Transactional(rollbackFor = BusinessException.class)
|
|
public int[] gerarSQLInserirPeajes(List<Ruta> lsRuta, OrgaoConcedente orgao, boolean usaICMS) throws Exception {
|
|
return calcularPeajeDAO.gerarSQLInserirPeajes(lsRuta, orgao, usaICMS);
|
|
}
|
|
}
|