PRICING - Ocupação | Antecipação (bug #5836)
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@44146 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
6bc62251b8
commit
b2438f78e4
|
@ -21,7 +21,6 @@ import org.zkoss.zul.Radio;
|
||||||
|
|
||||||
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;
|
||||||
|
@ -123,20 +122,8 @@ public class EditarPricingOcupaAntecipaAutomaticoController extends MyGenericFor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// private void apagarRegistros() throws BusinessException {
|
|
||||||
// for (PricingOcupaAntecipa poa : argList) {
|
|
||||||
// if ((poa.getOcupacioninicial() != null && poa.getOcupacioninicial().doubleValue() > 0) || (poa.getCantasientosmin() != null && poa.getCantasientosmin().intValue() > 0)) {
|
|
||||||
// pricingOcupaAntecipaService.borrar(poa);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
public void onClick$btnAdicionarOcupaAntecipa(Event ev) throws Exception {
|
public void onClick$btnAdicionarOcupaAntecipa(Event ev) throws Exception {
|
||||||
// List<PricingOcupaAntecipa> parentList = new ArrayList<PricingOcupaAntecipa>();
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// calculaCantDiasMax();
|
|
||||||
// apagarRegistros();
|
|
||||||
|
|
||||||
for (PricingOcupaAntecipa poa : novaListaPricingOcupaAntecipa) {
|
for (PricingOcupaAntecipa poa : novaListaPricingOcupaAntecipa) {
|
||||||
|
|
||||||
|
@ -145,36 +132,8 @@ public class EditarPricingOcupaAntecipaAutomaticoController extends MyGenericFor
|
||||||
} else {
|
} else {
|
||||||
pricingOcupaAntecipaService.actualizacion(poa);
|
pricingOcupaAntecipaService.actualizacion(poa);
|
||||||
}
|
}
|
||||||
|
|
||||||
// lsPricingOcupaAntecipa.add(poa);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// for (int i = 0; i < lsPricingOcupaAntecipa.size(); i++) {
|
|
||||||
// // lsPricingOcupaAntecipa.get(i).setOcupacioninicial(new BigDecimal(0));
|
|
||||||
// if (lsPricingOcupaAntecipa.get(i).getPricingocupaantecipaId() == null) {
|
|
||||||
// pricingOcupaAntecipaService.suscribir(lsPricingOcupaAntecipa.get(i));
|
|
||||||
// } else {
|
|
||||||
// pricingOcupaAntecipaService.actualizacion(lsPricingOcupaAntecipa.get(i));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // parentList.add(lsPricingOcupaAntecipa.get(i));
|
|
||||||
//
|
|
||||||
// for (int j = i + 1; j < lsPricingOcupaAntecipa.size(); j++) {
|
|
||||||
// PricingOcupaAntecipa p = new PricingOcupaAntecipa();
|
|
||||||
// p.setPricingocupaantecipaId(lsPricingOcupaAntecipa.get(j).getPricingocupaantecipaId());
|
|
||||||
// p.setCantasientosmax(lsPricingOcupaAntecipa.get(j).getCantasientosmax());
|
|
||||||
// p.setCantasientosmin(lsPricingOcupaAntecipa.get(j).getCantasientosmin());
|
|
||||||
// p.setCantdiasmax(lsPricingOcupaAntecipa.get(i).getCantdiasmax());
|
|
||||||
// p.setCantdiasmin(lsPricingOcupaAntecipa.get(i).getCantdiasmin());
|
|
||||||
// p.setOcupacionfinal(lsPricingOcupaAntecipa.get(j).getOcupacionfinal());
|
|
||||||
// p.setOcupacioninicial(lsPricingOcupaAntecipa.get(j).getOcupacioninicial());
|
|
||||||
// p.setPorcentaje(lsPricingOcupaAntecipa.get(j).getPorcentaje());
|
|
||||||
// p.setPricing(pricing);
|
|
||||||
// pricingOcupaAntecipaService.suscribir(p);
|
|
||||||
// parentList.add(p);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
parentPricingOcupaAntecipaList.setData(lsPricingOcupaAntecipa);
|
parentPricingOcupaAntecipaList.setData(lsPricingOcupaAntecipa);
|
||||||
closeWindow();
|
closeWindow();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -195,21 +154,6 @@ public class EditarPricingOcupaAntecipaAutomaticoController extends MyGenericFor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// private void calculaCantDiasMax() {
|
|
||||||
// Collections.sort(lsPricingOcupaAntecipa, Collections.reverseOrder(new PricingOcupaAntecipaComparator()));
|
|
||||||
// PricingOcupaAntecipa poa;
|
|
||||||
// int cantDiasMinAnterior = lsPricingOcupaAntecipa.get(0).getCantdiasmin();
|
|
||||||
// for (int i = 0; i < lsPricingOcupaAntecipa.size(); i++) {
|
|
||||||
// poa = lsPricingOcupaAntecipa.get(i);
|
|
||||||
// if (i == 0) {
|
|
||||||
// poa.setCantdiasmax(CANTDIASMAXDEFAULT);
|
|
||||||
// } else {
|
|
||||||
// poa.setCantdiasmax(cantDiasMinAnterior - 1);
|
|
||||||
// cantDiasMinAnterior = poa.getCantdiasmin();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
public void onClick$btnlancar(Event ev) throws Exception {
|
public void onClick$btnlancar(Event ev) throws Exception {
|
||||||
PricingOcupaAntecipa poa = new PricingOcupaAntecipa();
|
PricingOcupaAntecipa poa = new PricingOcupaAntecipa();
|
||||||
poa.setPricing(pricing);
|
poa.setPricing(pricing);
|
||||||
|
|
Loading…
Reference in New Issue