📄 cms556.sqc
字号:
/******************************************************************** ** 源码文件名称 : cms556.SQC ** 所属子系统 : CMS ** 当前文件版本 : 1.0.0.0 ** 作者 : UCCB ALEX ** 版本创建日期 : 2004/10/13 ** 功能描述 : 卡没收处理子交易 ** 修改记录 : ** 修改人 修改日期 修改日期*********************************************************************/#include "code.h"#include "attrdef.h"#include "sysdef.h"#include "pubcom.h"#include "cmscode.h"#include "cmscardinfo.h"#include "cmsholdm.h"#include "cmsacctm.h"EXEC SQL INCLUDE SQLCA;int cmsCardFiscatePro( PUBCOM *pstPubcom ){ /*定义局部变量*/ struct cmscardinfo stCardInfo; struct cmsholdm stHoldM; struct cmsacctm stAcctM; strcpy( g_acTrcMsg, "子交易: 卡没收处理交易开始..." ); TRCLOG4; memset( &stCardInfo, 0x00, sizeof ( struct cmscardinfo ) ); memset( &stHoldM , 0x00, sizeof ( struct cmsholdm ) ); memset( &stAcctM , 0x00, sizeof ( struct cmsacctm ) ); /* 取数据字典值 */ getstring( "CardNo", stCardInfo.cardno ); /*卡号 */ /* 获取卡片信息表 */ if( pubReadCmscardinfo( &stCardInfo ) ) { if ( SQLCODE == SQLNOTFOUND ) sprintf( g_acRspMsg, "卡号[%s]不存在", stCardInfo.cardno ); ERRLOG goto Exit; } if ( stCardInfo.cardstat[BIT5_LEN] == BIT5_CARDHOLD ) { /* 已经没收 */ strcpy( g_acRspCode, "CMS160" ); pubCrtRspInfo( stCardInfo.cardno ); ERRLOG goto Exit; } /*修改卡片信息*/ stCardInfo.cardstat[BIT5_LEN]=BIT5_CARDHOLD; strcpy( stCardInfo.chgdate, pstPubcom->acTranDate ); if( pubModiCmscardinfo( &stCardInfo ) ) { ERRLOG goto Exit; } /*登记卡没收归还登记簿赋值*/ strcpy( stHoldM.cardno , stCardInfo.cardno ); strcpy( stHoldM.holddate , pstPubcom->acTranDate ); stHoldM.serseqno=pstPubcom->lSerSeqNo; sprintf( stHoldM.vouchno,"%s%08d",pstPubcom->acTranDate8,pstPubcom->lSerSeqNo ); stHoldM.retflag[BIT1_LEN]=NORETURN; strcpy( stHoldM.holdteller , pstPubcom->acTeller ); strcpy( stHoldM.holdbrc , pstPubcom->acBrc ); getstring( "HoldReason" , stHoldM.holdreason ); /*登记卡没收归回登记簿*/ if( pubInstCmsholdm( &stHoldM ) ) { ERRLOG goto Exit; } if( cmsApiInsTranLog( pstPubcom, &stCardInfo, &stAcctM, "没还", "卡没收归还") ) { ERRLOG goto Exit; } /* 子交易出口 */ strcpy( g_acTrcMsg, "子交易: 卡没收处理结束" ); TRCLOG4Exit: if( !strcmp( g_acRspCode, RSP_OK ) ) return SUCCESS; else return FAILED ; return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -