feat: acquire-core full legacy C corpus (~2066 files, build-verified) + generator + inventory
This commit is contained in:
commit
b96cf702ee
2897 changed files with 264970 additions and 0 deletions
37
app/common/ac_cu_0001.c
Normal file
37
app/common/ac_cu_0001.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module ac @transform acquire-util */
|
||||
/*
|
||||
* ac_cu_0001.c - 매입 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "ac_cu_0001.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long ac_cu_0001_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long ac_cu_0001_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int ac_cu_0001_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/ac_cu_0002.c
Normal file
37
app/common/ac_cu_0002.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier medium @module ac @transform acquire-util */
|
||||
/*
|
||||
* ac_cu_0002.c - 매입 공통 유틸리티 (plain C) [tier=medium]
|
||||
*/
|
||||
#include "ac_cu_0002.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long ac_cu_0002_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long ac_cu_0002_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int ac_cu_0002_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/ac_cu_0003.c
Normal file
37
app/common/ac_cu_0003.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module ac @transform acquire-util */
|
||||
/*
|
||||
* ac_cu_0003.c - 매입 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "ac_cu_0003.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long ac_cu_0003_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long ac_cu_0003_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int ac_cu_0003_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/ac_cu_0004.c
Normal file
37
app/common/ac_cu_0004.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier medium @module ac @transform acquire-util */
|
||||
/*
|
||||
* ac_cu_0004.c - 매입 공통 유틸리티 (plain C) [tier=medium]
|
||||
*/
|
||||
#include "ac_cu_0004.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long ac_cu_0004_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long ac_cu_0004_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int ac_cu_0004_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/ac_cu_0005.c
Normal file
37
app/common/ac_cu_0005.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module ac @transform acquire-util */
|
||||
/*
|
||||
* ac_cu_0005.c - 매입 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "ac_cu_0005.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long ac_cu_0005_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long ac_cu_0005_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int ac_cu_0005_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/ac_cu_0006.c
Normal file
37
app/common/ac_cu_0006.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier hard @module ac @transform acquire-util */
|
||||
/*
|
||||
* ac_cu_0006.c - 매입 공통 유틸리티 (plain C) [tier=hard]
|
||||
*/
|
||||
#include "ac_cu_0006.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long ac_cu_0006_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long ac_cu_0006_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int ac_cu_0006_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/ac_cu_0007.c
Normal file
37
app/common/ac_cu_0007.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module ac @transform acquire-util */
|
||||
/*
|
||||
* ac_cu_0007.c - 매입 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "ac_cu_0007.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long ac_cu_0007_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long ac_cu_0007_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int ac_cu_0007_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/ac_cu_0008.c
Normal file
37
app/common/ac_cu_0008.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier hard @module ac @transform acquire-util */
|
||||
/*
|
||||
* ac_cu_0008.c - 매입 공통 유틸리티 (plain C) [tier=hard]
|
||||
*/
|
||||
#include "ac_cu_0008.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long ac_cu_0008_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long ac_cu_0008_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int ac_cu_0008_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/ac_cu_0009.c
Normal file
37
app/common/ac_cu_0009.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module ac @transform acquire-util */
|
||||
/*
|
||||
* ac_cu_0009.c - 매입 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "ac_cu_0009.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long ac_cu_0009_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long ac_cu_0009_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int ac_cu_0009_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/ac_cu_0010.c
Normal file
37
app/common/ac_cu_0010.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module ac @transform acquire-util */
|
||||
/*
|
||||
* ac_cu_0010.c - 매입 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "ac_cu_0010.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long ac_cu_0010_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long ac_cu_0010_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int ac_cu_0010_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/ac_cu_0011.c
Normal file
37
app/common/ac_cu_0011.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier medium @module ac @transform acquire-util */
|
||||
/*
|
||||
* ac_cu_0011.c - 매입 공통 유틸리티 (plain C) [tier=medium]
|
||||
*/
|
||||
#include "ac_cu_0011.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long ac_cu_0011_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long ac_cu_0011_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int ac_cu_0011_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/au_cu_0001.c
Normal file
37
app/common/au_cu_0001.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module au @transform authorization-util */
|
||||
/*
|
||||
* au_cu_0001.c - 승인한도 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "au_cu_0001.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long au_cu_0001_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long au_cu_0001_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int au_cu_0001_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/au_cu_0002.c
Normal file
37
app/common/au_cu_0002.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier medium @module au @transform authorization-util */
|
||||
/*
|
||||
* au_cu_0002.c - 승인한도 공통 유틸리티 (plain C) [tier=medium]
|
||||
*/
|
||||
#include "au_cu_0002.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long au_cu_0002_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long au_cu_0002_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int au_cu_0002_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/au_cu_0003.c
Normal file
37
app/common/au_cu_0003.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module au @transform authorization-util */
|
||||
/*
|
||||
* au_cu_0003.c - 승인한도 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "au_cu_0003.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long au_cu_0003_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long au_cu_0003_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int au_cu_0003_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/au_cu_0004.c
Normal file
37
app/common/au_cu_0004.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier medium @module au @transform authorization-util */
|
||||
/*
|
||||
* au_cu_0004.c - 승인한도 공통 유틸리티 (plain C) [tier=medium]
|
||||
*/
|
||||
#include "au_cu_0004.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long au_cu_0004_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long au_cu_0004_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int au_cu_0004_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/au_cu_0005.c
Normal file
37
app/common/au_cu_0005.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module au @transform authorization-util */
|
||||
/*
|
||||
* au_cu_0005.c - 승인한도 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "au_cu_0005.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long au_cu_0005_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long au_cu_0005_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int au_cu_0005_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/au_cu_0006.c
Normal file
37
app/common/au_cu_0006.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier medium @module au @transform authorization-util */
|
||||
/*
|
||||
* au_cu_0006.c - 승인한도 공통 유틸리티 (plain C) [tier=medium]
|
||||
*/
|
||||
#include "au_cu_0006.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long au_cu_0006_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long au_cu_0006_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int au_cu_0006_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/au_cu_0007.c
Normal file
37
app/common/au_cu_0007.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module au @transform authorization-util */
|
||||
/*
|
||||
* au_cu_0007.c - 승인한도 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "au_cu_0007.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long au_cu_0007_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long au_cu_0007_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int au_cu_0007_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/au_cu_0008.c
Normal file
37
app/common/au_cu_0008.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier hard @module au @transform authorization-util */
|
||||
/*
|
||||
* au_cu_0008.c - 승인한도 공통 유틸리티 (plain C) [tier=hard]
|
||||
*/
|
||||
#include "au_cu_0008.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long au_cu_0008_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long au_cu_0008_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int au_cu_0008_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/au_cu_0009.c
Normal file
37
app/common/au_cu_0009.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module au @transform authorization-util */
|
||||
/*
|
||||
* au_cu_0009.c - 승인한도 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "au_cu_0009.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long au_cu_0009_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long au_cu_0009_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int au_cu_0009_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/au_cu_0010.c
Normal file
37
app/common/au_cu_0010.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module au @transform authorization-util */
|
||||
/*
|
||||
* au_cu_0010.c - 승인한도 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "au_cu_0010.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long au_cu_0010_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long au_cu_0010_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int au_cu_0010_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/au_cu_0011.c
Normal file
37
app/common/au_cu_0011.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier medium @module au @transform authorization-util */
|
||||
/*
|
||||
* au_cu_0011.c - 승인한도 공통 유틸리티 (plain C) [tier=medium]
|
||||
*/
|
||||
#include "au_cu_0011.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long au_cu_0011_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long au_cu_0011_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int au_cu_0011_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/cl_cu_0001.c
Normal file
37
app/common/cl_cu_0001.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module cl @transform closing-util */
|
||||
/*
|
||||
* cl_cu_0001.c - 마감 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "cl_cu_0001.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long cl_cu_0001_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long cl_cu_0001_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int cl_cu_0001_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/cl_cu_0002.c
Normal file
37
app/common/cl_cu_0002.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module cl @transform closing-util */
|
||||
/*
|
||||
* cl_cu_0002.c - 마감 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "cl_cu_0002.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long cl_cu_0002_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long cl_cu_0002_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int cl_cu_0002_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/cl_cu_0003.c
Normal file
37
app/common/cl_cu_0003.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier medium @module cl @transform closing-util */
|
||||
/*
|
||||
* cl_cu_0003.c - 마감 공통 유틸리티 (plain C) [tier=medium]
|
||||
*/
|
||||
#include "cl_cu_0003.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long cl_cu_0003_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long cl_cu_0003_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int cl_cu_0003_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/cl_cu_0004.c
Normal file
37
app/common/cl_cu_0004.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module cl @transform closing-util */
|
||||
/*
|
||||
* cl_cu_0004.c - 마감 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "cl_cu_0004.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long cl_cu_0004_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long cl_cu_0004_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int cl_cu_0004_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/cl_cu_0005.c
Normal file
37
app/common/cl_cu_0005.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier medium @module cl @transform closing-util */
|
||||
/*
|
||||
* cl_cu_0005.c - 마감 공통 유틸리티 (plain C) [tier=medium]
|
||||
*/
|
||||
#include "cl_cu_0005.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long cl_cu_0005_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long cl_cu_0005_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int cl_cu_0005_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/cl_cu_0006.c
Normal file
37
app/common/cl_cu_0006.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module cl @transform closing-util */
|
||||
/*
|
||||
* cl_cu_0006.c - 마감 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "cl_cu_0006.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long cl_cu_0006_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long cl_cu_0006_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int cl_cu_0006_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/cl_cu_0007.c
Normal file
37
app/common/cl_cu_0007.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier medium @module cl @transform closing-util */
|
||||
/*
|
||||
* cl_cu_0007.c - 마감 공통 유틸리티 (plain C) [tier=medium]
|
||||
*/
|
||||
#include "cl_cu_0007.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long cl_cu_0007_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long cl_cu_0007_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int cl_cu_0007_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/cl_cu_0008.c
Normal file
37
app/common/cl_cu_0008.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module cl @transform closing-util */
|
||||
/*
|
||||
* cl_cu_0008.c - 마감 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "cl_cu_0008.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long cl_cu_0008_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long cl_cu_0008_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int cl_cu_0008_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/cl_cu_0009.c
Normal file
37
app/common/cl_cu_0009.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier hard @module cl @transform closing-util */
|
||||
/*
|
||||
* cl_cu_0009.c - 마감 공통 유틸리티 (plain C) [tier=hard]
|
||||
*/
|
||||
#include "cl_cu_0009.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long cl_cu_0009_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long cl_cu_0009_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int cl_cu_0009_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/cl_cu_0010.c
Normal file
37
app/common/cl_cu_0010.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module cl @transform closing-util */
|
||||
/*
|
||||
* cl_cu_0010.c - 마감 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "cl_cu_0010.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long cl_cu_0010_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long cl_cu_0010_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int cl_cu_0010_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/cm_cu_0001.c
Normal file
37
app/common/cm_cu_0001.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module cm @transform common-util */
|
||||
/*
|
||||
* cm_cu_0001.c - 공통 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "cm_cu_0001.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long cm_cu_0001_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long cm_cu_0001_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int cm_cu_0001_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/cm_cu_0002.c
Normal file
37
app/common/cm_cu_0002.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module cm @transform common-util */
|
||||
/*
|
||||
* cm_cu_0002.c - 공통 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "cm_cu_0002.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long cm_cu_0002_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long cm_cu_0002_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int cm_cu_0002_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/cm_cu_0003.c
Normal file
37
app/common/cm_cu_0003.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier medium @module cm @transform common-util */
|
||||
/*
|
||||
* cm_cu_0003.c - 공통 공통 유틸리티 (plain C) [tier=medium]
|
||||
*/
|
||||
#include "cm_cu_0003.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long cm_cu_0003_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long cm_cu_0003_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int cm_cu_0003_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/cm_cu_0004.c
Normal file
37
app/common/cm_cu_0004.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module cm @transform common-util */
|
||||
/*
|
||||
* cm_cu_0004.c - 공통 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "cm_cu_0004.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long cm_cu_0004_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long cm_cu_0004_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int cm_cu_0004_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/cm_cu_0005.c
Normal file
37
app/common/cm_cu_0005.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier medium @module cm @transform common-util */
|
||||
/*
|
||||
* cm_cu_0005.c - 공통 공통 유틸리티 (plain C) [tier=medium]
|
||||
*/
|
||||
#include "cm_cu_0005.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long cm_cu_0005_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long cm_cu_0005_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int cm_cu_0005_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/cm_cu_0006.c
Normal file
37
app/common/cm_cu_0006.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module cm @transform common-util */
|
||||
/*
|
||||
* cm_cu_0006.c - 공통 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "cm_cu_0006.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long cm_cu_0006_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long cm_cu_0006_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int cm_cu_0006_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/cm_cu_0007.c
Normal file
37
app/common/cm_cu_0007.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier medium @module cm @transform common-util */
|
||||
/*
|
||||
* cm_cu_0007.c - 공통 공통 유틸리티 (plain C) [tier=medium]
|
||||
*/
|
||||
#include "cm_cu_0007.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long cm_cu_0007_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long cm_cu_0007_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int cm_cu_0007_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/cm_cu_0008.c
Normal file
37
app/common/cm_cu_0008.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module cm @transform common-util */
|
||||
/*
|
||||
* cm_cu_0008.c - 공통 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "cm_cu_0008.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long cm_cu_0008_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long cm_cu_0008_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int cm_cu_0008_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/cm_cu_0009.c
Normal file
37
app/common/cm_cu_0009.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier hard @module cm @transform common-util */
|
||||
/*
|
||||
* cm_cu_0009.c - 공통 공통 유틸리티 (plain C) [tier=hard]
|
||||
*/
|
||||
#include "cm_cu_0009.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long cm_cu_0009_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long cm_cu_0009_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int cm_cu_0009_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/cm_cu_0010.c
Normal file
37
app/common/cm_cu_0010.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module cm @transform common-util */
|
||||
/*
|
||||
* cm_cu_0010.c - 공통 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "cm_cu_0010.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long cm_cu_0010_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long cm_cu_0010_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int cm_cu_0010_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/cm_cu_0011.c
Normal file
37
app/common/cm_cu_0011.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier hard @module cm @transform common-util */
|
||||
/*
|
||||
* cm_cu_0011.c - 공통 공통 유틸리티 (plain C) [tier=hard]
|
||||
*/
|
||||
#include "cm_cu_0011.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long cm_cu_0011_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long cm_cu_0011_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int cm_cu_0011_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
24
app/common/demo_ac_main.c
Normal file
24
app/common/demo_ac_main.c
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* demo_ac_main.c - 매입 온라인 데모 부트스트랩 (링크 검증)
|
||||
*
|
||||
* 생성된 플래그십 서비스(AC_OL_0001)를 TxCore 레지스트리에 등록하여
|
||||
* 등록/디스패치/DBIO 링크 경로가 실제로 연결됨을 증명한다.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
|
||||
#include "txcore.h"
|
||||
|
||||
void AC_OL_0001(TXSVCINFO *ctx);
|
||||
|
||||
int main(void)
|
||||
{
|
||||
tx_set_loglevel(TX_LOG_INFO);
|
||||
tx_log(TX_LOG_INFO, "매입 온라인 데모 기동 (TxCore)");
|
||||
|
||||
tx_register("AC_OL_0001", AC_OL_0001);
|
||||
|
||||
tx_log(TX_LOG_INFO, "등록 서비스 수 = %d", tx_service_count());
|
||||
printf("demo_ac_server 준비완료: 서비스 %d개 등록\n",
|
||||
tx_service_count());
|
||||
return 0;
|
||||
}
|
||||
24
app/common/demo_mg_main.c
Normal file
24
app/common/demo_mg_main.c
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* demo_mg_main.c - 전문게이트웨이 온라인 데모 부트스트랩 (링크 검증)
|
||||
*
|
||||
* 생성된 플래그십 서비스(MG_OL_0001)를 TxCore 레지스트리에 등록하여
|
||||
* 등록/디스패치/DBIO 링크 경로가 실제로 연결됨을 증명한다.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
|
||||
#include "txcore.h"
|
||||
|
||||
void MG_OL_0001(TXSVCINFO *ctx);
|
||||
|
||||
int main(void)
|
||||
{
|
||||
tx_set_loglevel(TX_LOG_INFO);
|
||||
tx_log(TX_LOG_INFO, "전문게이트웨이 온라인 데모 기동 (TxCore)");
|
||||
|
||||
tx_register("MG_OL_0001", MG_OL_0001);
|
||||
|
||||
tx_log(TX_LOG_INFO, "등록 서비스 수 = %d", tx_service_count());
|
||||
printf("demo_mg_server 준비완료: 서비스 %d개 등록\n",
|
||||
tx_service_count());
|
||||
return 0;
|
||||
}
|
||||
24
app/common/demo_rc_main.c
Normal file
24
app/common/demo_rc_main.c
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* demo_rc_main.c - 대사 온라인 데모 부트스트랩 (링크 검증)
|
||||
*
|
||||
* 생성된 플래그십 서비스(RC_OL_0001)를 TxCore 레지스트리에 등록하여
|
||||
* 등록/디스패치/DBIO 링크 경로가 실제로 연결됨을 증명한다.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
|
||||
#include "txcore.h"
|
||||
|
||||
void RC_OL_0001(TXSVCINFO *ctx);
|
||||
|
||||
int main(void)
|
||||
{
|
||||
tx_set_loglevel(TX_LOG_INFO);
|
||||
tx_log(TX_LOG_INFO, "대사 온라인 데모 기동 (TxCore)");
|
||||
|
||||
tx_register("RC_OL_0001", RC_OL_0001);
|
||||
|
||||
tx_log(TX_LOG_INFO, "등록 서비스 수 = %d", tx_service_count());
|
||||
printf("demo_rc_server 준비완료: 서비스 %d개 등록\n",
|
||||
tx_service_count());
|
||||
return 0;
|
||||
}
|
||||
24
app/common/demo_st_main.c
Normal file
24
app/common/demo_st_main.c
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* demo_st_main.c - 정산수수료 온라인 데모 부트스트랩 (링크 검증)
|
||||
*
|
||||
* 생성된 플래그십 서비스(ST_OL_0001)를 TxCore 레지스트리에 등록하여
|
||||
* 등록/디스패치/DBIO 링크 경로가 실제로 연결됨을 증명한다.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
|
||||
#include "txcore.h"
|
||||
|
||||
void ST_OL_0001(TXSVCINFO *ctx);
|
||||
|
||||
int main(void)
|
||||
{
|
||||
tx_set_loglevel(TX_LOG_INFO);
|
||||
tx_log(TX_LOG_INFO, "정산수수료 온라인 데모 기동 (TxCore)");
|
||||
|
||||
tx_register("ST_OL_0001", ST_OL_0001);
|
||||
|
||||
tx_log(TX_LOG_INFO, "등록 서비스 수 = %d", tx_service_count());
|
||||
printf("demo_st_server 준비완료: 서비스 %d개 등록\n",
|
||||
tx_service_count());
|
||||
return 0;
|
||||
}
|
||||
37
app/common/lg_cu_0001.c
Normal file
37
app/common/lg_cu_0001.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module lg @transform ledger-util */
|
||||
/*
|
||||
* lg_cu_0001.c - 원장 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "lg_cu_0001.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long lg_cu_0001_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long lg_cu_0001_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int lg_cu_0001_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/lg_cu_0002.c
Normal file
37
app/common/lg_cu_0002.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier hard @module lg @transform ledger-util */
|
||||
/*
|
||||
* lg_cu_0002.c - 원장 공통 유틸리티 (plain C) [tier=hard]
|
||||
*/
|
||||
#include "lg_cu_0002.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long lg_cu_0002_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long lg_cu_0002_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int lg_cu_0002_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/lg_cu_0003.c
Normal file
37
app/common/lg_cu_0003.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module lg @transform ledger-util */
|
||||
/*
|
||||
* lg_cu_0003.c - 원장 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "lg_cu_0003.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long lg_cu_0003_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long lg_cu_0003_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int lg_cu_0003_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/lg_cu_0004.c
Normal file
37
app/common/lg_cu_0004.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module lg @transform ledger-util */
|
||||
/*
|
||||
* lg_cu_0004.c - 원장 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "lg_cu_0004.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long lg_cu_0004_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long lg_cu_0004_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int lg_cu_0004_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/lg_cu_0005.c
Normal file
37
app/common/lg_cu_0005.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier medium @module lg @transform ledger-util */
|
||||
/*
|
||||
* lg_cu_0005.c - 원장 공통 유틸리티 (plain C) [tier=medium]
|
||||
*/
|
||||
#include "lg_cu_0005.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long lg_cu_0005_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long lg_cu_0005_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int lg_cu_0005_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/lg_cu_0006.c
Normal file
37
app/common/lg_cu_0006.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module lg @transform ledger-util */
|
||||
/*
|
||||
* lg_cu_0006.c - 원장 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "lg_cu_0006.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long lg_cu_0006_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long lg_cu_0006_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int lg_cu_0006_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/lg_cu_0007.c
Normal file
37
app/common/lg_cu_0007.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier medium @module lg @transform ledger-util */
|
||||
/*
|
||||
* lg_cu_0007.c - 원장 공통 유틸리티 (plain C) [tier=medium]
|
||||
*/
|
||||
#include "lg_cu_0007.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long lg_cu_0007_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long lg_cu_0007_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int lg_cu_0007_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/lg_cu_0008.c
Normal file
37
app/common/lg_cu_0008.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module lg @transform ledger-util */
|
||||
/*
|
||||
* lg_cu_0008.c - 원장 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "lg_cu_0008.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long lg_cu_0008_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long lg_cu_0008_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int lg_cu_0008_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/lg_cu_0009.c
Normal file
37
app/common/lg_cu_0009.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier medium @module lg @transform ledger-util */
|
||||
/*
|
||||
* lg_cu_0009.c - 원장 공통 유틸리티 (plain C) [tier=medium]
|
||||
*/
|
||||
#include "lg_cu_0009.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long lg_cu_0009_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long lg_cu_0009_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int lg_cu_0009_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/lg_cu_0010.c
Normal file
37
app/common/lg_cu_0010.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module lg @transform ledger-util */
|
||||
/*
|
||||
* lg_cu_0010.c - 원장 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "lg_cu_0010.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long lg_cu_0010_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long lg_cu_0010_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int lg_cu_0010_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/lg_cu_0011.c
Normal file
37
app/common/lg_cu_0011.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier hard @module lg @transform ledger-util */
|
||||
/*
|
||||
* lg_cu_0011.c - 원장 공통 유틸리티 (plain C) [tier=hard]
|
||||
*/
|
||||
#include "lg_cu_0011.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long lg_cu_0011_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long lg_cu_0011_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int lg_cu_0011_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/mg_cu_0001.c
Normal file
37
app/common/mg_cu_0001.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module mg @transform msg-gateway-util */
|
||||
/*
|
||||
* mg_cu_0001.c - 전문게이트웨이 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "mg_cu_0001.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long mg_cu_0001_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long mg_cu_0001_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int mg_cu_0001_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/mg_cu_0002.c
Normal file
37
app/common/mg_cu_0002.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier medium @module mg @transform msg-gateway-util */
|
||||
/*
|
||||
* mg_cu_0002.c - 전문게이트웨이 공통 유틸리티 (plain C) [tier=medium]
|
||||
*/
|
||||
#include "mg_cu_0002.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long mg_cu_0002_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long mg_cu_0002_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int mg_cu_0002_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/mg_cu_0003.c
Normal file
37
app/common/mg_cu_0003.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module mg @transform msg-gateway-util */
|
||||
/*
|
||||
* mg_cu_0003.c - 전문게이트웨이 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "mg_cu_0003.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long mg_cu_0003_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long mg_cu_0003_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int mg_cu_0003_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/mg_cu_0004.c
Normal file
37
app/common/mg_cu_0004.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier medium @module mg @transform msg-gateway-util */
|
||||
/*
|
||||
* mg_cu_0004.c - 전문게이트웨이 공통 유틸리티 (plain C) [tier=medium]
|
||||
*/
|
||||
#include "mg_cu_0004.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long mg_cu_0004_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long mg_cu_0004_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int mg_cu_0004_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/mg_cu_0005.c
Normal file
37
app/common/mg_cu_0005.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module mg @transform msg-gateway-util */
|
||||
/*
|
||||
* mg_cu_0005.c - 전문게이트웨이 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "mg_cu_0005.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long mg_cu_0005_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long mg_cu_0005_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int mg_cu_0005_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/mg_cu_0006.c
Normal file
37
app/common/mg_cu_0006.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier medium @module mg @transform msg-gateway-util */
|
||||
/*
|
||||
* mg_cu_0006.c - 전문게이트웨이 공통 유틸리티 (plain C) [tier=medium]
|
||||
*/
|
||||
#include "mg_cu_0006.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long mg_cu_0006_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long mg_cu_0006_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int mg_cu_0006_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/mg_cu_0007.c
Normal file
37
app/common/mg_cu_0007.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module mg @transform msg-gateway-util */
|
||||
/*
|
||||
* mg_cu_0007.c - 전문게이트웨이 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "mg_cu_0007.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long mg_cu_0007_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long mg_cu_0007_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int mg_cu_0007_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/mg_cu_0008.c
Normal file
37
app/common/mg_cu_0008.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier hard @module mg @transform msg-gateway-util */
|
||||
/*
|
||||
* mg_cu_0008.c - 전문게이트웨이 공통 유틸리티 (plain C) [tier=hard]
|
||||
*/
|
||||
#include "mg_cu_0008.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long mg_cu_0008_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long mg_cu_0008_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int mg_cu_0008_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/mg_cu_0009.c
Normal file
37
app/common/mg_cu_0009.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module mg @transform msg-gateway-util */
|
||||
/*
|
||||
* mg_cu_0009.c - 전문게이트웨이 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "mg_cu_0009.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long mg_cu_0009_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long mg_cu_0009_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int mg_cu_0009_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/mg_cu_0010.c
Normal file
37
app/common/mg_cu_0010.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier hard @module mg @transform msg-gateway-util */
|
||||
/*
|
||||
* mg_cu_0010.c - 전문게이트웨이 공통 유틸리티 (plain C) [tier=hard]
|
||||
*/
|
||||
#include "mg_cu_0010.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long mg_cu_0010_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long mg_cu_0010_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int mg_cu_0010_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/mg_cu_0011.c
Normal file
37
app/common/mg_cu_0011.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module mg @transform msg-gateway-util */
|
||||
/*
|
||||
* mg_cu_0011.c - 전문게이트웨이 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "mg_cu_0011.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long mg_cu_0011_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long mg_cu_0011_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int mg_cu_0011_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/mm_cu_0001.c
Normal file
37
app/common/mm_cu_0001.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module mm @transform master-util */
|
||||
/*
|
||||
* mm_cu_0001.c - 마스터 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "mm_cu_0001.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long mm_cu_0001_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long mm_cu_0001_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int mm_cu_0001_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/mm_cu_0002.c
Normal file
37
app/common/mm_cu_0002.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier hard @module mm @transform master-util */
|
||||
/*
|
||||
* mm_cu_0002.c - 마스터 공통 유틸리티 (plain C) [tier=hard]
|
||||
*/
|
||||
#include "mm_cu_0002.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long mm_cu_0002_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long mm_cu_0002_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int mm_cu_0002_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/mm_cu_0003.c
Normal file
37
app/common/mm_cu_0003.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module mm @transform master-util */
|
||||
/*
|
||||
* mm_cu_0003.c - 마스터 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "mm_cu_0003.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long mm_cu_0003_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long mm_cu_0003_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int mm_cu_0003_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/mm_cu_0004.c
Normal file
37
app/common/mm_cu_0004.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module mm @transform master-util */
|
||||
/*
|
||||
* mm_cu_0004.c - 마스터 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "mm_cu_0004.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long mm_cu_0004_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long mm_cu_0004_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int mm_cu_0004_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/mm_cu_0005.c
Normal file
37
app/common/mm_cu_0005.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier medium @module mm @transform master-util */
|
||||
/*
|
||||
* mm_cu_0005.c - 마스터 공통 유틸리티 (plain C) [tier=medium]
|
||||
*/
|
||||
#include "mm_cu_0005.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long mm_cu_0005_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long mm_cu_0005_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int mm_cu_0005_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/mm_cu_0006.c
Normal file
37
app/common/mm_cu_0006.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module mm @transform master-util */
|
||||
/*
|
||||
* mm_cu_0006.c - 마스터 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "mm_cu_0006.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long mm_cu_0006_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long mm_cu_0006_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int mm_cu_0006_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/mm_cu_0007.c
Normal file
37
app/common/mm_cu_0007.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier medium @module mm @transform master-util */
|
||||
/*
|
||||
* mm_cu_0007.c - 마스터 공통 유틸리티 (plain C) [tier=medium]
|
||||
*/
|
||||
#include "mm_cu_0007.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long mm_cu_0007_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long mm_cu_0007_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int mm_cu_0007_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/mm_cu_0008.c
Normal file
37
app/common/mm_cu_0008.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module mm @transform master-util */
|
||||
/*
|
||||
* mm_cu_0008.c - 마스터 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "mm_cu_0008.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long mm_cu_0008_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long mm_cu_0008_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int mm_cu_0008_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/mm_cu_0009.c
Normal file
37
app/common/mm_cu_0009.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier medium @module mm @transform master-util */
|
||||
/*
|
||||
* mm_cu_0009.c - 마스터 공통 유틸리티 (plain C) [tier=medium]
|
||||
*/
|
||||
#include "mm_cu_0009.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long mm_cu_0009_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long mm_cu_0009_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int mm_cu_0009_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/mm_cu_0010.c
Normal file
37
app/common/mm_cu_0010.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module mm @transform master-util */
|
||||
/*
|
||||
* mm_cu_0010.c - 마스터 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "mm_cu_0010.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long mm_cu_0010_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long mm_cu_0010_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int mm_cu_0010_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/mm_cu_0011.c
Normal file
37
app/common/mm_cu_0011.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier hard @module mm @transform master-util */
|
||||
/*
|
||||
* mm_cu_0011.c - 마스터 공통 유틸리티 (plain C) [tier=hard]
|
||||
*/
|
||||
#include "mm_cu_0011.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long mm_cu_0011_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long mm_cu_0011_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int mm_cu_0011_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/py_cu_0001.c
Normal file
37
app/common/py_cu_0001.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module py @transform payment-util */
|
||||
/*
|
||||
* py_cu_0001.c - 지급 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "py_cu_0001.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long py_cu_0001_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long py_cu_0001_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int py_cu_0001_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/py_cu_0002.c
Normal file
37
app/common/py_cu_0002.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier hard @module py @transform payment-util */
|
||||
/*
|
||||
* py_cu_0002.c - 지급 공통 유틸리티 (plain C) [tier=hard]
|
||||
*/
|
||||
#include "py_cu_0002.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long py_cu_0002_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long py_cu_0002_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int py_cu_0002_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/py_cu_0003.c
Normal file
37
app/common/py_cu_0003.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module py @transform payment-util */
|
||||
/*
|
||||
* py_cu_0003.c - 지급 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "py_cu_0003.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long py_cu_0003_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long py_cu_0003_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int py_cu_0003_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/py_cu_0004.c
Normal file
37
app/common/py_cu_0004.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier hard @module py @transform payment-util */
|
||||
/*
|
||||
* py_cu_0004.c - 지급 공통 유틸리티 (plain C) [tier=hard]
|
||||
*/
|
||||
#include "py_cu_0004.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long py_cu_0004_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long py_cu_0004_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int py_cu_0004_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/py_cu_0005.c
Normal file
37
app/common/py_cu_0005.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module py @transform payment-util */
|
||||
/*
|
||||
* py_cu_0005.c - 지급 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "py_cu_0005.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long py_cu_0005_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long py_cu_0005_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int py_cu_0005_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/py_cu_0006.c
Normal file
37
app/common/py_cu_0006.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module py @transform payment-util */
|
||||
/*
|
||||
* py_cu_0006.c - 지급 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "py_cu_0006.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long py_cu_0006_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long py_cu_0006_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int py_cu_0006_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/py_cu_0007.c
Normal file
37
app/common/py_cu_0007.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier medium @module py @transform payment-util */
|
||||
/*
|
||||
* py_cu_0007.c - 지급 공통 유틸리티 (plain C) [tier=medium]
|
||||
*/
|
||||
#include "py_cu_0007.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long py_cu_0007_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long py_cu_0007_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int py_cu_0007_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/py_cu_0008.c
Normal file
37
app/common/py_cu_0008.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module py @transform payment-util */
|
||||
/*
|
||||
* py_cu_0008.c - 지급 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "py_cu_0008.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long py_cu_0008_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long py_cu_0008_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int py_cu_0008_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/py_cu_0009.c
Normal file
37
app/common/py_cu_0009.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier medium @module py @transform payment-util */
|
||||
/*
|
||||
* py_cu_0009.c - 지급 공통 유틸리티 (plain C) [tier=medium]
|
||||
*/
|
||||
#include "py_cu_0009.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long py_cu_0009_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long py_cu_0009_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int py_cu_0009_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/py_cu_0010.c
Normal file
37
app/common/py_cu_0010.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module py @transform payment-util */
|
||||
/*
|
||||
* py_cu_0010.c - 지급 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "py_cu_0010.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long py_cu_0010_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long py_cu_0010_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int py_cu_0010_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/py_cu_0011.c
Normal file
37
app/common/py_cu_0011.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier medium @module py @transform payment-util */
|
||||
/*
|
||||
* py_cu_0011.c - 지급 공통 유틸리티 (plain C) [tier=medium]
|
||||
*/
|
||||
#include "py_cu_0011.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long py_cu_0011_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long py_cu_0011_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int py_cu_0011_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/rc_cu_0001.c
Normal file
37
app/common/rc_cu_0001.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module rc @transform reconciliation-util */
|
||||
/*
|
||||
* rc_cu_0001.c - 대사 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "rc_cu_0001.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long rc_cu_0001_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long rc_cu_0001_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int rc_cu_0001_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/rc_cu_0002.c
Normal file
37
app/common/rc_cu_0002.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier medium @module rc @transform reconciliation-util */
|
||||
/*
|
||||
* rc_cu_0002.c - 대사 공통 유틸리티 (plain C) [tier=medium]
|
||||
*/
|
||||
#include "rc_cu_0002.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long rc_cu_0002_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long rc_cu_0002_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int rc_cu_0002_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/rc_cu_0003.c
Normal file
37
app/common/rc_cu_0003.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module rc @transform reconciliation-util */
|
||||
/*
|
||||
* rc_cu_0003.c - 대사 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "rc_cu_0003.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long rc_cu_0003_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long rc_cu_0003_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int rc_cu_0003_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/rc_cu_0004.c
Normal file
37
app/common/rc_cu_0004.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier medium @module rc @transform reconciliation-util */
|
||||
/*
|
||||
* rc_cu_0004.c - 대사 공통 유틸리티 (plain C) [tier=medium]
|
||||
*/
|
||||
#include "rc_cu_0004.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long rc_cu_0004_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long rc_cu_0004_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int rc_cu_0004_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/rc_cu_0005.c
Normal file
37
app/common/rc_cu_0005.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module rc @transform reconciliation-util */
|
||||
/*
|
||||
* rc_cu_0005.c - 대사 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "rc_cu_0005.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long rc_cu_0005_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long rc_cu_0005_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int rc_cu_0005_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/rc_cu_0006.c
Normal file
37
app/common/rc_cu_0006.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier hard @module rc @transform reconciliation-util */
|
||||
/*
|
||||
* rc_cu_0006.c - 대사 공통 유틸리티 (plain C) [tier=hard]
|
||||
*/
|
||||
#include "rc_cu_0006.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long rc_cu_0006_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long rc_cu_0006_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int rc_cu_0006_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/rc_cu_0007.c
Normal file
37
app/common/rc_cu_0007.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module rc @transform reconciliation-util */
|
||||
/*
|
||||
* rc_cu_0007.c - 대사 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "rc_cu_0007.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long rc_cu_0007_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long rc_cu_0007_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int rc_cu_0007_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/rc_cu_0008.c
Normal file
37
app/common/rc_cu_0008.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier easy @module rc @transform reconciliation-util */
|
||||
/*
|
||||
* rc_cu_0008.c - 대사 공통 유틸리티 (plain C) [tier=easy]
|
||||
*/
|
||||
#include "rc_cu_0008.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long rc_cu_0008_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long rc_cu_0008_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int rc_cu_0008_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
37
app/common/rc_cu_0009.c
Normal file
37
app/common/rc_cu_0009.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* @tier medium @module rc @transform reconciliation-util */
|
||||
/*
|
||||
* rc_cu_0009.c - 대사 공통 유틸리티 (plain C) [tier=medium]
|
||||
*/
|
||||
#include "rc_cu_0009.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 수수료 계산: rate_bp 는 basis point(1bp=0.01%) */
|
||||
long rc_cu_0009_fee(long amount, int rate_bp)
|
||||
{
|
||||
long fee;
|
||||
if (amount <= 0 || rate_bp < 0)
|
||||
return 0;
|
||||
fee = (amount * (long)rate_bp) / 10000L;
|
||||
if (fee < 0)
|
||||
fee = 0;
|
||||
return fee;
|
||||
}
|
||||
|
||||
/* 절사(내림) 단위 정규화 */
|
||||
long rc_cu_0009_round_unit(long amount, long unit)
|
||||
{
|
||||
if (unit <= 0)
|
||||
return amount;
|
||||
return (amount / unit) * unit;
|
||||
}
|
||||
|
||||
/* 금액 구간 분류: 0=소액 1=일반 2=고액 */
|
||||
int rc_cu_0009_classify(long amount)
|
||||
{
|
||||
if (amount < 10000L)
|
||||
return 0;
|
||||
if (amount < 1000000L)
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue