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

📄 cms615.sqc

📁 一整套完整的银行卡系统源代码
💻 SQC
字号:
/******************************************************************** **   源码文件名称 : cms601.SQC **   所属子系统   : CMS  **   当前文件版本 : 1.0.0.0 **   作        者 : XL  **   版本创建日期 : 2004/10/20 **   功能描述     : 锁卡登记簿查询 **   修改记录     : **   修改人       修改日期     修改日期*********************************************************************/#include    "sysdefine.h"#include	"pubcom.h"#include	"funcapi.h"#include    <stdio.h>#include    "code.h"#include    "attrdef.h"#include    "cmscode.h"#include	"cmslockm.h"EXEC SQL INCLUDE SQLCA;/*********************************************************   函数名称: cms216015**   功能描述:锁卡登记簿查询**   输入参数:**             acBeginDate       ----  起始锁卡日期**             acEndDate         ----  终止锁卡日期**             acCnclBegindate   ----  起始解锁日期 **             acCnclEnddate     ----  终止解锁日期 **             acCardNo          ----  卡号 **   输出参数:**     acCardNo   ----  卡号            acLockDate   ---- 锁卡日期**     acSerStan  ----  流水号	        acVouchNo    ---- 登记簿编号**     acIssueBrc ----  发卡机构码      acTeller     ---- 发卡交易柜员**     acCardKind ----  卡片种类	    acReason     ---- 锁卡原因**     acCnclBrc  ----  解锁机构码      acCnclTeller ---- 解锁交易柜员**     acCnclAuthTeller ---- 解锁授权交易柜员  acLockStat ---- 锁卡状态**   返回结果: **   作        者 : XL **   版本创建日期 : 2004/10/20**   修改记录     :**   修改人       修改日期     修改位置*******************************************************/int cms216015(pstPubcom)struct          pubcom          *pstPubcom;{	FILE	*fp;							          /* 文件指针  	  */	char	acBeginDate[ DATE_LEN + 1 ];              /* 起始日期     */	char	acEndDate[ DATE_LEN + 1 ];                /* 终止日期     */	char    acCnclBegindate[ DATE_LEN + 1 ];          /* 起始解锁日期 */	char    acCnclEnddate[ DATE_LEN + 1 ];            /* 终止解锁日期 */	char    acCardNo[ CARDNO_LEN + 1 ];               /* 卡号   */    char    acTableName[PRDCODE_LEN + 1];             /* 表名称 */	char    acFileName[FILENAME_LEN + 1];             /* 文件名称 */	char    acSelStr[ CONDITION_LEN + 1 ];    char    acWhrStr[ CONDITION_LEN + 1 ];	struct  cmslockm	   stCmslockm;	    /* 锁卡登记簿	*/	sprintf( g_acTrcMsg,"锁卡登记簿查询开始");	TRCLOG4	memset( acBeginDate,   0x00, sizeof( acBeginDate ) );	memset( acEndDate,	   0x00, sizeof( acEndDate ) );	memset( acCnclBegindate, 0x00, sizeof( acCnclBegindate ) );	memset( acCnclEnddate,	 0x00, sizeof( acCnclEnddate ) );	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( &stCmslockm,   0x00, sizeof( struct cmslockm ) );    /* 取数据字典 */    getstring( "BeginDate1", acBeginDate );	getstring( "EndDate1", acEndDate);	getstring( "BeginDate2", acCnclBegindate);	getstring( "EndDate2", acCnclEnddate);	getstring( "CardNo", acCardNo);    sprintf( g_acTrcMsg,"BeginDate1[%s]EndDate1[%s]BeginDate2[%s]EndDate2[%s]CardNo[%s]",acBeginDate,acEndDate,acCnclBegindate,acCnclEnddate,acCardNo);	TRCLOG3    if(GenSqlCmd( "216015" , acSelStr ) )	{		ERRLOG		goto Exit;	}	sprintf( acWhrStr, " where 1=1");	if ( strcmp ( acBeginDate, INITDATE ) )	{		sprintf( acWhrStr+strlen(acWhrStr), " and lockdate >= '%s'", acBeginDate );	}    if ( strcmp ( acEndDate, INITDATE ) )	{		sprintf( acWhrStr+strlen(acWhrStr), " and lockdate <= '%s'", acEndDate );	}	if ( strlen ( acCardNo ) > 0 )	{		sprintf( acWhrStr+strlen(acWhrStr), " and cardno = '%s'", acCardNo );	}	if ( strcmp ( acCnclBegindate, INITDATE ) )	{		sprintf( acWhrStr+strlen(acWhrStr), " and cncldate >= '%s'", acCnclBegindate );	}	if ( strcmp ( acCnclEnddate,INITDATE ) )	{		sprintf( acWhrStr+strlen(acWhrStr), " and cncldate <= '%s'", acCnclEnddate );	}	sprintf( acWhrStr+strlen(acWhrStr), " ORDER BY lockdate , cardno , serseqno DESC" );    strcpy( acTableName, "cms615" );	sprintf(acFileName, "%s%s%s", acTableName, pstPubcom->acBrc,pstPubcom->acTeller);	fp = (FILE *)BeginFile( pstPubcom, acFileName );	if ( fp == NULL )	{		strcpy( g_acRspMsg, "打开文件句柄出错!" );		pubCrtRspInfo( );		ERRLOG		goto Exit;	}    /*组织查询字典*/	if ( GetInqDict( fp, "216015" ) )	{		ERRLOG		goto Exit;	}	/* 准备数据 */    sprintf( g_acTrcMsg, "%s%s" ,acSelStr,acWhrStr);    TRCLOG3	if ( DBSelect( "cmslockm", acSelStr ,acWhrStr , fp ) )	{		ERRLOG		goto Exit;	}    /* 出口赋值 */ Exit:	EndFile( fp );	if( !strcmp( g_acRspCode, RSP_OK ) )	{		SetInqFormid(pstPubcom, "216015") ;         sprintf( g_acTrcMsg,"锁卡登记簿查询结束");		TRCLOG4		return SUCCESS;    }	else 	{		sprintf( g_acTrcMsg,"锁卡登记簿查询失败");		TRCLOG4		return FAILED ;    }}

⌨️ 快捷键说明

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