0004800: Quilometragem - Mudar para decimal

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@33663 d1611594-4594-4d17-8e1d-87c2c4800839
master
julio 2014-02-14 19:25:29 +00:00
parent 0073ccfa19
commit cce20f0326
2 changed files with 121 additions and 126 deletions

View File

@ -119,7 +119,7 @@ public class EditarTramosController extends MyGenericForwardComposer {
private Combobox cmbCoeficiente3; private Combobox cmbCoeficiente3;
private Combobox cmbOrgaoConcedente; private Combobox cmbOrgaoConcedente;
private Combobox cmbClaseServicioCoeficiente; private Combobox cmbClaseServicioCoeficiente;
private Textbox txKmReal; private MyTextboxDecimal txKmReal;
private Textbox txtNome; private Textbox txtNome;
private Intbox itxCantkmpagoconductor; private Intbox itxCantkmpagoconductor;
private MyTextboxDecimal txtKMCoeficiente1; private MyTextboxDecimal txtKMCoeficiente1;
@ -145,108 +145,6 @@ public class EditarTramosController extends MyGenericForwardComposer {
private boolean existeRutaOcupaTramo; private boolean existeRutaOcupaTramo;
public Tramo getTramo() {
return tramo;
}
public void setTramo(Tramo tramo) {
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;
}
private void generarDescripcionTramo() {
cmbParadaOrigem.getValue(true);
cmbParadaDestino.getValue(true);
cmbVia.getValue();
Via via = (Via) cmbVia.getSelectedItem().getValue();
txtNome.setText(tramoService.gerarDescripcionTramo(tramo.getOrigem(), tramo.getDestino(), via));
}
public void onSelect$cmbParadaOrigem() {
generarDescripcionTramo();
}
public void onSelect$cmbParadaDestino() {
generarDescripcionTramo();
}
public void onSelect$cmbVia() {
generarDescripcionTramo();
}
@Override @Override
public void doAfterCompose(Component comp) throws Exception { public void doAfterCompose(Component comp) throws Exception {
existeRutaOcupaTramo = false; existeRutaOcupaTramo = false;
@ -306,12 +204,12 @@ public class EditarTramosController extends MyGenericForwardComposer {
txKmReal.setConstraint(constraintTarifa); txKmReal.setConstraint(constraintTarifa);
tabExcepcionesKm.setVisible(ApplicationProperties.getInstance().exhibirExcepcionesTramoKm()); tabExcepcionesKm.setVisible(ApplicationProperties.getInstance().exhibirExcepcionesTramoKm());
aplicarMascaras(); // aplicarMascaras();
} }
private void aplicarMascaras() { // private void aplicarMascaras() {
Clients.evalJavaScript("jQuery('#" + txKmReal.getUuid() + "').format({allow_negative:false,precision: 2,decimal:',',autofix:true});"); // Clients.evalJavaScript("jQuery('#" + txKmReal.getUuid() + "').format({allow_negative:false,precision: 2,decimal:',',autofix:true});");
} // }
public void onClick$btnSalvarServicio(Event ev) throws InterruptedException { public void onClick$btnSalvarServicio(Event ev) throws InterruptedException {
spHora.getValue(); spHora.getValue();
@ -538,7 +436,6 @@ public class EditarTramosController extends MyGenericForwardComposer {
} }
public void onClick$btnSalvar(Event ev) throws InterruptedException { public void onClick$btnSalvar(Event ev) throws InterruptedException {
txKmReal.getValue();
cmbParadaOrigem.getValue(true); cmbParadaOrigem.getValue(true);
cmbParadaDestino.getValue(true); cmbParadaDestino.getValue(true);
@ -552,6 +449,9 @@ public class EditarTramosController extends MyGenericForwardComposer {
try { try {
tramo.setVia((Via) cmbVia.getSelectedItem().getValue()); tramo.setVia((Via) cmbVia.getSelectedItem().getValue());
BigDecimal kmReal = txKmReal.getValueDecimal();
tramo.setKmReal(kmReal);
tramo.setLsOrgaoTramo(lsOrgamoTramo); tramo.setLsOrgaoTramo(lsOrgamoTramo);
tramo.setLsTramoTiempo(listaTramosTiempo); tramo.setLsTramoTiempo(listaTramosTiempo);
tramo.setTramoServicioList(listaTramoServicio); tramo.setTramoServicioList(listaTramoServicio);
@ -738,4 +638,106 @@ public class EditarTramosController extends MyGenericForwardComposer {
return existeRutaOcupaTramo; return existeRutaOcupaTramo;
} }
public Tramo getTramo() {
return tramo;
}
public void setTramo(Tramo tramo) {
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;
}
private void generarDescripcionTramo() {
cmbParadaOrigem.getValue(true);
cmbParadaDestino.getValue(true);
cmbVia.getValue();
Via via = (Via) cmbVia.getSelectedItem().getValue();
txtNome.setText(tramoService.gerarDescripcionTramo(tramo.getOrigem(), tramo.getDestino(), via));
}
public void onSelect$cmbParadaOrigem() {
generarDescripcionTramo();
}
public void onSelect$cmbParadaDestino() {
generarDescripcionTramo();
}
public void onSelect$cmbVia() {
generarDescripcionTramo();
}
} }

View File

@ -88,22 +88,14 @@
model="@{winEditarTramos$composer.lsVias}" model="@{winEditarTramos$composer.lsVias}"
selectedItem="@{winEditarTramos$composer.tramo.via}" /> selectedItem="@{winEditarTramos$composer.tramo.via}" />
</row> </row>
<!--row>
<label id="lbKmReal" value="${c:l('editarTramosController.lbKmReal.value')}"/>
<intbox id="txKmReal" constraint="no empty, no negative" width="80%" maxlength="5"
value="@{winEditarTramos$composer.tramo.kmReal}"/>
</row>
<row>
<label id="lbKmPagoConductor" value="${c:l('editarTramosController.lbKmPagoConductor.value')}"/>
<intbox id="txtKmPagoConductor" constraint="no empty, no negative" format="#0.00" maxlength="7"
value="@{winEditarTramos$composer.tramo.kmPagoConductor}"/>
</row-->
<row> <row>
<label <label
value="${c:l('editarTramosController.lbKmReal.value')}" /> value="${c:l('editarTramosController.lbKmReal.value')}" />
<textbox id="txKmReal" width="80%" <textbox id="txKmReal" width="80%"
constraint="no empty" maxlength="11" precision="7" scale="2"
value="@{winEditarTramos$composer.tramo.kmReal}" /> constraint="no empty, no zero, no negative"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" />
</row> </row>
</rows> </rows>
</grid> </grid>
@ -348,8 +340,9 @@
<label <label
value="${c:l('editarTramosController.labelKMCoeficiente1.value')}" /> value="${c:l('editarTramosController.labelKMCoeficiente1.value')}" />
<textbox id="txtKMCoeficiente1" <textbox id="txtKMCoeficiente1"
maxlength="7" precision="7" scale="2"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" /> use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" />
</row> </row>
<row spans="1,1,1,1"> <row spans="1,1,1,1">
<label <label
@ -362,8 +355,8 @@
<label <label
value="${c:l('editarTramosController.labelKMCoeficiente2.value')}" /> value="${c:l('editarTramosController.labelKMCoeficiente2.value')}" />
<textbox id="txtKMCoeficiente2" <textbox id="txtKMCoeficiente2"
maxlength="7" precision="7" scale="2"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" /> use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" />
</row> </row>
<row spans="1,1,1,1"> <row spans="1,1,1,1">
<label <label
@ -376,8 +369,8 @@
<label <label
value="${c:l('editarTramosController.labelKMCoeficiente3.value')}" /> value="${c:l('editarTramosController.labelKMCoeficiente3.value')}" />
<textbox id="txtKMCoeficiente3" <textbox id="txtKMCoeficiente3"
maxlength="7" precision="7" scale="2"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" /> use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" />
</row> </row>
<row spans="1,1,1,1"> <row spans="1,1,1,1">
<label <label