📄 tbcms039.sqc
字号:
/*** 注 意: 此文件由平台自动生成,禁止任何人以任何方式修改!** 生成日期: 2004-9-1** 版 本 号: V1.0.0** 初始作者: ShiBin Hu*/#include "sysdefine.h"#include "code.h"#include "attrdef.h"#include "revglob.h"EXEC SQL INCLUDE sqlca;EXEC SQL BEGIN DECLARE SECTION ; char cmsreport03_trandate[11]; short cmsreport03_trandate_id; char cmsreport03_brc[10]; short cmsreport03_brc_id; char cmsreport03_ccy[4]; short cmsreport03_ccy_id; char cmsreport03_cardkind[9]; short cmsreport03_cardkind_id; char cmsreport03_prdcod[8]; short cmsreport03_prdcod_id; char cmsreport03_ccycomm[71]; short cmsreport03_ccycomm_id; char cmsreport03_cardkindcomm[31]; short cmsreport03_cardkindcomm_id; double cmsreport03_cardamt; short cmsreport03_cardamt_id;EXEC SQL END DECLARE SECTION ;#define RR_CMSREPORT03 \ :cmsreport03_trandate:cmsreport03_trandate_id, \ :cmsreport03_brc:cmsreport03_brc_id, \ :cmsreport03_ccy:cmsreport03_ccy_id, \ :cmsreport03_cardkind:cmsreport03_cardkind_id, \ :cmsreport03_prdcod:cmsreport03_prdcod_id, \ :cmsreport03_ccycomm:cmsreport03_ccycomm_id, \ :cmsreport03_cardkindcomm:cmsreport03_cardkindcomm_id, \ :cmsreport03_cardamt:cmsreport03_cardamt_id#define UU_CMSREPORT03 \ trandate, \ brc, \ ccy, \ cardkind, \ prdcod, \ ccycomm, \ cardkindcomm, \ cardamt#define WW_CMSREPORT03 \ :cmsreport03_trandate, \ :cmsreport03_brc, \ :cmsreport03_ccy, \ :cmsreport03_cardkind, \ :cmsreport03_prdcod, \ :cmsreport03_ccycomm, \ :cmsreport03_cardkindcomm, \ :cmsreport03_cardamtstruct cmsreport03{ char trandate[11]; char brc[10]; char ccy[4]; char cardkind[9]; char prdcod[8]; char ccycomm[71]; char cardkindcomm[31]; double cardamt;};void pubInitCmsreport03(){ memset( cmsreport03_trandate, 0x00, sizeof( cmsreport03_trandate ) ) ; cmsreport03_trandate_id = 0 ; memset( cmsreport03_brc, 0x00, sizeof( cmsreport03_brc ) ) ; cmsreport03_brc_id = 0 ; memset( cmsreport03_ccy, 0x00, sizeof( cmsreport03_ccy ) ) ; cmsreport03_ccy_id = 0 ; memset( cmsreport03_cardkind, 0x00, sizeof( cmsreport03_cardkind ) ) ; cmsreport03_cardkind_id = 0 ; memset( cmsreport03_prdcod, 0x00, sizeof( cmsreport03_prdcod ) ) ; cmsreport03_prdcod_id = 0 ; memset( cmsreport03_ccycomm, 0x00, sizeof( cmsreport03_ccycomm ) ) ; cmsreport03_ccycomm_id = 0 ; memset( cmsreport03_cardkindcomm, 0x00, sizeof( cmsreport03_cardkindcomm ) ) ; cmsreport03_cardkindcomm_id = 0 ; memset( &cmsreport03_cardamt, 0x00, sizeof( cmsreport03_cardamt ) ) ; cmsreport03_cardamt_id = 0 ;}void pubStoVCmsreport03( struct cmsreport03 * pstCmsreport03 ){ pubInitCmsreport03(); if( !strlen( pstCmsreport03->trandate ) ) strcpy( pstCmsreport03->trandate, " " ); strcpy( cmsreport03_trandate, pstCmsreport03->trandate ); if( !strlen( pstCmsreport03->brc ) ) strcpy( pstCmsreport03->brc, " " ); strcpy( cmsreport03_brc, pstCmsreport03->brc ); if( !strlen( pstCmsreport03->ccy ) ) strcpy( pstCmsreport03->ccy, " " ); strcpy( cmsreport03_ccy, pstCmsreport03->ccy ); if( !strlen( pstCmsreport03->cardkind ) ) strcpy( pstCmsreport03->cardkind, " " ); strcpy( cmsreport03_cardkind, pstCmsreport03->cardkind ); if( !strlen( pstCmsreport03->prdcod ) ) strcpy( pstCmsreport03->prdcod, " " ); strcpy( cmsreport03_prdcod, pstCmsreport03->prdcod ); if( !strlen( pstCmsreport03->ccycomm ) ) strcpy( pstCmsreport03->ccycomm, " " ); strcpy( cmsreport03_ccycomm, pstCmsreport03->ccycomm ); if( !strlen( pstCmsreport03->cardkindcomm ) ) strcpy( pstCmsreport03->cardkindcomm, " " ); strcpy( cmsreport03_cardkindcomm, pstCmsreport03->cardkindcomm ); cmsreport03_cardamt = pstCmsreport03->cardamt ; pubDround( &cmsreport03_cardamt, 2 );}void pubVtoSCmsreport03( struct cmsreport03 * pstCmsreport03 ){ strcpy( pstCmsreport03->trandate, cmsreport03_trandate ); strpack( pstCmsreport03->trandate ); strcpy( pstCmsreport03->brc, cmsreport03_brc ); strpack( pstCmsreport03->brc ); strcpy( pstCmsreport03->ccy, cmsreport03_ccy ); strpack( pstCmsreport03->ccy ); strcpy( pstCmsreport03->cardkind, cmsreport03_cardkind ); strpack( pstCmsreport03->cardkind ); strcpy( pstCmsreport03->prdcod, cmsreport03_prdcod ); strpack( pstCmsreport03->prdcod ); strcpy( pstCmsreport03->ccycomm, cmsreport03_ccycomm ); strpack( pstCmsreport03->ccycomm ); strcpy( pstCmsreport03->cardkindcomm, cmsreport03_cardkindcomm ); strpack( pstCmsreport03->cardkindcomm ); pstCmsreport03->cardamt = cmsreport03_cardamt ; pubDround( &pstCmsreport03->cardamt, 2 );}int pubReadCmsreport03( struct cmsreport03 * pstCmsreport03 ){ pubInitCmsreport03(); pubStoVCmsreport03(pstCmsreport03); EXEC SQL SELECT * INTO RR_CMSREPORT03 FROM cmsreport03 WHERE trandate = :cmsreport03_trandate and brc = :cmsreport03_brc and ccy = :cmsreport03_ccy and cardkind = :cmsreport03_cardkind and prdcod = :cmsreport03_prdcod ; if ( SQLCODE ) { strcpy( g_acRspCode, "999996" ); /* 数据库读错误 */ pubCrtRspInfo( "cmsreport03",SQLCODE ); pubErrLog( __LINE__, __FILE__, g_acRspMsg ); return -1; }; pubVtoSCmsreport03(pstCmsreport03); return 0; } int pubModiCmsreport03( struct cmsreport03 * pstCmsreport03 ){ pubInitCmsreport03(); pubStoVCmsreport03(pstCmsreport03); EXEC SQL UPDATE cmsreport03 SET ( UU_CMSREPORT03 ) = ( WW_CMSREPORT03 ) WHERE trandate = :cmsreport03_trandate and brc = :cmsreport03_brc and ccy = :cmsreport03_ccy and cardkind = :cmsreport03_cardkind and prdcod = :cmsreport03_prdcod ; if ( SQLCODE ) { strcpy( g_acRspCode, "999997" ); /* 数据库更新错误 */ pubCrtRspInfo( "cmsreport03",SQLCODE ); pubErrLog( __LINE__, __FILE__, g_acRspMsg ); return -1; }; return 0; } int pubInstCmsreport03( struct cmsreport03 * pstCmsreport03 ){ pubInitCmsreport03(); pubStoVCmsreport03(pstCmsreport03); EXEC SQL INSERT INTO cmsreport03 VALUES ( RR_CMSREPORT03 ) ; if ( SQLCODE ) { strcpy( g_acRspCode, "999998" ); /* 数据库插入错误 */ pubCrtRspInfo( "cmsreport03",SQLCODE ); pubErrLog( __LINE__, __FILE__, g_acRspMsg ); return -1; }; return 0; }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -