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

📄 cms616.sqc

📁 一整套完整的银行卡系统源代码
💻 SQC
字号:
/**********************************************************************   源码文件名称 : cms616.SQC**   所属子系统   : CMS**   当前文件版本 : 4.0.0.0**   作者         : ZhouR**   版本创建日期 : 2004/10/15**   功能描述     : 卡写磁登记簿查询**   修改记录     :**   修改人       修改日期     修改日期*********************************************************************/#include "code.h"#include "attrdef.h"#include "sysdef.h"#include "pubcom.h"#include "cmscode.h"#include <stdio.h>#include "cmswritem.h"EXEC SQL INCLUDE SQLCA;/*********************************************************   函数名称: cms216016**   功能描述:卡写磁登记簿查询**   输入参数:**             acBeginDate   	----  起始日期**             acEndDate	   	----  终止日期**             acCardNo		   	----  卡号**   输出参数:****             **   返回结果: 0: 签约  -1: 失败    1: 未签约**   作        者 : ZhouR**   版本创建日期 : 2004/09/20**   修改记录     :**   修改人       修改日期     修改位置*******************************************************/int cms216016( PUBCOM *pstPubcom ){	/*定义局部变量*/	struct  cmswritem 	 stCmsWriteM; 			/* 卡写磁登记簿 */	char    acBeginDate[DATE_LEN + 1]; 		   	/* 起始日期 */	char    acEndDate[DATE_LEN + 1]; 		    /* 终止日期 */	char    acCardNo[CARDNO_LEN + 1]; 		    /* 卡号 */	char    acFileName[FILENAME_LEN + 1];       /* 文件名称 */	char    acTableName[PRDCODE_LEN + 1];       /* 表名称 */	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];	FILE    *fp;								/* 文件指针     */	strcpy( g_acRspMsg, "子交易: 卡写磁登记簿查询子交易开始.." );	TRCLOG4	/* 初始化 */	memset( &stCmsWriteM, 		0x00,   sizeof( struct cmswritem ) );	memset( acBeginDate,        0x00,   sizeof( acBeginDate ) );	memset( acEndDate,   	    0x00,   sizeof( acEndDate ) );	memset( acCardNo,        	0x00,   sizeof( acCardNo ) );	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 ) );    /* 取数据字典值 */	getstring( "BeginDate1",         acBeginDate   );	getstring( "EndDate1",   	 	 acEndDate    );	getstring( "CardNo", 		     acCardNo );	sprintf( g_acTrcMsg,"BeginDate1[%s]EndDate1[%s]CardNo[%s]",						 acBeginDate,acEndDate,acCardNo );	TRCLOG3	if( GenSqlCmd( "216016" , acSelStr ) )	{		ERRLOG		goto Exit;	}    /* 定义日期区间 */	if ( strcmp ( acBeginDate, "1899-12-31" ) )	{		sprintf( acWhrStr1, "and writedate >= '%s'", acBeginDate );	}	if ( strcmp ( acEndDate,"1899-12-31") )	{		sprintf( acWhrStr2, "and writedate <= '%s'", acEndDate );	}	if ( strlen ( acCardNo ) > 0 )	{		sprintf( acWhrStr3, "and cardno = '%s'", acCardNo );		strcpy( g_acTrcMsg, "acWhrStr3" );		TRCLOG3;	}	sprintf( acWhrStr4, "ORDER BY writedate, cardno, serseqno DESC" );	sprintf(acWhrStr, " where 1=1 %s %s %s %s ", 			acWhrStr1,acWhrStr2,acWhrStr3,acWhrStr4 );	strcpy( acTableName, "cms616" );	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 , "216016" ))	{		ERRLOG		goto Exit;	}	/* 准备数据 */	sprintf( g_acTrcMsg, "%s%s" ,acSelStr,acWhrStr);	TRCLOG3	if ( DBSelect( "cmswritem", acSelStr, acWhrStr, fp ) )	{		ERRLOG 	    goto Exit;	}	/* 出口赋值 */Exit:	EndFile( fp );	if( !strcmp( g_acRspCode, RSP_OK ) )	{		SetInqFormid(pstPubcom, "216016") ;		sprintf( g_acTrcMsg,"卡写磁登记簿查询正常结束");		TRCLOG4		return SUCCESS;	}	else	{		sprintf( g_acTrcMsg,"卡写磁登记簿查询失败");		TRCLOG4		return FAILED ;	}}

⌨️ 快捷键说明

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