caso de uso 3387 relacionado ao filtro por empresa associada ao usuário

caso de uso 2487 criação do cadastro de feriados

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@23590 d1611594-4594-4d17-8e1d-87c2c4800839
master
carla 2013-01-15 17:28:25 +00:00
parent 84c295316d
commit cedca61e2a
42 changed files with 869 additions and 64 deletions

View File

@ -9,6 +9,7 @@ import com.rjconsultores.ventaboletos.entidad.Marca;
import com.rjconsultores.ventaboletos.entidad.MarcaClaseServicio; import com.rjconsultores.ventaboletos.entidad.MarcaClaseServicio;
import com.rjconsultores.ventaboletos.service.ClaseServicioService; import com.rjconsultores.ventaboletos.service.ClaseServicioService;
import com.rjconsultores.ventaboletos.service.MarcaService; import com.rjconsultores.ventaboletos.service.MarcaService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject; import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
@ -115,7 +116,7 @@ public class BusquedaAsociacionClaseServicioMarcaController extends MyGenericFor
@Override @Override
public void doAfterCompose(Component comp) throws Exception { public void doAfterCompose(Component comp) throws Exception {
lsMarcas = marcaService.obtenerTodos(); lsMarcas = marcaService.buscarMarcaPorEmpresa(UsuarioLogado.getUsuarioLogado());
lsClaseServicios = claseServicioService.obtenerTodos(); lsClaseServicios = claseServicioService.obtenerTodos();
super.doAfterCompose(comp); super.doAfterCompose(comp);

View File

@ -31,6 +31,8 @@ import com.rjconsultores.ventaboletos.service.EmpresaService;
import com.rjconsultores.ventaboletos.service.MonedaService; import com.rjconsultores.ventaboletos.service.MonedaService;
import com.rjconsultores.ventaboletos.service.NodoService; import com.rjconsultores.ventaboletos.service.NodoService;
import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService; import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService;
import com.rjconsultores.ventaboletos.service.UsuarioEmpresaService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject; import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
@ -51,6 +53,8 @@ public class BusquedaPuntoVentaController extends MyGenericForwardComposer {
@Autowired @Autowired
private EmpresaService empresaService; private EmpresaService empresaService;
@Autowired @Autowired
private UsuarioEmpresaService usuarioEmpresaService;
@Autowired
private TipoPuntoVentaService tipoPuntoVentaService; private TipoPuntoVentaService tipoPuntoVentaService;
@Autowired @Autowired
private MonedaService monedaService; private MonedaService monedaService;
@ -203,7 +207,7 @@ public class BusquedaPuntoVentaController extends MyGenericForwardComposer {
public void doAfterCompose(Component comp) throws Exception { public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp); super.doAfterCompose(comp);
lsEmpresas = empresaService.obtenerIndTipo1(); lsEmpresas = usuarioEmpresaService.obtenerEmpresa(UsuarioLogado.getUsuarioLogado());
lsTipoPuntoVenta = tipoPuntoVentaService.obtenerTodos(); lsTipoPuntoVenta = tipoPuntoVentaService.obtenerTodos();
lsMoneda = monedaService.obtenerTodos(); lsMoneda = monedaService.obtenerTodos();
lsNodos = nodoService.obtenerTodos(); lsNodos = nodoService.obtenerTodos();

View File

@ -11,6 +11,7 @@ import com.rjconsultores.ventaboletos.entidad.MarcaClaseServicioPK;
import com.rjconsultores.ventaboletos.service.ClaseServicioService; import com.rjconsultores.ventaboletos.service.ClaseServicioService;
import com.rjconsultores.ventaboletos.service.MarcaClaseServicioService; import com.rjconsultores.ventaboletos.service.MarcaClaseServicioService;
import com.rjconsultores.ventaboletos.service.MarcaService; import com.rjconsultores.ventaboletos.service.MarcaService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import java.util.List; import java.util.List;
@ -100,7 +101,7 @@ public class EditarAsociacionClaseServicioMarcaController extends MyGenericForwa
@Override @Override
public void doAfterCompose(Component comp) throws Exception { public void doAfterCompose(Component comp) throws Exception {
lsMarcas = marcaService.obtenerTodos(); lsMarcas = marcaService.buscarMarcaPorEmpresa(UsuarioLogado.getUsuarioLogado());
lsClaseServicios = claseServicioService.obtenerTodos(); lsClaseServicios = claseServicioService.obtenerTodos();
marcaClaseServicioList = (MyListbox) Executions.getCurrent().getArg().get("marcaClaseServicioList"); marcaClaseServicioList = (MyListbox) Executions.getCurrent().getArg().get("marcaClaseServicioList");

View File

@ -56,6 +56,7 @@ import com.rjconsultores.ventaboletos.entidad.PtovtaTitular;
import com.rjconsultores.ventaboletos.entidad.PuntoVenta; import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
import com.rjconsultores.ventaboletos.entidad.TipoPuntoVenta; import com.rjconsultores.ventaboletos.entidad.TipoPuntoVenta;
import com.rjconsultores.ventaboletos.entidad.UsuarioBancario; import com.rjconsultores.ventaboletos.entidad.UsuarioBancario;
import com.rjconsultores.ventaboletos.entidad.UsuarioEmpresa;
import com.rjconsultores.ventaboletos.service.CiudadService; import com.rjconsultores.ventaboletos.service.CiudadService;
import com.rjconsultores.ventaboletos.service.ColoniaService; import com.rjconsultores.ventaboletos.service.ColoniaService;
import com.rjconsultores.ventaboletos.service.EmpresaService; import com.rjconsultores.ventaboletos.service.EmpresaService;
@ -68,6 +69,7 @@ import com.rjconsultores.ventaboletos.service.PtovtaEmpresaService;
import com.rjconsultores.ventaboletos.service.PuntoVentaService; import com.rjconsultores.ventaboletos.service.PuntoVentaService;
import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService; import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService;
import com.rjconsultores.ventaboletos.service.UsuarioBancarioService; import com.rjconsultores.ventaboletos.service.UsuarioBancarioService;
import com.rjconsultores.ventaboletos.service.UsuarioEmpresaService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
@ -114,6 +116,8 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
private PtoVtaUsuarioBancarioService ptoVtaUsuarioBancarioService; private PtoVtaUsuarioBancarioService ptoVtaUsuarioBancarioService;
@Autowired @Autowired
private UsuarioBancarioService usuarioBancarioService; private UsuarioBancarioService usuarioBancarioService;
@Autowired
private UsuarioEmpresaService usuarioEmpresaService;
private PuntoVenta puntoVenta; private PuntoVenta puntoVenta;
private Textbox txtCP; private Textbox txtCP;
private MyListbox puntoVentaList; private MyListbox puntoVentaList;
@ -253,7 +257,8 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
popularCombobox(cmbLote, this.getLote()); popularCombobox(cmbLote, this.getLote());
popularCombobox(cmbReceita, this.getTipoConta()); popularCombobox(cmbReceita, this.getTipoConta());
lsEmpresas = empresaService.obtenerIndTipo1(); lsEmpresas = usuarioEmpresaService.obtenerEmpresa(UsuarioLogado.getUsuarioLogado());
lsMoneda = monedaService.obtenerTodos(); lsMoneda = monedaService.obtenerTodos();
lsBanco = ptovtaBancoService.obtenerTodos(); lsBanco = ptovtaBancoService.obtenerTodos();
lsColonia = new ArrayList<Colonia>(); lsColonia = new ArrayList<Colonia>();

View File

@ -0,0 +1,157 @@
package com.rjconsultores.ventaboletos.web.gui.controladores.configuracioneccomerciales;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.zkoss.util.resource.Labels;
import org.zkoss.zhtml.Messagebox;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zul.Intbox;
import org.zkoss.zul.Paging;
import org.zkoss.zul.api.Datebox;
import com.rjconsultores.ventaboletos.entidad.Feriado;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.MyTextbox;
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderFeriado;
@Controller("busquedaConfigFeriadoController")
@Scope("prototype")
public class BusquedaConfigFeriadoController extends MyGenericForwardComposer {
private static final long serialVersionUID = 1L;
@Autowired
private transient PagedListWrapper<Feriado> plwFeriado;
private MyListbox configFeriadoList;
private Paging pagingConfigFeriado;
private MyTextbox textboxDescricao;
private Intbox txtID;
private Datebox fecFeriado;
public MyTextbox getTextboxDescricao() {
return textboxDescricao;
}
public void setTextboxDescricao(MyTextbox textboxDescricao) {
this.textboxDescricao = textboxDescricao;
}
public Intbox getTxtID() {
return txtID;
}
public void setTxtID(Intbox txtID) {
this.txtID = txtID;
}
public Datebox getFecFeriado() {
return fecFeriado;
}
public void setFecFeriado(Datebox fecFeriado) {
this.fecFeriado = fecFeriado;
}
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
configFeriadoList.setItemRenderer(new RenderFeriado());
configFeriadoList.addEventListener("onDoubleClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
Feriado c = (Feriado) configFeriadoList.getSelected();
verFeriado(c);
}
});
refreshLista();
}
@SuppressWarnings({ "rawtypes", "unchecked" })
private void verFeriado(Feriado a) {
if (a == null) {
return;
}
Map args = new HashMap();
args.put("feriado", a);
args.put("configFeriadoList", configFeriadoList);
openWindow("/gui/configuraciones_comerciales/editarConfigFeriado.zul",
Labels.getLabel("busquedaConfigFeriadoController.window.title"), args, MODAL);
}
private void refreshLista() {
HibernateSearchObject<Feriado> feriado=
new HibernateSearchObject<Feriado>(Feriado.class,
pagingConfigFeriado.getPageSize());
Integer idFeriado= txtID.getValue();
if (idFeriado != null) {
feriado.addFilterEqual("feriadoId", idFeriado);
}
String descricao = textboxDescricao.getText();
if ((descricao != null) ) {
feriado.addFilterLike("descferiado", "%" + descricao.trim().concat("%"));
}
if (fecFeriado.getValue() != null) {
Date data = fecFeriado.getValue();
data.setHours(00);
data.setMinutes(00);
data.setSeconds(00);
feriado.addFilterEqual("fecferiado",data);
}
feriado.addFilterEqual("activo", Boolean.TRUE);
feriado.addSortAsc("descferiado");
feriado.addFilterNotEqual("feriadoId", -1);
plwFeriado.init(feriado, configFeriadoList, pagingConfigFeriado);
if (configFeriadoList.getData().length == 0) {
try {
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
Labels.getLabel("busquedaAlertaCtrlController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
} catch (InterruptedException ex) {
}
}
}
public void onClick$btnPesquisa(Event ev) {
refreshLista();
}
public void onClick$btnRefresh(Event ev) {
refreshLista();
}
public void onClick$btnNovo(Event ev) {
verFeriado(new Feriado());
}
}

View File

@ -30,6 +30,7 @@ import com.rjconsultores.ventaboletos.service.MarcaService;
import com.rjconsultores.ventaboletos.service.MotivoCancelacionService; import com.rjconsultores.ventaboletos.service.MotivoCancelacionService;
import com.rjconsultores.ventaboletos.service.OrgaoConcedenteService; import com.rjconsultores.ventaboletos.service.OrgaoConcedenteService;
import com.rjconsultores.ventaboletos.service.PuntoVentaService; import com.rjconsultores.ventaboletos.service.PuntoVentaService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject; import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
@ -112,7 +113,7 @@ public class BusquedaConfiguracionCancelacionController extends MyGenericForward
lsMarca = new ArrayList<Marca>(); lsMarca = new ArrayList<Marca>();
lsMarca.add(new Marca()); lsMarca.add(new Marca());
lsMarca.addAll(marcaService.obtenerTodos()); lsMarca.addAll(marcaService.buscarMarcaPorEmpresa(UsuarioLogado.getUsuarioLogado()));
lsMotivoCancelacion = new ArrayList<MotivoCancelacion>(); lsMotivoCancelacion = new ArrayList<MotivoCancelacion>();
lsMotivoCancelacion.add(new MotivoCancelacion()); lsMotivoCancelacion.add(new MotivoCancelacion());

View File

@ -0,0 +1,181 @@
package com.rjconsultores.ventaboletos.web.gui.controladores.configuracioneccomerciales;
import java.util.List;
import org.apache.log4j.Logger;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.zkoss.util.resource.Labels;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zul.Button;
import org.zkoss.zul.Datebox;
import org.zkoss.zul.Messagebox;
import com.rjconsultores.ventaboletos.entidad.Feriado;
import com.rjconsultores.ventaboletos.service.FeriadoService;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.MyTextbox;
@Controller("editarConfigFeriadoController")
@Scope("prototype")
public class EditarConfigFeriadoController extends MyGenericForwardComposer {
private static final long serialVersionUID = 1L;
private static Logger log = Logger.getLogger(EditarConfigFeriadoController.class);
private FeriadoService feriadoService;
private Feriado feriado;
private MyListbox configFeriadoList;
private MyTextbox textboxDescricao;
private Datebox fecFeriado;
private Button btnApagar;
public Feriado getFeriado() {
return feriado;
}
public void setFeriado(Feriado feriado) {
this.feriado = feriado;
}
public FeriadoService getFeriadoService() {
return feriadoService;
}
public void setFeriadoService(FeriadoService feriadoService) {
this.feriadoService = feriadoService;
}
public MyTextbox getTextboxDescricao() {
return textboxDescricao;
}
public void setTextboxDescricao(MyTextbox textboxDescricao) {
this.textboxDescricao = textboxDescricao;
}
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
try {
feriado = (Feriado) Executions.getCurrent().getArg().get("feriado");
configFeriadoList = (MyListbox) Executions.getCurrent().getArg().get("configFeriadoList");
if (feriado.getFeriadoId() == null) {
btnApagar.setVisible(Boolean.FALSE);
} else {
feriado = feriadoService.obtenerID(feriado.getFeriadoId());
}
textboxDescricao.focus();
} catch (Exception e) {
log.error("Feriado: " + e);
Messagebox.show(
Labels.getLabel("MSG.Error"),
Labels.getLabel("editarConfigFeriadoController.window.title"),
Messagebox.OK, Messagebox.ERROR);
}
}
public void onClick$btnSalvar(Event ev) throws InterruptedException {
textboxDescricao.getValue();
fecFeriado.getValue();
if (feriado.getFeriadoId()== null) {
List<Feriado> lsFeriado = feriadoService.buscar(fecFeriado.getValue());
if (!lsFeriado.isEmpty()) {
Messagebox.show(
Labels.getLabel("MSG.Registro.Existe"),
Labels.getLabel("editarConfigFeriadoController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
return;
}
}
try {
if (feriado.getFeriadoId() == null) {
feriadoService.suscribir(feriado);
configFeriadoList.addItem(feriado);
} else {
feriadoService.actualizacion(feriado);
configFeriadoList.updateItem(feriado);
}
Messagebox.show(
Labels.getLabel("editarConfigFeriadoControlle.MSG.suscribirOK"),
Labels.getLabel("editarConfigControlerController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
closeWindow();
} catch (Exception ex) {
log.error("editarConfigFeriadoController: " + ex);
Messagebox.show(
Labels.getLabel("MSG.Error"),
Labels.getLabel("editarConfigFeriadoController.window.title"),
Messagebox.OK, Messagebox.ERROR);
}
}
public void onClick$btnApagar(Event ev) {
try {
int resp = Messagebox.show(
Labels.getLabel("editarConfigFeriadoController.MSG.borrarPergunta"),
Labels.getLabel("editarConfigFeriadoController.window.title"),
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
if (resp == Messagebox.YES) {
feriadoService.borrar(feriado);
Messagebox.show(
Labels.getLabel("feriadoeditarConfigFeriadoController.MSG.borrarOK"),
Labels.getLabel("feriadoeditarConfigFeriadoController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
configFeriadoList.removeItem(feriado);
closeWindow();
}
} catch (Exception ex) {
log.error(ex);
}
}
}

View File

@ -133,7 +133,7 @@ public class EditarConfiguracionCancelacionController extends MyGenericForwardCo
@Override @Override
public void doAfterCompose(Component comp) throws Exception { public void doAfterCompose(Component comp) throws Exception {
lsMarca = marcaService.obtenerTodos(); lsMarca = marcaService.buscarMarcaPorEmpresa(UsuarioLogado.getUsuarioLogado());
lsOrgaoConcedente = orgaoConcedenteService.obtenerTodos(); lsOrgaoConcedente = orgaoConcedenteService.obtenerTodos();
lsMotivoCancelacion = motivoCancelacionService.obtenerTodos(); lsMotivoCancelacion = motivoCancelacionService.obtenerTodos();

View File

@ -55,6 +55,7 @@ import com.rjconsultores.ventaboletos.service.CorridaCtrlService;
import com.rjconsultores.ventaboletos.service.EmpresaService; import com.rjconsultores.ventaboletos.service.EmpresaService;
import com.rjconsultores.ventaboletos.service.MarcaService; import com.rjconsultores.ventaboletos.service.MarcaService;
import com.rjconsultores.ventaboletos.service.OrgaoConcedenteService; import com.rjconsultores.ventaboletos.service.OrgaoConcedenteService;
import com.rjconsultores.ventaboletos.service.UsuarioEmpresaService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.gui.controladores.esquemaoperacional.TiempoEstanciaEsquemaTramoController; import com.rjconsultores.ventaboletos.web.gui.controladores.esquemaoperacional.TiempoEstanciaEsquemaTramoController;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
@ -82,6 +83,8 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp
@Autowired @Autowired
private EmpresaService empresaService; private EmpresaService empresaService;
@Autowired @Autowired
private UsuarioEmpresaService usuarioEmpresaService;
@Autowired
private CorridaCtrlService corridaCtrlService; private CorridaCtrlService corridaCtrlService;
@Autowired @Autowired
private CategoriaService categoriaService; private CategoriaService categoriaService;
@ -312,8 +315,8 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp
public void doAfterCompose(Component comp) throws Exception { public void doAfterCompose(Component comp) throws Exception {
lsCategorias = categoriaService.obtenerTodasCategoriasVisibles(); lsCategorias = categoriaService.obtenerTodasCategoriasVisibles();
lsClaseServicio = claseServicioService.obtenerTodos(); lsClaseServicio = claseServicioService.obtenerTodos();
lsEmpresas = empresaService.obtenerIndTipo1(); lsEmpresas = usuarioEmpresaService.obtenerEmpresa(UsuarioLogado.getUsuarioLogado());
lsMarcas = marcaService.obtenerTodos(); lsMarcas = marcaService.buscarMarcaPorEmpresa(UsuarioLogado.getUsuarioLogado());
lsOrgao = orgaoService.obtenerTodos(); lsOrgao = orgaoService.obtenerTodos();
super.doAfterCompose(comp); super.doAfterCompose(comp);

View File

@ -129,7 +129,7 @@ public class EditarConfiguracionReservacionController extends MyGenericForwardCo
lsCategoria = categoriaService.obtenerTodos(); lsCategoria = categoriaService.obtenerTodos();
lsClase = claseService.obtenerTodos(); lsClase = claseService.obtenerTodos();
lsMarca = marcaService.obtenerTodos(); lsMarca = marcaService.buscarMarcaPorEmpresa(UsuarioLogado.getUsuarioLogado());
super.doAfterCompose(comp); super.doAfterCompose(comp);

View File

@ -80,7 +80,7 @@ public class EditarProdMarcaController extends MyGenericForwardComposer {
@Override @Override
public void doAfterCompose(Component comp) throws Exception { public void doAfterCompose(Component comp) throws Exception {
lsProdPrecio = new ArrayList<ProdPrecio>(); lsProdPrecio = new ArrayList<ProdPrecio>();
lsMarca = marcaService.obtenerTodos(); lsMarca = marcaService.buscarMarcaPorEmpresa(UsuarioLogado.getUsuarioLogado());
lsProdMarca = (List<ProdMarca>) Executions.getCurrent().getArg().get("lsProdMarca"); lsProdMarca = (List<ProdMarca>) Executions.getCurrent().getArg().get("lsProdMarca");
prodMarca = (ProdMarca) Executions.getCurrent().getArg().get("prodMarca"); prodMarca = (ProdMarca) Executions.getCurrent().getArg().get("prodMarca");
prodMarcaList = (MyListbox) Executions.getCurrent().getArg().get("prodMarcaList"); prodMarcaList = (MyListbox) Executions.getCurrent().getArg().get("prodMarcaList");

View File

@ -97,7 +97,7 @@ public class EditarProductoServicioController extends MyGenericForwardComposer {
productoServicio = (ProductoServicio) Executions.getCurrent().getArg().get("productoServicio"); productoServicio = (ProductoServicio) Executions.getCurrent().getArg().get("productoServicio");
productoServicioList = (MyListbox) Executions.getCurrent().getArg().get("productoServicioList"); productoServicioList = (MyListbox) Executions.getCurrent().getArg().get("productoServicioList");
lsMarca = marcaService.obtenerTodos(); lsMarca = marcaService.buscarMarcaPorEmpresa(UsuarioLogado.getUsuarioLogado());
super.doAfterCompose(comp); super.doAfterCompose(comp);

View File

@ -129,7 +129,7 @@ public class EditarAltaCortesiaRHController extends MyGenericForwardComposer {
@Override @Override
public void doAfterCompose(Component comp) throws Exception { public void doAfterCompose(Component comp) throws Exception {
tipoCortesiaList = tipoCortesiaService.obtenerGrupoCortesia(3); tipoCortesiaList = tipoCortesiaService.obtenerGrupoCortesia(3);
marcaList = marcaService.obtenerTodos(); marcaList = marcaService.buscarMarcaPorEmpresa(UsuarioLogado.getUsuarioLogado());
claseServicioList = claseServicioService.obtenerTodos(); claseServicioList = claseServicioService.obtenerTodos();
motivoViajeList = motivoViajeService.obtenerTodos(); motivoViajeList = motivoViajeService.obtenerTodos();

View File

@ -13,6 +13,8 @@ import com.rjconsultores.ventaboletos.service.ClaseServicioService;
import com.rjconsultores.ventaboletos.service.EmpresaService; import com.rjconsultores.ventaboletos.service.EmpresaService;
import com.rjconsultores.ventaboletos.service.MarcaService; import com.rjconsultores.ventaboletos.service.MarcaService;
import com.rjconsultores.ventaboletos.service.RutaService; import com.rjconsultores.ventaboletos.service.RutaService;
import com.rjconsultores.ventaboletos.service.UsuarioEmpresaService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject; import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
@ -59,6 +61,8 @@ public class BusquedaCorridaController extends MyGenericForwardComposer {
private RutaService rutaService; private RutaService rutaService;
@Autowired @Autowired
private EmpresaService empresaService; private EmpresaService empresaService;
@Autowired
private UsuarioEmpresaService usuarioEmpresaService;
private MyListbox esquemaCorridaList; private MyListbox esquemaCorridaList;
private Paging pagingEsquemaCorrida; private Paging pagingEsquemaCorrida;
private Datebox fecInicio; private Datebox fecInicio;
@ -208,8 +212,8 @@ public class BusquedaCorridaController extends MyGenericForwardComposer {
public void doAfterCompose(Component comp) throws Exception { public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp); super.doAfterCompose(comp);
lsEmpresa = empresaService.obtenerIndTipo1(); lsEmpresa = usuarioEmpresaService.obtenerEmpresa(UsuarioLogado.getUsuarioLogado());
lsMarca = marcaService.obtenerTodos(); lsMarca = marcaService.buscarMarcaPorEmpresa(UsuarioLogado.getUsuarioLogado());
lsClase = claseService.obtenerTodos(); lsClase = claseService.obtenerTodos();
lsRuta = rutaService.obtenerTodos(); lsRuta = rutaService.obtenerTodos();

View File

@ -13,6 +13,8 @@ import com.rjconsultores.ventaboletos.service.ClaseServicioService;
import com.rjconsultores.ventaboletos.service.EmpresaService; import com.rjconsultores.ventaboletos.service.EmpresaService;
import com.rjconsultores.ventaboletos.service.MarcaService; import com.rjconsultores.ventaboletos.service.MarcaService;
import com.rjconsultores.ventaboletos.service.RutaService; import com.rjconsultores.ventaboletos.service.RutaService;
import com.rjconsultores.ventaboletos.service.UsuarioEmpresaService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject; import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
@ -52,6 +54,8 @@ public class BusquedaCorridaReboteController extends MyGenericForwardComposer {
private transient PagedListWrapper<EsquemaCorrida> plwEsquemaCorrida; private transient PagedListWrapper<EsquemaCorrida> plwEsquemaCorrida;
@Autowired @Autowired
private MarcaService marcaService; private MarcaService marcaService;
@Autowired
private UsuarioEmpresaService usuarioEmpresaService;
@Autowired @Autowired
private ClaseServicioService claseService; private ClaseServicioService claseService;
@Autowired @Autowired
@ -208,8 +212,8 @@ public class BusquedaCorridaReboteController extends MyGenericForwardComposer {
public void doAfterCompose(Component comp) throws Exception { public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp); super.doAfterCompose(comp);
lsEmpresa = empresaService.obtenerIndTipo1(); lsEmpresa = usuarioEmpresaService.obtenerEmpresa(UsuarioLogado.getUsuarioLogado());
lsMarca = marcaService.obtenerTodos(); lsMarca = marcaService.buscarMarcaPorEmpresa(UsuarioLogado.getUsuarioLogado());
lsClase = claseService.obtenerTodos(); lsClase = claseService.obtenerTodos();
lsRuta = rutaService.obtenerTodos(); lsRuta = rutaService.obtenerTodos();
esquemaCorridaPai = (EsquemaCorrida) Executions.getCurrent().getArg().get("esquemaCorrida"); esquemaCorridaPai = (EsquemaCorrida) Executions.getCurrent().getArg().get("esquemaCorrida");

View File

@ -57,6 +57,7 @@ import com.rjconsultores.ventaboletos.service.RutaEmpresaService;
import com.rjconsultores.ventaboletos.service.RutaSecuenciaService; import com.rjconsultores.ventaboletos.service.RutaSecuenciaService;
import com.rjconsultores.ventaboletos.service.RutaService; import com.rjconsultores.ventaboletos.service.RutaService;
import com.rjconsultores.ventaboletos.service.TramoService; import com.rjconsultores.ventaboletos.service.TramoService;
import com.rjconsultores.ventaboletos.service.UsuarioEmpresaService;
import com.rjconsultores.ventaboletos.service.ViaService; import com.rjconsultores.ventaboletos.service.ViaService;
import com.rjconsultores.ventaboletos.utilerias.RegistroConDependenciaException; import com.rjconsultores.ventaboletos.utilerias.RegistroConDependenciaException;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
@ -92,6 +93,8 @@ public class EditarCatalogoDeRutaController extends MyGenericForwardComposer
@Autowired @Autowired
private ViaService viaService; private ViaService viaService;
@Autowired @Autowired
private UsuarioEmpresaService usuarioEmpresaService;
@Autowired
private EmpresaService empresaService; private EmpresaService empresaService;
@Autowired @Autowired
private RutaEmpresaService rutaEmpresaService; private RutaEmpresaService rutaEmpresaService;
@ -223,7 +226,7 @@ public class EditarCatalogoDeRutaController extends MyGenericForwardComposer
public void doAfterCompose(Component comp) throws Exception { public void doAfterCompose(Component comp) throws Exception {
lsClase = claseService.buscarTodosExceto(-1); lsClase = claseService.buscarTodosExceto(-1);
lsVia = viaService.obtenerTodos(); lsVia = viaService.obtenerTodos();
lsEmpresa = empresaService.obtenerIndTipo1(); lsEmpresa = usuarioEmpresaService.obtenerEmpresa(UsuarioLogado.getUsuarioLogado());
lsOrgaoConcedente = orgaoConcedenteService.obtenerTodos(); lsOrgaoConcedente = orgaoConcedenteService.obtenerTodos();
ruta = (Ruta) Executions.getCurrent().getArg().get("ruta"); ruta = (Ruta) Executions.getCurrent().getArg().get("ruta");

View File

@ -65,6 +65,7 @@ import com.rjconsultores.ventaboletos.service.RolOperativoService;
import com.rjconsultores.ventaboletos.service.RutaCombinacionService; import com.rjconsultores.ventaboletos.service.RutaCombinacionService;
import com.rjconsultores.ventaboletos.service.RutaSecuenciaService; import com.rjconsultores.ventaboletos.service.RutaSecuenciaService;
import com.rjconsultores.ventaboletos.service.RutaService; import com.rjconsultores.ventaboletos.service.RutaService;
import com.rjconsultores.ventaboletos.service.UsuarioEmpresaService;
import com.rjconsultores.ventaboletos.utilerias.ApplicationProperties; import com.rjconsultores.ventaboletos.utilerias.ApplicationProperties;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.gui.controladores.catalogos.BusquedaFormaPagoController; import com.rjconsultores.ventaboletos.web.gui.controladores.catalogos.BusquedaFormaPagoController;
@ -93,6 +94,8 @@ public class EditarCorridaController extends MyGenericForwardComposer {
private MarcaService marcaService; private MarcaService marcaService;
@Autowired @Autowired
private ClaseServicioService claseService; private ClaseServicioService claseService;
@Autowired
private UsuarioEmpresaService usuarioEmpresaService;
@Autowired @Autowired
private RutaService rutaService; private RutaService rutaService;
@Autowired @Autowired
@ -181,7 +184,7 @@ public class EditarCorridaController extends MyGenericForwardComposer {
lsParadaEsquema = new ArrayList<ParadaEsquema>(); lsParadaEsquema = new ArrayList<ParadaEsquema>();
lsEmpresa = empresaService.obtenerIndTipo1(); lsEmpresa = usuarioEmpresaService.obtenerEmpresa(UsuarioLogado.getUsuarioLogado());
lsClase = claseService.buscarTodosExceto(-1); lsClase = claseService.buscarTodosExceto(-1);
lsRolOperativo = rolOperativoService.obtenerTodos(); lsRolOperativo = rolOperativoService.obtenerTodos();

View File

@ -28,7 +28,9 @@ import com.rjconsultores.ventaboletos.service.ClaseServicioService;
import com.rjconsultores.ventaboletos.service.EmpresaService; import com.rjconsultores.ventaboletos.service.EmpresaService;
import com.rjconsultores.ventaboletos.service.OrgaoConcedenteService; import com.rjconsultores.ventaboletos.service.OrgaoConcedenteService;
import com.rjconsultores.ventaboletos.service.TramoRutaService; import com.rjconsultores.ventaboletos.service.TramoRutaService;
import com.rjconsultores.ventaboletos.service.UsuarioEmpresaService;
import com.rjconsultores.ventaboletos.service.ViaService; import com.rjconsultores.ventaboletos.service.ViaService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.vo.esquemaoperacional.RutaTramoVO; import com.rjconsultores.ventaboletos.vo.esquemaoperacional.RutaTramoVO;
import com.rjconsultores.ventaboletos.web.gui.componente.esquemaoperacional.GridRutaTramo; import com.rjconsultores.ventaboletos.web.gui.componente.esquemaoperacional.GridRutaTramo;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
@ -52,6 +54,8 @@ public class EditarTramoRutaController extends MyGenericForwardComposer {
private TramoRutaService tramoRutaService; private TramoRutaService tramoRutaService;
@Autowired @Autowired
private EmpresaService empresaService; private EmpresaService empresaService;
@Autowired
private UsuarioEmpresaService usuarioEmpresaService;
@Autowired @Autowired
private OrgaoConcedenteService orgaoConcedenteService; private OrgaoConcedenteService orgaoConcedenteService;
private List<OrgaoConcedente> lsOrgaoConcedente; private List<OrgaoConcedente> lsOrgaoConcedente;
@ -73,7 +77,7 @@ public class EditarTramoRutaController extends MyGenericForwardComposer {
public void doAfterCompose(Component comp) throws Exception { public void doAfterCompose(Component comp) throws Exception {
lsOrgaoConcedente = orgaoConcedenteService.obtenerTodos(); lsOrgaoConcedente = orgaoConcedenteService.obtenerTodos();
lsClaseServicio = claseServicioService.obtenerTodos(); lsClaseServicio = claseServicioService.obtenerTodos();
lsEmpresa = empresaService.obtenerIndTipo1(); lsEmpresa = usuarioEmpresaService.obtenerEmpresa(UsuarioLogado.getUsuarioLogado());
lsRutaEmpresa = new ArrayList<Empresa>(); lsRutaEmpresa = new ArrayList<Empresa>();
super.doAfterCompose(comp); super.doAfterCompose(comp);

View File

@ -37,6 +37,7 @@ import com.rjconsultores.ventaboletos.service.EmpresaService;
import com.rjconsultores.ventaboletos.service.MarcaService; import com.rjconsultores.ventaboletos.service.MarcaService;
import com.rjconsultores.ventaboletos.service.ParadaService; import com.rjconsultores.ventaboletos.service.ParadaService;
import com.rjconsultores.ventaboletos.service.TarjetaViajeService; import com.rjconsultores.ventaboletos.service.TarjetaViajeService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
@ -423,7 +424,7 @@ public class EditarTarjetaViajeController extends MyGenericForwardComposer {
item.setParent(cmbSecuencia); item.setParent(cmbSecuencia);
cmbSecuencia.setSelectedItem(item); cmbSecuencia.setSelectedItem(item);
} }
lsMarca = marcaService.buscarDescricaoIdMarca(); lsMarca = marcaService.buscarMarcaPorEmpresa(UsuarioLogado.getUsuarioLogado());
lsEmpresa = empresaService.buscarTodosExceto(-1); lsEmpresa = empresaService.buscarTodosExceto(-1);
lsAutobus = autobusService.obtenerTodos(); lsAutobus = autobusService.obtenerTodos();
lsClaseServicio = claseServicioService.buscarTodosExceto(-1); lsClaseServicio = claseServicioService.buscarTodosExceto(-1);

View File

@ -27,6 +27,8 @@ import com.rjconsultores.ventaboletos.entidad.Empresa;
import com.rjconsultores.ventaboletos.entidad.Pricing; import com.rjconsultores.ventaboletos.entidad.Pricing;
import com.rjconsultores.ventaboletos.service.EmpresaService; import com.rjconsultores.ventaboletos.service.EmpresaService;
import com.rjconsultores.ventaboletos.service.PricingService; import com.rjconsultores.ventaboletos.service.PricingService;
import com.rjconsultores.ventaboletos.service.UsuarioEmpresaService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject; import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
@ -47,6 +49,8 @@ public class BusquedaPricingController extends MyGenericForwardComposer {
private PricingService pricingService; private PricingService pricingService;
@Autowired @Autowired
private EmpresaService empresaService; private EmpresaService empresaService;
@Autowired
private UsuarioEmpresaService usuarioEmpresaService;
private MyListbox pricingList; private MyListbox pricingList;
private Paging pagingPricing; private Paging pagingPricing;
private List<Pricing> lsPricing; private List<Pricing> lsPricing;
@ -61,7 +65,7 @@ public class BusquedaPricingController extends MyGenericForwardComposer {
@Override @Override
public void doAfterCompose(Component comp) throws Exception { public void doAfterCompose(Component comp) throws Exception {
lsEmpresa = empresaService.obtenerIndTipo1(); lsEmpresa = usuarioEmpresaService.obtenerEmpresa(UsuarioLogado.getUsuarioLogado());
super.doAfterCompose(comp); super.doAfterCompose(comp);

View File

@ -17,6 +17,7 @@ import com.rjconsultores.ventaboletos.service.MarcaService;
import com.rjconsultores.ventaboletos.service.MonedaService; import com.rjconsultores.ventaboletos.service.MonedaService;
import com.rjconsultores.ventaboletos.service.ParadaService; import com.rjconsultores.ventaboletos.service.ParadaService;
import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService; import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject; import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
@ -80,7 +81,7 @@ public class BusquedaPricingEspecificoController extends MyGenericForwardCompose
@Override @Override
public void doAfterCompose(Component comp) throws Exception { public void doAfterCompose(Component comp) throws Exception {
lsMarca = marcaService.obtenerTodos(); lsMarca = marcaService.buscarMarcaPorEmpresa(UsuarioLogado.getUsuarioLogado());
lsMoneda = monedaService.obtenerTodos(); lsMoneda = monedaService.obtenerTodos();
lsCategoria = categoriaService.obtenerTodos(); lsCategoria = categoriaService.obtenerTodos();
lsClaseServicio = claseServicioService.obtenerTodos(); lsClaseServicio = claseServicioService.obtenerTodos();

View File

@ -47,6 +47,7 @@ import com.rjconsultores.ventaboletos.service.PricingTipoServicioService;
import com.rjconsultores.ventaboletos.service.PuntoVentaService; import com.rjconsultores.ventaboletos.service.PuntoVentaService;
import com.rjconsultores.ventaboletos.service.RutaService; import com.rjconsultores.ventaboletos.service.RutaService;
import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService; import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService;
import com.rjconsultores.ventaboletos.service.UsuarioEmpresaService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
@ -122,6 +123,8 @@ public class EditarPricingController extends MyGenericForwardComposer {
private PricingTipoServicioService pricingTipoServicioService; private PricingTipoServicioService pricingTipoServicioService;
@Autowired @Autowired
private EmpresaService empresaService; private EmpresaService empresaService;
@Autowired
private UsuarioEmpresaService usuarioEmpresaService;
@Autowired @Autowired
private MarcaService marcaService; private MarcaService marcaService;
@Autowired @Autowired
@ -194,7 +197,7 @@ public class EditarPricingController extends MyGenericForwardComposer {
@Override @Override
public void doAfterCompose(Component comp) throws Exception { public void doAfterCompose(Component comp) throws Exception {
lsEmpresa = empresaService.obtenerIndTipo1(); lsEmpresa = usuarioEmpresaService.obtenerEmpresa(UsuarioLogado.getUsuarioLogado());
lsEmpresa.add(empresaService.obtenerID(-1)); lsEmpresa.add(empresaService.obtenerID(-1));
pricing = (Pricing) Executions.getCurrent().getArg().get("pricing"); pricing = (Pricing) Executions.getCurrent().getArg().get("pricing");

View File

@ -18,6 +18,7 @@ import com.rjconsultores.ventaboletos.service.MonedaService;
import com.rjconsultores.ventaboletos.service.ParadaService; import com.rjconsultores.ventaboletos.service.ParadaService;
import com.rjconsultores.ventaboletos.service.PricingEspecificoService; import com.rjconsultores.ventaboletos.service.PricingEspecificoService;
import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService; import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import java.util.List; import java.util.List;
@ -98,7 +99,7 @@ public class EditarPricingEspecificoController extends MyGenericForwardComposer
@Override @Override
public void doAfterCompose(Component comp) throws Exception { public void doAfterCompose(Component comp) throws Exception {
lsCategoria = categoriaService.obtenerTodos(); lsCategoria = categoriaService.obtenerTodos();
lsMarca = marcaService.obtenerTodos(); lsMarca = marcaService.buscarMarcaPorEmpresa(UsuarioLogado.getUsuarioLogado());
lsMoneda = monedaService.obtenerTodos(); lsMoneda = monedaService.obtenerTodos();
lsPtovata = puntoVentaService.obtenerTodos(); lsPtovata = puntoVentaService.obtenerTodos();
lsclaseServicio = claseServicioService.obtenerTodos(); lsclaseServicio = claseServicioService.obtenerTodos();

View File

@ -44,7 +44,7 @@ public class EditarPricingMarcaController extends MyGenericForwardComposer {
@Override @Override
public void doAfterCompose(Component comp) throws Exception { public void doAfterCompose(Component comp) throws Exception {
lsMarca = marcaService.obtenerTodos(); lsMarca = marcaService.buscarMarcaPorEmpresa(UsuarioLogado.getUsuarioLogado());
PricingMarca pm = (PricingMarca) Executions.getCurrent().getArg().get("pricingMarca"); PricingMarca pm = (PricingMarca) Executions.getCurrent().getArg().get("pricingMarca");
pricingMarca = (pm.getUsuarioId() == null) ? pm : pricingMarcaService.obtenerID(pm.getUsuarioId()); pricingMarca = (pm.getUsuarioId() == null) ? pm : pricingMarcaService.obtenerID(pm.getUsuarioId());

View File

@ -4,27 +4,11 @@
*/ */
package com.rjconsultores.ventaboletos.web.gui.controladores.seguridad; package com.rjconsultores.ventaboletos.web.gui.controladores.seguridad;
import com.rjconsultores.ventaboletos.entidad.Empleado;
import com.rjconsultores.ventaboletos.entidad.Parada;
import com.rjconsultores.ventaboletos.entidad.Perfil;
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
import com.rjconsultores.ventaboletos.entidad.Usuario;
import com.rjconsultores.ventaboletos.entidad.UsuarioPerfil;
import com.rjconsultores.ventaboletos.entidad.UsuarioUbicacion;
import com.rjconsultores.ventaboletos.service.EmpleadoService;
import com.rjconsultores.ventaboletos.service.PerfilService;
import com.rjconsultores.ventaboletos.service.UsuarioPerfilService;
import com.rjconsultores.ventaboletos.service.UsuarioService;
import com.rjconsultores.ventaboletos.service.UsuarioUbicacionService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.Base64;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderUbicacion;
import java.security.MessageDigest; import java.security.MessageDigest;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.List; import java.util.List;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope; import org.springframework.context.annotation.Scope;
@ -41,6 +25,29 @@ import org.zkoss.zul.Comboitem;
import org.zkoss.zul.Tab; import org.zkoss.zul.Tab;
import org.zkoss.zul.Textbox; import org.zkoss.zul.Textbox;
import com.rjconsultores.ventaboletos.entidad.Empleado;
import com.rjconsultores.ventaboletos.entidad.Empresa;
import com.rjconsultores.ventaboletos.entidad.Parada;
import com.rjconsultores.ventaboletos.entidad.Perfil;
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
import com.rjconsultores.ventaboletos.entidad.Usuario;
import com.rjconsultores.ventaboletos.entidad.UsuarioEmpresa;
import com.rjconsultores.ventaboletos.entidad.UsuarioPerfil;
import com.rjconsultores.ventaboletos.entidad.UsuarioUbicacion;
import com.rjconsultores.ventaboletos.service.EmpleadoService;
import com.rjconsultores.ventaboletos.service.EmpresaService;
import com.rjconsultores.ventaboletos.service.PerfilService;
import com.rjconsultores.ventaboletos.service.UsuarioEmpresaService;
import com.rjconsultores.ventaboletos.service.UsuarioPerfilService;
import com.rjconsultores.ventaboletos.service.UsuarioService;
import com.rjconsultores.ventaboletos.service.UsuarioUbicacionService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.Base64;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderUbicacion;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderUsuarioEmpresa;
/** /**
* *
* @author rodrigo * @author rodrigo
@ -58,16 +65,24 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
@Autowired @Autowired
private UsuarioUbicacionService usuarioUbicacionService; private UsuarioUbicacionService usuarioUbicacionService;
@Autowired @Autowired
private UsuarioEmpresaService usuarioEmpresaService;
@Autowired
private EmpleadoService empleadoService; private EmpleadoService empleadoService;
@Autowired
private EmpresaService empresaService;
private List<Perfil> lsPerfil; private List<Perfil> lsPerfil;
private List<Empresa> lsEmpresa;
private Perfil perfilSeleccionada; private Perfil perfilSeleccionada;
private List<UsuarioUbicacion> lsUsuarioUbicacion; private List<UsuarioUbicacion> lsUsuarioUbicacion;
private List<UsuarioEmpresa> lsUsuarioEmpresa;
private Combobox cmbParada; private Combobox cmbParada;
private Combobox cmbPuntoVenta; private Combobox cmbPuntoVenta;
private Combobox cmbPerfil; private Combobox cmbPerfil;
private Combobox cmbEmpresa;
private Usuario usuario; private Usuario usuario;
private MyListbox usuarioList; private MyListbox usuarioList;
private MyListbox ubicacionList; private MyListbox ubicacionList;
private MyListbox empresaList;
private Textbox txtCveEmpleado; private Textbox txtCveEmpleado;
private Textbox txtNombUsuario; private Textbox txtNombUsuario;
private Textbox txtSenha; private Textbox txtSenha;
@ -80,6 +95,8 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
private Button btnApagar; private Button btnApagar;
private Button btnPesquisa; private Button btnPesquisa;
private Boolean usrAdmin; private Boolean usrAdmin;
private Button btnAdicionarEmpresa;
private Button btnRemoverEmpresa;
private Tab tabUsuario; private Tab tabUsuario;
private Tab tabUbicacion; private Tab tabUbicacion;
private static Logger log = Logger.getLogger(EditarUsuarioController.class); private static Logger log = Logger.getLogger(EditarUsuarioController.class);
@ -91,8 +108,26 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
public void setUbicacionList(MyListbox ubicacionList) { public void setUbicacionList(MyListbox ubicacionList) {
this.ubicacionList = ubicacionList; this.ubicacionList = ubicacionList;
} }
public Combobox getCmbParada() { public List<UsuarioEmpresa> getLsUsuarioEmpresa() {
return lsUsuarioEmpresa;
}
public void setLsUsuarioEmpresa(List<UsuarioEmpresa> lsUsuarioEmpresa) {
this.lsUsuarioEmpresa = lsUsuarioEmpresa;
}
public MyListbox getEmpresaList() {
return empresaList;
}
public void setEmpresaList(MyListbox empresaList) {
this.empresaList = empresaList;
}
public Combobox getCmbParada() {
return cmbParada; return cmbParada;
} }
@ -132,7 +167,15 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
this.lsPerfil = lsPerfil; this.lsPerfil = lsPerfil;
} }
public Textbox getTxtNombUsuario() { public List<Empresa> getLsEmpresa() {
return lsEmpresa;
}
public void setLsEmpresa(List<Empresa> lsEmpresa) {
this.lsEmpresa = lsEmpresa;
}
public Textbox getTxtNombUsuario() {
return txtNombUsuario; return txtNombUsuario;
} }
@ -171,8 +214,17 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
public void setCmbPerfil(Combobox cmbPerfil) { public void setCmbPerfil(Combobox cmbPerfil) {
this.cmbPerfil = cmbPerfil; this.cmbPerfil = cmbPerfil;
} }
public List<UsuarioUbicacion> getLsUsuarioUbicacion() { public Combobox getCmbEmpresa() {
return cmbEmpresa;
}
public void setCmbEmpresa(Combobox cmbEmpresa) {
this.cmbEmpresa = cmbEmpresa;
}
public List<UsuarioUbicacion> getLsUsuarioUbicacion() {
return lsUsuarioUbicacion; return lsUsuarioUbicacion;
} }
@ -192,7 +244,17 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
return btnRemoverUbicacion; return btnRemoverUbicacion;
} }
public void setBtnRemoverUbicacion(Button btnRemoverUbicacion) {
public UsuarioEmpresaService getUsuarioEmpresaService() {
return usuarioEmpresaService;
}
public void setUsuarioEmpresaService(UsuarioEmpresaService usuarioEmpresaService) {
this.usuarioEmpresaService = usuarioEmpresaService;
}
public void setBtnRemoverUbicacion(Button btnRemoverUbicacion) {
this.btnRemoverUbicacion = btnRemoverUbicacion; this.btnRemoverUbicacion = btnRemoverUbicacion;
} }
@ -271,6 +333,7 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
@Override @Override
public void doAfterCompose(Component comp) throws Exception { public void doAfterCompose(Component comp) throws Exception {
lsPerfil = perfilService.obtenerTodos(); lsPerfil = perfilService.obtenerTodos();
lsEmpresa = empresaService.obtenerTodos();
super.doAfterCompose(comp); super.doAfterCompose(comp);
@ -283,11 +346,21 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
if (usuario.getUsuarioId() != null) { if (usuario.getUsuarioId() != null) {
lsUsuarioUbicacion.addAll(usuarioUbicacionService.buscarPorUsuario(usuario)); lsUsuarioUbicacion.addAll(usuarioUbicacionService.buscarPorUsuario(usuario));
} }
enableAddUbicacion(); enableAddUbicacion();
ubicacionList.setItemRenderer(new RenderUbicacion()); ubicacionList.setItemRenderer(new RenderUbicacion());
ubicacionList.setData(lsUsuarioUbicacion); ubicacionList.setData(lsUsuarioUbicacion);
lsUsuarioEmpresa = new ArrayList<UsuarioEmpresa>();
if (usuario.getUsuarioId() != null) {
lsUsuarioEmpresa.addAll(usuarioEmpresaService.obtenerPorUsuario(usuario));
}
empresaList.setItemRenderer(new RenderUsuarioEmpresa());
empresaList.setData(lsUsuarioEmpresa);
txtCveEmpleado.focus(); txtCveEmpleado.focus();
@ -421,6 +494,42 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
log.error(ex); log.error(ex);
} }
} }
public void onClick$btnRemoverEmpresa(Event ev) {
UsuarioEmpresa ue = (UsuarioEmpresa) empresaList.getSelected();
if (ue != null) {
ue.setActivo(Boolean.FALSE);
ue.setFecmodif(Calendar.getInstance().getTime());
ue.setUsuariomodifId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
lsUsuarioEmpresa.remove(ue);
empresaList.setData(lsUsuarioEmpresa);
}
}
public void onClick$btnAdicionarEmpresa(Event ev) {
Empresa empresa = (Empresa) cmbEmpresa.getSelectedItem().getValue();
if (empresa != null) {
UsuarioEmpresa ue = new UsuarioEmpresa();
ue.setActivo(Boolean.TRUE);
ue.setFecmodif(Calendar.getInstance().getTime());
ue.setUsuariomodifId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
ue.setUsuario(usuario);
ue.setEmpresa(empresa);
lsUsuarioEmpresa.add(ue);
empresaList.setData(lsUsuarioEmpresa);
}
}
public void onClick$btnSalvar(Event ev) { public void onClick$btnSalvar(Event ev) {
@ -437,6 +546,7 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
txtConfirmSenha.getText(); txtConfirmSenha.getText();
cmbPerfil.getValue(); cmbPerfil.getValue();
cmbEmpresa.getValue();
String senha = ""; String senha = "";
String confirmSenha = ""; String confirmSenha = "";
@ -492,7 +602,9 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
List<UsuarioPerfil> lsUp = new ArrayList<UsuarioPerfil>(); List<UsuarioPerfil> lsUp = new ArrayList<UsuarioPerfil>();
lsUp.add(up); lsUp.add(up);
usuario.setUsuarioPerfilList(lsUp); usuario.setUsuarioPerfilList(lsUp);
usuario.setUsuarioEmpresaList(lsUsuarioEmpresa);
if (!lsUsuarioUbicacion.isEmpty()) { if (!lsUsuarioUbicacion.isEmpty()) {
if (usuario.getUsuarioId() == null) { if (usuario.getUsuarioId() == null) {
usuario = usuarioService.suscribir(usuario); usuario = usuarioService.suscribir(usuario);

View File

@ -21,6 +21,7 @@ import com.rjconsultores.ventaboletos.service.MonedaService;
import com.rjconsultores.ventaboletos.service.ParadaService; import com.rjconsultores.ventaboletos.service.ParadaService;
import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService; import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService;
import com.rjconsultores.ventaboletos.service.VigenciaTarifaService; import com.rjconsultores.ventaboletos.service.VigenciaTarifaService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject; import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
@ -226,7 +227,7 @@ public class BusquedaTarifaController extends MyGenericForwardComposer {
lsMarcas = new ArrayList<Marca>(); lsMarcas = new ArrayList<Marca>();
lsMarcas.add(null); lsMarcas.add(null);
lsMarcas.addAll(marcaService.obtenerTodos()); lsMarcas.addAll( marcaService.buscarMarcaPorEmpresa(UsuarioLogado.getUsuarioLogado()));
lsClaseServico = new ArrayList<ClaseServicio>(); lsClaseServico = new ArrayList<ClaseServicio>();
lsClaseServico.add(null); lsClaseServico.add(null);

View File

@ -19,6 +19,7 @@ import com.rjconsultores.ventaboletos.service.MarcaService;
import com.rjconsultores.ventaboletos.service.MonedaService; import com.rjconsultores.ventaboletos.service.MonedaService;
import com.rjconsultores.ventaboletos.service.ParadaService; import com.rjconsultores.ventaboletos.service.ParadaService;
import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService; import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
@ -175,7 +176,7 @@ public class BusquedaTarifaOficialController extends MyGenericForwardComposer {
lsMarcas = new ArrayList<Marca>(); lsMarcas = new ArrayList<Marca>();
lsMarcas.add(null); lsMarcas.add(null);
lsMarcas.addAll(marcaService.obtenerTodos()); lsMarcas.addAll( marcaService.buscarMarcaPorEmpresa(UsuarioLogado.getUsuarioLogado()));
lsClaseServico = new ArrayList<ClaseServicio>(); lsClaseServico = new ArrayList<ClaseServicio>();
lsClaseServico.add(null); lsClaseServico.add(null);

View File

@ -14,6 +14,7 @@ import com.rjconsultores.ventaboletos.service.MarcaService;
import com.rjconsultores.ventaboletos.service.ParadaService; import com.rjconsultores.ventaboletos.service.ParadaService;
import com.rjconsultores.ventaboletos.service.PlazaService; import com.rjconsultores.ventaboletos.service.PlazaService;
import com.rjconsultores.ventaboletos.service.TarifaMinimaService; import com.rjconsultores.ventaboletos.service.TarifaMinimaService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject; import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
@ -172,7 +173,7 @@ public class BusquedaTarifasMinimasController extends MyGenericForwardComposer {
lsMarcas = new ArrayList<Marca>(); lsMarcas = new ArrayList<Marca>();
lsMarcas.add(null); lsMarcas.add(null);
lsMarcas.addAll(marcaService.obtenerTodos()); lsMarcas.addAll( marcaService.buscarMarcaPorEmpresa(UsuarioLogado.getUsuarioLogado()));
lsClaseServico = new ArrayList<ClaseServicio>(); lsClaseServico = new ArrayList<ClaseServicio>();
lsClaseServico.add(null); lsClaseServico.add(null);

View File

@ -78,7 +78,7 @@ public class EditarRedondeoController extends MyGenericForwardComposer {
@Override @Override
public void doAfterCompose(Component comp) throws Exception { public void doAfterCompose(Component comp) throws Exception {
lsMarca = marcaService.obtenerTodos(); lsMarca = marcaService.buscarMarcaPorEmpresa(UsuarioLogado.getUsuarioLogado());
super.doAfterCompose(comp); super.doAfterCompose(comp);

View File

@ -280,7 +280,7 @@ public class EditarTarifaController extends MyGenericForwardComposer {
lsMarcas = new ArrayList<Marca>(); lsMarcas = new ArrayList<Marca>();
lsMarcas.add(null); lsMarcas.add(null);
lsMarcas.addAll(marcaService.obtenerTodos()); lsMarcas.addAll( marcaService.buscarMarcaPorEmpresa(UsuarioLogado.getUsuarioLogado()));
lsClaseServico = new ArrayList<ClaseServicio>(); lsClaseServico = new ArrayList<ClaseServicio>();
lsClaseServico.add(null); lsClaseServico.add(null);

View File

@ -199,7 +199,7 @@ public class EditarTarifaMinimaController extends MyGenericForwardComposer {
tarifaMinimaList = (MyListbox) Executions.getCurrent().getArg().get("tarifaMinimaList"); tarifaMinimaList = (MyListbox) Executions.getCurrent().getArg().get("tarifaMinimaList");
lsMoneda = monedaService.obtenerTodos(); lsMoneda = monedaService.obtenerTodos();
lsMarcas = marcaService.obtenerTodos(); lsMarcas = marcaService.buscarMarcaPorEmpresa(UsuarioLogado.getUsuarioLogado());
lsClaseServico = claseServicioService.obtenerTodos(); lsClaseServico = claseServicioService.obtenerTodos();
lsPlaza = plazaService.obtenerTodos(); lsPlaza = plazaService.obtenerTodos();

View File

@ -235,7 +235,7 @@ public class EditarTarifaOficialController extends MyGenericForwardComposer {
lsMarcas = new ArrayList<Marca>(); lsMarcas = new ArrayList<Marca>();
lsMarcas.add(null); lsMarcas.add(null);
lsMarcas.addAll(marcaService.obtenerTodos()); lsMarcas.addAll( marcaService.buscarMarcaPorEmpresa(UsuarioLogado.getUsuarioLogado()));
lsClaseServico = new ArrayList<ClaseServicio>(); lsClaseServico = new ArrayList<ClaseServicio>();
lsClaseServico.add(null); lsClaseServico.add(null);

View File

@ -61,6 +61,7 @@ import com.rjconsultores.ventaboletos.service.RutaCombinacionService;
import com.rjconsultores.ventaboletos.service.RutaService; import com.rjconsultores.ventaboletos.service.RutaService;
import com.rjconsultores.ventaboletos.service.TarifaService; import com.rjconsultores.ventaboletos.service.TarifaService;
import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService; import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService;
import com.rjconsultores.ventaboletos.service.UsuarioEmpresaService;
import com.rjconsultores.ventaboletos.service.VigenciaTarifaService; import com.rjconsultores.ventaboletos.service.VigenciaTarifaService;
import com.rjconsultores.ventaboletos.utilerias.ApplicationProperties; import com.rjconsultores.ventaboletos.utilerias.ApplicationProperties;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
@ -103,6 +104,8 @@ public class ModificacionMasivaTarifasController extends MyGenericForwardCompose
private ClaseServicioService claseServicioService; private ClaseServicioService claseServicioService;
@Autowired @Autowired
private MonedaService monedaService; private MonedaService monedaService;
@Autowired
private UsuarioEmpresaService usuarioEmpresaService;
@Autowired @Autowired
private EmpresaService empresaService; private EmpresaService empresaService;
@Autowired @Autowired
@ -311,10 +314,10 @@ public class ModificacionMasivaTarifasController extends MyGenericForwardCompose
super.doAfterCompose(comp); super.doAfterCompose(comp);
lsMarcas = marcaService.obtenerTodos(); lsMarcas = marcaService.buscarMarcaPorEmpresa(UsuarioLogado.getUsuarioLogado());
lsClaseServico = claseServicioService.obtenerTodos(); lsClaseServico = claseServicioService.obtenerTodos();
lsMonedas = monedaService.obtenerTodos(); lsMonedas = monedaService.obtenerTodos();
lsEmpresas = empresaService.obtenerIndTipo1(); lsEmpresas = usuarioEmpresaService.obtenerEmpresa(UsuarioLogado.getUsuarioLogado());
lsRutas = rutaService.obtenerTodos(); lsRutas = rutaService.obtenerTodos();
lsTipoPuntoVenta = tipoPuntoVentaService.obtenerTodos(); lsTipoPuntoVenta = tipoPuntoVentaService.obtenerTodos();
lsCategoria = categoriaService.obtenerTodos(); lsCategoria = categoriaService.obtenerTodos();

View File

@ -42,6 +42,7 @@ import com.rjconsultores.ventaboletos.service.MonedaService;
import com.rjconsultores.ventaboletos.service.RutaCombinacionService; import com.rjconsultores.ventaboletos.service.RutaCombinacionService;
import com.rjconsultores.ventaboletos.service.RutaService; import com.rjconsultores.ventaboletos.service.RutaService;
import com.rjconsultores.ventaboletos.service.TarifaService; import com.rjconsultores.ventaboletos.service.TarifaService;
import com.rjconsultores.ventaboletos.service.UsuarioEmpresaService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
@ -79,6 +80,8 @@ public class TarifaOficialExcelController extends MyGenericForwardComposer {
private ClaseServicioService claseServicioService; private ClaseServicioService claseServicioService;
@Autowired @Autowired
private MonedaService monedaService; private MonedaService monedaService;
@Autowired
private UsuarioEmpresaService usuarioEmpresaService;
@Autowired @Autowired
private EmpresaService empresaService; private EmpresaService empresaService;
@Autowired @Autowired
@ -240,10 +243,10 @@ public class TarifaOficialExcelController extends MyGenericForwardComposer {
super.doAfterCompose(comp); super.doAfterCompose(comp);
lsMarcas = marcaService.obtenerTodos(); lsMarcas = marcaService.buscarMarcaPorEmpresa(UsuarioLogado.getUsuarioLogado());
lsClaseServico = claseServicioService.obtenerTodos(); lsClaseServico = claseServicioService.obtenerTodos();
lsMonedas = monedaService.obtenerTodos(); lsMonedas = monedaService.obtenerTodos();
lsEmpresas = empresaService.obtenerIndTipo1(); lsEmpresas = usuarioEmpresaService.obtenerEmpresa(UsuarioLogado.getUsuarioLogado());
lsRutas = rutaService.obtenerTodos(); lsRutas = rutaService.obtenerTodos();

View File

@ -0,0 +1,26 @@
package com.rjconsultores.ventaboletos.web.utilerias.menu.item.confcomerciales;
import org.zkoss.util.resource.Labels;
import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;
public class ItemMenuConfiguracionFeriado extends DefaultItemMenuSistema {
public ItemMenuConfiguracionFeriado() {
super("indexController.mniConfiguracionFeriado.label");
}
@Override
public String getClaveMenu() {
return "COM.RJCONSULTORES.ADMINISTRACION.GUI.CONFIGURACIONECCOMERCIALES.MENU.CONFIGFERIADO";
}
@Override
public void ejecutar() {
PantallaUtileria.openWindow("/gui/configuraciones_comerciales/busquedaConfigFeriado.zul",
Labels.getLabel("busquedaConfigFeriadoController.window.title"), null,desktop);
}
}

View File

@ -0,0 +1,31 @@
package com.rjconsultores.ventaboletos.web.utilerias.render;
import java.text.SimpleDateFormat;
import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer;
import com.rjconsultores.ventaboletos.entidad.Feriado;
public class RenderFeriado implements ListitemRenderer {
public void render(Listitem lstm, Object o) throws Exception {
Feriado feriado = (Feriado) o;
Listcell lc = new Listcell(feriado.getFeriadoId().toString());
lc.setParent(lstm);
SimpleDateFormat data = new SimpleDateFormat("dd/MM/yyyy");
lc = new Listcell(data.format(feriado.getFecferiado()));
lc.setParent(lstm);
lc = new Listcell(feriado.getDescferiado());
lc.setParent(lstm);
lstm.setAttribute("data", feriado);
}
}

View File

@ -0,0 +1,57 @@
package com.rjconsultores.ventaboletos.web.utilerias.render;
import org.zkoss.util.resource.Labels;
import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer;
import com.rjconsultores.ventaboletos.entidad.UsuarioEmpresa;
public class RenderUsuarioEmpresa implements ListitemRenderer {
public void render(Listitem lstm, Object o) throws Exception {
UsuarioEmpresa usuarioEmpresa = (UsuarioEmpresa) o;
Listcell lc = null;
if (usuarioEmpresa != null) {
if(usuarioEmpresa.getEmpresa() != null){
if(usuarioEmpresa.getEmpresa().getCnpj() != null){
lc = new Listcell(usuarioEmpresa.getEmpresa().getCnpj());
lc.setParent(lstm);
}
if(usuarioEmpresa.getEmpresa().getNombempresa() != null){
lc = new Listcell(usuarioEmpresa.getEmpresa().getNombempresa());
lc.setParent(lstm);
}
Short tipo = usuarioEmpresa.getEmpresa().getIndTipo();
Short short1 = 1;
Short short2 = 2;
Short short3 = 3;
if (tipo != null) {
if (tipo.equals(short1)) {
lc = new Listcell(Labels.getLabel("editarEmpresaController.IndTipo.1"));
} else if (tipo.equals(short2)) {
lc = new Listcell(Labels.getLabel("editarEmpresaController.IndTipo.2"));
} else if (tipo.equals(short3)) {
lc = new Listcell(Labels.getLabel("editarEmpresaController.IndTipo.3"));
}
} else {
lc = new Listcell(Labels.getLabel(""));
}
lc.setParent(lstm);
}
}
lstm.setAttribute("data", usuarioEmpresa);
}
}

View File

@ -108,6 +108,7 @@
<value>com.rjconsultores.ventaboletos.entidad.Estado</value> <value>com.rjconsultores.ventaboletos.entidad.Estado</value>
<value>com.rjconsultores.ventaboletos.entidad.ExcepcionRedondo <value>com.rjconsultores.ventaboletos.entidad.ExcepcionRedondo
</value> </value>
<value>com.rjconsultores.ventaboletos.entidad.Feriado</value>
<value>com.rjconsultores.ventaboletos.entidad.FormaPago</value> <value>com.rjconsultores.ventaboletos.entidad.FormaPago</value>
<value>com.rjconsultores.ventaboletos.entidad.FormaPagoDet</value> <value>com.rjconsultores.ventaboletos.entidad.FormaPagoDet</value>
<value>com.rjconsultores.ventaboletos.entidad.GrupoCortesia</value> <value>com.rjconsultores.ventaboletos.entidad.GrupoCortesia</value>
@ -276,6 +277,7 @@
<value>com.rjconsultores.ventaboletos.entidad.Usuario</value> <value>com.rjconsultores.ventaboletos.entidad.Usuario</value>
<value>com.rjconsultores.ventaboletos.entidad.UsuarioBancario <value>com.rjconsultores.ventaboletos.entidad.UsuarioBancario
</value> </value>
<value>com.rjconsultores.ventaboletos.entidad.UsuarioEmpresa</value>
<value>com.rjconsultores.ventaboletos.entidad.UsuarioPerfil</value> <value>com.rjconsultores.ventaboletos.entidad.UsuarioPerfil</value>
<value>com.rjconsultores.ventaboletos.entidad.UsuarioUbicacion <value>com.rjconsultores.ventaboletos.entidad.UsuarioUbicacion
</value> </value>

View File

@ -152,6 +152,7 @@ indexController.mniRedondeoMarca.label = Arredondamento Marca
indexController.mniComisionistaExterno.label = Comissionista Externo indexController.mniComisionistaExterno.label = Comissionista Externo
indexController.mniConvenio.label = Requisição / Convênio indexController.mniConvenio.label = Requisição / Convênio
indexController.mniConfiguracionAlerta.label = Configuração Alertas indexController.mniConfiguracionAlerta.label = Configuração Alertas
indexController.mniConfiguracionFeriado.label = Configuração de Feriado
indexController.mniSecretaria.label = Requisição / Secretaria indexController.mniSecretaria.label = Requisição / Secretaria
indexController.mniCiudad.label = Cidade indexController.mniCiudad.label = Cidade
indexController.mniColonia.label = Bairro indexController.mniColonia.label = Bairro
@ -1951,6 +1952,7 @@ busquedaUsuarioController.btnPesquisa.label = Pesquisa
# Editar Usuário # Editar Usuário
editarUsuarioController.window.title = Usuário editarUsuarioController.window.title = Usuário
editarUsuarioController.tabel.ubicacion = Localização editarUsuarioController.tabel.ubicacion = Localização
editarUsuarioController.tabel.empresa = Empresa
editarUsuarioController.MSG.suscribirOK = Usuário Registrado com Sucesso. editarUsuarioController.MSG.suscribirOK = Usuário Registrado com Sucesso.
editarUsuarioController.MSG.borrarPergunta = Eliminar o usuário? editarUsuarioController.MSG.borrarPergunta = Eliminar o usuário?
editarUsuarioController.MSG.borrarOK = Usuário Excluido com Sucesso. editarUsuarioController.MSG.borrarOK = Usuário Excluido com Sucesso.
@ -1960,12 +1962,16 @@ editarUsuarioController.MSG.necessitaUbicacion = É necessário informar uma loc
editarUsuarioController.senha.label = Senha editarUsuarioController.senha.label = Senha
editarUsuarioController.confirmarsenha.label = Confirmar senha editarUsuarioController.confirmarsenha.label = Confirmar senha
editarUsuarioController.MSG.configmSenha = Por favor, confirmar a senha. editarUsuarioController.MSG.configmSenha = Por favor, confirmar a senha.
editarUsuarioController.btnAdicionarUbicacion.tooltiptext = Incluir editarUsuarioController.btnAdicionar.tooltiptext = Incluir
editarUsuarioController.btnRemoverUbicacion.tooltiptext = Eliminar editarUsuarioController.btnRemover.tooltiptext = Eliminar
editarUsuarioController.lhParada.label = Localidade editarUsuarioController.lhParada.label = Localidade
editarUsuarioController.lhPuntoVenta.label = Ponto de Venda ( Agência ) editarUsuarioController.lhPuntoVenta.label = Ponto de Venda ( Agência )
editarUsuarioController.lhCNPJ.label = CNPJ
editarUsuarioController.lhTipo.label = Tipo
editarUsuarioController.lhDescricao.label = Descrição
busquedaUsuarioController.CveUsuario.label = Código de Usuário busquedaUsuarioController.CveUsuario.label = Código de Usuário
busquedaUsuarioController.CveEmpleado.label = Código de Empregado busquedaUsuarioController.CveEmpleado.label = Código de Empregado
editarUsuarioController.lhEmpresa.label = Empresa
#cREADO POR mANUEL #cREADO POR mANUEL
@ -4037,3 +4043,25 @@ editarClienteController.lbNumRfc.value = DOC
editarClienteController.lbNumeroInterior.value = Número Apto. editarClienteController.lbNumeroInterior.value = Número Apto.
editarClienteController.lbTipoDomicilio.value = Tipo Domícílio editarClienteController.lbTipoDomicilio.value = Tipo Domícílio
editarClienteController.lbCP.value = CEP editarClienteController.lbCP.value = CEP
# BusquedaConfigFeriado
busquedaConfigFeriadoController.window.title = Configuração de Feriado
busquedaConfigFeriadoController.btnRefresh.tooltiptext = Atualizar
busquedaConfigFeriadoController.btnNovo.tooltiptext = Incluir
busquedaConfigFeriadoController.btnCerrar.tooltiptext = Fechar
busquedaConfigFeriadoController.btnPesquisa.label = Pesquisa
busquedaConfigFeriadoController.lhId.label = ID
busquedaConfigFeriadoController.lhData.label = Data
busquedaConfigFeriadoController.lhDescricao.label = Descrição
# EditarConfigFeriado
editarConfigFeriadoController.window.title = Editar Configuração de Feriado
editarConfigFeriadoController.lbDescricao.value = Descrição do Feriado
editarConfigFeriadoController.lbData.value = Data
editarConfigFeriadoController.btnApagar.tooltiptext = Eliminar
editarConfigFeriadoController.btnSalvar.tooltiptext = Salvar
editarConfigFeriadoController.btnFechar.tooltiptext = Fechar
editarConfigFeriadoControlle.MSG.suscribirOK = Feridao Registrado com Sucesso.
editarConfigFeriadoController.MSG.borrarPergunta = Deseja Eliminar o feriado?
editarConfigFeriadoController.MSG.borrarOK = Tipo de Classe Excluído com Sucesso.

View File

@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
<?page contentType="text/html;charset=UTF-8"?>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winBusquedaConfigFeriado"?>
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
<zk xmlns="http://www.zkoss.org/2005/zul">
<window id="winBusquedaConfigFeriado" title="${c:l('busquedaConfigFeriadoController.window.title')}"
apply="${busquedaConfigFeriadoController}" contentStyle="overflow:auto"
width="700px" height="500px" border="normal" xmlns:h="http://www.w3.org/1999/xhtml">
<toolbar>
<button id="btnRefresh" image="/gui/img/refresh.png" width="35px"
tooltiptext="${c:l('busquedaConfigFeriadoController.btnRefresh.tooltiptext')}" />
<separator orient="vertical" />
<button id="btnNovo" image="/gui/img/add.png" width="35px"
tooltiptext="${c:l('busquedaConfigFeriadoController.btnNovo.tooltiptext')}" />
<separator orient="vertical" />
<button id="btnCerrar" image="/gui/img/exit.png" width="35px" onClick="winBusquedaConfigFeriado.detach()"
tooltiptext="${c:l('busquedaConfigFeriadoController.btnCerrar.tooltiptext')}"/>
</toolbar>
<grid fixedLayout="true">
<columns>
<column width="20%" />
<column width="80%" />
</columns>
<rows>
<row >
<label value="${c:l('lb.id')}"/>
<intbox id="txtID" width="40%"/>
</row>
<row>
<label value="${c:l('editarConfigFeriadoController.lbData.value')}"/>
<datebox id="fecFeriado" width="40%" mold="rounded" lenient="false"/>
</row>
<row >
<label value="${c:l('editarConfigFeriadoController.lbDescricao.value')}"/>
<textbox id="textboxDescricao" use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"
width="70%" />
</row>
</rows>
</grid>
<toolbar>
<button id="btnPesquisa" image="/gui/img/find.png"
label="${c:l('busquedaConfigFeriadoController.btnPesquisa.label')}"/>
</toolbar>
<paging id="pagingConfigFeriado" pageSize="20" />
<listbox id="configFeriadoList" use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
multiple="false" vflex="true" height="50%">
<listhead sizable="true" >
<listheader width="50px" image="/gui/img/builder.gif"
label="${c:l('busquedaConfigFeriadoController.lhId.label')}"
sort="auto(feriadoId)" />
<listheader image="/gui/img/builder.gif"
label="${c:l('busquedaConfigFeriadoController.lhData.label')}"
sort="auto(fecferiado)" />
<listheader image="/gui/img/builder.gif"
label="${c:l('busquedaConfigFeriadoController.lhDescricao.label')}"
sort="auto(descferiado)" />
</listhead>
</listbox>
</window>
</zk>

View File

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<?page contentType="text/html;charset=UTF-8"?>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarConfigFeriado"?>
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
<zk xmlns="http://www.zkoss.org/2005/zul">
<window id="winEditarConfigFeriado" border="normal"
apply="${editarConfigFeriadoController}"
width="500px" height="175px" contentStyle="overflow:auto"
title="${c:l('editarConfigFeriadoController.window.title')}">
<toolbar>
<hbox spacing="5px" style="padding:1px" align="right">
<button id="btnApagar" height="20"
image="/gui/img/remove.png" width="35px"
tooltiptext="${c:l('editarConfigFeriadoController.btnApagar.tooltiptext')}"/>
<button id="btnSalvar" height="20"
image="/gui/img/save.png" width="35px"
tooltiptext="${c:l('editarConfigFeriadoController.btnSalvar.tooltiptext')}"/>
<button id="btnFechar" height="20"
image="/gui/img/exit.png" width="35px"
tooltiptext="${c:l('editarConfigFeriadoController.btnFechar.tooltiptext')}"/>
</hbox>
</toolbar>
<grid fixedLayout="true">
<columns>
<column width="20%" />
<column width="80%" />
</columns>
<rows>
<row>
<label value="${c:l('editarConfigFeriadoController.lbData.value')}"/>
<datebox id="fecFeriado" width="40%" mold="rounded" lenient="false" constraint="no empty"
value="@{winEditarConfigFeriado$composer.feriado.fecferiado}"/>
</row>
<row >
<label value="${c:l('editarConfigFeriadoController.lbDescricao.value')}"/>
<textbox id="textboxDescricao" use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"
value="@{winEditarConfigFeriado$composer.feriado.descferiado}" constraint="no empty" width="70%" />
</row>
</rows>
</grid>
</window>
</zk>

View File

@ -7,7 +7,7 @@
<zk xmlns="http://www.zkoss.org/2005/zul"> <zk xmlns="http://www.zkoss.org/2005/zul">
<window id="winEditarUsuario" border="normal" <window id="winEditarUsuario" border="normal"
apply="${editarUsuarioController}" apply="${editarUsuarioController}"
width="400px" height="457px" contentStyle="overflow:auto" width="600px" height="457px" contentStyle="overflow:auto"
title="${c:l('editarUsuarioController.window.title')}"> title="${c:l('editarUsuarioController.window.title')}">
<toolbar> <toolbar>
<hbox spacing="5px" style="padding:1px" align="right"> <hbox spacing="5px" style="padding:1px" align="right">
@ -28,6 +28,7 @@
<tabs id="tabs"> <tabs id="tabs">
<tab id="tabUsuario" label="${c:l('editarUsuarioController.window.title')}"/> <tab id="tabUsuario" label="${c:l('editarUsuarioController.window.title')}"/>
<tab id="tabUbicacion" label="${c:l('editarUsuarioController.tabel.ubicacion')}" /> <tab id="tabUbicacion" label="${c:l('editarUsuarioController.tabel.ubicacion')}" />
<tab id="tabEmpresa" label="${c:l('editarUsuarioController.tabel.empresa')}" />
</tabs> </tabs>
<tabpanels> <tabpanels>
<tabpanel id="tbUsuario"> <tabpanel id="tbUsuario">
@ -96,9 +97,9 @@
<tabpanel id="tbUbicacion" height="80%"> <tabpanel id="tbUbicacion" height="80%">
<toolbar> <toolbar>
<button id="btnAdicionarUbicacion" height="20" image="/gui/img/add.png" width="35px" <button id="btnAdicionarUbicacion" height="20" image="/gui/img/add.png" width="35px"
tooltiptext="${c:l('editarUsuarioController.btnAdicionarUbicacion.tooltiptext')}"/> tooltiptext="${c:l('editarUsuarioController.btnAdicionar.tooltiptext')}"/>
<button id="btnRemoverUbicacion" height="20" image="/gui/img/remove.png" width="35px" <button id="btnRemoverUbicacion" height="20" image="/gui/img/remove.png" width="35px"
tooltiptext="${c:l('editarUsuarioController.btnRemoverUbicacion.tooltiptext')}"/> tooltiptext="${c:l('editarUsuarioController.btnRemover.tooltiptext')}"/>
</toolbar> </toolbar>
<grid fixedLayout="true"> <grid fixedLayout="true">
@ -136,6 +137,46 @@
</listhead> </listhead>
</listbox> </listbox>
</tabpanel> </tabpanel>
<tabpanel id="tbEmpresa" height="80%">
<toolbar>
<button id="btnAdicionarEmpresa" height="20" image="/gui/img/add.png" width="35px"
tooltiptext="${c:l('editarUsuarioController.btnAdicionarEmpresa.tooltiptext')}"/>
<button id="btnRemoverEmpresa" height="20" image="/gui/img/remove.png" width="35px"
tooltiptext="${c:l('editarUsuarioController.btnRemover.tooltiptext')}"/>
</toolbar>
<grid fixedLayout="true">
<columns>
<column width="40%" />
<column width="60%" />
</columns>
<rows>
<row>
<label value="${c:l('editarUsuarioController.lhEmpresa.label')}"/>
<hbox>
<combobox id="cmbEmpresa"
mold="rounded" buttonVisible="true" width="100%"
model="@{winEditarUsuario$composer.lsEmpresa}"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"/>
</hbox>
</row>
</rows>
</grid>
<listbox id="empresaList" use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
multiple="false" height="100px" >
<listhead sizable="true">
<listheader id="lhCNPJ" image="/gui/img/create_doc.gif"
label="${c:l('editarUsuarioController.lhCNPJ.label')}"/>
<listheader id="lhDescricao" image="/gui/img/create_doc.gif"
label="${c:l('editarUsuarioController.lhDescricao.label')}"/>
<listheader id="lhTipo" image="/gui/img/create_doc.gif"
label="${c:l('editarUsuarioController.lhTipo.label')}"/>
</listhead>
</listbox>
</tabpanel>
</tabpanels> </tabpanels>
</tabbox> </tabbox>