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.Ruta;
|
||||
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
||||
import com.rjconsultores.ventaboletos.service.OrgaoConcedenteService;
|
||||
import com.rjconsultores.ventaboletos.service.RutaService;
|
||||
import com.rjconsultores.ventaboletos.service.SeguroService;
|
||||
import com.rjconsultores.ventaboletos.service.TarifaOficialService;
|
||||
import com.rjconsultores.ventaboletos.service.TaxaEmbarqueService;
|
||||
import com.rjconsultores.ventaboletos.service.VigenciaTarifaService;
|
||||
|
@ -47,6 +49,8 @@ public class GenerarTarifaOrgaoController extends MyGenericForwardComposer {
|
|||
private OrgaoConcedenteService orgaoConcedenteService;
|
||||
@Autowired
|
||||
private TaxaEmbarqueService taxaEmbarqueService;
|
||||
@Autowired
|
||||
private SeguroService seguroService;
|
||||
private List<Ruta> lsRuta;
|
||||
private List<OrgaoConcedente> lsOrgaoConcedente;
|
||||
private Combobox cmbRuta;
|
||||
|
@ -69,7 +73,6 @@ public class GenerarTarifaOrgaoController extends MyGenericForwardComposer {
|
|||
public void onClick$btnGenerarVigencia(Event ev) throws InterruptedException {
|
||||
cmbOrgaoConcedente.getValue();
|
||||
|
||||
|
||||
Integer rutaId = null;
|
||||
Integer orgaoConcedenteId = null;
|
||||
|
||||
|
@ -81,7 +84,7 @@ public class GenerarTarifaOrgaoController extends MyGenericForwardComposer {
|
|||
orgaoConcedenteId = ((OrgaoConcedente) cmbOrgaoConcedente.getSelectedItem().getValue()).getOrgaoConcedenteId();
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
if (chkTarifa.isChecked()) {
|
||||
tarifaOficialService.gerarAtualizarTarifaPorCoeficiente(rutaId, orgaoConcedenteId);
|
||||
}
|
||||
|
@ -90,9 +93,19 @@ public class GenerarTarifaOrgaoController extends MyGenericForwardComposer {
|
|||
taxaEmbarqueService.atualizarTaxaEmbarque(rutaId, orgaoConcedenteId);
|
||||
}
|
||||
|
||||
if (chkSeguro.isChecked()) {
|
||||
seguroService.atualizarSeguroPorKm(rutaId, orgaoConcedenteId);
|
||||
}
|
||||
|
||||
Messagebox.show(Labels.getLabel("generarTarifaOrgaoController.MSG.suscribirOK"),
|
||||
Labels.getLabel("indexController.mniGenerarTarifaOrgao.label"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
|
||||
} catch (BusinessException e) {
|
||||
Messagebox.show(e.getLocalizedMessage(),
|
||||
Labels.getLabel("indexController.mniGenerarTarifaOrgao.label"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
}
|
||||
|
||||
public List<Ruta> getLsRuta() {
|
||||
|
|
Loading…
Reference in New Issue