📄 tbcms038.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 cmsreport02_brc[10]; short cmsreport02_brc_id; char cmsreport02_month[7]; short cmsreport02_month_id; char cmsreport02_cardkind[9]; short cmsreport02_cardkind_id; char cmsreport02_brcname[71]; short cmsreport02_brcname_id; long cmsreport02_monthlead; short cmsreport02_monthlead_id; long cmsreport02_monthsend; short cmsreport02_monthsend_id; long cmsreport02_monthclscnt; short cmsreport02_monthclscnt_id; long cmsreport02_leadtotal; short cmsreport02_leadtotal_id; long cmsreport02_sendtotal; short cmsreport02_sendtotal_id; long cmsreport02_clstotal; short cmsreport02_clstotal_id;EXEC SQL END DECLARE SECTION ;#define RR_CMSREPORT02 \ :cmsreport02_brc:cmsreport02_brc_id, \ :cmsreport02_month:cmsreport02_month_id, \ :cmsreport02_cardkind:cmsreport02_cardkind_id, \ :cmsreport02_brcname:cmsreport02_brcname_id, \ :cmsreport02_monthlead:cmsreport02_monthlead_id, \ :cmsreport02_monthsend:cmsreport02_monthsend_id, \ :cmsreport02_monthclscnt:cmsreport02_monthclscnt_id, \ :cmsreport02_leadtotal:cmsreport02_leadtotal_id, \ :cmsreport02_sendtotal:cmsreport02_sendtotal_id, \ :cmsreport02_clstotal:cmsreport02_clstotal_id#define UU_CMSREPORT02 \ brc, \ month, \ cardkind, \ brcname, \ monthlead, \ monthsend, \ monthclscnt, \ leadtotal, \ sendtotal, \ clstotal#define WW_CMSREPORT02 \ :cmsreport02_brc, \ :cmsreport02_month, \ :cmsreport02_cardkind, \ :cmsreport02_brcname, \ :cmsreport02_monthlead, \ :cmsreport02_monthsend, \ :cmsreport02_monthclscnt, \ :cmsreport02_leadtotal, \ :cmsreport02_sendtotal, \ :cmsreport02_clstotalstruct cmsreport02{ char brc[10]; char month[7]; char cardkind[9]; char brcname[71]; long monthlead; long monthsend; long monthclscnt; long leadtotal; long sendtotal; long clstotal;};void pubInitCmsreport02(){ memset( cmsreport02_brc, 0x00, sizeof( cmsreport02_brc ) ) ; cmsreport02_brc_id = 0 ; memset( cmsreport02_month, 0x00, sizeof( cmsreport02_month ) ) ; cmsreport02_month_id = 0 ; memset( cmsreport02_cardkind, 0x00, sizeof( cmsreport02_cardkind ) ) ; cmsreport02_cardkind_id = 0 ; memset( cmsreport02_brcname, 0x00, sizeof( cmsreport02_brcname ) ) ; cmsreport02_brcname_id = 0 ; memset( &cmsreport02_monthlead, 0x00, sizeof( cmsreport02_monthlead ) ) ; cmsreport02_monthlead_id = 0 ; memset( &cmsreport02_monthsend, 0x00, sizeof( cmsreport02_monthsend ) ) ; cmsreport02_monthsend_id = 0 ; memset( &cmsreport02_monthclscnt, 0x00, sizeof( cmsreport02_monthclscnt ) ) ; cmsreport02_monthclscnt_id = 0 ; memset( &cmsreport02_leadtotal, 0x00, sizeof( cmsreport02_leadtotal ) ) ; cmsreport02_leadtotal_id = 0 ; memset( &cmsreport02_sendtotal, 0x00, sizeof( cmsreport02_sendtotal ) ) ; cmsreport02_sendtotal_id = 0 ; memset( &cmsreport02_clstotal, 0x00, sizeof( cmsreport02_clstotal ) ) ; cmsreport02_clstotal_id = 0 ;}void pubStoVCmsreport02( struct cmsreport02 * pstCmsreport02 ){ pubInitCmsreport02(); if( !strlen( pstCmsreport02->brc ) ) strcpy( pstCmsreport02->brc, " " ); strcpy( cmsreport02_brc, pstCmsreport02->brc ); if( !strlen( pstCmsreport02->month ) ) strcpy( pstCmsreport02->month, " " ); strcpy( cmsreport02_month, pstCmsreport02->month ); if( !strlen( pstCmsreport02->cardkind ) ) strcpy( pstCmsreport02->cardkind, " " ); strcpy( cmsreport02_cardkind, pstCmsreport02->cardkind ); if( !strlen( pstCmsreport02->brcname ) ) strcpy( pstCmsreport02->brcname, " " ); strcpy( cmsreport02_brcname, pstCmsreport02->brcname ); cmsreport02_monthlead = pstCmsreport02->monthlead ; cmsreport02_monthsend = pstCmsreport02->monthsend ; cmsreport02_monthclscnt = pstCmsreport02->monthclscnt ; cmsreport02_leadtotal = pstCmsreport02->leadtotal ; cmsreport02_sendtotal = pstCmsreport02->sendtotal ; cmsreport02_clstotal = pstCmsreport02->clstotal ;}void pubVtoSCmsreport02( struct cmsreport02 * pstCmsreport02 ){ strcpy( pstCmsreport02->brc, cmsreport02_brc ); strpack( pstCmsreport02->brc ); strcpy( pstCmsreport02->month, cmsreport02_month ); strpack( pstCmsreport02->month ); strcpy( pstCmsreport02->cardkind, cmsreport02_cardkind ); strpack( pstCmsreport02->cardkind ); strcpy( pstCmsreport02->brcname, cmsreport02_brcname ); strpack( pstCmsreport02->brcname ); pstCmsreport02->monthlead = cmsreport02_monthlead ; pstCmsreport02->monthsend = cmsreport02_monthsend ; pstCmsreport02->monthclscnt = cmsreport02_monthclscnt ; pstCmsreport02->leadtotal = cmsreport02_leadtotal ; pstCmsreport02->sendtotal = cmsreport02_sendtotal ; pstCmsreport02->clstotal = cmsreport02_clstotal ;}int pubReadCmsreport02( struct cmsreport02 * pstCmsreport02 ){ pubInitCmsreport02(); pubStoVCmsreport02(pstCmsreport02); EXEC SQL SELECT * INTO RR_CMSREPORT02 FROM cmsreport02 WHERE brc = :cmsreport02_brc and month = :cmsreport02_month and cardkind = :cmsreport02_cardkind ; if ( SQLCODE ) { strcpy( g_acRspCode, "999996" ); /* 数据库读错误 */ pubCrtRspInfo( "cmsreport02",SQLCODE ); pubErrLog( __LINE__, __FILE__, g_acRspMsg ); return -1; }; pubVtoSCmsreport02(pstCmsreport02); return 0; } int pubModiCmsreport02( struct cmsreport02 * pstCmsreport02 ){ pubInitCmsreport02(); pubStoVCmsreport02(pstCmsreport02); EXEC SQL UPDATE cmsreport02 SET ( UU_CMSREPORT02 ) = ( WW_CMSREPORT02 ) WHERE brc = :cmsreport02_brc and month = :cmsreport02_month and cardkind = :cmsreport02_cardkind ; if ( SQLCODE ) { strcpy( g_acRspCode, "999997" ); /* 数据库更新错误 */ pubCrtRspInfo( "cmsreport02",SQLCODE ); pubErrLog( __LINE__, __FILE__, g_acRspMsg ); return -1; }; return 0; } int pubInstCmsreport02( struct cmsreport02 * pstCmsreport02 ){ pubInitCmsreport02(); pubStoVCmsreport02(pstCmsreport02); EXEC SQL INSERT INTO cmsreport02 VALUES ( RR_CMSREPORT02 ) ; if ( SQLCODE ) { strcpy( g_acRspCode, "999998" ); /* 数据库插入错误 */ pubCrtRspInfo( "cmsreport02",SQLCODE ); pubErrLog( __LINE__, __FILE__, g_acRspMsg ); return -1; }; return 0; }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -