git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@20549 d1611594-4594-4d17-8e1d-87c2c4800839
parent
fcca923056
commit
ee974ef3d7
|
@ -21,6 +21,7 @@ import org.zkoss.zk.ui.util.Clients;
|
||||||
import org.zkoss.zul.Button;
|
import org.zkoss.zul.Button;
|
||||||
import org.zkoss.zul.Checkbox;
|
import org.zkoss.zul.Checkbox;
|
||||||
import org.zkoss.zul.Combobox;
|
import org.zkoss.zul.Combobox;
|
||||||
|
import org.zkoss.zul.Comboitem;
|
||||||
import org.zkoss.zul.Intbox;
|
import org.zkoss.zul.Intbox;
|
||||||
import org.zkoss.zul.Messagebox;
|
import org.zkoss.zul.Messagebox;
|
||||||
import org.zkoss.zul.Spinner;
|
import org.zkoss.zul.Spinner;
|
||||||
|
@ -29,7 +30,10 @@ import org.zkoss.zul.Textbox;
|
||||||
import org.zkoss.zul.Timebox;
|
import org.zkoss.zul.Timebox;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.ClaseServicio;
|
import com.rjconsultores.ventaboletos.entidad.ClaseServicio;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.CoeficienteTarifa;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.OrgaoTramo;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Tramo;
|
import com.rjconsultores.ventaboletos.entidad.Tramo;
|
||||||
import com.rjconsultores.ventaboletos.entidad.TramoKm;
|
import com.rjconsultores.ventaboletos.entidad.TramoKm;
|
||||||
|
@ -37,9 +41,10 @@ import com.rjconsultores.ventaboletos.entidad.TramoServicio;
|
||||||
import com.rjconsultores.ventaboletos.entidad.TramoTiempo;
|
import com.rjconsultores.ventaboletos.entidad.TramoTiempo;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Via;
|
import com.rjconsultores.ventaboletos.entidad.Via;
|
||||||
import com.rjconsultores.ventaboletos.service.ClaseServicioService;
|
import com.rjconsultores.ventaboletos.service.ClaseServicioService;
|
||||||
|
import com.rjconsultores.ventaboletos.service.CoeficienteTarifaService;
|
||||||
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||||
import com.rjconsultores.ventaboletos.service.EsquemaCorridaService;
|
import com.rjconsultores.ventaboletos.service.EsquemaCorridaService;
|
||||||
import com.rjconsultores.ventaboletos.service.ParadaService;
|
import com.rjconsultores.ventaboletos.service.OrgaoConcedenteService;
|
||||||
import com.rjconsultores.ventaboletos.service.RutaCombinacionService;
|
import com.rjconsultores.ventaboletos.service.RutaCombinacionService;
|
||||||
import com.rjconsultores.ventaboletos.service.TramoService;
|
import com.rjconsultores.ventaboletos.service.TramoService;
|
||||||
import com.rjconsultores.ventaboletos.service.ViaService;
|
import com.rjconsultores.ventaboletos.service.ViaService;
|
||||||
|
@ -50,6 +55,7 @@ import com.rjconsultores.ventaboletos.web.utilerias.ConstraintNumberBD;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada;
|
||||||
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.render.RenderOrgaoTramo;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderTramoKm;
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderTramoKm;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderTramoServicio;
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderTramoServicio;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderTramoTiempo;
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderTramoTiempo;
|
||||||
|
@ -62,11 +68,10 @@ import com.rjconsultores.ventaboletos.web.utilerias.render.RenderTramoTiempo;
|
||||||
@Scope("prototype")
|
@Scope("prototype")
|
||||||
public class EditarTramosController extends MyGenericForwardComposer {
|
public class EditarTramosController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
@Autowired
|
@Autowired
|
||||||
private TramoService tramoService;
|
private TramoService tramoService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ParadaService paradaService;
|
|
||||||
@Autowired
|
|
||||||
private ViaService viaService;
|
private ViaService viaService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private EmpresaService empresaService;
|
private EmpresaService empresaService;
|
||||||
|
@ -76,29 +81,44 @@ public class EditarTramosController extends MyGenericForwardComposer {
|
||||||
private EsquemaCorridaService esquemaCorridaService;
|
private EsquemaCorridaService esquemaCorridaService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private RutaCombinacionService rutaCombinacionService;
|
private RutaCombinacionService rutaCombinacionService;
|
||||||
|
@Autowired
|
||||||
|
private CoeficienteTarifaService coeficienteTarifaService;
|
||||||
|
@Autowired
|
||||||
|
private OrgaoConcedenteService orgaoConcedenteService;
|
||||||
private List<Via> lsVias;
|
private List<Via> lsVias;
|
||||||
private List<ClaseServicio> lsClaseServicio;
|
private List<ClaseServicio> lsClaseServicio;
|
||||||
|
private List<CoeficienteTarifa> lsCoeficienteTarifas;
|
||||||
|
private List<OrgaoConcedente> lsOrgaoConcedentes;
|
||||||
|
private List<TramoServicio> listaTramoServicio;
|
||||||
|
private List<TramoTiempo> listaTramosTiempo;
|
||||||
|
private List<TramoKm> listaTramosKm;
|
||||||
|
private List<Empresa> lsEmpresa;
|
||||||
|
private List<OrgaoTramo> lsOrgamoTramo;
|
||||||
private Tramo tramo;
|
private Tramo tramo;
|
||||||
private MyListbox tramosList;
|
private MyListbox tramosList;
|
||||||
private MyListbox tiempoList;
|
private MyListbox tiempoList;
|
||||||
private MyListbox tramoKmEmpresaList;
|
private MyListbox tramoKmEmpresaList;
|
||||||
private List<TramoServicio> listaTramoServicio;
|
|
||||||
private List<TramoTiempo> listaTramosTiempo;
|
|
||||||
private List<TramoKm> listaTramosKm;
|
|
||||||
private MyListbox servicioList;
|
private MyListbox servicioList;
|
||||||
|
private MyListbox tramoCoeficientesList;
|
||||||
private MyComboboxParada cmbParadaOrigem;
|
private MyComboboxParada cmbParadaOrigem;
|
||||||
private MyComboboxParada cmbParadaDestino;
|
private MyComboboxParada cmbParadaDestino;
|
||||||
|
private Combobox cmbClaseServicioTiempo;
|
||||||
private Combobox cmbClaseServicio;
|
private Combobox cmbClaseServicio;
|
||||||
private Combobox cmbVia;
|
private Combobox cmbVia;
|
||||||
private Combobox cmbEmpresa;
|
private Combobox cmbEmpresa;
|
||||||
|
private Combobox cmbCoeficiente1;
|
||||||
|
private Combobox cmbCoeficiente2;
|
||||||
|
private Combobox cmbCoeficiente3;
|
||||||
|
private Combobox cmbOrgaoConcedente;
|
||||||
private Textbox txKmReal;
|
private Textbox txKmReal;
|
||||||
private Textbox txtKmPagoConductor;
|
private Textbox txtKmPagoConductor;
|
||||||
private Textbox txtNome;
|
private Textbox txtNome;
|
||||||
private Intbox itxCantkmpagoconductor;
|
private Intbox itxCantkmpagoconductor;
|
||||||
private Combobox cmbClaseServicioTiempo;
|
private Intbox txtKMCoeficiente1;
|
||||||
|
private Intbox txtKMCoeficiente2;
|
||||||
|
private Intbox txtKMCoeficiente3;
|
||||||
private Timebox horainicio;
|
private Timebox horainicio;
|
||||||
private Timebox horafin;
|
private Timebox horafin;
|
||||||
private Intbox txtnumdiasemana;
|
|
||||||
private Checkbox lun;
|
private Checkbox lun;
|
||||||
private Checkbox mar;
|
private Checkbox mar;
|
||||||
private Checkbox mie;
|
private Checkbox mie;
|
||||||
|
@ -112,16 +132,87 @@ public class EditarTramosController extends MyGenericForwardComposer {
|
||||||
private Spinner spMinutoTiempo;
|
private Spinner spMinutoTiempo;
|
||||||
private Button btnApagar;
|
private Button btnApagar;
|
||||||
private ConstraintNumberBD constraintTarifa;
|
private ConstraintNumberBD constraintTarifa;
|
||||||
private List<Empresa> lsEmpresa;
|
|
||||||
private Tab tabExcepcionesKm;
|
private Tab tabExcepcionesKm;
|
||||||
private static Logger log = Logger.getLogger(EditarTramosController.class);
|
private static Logger log = Logger.getLogger(EditarTramosController.class);
|
||||||
|
|
||||||
public Button getBtnApagar() {
|
public Tramo getTramo() {
|
||||||
return btnApagar;
|
return tramo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBtnApagar(Button btnApagar) {
|
public void setTramo(Tramo tramo) {
|
||||||
this.btnApagar = btnApagar;
|
this.tramo = tramo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Via> getLsVias() {
|
||||||
|
return lsVias;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLsVias(List<Via> lsVias) {
|
||||||
|
this.lsVias = lsVias;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ClaseServicio> getLsClaseServicio() {
|
||||||
|
return lsClaseServicio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLsClaseServicio(List<ClaseServicio> lsClaseServicio) {
|
||||||
|
this.lsClaseServicio = lsClaseServicio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<TramoServicio> getListaTramoServicio() {
|
||||||
|
return listaTramoServicio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setListaTramoServicio(List<TramoServicio> listaTramoServicio) {
|
||||||
|
this.listaTramoServicio = listaTramoServicio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<TramoTiempo> getListaTramosTiempo() {
|
||||||
|
return listaTramosTiempo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setListaTramosTiempo(List<TramoTiempo> listaTramosTiempo) {
|
||||||
|
this.listaTramosTiempo = listaTramosTiempo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<TramoKm> getListaTramosKm() {
|
||||||
|
return listaTramosKm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setListaTramosKm(List<TramoKm> listaTramosKm) {
|
||||||
|
this.listaTramosKm = listaTramosKm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConstraintNumberBD getConstraintTarifa() {
|
||||||
|
return constraintTarifa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConstraintTarifa(ConstraintNumberBD constraintTarifa) {
|
||||||
|
this.constraintTarifa = constraintTarifa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Empresa> getLsEmpresa() {
|
||||||
|
return lsEmpresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLsEmpresa(List<Empresa> lsEmpresa) {
|
||||||
|
this.lsEmpresa = lsEmpresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<CoeficienteTarifa> getLsCoeficienteTarifas() {
|
||||||
|
return lsCoeficienteTarifas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLsCoeficienteTarifas(List<CoeficienteTarifa> lsCoeficienteTarifas) {
|
||||||
|
this.lsCoeficienteTarifas = lsCoeficienteTarifas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<OrgaoConcedente> getLsOrgaoConcedentes() {
|
||||||
|
return lsOrgaoConcedentes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLsOrgaoConcedentes(List<OrgaoConcedente> lsOrgaoConcedentes) {
|
||||||
|
this.lsOrgaoConcedentes = lsOrgaoConcedentes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -129,16 +220,20 @@ public class EditarTramosController extends MyGenericForwardComposer {
|
||||||
lsVias = viaService.obtenerTodos();
|
lsVias = viaService.obtenerTodos();
|
||||||
lsEmpresa = empresaService.obtenerTodos();
|
lsEmpresa = empresaService.obtenerTodos();
|
||||||
lsClaseServicio = claseServicioService.buscarTodosExceto(-1);
|
lsClaseServicio = claseServicioService.buscarTodosExceto(-1);
|
||||||
|
lsCoeficienteTarifas = coeficienteTarifaService.obtenerTodos();
|
||||||
|
lsOrgaoConcedentes = orgaoConcedenteService.obtenerTodos();
|
||||||
|
|
||||||
super.doAfterCompose(comp);
|
super.doAfterCompose(comp);
|
||||||
|
|
||||||
servicioList.setItemRenderer(new RenderTramoServicio());
|
servicioList.setItemRenderer(new RenderTramoServicio());
|
||||||
tiempoList.setItemRenderer(new RenderTramoTiempo());
|
tiempoList.setItemRenderer(new RenderTramoTiempo());
|
||||||
tramoKmEmpresaList.setItemRenderer(new RenderTramoKm());
|
tramoKmEmpresaList.setItemRenderer(new RenderTramoKm());
|
||||||
|
tramoCoeficientesList.setItemRenderer(new RenderOrgaoTramo());
|
||||||
|
|
||||||
listaTramoServicio = new ArrayList<TramoServicio>();
|
listaTramoServicio = new ArrayList<TramoServicio>();
|
||||||
listaTramosTiempo = new ArrayList<TramoTiempo>();
|
listaTramosTiempo = new ArrayList<TramoTiempo>();
|
||||||
listaTramosKm = new ArrayList<TramoKm>();
|
listaTramosKm = new ArrayList<TramoKm>();
|
||||||
|
lsOrgamoTramo = new ArrayList<OrgaoTramo>();
|
||||||
|
|
||||||
tramo = (Tramo) Executions.getCurrent().getArg().get("tramo");
|
tramo = (Tramo) Executions.getCurrent().getArg().get("tramo");
|
||||||
if (tramo.getTramoId() != null) {
|
if (tramo.getTramoId() != null) {
|
||||||
|
@ -158,6 +253,11 @@ public class EditarTramosController extends MyGenericForwardComposer {
|
||||||
listaTramosKm.add(tk);
|
listaTramosKm.add(tk);
|
||||||
}
|
}
|
||||||
tramoKmEmpresaList.setData(listaTramosKm);
|
tramoKmEmpresaList.setData(listaTramosKm);
|
||||||
|
|
||||||
|
for (OrgaoTramo ot : tramo.getLsOrgaoTramo()) {
|
||||||
|
lsOrgamoTramo.add(ot);
|
||||||
|
}
|
||||||
|
tramoCoeficientesList.setData(lsOrgamoTramo);
|
||||||
}
|
}
|
||||||
tramosList = (MyListbox) Executions.getCurrent().getArg().get("tramosList");
|
tramosList = (MyListbox) Executions.getCurrent().getArg().get("tramosList");
|
||||||
|
|
||||||
|
@ -186,13 +286,13 @@ public class EditarTramosController extends MyGenericForwardComposer {
|
||||||
spMinuto.getValue();
|
spMinuto.getValue();
|
||||||
|
|
||||||
if (cmbClaseServicio.getSelectedItem() == null) {
|
if (cmbClaseServicio.getSelectedItem() == null) {
|
||||||
Messagebox.show(Labels.getLabel("editarTramosController.MSG.tipoServicio"), Labels.getLabel("editarTramosController.window.title"), Messagebox.OK,
|
Messagebox.show(Labels.getLabel("editarTramosController.MSG.tipoServicio"),
|
||||||
|
Labels.getLabel("editarTramosController.window.title"), Messagebox.OK,
|
||||||
Messagebox.EXCLAMATION);
|
Messagebox.EXCLAMATION);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
ClaseServicio claseServicio = (ClaseServicio) cmbClaseServicio.getSelectedItem().getValue();
|
ClaseServicio claseServicio = (ClaseServicio) cmbClaseServicio.getSelectedItem().getValue();
|
||||||
|
|
||||||
boolean existe = false;
|
boolean existe = false;
|
||||||
|
@ -217,15 +317,17 @@ public class EditarTramosController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
spHora.setText("00");
|
spHora.setText("00");
|
||||||
spMinuto.setText("00");
|
spMinuto.setText("00");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Messagebox.show(Labels.getLabel("MSG.Registro.Existe"), Labels.getLabel("editarTramosController.window.title"), Messagebox.OK, Messagebox.EXCLAMATION);
|
Messagebox.show(Labels.getLabel("MSG.Registro.Existe"),
|
||||||
|
Labels.getLabel("editarTramosController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
} catch (WrongValueException ex) {
|
} catch (WrongValueException ex) {
|
||||||
throw (WrongValueException) ex;
|
throw (WrongValueException) ex;
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error(ex);
|
||||||
Messagebox.show(Labels.getLabel("MSG.Error"), Labels.getLabel("editarTramosController.window.title"), Messagebox.OK, Messagebox.ERROR);
|
Messagebox.show(Labels.getLabel("MSG.Error"),
|
||||||
|
Labels.getLabel("editarTramosController.window.title"), Messagebox.OK, Messagebox.ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,9 +336,8 @@ public class EditarTramosController extends MyGenericForwardComposer {
|
||||||
spMinutoTiempo.getValue();
|
spMinutoTiempo.getValue();
|
||||||
|
|
||||||
if (!lun.isChecked() && !mar.isChecked() && !mie.isChecked() && !jue.isChecked() && !vie.isChecked() && !sab.isChecked() && !dom.isChecked()) {
|
if (!lun.isChecked() && !mar.isChecked() && !mie.isChecked() && !jue.isChecked() && !vie.isChecked() && !sab.isChecked() && !dom.isChecked()) {
|
||||||
|
Messagebox.show(Labels.getLabel("editarTramosController.MSG.obligatorioTramoTiempoDia"),
|
||||||
Messagebox.show(Labels.getLabel("editarTramosController.MSG.obligatorioTramoTiempoDia"), Labels.getLabel("editarTramosController.window.title"), Messagebox.OK,
|
Labels.getLabel("editarTramosController.window.title"), Messagebox.OK, Messagebox.INFORMATION);
|
||||||
Messagebox.INFORMATION);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -251,7 +352,6 @@ public class EditarTramosController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!existe) {
|
if (!existe) {
|
||||||
|
|
||||||
TramoTiempo tramoTiempo = new TramoTiempo();
|
TramoTiempo tramoTiempo = new TramoTiempo();
|
||||||
tramoTiempo.setClaseServicio(claseServicio);
|
tramoTiempo.setClaseServicio(claseServicio);
|
||||||
|
|
||||||
|
@ -264,7 +364,8 @@ public class EditarTramosController extends MyGenericForwardComposer {
|
||||||
tramoTiempo.setIndaplicvie(vie.isChecked());
|
tramoTiempo.setIndaplicvie(vie.isChecked());
|
||||||
tramoTiempo.setIndaplicsab(sab.isChecked());
|
tramoTiempo.setIndaplicsab(sab.isChecked());
|
||||||
tramoTiempo.setIndaplicdom(dom.isChecked());
|
tramoTiempo.setIndaplicdom(dom.isChecked());
|
||||||
tramoTiempo.setTiemporecorrido(DateUtil.getFecInicio(spHoraTiempo.getValue(), spMinutoTiempo.getValue()).getTime());
|
tramoTiempo.setTiemporecorrido(DateUtil.getFecInicio(spHoraTiempo.getValue(),
|
||||||
|
spMinutoTiempo.getValue()).getTime());
|
||||||
|
|
||||||
tramoTiempo.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
tramoTiempo.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
tramoTiempo.setFecmodif(Calendar.getInstance().getTime());
|
tramoTiempo.setFecmodif(Calendar.getInstance().getTime());
|
||||||
|
@ -276,13 +377,16 @@ public class EditarTramosController extends MyGenericForwardComposer {
|
||||||
spHoraTiempo.setText("00");
|
spHoraTiempo.setText("00");
|
||||||
spMinutoTiempo.setText("00");
|
spMinutoTiempo.setText("00");
|
||||||
} else {
|
} else {
|
||||||
Messagebox.show(Labels.getLabel("MSG.Registro.Existe"), Labels.getLabel("editarTramosController.window.title"), Messagebox.OK, Messagebox.EXCLAMATION);
|
Messagebox.show(Labels.getLabel("MSG.Registro.Existe"),
|
||||||
|
Labels.getLabel("editarTramosController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
} catch (WrongValueException ex) {
|
} catch (WrongValueException ex) {
|
||||||
throw (WrongValueException) ex;
|
throw (WrongValueException) ex;
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error(ex);
|
||||||
Messagebox.show(Labels.getLabel("MSG.Error"), Labels.getLabel("editarTramosController.window.title"), Messagebox.OK, Messagebox.ERROR);
|
Messagebox.show(Labels.getLabel("MSG.Error"),
|
||||||
|
Labels.getLabel("editarTramosController.window.title"), Messagebox.OK, Messagebox.ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -312,9 +416,10 @@ public class EditarTramosController extends MyGenericForwardComposer {
|
||||||
tramoKmEmpresaList.setData(listaTramosKm);
|
tramoKmEmpresaList.setData(listaTramosKm);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Messagebox.show(Labels.getLabel("MSG.Registro.Existe"), Labels.getLabel("editarTramosController.window.title"), Messagebox.OK, Messagebox.EXCLAMATION);
|
Messagebox.show(Labels.getLabel("MSG.Registro.Existe"),
|
||||||
|
Labels.getLabel("editarTramosController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnApagarServicio(Event ev) throws InterruptedException {
|
public void onClick$btnApagarServicio(Event ev) throws InterruptedException {
|
||||||
|
@ -322,7 +427,8 @@ public class EditarTramosController extends MyGenericForwardComposer {
|
||||||
TramoServicio tramoAtributo = (TramoServicio) servicioList.getSelected();
|
TramoServicio tramoAtributo = (TramoServicio) servicioList.getSelected();
|
||||||
|
|
||||||
if (tramoAtributo != null) {
|
if (tramoAtributo != null) {
|
||||||
int opcao = Messagebox.show(Labels.getLabel("editarTramosController.MSG.borrarTramoServicio"), Labels.getLabel("editarTramosController.window.title"),
|
int opcao = Messagebox.show(Labels.getLabel("editarTramosController.MSG.borrarTramoServicio"),
|
||||||
|
Labels.getLabel("editarTramosController.window.title"),
|
||||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||||
|
|
||||||
if (opcao == Messagebox.YES) {
|
if (opcao == Messagebox.YES) {
|
||||||
|
@ -334,14 +440,15 @@ public class EditarTramosController extends MyGenericForwardComposer {
|
||||||
servicioList.setData(listaTramoServicio);
|
servicioList.setData(listaTramoServicio);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Messagebox.show(Labels.getLabel("editarTramosController.MSG.selecioneTramoServicio"), Labels.getLabel("editarTramosController.window.title"), Messagebox.OK,
|
Messagebox.show(Labels.getLabel("editarTramosController.MSG.selecioneTramoServicio"),
|
||||||
Messagebox.EXCLAMATION);
|
Labels.getLabel("editarTramosController.window.title"), Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
} catch (WrongValueException ex) {
|
} catch (WrongValueException ex) {
|
||||||
throw (WrongValueException) ex;
|
throw (WrongValueException) ex;
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error(ex);
|
||||||
Messagebox.show(Labels.getLabel("MSG.Error"), Labels.getLabel("editarTramosController.window.title"), Messagebox.OK, Messagebox.ERROR);
|
Messagebox.show(Labels.getLabel("MSG.Error"),
|
||||||
|
Labels.getLabel("editarTramosController.window.title"), Messagebox.OK, Messagebox.ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -350,7 +457,8 @@ public class EditarTramosController extends MyGenericForwardComposer {
|
||||||
TramoTiempo tramoTiempo = (TramoTiempo) tiempoList.getSelected();
|
TramoTiempo tramoTiempo = (TramoTiempo) tiempoList.getSelected();
|
||||||
|
|
||||||
if (tramoTiempo != null) {
|
if (tramoTiempo != null) {
|
||||||
int opcao = Messagebox.show(Labels.getLabel("editarTramosController.MSG.borrarTramoTiempo"), Labels.getLabel("editarTramosController.window.title"), Messagebox.YES
|
int opcao = Messagebox.show(Labels.getLabel("editarTramosController.MSG.borrarTramoTiempo"),
|
||||||
|
Labels.getLabel("editarTramosController.window.title"), Messagebox.YES
|
||||||
| Messagebox.NO, Messagebox.QUESTION);
|
| Messagebox.NO, Messagebox.QUESTION);
|
||||||
|
|
||||||
if (opcao == Messagebox.YES) {
|
if (opcao == Messagebox.YES) {
|
||||||
|
@ -362,23 +470,25 @@ public class EditarTramosController extends MyGenericForwardComposer {
|
||||||
tiempoList.setData(listaTramosTiempo);
|
tiempoList.setData(listaTramosTiempo);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Messagebox.show(Labels.getLabel("editarTramosController.MSG.selecioneTramoTiempo"), Labels.getLabel("editarTramosController.window.title"), Messagebox.OK,
|
Messagebox.show(Labels.getLabel("editarTramosController.MSG.selecioneTramoTiempo"),
|
||||||
|
Labels.getLabel("editarTramosController.window.title"), Messagebox.OK,
|
||||||
Messagebox.EXCLAMATION);
|
Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
} catch (WrongValueException ex) {
|
} catch (WrongValueException ex) {
|
||||||
throw (WrongValueException) ex;
|
throw (WrongValueException) ex;
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error(ex);
|
||||||
Messagebox.show(Labels.getLabel("MSG.Error"), Labels.getLabel("editarTramosController.window.title"), Messagebox.OK, Messagebox.ERROR);
|
Messagebox.show(Labels.getLabel("MSG.Error"),
|
||||||
|
Labels.getLabel("editarTramosController.window.title"), Messagebox.OK, Messagebox.ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnApagarExcepcioneKm(Event ev) throws InterruptedException {
|
public void onClick$btnApagarExcepcioneKm(Event ev) throws InterruptedException {
|
||||||
|
|
||||||
TramoKm tramoKm = (TramoKm) tramoKmEmpresaList.getSelected();
|
TramoKm tramoKm = (TramoKm) tramoKmEmpresaList.getSelected();
|
||||||
|
|
||||||
if (tramoKm != null) {
|
if (tramoKm != null) {
|
||||||
int opcao = Messagebox.show(Labels.getLabel("editarTramosController.MSG.borrarTramoKm"), Labels.getLabel("editarTramosController.window.title"), Messagebox.YES
|
int opcao = Messagebox.show(Labels.getLabel("editarTramosController.MSG.borrarTramoKm"),
|
||||||
|
Labels.getLabel("editarTramosController.window.title"), Messagebox.YES
|
||||||
| Messagebox.NO, Messagebox.QUESTION);
|
| Messagebox.NO, Messagebox.QUESTION);
|
||||||
|
|
||||||
if (opcao == Messagebox.YES) {
|
if (opcao == Messagebox.YES) {
|
||||||
|
@ -390,10 +500,10 @@ public class EditarTramosController extends MyGenericForwardComposer {
|
||||||
tramoKmEmpresaList.setData(listaTramosKm);
|
tramoKmEmpresaList.setData(listaTramosKm);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Messagebox.show(Labels.getLabel("editarTramosController.MSG.selecioneTramoKm"), Labels.getLabel("editarTramosController.window.title"), Messagebox.OK,
|
Messagebox.show(Labels.getLabel("editarTramosController.MSG.selecioneTramoKm"),
|
||||||
|
Labels.getLabel("editarTramosController.window.title"), Messagebox.OK,
|
||||||
Messagebox.EXCLAMATION);
|
Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnSalvar(Event ev) throws InterruptedException {
|
public void onClick$btnSalvar(Event ev) throws InterruptedException {
|
||||||
|
@ -404,13 +514,16 @@ public class EditarTramosController extends MyGenericForwardComposer {
|
||||||
cmbParadaDestino.getValue(true);
|
cmbParadaDestino.getValue(true);
|
||||||
|
|
||||||
if (listaTramoServicio.isEmpty()) {
|
if (listaTramoServicio.isEmpty()) {
|
||||||
Messagebox.show(Labels.getLabel("editarTramosController.MSG.obligatorioTramoTiempo"), Labels.getLabel("editarTramosController.window.title"), Messagebox.OK,
|
Messagebox.show(Labels.getLabel("editarTramosController.MSG.obligatorioTramoTiempo"),
|
||||||
|
Labels.getLabel("editarTramosController.window.title"), Messagebox.OK,
|
||||||
Messagebox.INFORMATION);
|
Messagebox.INFORMATION);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
tramo.setLsOrgaoTramo(lsOrgamoTramo);
|
||||||
|
|
||||||
tramo.setActivo(Boolean.TRUE);
|
tramo.setActivo(Boolean.TRUE);
|
||||||
tramo.setFecmodif(Calendar.getInstance().getTime());
|
tramo.setFecmodif(Calendar.getInstance().getTime());
|
||||||
tramo.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
tramo.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
|
@ -440,7 +553,8 @@ public class EditarTramosController extends MyGenericForwardComposer {
|
||||||
tramoService.suscribir(tramo);
|
tramoService.suscribir(tramo);
|
||||||
tramosList.addItem(tramo);
|
tramosList.addItem(tramo);
|
||||||
|
|
||||||
Messagebox.show(Labels.getLabel("editarTramosController.MSG.suscribirOK"), Labels.getLabel("editarTramosController.window.title"), Messagebox.OK,
|
Messagebox.show(Labels.getLabel("editarTramosController.MSG.suscribirOK"),
|
||||||
|
Labels.getLabel("editarTramosController.window.title"), Messagebox.OK,
|
||||||
Messagebox.INFORMATION);
|
Messagebox.INFORMATION);
|
||||||
|
|
||||||
closeWindow();
|
closeWindow();
|
||||||
|
@ -449,33 +563,37 @@ public class EditarTramosController extends MyGenericForwardComposer {
|
||||||
tramoService.actualizacion(tramo);
|
tramoService.actualizacion(tramo);
|
||||||
tramosList.updateItem(tramo);
|
tramosList.updateItem(tramo);
|
||||||
|
|
||||||
Messagebox.show(Labels.getLabel("editarTramosController.MSG.suscribirOK"), Labels.getLabel("editarTramosController.window.title"), Messagebox.OK,
|
Messagebox.show(Labels.getLabel("editarTramosController.MSG.suscribirOK"),
|
||||||
|
Labels.getLabel("editarTramosController.window.title"), Messagebox.OK,
|
||||||
Messagebox.INFORMATION);
|
Messagebox.INFORMATION);
|
||||||
|
|
||||||
closeWindow();
|
closeWindow();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Messagebox.show(Labels.getLabel("MSG.Registro.Existe.Origem.Destino.Via"), Labels.getLabel("editarTramosController.window.title"), Messagebox.OK,
|
Messagebox.show(Labels.getLabel("MSG.Registro.Existe.Origem.Destino.Via"),
|
||||||
|
Labels.getLabel("editarTramosController.window.title"), Messagebox.OK,
|
||||||
Messagebox.EXCLAMATION);
|
Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Messagebox.show(Labels.getLabel("editarTramosController.MSG.OrigemDestinoIguais"), Labels.getLabel("editarTramosController.window.title"), Messagebox.OK,
|
Messagebox.show(Labels.getLabel("editarTramosController.MSG.OrigemDestinoIguais"),
|
||||||
|
Labels.getLabel("editarTramosController.window.title"), Messagebox.OK,
|
||||||
Messagebox.EXCLAMATION);
|
Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
|
|
||||||
if (ex instanceof WrongValueException) {
|
if (ex instanceof WrongValueException) {
|
||||||
throw (WrongValueException) ex;
|
throw (WrongValueException) ex;
|
||||||
}
|
}
|
||||||
|
|
||||||
log.error(ex);
|
log.error(ex);
|
||||||
Messagebox.show(Labels.getLabel("MSG.Error"), Labels.getLabel("editarTramosController.window.title"), Messagebox.OK, Messagebox.ERROR);
|
Messagebox.show(Labels.getLabel("MSG.Error"), Labels.getLabel("editarTramosController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnApagar(Event ev) throws InterruptedException {
|
public void onClick$btnApagar(Event ev) throws InterruptedException {
|
||||||
try {
|
try {
|
||||||
int resp = Messagebox.show(Labels.getLabel("editarTramosController.MSG.borrarPergunta"), Labels.getLabel("editarTramosController.window.title"), Messagebox.YES
|
int resp = Messagebox.show(Labels.getLabel("editarTramosController.MSG.borrarPergunta"),
|
||||||
|
Labels.getLabel("editarTramosController.window.title"), Messagebox.YES
|
||||||
| Messagebox.NO, Messagebox.QUESTION);
|
| Messagebox.NO, Messagebox.QUESTION);
|
||||||
|
|
||||||
if (resp == Messagebox.YES) {
|
if (resp == Messagebox.YES) {
|
||||||
|
@ -484,164 +602,94 @@ public class EditarTramosController extends MyGenericForwardComposer {
|
||||||
if (existeCombinacion == false && existeEsquemaCorrida == false) {
|
if (existeCombinacion == false && existeEsquemaCorrida == false) {
|
||||||
tramoService.borrar(tramo);
|
tramoService.borrar(tramo);
|
||||||
|
|
||||||
Messagebox.show(Labels.getLabel("editarTramosController.MSG.borrarOK"), Labels.getLabel("editarTramosController.window.title"), Messagebox.OK,
|
Messagebox.show(Labels.getLabel("editarTramosController.MSG.borrarOK"),
|
||||||
|
Labels.getLabel("editarTramosController.window.title"), Messagebox.OK,
|
||||||
Messagebox.INFORMATION);
|
Messagebox.INFORMATION);
|
||||||
|
|
||||||
tramosList.removeItem(tramo);
|
tramosList.removeItem(tramo);
|
||||||
|
|
||||||
closeWindow();
|
closeWindow();
|
||||||
} else {
|
} else {
|
||||||
Messagebox.show(Labels.getLabel("editarTramosController.MSG.borrarFalse"), Labels.getLabel("editarTramosController.window.title"), Messagebox.OK,
|
Messagebox.show(Labels.getLabel("editarTramosController.MSG.borrarFalse"),
|
||||||
|
Labels.getLabel("editarTramosController.window.title"), Messagebox.OK,
|
||||||
Messagebox.EXCLAMATION);
|
Messagebox.EXCLAMATION);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (WrongValueException ex) {
|
} catch (WrongValueException ex) {
|
||||||
throw (WrongValueException) ex;
|
throw (WrongValueException) ex;
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error(ex);
|
||||||
Messagebox.show(Labels.getLabel("MSG.Error"), Labels.getLabel("editarTramosController.window.title"), Messagebox.OK, Messagebox.ERROR);
|
Messagebox.show(Labels.getLabel("MSG.Error"),
|
||||||
|
Labels.getLabel("editarTramosController.window.title"), Messagebox.OK, Messagebox.ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Intbox getTxtnumdiasemana() {
|
public void onClick$btnApagarCoeficiente(Event ev) {
|
||||||
return txtnumdiasemana;
|
OrgaoTramo orgaoTramo = (OrgaoTramo) tramoCoeficientesList.getSelected();
|
||||||
|
if (orgaoTramo != null) {
|
||||||
|
orgaoTramo.setActivo(Boolean.FALSE);
|
||||||
|
|
||||||
|
tramoCoeficientesList.removeItem(orgaoTramo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTxtnumdiasemana(Intbox txtnumdiasemana) {
|
public void onClick$btnSalvarCoeficiente(Event ev) {
|
||||||
this.txtnumdiasemana = txtnumdiasemana;
|
if (lsOrgamoTramo == null) {
|
||||||
|
lsOrgamoTramo = new ArrayList<OrgaoTramo>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public MyListbox getTiempoList() {
|
Comboitem cbiCoeficiente1 = cmbCoeficiente1.getSelectedItem();
|
||||||
return tiempoList;
|
CoeficienteTarifa coeficienteTarifa1 = null;
|
||||||
|
if (cbiCoeficiente1 != null) {
|
||||||
|
coeficienteTarifa1 = (CoeficienteTarifa) cbiCoeficiente1.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTiempoList(MyListbox tiempoList) {
|
Comboitem cbiCoeficiente2 = cmbCoeficiente2.getSelectedItem();
|
||||||
this.tiempoList = tiempoList;
|
CoeficienteTarifa coeficienteTarifa2 = null;
|
||||||
|
if (cbiCoeficiente2 != null) {
|
||||||
|
coeficienteTarifa2 = (CoeficienteTarifa) cbiCoeficiente2.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Tramo getTramo() {
|
Comboitem cbiCoeficiente3 = cmbCoeficiente3.getSelectedItem();
|
||||||
return tramo;
|
CoeficienteTarifa coeficienteTarifa3 = null;
|
||||||
|
if (cbiCoeficiente3 != null) {
|
||||||
|
coeficienteTarifa3 = (CoeficienteTarifa) cbiCoeficiente3.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Combobox getCmbClaseServicioTiempo() {
|
Comboitem cbiOrgaoConcedente = cmbOrgaoConcedente.getSelectedItem();
|
||||||
return cmbClaseServicioTiempo;
|
OrgaoConcedente orgaoConcedente = null;
|
||||||
|
if (cbiOrgaoConcedente != null) {
|
||||||
|
orgaoConcedente = (OrgaoConcedente) cbiOrgaoConcedente.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCmbClaseServicioTiempo(Combobox cmbClaseServicioTiempo) {
|
Integer kmCoeficiente1 = txtKMCoeficiente1.getValue();
|
||||||
this.cmbClaseServicioTiempo = cmbClaseServicioTiempo;
|
Integer kmCoeficiente2 = txtKMCoeficiente2.getValue();
|
||||||
}
|
Integer kmCoeficiente3 = txtKMCoeficiente3.getValue();
|
||||||
|
|
||||||
public void setTramo(Tramo tramo) {
|
OrgaoTramo orgaoTramo = new OrgaoTramo();
|
||||||
this.tramo = tramo;
|
orgaoTramo.setCoeficienteTarifa1(coeficienteTarifa1);
|
||||||
}
|
orgaoTramo.setCoeficienteTarifa2(coeficienteTarifa2);
|
||||||
|
orgaoTramo.setCoeficienteTarifa3(coeficienteTarifa3);
|
||||||
|
orgaoTramo.setKmCoeficiente1(kmCoeficiente1);
|
||||||
|
orgaoTramo.setKmCoeficiente2(kmCoeficiente2);
|
||||||
|
orgaoTramo.setKmCoeficiente3(kmCoeficiente3);
|
||||||
|
orgaoTramo.setOrgaoConcedente(orgaoConcedente);
|
||||||
|
orgaoTramo.setTramo(tramo);
|
||||||
|
orgaoTramo.setActivo(Boolean.TRUE);
|
||||||
|
orgaoTramo.setFecmodif(Calendar.getInstance().getTime());
|
||||||
|
orgaoTramo.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
|
|
||||||
public List<Via> getLsVias() {
|
lsOrgamoTramo.add(orgaoTramo);
|
||||||
return lsVias;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLsVias(List<Via> lsVias) {
|
tramoCoeficientesList.setData(lsOrgamoTramo);
|
||||||
this.lsVias = lsVias;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MyListbox getAtributoList() {
|
cmbCoeficiente1.setSelectedItem(null);
|
||||||
return servicioList;
|
cmbCoeficiente2.setSelectedItem(null);
|
||||||
}
|
cmbCoeficiente3.setSelectedItem(null);
|
||||||
|
cmbOrgaoConcedente.setSelectedItem(null);
|
||||||
public void setAtributoList(MyListbox atributoList) {
|
txtKMCoeficiente1.setValue(null);
|
||||||
this.servicioList = atributoList;
|
txtKMCoeficiente2.setValue(null);
|
||||||
}
|
txtKMCoeficiente3.setValue(null);
|
||||||
|
|
||||||
public Combobox getCmbClaseServicio() {
|
|
||||||
return cmbClaseServicio;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCmbClaseServicio(Combobox cmbClaseServicio) {
|
|
||||||
this.cmbClaseServicio = cmbClaseServicio;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<ClaseServicio> getLsClaseServicio() {
|
|
||||||
return lsClaseServicio;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLsClaseServicio(List<ClaseServicio> lsClaseServicio) {
|
|
||||||
this.lsClaseServicio = lsClaseServicio;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Textbox getTxtNome() {
|
|
||||||
return txtNome;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTxtNome(Textbox txtNome) {
|
|
||||||
this.txtNome = txtNome;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Timebox getHorafin() {
|
|
||||||
return horafin;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setHorafin(Timebox horafin) {
|
|
||||||
this.horafin = horafin;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Timebox getHorainicio() {
|
|
||||||
return horainicio;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setHorainicio(Timebox horainicio) {
|
|
||||||
this.horainicio = horainicio;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Checkbox getDom() {
|
|
||||||
return dom;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDom(Checkbox dom) {
|
|
||||||
this.dom = dom;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Checkbox getLun() {
|
|
||||||
return lun;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLun(Checkbox lun) {
|
|
||||||
this.lun = lun;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Checkbox getMar() {
|
|
||||||
return mar;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMar(Checkbox mar) {
|
|
||||||
this.mar = mar;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Checkbox getMie() {
|
|
||||||
return mie;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMie(Checkbox mie) {
|
|
||||||
this.mie = mie;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Checkbox getSab() {
|
|
||||||
return sab;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSab(Checkbox sab) {
|
|
||||||
this.sab = sab;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Checkbox getVie() {
|
|
||||||
return vie;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVie(Checkbox vie) {
|
|
||||||
this.vie = vie;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<Empresa> getLsEmpresa() {
|
|
||||||
return lsEmpresa;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,76 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||||
|
|
||||||
|
import org.zkoss.zul.Listcell;
|
||||||
|
import org.zkoss.zul.Listitem;
|
||||||
|
import org.zkoss.zul.ListitemRenderer;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.CoeficienteTarifa;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.OrgaoTramo;
|
||||||
|
|
||||||
|
public class RenderOrgaoTramo implements ListitemRenderer {
|
||||||
|
|
||||||
|
public void render(Listitem lstm, Object o) throws Exception {
|
||||||
|
OrgaoTramo orgaoTramo = (OrgaoTramo) o;
|
||||||
|
|
||||||
|
Listcell lc = new Listcell();
|
||||||
|
|
||||||
|
CoeficienteTarifa coeficienteTarifa1 = orgaoTramo.getCoeficienteTarifa1();
|
||||||
|
if (coeficienteTarifa1 != null) {
|
||||||
|
lc = new Listcell(coeficienteTarifa1.toString());
|
||||||
|
} else {
|
||||||
|
lc = new Listcell("");
|
||||||
|
}
|
||||||
|
lc.setParent(lstm);
|
||||||
|
|
||||||
|
Integer kmCoeficienteTarifa1 = orgaoTramo.getKmCoeficiente1();
|
||||||
|
if (kmCoeficienteTarifa1 != null) {
|
||||||
|
lc = new Listcell(kmCoeficienteTarifa1.toString());
|
||||||
|
} else {
|
||||||
|
lc = new Listcell("");
|
||||||
|
}
|
||||||
|
lc.setParent(lstm);
|
||||||
|
|
||||||
|
CoeficienteTarifa coeficienteTarifa2 = orgaoTramo.getCoeficienteTarifa2();
|
||||||
|
if (coeficienteTarifa2 != null) {
|
||||||
|
lc = new Listcell(coeficienteTarifa2.toString());
|
||||||
|
} else {
|
||||||
|
lc = new Listcell("");
|
||||||
|
}
|
||||||
|
lc.setParent(lstm);
|
||||||
|
|
||||||
|
Integer kmCoeficienteTarifa2 = orgaoTramo.getKmCoeficiente2();
|
||||||
|
if (kmCoeficienteTarifa2 != null) {
|
||||||
|
lc = new Listcell(kmCoeficienteTarifa2.toString());
|
||||||
|
} else {
|
||||||
|
lc = new Listcell("");
|
||||||
|
}
|
||||||
|
lc.setParent(lstm);
|
||||||
|
|
||||||
|
CoeficienteTarifa coeficienteTarifa3 = orgaoTramo.getCoeficienteTarifa3();
|
||||||
|
if (coeficienteTarifa3 != null) {
|
||||||
|
lc = new Listcell(coeficienteTarifa3.toString());
|
||||||
|
} else {
|
||||||
|
lc = new Listcell("");
|
||||||
|
}
|
||||||
|
lc.setParent(lstm);
|
||||||
|
|
||||||
|
Integer kmCoeficienteTarifa3 = orgaoTramo.getKmCoeficiente3();
|
||||||
|
if (kmCoeficienteTarifa3 != null) {
|
||||||
|
lc = new Listcell(kmCoeficienteTarifa1.toString());
|
||||||
|
} else {
|
||||||
|
lc = new Listcell("");
|
||||||
|
}
|
||||||
|
lc.setParent(lstm);
|
||||||
|
|
||||||
|
OrgaoConcedente orgaoConcedente = orgaoTramo.getOrgaoConcedente();
|
||||||
|
if (orgaoConcedente != null) {
|
||||||
|
lc = new Listcell(orgaoConcedente.toString());
|
||||||
|
} else {
|
||||||
|
lc = new Listcell("");
|
||||||
|
}
|
||||||
|
lc.setParent(lstm);
|
||||||
|
|
||||||
|
lstm.setAttribute("data", orgaoTramo);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1067,6 +1067,7 @@ editarTramosController.labelDestino.value = Destino
|
||||||
editarTramosController.labelOrigen.value = Origem
|
editarTramosController.labelOrigen.value = Origem
|
||||||
editarTramosController.labelVia.value = Via
|
editarTramosController.labelVia.value = Via
|
||||||
editarTramosController.tabTramos.label = Trechos
|
editarTramosController.tabTramos.label = Trechos
|
||||||
|
editarTramosController.tabOrgaoCoeficientes.label = Coeficientes
|
||||||
editarTramosController.tabServicio.label = Tempo Geral
|
editarTramosController.tabServicio.label = Tempo Geral
|
||||||
editarTramosController.lbKmReal.value = KM Real
|
editarTramosController.lbKmReal.value = KM Real
|
||||||
editarTramosController.lbKmTarifa.value = KM Tarifa
|
editarTramosController.lbKmTarifa.value = KM Tarifa
|
||||||
|
@ -1104,6 +1105,15 @@ editarTramosController.btnApagarExcepcioneKm.tooltiptext = Eliminar
|
||||||
editarTramosController.btnSalvarExceptioneKm.tooltiptext = Salva Trecho Km
|
editarTramosController.btnSalvarExceptioneKm.tooltiptext = Salva Trecho Km
|
||||||
editarTramosController.MSG.selecioneTramoKm = Selecione uma exceção de Km.
|
editarTramosController.MSG.selecioneTramoKm = Selecione uma exceção de Km.
|
||||||
editarTramosController.MSG.borrarTramoKm = Elimina exceção de Km?
|
editarTramosController.MSG.borrarTramoKm = Elimina exceção de Km?
|
||||||
|
editarTramosController.labelCoeficiente1.value = Coeficiente 1
|
||||||
|
editarTramosController.labelKMCoeficiente1.value = KM Coeficiente 1
|
||||||
|
editarTramosController.labelCoeficiente2.value = Coeficiente 2
|
||||||
|
editarTramosController.labelKMCoeficiente2.value = KM Coeficiente 2
|
||||||
|
editarTramosController.labelCoeficiente3.value = Coeficiente 3
|
||||||
|
editarTramosController.labelKMCoeficiente3.value = KM Coeficiente 3
|
||||||
|
editarTramosController.labelOrgaoConcedente.value = Órgão Concedente
|
||||||
|
editarTramosController.btnApagarCoeficiente.tooltiptext = Eliminar Coeficiente
|
||||||
|
editarTramosController.btnSalvarCoeficiente.tooltiptext = Salvar Coeficiente
|
||||||
|
|
||||||
#Panatalla VentaBoletos Comissionistas
|
#Panatalla VentaBoletos Comissionistas
|
||||||
pantalla.VentaBoletosTDO.window.title = Grupo Senda - Comissionista onLine
|
pantalla.VentaBoletosTDO.window.title = Grupo Senda - Comissionista onLine
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
<zk>
|
<zk>
|
||||||
<window id="winEditarTramos" border="normal"
|
<window id="winEditarTramos" border="normal"
|
||||||
apply="${editarTramosController}" width="700px" height="400px"
|
apply="${editarTramosController}" width="950px" height="400px"
|
||||||
title="${c:l('editarTramosController.window.title')}">
|
title="${c:l('editarTramosController.window.title')}">
|
||||||
<toolbar>
|
<toolbar>
|
||||||
<hbox spacing="5px" style="padding:1px" align="right">
|
<hbox spacing="5px" style="padding:1px" align="right">
|
||||||
|
@ -33,6 +33,8 @@
|
||||||
label="${c:l('editarTramosController.tabTiempo.label')}" />
|
label="${c:l('editarTramosController.tabTiempo.label')}" />
|
||||||
<tab id="tabExcepcionesKm"
|
<tab id="tabExcepcionesKm"
|
||||||
label="${c:l('editarTramosController.tabExcepcionesKm.label')}" />
|
label="${c:l('editarTramosController.tabExcepcionesKm.label')}" />
|
||||||
|
<tab id="tabOrgaoCoeficientes"
|
||||||
|
label="${c:l('editarTramosController.tabOrgaoCoeficientes.label')}" />
|
||||||
</tabs>
|
</tabs>
|
||||||
<tabpanels>
|
<tabpanels>
|
||||||
<tabpanel>
|
<tabpanel>
|
||||||
|
@ -286,13 +288,18 @@
|
||||||
</columns>
|
</columns>
|
||||||
<rows>
|
<rows>
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('editarTramosController.lbItxCantkmpagoconductor.value')}" />
|
<label
|
||||||
<intbox id="itxCantkmpagoconductor" width="80%" maxlength="7" constraint="no empty" />
|
value="${c:l('editarTramosController.lbItxCantkmpagoconductor.value')}" />
|
||||||
|
<intbox id="itxCantkmpagoconductor"
|
||||||
|
width="80%" maxlength="7" constraint="no empty" />
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('editarTramosController.labelEmpresa.value')}" />
|
<label
|
||||||
<combobox id="cmbEmpresa" constraint="no empty" mold="rounded" buttonVisible="true"
|
value="${c:l('editarTramosController.labelEmpresa.value')}" />
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" model="@{winEditarTramos$composer.lsEmpresa}" width="80%" />
|
<combobox id="cmbEmpresa"
|
||||||
|
constraint="no empty" mold="rounded" buttonVisible="true"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||||
|
model="@{winEditarTramos$composer.lsEmpresa}" width="80%" />
|
||||||
</row>
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
|
@ -320,6 +327,94 @@
|
||||||
</listhead>
|
</listhead>
|
||||||
</listbox>
|
</listbox>
|
||||||
</tabpanel>
|
</tabpanel>
|
||||||
|
<!-- Coeficientes -->
|
||||||
|
<tabpanel height="300px">
|
||||||
|
<grid>
|
||||||
|
<columns>
|
||||||
|
<column width="40%" />
|
||||||
|
<column width="60%" />
|
||||||
|
<column width="40%" />
|
||||||
|
<column width="60%" />
|
||||||
|
</columns>
|
||||||
|
<rows>
|
||||||
|
<row>
|
||||||
|
<label
|
||||||
|
value="${c:l('editarTramosController.labelCoeficiente1.value')}" />
|
||||||
|
<combobox id="cmbCoeficiente1"
|
||||||
|
mold="rounded" buttonVisible="true" width="90%"
|
||||||
|
model="@{winEditarTramos$composer.lsCoeficienteTarifas}"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" />
|
||||||
|
|
||||||
|
<label
|
||||||
|
value="${c:l('editarTramosController.labelKMCoeficiente1.value')}" />
|
||||||
|
<intbox id="txtKMCoeficiente1" />
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<label
|
||||||
|
value="${c:l('editarTramosController.labelCoeficiente2.value')}" />
|
||||||
|
<combobox id="cmbCoeficiente2"
|
||||||
|
mold="rounded" buttonVisible="true" width="90%"
|
||||||
|
model="@{winEditarTramos$composer.lsCoeficienteTarifas}"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" />
|
||||||
|
|
||||||
|
<label
|
||||||
|
value="${c:l('editarTramosController.labelKMCoeficiente2.value')}" />
|
||||||
|
<intbox id="txtKMCoeficiente2" />
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<label
|
||||||
|
value="${c:l('editarTramosController.labelCoeficiente3.value')}" />
|
||||||
|
<combobox id="cmbCoeficiente3"
|
||||||
|
mold="rounded" buttonVisible="true" width="90%"
|
||||||
|
model="@{winEditarTramos$composer.lsCoeficienteTarifas}"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" />
|
||||||
|
|
||||||
|
<label
|
||||||
|
value="${c:l('editarTramosController.labelKMCoeficiente3.value')}" />
|
||||||
|
<intbox id="txtKMCoeficiente3" />
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<label
|
||||||
|
value="${c:l('editarTramosController.labelOrgaoConcedente.value')}" />
|
||||||
|
<combobox id="cmbOrgaoConcedente"
|
||||||
|
mold="rounded" buttonVisible="true" width="90%"
|
||||||
|
model="@{winEditarTramos$composer.lsOrgaoConcedentes}"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" />
|
||||||
|
</row>
|
||||||
|
</rows>
|
||||||
|
</grid>
|
||||||
|
<toolbar>
|
||||||
|
<hbox spacing="5px" style="padding:1px"
|
||||||
|
align="right">
|
||||||
|
<button id="btnApagarCoeficiente"
|
||||||
|
height="20" image="/gui/img/remove.png" width="35px"
|
||||||
|
tooltiptext="${c:l('editarTramosController.btnApagarCoeficiente.tooltiptext')}" />
|
||||||
|
<button id="btnSalvarCoeficiente"
|
||||||
|
height="20" image="/gui/img/add.png" width="35px"
|
||||||
|
tooltiptext="${c:l('editarTramosController.btnSalvarCoeficiente.tooltiptext')}" />
|
||||||
|
</hbox>
|
||||||
|
</toolbar>
|
||||||
|
<listbox id="tramoCoeficientesList"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||||
|
multiple="false">
|
||||||
|
<listhead sizable="true">
|
||||||
|
<listheader image="/gui/img/builder.gif"
|
||||||
|
label="${c:l('editarTramosController.labelCoeficiente1.value')}" />
|
||||||
|
<listheader image="/gui/img/builder.gif"
|
||||||
|
label="${c:l('editarTramosController.labelKMCoeficiente1.value')}" />
|
||||||
|
<listheader image="/gui/img/builder.gif"
|
||||||
|
label="${c:l('editarTramosController.labelCoeficiente2.value')}" />
|
||||||
|
<listheader image="/gui/img/builder.gif"
|
||||||
|
label="${c:l('editarTramosController.labelKMCoeficiente2.value')}" />
|
||||||
|
<listheader image="/gui/img/builder.gif"
|
||||||
|
label="${c:l('editarTramosController.labelCoeficiente3.value')}" />
|
||||||
|
<listheader image="/gui/img/builder.gif"
|
||||||
|
label="${c:l('editarTramosController.labelKMCoeficiente3.value')}" />
|
||||||
|
<listheader image="/gui/img/builder.gif"
|
||||||
|
label="${c:l('editarTramosController.labelOrgaoConcedente.value')}" />
|
||||||
|
</listhead>
|
||||||
|
</listbox>
|
||||||
|
</tabpanel>
|
||||||
</tabpanels>
|
</tabpanels>
|
||||||
</tabbox>
|
</tabbox>
|
||||||
</window>
|
</window>
|
||||||
|
|
Loading…
Reference in New Issue