thiago.penido 2015-09-04 17:07:20 +00:00
parent 7997ef5e04
commit bc75d07c33
1 changed files with 23 additions and 0 deletions

View File

@ -7,10 +7,15 @@ package com.rjconsultores.ventaboletos.service.impl;
import com.rjconsultores.ventaboletos.dao.ConvenioDAO;
import com.rjconsultores.ventaboletos.entidad.Convenio;
import com.rjconsultores.ventaboletos.entidad.ConvenioDet;
import com.rjconsultores.ventaboletos.entidad.ConvenioPuntoVenta;
import com.rjconsultores.ventaboletos.entidad.ConvenioTramo;
import com.rjconsultores.ventaboletos.entidad.ConvenioUsuario;
import com.rjconsultores.ventaboletos.service.ConvenioService;
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;
@ -63,6 +68,24 @@ public class ConvenioServiceImpl implements ConvenioService {
cd.setActivo(Boolean.FALSE);
}
for (ConvenioPuntoVenta cpv: entidad.getConvenioPuntoVentaList()) {
cpv.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
cpv.setFecmodif(Calendar.getInstance().getTime());
cpv.setActivo(Boolean.FALSE);
}
for (ConvenioUsuario cu : entidad.getConvenioUsuarioList()) {
cu.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
cu.setFecmodif(Calendar.getInstance().getTime());
cu.setActivo(Boolean.FALSE);
}
for (ConvenioTramo ct : entidad.getConvenioTramoList()) {
ct.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
ct.setFecmodif(Calendar.getInstance().getTime());
ct.setActivo(Boolean.FALSE);
}
convenioDAO.actualizacion(entidad);
}