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

📄 cms557.sqc

📁 一整套完整的银行卡系统源代码
💻 SQC
字号:
/******************************************************************** **   源码文件名称 : cms557.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 cmsCardReturnPro( PUBCOM *pstPubcom ){	/*定义局部变量*/	struct	cmscardinfo		stCardInfo;	struct	cmsholdm		stHoldM;	struct	cmsacctm		stAcctM;	char	acCardStat[ BIT21_LEN ][BIT11_LEN];	/* 卡状态检查标志	*/	int		iNumx;								/* 数组计数器		*/	int		iNumy;								/* 数组计数器		*/	int		iRtn;	strcpy( g_acTrcMsg, "子交易: 卡归还处理交易开始..." );	TRCLOG4	memset( &stCardInfo,  0x00, sizeof ( struct  cmscardinfo ) ); 	memset( &stHoldM   ,  0x00, sizeof ( struct  cmsholdm    ) ); 	memset( &stAcctM   ,  0x00, sizeof ( struct  cmsacctm    ) ); 	/* 卡检查状态数组全置未不检查 */	for ( iNumx = 0; iNumx < BIT21_LEN; iNumx ++ )		for ( iNumy = 0; iNumy < BIT11_LEN; iNumy ++ )			acCardStat[iNumx][iNumy] = CHECK_NO;	pubInitCmsholdm();	/* 取数据字典值 */	getstring( "CardNo",	stCardInfo.cardno			); /*卡号  */			/* 获取卡片信息表 */ 	if( pubReadCmscardinfo( &stCardInfo ) ) 	{		if ( SQLCODE == SQLNOTFOUND )			sprintf( g_acRspMsg, "卡号[%s]不存在", stCardInfo.cardno );		ERRLOG		goto Exit;	}	/* 检查卡状态是否正常 */	acCardStat[ BIT1_LEN ][ BIT1_LEN ] = CHECK_YES;	/* 检查销卡		*/	acCardStat[ BIT8_LEN ][ BIT1_LEN ] = CHECK_YES;	/* 检查换卡		*/	acCardStat[ BIT14_LEN ][ BIT1_LEN ] = CHECK_YES; 	iRtn = cmsApiChkCardStatIsNormal( &stCardInfo, acCardStat );	if ( iRtn )	{		ERRLOG		return FAILED;	}		/* 获取卡没收归还登记簿*/	getstring( "HoldDate"		,	stHoldM.holddate  	 		);	strcpy( stHoldM.cardno     	, stCardInfo.cardno			);	stHoldM.retflag[BIT1_LEN]=NORETURN;	/*	if( pubReadCmsholdm( &stHoldM ) ) 	{		ERRLOG		goto Exit;	}	*/	pubStoVCmsholdm( &stHoldM );	EXEC SQL	SELECT * INTO R_CMSHOLDM				FROM  cmsholdm				WHERE cardno = :cmsholdm_cardno				AND	  holddate = :cmsholdm_holddate				AND	  retflag = :cmsholdm_retflag ;	if( SQLCODE )	{		strcpy( g_acRspCode, "999996" );             		/* 数据库读错误 */                           		pubCrtRspInfo( "cmsholdm",SQLCODE );         		pubErrLog( __LINE__, __FILE__, g_acRspMsg ); 		goto Exit;	}	pubVtoSCmsholdm( &stHoldM);		/*修改卡片信息*/	stCardInfo.cardstat[BIT5_LEN]=BIT5_CARDOK;	strcpy( stCardInfo.chgdate,	pstPubcom->acTranDate	);	if( pubModiCmscardinfo( &stCardInfo ) )	{		ERRLOG		goto Exit;	}	/*修改卡没收归还登记簿赋值*/	stHoldM.retflag[BIT1_LEN]=RETURNED;	strcpy( stHoldM.retdate  	,	pstPubcom->acTranDate		);	strcpy( stHoldM.retbrc   	,	pstPubcom->acBrc      		);	strcpy( stHoldM.retteller	,	pstPubcom->acTeller  		);	strcpy( stHoldM.authteller	,	pstPubcom->acAteller  		);	stHoldM.retserseqno=pstPubcom->lSerSeqNo;	strcpy( stHoldM.retobrname	,	pstPubcom->acBrcName 		);	getstring( "CustName"		,	stHoldM.retoname			);	getstring( "IdType"			,	stHoldM.retoidtype			);	getstring( "IdCode"			,	stHoldM.retoidcode			);	/*修改卡没收归回登记簿*/	if( pubModiCmsholdm( &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 + -