⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cs.h

📁 商业银行前置系统
💻 H
📖 第 1 页 / 共 2 页
字号:
/*
 * This is a part of the Application Preconsole
 * - Channel Access - ABIS.
 * Copyright (C) 2001-2001 ABC.SDC.
 * All rights reserved.
 *
 * This source code is only intended as a supplement to the
 * Application Preconsole Reference and related
 * electronic documentation provided with the library.
 * See these sources for detailed information regarding the
 * Application Preconsole product. 
 *
 * Update record:
 * 2001-09-17 Chang Yong   - create private declaration file
 *                           for card service
 */

#ifndef __CS_H__
#define __CS_H__

/*
 * Constant macros defined in this file
 */
 
/*
 * Transaction code constant macros
 */

#define TRANSCODE_CS_TRANSFERIN  4210
#define TRANSCODE_CS_TRANSFEROUT 4211
#define TRANSCODE_CS_DEPOSIT     4212
#define TRANSCODE_CS_WITHDRAW    4213
#define TRANSCODE_CS_REFUND      4214 
#define TRANSCODE_CS_QUERYBAL    4215
#define TRANSCODE_CS_CHANGEPIN   4216
#define TRANSCODE_CS_LOST        4217
#define TRANSCODE_CS_AUTH        4218
#define TRANSCODE_CS_CANCEL      4219

/* 
 * Type constant macros
 */

#define AUTHTYPE_CONSUME     "0000"
#define AUTHTYPE_WITHDRAW    "0001"
#define AUTHTYPE_TRANSFEROUT "0002"

/*
 * Length constant macros
 */

#define LEN_ACCNAME    AP_LEN_ACCNAME
#define LEN_ACCPWD     AP_LEN_ACCPWD
#define LEN_CERTTYPE   AP_LEN_CERTTYPE
#define LEN_CERTNO     AP_LEN_CERTNO
#define LEN_AUTHCODE   AP_LEN_AUTHCODE
#define LEN_TRACK2     AP_LEN_TRACK2
#define LEN_TRACK3     AP_LEN_TRACK3
#define LEN_EXPDATE    AP_LEN_EXPDATE
#define LEN_MERCHNO    AP_LEN_MERCHNO
#define LEN_VOUCHNO    AP_LEN_VOUCHNO
#define LEN_BATCHNO    AP_LEN_BATCHNO
#define LEN_ADDACCTYPE AP_LEN_ACCTYPE
#define LEN_AUTHTYPE   4
#define LEN_COMMENT    20
#define LEN_STAFFCARD  2
#define LEN_ENTRYMODE  3
#define LEN_CANCELLAST 4

/*
 * Format constant macros
 */

#define FMT_CSI10_A "%19s%4s%19.2lf%20s%2S%37s%104s%3s%19.2lf"
#define FMT_CSO10   "%40s%19.2lf%19.2lf%19.2lf%4s%6s%12s%2d%864s%19.2lf"

#define FMT_CSI11_A "%19s%4s%6s%19.2lf%3s%37s%104s%3s%20s%2S"
#define FMT_CSO11   "%40s%19.2lf%19.2lf%19.2lf%4s%6s%12s%2d%864s%19.2lf"

#define FMT_CSI12_A "%19s%4s%19.2lf%20s%2S%37s%104s%3s%19.2lf"
#define FMT_CSO12   "%40s%19.2lf%19.2lf%19.2lf%4s%6s%12s%2d%864s%19.2lf"

#define FMT_CSI13_A "%19s%4s%6s%19.2lf%3s%37s%104s%20s%2S"
#define FMT_CSO13   "%40s%19.2lf%19.2lf%19.2lf%4s%6s%12s%2d%864s%19.2lf"

#define FMT_CSI14_A "%19s%4s%19.2lf%15s%6s%6s%8s%37s%104s%3s"
#define FMT_CSO14   "%40s%19.2lf%19.2lf%6s%864s%12"

#define FMT_CSI15_A "%19s%4s%6s%3s%37s%104s"
#define FMT_CSO15   "%40s%19.2lf%19.2lf%12s"

#define FMT_CSI16_A "%19s%3s%37s%104s%4s%6s%6s"

#define FMT_CSI17_A "%19s%4s%6s%1s%18s"
#define FMT_CSO17   "%40s%19.2lf%12s"

#define FMT_CSI18_A "%19s%4s%19.2lf%4s%1s%18s%15s%37s%104s"
#define FMT_CSO18   "%6s%19.2lf%19.2lf%4s%12s"

#define FMT_CSI19_A "%4ld%19s%4s%19.2lf%8s%9ld%37s%104s%3s%5s"

/*
 * Variable macros
 */

#define VAR_CSI10_A csi10stru.szAccNo, csi10stru.szExpDate, \
                    &csi10stru.dAmt, csi10stru.szComment, \
                    csi10stru.szStaffCard, \
                    csi10stru.szTrack2, csi10stru.szTrack3, \
                    csi10stru.szEntryMode, &csi10stru.dFee 
#define VAR_CSO10   cso10stru.szAccName,  cso10stru.dBal, \
                    cso10stru.dAvailBal, cso10stru.dFee, \
                    cso10stru.szCityCode, cso10stru.szAuthCode, \
                    cso10stru.szRespSeqNo, atoi(szVchNum), szVchArea, \
                    cso10stru.dLocalFee

#define VAR_CSI11_A csi11stru.szAccNo, csi11stru.szExpDate, \
                    csi11stru.szAccPwd, &csi11stru.dAmt, \
                    csi11stru.szEntryMode, csi11stru.szTrack2, \
                    csi11stru.szTrack3, csi11stru.szAddAccType, \
                    csi11stru.szComment, csi11stru.szStaffCard
#define VAR_CSO11   cso11stru.szAccName, cso11stru.dBal, \
                    cso11stru.dAvailBal, cso11stru.dFee, \
                    cso11stru.szCityCode, cso11stru.szAuthCode, \
                    cso11stru.szRespSeqNo, atoi(szVchNum), szVchArea, \
                    cso11stru.dLocalFee

#define VAR_CSI12_A csi12stru.szAccNo, csi12stru.szExpDate, \
                    &csi12stru.dAmt, csi12stru.szComment, \
                    csi12stru.szStaffCard, \
                    csi12stru.szTrack2, csi12stru.szTrack3, \
                    csi12stru.szEntryMode, &csi12stru.dFee
#define VAR_CSO12   cso12stru.szAccName, cso12stru.dBal, \
                    cso12stru.dAvailBal, cso12stru.dFee, \
                    cso12stru.szCityCode, cso12stru.szAuthCode, \
                    cso12stru.szRespSeqNo, atoi(szVchNum), szVchArea, \
                    cso12stru.dLocalFee
                    
#define VAR_CSI13_A csi13stru.szAccNo, csi13stru.szExpDate, \
                    csi13stru.szAccPwd, &csi13stru.dAmt,\
                    csi13stru.szEntryMode, csi13stru.szTrack2, \
                    csi13stru.szTrack3, csi13stru.szComment, \
                    csi13stru.szStaffCard 
#define VAR_CSO13   cso13stru.szAccName, cso13stru.dBal, \
                    cso13stru.dAvailBal, cso13stru.dFee, \
                    cso13stru.szCityCode, cso13stru.szAuthCode, \
                    cso13stru.szRespSeqNo, atoi(szVchNum), szVchArea, \
                    cso13stru.dLocalFee

#define VAR_CSI14_A csi14stru.szAccNo, csi14stru.szExpDate, \
                    &csi14stru.dAmt, csi14stru.szMerchNo, \
                    csi14stru.szVouchNo, csi14stru.szBatchNo, \
                    csi14stru.szOrgReqId, csi14stru.szTrack2, \
                    csi14stru.szTrack3, csi14stru.szEntryMode
#define VAR_CSO14   cso14stru.szAccName, cso14stru.dBal, \
                    cso14stru.dAvailBal, cso14stru.szAuthCode,\
                    szVchArea, cso14stru.szRespSeqNo
                                        
#define VAR_CSI15_A csi15stru.szAccNo, csi15stru.szExpDate, \
                    csi15stru.szAccPwd, csi15stru.szEntryMode, \
                    csi15stru.szTrack2, csi15stru.szTrack3
#define VAR_CSO15   cso15stru.szAccName, cso15stru.dBal, \
                    cso15stru.dAvailBal, cso15stru.szRespSeqNo
                    
#define VAR_CSI16_A csi16stru.szAccNo, csi16stru.szEntryMode, \
                    csi16stru.szTrack2, csi16stru.szTrack3, \
                    csi16stru.szExpDate, csi16stru.szAccPwd, \
                    csi16stru.szAccNewPwd                  
                    
#define VAR_CSI17_A csi17stru.szAccNo, csi17stru.szExpDate, \
                    csi17stru.szAccPwd, csi17stru.szCertType, \
                    csi17stru.szCertNo
#define VAR_CSO17   cso17stru.szAccName, cso17stru.dBal, \
                    cso17stru.szRespSeqNo
                    
#define VAR_CSI18_A csi18stru.szAccNo, csi18stru.szExpDate, \
                    &csi18stru.dAmt, csi18stru.szAuthType, \
                    csi18stru.szCertType, csi18stru.szCertNo, \
                    csi18stru.szMerchNo, csi18stru.szTrack2, \
                    csi18stru.szTrack3
#define VAR_CSO18   cso18stru.szAuthCode, cso18stru.dBal, \
                    cso18stru.dAvailBal, cso18stru.szCityCode, \
                    cso18stru.szRespSeqNo
                    
#define VAR_CSI19_A &csi19stru.nOrgTransCode, csi19stru.szAccNo, \
                    csi19stru.szExpDate, &csi19stru.dAmt, \
                    csi19stru.szOrgVchNo, &csi19stru.nOrgJrnNo, \
                    csi19stru.szTrack2, csi19stru.szTrack3, \
                    csi19stru.szEntryMode, csi19stru.szCancelLast

/*
 * Entry mode constant macros
 */

#define ENTRYMODE_KEYBOARD  "001"
#define ENTRYMODE_BRUSHCARD "002" 

/*
 * Types and structures declared in this file
 */

/*
 * TransferIn Input Area structure
 */

typedef struct tagCSI10STRU
{
    char   szAccNo[LEN_ACCNO + 1];          /* 卡号 */
    char   szExpDate[LEN_EXPDATE + 1];      /* 有效期 */
    double dAmt;                            /* 交易金额 */
    char   szComment[LEN_COMMENT + 1];      /* 摘要 */ 
    char   szStaffCard[LEN_STAFFCARD + 1];  /* 员工卡标识 */
    char   szTrack2[LEN_TRACK2 + 1];        /* 第二磁道 */
    char   szTrack3[LEN_TRACK3 + 1];        /* 第三磁道 */
    char   szEntryMode[LEN_ENTRYMODE + 1];  /* 输入方式 */
    double dFee;       
        
} CSI10STRU;

typedef CSI10STRU *       PCSI10STRU;
typedef const CSI10STRU   CCSI10STRU;
typedef const CSI10STRU * PCCSI05STRU;

/*
 * TransferIn Output Area structure
 */

typedef struct tagCSO10STRU 
{
    char   szAccName[LEN_ACCNAME + 1];      /* 姓名 */
    double dBal;                            /* 帐户余额 */
    double dAvailBal;                       /* 可用余额 */
    double dFee;                            /* 交易手续费 */
    char   szCityCode[LEN_CITYCODE + 1];    /* 受理行城市代码 */
    char   szAuthCode[LEN_AUTHCODE + 1];
    char   szRespSeqNo[LEN_SEQNO + 1]; 
    double dLocalFee;                       /* 本中心应收手续费*/

} CSO10STRU;

typedef CSO10STRU *       PCSO10STRU;
typedef const CSO10STRU   CCSO10STRU;
typedef const CSO10STRU * PCCSO10STRU;

/*
 * TransferOut Input Area structure
 */

typedef struct tagCSI11STRU
{
    char   szAccNo[LEN_ACCNO + 1];              /* 卡号 */
    char   szExpDate[LEN_EXPDATE + 1];          /* 有效期 */
    char   szAccPwd[LEN_ACCPWD + 1];            /* 密码 */
    double dAmt;                                /* 交易金额 */
    char   szEntryMode[LEN_ENTRYMODE + 1];      /* 输入方式 */
    char   szTrack2[LEN_TRACK2 + 1];            /* 第二磁道 */
    char   szTrack3[LEN_TRACK3 + 1];            /* 第三磁道 */
    char   szAddAccType[LEN_ADDACCTYPE + 1];    /* 转入帐户类型(计算手续费) */
    char   szComment[LEN_COMMENT + 1];          /* 摘要 */
    char   szStaffCard[LEN_STAFFCARD + 1];      /* 员工卡标识 */ 

} CSI11STRU;

typedef CSI11STRU *       PCSI11STRU;
typedef const CSI11STRU   CCSI11STRU;
typedef const CSI11STRU * PCCSI11STRU;

/*
 * TransferOut Output Area structure
 */

typedef struct tagCSO11STRU
{
    char   szAccName[LEN_ACCNAME + 1];      /* 姓名 */
    double dBal;                            /* 帐户余额 */
    double dAvailBal;                       /* 可用余额 */
    double dFee;                            /* 交易手续费 */
    char   szCityCode[LEN_CITYCODE + 1];    /* 受理行城市代码 */
    char   szAuthCode[LEN_AUTHCODE + 1];
    char   szRespSeqNo[LEN_SEQNO + 1];
    double dLocalFee;                       /* 本中心应收手续费*/

} CSO11STRU; 

typedef CSO11STRU *       PCSO11STRU;
typedef const CSO11STRU   CCSO11STRU;
typedef const CSO11STRU * PCCSO11STRU;

/*
 * Deposit Input Area structure
 */

typedef struct tagCSI12STRU
{

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -