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

📄 cms604.sqc

📁 一整套完整的银行卡系统源代码
💻 SQC
字号:
/**********************************************************************   源码文件名称 : cms604.SQC**   所属子系统   : CMS**   当前文件版本 : 4.0.0.0**   作者         : ZhouR**   版本创建日期 : 2004/09/xx**   功能描述     : 客户止付登记簿查询**   修改记录     :**   修改人       修改日期     修改日期*********************************************************************/#include "code.h"#include "attrdef.h"#include "sysdef.h"#include "pubcom.h"#include "cmscode.h"#include <stdio.h>#include "cmscuststopm.h"EXEC SQL INCLUDE SQLCA;/*********************************************************   函数名称: cms216004**   功能描述:客户止付登记簿查询**   输入参数:**             acMainCardNo  ----  主卡卡号**             acAcceCardNo  ----  副卡卡号**             acBeginDate   ----  起始止付日期**             acEndDate     ----  终止止付日期**             acCnclBegDate ----  起始解止付日期**             acCnclEndDate ----  终止解止付日期**   输出参数:**             **   返回结果: 0: 签约  -1: 失败    1: 未签约**   作        者 : ZhouR**   版本创建日期 : 2004/09/20**   修改记录     :**   修改人       修改日期     修改位置*******************************************************/int cms216004( PUBCOM *pstPubcom ){	/*定义局部变量*/	struct  cmscuststopm     stCmsCustStopm; 	/* 客户止付登记簿 */	char	acMainCardNo[CARDNO_LEN + 1];       /* 主卡卡号 */	char	acAcceCardNo[CARDNO_LEN + 1];   	/* 副卡卡号 */	char	acBeginDate[DATE_LEN + 1];   	    /* 起始止付日期 */	char	acEndDate[DATE_LEN + 1];    	    /* 终止止付日期 */	char	acCnclBegDate[DATE_LEN + 1];	    /* 起始解止付日期 */	char	acCnclEndDate[DATE_LEN + 1];  		/* 终止解止付日期 */	char    acAplyBrc[ BRC_LEN + 1 ];			/* 申请机构     */	char    acFileName[FILENAME_LEN + 1];       /* 文件名称 */	char    acTableName[51]; 	    			/* 表名称 */	char	acSelStr[CONDITION_LEN + 1];	char	acWhrStr[CONDITION_LEN + 1];	char	acWhrStr1[CONDITION_LEN + 1];	char	acWhrStr2[CONDITION_LEN + 1];	char	acWhrStr3[CONDITION_LEN + 1];	char	acWhrStr4[CONDITION_LEN + 1];	char	acWhrStr5[CONDITION_LEN + 1];	char	acWhrStr6[CONDITION_LEN + 1];	char	acWhrStr7[CONDITION_LEN + 1];	FILE    *fp;								/* 文件指针     */	strcpy( g_acRspMsg, "子交易: 客户止付登记簿查询子交易开始.." );	TRCLOG4;	/* 初始化 */	memset( &stCmsCustStopm,    0x00,   sizeof( struct cmscuststopm ) );	memset( acMainCardNo,       0x00,   sizeof( acMainCardNo ) );	memset( acAcceCardNo,       0x00,   sizeof( acAcceCardNo ) );	memset( acBeginDate,        0x00,   sizeof( acBeginDate ) );	memset( acEndDate,          0x00,   sizeof( acEndDate ) );	memset( acCnclBegDate,      0x00,   sizeof( acCnclBegDate ) );	memset( acCnclEndDate,      0x00,   sizeof( acCnclEndDate ) );	memset( acAplyBrc,     		0x00, sizeof( acAplyBrc ) );	memset( acFileName,        	0x00,   sizeof( acFileName ) );	memset( acTableName,        0x00,   sizeof( acTableName ) );	memset( acSelStr,           0x00,   sizeof( acSelStr ) );	memset( acWhrStr,           0x00,   sizeof( acWhrStr ) );	memset( acWhrStr1,          0x00,   sizeof( acWhrStr1 ) );	memset( acWhrStr2,          0x00,   sizeof( acWhrStr2 ) );	memset( acWhrStr3,          0x00,   sizeof( acWhrStr3 ) );	memset( acWhrStr4,          0x00,   sizeof( acWhrStr4 ) );	memset( acWhrStr5,          0x00,   sizeof( acWhrStr5 ) );	memset( acWhrStr6,          0x00,   sizeof( acWhrStr6 ) );	memset( acWhrStr7,          0x00,   sizeof( acWhrStr7 ) );    /* 取数据字典值 */	getstring( "CardNo1",        acMainCardNo    );	getstring( "CardNo2",        acAcceCardNo    );	getstring( "BeginDate1",     acBeginDate );	getstring( "EndDate1",  	 acEndDate   );	getstring( "BeginDate2",  	 acCnclBegDate   );	getstring( "EndDate2",  	 acCnclEndDate   );	sprintf( g_acTrcMsg,"BeginDate1[%s]EndDate1[%s]CardNo1[%s]CardNo2[%s]	\						 BeginDate2[%s]EndDate2[%s]",acBeginDate,acEndDate,	\						 acMainCardNo,acAcceCardNo,acCnclBegDate,acCnclEndDate);	TRCLOG3    /*检查交易机构是否为中心机构,如果是,则申请机构可以为空,否则当申请机构为空时,将交易机构付给申请机构 */	if (!strcmp( pstPubcom->acBrcType, BRCTYPE_SITE)) /* 营业网点 */	{		if (strlen(acAplyBrc) == 0)		{			strcpy( acAplyBrc, pstPubcom->acBrc );			}		if (strcmp( pstPubcom->acBrc, acAplyBrc))		{        	strcpy( g_acRspCode, "CMS214" );			pubCrtRspInfo( );			ERRLOG			goto Exit;		}	}	if( GenSqlCmd( "216004" , acSelStr ) )	{		ERRLOG 	    goto Exit;	}    /* 定义换卡日期区间 */	if ( strlen ( acMainCardNo ) > 0 )	{		sprintf( acWhrStr1, "and maincardno = '%s'", acMainCardNo );	}	if ( strlen ( acAcceCardNo ) > 0 )	{		sprintf( acWhrStr2, "and accecardno = '%s'", acAcceCardNo );	}	if ( strcmp( acBeginDate,"1899-12-31" ) )	{		sprintf( acWhrStr3, "and stopdate >= '%s'", acBeginDate );	}	if ( strcmp ( acEndDate,"1899-12-31") )	{		sprintf( acWhrStr4, "and stopdate <= '%s'", acEndDate );	}	if ( strcmp( acCnclBegDate,"1899-12-31" ) )	{		sprintf( acWhrStr5, "and cncldate >= '%s'", acCnclBegDate );	}	if ( strcmp ( acCnclEndDate,"1899-12-31") )	{		sprintf( acWhrStr6, "and cncldate <= '%s'", acCnclEndDate );	}	sprintf( acWhrStr7, "ORDER BY stopdate, maincardno, stopserseqno DESC" ); 	sprintf(acWhrStr, " where 1=1 %s %s %s %s %s %s %s ", 						acWhrStr1,acWhrStr2,acWhrStr3,acWhrStr4,acWhrStr5,acWhrStr6,acWhrStr7 );	strcpy( g_acTrcMsg, "acWhrStr" );	TRCLOG3;	strcpy( acTableName, "cms604" );	sprintf(acFileName, "%s%s%s", acTableName, pstPubcom->acBrc,								  pstPubcom->acTeller);	fp = (FILE *)BeginFile( pstPubcom, acFileName );	if ( fp == NULL )	{		strcpy( g_acRspMsg, "DPS902" );		pubCrtRspInfo( );		ERRLOG		goto Exit;	}	/*组织查询字典*/	if(GetInqDict( fp , "216004" ))	{		ERRLOG		goto Exit;	}	/* 准备数据 */	sprintf( g_acTrcMsg, "%s%s" ,acSelStr,acWhrStr);	TRCLOG3	if ( DBSelect( "cmscuststopm", acSelStr, acWhrStr, fp ) )	{		ERRLOG 	    goto Exit;	}	/* 出口赋值 */Exit:	EndFile( fp );	if( !strcmp( g_acRspCode, RSP_OK ) )	{		SetInqFormid(pstPubcom,"216004") ;		sprintf( g_acTrcMsg,"客户止付登记簿查询正常结束");		TRCLOG4		return SUCCESS;	}	else	{		sprintf( g_acTrcMsg,"客户止付登记簿查询失败");		TRCLOG4		return FAILED ;	}}

⌨️ 快捷键说明

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