다양화 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
|
|
@ -104,6 +104,23 @@ struct sqlca_t *ECPGget_sqlca(void);
|
|||
|
||||
TX_SERVICE(CL_OL_0017, ctx)
|
||||
{
|
||||
/* exec sql begin declare section */
|
||||
|
||||
|
||||
|
||||
|
||||
#line 30 "app/online/cl_ol_0017.pgc"
|
||||
char h_biz_date [ 9 ] ;
|
||||
|
||||
#line 31 "app/online/cl_ol_0017.pgc"
|
||||
long h_db_total ;
|
||||
|
||||
#line 32 "app/online/cl_ol_0017.pgc"
|
||||
long h_db_amt ;
|
||||
/* exec sql end declare section */
|
||||
#line 33 "app/online/cl_ol_0017.pgc"
|
||||
|
||||
|
||||
char bizdate[16];
|
||||
char reqid[32];
|
||||
char oper[32];
|
||||
|
|
@ -111,6 +128,7 @@ TX_SERVICE(CL_OL_0017, ctx)
|
|||
char summary[TX_VAL_LEN];
|
||||
long recv_cnt, done_cnt, fail_cnt, settled_cnt;
|
||||
long total_cnt, processed_cnt, complete_rate;
|
||||
long db_diff;
|
||||
int valid;
|
||||
|
||||
tx_log(TX_LOG_INFO, "[CL_OL_0017] 일마감 검증 서비스 진입");
|
||||
|
|
@ -155,6 +173,38 @@ TX_SERVICE(CL_OL_0017, ctx)
|
|||
}
|
||||
total_cnt = recv_cnt + done_cnt + fail_cnt + settled_cnt;
|
||||
|
||||
/*
|
||||
* 3-1) 원장 직접 집계로 상태별 DBIO 합계를 교차검증한다.
|
||||
* DBIO 채널 합계(total_cnt)와 원장 실집계(h_db_total)가
|
||||
* 다르면 대사 불일치로 간주하여 감사 로그를 남긴다.
|
||||
*/
|
||||
strncpy(h_biz_date, bizdate, sizeof(h_biz_date) - 1);
|
||||
h_biz_date[sizeof(h_biz_date) - 1] = '\0';
|
||||
h_db_total = 0;
|
||||
h_db_amt = 0;
|
||||
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select count ( * ) , coalesce ( sum ( amount ) , 0 ) from cl_ledger where biz_date = $1 ",
|
||||
ECPGt_char,(h_biz_date),(long)9,(long)1,(9)*sizeof(char),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT,
|
||||
ECPGt_long,&(h_db_total),(long)1,(long)1,sizeof(long),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
|
||||
ECPGt_long,&(h_db_amt),(long)1,(long)1,sizeof(long),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
|
||||
#line 100 "app/online/cl_ol_0017.pgc"
|
||||
|
||||
|
||||
if (sqlca.sqlcode != TX_SQL_OK && sqlca.sqlcode != TX_SQL_NOTFOUND) {
|
||||
TX_DBIO_LOG_ERR("CL_OL_0017 direct total");
|
||||
tx_buf_reset(ctx->out);
|
||||
tx_buf_sets(ctx->out, "RESPCODE", RESP_SYSERR);
|
||||
tx_return(ctx, TX_EDB, ctx->out);
|
||||
return;
|
||||
}
|
||||
db_diff = total_cnt - h_db_total;
|
||||
if (db_diff != 0)
|
||||
tx_log(TX_LOG_WARN, "[CL_OL_0017] 집계 대사 불일치 dbio=%ld ledger=%ld",
|
||||
total_cnt, h_db_total);
|
||||
|
||||
/* 4) 일마감 유효성 판정: 미마감 잔량이 0 이어야 유효 */
|
||||
valid = (recv_cnt == 0) ? 1 : 0;
|
||||
|
||||
|
|
@ -184,6 +234,10 @@ TX_SERVICE(CL_OL_0017, ctx)
|
|||
tx_buf_setlong(ctx->out, "FAILCNT", fail_cnt);
|
||||
tx_buf_setlong(ctx->out, "SETTLEDCNT", settled_cnt);
|
||||
tx_buf_setlong(ctx->out, "TOTALCNT", total_cnt);
|
||||
tx_buf_setlong(ctx->out, "DBTOTAL", h_db_total);
|
||||
tx_buf_setlong(ctx->out, "DBAMT", h_db_amt);
|
||||
tx_buf_setlong(ctx->out, "DBDIFF", db_diff);
|
||||
tx_buf_sets(ctx->out, "RECONMATCH", (db_diff == 0) ? "Y" : "N");
|
||||
tx_buf_setlong(ctx->out, "PROCESSEDCNT", processed_cnt);
|
||||
tx_buf_setlong(ctx->out, "COMPLETERATE", complete_rate);
|
||||
tx_buf_sets(ctx->out, "NEXTBIZ", nextbiz);
|
||||
|
|
|
|||
Reference in a new issue