다양화 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
|
|
@ -105,6 +105,39 @@ struct sqlca_t *ECPGget_sqlca(void);
|
|||
|
||||
TX_SERVICE(CL_OL_0025, ctx)
|
||||
{
|
||||
/* exec sql begin declare section */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#line 31 "app/online/cl_ol_0025.pgc"
|
||||
char h_biz_date [ 9 ] ;
|
||||
|
||||
#line 32 "app/online/cl_ol_0025.pgc"
|
||||
char h_severity [ 8 ] ;
|
||||
|
||||
#line 33 "app/online/cl_ol_0025.pgc"
|
||||
char h_target [ 32 ] ;
|
||||
|
||||
#line 34 "app/online/cl_ol_0025.pgc"
|
||||
char h_reqid [ 32 ] ;
|
||||
|
||||
#line 35 "app/online/cl_ol_0025.pgc"
|
||||
long h_recv ;
|
||||
|
||||
#line 36 "app/online/cl_ol_0025.pgc"
|
||||
long h_fail ;
|
||||
|
||||
#line 37 "app/online/cl_ol_0025.pgc"
|
||||
char h_alert [ TX_VAL_LEN ] ;
|
||||
/* exec sql end declare section */
|
||||
#line 38 "app/online/cl_ol_0025.pgc"
|
||||
|
||||
|
||||
char bizdate[16];
|
||||
char reqid[32];
|
||||
char target[32];
|
||||
|
|
@ -112,6 +145,7 @@ TX_SERVICE(CL_OL_0025, ctx)
|
|||
const char *severity;
|
||||
long recv_cnt, fail_cnt, settled_cnt, done_cnt;
|
||||
long pending, total_cnt;
|
||||
long logged = 0;
|
||||
int need_alert;
|
||||
|
||||
tx_log(TX_LOG_INFO, "[CL_OL_0025] 알림 재발송 서비스 진입");
|
||||
|
|
@ -175,8 +209,58 @@ TX_SERVICE(CL_OL_0025, ctx)
|
|||
"[마감알림/%s] %s 마감 정상완료(정산완료 %ld건) - 조치 불필요",
|
||||
severity, bizdate, settled_cnt);
|
||||
|
||||
/*
|
||||
* 4) 알림 발송 이력 적재. 알림이 필요한 경우에만 cl_alert_log 에
|
||||
* 남기며, 발송 이력은 재발송 중복방지/감사추적의 근거가 된다.
|
||||
*/
|
||||
if (need_alert) {
|
||||
strncpy(h_biz_date, bizdate, sizeof(h_biz_date) - 1);
|
||||
h_biz_date[sizeof(h_biz_date) - 1] = '\0';
|
||||
strncpy(h_severity, severity, sizeof(h_severity) - 1);
|
||||
h_severity[sizeof(h_severity) - 1] = '\0';
|
||||
strncpy(h_target, target, sizeof(h_target) - 1);
|
||||
h_target[sizeof(h_target) - 1] = '\0';
|
||||
strncpy(h_reqid, reqid, sizeof(h_reqid) - 1);
|
||||
h_reqid[sizeof(h_reqid) - 1] = '\0';
|
||||
strncpy(h_alert, alert, sizeof(h_alert) - 1);
|
||||
h_alert[sizeof(h_alert) - 1] = '\0';
|
||||
h_recv = recv_cnt;
|
||||
h_fail = fail_cnt;
|
||||
|
||||
if (tx_begin() != TX_OK) {
|
||||
tx_log(TX_LOG_WARN, "[CL_OL_0025] tx_begin 경고");
|
||||
} else {
|
||||
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into cl_alert_log ( biz_date , severity , recv_cnt , fail_cnt , target , reqid , alert_msg , sent_ts ) values ( $1 , $2 , $3 , $4 , $5 , $6 , $7 , now ( ) )",
|
||||
ECPGt_char,(h_biz_date),(long)9,(long)1,(9)*sizeof(char),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
|
||||
ECPGt_char,(h_severity),(long)8,(long)1,(8)*sizeof(char),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
|
||||
ECPGt_long,&(h_recv),(long)1,(long)1,sizeof(long),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
|
||||
ECPGt_long,&(h_fail),(long)1,(long)1,sizeof(long),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
|
||||
ECPGt_char,(h_target),(long)32,(long)1,(32)*sizeof(char),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
|
||||
ECPGt_char,(h_reqid),(long)32,(long)1,(32)*sizeof(char),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
|
||||
ECPGt_char,(h_alert),(long)TX_VAL_LEN,(long)1,(TX_VAL_LEN)*sizeof(char),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);}
|
||||
#line 136 "app/online/cl_ol_0025.pgc"
|
||||
|
||||
|
||||
if (sqlca.sqlcode != TX_SQL_OK) {
|
||||
TX_DBIO_LOG_ERR("CL_OL_0025 INSERT cl_alert_log");
|
||||
tx_abort();
|
||||
} else {
|
||||
logged = (long)sqlca.sqlerrd[2];
|
||||
tx_commit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tx_buf_reset(ctx->out);
|
||||
tx_buf_sets(ctx->out, "RESPCODE", RESP_OK);
|
||||
tx_buf_setlong(ctx->out, "LOGGED", logged);
|
||||
tx_buf_sets(ctx->out, "TYPE", "ALERT");
|
||||
tx_buf_sets(ctx->out, "BIZDATE", bizdate);
|
||||
tx_buf_sets(ctx->out, "REQID", reqid);
|
||||
|
|
|
|||
Reference in a new issue