📄 dmobimod.pc
字号:
/********************************************************************
* Copyright (c) 2002-2008. 广州南方电信系统软件有限公司
All rights reserved.
文件名称:DMOBIMOD.pc
摘 要:移动电话,UPT产品修改
创建日期:2002年07月29日
当前版本:1.0
作 者:wgm
成日期:
修改记录:
取代版本:
修改时间:
修 改 人:
修改摘要:
功能增加记录:
1、输入参数:
输出:成功或失败
根据
********************************************************************/
#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 UPT_FIELD 16
#define UPT_LENGTH 256
#define TRANSNUM_FIELD 6
#define TRANSNUM_LENGTH 256
#define Z800NO_FIELD 7
#define Z800NO_LENGTH 256
EXEC SQL END DECLARE SECTION;
EXEC SQL INCLUDE sqlca;
EXEC SQL BEGIN DECLARE SECTION;
char gcretstr[200] = {0}; /*返回信息串*/
char gcfilename[100] = {0};
char gcyyerrlog[100] = {0};
char gccondition[20] = {0};
char gcrows[5] = {0};
int gcretval=0; /*返回值*/
char gcoldproduce_id[10][26] = {0};
char gcoldproduce_no[10][26] = {0};
char gcoldaccept_id[10][26] = {0};
char gcoldproduct_id[10][26] = {0};
char gcoldsrv_code[10][26] = {0};
char gcoldaccept_state[10][26] = {0};
char gcfield_modifystr[10][2000] = {0};
char gcnewproduce_id[10][26] = {0};
char gcnewproduce_no[10][26] = {0};
char gcnewaccept_id[10][26] = {0};
char gcnewproduct_id[10][26] = {0};
char gcnewsrv_code[10][26] = {0};
char gcnewaccept_state[10][26] = {0};
char gcnewchantypestr[10][2000] = {0};
char gcsrv_name[10][50] = {0};
char gcsub_srv[10][26] = {0};
int giuseflsg[10] = {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 gcmainsrv_code[26] = {0};
char gcmainsrv_name[50] = {0};
char gcmainaccept_state[26] = {0};
char gcmainsub_srv[26] = {0};
char gcmainproduct_no[25] = {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 gcproduct_no[26] = {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[26] = {0};
char gcprod_class[5] = {0};
char gcoldprod_class[5] = {0};
char gcpriproduce_id[26] = {0};
char gcpriproduce_no[26] = {0};
char gcprodexch_code[6] = {0};
char gctempfield[10] = {0};
char gcfieldstr[10] = {0};
char gctempsrv_code[10] = {0};
int gizjyj=0;
char gcservinfofield[10][300] = {0};
char gcservinfotable[10][20] = {0};
char gctempfieldstr[500] = {0};
char gctempstr[20] = {0};
char gcrollsrv_code[10][10] = {0};
char gcrollproduce_no[10][26] = {0};
char girolls=0;
char gcprisrv_code[26] = {0};
char gcdelflag[5] = {0};
char gcnewflag[2] = {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};
int i=0;
int j=0;
int k=0;
int gitimes=0;
int gicolnum=0; /*传入列数*/
int girownum=0; /*传入行数*/
int girecords=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 gig3s= -1;
int gig3e= -1;
int gig3c= 0;
int gia5s= -1;
int gia5e= -1;
int gia5c= 0;
int gie7s= -1;
int gie7e= -1;
int gie7c= 0;
int gih8s= -1;
int gih8e= -1;
int gih8c= 0;
int gih9s= -1;
int gih9e= -1;
int gih9c= 0;
int giadds= -1;
int giadde= -1;
int giaddc= 0;
int gisrvc= 0;
int gisubc= 0;
int gia0rows= 0;
int gia1rows= 0;
int gig0rows= 0;
int gig1rows= 0;
int gig3rows= 0;
int gia5rows= 0;
int gie7rows= 0;
int gih8rows= 0;
int gih9rows= 0;
int giaddrows= 0;
int gilines= 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};
/*zhg add 2004.6.16*/
int gic5s= -1;
int gic5e= -1;
int gic5c= 0;
int gic6s= -1;
int gic6e= -1;
int gic6c= 0;
int gic5rows= 0;
int gic6rows= 0;
/*zhg add 2004.6.16*/
EXEC SQL END DECLARE SECTION;
int intoPdn_pdinfoProc(); /*生成pdn_pdinfo*/
int intoCn_cust_infoProc(); /*生成cn_cust_info*/
int intoPdn_phoneProc(); /*生成pdn_phone*/
int intoPdn_incr_prodProc(); /*生成pdn_incr_prod*/
int intoPdn_prod_propProc(); /*生成pdn_prod_prop*/
int intoPdn_mobileProc(); /*生成pdn_mobile*/
int intoPdn_deviceProc(); /*生成pdn_device*/
int intoPdn_uptProc(); /*生成pdn_upt*/
int intoPdn_transnumProc(); /*生成pdn_transnum*/
int judge_srvcodeProc(); /*判断业务码,生成工单*/
int initializtionProc(); /*初始化处理*/
/*zhg add 2004.6.16*/
int intopdn_800Proc(); /*生成pdn_800*/
int intopdn_800noProc(); /*生成pdn_800no*/
/*zhg add 2004.6.16*/
DLLEXPORT CDECL main()
{
#ifdef YYDEBUG
sprintf(gcfilename,"%s%s",DEBUGDIR,"dmobimod.tr");
trim(gcfilename);
sprintf(gcyyerrlog,"%s%s",DEBUGDIR,"yyerrlog.tr");
trim(gcyyerrlog);
if((tracefp=fopen(gcfilename,"w"))==NULL)
{
fprintf(stderr,"open trace file error\n");
exceptExit(10002,INI_COMM_ERR );
}
#endif
if (getInputData("DMOBIMOD") != 0) /*初始化通讯区*/
{
#ifdef YYDEBUG
fclose(tracefp);
CopyTr(gcfilename,gcyyerrlog);
#endif
exceptExit(10002,INI_COMM_ERR ); /*初始化错误,退出服务*/
}
if (getInParamNum() < 28)
{
#ifdef YYDEBUG
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_type,26);
ncpyParm(7,gcaccept_lan,26);
ncpyParm(8,gcvest_lan,26);
ncpyParm(9,gcaccept_grade,26);
ncpyParm(10,gcaccept_mode,26);
ncpyParm(11,gccharge_tache,26);
ncpyParm(12,gcunit_type,26);
ncpyParm(13,gcunit_code,26);
ncpyParm(14,gcexch_code,26);
ncpyParm(15,gcdepart_code,26);
ncpyParm(16,gcdepart_type,26);
ncpyParm(17,gcoper_code,26);
ncpyParm(18,gcterminal_ip,26);
ncpyParm(19,gcterm_code,26);
ncpyParm(20,gcproduct_nostr,2000);
ncpyParm(21,gcbtime,26);
ncpyParm(22,gcbact,26);
ncpyParm(23,gcmainsrv_code,26);
ncpyParm(24,gcmainaccept_state,26);
ncpyParm(25,gcmainsub_srv,26);
ncpyParm(26,gcprod_class,5);
ncpyParm(27,gcpriproduce_no,26);
ncpyParm(28,gccust_type,5);
ncpyParm(29,gcapply_name,21);
ncpyParm(30,gcapply_cert,2);
ncpyParm(31,gcapply_certno,31);
ncpyParm(32,gcapply_tel,41);
ncpyParm(33,gcapply_addr,256);
trim(gcmainproduce_id);
trim(gcmainproduce_no);
trim(gcmainorder_id);
trim(gcmainaccept_id);
trim(gcmainproduct_id);
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(gcbtime);
trim(gcbact);
trim(gcmainsrv_code);
trim(gcmainaccept_state);
trim(gcmainsub_srv);
trim(gcprod_class);
trim(gcpriproduce_no);
trim(gccust_type);
trim(gcapply_name);
trim(gcapply_cert);
trim(gcapply_certno);
trim(gcapply_tel);
trim(gcapply_addr);
#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_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("gcbtime=%s",gcbtime);
DebugLog("gcbact=%s",gcbact);
DebugLog("gcmainsrv_code=%s",gcmainsrv_code);
DebugLog("gcmainaccept_state=%s",gcmainaccept_state);
DebugLog("gcmainsub_srv=%s",gcmainsub_srv);
DebugLog("gcprod_class=%s",gcprod_class);
DebugLog("gcpriproduce_no=%s",gcpriproduce_no);
DebugLog("gccust_type=%s",gccust_type);
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);
#endif
for(i=0;i<10;i++)
{
gcnewproduce_id[i][0]=0;
gcnewproduce_no[i][0]=0;
gcnewaccept_id[i][0]=0;
gcnewproduct_id[i][0]=0;
gcnewsrv_code[i][0]=0;
gcsrv_name[i][0]=0;
gcnewaccept_state[i][0]=0;
gcrollsrv_code[i][0]=0;
gcrollproduce_no[i][0]=0;
}
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);
#endif
ncpyRec(i,0,gccondition,20);
trim(gccondition);
/*A0PDN_PDINFO处理开始*/
if (strcmp(gccondition,"A0") == 0)
{
gia0e=i;
gia0c++;
ncpyRec(i,6,gcrows,5);
trim(gcrows);
if (atoi(gcrows) > gia0rows)
{
gia0rows = atoi(gcrows);
}
}
/*A1PDN_phone处理开始*/
else if (strcmp(gccondition,"A1") == 0)
{
gia1e=i;
gia1c++;
ncpyRec(i,6,gcrows,5);
trim(gcrows);
if (atoi(gcrows) > gia1rows)
{
gia1rows = atoi(gcrows);
}
}
/*g0PDN_incr_prod处理开始*/
else if (strcmp(gccondition,"G0") == 0)
{
gig0e=i;
gig0c++;
ncpyRec(i,6,gcrows,5);
trim(gcrows);
if (atoi(gcrows) > gig0rows)
{
gig0rows = atoi(gcrows);
}
}
/*g1pdn_prod_prop处理开始*/
else if (strcmp(gccondition,"G1") == 0)
{
gig1e=i;
gig1c++;
ncpyRec(i,6,gcrows,5);
trim(gcrows);
if (atoi(gcrows) > gig1rows)
{
gig1rows = atoi(gcrows);
}
}
/*g3pdn_mobile处理开始*/
else if (strcmp(gccondition,"G3") == 0)
{
gig3e=i;
gig3c++;
ncpyRec(i,6,gcrows,5);
trim(gcrows);
if (atoi(gcrows) > gig3rows)
{
gig3rows = atoi(gcrows);
}
}
/*a5PDN_device处理开始*/
else if (strcmp(gccondition,"A5") == 0)
{
gia5e=i;
gia5c++;
ncpyRec(i,6,gcrows,5);
trim(gcrows);
if (atoi(gcrows) > gia5rows)
{
gia5rows = atoi(gcrows);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -