다양화 Wave2: dbio 289 + common 120 고유화 + 프로그램 206개 EXEC SQL 심화
- dbio io(289): fetch/touch/total 시그니처 유지, SQL 바디를 JOIN/집계/커서/ upsert/DELETE 등 구조로 고유화 → 289/289 고유 - common cu(120): 유틸 시그니처 유지, Luhn/CRC/Zeller/BIN레인지/amortization/ netting 등 실 알고리즘으로 고유화 → 120/120 고유 - 심화: 실제 EXEC SQL 없던 프로그램에 SELECT/INSERT/UPDATE/커서+tx 추가 → online+batch 530/530 전부 실제 SQL 보유 - 전 코퍼스 프로그램 939/939 고유, 전체 docker make -j4 = EXIT 0, 958 오브젝트 - 임시 생성기 제거, inventory.json loc 실측 갱신 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c3a0259e95
commit
93c3cb74af
1111 changed files with 31539 additions and 17258 deletions
|
|
@ -11,7 +11,8 @@
|
|||
* py_ol_0003.pgc - 지급 계좌검증 연계(tx_call 계좌실명) (PY_OL_0003) [tier=hard]
|
||||
*
|
||||
* TxCore TX_SERVICE 엔트리. 요청 TXBUF 를 검증하고 임베디드 SQL / 표준
|
||||
* DBIO / tx_call 로 처리한 뒤 응답 TXBUF 를 구성한다.
|
||||
* DBIO / tx_call 로 처리한 뒤 응답 TXBUF 를 구성한다. 외부 실명연계 전
|
||||
* 지급계좌 마스터(py_account)를 임베디드 조회하여 사전검증한다.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
|
@ -90,11 +91,28 @@ struct sqlca_t *ECPGget_sqlca(void);
|
|||
|
||||
#endif
|
||||
|
||||
#line 16 "app/online/py_ol_0003.pgc"
|
||||
#line 17 "app/online/py_ol_0003.pgc"
|
||||
|
||||
|
||||
TX_SERVICE(PY_OL_0003, ctx)
|
||||
{
|
||||
/* exec sql begin declare section */
|
||||
|
||||
|
||||
|
||||
|
||||
#line 22 "app/online/py_ol_0003.pgc"
|
||||
char h_acct [ 24 ] ;
|
||||
|
||||
#line 23 "app/online/py_ol_0003.pgc"
|
||||
char h_holder [ 41 ] ;
|
||||
|
||||
#line 24 "app/online/py_ol_0003.pgc"
|
||||
char h_acct_status [ 2 ] ;
|
||||
/* exec sql end declare section */
|
||||
#line 25 "app/online/py_ol_0003.pgc"
|
||||
|
||||
|
||||
char key[16];
|
||||
if (tx_buf_get(ctx->in, "KEY", key, sizeof(key)) != TX_OK) {
|
||||
tx_log(TX_LOG_ERROR, "[PY_OL_0003] KEY 누락");
|
||||
|
|
@ -111,10 +129,54 @@ TX_SERVICE(PY_OL_0003, ctx)
|
|||
return;
|
||||
}
|
||||
|
||||
/* 사전검증: 지급계좌 마스터에 등록/정상('N') 여부 확인 */
|
||||
strncpy(h_acct, acct, sizeof(h_acct) - 1);
|
||||
h_acct[sizeof(h_acct) - 1] = '\0';
|
||||
memset(h_holder, 0, sizeof(h_holder));
|
||||
memset(h_acct_status, 0, sizeof(h_acct_status));
|
||||
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select holder_name , acct_status from py_account where acct_no = $1 ",
|
||||
ECPGt_char,(h_acct),(long)24,(long)1,(24)*sizeof(char),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
|
||||
ECPGt_char,(h_holder),(long)41,(long)1,(41)*sizeof(char),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
|
||||
ECPGt_char,(h_acct_status),(long)2,(long)1,(2)*sizeof(char),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
|
||||
#line 52 "app/online/py_ol_0003.pgc"
|
||||
|
||||
|
||||
if (sqlca.sqlcode == TX_SQL_NOTFOUND) {
|
||||
tx_log(TX_LOG_WARN, "[PY_OL_0003] 미등록 계좌 acct=%s", acct);
|
||||
tx_buf_reset(ctx->out);
|
||||
tx_buf_sets(ctx->out, "RESPCODE", RESP_INVALID);
|
||||
tx_buf_sets(ctx->out, "VALID", "N");
|
||||
tx_buf_sets(ctx->out, "REASON", "ACCT_NOT_FOUND");
|
||||
tx_return(ctx, TX_ENOENT, ctx->out);
|
||||
return;
|
||||
}
|
||||
if (sqlca.sqlcode != TX_SQL_OK) {
|
||||
TX_DBIO_LOG_ERR("SELECT py_account");
|
||||
tx_buf_reset(ctx->out);
|
||||
tx_buf_sets(ctx->out, "RESPCODE", RESP_SYSERR);
|
||||
tx_return(ctx, TX_EDB, ctx->out);
|
||||
return;
|
||||
}
|
||||
if (memcmp(h_acct_status, "N", 1) != 0) {
|
||||
tx_log(TX_LOG_WARN, "[PY_OL_0003] 계좌상태 비정상 acct=%s status=%s",
|
||||
acct, h_acct_status);
|
||||
tx_buf_reset(ctx->out);
|
||||
tx_buf_sets(ctx->out, "RESPCODE", RESP_INVALID);
|
||||
tx_buf_sets(ctx->out, "VALID", "N");
|
||||
tx_buf_sets(ctx->out, "REASON", "ACCT_INACTIVE");
|
||||
tx_return(ctx, TX_FAIL, ctx->out);
|
||||
return;
|
||||
}
|
||||
|
||||
req = tx_buf_alloc();
|
||||
if (!req) { tx_return(ctx, TX_ENOMEM, ctx->out); return; }
|
||||
tx_buf_sets(req, "KEY", key);
|
||||
tx_buf_sets(req, "ACCTNO", acct);
|
||||
tx_buf_sets(req, "HOLDER", h_holder);
|
||||
|
||||
rc = tx_call("PY_ACCTCHK", req, ctx->out);
|
||||
tx_buf_free(req);
|
||||
|
|
@ -128,7 +190,9 @@ TX_SERVICE(PY_OL_0003, ctx)
|
|||
if (tx_buf_get(ctx->out, "RESPCODE", vresp, sizeof(vresp)) != TX_OK)
|
||||
strcpy(vresp, RESP_OK);
|
||||
|
||||
tx_buf_sets(ctx->out, "HOLDER", h_holder);
|
||||
tx_buf_sets(ctx->out, "VALID", (strcmp(vresp, RESP_OK) == 0) ? "Y" : "N");
|
||||
tx_log(TX_LOG_INFO, "[PY_OL_0003] 계좌검증 acct=%s resp=%s", acct, vresp);
|
||||
tx_log(TX_LOG_INFO, "[PY_OL_0003] 계좌검증 acct=%s resp=%s holder=%s",
|
||||
acct, vresp, h_holder);
|
||||
tx_return(ctx, (strcmp(vresp, RESP_OK) == 0) ? TX_OK : TX_FAIL, ctx->out);
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue