- 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-87c2c4800839
master
gleimar 2013-11-20 17:34:55 +00:00
parent 9638dac7c8
commit 739fe0198a
4 changed files with 27 additions and 23 deletions

View File

@ -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();
} }
} }

View File

@ -4521,4 +4521,7 @@ editarConexionConfController.MSG.desativarOK = Conexión se desactivó exitosame
editarConexionConfController.MSG.ativarOK = Conexión se activo exitosamente. 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

View File

@ -4573,4 +4573,6 @@ editarConexionConfController.MSG.desativarOK = Conexão desativada com sucesso.
editarConexionConfController.MSG.ativarOK = Conexao ativada com sucesso. 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

View File

@ -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}" />