update organization type name

This commit is contained in:
Ramon Ramirez 2026-01-13 17:30:00 -04:00
parent dba8884e1b
commit 704cff9d69
13 changed files with 52 additions and 52 deletions

View File

@ -123,7 +123,7 @@ public class MessageHelper {
} }
if (json == null || json.isEmpty()) { if (json == null || json.isEmpty()) {
log.warn("No se encontró JSON de errores"); log.warn("No se encontro JSON de errores");
return createDefaultMappings(); return createDefaultMappings();
} }
@ -138,11 +138,11 @@ public class MessageHelper {
result.put(mapping.getBackendCode(), mapping); result.put(mapping.getBackendCode(), mapping);
} }
} else { } else {
log.warn("Ignorando mapping sin backendCode válido: {}", mapping.getDescription()); log.warn("Ignorando mapping sin backendCode valido: {}", mapping.getDescription());
} }
} }
log.info("Mappings de errores cargados exitosamente, total válidos: {}", result.size()); log.info("Mappings de errores cargados exitosamente, total validos: {}", result.size());
return result; return result;
} catch (Exception e) { } catch (Exception e) {
log.error("Error cargando mappings de errores: {}", e.getMessage()); log.error("Error cargando mappings de errores: {}", e.getMessage());
@ -153,7 +153,7 @@ public class MessageHelper {
private String loadFromJsonFile() { private String loadFromJsonFile() {
try (InputStream is = MessageHelper.class.getClassLoader().getResourceAsStream(ERROR_FILE_PATH)) { try (InputStream is = MessageHelper.class.getClassLoader().getResourceAsStream(ERROR_FILE_PATH)) {
if (is == null) { if (is == null) {
log.warn("No se encontró el archivo de errores: {}", ERROR_FILE_PATH); log.warn("No se encontro el archivo de errores: {}", ERROR_FILE_PATH);
return ""; return "";
} }
return new String(is.readAllBytes()); return new String(is.readAllBytes());
@ -184,7 +184,7 @@ public class MessageHelper {
mapping.setBackendCode(SUCCESS_DEFAULT); mapping.setBackendCode(SUCCESS_DEFAULT);
mapping.setHttpCode(200); mapping.setHttpCode(200);
mapping.setStatusCode("200"); mapping.setStatusCode("200");
mapping.setDescription("Operación exitosa"); mapping.setDescription("Operacion exitosa");
return mapping; return mapping;
} }

View File

@ -15,6 +15,6 @@ import java.util.List;
@RegisterForReflection @RegisterForReflection
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonInclude.Include.NON_NULL)
public class Agreement { public class Agreement {
@Schema(description = "Información del arreglo de la cuenta") @Schema(description = "Informacion del arreglo de la cuenta")
private List<Arrangement> arrangement; private List<Arrangement> arrangement;
} }

View File

@ -13,6 +13,6 @@ import org.eclipse.microprofile.openapi.annotations.media.Schema;
@RegisterForReflection @RegisterForReflection
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonInclude.Include.NON_NULL)
public class Arrangement { public class Arrangement {
@Schema(description = "Información del tipo de arreglo de la cuenta (Si la cuenta corriente tiene interés)") @Schema(description = "Informacion del tipo de arreglo de la cuenta (Si la cuenta corriente tiene interes)")
private ArrangementType arrangementType; private ArrangementType arrangementType;
} }

View File

@ -18,18 +18,18 @@ import java.util.List;
public class Account { public class Account {
@Schema(description = "Estado de la cuenta") @Schema(description = "Estado de la cuenta")
private AccountStatus accountStatus; private AccountStatus accountStatus;
@Schema(description = "Lista de datos de identificación de la cuenta") @Schema(description = "Lista de datos de identificacion de la cuenta")
private List<AccountIdentification> accountIdentification; private List<AccountIdentification> accountIdentification;
@Schema(description = "Tipo de cuenta") @Schema(description = "Tipo de cuenta")
private AccountType accountType; private AccountType accountType;
@Schema(description = "Información de los tipos de balances de la cuenta") @Schema(description = "Informacion de los tipos de balances de la cuenta")
private List<AccountBalance> accountBalance; private List<AccountBalance> accountBalance;
@Schema(description = "Información de la moneda de la cuenta") @Schema(description = "Informacion de la moneda de la cuenta")
private List<AccountCurrency> accountCurrency; private List<AccountCurrency> accountCurrency;
@Schema(description = "Información complementaria de la cuenta") @Schema(description = "Informacion complementaria de la cuenta")
private List<AccountInvolvement> accountInvolvement; private List<AccountInvolvement> accountInvolvement;
@Schema(description = "Información relacional de la cuenta con otras o consigo misma") @Schema(description = "Informacion relacional de la cuenta con otras o consigo misma")
private List<AccountRelationship> accountRelationship; private List<AccountRelationship> accountRelationship;
@Schema(description = "Información del acuerdo de la cuenta") @Schema(description = "Informacion del acuerdo de la cuenta")
private List<Agreement> agreement; private List<Agreement> agreement;
} }

View File

@ -13,6 +13,6 @@ import org.eclipse.microprofile.openapi.annotations.media.Schema;
@RegisterForReflection @RegisterForReflection
public class AccountInvolvement { public class AccountInvolvement {
private AccountInvolvementType accountInvolvementType; private AccountInvolvementType accountInvolvementType;
@Schema(description = "Información del cliente") @Schema(description = "Informacion del cliente")
private Party partyReference; private Party partyReference;
} }

View File

@ -31,18 +31,18 @@ public class LegalCustomerProductDirectoryService implements LegalCustomerProduc
public ApiResponse<LegalCustomerProductDirectoryResponse> execute( public ApiResponse<LegalCustomerProductDirectoryResponse> execute(
LegalCustomerProductDirectoryRequest request LegalCustomerProductDirectoryRequest request
) { ) {
log.info("Iniciando ejecución para el cliente: {}", request.getCustomerIbsNumber()); log.info("Iniciando ejecucion para el cliente: {}", request.getCustomerIbsNumber());
try { try {
return storeProcedure(request); return storeProcedure(request);
} catch (PersistenceException e) { } catch (PersistenceException e) {
log.warn("Excepción de la persistencia del sp: {} -> {}", e.getErrorCode(), e.getMessage()); log.warn("Excepcion de la persistencia del sp: {} -> {}", e.getErrorCode(), e.getMessage());
throw HttpStatusCodeException.badRequest(e.getErrorCode()); throw HttpStatusCodeException.badRequest(e.getErrorCode());
} catch (HttpStatusCodeException e) { } catch (HttpStatusCodeException e) {
log.error("Excepción HTTP del api de dominio: {} - {}", e.getStatusCode(), e.getErrorCode()); log.error("Excepcion HTTP del api de dominio: {} - {}", e.getStatusCode(), e.getErrorCode());
throw e; throw e;
} catch (Exception e) { } catch (Exception e) {
log.error("Excepción genérica del api de dominio: {}", e.getMessage()); log.error("Excepcion generica del api de dominio: {}", e.getMessage());
throw e; throw e;
} }
} }

View File

@ -15,16 +15,16 @@ public class LegalCustomerProductDirectoryRequest {
@NonNull @NonNull
private String appId; // Header obligatorio private String appId; // Header obligatorio
@NonNull @NonNull
private String customerIbsNumber; // VCUSCUN - Obligatorio (Número de cliente IBS) private String customerIbsNumber; // VCUSCUN - Obligatorio (Numero de cliente IBS)
private String bankNumber; // VACMBNK - Número de Banco (filtro) private String bankNumber; // VACMBNK - Numero de Banco (filtro)
private String currencyCode; // VACMCCY - Moneda (filtro) private String currencyCode; // VACMCCY - Moneda (filtro)
private String accountStatus; // VACMAST - Estatus de Cuenta (filtro) private String accountStatus; // VACMAST - Estatus de Cuenta (filtro)
private String productCvCode; // VACMPROCV - Código de Producto Cuenta Verde (filtro) private String productCvCode; // VACMPROCV - Codigo de Producto Cuenta Verde (filtro)
private String productCode; // VACMPRO - Código de Producto (filtro) private String productCode; // VACMPRO - Codigo de Producto (filtro)
private String channelCode; // VAFILICANAL - Código de Canal (filtro) private String channelCode; // VAFILICANAL - Codigo de Canal (filtro)
private String serviceType; // VAFILICOSER - Tipo de Servicio (filtro) private String serviceType; // VAFILICOSER - Tipo de Servicio (filtro)
private String affiliationStatus; // VAFILISTATU - Estatus de afiliación (filtro) private String affiliationStatus; // VAFILISTATU - Estatus de afiliacion (filtro)
private String limitType; // VALIMIT - Pagador/Receptor (PAG/REC) (filtro) private String limitType; // VALIMIT - Pagador/Receptor (PAG/REC) (filtro)
private String casheaIndicator; // VCASHEA - SI/NO (filtro) private String casheaIndicator; // VCASHEA - SI/NO (filtro)
} }

View File

@ -72,7 +72,7 @@ public class AccountMapper {
.fullName(response.getNombre()) .fullName(response.getNombre())
.build() .build()
)) ))
.partyType(PartyType.ORGANISATION) .partyType(PartyType.ORGANIZATION)
.partyIdentification(List.of( .partyIdentification(List.of(
PartyIdentification.builder() PartyIdentification.builder()
.partyIdentificationType(PartyIdentificationType.TAX_IDENTIFICATION_NUMBER) .partyIdentificationType(PartyIdentificationType.TAX_IDENTIFICATION_NUMBER)
@ -236,7 +236,7 @@ public class AccountMapper {
try { try {
return rs.getBigDecimal(columnName); return rs.getBigDecimal(columnName);
} catch (SQLException e) { } catch (SQLException e) {
log.debug("Columna {} no encontrada como numérico, retornando null", columnName); log.debug("Columna {} no encontrada como numerico, retornando null", columnName);
return BigDecimal.valueOf(0.0); return BigDecimal.valueOf(0.0);
} }
} }

View File

@ -54,7 +54,7 @@ public class AccountRepository {
log.info("Iniciando llamada SP: {}", spCall); log.info("Iniciando llamada SP: {}", spCall);
try (Connection conn = dataSource.getConnection()) { try (Connection conn = dataSource.getConnection()) {
log.info("Conexión obtenida exitosamente"); log.info("Conexion obtenida exitosamente");
results = executeStoredProcedure(conn, spCall); results = executeStoredProcedure(conn, spCall);
if ( if (
@ -66,13 +66,13 @@ public class AccountRepository {
throw new PersistenceException("ERROR", results.get(0).getDscError()); throw new PersistenceException("ERROR", results.get(0).getDscError());
} }
} catch (SQLException e) { } catch (SQLException e) {
log.error("Error en conexión o ejecución del SP {}: {}", spCall, e.getMessage()); log.error("Error en conexion o ejecucion del SP {}: {}", spCall, e.getMessage());
throw new PersistenceException("ERROR", e.getMessage()); throw new PersistenceException("ERROR", e.getMessage());
} catch (Exception e) { } catch (Exception e) {
log.error("Error genérico en la ejecución del SP {}: {}", spCall, e.getMessage()); log.error("Error generico en la ejecucion del SP {}: {}", spCall, e.getMessage());
throw new PersistenceException("ERROR", e.getMessage()); throw new PersistenceException("ERROR", e.getMessage());
} finally { } finally {
log.info("SP conexión finalizada"); log.info("SP conexion finalizada");
} }
log.info("SP completado exitosamente, resultados: {}", results.size()); log.info("SP completado exitosamente, resultados: {}", results.size());
@ -108,13 +108,13 @@ public class AccountRepository {
} }
} }
} else { } else {
log.info("SP no devolvió ResultSet"); log.info("SP no devolvio ResultSet");
} }
} catch (SQLException e) { } catch (SQLException e) {
log.error("Error en CallableStatement {}: {}", spCall, e.getMessage()); log.error("Error en CallableStatement {}: {}", spCall, e.getMessage());
throw e; throw e;
} finally { } finally {
log.info("Ejecución del SP finalizado"); log.info("Ejecucion del SP finalizado");
} }
return results; return results;

View File

@ -45,12 +45,12 @@ public class LegalCustomerProductDirectoryResource {
@Path("/retrieve/{customerIbsNumber : (?!retrieve$).*}") @Path("/retrieve/{customerIbsNumber : (?!retrieve$).*}")
@Operation( @Operation(
summary = "Recuperar productos de cliente legal", summary = "Recuperar productos de cliente legal",
description = "Consulta masiva de cuentas por número de cliente IBS" description = "Consulta masiva de cuentas por numero de cliente IBS"
) )
@APIResponses(value = { @APIResponses(value = {
@APIResponse( @APIResponse(
responseCode = "200", responseCode = "200",
description = "Operación exitosa", description = "Operacion exitosa",
content = @Content( content = @Content(
mediaType = MediaType.APPLICATION_JSON, mediaType = MediaType.APPLICATION_JSON,
schema = @Schema( schema = @Schema(
@ -142,7 +142,7 @@ public class LegalCustomerProductDirectoryResource {
"fullName": "TASCA RESTAURANT GOOD WORLD CEN, C.A." "fullName": "TASCA RESTAURANT GOOD WORLD CEN, C.A."
} }
], ],
"partyType": "ORGANISATION", "partyType": "ORGANIZATION",
"partyIdentification": [ "partyIdentification": [
{ {
"partyIdentificationType": "TAX_IDENTIFICATION_NUMBER", "partyIdentificationType": "TAX_IDENTIFICATION_NUMBER",
@ -186,7 +186,7 @@ public class LegalCustomerProductDirectoryResource {
}, },
"statusResponse": { "statusResponse": {
"statusCode": "200", "statusCode": "200",
"message": "Operación exitosa" "message": "Operacion exitosa"
} }
} }
""" """
@ -259,7 +259,7 @@ public class LegalCustomerProductDirectoryResource {
), ),
examples = { examples = {
@ExampleObject( @ExampleObject(
name = "Error VRN08 - Identificación del fintechId no coincide", name = "Error VRN08 - Identificacion del fintechId no coincide",
value = """ value = """
{ {
"data": null, "data": null,
@ -299,7 +299,7 @@ public class LegalCustomerProductDirectoryResource {
"data": null, "data": null,
"statusResponse": { "statusResponse": {
"statusCode": "VRN04", "statusCode": "VRN04",
"message": "El servicio no está disponible fuera del horario operativo" "message": "El servicio no esta disponible fuera del horario operativo"
} }
} }
""" """
@ -311,7 +311,7 @@ public class LegalCustomerProductDirectoryResource {
"data": null, "data": null,
"statusResponse": { "statusResponse": {
"statusCode": "VDR13", "statusCode": "VDR13",
"message": "El servicio OSB no está disponible en este momento" "message": "El servicio OSB no esta disponible en este momento"
} }
} }
""" """
@ -322,7 +322,7 @@ public class LegalCustomerProductDirectoryResource {
}) })
public Response retrieve( public Response retrieve(
@PathParam("customerIbsNumber") @PathParam("customerIbsNumber")
@Parameter(description = "Número de cliente IBS (VCUSCUN)", example = "200053197") @Parameter(description = "Numero de cliente IBS (VCUSCUN)", example = "200053197")
String customerIbsNumber, String customerIbsNumber,
@QueryParam("customerReferenceFintechId") @QueryParam("customerReferenceFintechId")
@ -330,15 +330,15 @@ public class LegalCustomerProductDirectoryResource {
String customerReferenceFintechId, String customerReferenceFintechId,
@QueryParam("appId") @QueryParam("appId")
@Parameter(description = "ID de la aplicación", example = "DANIAPP") @Parameter(description = "ID de la aplicacion", example = "DANIAPP")
String appId, String appId,
@QueryParam("bankNumber") @QueryParam("bankNumber")
@Parameter(description = "Número de banco (VACMBNK)", example = "01") @Parameter(description = "Numero de banco (VACMBNK)", example = "01")
String bankNumber, String bankNumber,
@QueryParam("currencyCode") @QueryParam("currencyCode")
@Parameter(description = "Código de moneda (VACMCCY)", example = "BS") @Parameter(description = "Codigo de moneda (VACMCCY)", example = "BS")
String currencyCode, String currencyCode,
@QueryParam("accountStatus") @QueryParam("accountStatus")
@ -346,15 +346,15 @@ public class LegalCustomerProductDirectoryResource {
String accountStatus, String accountStatus,
@QueryParam("productCvCode") @QueryParam("productCvCode")
@Parameter(description = "Código de Producto Cuenta Verde (VACMPROCV). 'CV'=Cuenta verde, 'CVFL'=Cuenta verde con opción activa", example = "CV") @Parameter(description = "Codigo de Producto Cuenta Verde (VACMPROCV). 'CV'=Cuenta verde, 'CVFL'=Cuenta verde con opcion activa", example = "CV")
String productCvCode, String productCvCode,
@QueryParam("productCode") @QueryParam("productCode")
@Parameter(description = "Código de producto (VACMPRO)", example = "3980") @Parameter(description = "Codigo de producto (VACMPRO)", example = "3980")
String productCode, String productCode,
@QueryParam("channelCode") @QueryParam("channelCode")
@Parameter(description = "Código de canal (VAFILICANAL)", example = "APP") @Parameter(description = "Codigo de canal (VAFILICANAL)", example = "APP")
String channelCode, String channelCode,
@QueryParam("serviceType") @QueryParam("serviceType")
@ -362,7 +362,7 @@ public class LegalCustomerProductDirectoryResource {
String serviceType, String serviceType,
@QueryParam("affiliationStatus") @QueryParam("affiliationStatus")
@Parameter(description = "Estatus de afiliación (VAFILISTATU)", example = "A") @Parameter(description = "Estatus de afiliacion (VAFILISTATU)", example = "A")
String affiliationStatus, String affiliationStatus,
@QueryParam("limitType") @QueryParam("limitType")

View File

@ -2,5 +2,5 @@ package com.banesco.module.party.domain.model;
public enum PartyType { public enum PartyType {
PERSON, PERSON,
ORGANISATION ORGANIZATION
} }

View File

@ -23,7 +23,7 @@ api:
dom-legal-customer-product-directory: dom-legal-customer-product-directory:
messages: messages:
key: 'dom-legal-customer-product-directory' key: 'dom-legal-customer-product-directory'
content: '[{"backendCode":"200","httpCode":200,"statusCode":"200","description":"Operacion exitosa"},{"backendCode":"R404","httpCode":404,"statusCode":"404","description":"Datos de validación no encontrado."},{"backendCode":"503","httpCode":503,"statusCode":"503","description":"Uso interno"},{"backendCode":"422","httpCode":422,"statusCode":"422","description":"Uso interno"},{"backendCode":"500","httpCode":500,"statusCode":"500","description":"Uso interno"},{"backendCode":"100","httpCode":503,"statusCode":"503","description":"VDR13 - OSB Disponible"},{"backendCode":"OSB-382505","httpCode":503,"statusCode":"503","description":"VDR13 - OSB Disponible"},{"backendCode":"OSB-380002","httpCode":503,"statusCode":"503","description":"VDR13 - OSB Disponible"},{"backendCode":"ERROR","httpCode":400,"statusCode":"400","description":"Uso interno"},{"backendCode":"400","httpCode":400,"statusCode":"400","description":"Uso interno"},{"backendCode":"401","httpCode":401,"statusCode":"401","description":"Uso interno"},{"backendCode":"403","httpCode":403,"statusCode":"403","description":"Uso interno"},{"backendCode":"404","httpCode":404,"statusCode":"404","description":"Uso interno"},{"backendCode":"default","httpCode":409,"statusCode":"409","description":"Conflicto"},{"backendCode":"424","httpCode":424,"statusCode":"424","description":"Error de dependencia"},{"backendCode":"VDE01","httpCode":400,"statusCode":"VDE01","description":"VDE01 - Error en dato de entrada obligatorio: %s"},{"backendCode":"VDE02","httpCode":400,"statusCode":"VDE02","description":"VDE02 - Error en valor permitido para campo: %s"},{"backend_code":"204","http_code":"200","status_code":"200","description":"Cliente sin productos","status":"ok"}]' content: '[{"backendCode":"200","httpCode":200,"statusCode":"200","description":"Operacion exitosa"},{"backendCode":"R404","httpCode":404,"statusCode":"404","description":"Datos de validacion no encontrado."},{"backendCode":"503","httpCode":503,"statusCode":"503","description":"Uso interno"},{"backendCode":"422","httpCode":422,"statusCode":"422","description":"Uso interno"},{"backendCode":"500","httpCode":500,"statusCode":"500","description":"Uso interno"},{"backendCode":"100","httpCode":503,"statusCode":"503","description":"VDR13 - OSB Disponible"},{"backendCode":"OSB-382505","httpCode":503,"statusCode":"503","description":"VDR13 - OSB Disponible"},{"backendCode":"OSB-380002","httpCode":503,"statusCode":"503","description":"VDR13 - OSB Disponible"},{"backendCode":"ERROR","httpCode":400,"statusCode":"400","description":"Uso interno"},{"backendCode":"400","httpCode":400,"statusCode":"400","description":"Uso interno"},{"backendCode":"401","httpCode":401,"statusCode":"401","description":"Uso interno"},{"backendCode":"403","httpCode":403,"statusCode":"403","description":"Uso interno"},{"backendCode":"404","httpCode":404,"statusCode":"404","description":"Uso interno"},{"backendCode":"default","httpCode":409,"statusCode":"409","description":"Conflicto"},{"backendCode":"424","httpCode":424,"statusCode":"424","description":"Error de dependencia"},{"backendCode":"VDE01","httpCode":400,"statusCode":"VDE01","description":"VDE01 - Error en dato de entrada obligatorio: %s"},{"backendCode":"VDE02","httpCode":400,"statusCode":"VDE02","description":"VDE02 - Error en valor permitido para campo: %s"},{"backend_code":"204","http_code":"200","status_code":"200","description":"Cliente sin productos","status":"ok"}]'
datasource: datasource:
sp: sp:

View File

@ -30,14 +30,14 @@ quarkus:
max-lifetime: '900000' max-lifetime: '900000'
leak-detection-interval: '60000' leak-detection-interval: '60000'
validation-query-sql: 'SELECT 1 FROM SYSIBM.SYSDUMMY1' validation-query-sql: 'SELECT 1 FROM SYSIBM.SYSDUMMY1'
# Configuración específica para DB2 # Configuracion especifica para DB2
additional-jdbc-properties: additional-jdbc-properties:
currentSchema: "BANCYFIL2" currentSchema: "BANCYFIL2"
retrieveMessagesFromServerOnGetMessage: "true" retrieveMessagesFromServerOnGetMessage: "true"
useJDBC4ColumnNameAndLabelSemantics: "2" useJDBC4ColumnNameAndLabelSemantics: "2"
health: health:
# Específica si Quarkus debe registrar automáticamente sus propios health checks para verificar el datasource. # Especifica si Quarkus debe registrar automaticamente sus propios health checks para verificar el datasource.
# Cuando está en false Quarkus no registrará su health check de datasource automático # Cuando esta en false Quarkus no registrara su health check de datasource automatico
# lo cual es correcto porque ya se tiene un health check personalizado (DatabaseHealthCheck). # lo cual es correcto porque ya se tiene un health check personalizado (DatabaseHealthCheck).
enabled: false enabled: false
## OpenApi ## OpenApi