- ajuste: validação de traslapa no pricing ocupação
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@32129 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
9638dac7c8
commit
739fe0198a
|
@ -1,7 +1,6 @@
|
||||||
package com.rjconsultores.ventaboletos.web.gui.controladores.pricing;
|
package com.rjconsultores.ventaboletos.web.gui.controladores.pricing;
|
||||||
|
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
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;
|
||||||
|
@ -16,6 +15,7 @@ import org.zkoss.zul.Intbox;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.Pricing;
|
import com.rjconsultores.ventaboletos.entidad.Pricing;
|
||||||
import com.rjconsultores.ventaboletos.entidad.PricingOcupaAntecipa;
|
import com.rjconsultores.ventaboletos.entidad.PricingOcupaAntecipa;
|
||||||
|
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
||||||
import com.rjconsultores.ventaboletos.service.PricingOcupaAntecipaService;
|
import com.rjconsultores.ventaboletos.service.PricingOcupaAntecipaService;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.ConstraintPorcentagem;
|
import com.rjconsultores.ventaboletos.web.utilerias.ConstraintPorcentagem;
|
||||||
|
@ -68,21 +68,20 @@ public class EditarPricingOcupaAntecipaController extends MyGenericForwardCompos
|
||||||
Labels.getLabel("editarPricingController.windowOcupacion.title"),
|
Labels.getLabel("editarPricingController.windowOcupacion.title"),
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
} else {
|
} else {
|
||||||
|
try {
|
||||||
List<PricingOcupaAntecipa> lsPricingOcupacion = pricingOcupaAntecipaService.obtenerPorPricing(pricingOcupaAntecipa.getPricing());
|
if (pricingOcupaAntecipa.getPricingocupaantecipaId() != null) {
|
||||||
|
pricingOcupaAntecipaService.actualizacion(pricingOcupaAntecipa);
|
||||||
if (pricingOcupaAntecipa != null) {
|
pricingOcupaAntecipaList.updateItem(pricingOcupaAntecipa);
|
||||||
lsPricingOcupacion.remove(pricingOcupaAntecipa);
|
} else {
|
||||||
|
pricingOcupaAntecipaService.suscribir(pricingOcupaAntecipa);
|
||||||
|
pricingOcupaAntecipaList.addItemNovo(pricingOcupaAntecipa);
|
||||||
|
}
|
||||||
|
closeWindow();
|
||||||
|
} catch (BusinessException e) {
|
||||||
|
Messagebox.show(e.getLocalizedMessage(),
|
||||||
|
Labels.getLabel("editarPricingController.windowOcupacion.title"),
|
||||||
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pricingOcupaAntecipa.getPricingocupaantecipaId() != null) {
|
|
||||||
pricingOcupaAntecipaService.actualizacion(pricingOcupaAntecipa);
|
|
||||||
pricingOcupaAntecipaList.updateItem(pricingOcupaAntecipa);
|
|
||||||
} else {
|
|
||||||
pricingOcupaAntecipaService.suscribir(pricingOcupaAntecipa);
|
|
||||||
pricingOcupaAntecipaList.addItemNovo(pricingOcupaAntecipa);
|
|
||||||
}
|
|
||||||
closeWindow();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4522,3 +4522,6 @@ editarConexionConfController.MSG.ativarOK = Conexión se activo exitosamente.
|
||||||
|
|
||||||
#atualizaCorridaFecHusoFecVerano
|
#atualizaCorridaFecHusoFecVerano
|
||||||
atualizaCorridaFecHusoFecVerano.numcorrida=Servicio
|
atualizaCorridaFecHusoFecVerano.numcorrida=Servicio
|
||||||
|
|
||||||
|
|
||||||
|
PricingOcupaAntecipaServiceImpl.msg.traslapa=El registro se traslapa con uno que ya existe
|
|
@ -4574,3 +4574,5 @@ editarConexionConfController.MSG.ativarOK = Conexao ativada com sucesso.
|
||||||
|
|
||||||
#atualizaCorridaFecHusoFecVerano
|
#atualizaCorridaFecHusoFecVerano
|
||||||
atualizaCorridaFecHusoFecVerano.numcorrida=Serviço
|
atualizaCorridaFecHusoFecVerano.numcorrida=Serviço
|
||||||
|
|
||||||
|
PricingOcupaAntecipaServiceImpl.msg.traslapa=O registro informado se sobrepõe a um existente
|
|
@ -22,10 +22,10 @@
|
||||||
|
|
||||||
<grid fixedLayout="true">
|
<grid fixedLayout="true">
|
||||||
<columns>
|
<columns>
|
||||||
<column width="40%" />
|
<column width="45%" />
|
||||||
<column width="60%" />
|
<column width="55%" />
|
||||||
<column width="40%" />
|
<column width="45%" />
|
||||||
<column width="60%" />
|
<column width="55%" />
|
||||||
</columns>
|
</columns>
|
||||||
<rows>
|
<rows>
|
||||||
<row>
|
<row>
|
||||||
|
@ -53,13 +53,13 @@
|
||||||
<label
|
<label
|
||||||
value="${c:l('editarPricingController.porcentaje.value')}" />
|
value="${c:l('editarPricingController.porcentaje.value')}" />
|
||||||
|
|
||||||
<textbox id="porcentaje" precision="7" scale="2"
|
<textbox id="porcentaje" precision="7" scale="2" width="80%"
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal"
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal"
|
||||||
value="@{winEditarPricingOcupaAntecipa$composer.pricingOcupaAntecipa.porcentaje,
|
value="@{winEditarPricingOcupaAntecipa$composer.pricingOcupaAntecipa.porcentaje,
|
||||||
converter=com.rjconsultores.ventaboletos.web.utilerias.StringDecimalToDecimalConverter}" />
|
converter=com.rjconsultores.ventaboletos.web.utilerias.StringDecimalToDecimalConverter}" />
|
||||||
<label
|
<label
|
||||||
value="${c:l('editarPricingController.importe.value')}" />
|
value="${c:l('editarPricingController.importe.value')}" />
|
||||||
<textbox id="importe" precision="7" scale="2"
|
<textbox id="importe" precision="7" scale="2" width="80%"
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal"
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal"
|
||||||
value="@{winEditarPricingOcupaAntecipa$composer.pricingOcupaAntecipa.importe,
|
value="@{winEditarPricingOcupaAntecipa$composer.pricingOcupaAntecipa.importe,
|
||||||
converter=com.rjconsultores.ventaboletos.web.utilerias.StringDecimalToDecimalConverter}" />
|
converter=com.rjconsultores.ventaboletos.web.utilerias.StringDecimalToDecimalConverter}" />
|
||||||
|
|
Loading…
Reference in New Issue