|
|
@ -52,54 +52,54 @@ public class GuardarSolicitudService { |
|
|
|
|
|
|
|
logger.info(procedureCall); |
|
|
|
|
|
|
|
jdbcTemplate.execute((Connection connection) -> { |
|
|
|
try (CallableStatement callableStatement = connection.prepareCall(procedureCall)) { |
|
|
|
// Asignar los parámetros de manera correcta |
|
|
|
jdbcTemplate.execute((Connection connection) -> { |
|
|
|
try (CallableStatement callableStatement = connection.prepareCall(procedureCall)) { |
|
|
|
// Asignar los parámetros de manera correcta |
|
|
|
|
|
|
|
/* |
|
|
|
logger.info("p_Predio: "+pPredioID); |
|
|
|
logger.info("p_Detdesc: "+pDetDesc); |
|
|
|
callableStatement.setLong("p_Predio", pPredioID); // ID del predio |
|
|
|
callableStatement.setString("p_Tipo", pTiposolicitud); // Tipo de solicitud |
|
|
|
callableStatement.setString("p_Solicitante", pNombreSolicitante); // Solicitante |
|
|
|
callableStatement.setString("p_Detdesc", pDetDesc); // Detalles de descuento |
|
|
|
*/ |
|
|
|
|
|
|
|
/* |
|
|
|
callableStatement.setLong(1, predioId); // ID del predio |
|
|
|
callableStatement.setString(2, tipoSolicitud); // Tipo de solicitud |
|
|
|
callableStatement.setString(3, nombreSolicitante); // Solicitante |
|
|
|
callableStatement.setString(4, parentesco); // Parentesco |
|
|
|
callableStatement.setString(5, tipoIdentificacion); // Tipo de identificación |
|
|
|
callableStatement.setString(6, numIdentificacion); // Número de identificación |
|
|
|
callableStatement.setString(7, firma); // Firma digital |
|
|
|
callableStatement.setString(8, usuarioId); // Usuario ID |
|
|
|
callableStatement.setString(9, email); // Correo electrónico |
|
|
|
callableStatement.setString(10, "31/12/" + LocalDate.now().getYear() + " 23:59:59"); // Fecha de vigencia |
|
|
|
callableStatement.setString(11, estado); // Estado |
|
|
|
callableStatement.setString(12, detdesc); // Detalles de descuento |
|
|
|
callableStatement.setString(13, detCalif); // Detalles de cálculos // Detalles de cálculos |
|
|
|
*/ |
|
|
|
/* |
|
|
|
logger.info("p_Predio: "+pPredioID); |
|
|
|
logger.info("p_Detdesc: "+pDetDesc); |
|
|
|
callableStatement.setLong("p_Predio", pPredioID); // ID del predio |
|
|
|
callableStatement.setString("p_Tipo", pTiposolicitud); // Tipo de solicitud |
|
|
|
callableStatement.setString("p_Solicitante", pNombreSolicitante); // Solicitante |
|
|
|
callableStatement.setString("p_Detdesc", pDetDesc); // Detalles de descuento |
|
|
|
*/ |
|
|
|
|
|
|
|
/* |
|
|
|
callableStatement.setLong(1, predioId); // ID del predio |
|
|
|
callableStatement.setString(2, tipoSolicitud); // Tipo de solicitud |
|
|
|
callableStatement.setString(3, nombreSolicitante); // Solicitante |
|
|
|
callableStatement.setString(4, parentesco); // Parentesco |
|
|
|
callableStatement.setString(5, tipoIdentificacion); // Tipo de identificación |
|
|
|
callableStatement.setString(6, numIdentificacion); // Número de identificación |
|
|
|
callableStatement.setString(7, firma); // Firma digital |
|
|
|
callableStatement.setString(8, usuarioId); // Usuario ID |
|
|
|
callableStatement.setString(9, email); // Correo electrónico |
|
|
|
callableStatement.setString(10, "31/12/" + LocalDate.now().getYear() + " 23:59:59"); // Fecha de vigencia |
|
|
|
callableStatement.setString(11, estado); // Estado |
|
|
|
callableStatement.setString(12, detdesc); // Detalles de descuento |
|
|
|
callableStatement.setString(13, detCalif); // Detalles de cálculos // Detalles de cálculos |
|
|
|
*/ |
|
|
|
|
|
|
|
callableStatement.execute(); |
|
|
|
return true; |
|
|
|
callableStatement.execute(); |
|
|
|
return true; |
|
|
|
|
|
|
|
} catch (SQLException e) { |
|
|
|
//e.printStackTrace(); |
|
|
|
Notification notify; |
|
|
|
notify=new Notification(); |
|
|
|
Notification.show("Error al Guardar:"+e.getMessage()); |
|
|
|
return false; |
|
|
|
} |
|
|
|
catch (Exception e) { |
|
|
|
//e.printStackTrace(); |
|
|
|
Notification notify; |
|
|
|
notify=new Notification(); |
|
|
|
Notification.show("Error al Guardar:"+e.getMessage()); |
|
|
|
return false; |
|
|
|
} |
|
|
|
}); |
|
|
|
} catch (SQLException e) { |
|
|
|
//e.printStackTrace(); |
|
|
|
Notification notify; |
|
|
|
notify=new Notification(); |
|
|
|
Notification.show("Error al Guardar:"+e.getMessage()); |
|
|
|
return false; |
|
|
|
} |
|
|
|
catch (Exception e) { |
|
|
|
//e.printStackTrace(); |
|
|
|
Notification notify; |
|
|
|
notify=new Notification(); |
|
|
|
Notification.show("Error al Guardar:"+e.getMessage()); |
|
|
|
return false; |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |