Seguro KM
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@20934 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
8411863e7e
commit
53d09c54d5
|
@ -0,0 +1,155 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.web.gui.controladores.tarifas;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
||||
import com.rjconsultores.ventaboletos.entidad.SeguroKm;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderTaxaEmbarqueOrgao;
|
||||
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.Paging;
|
||||
import org.zkoss.zul.Textbox;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Administrador
|
||||
*/
|
||||
@Controller("busquedaSeguroKmController")
|
||||
@Scope("prototype")
|
||||
public class BusquedaSeguroKmController extends MyGenericForwardComposer {
|
||||
|
||||
@Autowired
|
||||
private transient PagedListWrapper<OrgaoConcedente> plwOrgao;
|
||||
private MyListbox seguroKmList;
|
||||
private Paging pagingSeguroKm;
|
||||
private Textbox txtOrgao;
|
||||
|
||||
public Paging getPagingSeguroKm() {
|
||||
return pagingSeguroKm;
|
||||
}
|
||||
|
||||
public void setPagingSeguroKm(Paging pagingSeguroKm) {
|
||||
this.pagingSeguroKm = pagingSeguroKm;
|
||||
}
|
||||
|
||||
public PagedListWrapper<OrgaoConcedente> getPlwOrgao() {
|
||||
return plwOrgao;
|
||||
}
|
||||
|
||||
public void setPlwOrgao(PagedListWrapper<OrgaoConcedente> plwOrgao) {
|
||||
this.plwOrgao = plwOrgao;
|
||||
}
|
||||
|
||||
public MyListbox getSeguroKmList() {
|
||||
return seguroKmList;
|
||||
}
|
||||
|
||||
public void setSeguroKmList(MyListbox seguroKmList) {
|
||||
this.seguroKmList = seguroKmList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
seguroKmList.setItemRenderer(new RenderTaxaEmbarqueOrgao());
|
||||
seguroKmList.addEventListener("onDoubleClick", new EventListener() {
|
||||
|
||||
@Override
|
||||
public void onEvent(Event event) throws Exception {
|
||||
OrgaoConcedente c = (OrgaoConcedente) seguroKmList.getSelected();
|
||||
verSeguroKm(c);
|
||||
}
|
||||
});
|
||||
|
||||
refreshLista();
|
||||
|
||||
txtOrgao.focus();
|
||||
}
|
||||
|
||||
private void verSeguroKm(OrgaoConcedente o) {
|
||||
if (o == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Map args = new HashMap();
|
||||
args.put("orgao", o);
|
||||
// args.put("seguroKm", null);
|
||||
args.put("seguroKmList", seguroKmList);
|
||||
|
||||
openWindow("/gui/tarifas/editarSeguroKm.zul",
|
||||
Labels.getLabel("busquedaSeguroKmController.window.title"),
|
||||
args, MODAL);
|
||||
}
|
||||
|
||||
private void refreshLista() {
|
||||
|
||||
HibernateSearchObject<OrgaoConcedente> seguroKmBusqueda =
|
||||
new HibernateSearchObject<OrgaoConcedente>(OrgaoConcedente.class,
|
||||
pagingSeguroKm.getPageSize());
|
||||
|
||||
|
||||
|
||||
seguroKmBusqueda.addFilterEqual("activo", Boolean.TRUE);
|
||||
|
||||
if (!txtOrgao.getValue().equals("")) {
|
||||
seguroKmBusqueda.addFilterLike("descOrgao",
|
||||
"%" + txtOrgao.getText().trim().concat("%"));
|
||||
}
|
||||
|
||||
seguroKmBusqueda.addSortAsc("descOrgao");
|
||||
|
||||
|
||||
plwOrgao.init(seguroKmBusqueda, seguroKmList, pagingSeguroKm);
|
||||
|
||||
if (seguroKmList.getData().length == 0) {
|
||||
try {
|
||||
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
|
||||
Labels.getLabel("busquedaSeguroKmController.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) {
|
||||
verSeguroKm(new SeguroKm());
|
||||
}
|
||||
|
||||
private void verSeguroKm(SeguroKm tx) {
|
||||
if (tx == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Map args = new HashMap();
|
||||
args.put("orgao", null);
|
||||
args.put("seguroKm", tx);
|
||||
args.put("seguroKmList", seguroKmList);
|
||||
|
||||
openWindow("/gui/tarifas/editarSeguroKm.zul",
|
||||
Labels.getLabel("busquedaSeguroKmController.window.title"),
|
||||
args, MODAL);
|
||||
}
|
||||
}
|
|
@ -10,7 +10,7 @@ import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
|||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderOrgaoConcedente;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderTaxaEmbarqueOrgao;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -66,7 +66,7 @@ public class BusquedaTaxaEmbarqueKmController extends MyGenericForwardComposer {
|
|||
public void doAfterCompose(Component comp) throws Exception {
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
taxaEmbarqueKmList.setItemRenderer(new RenderOrgaoConcedente());
|
||||
taxaEmbarqueKmList.setItemRenderer(new RenderTaxaEmbarqueOrgao());
|
||||
taxaEmbarqueKmList.addEventListener("onDoubleClick", new EventListener() {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -0,0 +1,257 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.web.gui.controladores.tarifas;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
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.Executions;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zul.Button;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.SeguroKm;
|
||||
import com.rjconsultores.ventaboletos.service.OrgaoConcedenteService;
|
||||
import com.rjconsultores.ventaboletos.service.SeguroKmService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderSeguroKm;
|
||||
import org.zkoss.zul.Intbox;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Administrador
|
||||
*/
|
||||
@Controller("editarSeguroKmController")
|
||||
@Scope("prototype")
|
||||
public class EditarSeguroKmController extends MyGenericForwardComposer {
|
||||
|
||||
@Autowired
|
||||
private SeguroKmService seguroKmService;
|
||||
@Autowired
|
||||
private OrgaoConcedenteService orgaoConcedenteService;
|
||||
private OrgaoConcedente orgao;
|
||||
// private SeguroKm seguroKm;
|
||||
private List<SeguroKm> lsSeguroKm;
|
||||
private List<OrgaoConcedente> lsOrgaoConcedente;
|
||||
private MyListbox seguroKmList;
|
||||
private MyComboboxEstandar cmbOrgao;
|
||||
private Button btnApagar;
|
||||
private Button btnAdicionarSeguroKm;
|
||||
private Intbox txtKm;
|
||||
private MyTextboxDecimal txtValor;
|
||||
private static Logger log = Logger.getLogger(EditarSeguroKmController.class);
|
||||
|
||||
public Button getBtnApagar() {
|
||||
return btnApagar;
|
||||
}
|
||||
|
||||
public void setBtnApagar(Button btnApagar) {
|
||||
this.btnApagar = btnApagar;
|
||||
}
|
||||
|
||||
public Button getBtnAdicionarSeguroKm() {
|
||||
return btnAdicionarSeguroKm;
|
||||
}
|
||||
|
||||
public void setBtnAdicionarSeguroKm(Button btnAdicionarSeguroKm) {
|
||||
this.btnAdicionarSeguroKm = btnAdicionarSeguroKm;
|
||||
}
|
||||
|
||||
public List<OrgaoConcedente> getLsOrgaoConcedente() {
|
||||
return lsOrgaoConcedente;
|
||||
}
|
||||
|
||||
public void setLsOrgaoConcedente(List<OrgaoConcedente> lsOrgaoConcedente) {
|
||||
this.lsOrgaoConcedente = lsOrgaoConcedente;
|
||||
}
|
||||
|
||||
public List<SeguroKm> getLsSeguroKm() {
|
||||
return lsSeguroKm;
|
||||
}
|
||||
|
||||
public void setLsSeguroKm(List<SeguroKm> lsSeguroKm) {
|
||||
this.lsSeguroKm = lsSeguroKm;
|
||||
}
|
||||
|
||||
public MyListbox getSeguroKmList() {
|
||||
return seguroKmList;
|
||||
}
|
||||
|
||||
public void setSeguroKmList(MyListbox seguroKmList) {
|
||||
this.seguroKmList = seguroKmList;
|
||||
}
|
||||
|
||||
public OrgaoConcedente getOrgao() {
|
||||
return orgao;
|
||||
}
|
||||
|
||||
public void setOrgao(OrgaoConcedente orgao) {
|
||||
this.orgao = orgao;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
|
||||
lsOrgaoConcedente = orgaoConcedenteService.obtenerTodos();
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
orgao = (OrgaoConcedente) Executions.getCurrent().getArg().get("orgao");
|
||||
//seguroKm = (SeguroKm) Executions.getCurrent().getArg().get("seguroKm");
|
||||
|
||||
seguroKmList.setItemRenderer(new RenderSeguroKm());
|
||||
lsSeguroKm = new ArrayList<SeguroKm>();
|
||||
|
||||
if (orgao != null
|
||||
&& orgao.getOrgaoConcedenteId() != null) {
|
||||
lsSeguroKm = seguroKmService.buscarPorOrgao(orgao);
|
||||
seguroKmList.setData(lsSeguroKm);
|
||||
cmbOrgao.setDisabled(Boolean.TRUE);
|
||||
cmbOrgao.setValue(orgao.getDescOrgao());
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnSalvar(Event ev) throws InterruptedException {
|
||||
|
||||
try {
|
||||
if (lsSeguroKm.isEmpty()) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarSeguroKmController.MSG.necessaitaInfromar.value"),
|
||||
Labels.getLabel("editarSeguroKmController.window.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
return;
|
||||
}
|
||||
|
||||
for (SeguroKm km : lsSeguroKm) {
|
||||
if (km.getSegurokmId() == null) {
|
||||
seguroKmService.suscribir(km);
|
||||
}
|
||||
}
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarSeguroKmController.MSG.suscribirOK"),
|
||||
Labels.getLabel("editarSeguroKmController.window.title"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
|
||||
closeWindow();
|
||||
|
||||
|
||||
} catch (Exception ex) {
|
||||
log.error(ex);
|
||||
Messagebox.show(
|
||||
Labels.getLabel("MSG.Error"),
|
||||
Labels.getLabel("editarSeguroKmController.window.title"),
|
||||
Messagebox.OK, Messagebox.ERROR);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// public void onClick$btnApagar(Event ev) throws InterruptedException {
|
||||
// try {
|
||||
// int resp = Messagebox.show(
|
||||
// Labels.getLabel("editarSeguroKmController.MSG.borrarPergunta"),
|
||||
// Labels.getLabel("editarSeguroKmController.window.title"),
|
||||
// Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||
//
|
||||
// if (resp == Messagebox.YES) {
|
||||
//
|
||||
// seguroKmService.borrar(seguroKm);
|
||||
//
|
||||
// Messagebox.show(
|
||||
// Labels.getLabel("editarSeguroKmController.MSG.borrarOK"),
|
||||
// Labels.getLabel("editarSeguroKmController.window.title"),
|
||||
// Messagebox.OK, Messagebox.INFORMATION);
|
||||
//
|
||||
// seguroKmList.removeItem(seguroKm);
|
||||
//
|
||||
// closeWindow();
|
||||
// }
|
||||
// } catch (Exception ex) {
|
||||
// log.error(ex);
|
||||
// Messagebox.show(
|
||||
// Labels.getLabel("MSG.Error"),
|
||||
// Labels.getLabel("editarSeguroKmController.window.title"),
|
||||
// Messagebox.OK, Messagebox.ERROR);
|
||||
// }
|
||||
// }
|
||||
public void onClick$btnAdicionarSeguroKm(Event ev) throws InterruptedException {
|
||||
cmbOrgao.getValue();
|
||||
txtKm.getValue();
|
||||
txtValor.getValue();
|
||||
|
||||
if (lsSeguroKm.isEmpty()) {
|
||||
|
||||
lsSeguroKm = seguroKmService.buscarPorOrgao((OrgaoConcedente) cmbOrgao.getSelectedItem().getValue());
|
||||
seguroKmList.setData(lsSeguroKm);
|
||||
}
|
||||
|
||||
//ChecandoDuplicado
|
||||
boolean existe = false;
|
||||
for (SeguroKm km : lsSeguroKm) {
|
||||
if (km.getKmate().equals(txtKm.getValue())) {
|
||||
existe = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (existe) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarSeguroKmController.MSG.existe"),
|
||||
Labels.getLabel("editarSeguroKmController.window.title"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
limparInput();
|
||||
return;
|
||||
}
|
||||
|
||||
SeguroKm km = new SeguroKm();
|
||||
km.setOrgaoconcedente((OrgaoConcedente) cmbOrgao.getSelectedItem().getValue());
|
||||
km.setKmate(txtKm.getValue());
|
||||
km.setValortaxa(txtValor.getValueDecimal());
|
||||
km.setActivo(true);
|
||||
km.setFecmodif(Calendar.getInstance().getTime());
|
||||
km.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
|
||||
lsSeguroKm.add(km);
|
||||
seguroKmList.setData(lsSeguroKm);
|
||||
|
||||
cmbOrgao.setDisabled(Boolean.TRUE);
|
||||
limparInput();
|
||||
|
||||
}
|
||||
|
||||
private void limparInput() {
|
||||
txtKm.setConstraint("");
|
||||
txtValor.setConstraint("");
|
||||
txtKm.setText("");
|
||||
txtValor.setText("");
|
||||
txtKm.setConstraint("no empty, no zero, no negative");
|
||||
txtValor.setConstraint("no empty, no zero, no negative");
|
||||
}
|
||||
|
||||
public void onClick$btnRemoverSeguroKm(Event ev) {
|
||||
SeguroKm cd = (SeguroKm) seguroKmList.getSelected();
|
||||
if (cd != null) {
|
||||
cd.setActivo(Boolean.FALSE);
|
||||
cd.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
cd.setFecmodif(Calendar.getInstance().getTime());
|
||||
seguroKmService.actualizacion(cd);
|
||||
|
||||
lsSeguroKm.remove(cd);
|
||||
seguroKmList.setData(lsSeguroKm);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.web.utilerias.menu.item.tarifas;
|
||||
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;
|
||||
import org.zkoss.util.resource.Labels;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Desenvolvimento
|
||||
*/
|
||||
public class ItemMenuSeguroKm extends DefaultItemMenuSistema {
|
||||
|
||||
public ItemMenuSeguroKm() {
|
||||
super("busquedaSeguroKmController.window.title");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getClaveMenu() {
|
||||
return "COM.RJCONSULTORES.ADMINISTRACION.GUI.TARIFAS.MENU.SEGUROKM";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ejecutar() {
|
||||
PantallaUtileria.openWindow("/gui/tarifas/busquedaSeguroKm.zul",
|
||||
Labels.getLabel("busquedaSeguroKmController.window.title"), null, desktop);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.web.utilerias.menu.item.tarifas;
|
||||
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;
|
||||
import org.zkoss.util.resource.Labels;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Desenvolvimento
|
||||
*/
|
||||
public class ItemMenuSeguroTarifa extends DefaultItemMenuSistema {
|
||||
|
||||
public ItemMenuSeguroTarifa() {
|
||||
super("busquedaSeguroTarifaController.window.title");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getClaveMenu() {
|
||||
return "COM.RJCONSULTORES.ADMINISTRACION.GUI.TARIFAS.MENU.SEGUROTARIFA";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ejecutar() {
|
||||
PantallaUtileria.openWindow("/gui/tarifas/busquedaSeguroTarifa.zul",
|
||||
Labels.getLabel("busquedaSeguroTarifaController.window.title"), null, desktop);
|
||||
|
||||
}
|
||||
}
|
|
@ -68,6 +68,8 @@ tarifas.cambioVigencia=com.rjconsultores.ventaboletos.web.utilerias.menu.item.ta
|
|||
tarifas.modificacionMasiva=com.rjconsultores.ventaboletos.web.utilerias.menu.item.tarifas.ItemMenuModificacionMasiva
|
||||
tarifas.tarifas=com.rjconsultores.ventaboletos.web.utilerias.menu.item.tarifas.ItemMenuTarifas
|
||||
tarifas.tarifaEscala=com.rjconsultores.ventaboletos.web.utilerias.menu.item.tarifas.ItemMenuTarifaEscala
|
||||
tarifas.seguroKm=com.rjconsultores.ventaboletos.web.utilerias.menu.item.tarifas.ItemMenuSeguroKm
|
||||
tarifas.seguroTarifa=com.rjconsultores.ventaboletos.web.utilerias.menu.item.tarifas.ItemMenuSeguroTarifa
|
||||
tarifas.taxaEmbarqueKm=com.rjconsultores.ventaboletos.web.utilerias.menu.item.tarifas.ItemMenuTarifasTaxaEmbarqueKm
|
||||
tarifas.taxaEmbarqueParada=com.rjconsultores.ventaboletos.web.utilerias.menu.item.tarifas.ItemMenuTarifasTaxaEmbarqueParada
|
||||
pasajeroFrecuente=com.rjconsultores.ventaboletos.web.utilerias.menu.item.pasajerofrecuente.MenuPasajeroFrecuente
|
||||
|
|
|
@ -5,32 +5,33 @@ import org.zkoss.zul.Listitem;
|
|||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
||||
import org.zkoss.util.resource.Labels;
|
||||
|
||||
public class RenderOrgaoConcedente implements ListitemRenderer {
|
||||
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
OrgaoConcedente orgaoConcedente = (OrgaoConcedente) o;
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
OrgaoConcedente orgaoConcedente = (OrgaoConcedente) o;
|
||||
|
||||
Listcell lc = new Listcell(orgaoConcedente.getOrgaoConcedenteId().toString());
|
||||
lc.setParent(lstm);
|
||||
Listcell lc = new Listcell(orgaoConcedente.getOrgaoConcedenteId().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(orgaoConcedente.getDescOrgao());
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell(orgaoConcedente.getDescOrgao());
|
||||
lc.setParent(lstm);
|
||||
|
||||
if (orgaoConcedente.getIndDefaultSeguro()) {
|
||||
lc = new Listcell("SIM");
|
||||
} else {
|
||||
lc = new Listcell("NÃO");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
if (orgaoConcedente.getIndDefaultSeguro()) {
|
||||
lc = new Listcell(Labels.getLabel("MSG.SI"));
|
||||
} else {
|
||||
lc = new Listcell(Labels.getLabel("MSG.NO"));
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
if (orgaoConcedente.getIndSubSeguro()) {
|
||||
lc = new Listcell("SIM");
|
||||
} else {
|
||||
lc = new Listcell("NÃO");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
if (orgaoConcedente.getIndSubSeguro()) {
|
||||
lc = new Listcell(Labels.getLabel("MSG.SI"));
|
||||
} else {
|
||||
lc = new Listcell(Labels.getLabel("MSG.NO"));
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", orgaoConcedente);
|
||||
}
|
||||
lstm.setAttribute("data", orgaoConcedente);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.SeguroKm;
|
||||
import org.zkoss.zul.Listcell;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Desenvolvimento
|
||||
*/
|
||||
public class RenderSeguroKm implements ListitemRenderer {
|
||||
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
SeguroKm taxaKm = (SeguroKm) o;
|
||||
|
||||
Listcell lc = new Listcell(taxaKm.getSegurokmId()==null?"-":taxaKm.getSegurokmId().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(taxaKm.getOrgaoconcedente().getDescOrgao());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(taxaKm.getKmate().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(taxaKm.getValortaxa().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", taxaKm);
|
||||
}
|
||||
|
||||
}
|
|
@ -3672,5 +3672,27 @@ editarTaxaEmbarqueParadaController.MSG.borrarPergunta=Deseja elminar Taxa de Em
|
|||
editarTaxaEmbarqueParadaController.MSG.borrarOK=Taxa de Embarque por Parada eliminado com sucesso.
|
||||
editarTaxaEmbarqueParadaController.MSG.existeFixo= Já existe um registro para esse orgão
|
||||
editarTaxaEmbarqueParadaController.MSG.existeKm=Já existe um registro com esse Km.
|
||||
|
||||
# Pesquisa SeguroKm
|
||||
busquedaSeguroKmController.window.title = Seguro por Intervalo de Km
|
||||
busquedaSeguroKmController.btnRefresh.tooltiptext = Atualizar
|
||||
busquedaSeguroKmController.btnNovo.tooltiptext = Incluir
|
||||
busquedaSeguroKmController.btnCerrar.tooltiptext = Fechar
|
||||
busquedaSeguroKmController.DescSeguroKm.label = Descrição
|
||||
busquedaSeguroKmController.orgao = Orgão
|
||||
|
||||
# Editar SeguroKm
|
||||
editarSeguroKmController.window.title = Seguro Km
|
||||
editarSeguroKmController.btnApagar.tooltiptext = Eliminar
|
||||
editarSeguroKmController.btnSalvar.tooltiptext = Salvar
|
||||
editarSeguroKmController.btnFechar.tooltiptext = Fechar
|
||||
editarSeguroKmController.km = KM
|
||||
editarSeguroKmController.valor = Valor
|
||||
editarSeguroKmController.MSG.necessaitaInfromar.value = Necessita informar um configuração de Seguro
|
||||
editarSeguroKmController.MSG.suscribirOK = Seguro por KM registrado com sucesso.
|
||||
editarSeguroKmController.MSG.borrarPergunta=Deseja elminar Seguro por KM?
|
||||
editarSeguroKmController.MSG.borrarOK=Seguro por KM eliminado com sucesso.
|
||||
editarSeguroKmController.MSG.existe= Já existe um registro com esse Km.
|
||||
|
||||
#SeguroServiceImpl
|
||||
TarifaOficialServiceImpl.msg.validacion.orgaoObligatorio=Informe o Órgão Concedente
|
|
@ -0,0 +1,53 @@
|
|||
<?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="winBusquedaSeguroKm"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winBusquedaSeguroKm" title="${c:l('busquedaSeguroKmController.window.title')}"
|
||||
apply="${busquedaSeguroKmController}" contentStyle="overflow:auto"
|
||||
height="500px" width="750px" border="normal" >
|
||||
<toolbar>
|
||||
<button id="btnRefresh" image="/gui/img/refresh.png" width="35px"
|
||||
tooltiptext="${c:l('busquedaSeguroKmController.btnRefresh.tooltiptext')}" />
|
||||
<separator orient="vertical" />
|
||||
<button id="btnNovo" image="/gui/img/add.png" width="35px"
|
||||
tooltiptext="${c:l('busquedaSeguroKmController.btnNovo.tooltiptext')}" />
|
||||
<separator orient="vertical" />
|
||||
<button id="btnCerrar" onClick="winBusquedaSeguroKm.detach()" image="/gui/img/exit.png" width="35px"
|
||||
tooltiptext="${c:l('busquedaSeguroKmController.btnCerrar.tooltiptext')}"/>
|
||||
</toolbar>
|
||||
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="30%" />
|
||||
<column width="70%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label value="${c:l('busquedaSeguroKmController.orgao')}"/>
|
||||
<textbox id="txtOrgao" width="200px" use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
<toolbar>
|
||||
<button id="btnPesquisa" image="/gui/img/find.png"
|
||||
label="${c:l('tooltiptext.btnPesquisa')}"/>
|
||||
</toolbar>
|
||||
|
||||
<paging id="pagingSeguroKm" pageSize="15"/>
|
||||
<listbox id="seguroKmList" use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
multiple="false">
|
||||
<listhead sizable="true">
|
||||
<listheader width="50px" image="/gui/img/builder.gif"
|
||||
label="${c:l('lb.id')}"
|
||||
sort="auto(taxaembarquekmId)"/>
|
||||
<listheader image="/gui/img/builder.gif"
|
||||
label="${c:l('busquedaSeguroKmController.orgao')}"
|
||||
sort="auto(descOrgao)"/>
|
||||
</listhead>
|
||||
</listbox>
|
||||
</window>
|
||||
</zk>
|
|
@ -0,0 +1,96 @@
|
|||
<?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="winEditarSeguroKm"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winEditarSeguroKm" border="normal"
|
||||
apply="${editarSeguroKmController}"
|
||||
width="550px" height="500px" contentStyle="overflow:auto"
|
||||
title="${c:l('editarSeguroKmController.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('editarSeguroKmController.btnApagar.tooltiptext')}"/-->
|
||||
<button id="btnSalvar" height="20"
|
||||
image="/gui/img/save.png" width="35px"
|
||||
tooltiptext="${c:l('editarSeguroKmController.btnSalvar.tooltiptext')}"/>
|
||||
<button id="btnFechar" height="20"
|
||||
image="/gui/img/exit.png" width="35px"
|
||||
onClick="winEditarSeguroKm.detach()"
|
||||
tooltiptext="${c:l('editarSeguroKmController.btnFechar.tooltiptext')}"/>
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="40%" />
|
||||
<column width="60%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label value="${c:l('busquedaSeguroKmController.orgao')}"/>
|
||||
<combobox id="cmbOrgao" constraint="no empty"
|
||||
mold="rounded" buttonVisible="true" width="90%"
|
||||
model="@{winEditarSeguroKm$composer.lsOrgaoConcedente}"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
selectedItem="@{winEditarSeguroKm$composer.orgao}"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
<toolbar>
|
||||
<separator bar="true"/>
|
||||
</toolbar>
|
||||
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="40%" />
|
||||
<column width="60%" />
|
||||
</columns>
|
||||
<rows>
|
||||
|
||||
<row>
|
||||
<label value="${c:l('editarSeguroKmController.km')}"/>
|
||||
<intbox id="txtKm" maxlength="5"
|
||||
constraint="no empty, no zero, no negative"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('editarSeguroKmController.valor')}"/>
|
||||
<textbox id="txtValor"
|
||||
constraint="no empty, no zero, no negative"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" precision="5" scale="2"/>
|
||||
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
<toolbar>
|
||||
<button id="btnAdicionarSeguroKm" height="20" image="/gui/img/add.png" width="35px"
|
||||
tooltiptext="${c:l('editarSeguroKmController.btnAddCuponSeguroKm.tooltiptext')}"/>
|
||||
<button id="btnRemoverSeguroKm" height="20" image="/gui/img/remove.png" width="35px"
|
||||
tooltiptext="${c:l('editarSeguroKmController.btnBorrarCuponSeguroKm.tooltiptext')}"/>
|
||||
</toolbar>
|
||||
|
||||
<listbox id="seguroKmList" use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
multiple="false">
|
||||
<listhead sizable="true">
|
||||
<listheader width="50px" image="/gui/img/builder.gif"
|
||||
label="${c:l('lb.id')}"
|
||||
sort="auto(taxaembarquekmId)"/>
|
||||
<listheader image="/gui/img/builder.gif"
|
||||
label="${c:l('busquedaSeguroKmController.orgao')}"
|
||||
sort="auto(orgaoconcedenteId.descOrgao)"/>
|
||||
<listheader image="/gui/img/builder.gif"
|
||||
label="${c:l('editarSeguroKmController.km')}"
|
||||
sort="auto(kmate)"/>
|
||||
<listheader image="/gui/img/builder.gif"
|
||||
label="${c:l('editarSeguroKmController.valor')}"
|
||||
sort="auto(valortaxa)"/>
|
||||
</listhead>
|
||||
</listbox>
|
||||
|
||||
</window>
|
||||
</zk>
|
Loading…
Reference in New Issue