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

📄 dinstall.pc

📁 小灵通机卡分离模块的设计.建立在数据库服务器
💻 PC
📖 第 1 页 / 共 5 页
字号:
/********************************************************************
* Copyright (c) 2002-2008. 广州南方电信系统软件有限公司
All rights reserved.

文件名称:DINSTALL.pc
摘    要:装机业务处理

创建日期:2002年05月26日


当前版本:1.0
作    者:wgm
成日期:

修改记录:

取代版本:
修改时间:
修 改 人:
修改摘要:
功能增加纪录:
1、输入参数:



输出:成功或失败
根据
4

********************************************************************/
#define YYDEBUG
#include "cicslink.h"
#include "yypublic.h"
#include "genid.h"
EXEC SQL BEGIN DECLARE SECTION;
#define PDINFO_FIELD	48
#define PDINFO_LENGTH	301
#define PHONE_FIELD	28
#define PHONE_LENGTH	201
#define ACCOUNTINFO_FIELD	26
#define ACCOUNTINFO_LENGTH	201
#define FOREGIFT_FIELD	11
#define FOREGIFT_LENGTH	401
#define PREPAY_FIELD	22
#define PREPAY_LENGTH	256
EXEC SQL END DECLARE SECTION;

EXEC SQL INCLUDE sqlca;


EXEC SQL BEGIN DECLARE SECTION;
char  gcmainphone_id[26] = {0};
char  gcmainproduce_id[26] = {0};
char  gcmainproduce_no[26] = {0};
char  gcmainorder_id[26] = {0};
char  gcmainaccept_id[26] = {0};
char  gcmainproduct_id[26] = {0};
char  gcaddorder_id[26] = {0};
char  gctempphone_id[26] = {0};
char  gctempproduce_id[26] = {0};
char  gctempproduce_no[26] = {0};
char  gctempaccept_id[26] = {0};
char  gctempproduct_id[26] = {0};
char  gcsrv_code[26] = {0};
char  gcsub_srv[26] = {0};
char  gcaccept_state[26] = {0};
char  gcdisp_flag[26] = {0};
char  gcsrv_type[26] = {0};
char  gcaccept_lan[26] = {0};
char  gcvest_lan[26] = {0};
char  gcaccept_grade[26] = {0};
int   giaccept_grade_value=0;
char  gcaccept_mode[26] = {0};
char  gccharge_tache[26] = {0};
char  gcunit_type[26] = {0};
char  gcunit_code[26] = {0};
char  gcexch_code[26] = {0};
char  gcdepart_code[26] = {0};
char  gcdepart_type[26] = {0};
char  gcoper_code[26] = {0};
char  gcterminal_ip[26] = {0};
char  gcterm_code[26] = {0};
char  gcproduct_nostr[2000] = {0};
char  gcps_codestr[2000] = {0};

char  gcsim_codestr[2000] = {0};

char  gcproduct_no[25] = {0};
char  gcmainproduct_no[35] = {0};
char  lcproduct_no[20] = {0};
char  lcps_code[40] = {0};

char  lcsim_code[40] = {0};

int 	gideal_grad=0;
char  gccust_type[5] = {0};
int   gicust_type_value=0;
char  gcowncust_id[26] = {0};
char  gcusercust_id[26] = {0};
char	gccust_id[26] = {0};
char	gcbtime[26] = {0};
char	gcbact[5] = {0};
char  gcrela_type[5] = {0};
char  gclocal_flag[5] = {0};
char  gcrela_info[50] = {0};
char  gcrela_prod_no[50] = {0};
char  gcprod_class[5] = {0};
char  gcprodexch_code[6] = {0};
char  gcprot_code[30] = {0};
char  gclines[5] = {0};
int		gilines=0;
int   giaddlines=0;
int   gisrvs=0;
int   giadds=0;

char gcrows[5] = {0};
char gcretstr[200] = {0};                /*返回信息串*/
char gcfilename[100] = {0};
char gcyyerrlog[100] = {0};
int  gcretval=0;                   /*返回值*/
char gccondition[20] = {0};
char gccontract_id[26] = {0};
char gcpay_id[26] = {0};
char gccust_code[42] = {0};
char gcowncust_code[42] = {0};
char gcusercust_code[42] = {0};
char gcoldcontract[100][20] = {0};
char gcnewcontract[100][20] = {0};
char gcnewproduce_id[100][26] = {0};
char gcnewproduce_no[100][26] = {0};
char gcnewaccept_id[100][26] = {0};
char gcnewproduct_id[100][26] = {0};
char gcnewproduct_no[100][26] = {0};
char gcaddproduce_id[100][26] = {0};
char gcaddproduce_no[100][26] = {0};
char gcaddaccept_id[100][26] = {0};
char gcaddproduct_id[100][26] = {0};
char gcaddproduct_no[100][26] = {0};
char gcpayid[100][20] = {0};
char gcswitch_id[20] = {0};
long giswitch_id=0;
long giprodno_grade=0;
char gcfld_id[3] = {0};
char gcvalue[300] = {0};
char gcapply_name[21] = {0};
char gcapply_cert[2] = {0};
char gcapply_certno[31] = {0};
char gcapply_tel[41] = {0};
char gcapply_addr[256] = {0};
char gcaccount_id[26] = {0};

