edgar 2016-11-03 11:57:03 +00:00
parent 5c2b83e93f
commit be6c7ad7b2
1 changed files with 12 additions and 4 deletions

View File

@ -1,13 +1,16 @@
package com.rjconsultores.ventaboletos.service.impl; package com.rjconsultores.ventaboletos.service.impl;
import java.util.Date;
import java.util.List; import java.util.List;
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 com.rjconsultores.ventaboletos.dao.ConferenciaPendenciaDAO; import com.rjconsultores.ventaboletos.dao.ConferenciaPendenciaDAO;
import com.rjconsultores.ventaboletos.entidad.ConferenciaPendencia; import com.rjconsultores.ventaboletos.entidad.ConferenciaPendencia;
import com.rjconsultores.ventaboletos.service.ConferenciaPendenciaService; import com.rjconsultores.ventaboletos.service.ConferenciaPendenciaService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
@Service("conferenciaPendenciaService") @Service("conferenciaPendenciaService")
public class ConferenciaPendenciaServiceImpl implements ConferenciaPendenciaService { public class ConferenciaPendenciaServiceImpl implements ConferenciaPendenciaService {
@ -25,9 +28,14 @@ public class ConferenciaPendenciaServiceImpl implements ConferenciaPendenciaServ
return conferenciaPendenciaDAO.obtenerID(id); return conferenciaPendenciaDAO.obtenerID(id);
} }
@Override @Transactional
public ConferenciaPendencia suscribir(ConferenciaPendencia entidad) { public ConferenciaPendencia suscribir(ConferenciaPendencia entidad) {
return conferenciaPendenciaDAO.suscribir(entidad); entidad.setFecmodif(new Date());
entidad.setUsuario(UsuarioLogado.getUsuarioLogado());
if (entidad.getConferenciapendenciaId() == null) {
return conferenciaPendenciaDAO.suscribir(entidad);
}
return conferenciaPendenciaDAO.actualizacion(entidad);
} }
@Override @Override