63 lines
2.0 KiB
Java
63 lines
2.0 KiB
Java
/*
|
|
* To change this template, choose Tools | Templates
|
|
* and open the template in the editor.
|
|
*/
|
|
package com.rjconsultores.ventaboletos.service.impl;
|
|
|
|
import com.rjconsultores.ventaboletos.dao.TaxaEmbarqueKmDAO;
|
|
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
|
import com.rjconsultores.ventaboletos.entidad.TaxaEmbarqueKm;
|
|
import com.rjconsultores.ventaboletos.service.TaxaEmbarqueKmService;
|
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
|
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;
|
|
|
|
/**
|
|
*
|
|
* @author Desenvolvimento
|
|
*/
|
|
@Service("taxaEmbarqueKmService")
|
|
public class TaxaEmbarqueKmServiceImpl implements TaxaEmbarqueKmService {
|
|
|
|
@Autowired
|
|
private TaxaEmbarqueKmDAO taxaEmbarqueKmDAO;
|
|
|
|
public List<TaxaEmbarqueKm> obtenerTodos() {
|
|
return taxaEmbarqueKmDAO.obtenerTodos();
|
|
}
|
|
|
|
public TaxaEmbarqueKm obtenerID(Integer id) {
|
|
return taxaEmbarqueKmDAO.obtenerID(id);
|
|
}
|
|
|
|
@Transactional
|
|
public TaxaEmbarqueKm suscribir(TaxaEmbarqueKm entidad) {
|
|
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
|
entidad.setFecmodif(Calendar.getInstance().getTime());
|
|
entidad.setActivo(Boolean.TRUE);
|
|
|
|
return taxaEmbarqueKmDAO.suscribir(entidad);
|
|
}
|
|
|
|
@Transactional
|
|
public TaxaEmbarqueKm actualizacion(TaxaEmbarqueKm entidad) {
|
|
return taxaEmbarqueKmDAO.actualizacion(entidad);
|
|
}
|
|
|
|
@Transactional
|
|
public void borrar(TaxaEmbarqueKm entidad) {
|
|
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
|
entidad.setFecmodif(Calendar.getInstance().getTime());
|
|
entidad.setActivo(Boolean.FALSE);
|
|
|
|
taxaEmbarqueKmDAO.borrar(entidad);
|
|
}
|
|
|
|
public List<TaxaEmbarqueKm> buscarPorOrgao(OrgaoConcedente orgaoconcedenteId) {
|
|
return taxaEmbarqueKmDAO.buscarPorOrgao(orgaoconcedenteId);
|
|
}
|
|
}
|