int  i=0;
int  j=0;
int  p=0;
int  gitimes=0;
int  gicolnum=0;                    /*传入列数*/
int  girownum=0;                    /*传入行数*/
int  gia0s= -1;
int  gia0e= -1;
int  gia0c= 0;
int  gia1s= -1;
int  gia1e= -1;
int  gia1c= 0;
int  gig0s= -1;
int  gig0e= -1;
int  gig0c= 0;
int  gig1s= -1;
int  gig1e= -1;
int  gig1c= 0;
int  gia3s= -1;
int  gia3e= -1;
int  gia3c= 0;
int  gia4s= -1;
int  gia4e= -1;
int  gia4c= 0;
int  gia5s= -1;
int  gia5e= -1;
int  gia5c= 0;
int  gia6s= -1;
int  gia6e= -1;
int  gia6c= 0;
int  gie7s= -1;
int  gie7e= -1;
int  gie7c= 0;
int  gid6s= -1;
int  gid6e= -1;
int  gid6c= 0;

int  gij2s= -1;
int  gij2e= -1;
int  gij2c= 0;

int  gib6s= -1;
int  gib6e= -1;
int  gib6c= 0;
int  gih3s= -1;
int  gih3e= -1;
int  gih3c= 0;
int  gih6s= -1;
int  gih6e= -1;
int  gih6c= 0;

int  giv5s=-1;
int  giv5e=-1;
int  giv5c=0;

int  gia0rows= 0;
int  gia1rows= 0;
int  gig0rows= 0;
int  gig1rows= 0;
int  gia3rows= 0;
int  gia4rows= 0;
int  gia5rows= 0;
int  gia6rows= 0;
int  gie7rows=0;
int  gid6rows=0;

int  gij2rows=0;

int  gib6rows=0;
int  gih3rows=0;
int  gih6rows=0;

int  giv5rows=0;

char g0[300] = {0};
char g1[300] = {0};
char g2[300] = {0};
char g3[300] = {0};
char g4[300] = {0};
char g5[300] = {0};
char g6[300] = {0};
char g7[300] = {0};
char g8[300] = {0};

int v_count=0;

char  lcproduct_nosf[20] = {0};
char  gcmainproduce_idsf[26] = {0};

char temp_1[3000] = {0};

EXEC SQL END DECLARE SECTION;

int intoPdn_pdinfoProc();       	     /*生成pdn_pdinfo详细资料*/
int intoPdn_phoneProc();   	         /*生成pdn_phone详细资料*/
int intoPdn_warrantorProc();	         /*生成pdn_warrantor详细资料*/
int intoPdn_incr_prodProc();	         /*生成pdn_incr_prod详细资料*/
int intoPdn_prod_propProc();	         /*生成pdn_prod_prop详细资料*/
int intoPdn_accountProc();           /*生成pdn_account详细资料*/
int intoPdn_deviceProc();       	     /*生成pdn_device详细资料*/
int intoCn_cust_infoProc();	         /*生成cn_cust_info详细资料*/
int intoPdn_acceptlogProc();	 /*生成PDN_ACCEPTLOG*/
int intoSr_accept_logProc();	 /*生成sr_accept_log*/
int intoPdn_servcontrolProc();	    /*生成pdn_servcontrol*/
int intoPdn_relayProc();		/*生成pdn_relay*/
int intoPdn_phsProc();		/*生成pdn_phs*/

int intoPdn_phssimProc();		/*生成pdn_phs*/

int intoPdn_relateProc();	/*生成pdn_relate*/
int intoPdn_prepayProc();											/*生成pdn_prepay*/
int intoPdn_foregiftProc();											/*生成pdn_foregift*/
int intoP_orderdisProc();

DLLEXPORT CDECL main()

{
	EXEC SQL BEGIN DECLARE SECTION;
	int lcifexist=0;
	char lcproduct_no[20]={0};
	EXEC SQL END DECLARE SECTION;

	#ifdef	YYDEBUG
	sprintf(gcfilename,"%s%s",DEBUGDIR,"dinstall.tr");
	trim(gcfilename);
	sprintf(gcyyerrlog,"%s%s",DEBUGDIR,"yyerrlog.tr");
	trim(gcyyerrlog);
	PrintStatus("yqd =====open debug filepath==================");
	PrintStatus(gcfilename);
	if((tracefp=fopen(gcfilename,"w"))==NULL)
	{
		fprintf(stderr,"open trace file error\n");
		exceptExit(10002,INI_COMM_ERR );
	}
	#endif
	if (getInputData("DINSTALL") != 0)   	      /*初始化通讯区*/
	{
		#ifdef	YYDEBUG
		fclose(tracefp);
		CopyTr(gcfilename,gcyyerrlog);
		#endif
		exceptExit(10002,INI_COMM_ERR );          /*初始化错误,退出服务*/
	}
	if (getInParamNum() < 24)
	{
		#ifdef	YYDEBUG
		DebugLog("参数个数不够");
		fclose(tracefp);
		CopyTr(gcfilename,gcyyerrlog);
		#endif
		exceptExit(10001,PARAM_ERR );	      /*参数输入错误,退出服务*/
	}

	ncpyParm(1,gcmainproduce_id,26);
	ncpyParm(2,gcmainproduce_no,26);
	ncpyParm(3,gcmainorder_id,26);
	ncpyParm(4,gcmainaccept_id,26);
	ncpyParm(5,gcmainproduct_id,26);
	ncpyParm(6,gcsrv_code,26);
	ncpyParm(7,gcsub_srv,26);
	ncpyParm(8,gcaccept_state,26);
	ncpyParm(9,gcdisp_flag,26);
	ncpyParm(10,gcsrv_type,26);
	ncpyParm(11,gcaccept_lan,26);
	ncpyParm(12,gcvest_lan,26);
	ncpyParm(13,gcaccept_grade,26);
	ncpyParm(14,gcaccept_mode,26);
	ncpyParm(15,gccharge_tache,26);
	ncpyParm(16,gcunit_type,26);
	ncpyParm(17,gcunit_code,26);
	ncpyParm(18,gcexch_code,26);
	ncpyParm(19,gcdepart_code,26);
	ncpyParm(20,gcdepart_type,26);
	ncpyParm(21,gcoper_code,26);
	ncpyParm(22,gcterminal_ip,26);
	ncpyParm(23,gcterm_code,26);
	ncpyParm(24,gcproduct_nostr,2000);
	ncpyParm(25,gclines,5);
	ncpyParm(26,gccust_type,5);
	ncpyParm(27,gcps_codestr,2000);
	/*因为phs和模拟中继传入的参数个数不同,经办人信息提前*/
	ncpyParm(28,gcapply_name,21);
	ncpyParm(29,gcapply_cert,2);
	ncpyParm(30,gcapply_certno,31);
	ncpyParm(31,gcapply_tel,41);
	ncpyParm(32,gcapply_addr,256);
	/*ADD BY zgw 20050425 *释放sim编号处理 增加参数gcsim_codestr序号33*/
	ncpyParm(33,gcsim_codestr,2000);
	/*-----原来参数序号顺延33->34,,,,38->39---- */
	ncpyParm(34,gcprod_class,5);
	ncpyParm(35,gcprodexch_code,6);
	ncpyParm(36,gcswitch_id,20);
	ncpyParm(37,gcprot_code,30);
	ncpyParm(38,gcbtime,26);
	ncpyParm(39,gcbact,5);

PrintStatus(gcapply_tel);
PrintStatus(gcsim_codestr);
PrintStatus("zgw1111111111111111111111111");
	/*ncpyParm(28,gcprod_class,5);
	ncpyParm(29,gcprodexch_code,6);
	ncpyParm(30,gcswitch_id,20);
	ncpyParm(31,gcprot_code,30);
	ncpyParm(32,gcbtime,26);
	ncpyParm(33,gcbact,5);
	ncpyParm(34,gcapply_name,21);   
	ncpyParm(35,gcapply_cert,2);    
	ncpyParm(36,gcapply_certno,31); 
	ncpyParm(37,gcapply_tel,41);           
	ncpyParm(38,gcapply_addr,256);*/       
                                    
	trim(gcmainproduce_id);     
	trim(gcmainproduce_no);     
	trim(gcmainorder_id);
	trim(gcmainaccept_id);
	trim(gcmainproduct_id);
	trim(gcsrv_code);
	trim(gcsub_srv);
	trim(gcaccept_state);
	trim(gcdisp_flag);
	trim(gcsrv_type);
	trim(gcaccept_lan);
	trim(gcvest_lan);
	trim(gcaccept_grade);
	trim(gcaccept_mode);
	trim(gccharge_tache);
	trim(gcunit_type);
	trim(gcunit_code);
	trim(gcexch_code);
	trim(gcdepart_code);
	trim(gcdepart_type);
	trim(gcoper_code);
	trim(gcterminal_ip);
	trim(gcterm_code);
	trim(gcproduct_nostr);
	trim(gclines);
	trim(gccust_type);
	trim(gcps_codestr);
	trim(gcprod_class);
	trim(gcprodexch_code);
	trim(gcprot_code);
	trim(gcswitch_id);
	trim(gcprot_code);
	trim(gcbtime);
	trim(gcbact);
	trim(gcapply_name);
	trim(gcapply_cert);
	trim(gcapply_certno);
	trim(gcapply_tel);
	trim(gcapply_addr);
	trim(gcsim_codestr);

	gilines=atoi(gclines);
	giswitch_id=atoi(gcswitch_id);
	#ifdef	YYDEBUG
	DebugLog("gcmainproduce_id=%s",gcmainproduce_id);
	DebugLog("gcmainproduce_no=%s",gcmainproduce_no);
	DebugLog("gcmainorder_id=%s",gcmainorder_id);
	DebugLog("gcmainaccept_id=%s",gcmainaccept_id);
	DebugLog("gcmainproduct_id=%s",gcmainproduct_id);
	DebugLog("gcsrv_code=%s",gcsrv_code);
	DebugLog("gcsub_srv=%s",gcsub_srv);
	DebugLog("gcaccept_state=%s",gcaccept_state);
	DebugLog("gcdisp_flag=%s",gcdisp_flag);
	DebugLog("gcsrv_type=%s",gcsrv_type);
	DebugLog("gcaccept_lan=%s",gcaccept_lan);
	DebugLog("gcvest_lan=%s",gcvest_lan);
	DebugLog("gcaccept_grade=%s",gcaccept_grade);
	DebugLog("gcaccept_mode=%s",gcaccept_mode);
	DebugLog("gccharge_tache=%s",gccharge_tache);
	DebugLog("gcunit_type=%s",gcunit_type);
	DebugLog("gcunit_code=%s",gcunit_code);
	DebugLog("gcexch_code=%s",gcexch_code);
	DebugLog("gcdepart_code=%s",gcdepart_code);
	DebugLog("gcdepart_type=%s",gcdepart_type);
	DebugLog("gcoper_code=%s",gcoper_code);
	DebugLog("gcterminal_ip=%s",gcterminal_ip);
	DebugLog("gcterm_code=%s",gcterm_code);
	DebugLog("gcproduct_nostr=%s",gcproduct_nostr);
	DebugLog("gclines=%s",gclines);
	DebugLog("gccust_type=%s",gccust_type);
	DebugLog("gcps_codestr=%s",gcps_codestr);
	DebugLog("gcprod_class=%s",gcprod_class);
	DebugLog("gcprodexch_code=%s",gcprodexch_code);
	DebugLog("gcswitch_id=%s",gcswitch_id);
	DebugLog("gcprot_code=%s",gcprot_code);
	DebugLog("gcbtime=%s",gcbtime);
	DebugLog("gcbact=%s",gcbact);
	DebugLog("gcapply_name=%s",gcapply_name);
	DebugLog("gcapply_cert=%s",gcapply_cert);
	DebugLog("gcapply_certno=%s",gcapply_certno);
	DebugLog("gcapply_tel=%s",gcapply_tel);
	DebugLog("gcapply_addr=%s",gcapply_addr); 
	DebugLog("gcapply_addr=%s",gcsim_codestr);
	#endif

	if (gcmainproduce_id[0] == 0)
	{
		gitimes = 0;              /*该产品首次受理业务*/
	}
	else
	{
		gitimes = 2;              /*该产品本业务审核后修改*/
	}

	gicolnum=getInRecColNum();
	girownum=getInRecRowNum();
	for(i=0;i<girownum;i++)
	{
		#ifdef	YYDEBUG
		ncpyRec(i,0,g0,300);
		ncpyRec(i,1,g1,300);
		ncpyRec(i,2,g2,300);
		ncpyRec(i,3,g3,300);
		ncpyRec(i,4,g4,300);
		ncpyRec(i,5,g5,300);
		ncpyRec(i,6,g6,300);
		ncpyRec(i,7,g7,300);
		ncpyRec(i,8,g8,300);
		DebugLog("i=%d,g0=%s",i,g0);
		DebugLog("i=%d,g1=%s",i,g1);
		DebugLog("i=%d,g2=%s",i,g2);
		DebugLog("i=%d,g3=%s",i,g3);
		DebugLog("i=%d,g4=%s",i,g4);
		DebugLog("i=%d,g5=%s",i,g5);
		DebugLog("i=%d,g6=%s",i,g6);
		DebugLog("i=%d,g7=%s",i,g7);
		DebugLog("i=%d,g8=%s",i,g8);

⌨️ 快捷键说明

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