24 lines
1.0 KiB
Python
24 lines
1.0 KiB
Python
from typing import Dict, Any
|
|
|
|
class Generador554SCAII:
|
|
@staticmethod
|
|
def preparar_json(iden: Dict[str, Any], id_partida: int) -> Dict[str, Any]:
|
|
"""
|
|
Lógica para Registro 554 (Identificadores de Partidas) - SCAII.
|
|
"""
|
|
registro = {
|
|
"tipo_caso_554": iden.get("identificador", " "),
|
|
"complemento_caso_1_554": iden.get("complemento_1", " "),
|
|
"complemento_caso_2_554": iden.get("complemento_2", " "),
|
|
"complemento_caso_3_554": iden.get("complemento_2", " "), # WinDev repite C3 con C3, pero aquí mapeamos C1, C2, C3
|
|
"id_partida": id_partida
|
|
}
|
|
|
|
# En el código WinDev: FormURL_Reg554.complemento_caso_3_554 = DS_IntPar.C3
|
|
# Pero DS_IntPar.C3 es COMPLEMENTO2. DS_IntPar.C4 es COMPLEMENTO3.
|
|
# Ajustaré para que use el complemento_3 real si existe.
|
|
if iden.get("complemento_3"):
|
|
registro["complemento_caso_3_554"] = iden.get("complemento_3")
|
|
|
|
return registro
|