git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@20778 d1611594-4594-4d17-8e1d-87c2c4800839
parent
e0bbf101d0
commit
5d6a73688e
|
@ -20,8 +20,10 @@ import org.zkoss.zul.Messagebox;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||||
|
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
||||||
import com.rjconsultores.ventaboletos.service.OrgaoConcedenteService;
|
import com.rjconsultores.ventaboletos.service.OrgaoConcedenteService;
|
||||||
import com.rjconsultores.ventaboletos.service.RutaService;
|
import com.rjconsultores.ventaboletos.service.RutaService;
|
||||||
|
import com.rjconsultores.ventaboletos.service.SeguroService;
|
||||||
import com.rjconsultores.ventaboletos.service.TarifaOficialService;
|
import com.rjconsultores.ventaboletos.service.TarifaOficialService;
|
||||||
import com.rjconsultores.ventaboletos.service.TaxaEmbarqueService;
|
import com.rjconsultores.ventaboletos.service.TaxaEmbarqueService;
|
||||||
import com.rjconsultores.ventaboletos.service.VigenciaTarifaService;
|
import com.rjconsultores.ventaboletos.service.VigenciaTarifaService;
|
||||||
|
@ -47,6 +49,8 @@ public class GenerarTarifaOrgaoController extends MyGenericForwardComposer {
|
||||||
private OrgaoConcedenteService orgaoConcedenteService;
|
private OrgaoConcedenteService orgaoConcedenteService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private TaxaEmbarqueService taxaEmbarqueService;
|
private TaxaEmbarqueService taxaEmbarqueService;
|
||||||
|
@Autowired
|
||||||
|
private SeguroService seguroService;
|
||||||
private List<Ruta> lsRuta;
|
private List<Ruta> lsRuta;
|
||||||
private List<OrgaoConcedente> lsOrgaoConcedente;
|
private List<OrgaoConcedente> lsOrgaoConcedente;
|
||||||
private Combobox cmbRuta;
|
private Combobox cmbRuta;
|
||||||
|
@ -69,7 +73,6 @@ public class GenerarTarifaOrgaoController extends MyGenericForwardComposer {
|
||||||
public void onClick$btnGenerarVigencia(Event ev) throws InterruptedException {
|
public void onClick$btnGenerarVigencia(Event ev) throws InterruptedException {
|
||||||
cmbOrgaoConcedente.getValue();
|
cmbOrgaoConcedente.getValue();
|
||||||
|
|
||||||
|
|
||||||
Integer rutaId = null;
|
Integer rutaId = null;
|
||||||
Integer orgaoConcedenteId = null;
|
Integer orgaoConcedenteId = null;
|
||||||
|
|
||||||
|
@ -81,7 +84,7 @@ public class GenerarTarifaOrgaoController extends MyGenericForwardComposer {
|
||||||
orgaoConcedenteId = ((OrgaoConcedente) cmbOrgaoConcedente.getSelectedItem().getValue()).getOrgaoConcedenteId();
|
orgaoConcedenteId = ((OrgaoConcedente) cmbOrgaoConcedente.getSelectedItem().getValue()).getOrgaoConcedenteId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
if (chkTarifa.isChecked()) {
|
if (chkTarifa.isChecked()) {
|
||||||
tarifaOficialService.gerarAtualizarTarifaPorCoeficiente(rutaId, orgaoConcedenteId);
|
tarifaOficialService.gerarAtualizarTarifaPorCoeficiente(rutaId, orgaoConcedenteId);
|
||||||
}
|
}
|
||||||
|
@ -90,9 +93,19 @@ public class GenerarTarifaOrgaoController extends MyGenericForwardComposer {
|
||||||
taxaEmbarqueService.atualizarTaxaEmbarque(rutaId, orgaoConcedenteId);
|
taxaEmbarqueService.atualizarTaxaEmbarque(rutaId, orgaoConcedenteId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (chkSeguro.isChecked()) {
|
||||||
|
seguroService.atualizarSeguroPorKm(rutaId, orgaoConcedenteId);
|
||||||
|
}
|
||||||
|
|
||||||
Messagebox.show(Labels.getLabel("generarTarifaOrgaoController.MSG.suscribirOK"),
|
Messagebox.show(Labels.getLabel("generarTarifaOrgaoController.MSG.suscribirOK"),
|
||||||
Labels.getLabel("indexController.mniGenerarTarifaOrgao.label"),
|
Labels.getLabel("indexController.mniGenerarTarifaOrgao.label"),
|
||||||
Messagebox.OK, Messagebox.INFORMATION);
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
|
||||||
|
} catch (BusinessException e) {
|
||||||
|
Messagebox.show(e.getLocalizedMessage(),
|
||||||
|
Labels.getLabel("indexController.mniGenerarTarifaOrgao.label"),
|
||||||
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Ruta> getLsRuta() {
|
public List<Ruta> getLsRuta() {
|
||||||
|
|
Loading…
Reference in New Issue