• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ PutRow函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中PutRow函数的典型用法代码示例。如果您正苦于以下问题:C++ PutRow函数的具体用法?C++ PutRow怎么用?C++ PutRow使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了PutRow函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: F847352

int F847352(TRUSERID *handle, int iRequest, ST_PACK *in_pack, int *pRetCode, char *szMsg)
{
	int error_code = 0;
	int money = 0;

	ST_CPACK aPack;
	ST_PACK *out_pack = &(aPack.pack);
	ResetNormalCPack(&aPack, 0, 1);
	
	Save_Info save_info;
	memset(&save_info, 0, sizeof(save_info));

	SetCol(handle,0);
	SetCol(handle, F_LVOL0, F_LVOL1, F_DAMT0, F_DAMT1, F_SPHONE, F_LVOL10, 0);

	if (1 == in_pack->lvol3)
	{
		// 连接第三方数据库
		if (error_code = InitDB())
		{
			error_code = DLLFUN_ERR_TRANSFER_THIRD_PART_FAIL;
			goto L_RETU;
		}
		
		// 检测第三方帐号
		CheckAccountNo(in_pack->lvol4, &money, &error_code);
		if (0 != error_code) { error_code = DLLFUN_ERR_CHECK_ACC_THIRD_PART_FAIL; }
		
		out_pack->lvol0 = money;
		goto L_RETU;
	}

	save_info.cut_id = in_pack->lvol0;
	save_info.save_Money = in_pack->lvol1;
	save_info.save_type = in_pack->lvol2;

	SaveInfo(&save_info, &error_code);

	if (error_code != 0)
	{
		g_LogFile.WriteLogEx(1001, "客户号[%d]--转帐金额[%d]--转账类型[%d]--错误码[%d]--序号[%d]", 
			save_info.cut_id, save_info.save_Money, save_info.save_type, error_code, ++count1);
		error_code = DLLFUN_ERR_TRANSFER_FAIL;
	}

L_RETU:
	out_pack->lvol1 = error_code;
	*pRetCode = error_code;
	PutRow(handle, out_pack, pRetCode, szMsg);
	return error_code;
}
开发者ID:nykma,项目名称:ykt4sungard,代码行数:51,代码来源:F847352.cpp


示例2: F846313

int F846313(TRUSERID *handle,int iRequest,ST_PACK *rPack,int *pRetCode,char *szMsg)
{
	int ret=0;
	cpu_trade_t cpu_trade;
	ST_CPACK aPack;
	ST_PACK *outPack = &(aPack.pack);	

	ResetNormalCPack(&aPack,0,1);
		
	SetCol(handle,0);
	SetCol(handle,F_LVOL0,F_SSTOCK_CODE2,F_LSERIAL1,F_SEMAIL,0);

	
	memset(&cpu_trade,0,sizeof cpu_trade);

	cpu_trade.trade_type=rPack->lsafe_level;
	des2src(cpu_trade.random_key,rPack->sstock_code);
	des2src(cpu_trade.cardphyid,rPack->sstation1);
	cpu_trade.tradeamt = rPack->lvol1;
	cpu_trade.tradecnt = rPack->lvol6; // 必须是交易前次数
	cpu_trade.balance = rPack->lvol7;
	cpu_trade.termsno = rPack->lserial0;
	des2src(cpu_trade.termno,rPack->sserial0); // 终端号
	strncpy(cpu_trade.tx_datetime,rPack->sdate0,8);
	strncpy(cpu_trade.tx_datetime+8,rPack->stime0,6);
	des2src(outPack->sstock_code2,rPack->sstock_code2); // MAC1,只在移动规范中使用

	// 计算出 MAC2 
	if(rPack->lvol5 == 2)
	{
		ret = calc_cpucard_mac(&cpu_trade,outPack->semail,rPack->lvol5);
	}
	else
	{
		ret = calc_cpucard_mac(&cpu_trade,outPack->sstock_code2,rPack->lvol5);	
	}
		
	if(ret)
	{
		writelog(LOG_ERR,"doCheckMac err[%d]",ret);
		return ret;
	}
	outPack->lvol0 = rPack->lvol0; //交易卡号
	outPack->lserial1=rPack->lserial1; // 交易流水号
	PutRow(handle,outPack,pRetCode,szMsg);
	return 0;
	
}
开发者ID:Codiscope-Research,项目名称:ykt4sungard,代码行数:48,代码来源:F846313.cpp


示例3: F240008

int F240008(TRUSERID *handle,int iRequest,ST_PACK *rPack,int *pRetCode,char *szMsg) {

    int ret=0;
    T_t_device 		device;
    T_t_syspara 	t_syspara;

    ST_CPACK aPack;
    ST_PACK *out_pack = &(aPack.pack);


    ResetNormalCPack(&aPack,0,1);
    SetCol(handle,0);
    SetCol(handle,F_SCARD0,0);

    memset(&device,0,sizeof(device));
    memset(&t_syspara,0,sizeof(t_syspara));

    ret=DB_t_syspara_read_by_paraid(GLOBLE_SYSPARA_STATIC_KEY, &t_syspara);
    if(ret) {
        writelog(LOG_ERR,"DB_t_syspara_read_by_paraid error,error code=[%d]",ret);
        if(DB_NOTFOUND==ret)
            return E_DB_SYSPARA_N;
        else
            return E_DB_SYSPARA_R;
    }

    ret=DB_t_device_read_lock_by_c0_and_deviceid(atoi(rPack->sorder2),&device);
    if(ret) {
        if(ret==DB_NOTFOUND) {
            writelog(LOG_ERR,"DB_t_device_read_lock_by_c0_and_deviceid error,error code=[%d]",ret);
            return E_NOTEXIST_DEVICE;
        } else {
            writelog(LOG_ERR,"DB_t_device_read_lock_by_c0_and_deviceid error,error code=[%d]",ret);
            return E_DB_DEVICE_R;
        }
    }
    device.runstatus[0]=DEVRUNSTATUS_ONLINE;		//更改设备注册表状态为在线状态
    ret=DB_t_device_update_lock_by_c0(&device);
    if(ret) {
        writelog(LOG_ERR,"DB_t_device_update_lock_by_c0 error,error code=[%d]",ret);
        return E_DB_DEVICE_U;
    }
    des2src(out_pack->scard0,t_syspara.paraval);
    PutRow(handle,out_pack,pRetCode,szMsg);

    return 0;
}
开发者ID:Codiscope-Research,项目名称:ykt4sungard,代码行数:47,代码来源:F240008.cpp


示例4: F249999

int F249999(TRUSERID *handle,int iRequest,ST_PACK *rPack,int *pRetCode,char *szMsg)
{
	int ret=0;
	
	ST_PACK ArrayPack;			// 设置返回包
	ST_CPACK aPack;				// 设置应答包
	ST_PACK *out_pack = &(aPack.pack);
	ST_CPACK sPack;			 	// 设置发送包

	ResetNormalCPack(&aPack, 0, 1);
	memset(&ArrayPack, 0, sizeof(ArrayPack));
	
	ResetNormalCPack(&sPack, 0, 1);
	sPack.head.RequestType = 999999;
	SetHeadCol(&sPack, F_SCLOSE_EMP, F_SORDER2, F_SSERIAL0, F_SEMP_PWD, F_DAMT0, F_LVOL3, 0);

	memcpy(&(sPack.pack), rPack, sizeof(sPack.pack));
		
	writelog(LOG_ERR,"branch_no[%d], base_funcno[%d]",g_Bank.DRTP_BRANCH,g_Bank.BCC_BASEFUNCNO);
	
	ret = ExtCall(0, g_Bank.DRTP_BRANCH, g_Bank.BCC_BASEFUNCNO, 0, g_Bank.TIMEOUT, &sPack, &aPack, &ArrayPack);
	writelog(LOG_ERR,"Call 999999 retCode=[%d]", ret);
	if (ret < 0 || aPack.head.retCode != 0)
	{
		memcpy(szMsg, aPack.pack.vsmess, sizeof(aPack.pack.vsmess) -1);
		
		if (ret < 0)
		{
			writelog(LOG_ERR,"Call 999999 error,errcode=[%d],retCode=[%d]",ret,aPack.head.retCode);
			*pRetCode = ret;
			return E_TRANS_UNKNOW_ERROR;
		}
		else
		{
			writelog(LOG_ERR,"Call 999999 error,errcode=[%d],retCode=[%d]",ret,aPack.head.retCode);
			*pRetCode = ret;
			return aPack.head.retCode;
		}
	}
	
	SetCol(handle,0);
	SetCol(handle,F_LVOL0,F_LVOL1,F_DAMT0,F_DAMT1,F_DAMT2,F_DAMT10,F_DAMT11,F_DAMT12,F_VSMESS,0);
	
	PutRow(handle, out_pack, pRetCode, szMsg);
	return 0;

}
开发者ID:Codiscope-Research,项目名称:ykt4sungard,代码行数:47,代码来源:F249999.cpp


示例5: F240024

int F240024(TRUSERID *handle,int iRequest,ST_PACK *rPack,int *pRetCode,char *szMsg)
{
	int ret=0;
	
	ST_CPACK aPack;
	ST_PACK *out_pack = &(aPack.pack);

	ResetNormalCPack(&aPack,0,1);
	SetCol(handle,0);
	SetCol(handle,F_DAMT0,F_DAMT1,F_SALL_NAME,0);

	ret = DoQueryBala(BANK_QUERYBALA,rPack,out_pack,szMsg);
	if(ret)
		return ret;
			
	PutRow(handle,out_pack,pRetCode,szMsg);
	return 0;
}
开发者ID:nykma,项目名称:ykt4sungard,代码行数:18,代码来源:F240024.cpp


示例6: F240004

int F240004(TRUSERID *handle,int iRequest,ST_PACK *rPack,int *pRetCode,char *szMsg)
{

	int ret=0;
	T_t_tif_tradeserial  tradeserial; //卡操作流水表,用做冲正用
	memset(&tradeserial,0,sizeof tradeserial);
	ST_CPACK aPack;
	ST_PACK *out_pack = &(aPack.pack);

	SetCol(handle,0);
   	SetCol(handle,F_SCLOSE_EMP,F_SORDER0,F_SORDER1,F_SSERIAL1,F_LVOL0,F_LVOL1,F_SDATE0,F_STIME0,F_SDATE1,F_STIME1,F_SCUST_NO,F_SCHANGE_EMP,F_SSERIAL0,F_LVOL2,F_SCUST_AUTH,F_SSTATUS1,F_SEMP_PWD,F_SEMP_PWD2,F_SSTATION0,F_SSTATION1,F_SORDER2,0);

	ret = DB_t_tif_tradeserial_next_flush(&tradeserial);
	if(ret)
	{
		if(ret==DB_NOTFOUND)
		{
			*pRetCode=E_DB_TRADESERIAL_N;
			goto L_RETU;
		}
		else 
		{
			*pRetCode=E_DB_TRADESERIAL_R;
			writelog(LOG_ERR,"读取冲正记录失败,errcode=[%d]",ret);
			goto L_RETU;
		}
	}

	sprintf(out_pack->sorder0,"%-9d", int(tradeserial.trade_fee));
	Strncpy_t(out_pack->sdate0,tradeserial.operate_date,sizeof(out_pack->sdate0));
	Strncpy_t(out_pack->stime0,tradeserial.operate_time,sizeof(out_pack->stime0));
	sprintf(out_pack->sserial0,"%-10d",tradeserial.cardno);
	Strncpy_t(out_pack->scust_auth,tradeserial.b_act_id,sizeof(out_pack->scust_auth));
	out_pack->lvol0=tradeserial.reviseserial_no;
	out_pack->lvol1=tradeserial.serial_no;
	out_pack->lvol2=tradeserial.deviceid;

	PutRow(handle,out_pack,pRetCode,szMsg);

	return 0;
L_RETU:
	return ret;

}
开发者ID:nykma,项目名称:ykt4sungard,代码行数:44,代码来源:F240004.cpp


示例7: F820522

int F820522(TRUSERID * handle, int iRequest, ST_PACK * in_pack, int *pRetCode, char *szMsg)
{
	int ret;

	CAccTrans& ats=CAccTrans::GetInst();
	ret=ats.Reset();
	if(ret)
		return ret;
	ST_CPACK aPack;
	ST_PACK *out_pack = &(aPack.pack);
	ResetNormalCPack(&aPack, 0, 1);
	SetCol(handle, F_VSMESS, F_SDATE0, F_SDATE1, F_SDATE2, F_SDATE3, F_SSTATUS0, F_STIME0, 0);
	sprintf(out_pack->sdate0,"%d",ats.hostdate);
	sprintf(out_pack->stime0,"%06d",ats.hosttime);
	sprintf(out_pack->sdate1,"%d",ats.settledate);
	calcEndDate(out_pack->sdate1,-1,out_pack->sdate2);
	calcEndDate(out_pack->sdate1,1,out_pack->sdate3);
	PutRow(handle, out_pack, pRetCode, szMsg);
	return 0;
}
开发者ID:Codiscope-Research,项目名称:ykt4sungard,代码行数:20,代码来源:F820522.cpp


示例8: F849009

int F849009(TRUSERID *handle,int iRequest,ST_PACK *in_pack,int *pRetCode,char *szMsg)
{
	int ret;
	ST_CPACK aPack;
	ST_PACK *out_pack = &(aPack.pack);
	memset(&aPack,0,sizeof aPack);
	ResetNormalCPack(&aPack,0,1);
	SetCol(handle,0);
	SetCol(handle,F_LVOL0,F_LVOL1,F_LVOL2,F_DAMT0,0);
	ret = do_849009(in_pack,szMsg,out_pack,1);
	if(ret)
	{
		*pRetCode = ret;
		goto L_RETU;
	}
	PutRow(handle,out_pack,pRetCode,szMsg);
	return 0;
L_RETU:
	return -1;
}
开发者ID:nykma,项目名称:ykt4sungard,代码行数:20,代码来源:F849009.cpp


示例9: waternobalareturn


//.........这里部分代码省略.........
	trans.transamt=trans.inputamt;
	trans.unusedamt = trans.inputamt;

	trans.cardbefbal=trans.inputamt;
	trans.cardaftbal=0;

	pursetype.pursetype=rPack->lvol1;
	ret=DB_t_pursetype_read_by_pursetype(pursetype.pursetype,&pursetype);
	if(ret)
	{
		return E_DB_PURSETYPE_R;
	}

	writelog(LOG_INFO,"transamt[%f],pursetype[%d],onlineflag[%d]",trans.transamt,pursetype.pursetype,pursetype.onlineflag);
	if(pursetype.onlineflag)
	{
		pAccTrans->trans.transtype=TRANSTYPE_WATERNOBALAREFUND;
		ret=pAccTrans->DoTransByTransType();
		if(ret)
			return ret;	
		ret=pAccTrans->doTransEnd();
		if(ret)
			return ret;
	}
	else				// 脱机水控不支持
	{
		return 0;
	}
	T_t_transdtl transdtl;
	memset(&transdtl,0,sizeof(transdtl));
	des2src(transdtl.refno,trans.refno);
	des2src(transdtl.transdate,trans.transdate);
	des2src(transdtl.transtime,trans.transtime);
	strcpy(transdtl.accdate,trans.accdate);
	strcpy(transdtl.acctime,trans.acctime);
	transdtl.termid=trans.termid;
	transdtl.termseqno=trans.termseqno;
	transdtl.transcode=trans.transcode;
	transdtl.cardno=trans.cardno;
	transdtl.purseno=trans.purseno;
	transdtl.cardbefbal=trans.cardbefbal;
	transdtl.cardaftbal=trans.cardaftbal;
    	transdtl.amount=trans.totaltransamt;
	transdtl.managefee=trans.totalfeeamt;
	transdtl.custid=trans.custid;
	des2src(transdtl.custname,trans.custname);
	des2src(transdtl.opercode,trans.opercode);
	transdtl.status[0]=DTLSTATUS_SUCCESS;
    	des2src(transdtl.showcardno,trans.showcardno);
	GetStuempnoByCustid(transdtl.custid,transdtl.stuempno);
	ret=DB_t_transdtl_add(&transdtl);
	if(ret)
	{
	  if(DB_REPEAT==ret)
	    return E_DB_TRANSDTL_E;
	  else
	    return E_DB_TRANSDTL_I;
	}	
	
	return 0;
}
*/
int F850020(TRUSERID *handle,int iRequest,ST_PACK *rPack,int *pRetCode,char *szMsg)
{
	int ret=0;
	CAccTrans *pAccTrans=CAccTrans::getInstance();
	pAccTrans->trans.transcode=TC_WATERBALRETURN;
	des2src(pAccTrans->trans.opercode,rPack->semp);
	pAccTrans->trans.termid=rPack->lwithdraw_flag;
	ret=pAccTrans->InitTrans();
	if(ret)
		return ret;			
	ST_CPACK aPack;
	ST_PACK *outPack = &(aPack.pack);
	memset(&aPack,0,sizeof(aPack));
	ResetNormalCPack(&aPack,0,1);
	SetCol(handle,0);
	SetCol(handle,F_LVOL0,F_LVOL1,F_LVOL2,F_LVOL3,F_LVOL8,F_SDATE0,F_SPHONE3,F_SADDR,F_LVOL5,F_LVOL9,F_LSAFE_LEVEL,F_LSAFE_LEVEL2,
		F_SDATE3,F_STIME3,F_SEMP,F_LWITHDRAW_FLAG,F_LSERIAL1,F_VSMESS,0);

	
	ret = waterbalareturn(pAccTrans,rPack,outPack);	
	if(ret)
		return ret;
	/*
	if(amtcmp(outPack->damt0, 0)>0 )			// 小钱包卡库不平
	{
		pAccTrans->Reset();
		pAccTrans->trans.inputamt= outPack->damt0;	
		ret = waternobalareturn(pAccTrans,rPack,outPack);
		if(ret)
			return ret;
	}
	*/
	if(iRequest != 846305) // 补办卡时,不返回结果
	{
		PutRow(handle,outPack,pRetCode,szMsg);
	}
	return 0;
}
开发者ID:nykma,项目名称:ykt4sungard,代码行数:101,代码来源:F850020.cpp


示例10: F950006

int F950006(TRUSERID *handle,int iRequest,ST_PACK *rPack,int *pRetCode,char *szMsg)
{
	int ret=0;
	ST_CPACK aPack;
	ST_PACK* out_pack = &(aPack.pack);

	char buf[256] = "";

	char static_key[17]="4343232323231111";
	if(0!=strncmp(static_key,rPack->scust_limit,sizeof(static_key)))
	{
	int sysid = rPack->lcert_code;
	ret = CheckGatewayDynKey(sysid,rPack->scust_limit);
	if(ret)
	{
			writelog(LOG_ERR,"动态密钥错误");
		*pRetCode = ret;
		goto L_RETU;
		}
	}
	ret = GetParameter(rPack->lvol0,buf);
	writelog(LOG_DEBUG,"请求参数parameter[%d]",rPack->lvol0);
	if(ret)
	{
		writelog(LOG_ERR,"获取参数失败[%d]",rPack->lvol0);
		*pRetCode = ret;
		goto L_RETU;
	}
	ResetNormalCPack(&aPack,0,1);
	SetCol(handle,0);
	SetCol(handle,F_SCARD0,0);
	des2src(out_pack->scard0,buf);
	PutRow(handle,out_pack,pRetCode,szMsg);
	return 0;
L_RETU:
	return -1;
}
开发者ID:nykma,项目名称:ykt4sungard,代码行数:37,代码来源:F950006.cpp


示例11: F847150

int F847150(TRUSERID *handle,int iRequest,ST_PACK *rPack,int *pRetCode,char *szMsg)
{
	int ret =0;
	char accno[21]="";
	char accflag=0;
	ST_CPACK aPack;
	ST_PACK *out_pack = &(aPack.pack);

	ResetNormalCPack(&aPack,0,1);

	
	
	SetCol(handle,0);
	SetCol(handle,F_SBANKNAME,0);
	des2src(accno,rPack->sbank_acc);
	
	int subjflag=rPack->lvol1;
	if(subjflag)
	{
		//查询科目全称
		T_t_subject subject;
		memset(&subject,0,sizeof(subject));
		ret=DB_t_subject_read_by_subjno(accno,&subject);
		if(ret)
		{
			if(DB_NOTFOUND==ret)
				return E_DB_SUBJECT_N;
			else
				return E_DB_SUBJECT_R;
		}	
		strcpy(out_pack->sbankname,subject.subjfullname);
		PutRow(handle,out_pack,pRetCode,szMsg);
		return 0;
	}
	if(strlen(accno)<10)
	{
		accflag=ACCFLAG_INNER;
	}
	else
	{
		if('1'==accno[0])
			accflag=ACCFLAG_CARD;
		else if('2'==accno[0])
			accflag=ACCFLAG_SHOP;
		else if('3'==accno[0])
			accflag=ACCFLAG_EACC;
		else
		{
			return ERRINFO(E_NOTEXIST_ACCNO,accno);
		}
	}
	switch(accflag)
	{
		case ACCFLAG_CARD:
		{
			T_t_account  tAccount;
			memset(&tAccount,0,sizeof(tAccount));
			ret=DB_t_account_read_by_accno(accno, &tAccount);
			if(ret)
			{
				if(DB_NOTFOUND==ret)
					return ERRINFO(E_NOTEXIST_CARDACCNO,accno);
				else
					return E_DB_ACCOUNT_R;
			}
			strcpy(out_pack->sbankname,tAccount.accname);
		}
		break;
		case ACCFLAG_SHOP:
		{
			T_t_shopacc  tShopAcc;
			memset(&tShopAcc,0,sizeof(tShopAcc));
			ret=DB_t_shopacc_read_by_accno(accno, &tShopAcc);
			if(ret)
			{
				if(DB_NOTFOUND==ret)
					return ERRINFO(E_NOTEXIST_SHOPACCNO,accno);
				else
					return E_DB_ACCOUNT_R;
			}
			strcpy(out_pack->sbankname,tShopAcc.accname);
		}
		break;
		case ACCFLAG_EACC:
		{
			T_t_netacc  tNetAcc;
			memset(&tNetAcc,0,sizeof(tNetAcc));
			ret=DB_t_netacc_read_by_accno(accno, &tNetAcc);
			if(ret)
			{
				if(DB_NOTFOUND==ret)
					return ERRINFO(E_NOTEXIST_EACCNO,accno);
				else
					return E_DB_ACCOUNT_R;
			}
			strcpy(out_pack->sbankname,tNetAcc.accname);
		}
		break;
		case ACCFLAG_INNER:
		{
//.........这里部分代码省略.........
开发者ID:nykma,项目名称:ykt4sungard,代码行数:101,代码来源:F847150.cpp


示例12: F950041

int F950041(TRUSERID *handle,int iRequest,ST_PACK *rPack,int *pRetCode,char *szMsg)
{
	int ret;
	T_t_pif_device tDevice;
	T_t_cif_shop_pos tShopPos;
	T_t_cif_shop tShop;
	T_t_tif_meslist tMsg;
	int rate = 0;
	int retries = 0;
	int msgid;

	memset(&tDevice,0,sizeof tDevice);
	
	ST_CPACK aPack;
	ST_PACK *out_pack = &(aPack.pack);

	ResetNormalCPack(&aPack,0,1);
	SetCol(handle,0);
	SetCol(handle,F_VSVARSTR0,0);
	
	if(rPack->lcert_code < 1)
	{
		*pRetCode = E_DEVICE_NOT_EXIST;
	}
	else if((ret = DB_t_pif_device_read_by_device_id(rPack->lcert_code,&tDevice)))
	{
		*pRetCode = ret;

	}
	else if(tDevice.state_id == DEVISTAT_LOGOUT)
	{
		*pRetCode = E_DEVICE_NOT_EXIST;
	}
	else if((ret = DB_t_cif_shop_pos_open_select_by_c0_and_device_id(rPack->lcert_code)))
	{
		*pRetCode = ret;
	}
	else
	{
		while(1)
		{
			memset(&tShopPos,0,sizeof tShopPos);
			memset(&tShop,0,sizeof tShop);
			if((ret = DB_t_cif_shop_pos_fetch_select_by_c0(&tShopPos)))
			{
				*pRetCode = ret;
				if(ret == DB_NOTFOUND)
					*pRetCode  = 0;
				break;
			}
			if((ret = DB_t_cif_shop_read_by_shop_id(tShopPos.shop_id,&tShop)))
			{
				*pRetCode = ret;
				break;
			}
			if('1' == tShop.is_leaf[0] && '1' == tShop.is_getfee[0]
				&& amtcmp(tShop.ratio,0.00)>0 )
			{
				int newrate = (int)tShop.ratio * 100;
				if(newrate > rate)
					rate = newrate;
			}
		}
		
	}
	if(*pRetCode)
		return -1;
	memset(&tMsg,0,sizeof tMsg);
	tMsg.funid = 950041;
	//des2src(tMsg.devphy999_id,tDevice.devphy999_id);
	tMsg.devid = tDevice.device_id;
	AddXmlItemInt(tMsg.incontent,XML_KEY_FEE,rate);
	tMsg.max_send_cnt = 5;
	if((ret = AddMsgLst(&tMsg)))
	{
		*pRetCode = ret;
	}
	else
	{
		if(db_commit())
		{
			*pRetCode = E_DB_COMMIT;
			return -1;
		}
		retries = 3;
		msgid = tMsg.mesid;
		while(retries-- > 0)
		{
			memset(&tMsg,0,sizeof tMsg);
			ret = DB_t_tif_meslist_read_by_mesid(msgid,&tMsg);
			des2src(out_pack->vsvarstr0,tMsg.emsg);
			if(!ret && !tMsg.ecode)
			{
				break;
			}
			// 等待1秒
			sleep(1);
		}
		PutRow(handle,out_pack,pRetCode,szMsg);
		AnswerData(handle,*pRetCode,szMsg);
//.........这里部分代码省略.........
开发者ID:nykma,项目名称:ykt4sungard,代码行数:101,代码来源:F950041.c


示例13: Pos_QuerySerial


//.........这里部分代码省略.........
		sprintf(from_pos.CardNo,"%d",tradeserial.card_id);
		memcpy(from_pos.BankCardNo,tradeserial.b_act_id,sizeof(from_pos.BankCardNo));
		sprintf(from_pos.TransMoney,"%d",int(tradeserial.trade_fee)*100);
		if(tradeserial.serial_state!=2)
		{
			sprintf(from_pos.RetCode,"%s","失败");
		}
		else sprintf(from_pos.RetCode,"%s","成功");

		//开始返回应答包
		Strncpy_t(out_pack->sclose_emp,from_pos.TradeCode,sizeof(out_pack->sclose_emp));
		Strncpy_t(out_pack->sorder0,from_pos.TransMoney,sizeof(out_pack->sorder0));
		Strncpy_t(out_pack->sorder1,from_pos.ExtraMoney,sizeof(out_pack->sorder1));
		Strncpy_t(out_pack->sserial1,from_pos.AccountMoney,sizeof(out_pack->sserial1));
		out_pack->lvol0=from_pos.SendNo;
		out_pack->lvol1=from_pos.RecvNo;
		memcpy(out_pack->sdate0,from_pos.TradeDate,sizeof(from_pos.TradeDate));
		memcpy(out_pack->stime0,from_pos.TradeTime,sizeof(from_pos.TradeTime));
		memcpy(out_pack->sdate1,from_pos.BankDate,sizeof(from_pos.BankDate));
		memcpy(out_pack->stime1,from_pos.BankTime,sizeof(from_pos.BankTime));
		Strncpy_t(out_pack->scust_no,from_pos.Balance,sizeof(out_pack->scust_no));
		Strncpy_t(out_pack->schange_emp,from_pos.RetCode,sizeof(out_pack->schange_emp));
		Strncpy_t(out_pack->sserial0,from_pos.CardNo,sizeof(out_pack->sserial0));
		out_pack->lvol2=from_pos.Notecase;
		Strncpy_t(out_pack->scust_auth,from_pos.BankCardNo,sizeof(out_pack->scust_auth));
		sprintf(out_pack->sstatus1,"%c",from_pos.MngFeeFlag);
		Strncpy_t(out_pack->semp_pwd,from_pos.AccountPwd,sizeof(out_pack->semp_pwd));
		Strncpy_t(out_pack->semp_pwd2,from_pos.AccountNewPwd,sizeof(out_pack->semp_pwd2));
		Strncpy_t(out_pack->sstation0,from_pos.BankCardPwd,sizeof(out_pack->sstation0));
		Strncpy_t(out_pack->sstation1,from_pos.BankCardNewPwd,sizeof(out_pack->sstation1));
		Strncpy_t(out_pack->sorder2,from_pos.TerminalId,sizeof(out_pack->sorder2));
//	printf("LINE:%d\n",__LINE__);

		PutRow(handle,out_pack,pRetCode,szMsg);
		if(cnt>=10)
		{
			DB_t_tif_tradeserial_close_select_by_cur3();
			break;
		}
	}
//	printf("LINE:%d\n",__LINE__);


	T_t_tif_tradeserial_his tradeserial_his;
	memset(&tradeserial_his,0,sizeof(tradeserial_his));

	if(cnt<10)
	{
		ret=DB_t_tif_tradeserial_his_open_select_by_cur1_and_serial_type_and_card_id(TRADE_INNER_TRANS,card.card_id);
		if(ret)
		{
				db_chk_err(__FILE__,__LINE__,&sqlca);
				writelog(LOG_ALERT,"declare cursor err sqlcode[%d]",ret);
				return E_TRANS_UNKNOW_ERROR;
		}
	//	printf("LINE:%d\n",__LINE__);

		while(1)
		{
			ret=DB_t_tif_tradeserial_his_fetch_select_by_cur1(&tradeserial_his);
			if(ret)
			{
				DB_t_tif_tradeserial_his_close_select_by_cur1();
				if(ret==DB_NOTFOUND)
				{
					writelog(LOG_DEBUG,"There havn't record from t_tif_tradeserial_his table!");
开发者ID:nykma,项目名称:ykt4sungard,代码行数:67,代码来源:transinfo.cpp


示例14: F847104


//.........这里部分代码省略.........
	}
	sprintf(out_pack->vsmess,"流水号:%d 卡号:%d ",IA.iSerialNo,IA.iCardNo);
	for(i=1;i<=IA.iOutTxTypeCnt;i++)
	{
		switch(IA.iArrOutTxType[i])
		{
	        case TXTYPE_TOLL_DEPOSIT:
	        case TXTYPE_DEDUCT_DEPOSIT:
	        case TXTYPE_RETURN_DEPOSIT:
	            tradeserial.deposit_fee=IA.dArrOutAmt[i];
	            break;
	        case TXTYPE_PRE_TOLL_BOARD:
	        case TXTYPE_TOLL_BOARD:
	        case TXTYPE_DEDUCT_BOARD:
	        case TXTYPE_RETURN_BOARD:
	            tradeserial.boardfee=IA.dArrOutAmt[i];
	            break;
	        case TXTYPE_TOLL_CHARGE:
	            tradeserial.in_fee=IA.dArrOutAmt[i];
	            break;
	        case TXTYPE_TOLL_CARDCOST:
	            tradeserial.cost_fee=IA.dArrOutAmt[i];
	            break;
	        default:
	            break;
		}
		if(amtcmp(IA.dArrOutAmt[i],0)!=0)
		{
			sprintf(sMsg,"%s:%.2lf元 ",IA.sArrOutTxName[i],IA.dArrOutAmt[i]);
			strcat(out_pack->vsmess,sMsg);
		}
	}
	sprintf(sMsg,"卡当前余额:%.2lf元",tradeserial.out_balance);
	strcat(out_pack->vsmess,sMsg);
	writelog(LOG_DEBUG,out_pack->vsmess);
	ret = DB_t_tif_tradeserial_add(&tradeserial);
	if (ret)
	{
		writelog(LOG_ERR,"ret[%d]",ret);
		if(DB_REPEAT==ret)
			*pRetCode = E_DB_TRADESERIAL_E;
		else
			*pRetCode = E_DB_TRADESERIAL_I;
		goto L_RETU;
	}
	if(amtcmp(tradeserial.out_balance,0)<0)
	{
		*pRetCode=E_ENTER_ACCOUNT;
		goto L_RETU;
	}
	//检查金额是否超过最大额度
	ret=GetParameter(GLOBE_MAXCARDBALANCE,sMaxCardBalance);
	if(ret)
	{
		*pRetCode=ret;
		goto L_RETU;
	}
	dMaxCardBalance=atof(sMaxCardBalance);
	if(amtcmp(tradeserial.out_balance,dMaxCardBalance)>0)
	{
		writelog(LOG_ERR,"tradeserial.out_balance[%lf]",tradeserial.out_balance);
		*pRetCode=E_AMT_EXCEED_MAX;
		goto L_RETU;
	}
	// 增加发行新卡时的门禁名单表检查
	ret = CheckNewCardHook(&tCustomer, tCard.card_id);
	if(ret)
	{
		*pRetCode = ret;
		goto L_RETU;
	}
	//返回卡号\密码\显示卡号\客户类型\图书证号\有效截至日期
	out_pack->lvol0 = (int)h_temp_Card_id;						//交易卡号
	out_pack->lvol1 = tCustomer.cut_type;						//客户类别
	out_pack->lvol5 = tCustomer.fee_type;						//收费类别
	des2src(out_pack->scust_no,h_showcardid);					//显示卡号
	des2src(out_pack->scust_no2,tCustomer.classdept_no);			//部门号
	des2src(out_pack->scust_auth,tCustomer.stuemp_no);			//学号
	des2src(out_pack->scust_auth2,tCustomer.man_id);			//身份证号
	des2src(out_pack->sname,tCustomer.cut_name);				//客户姓名
	des2src(out_pack->sname2,tCustomer.lib_cardid);				//图书证号
	des2src(out_pack->sstatus0,tCustomer.sex);					//性别
	des2src(out_pack->sopen_emp,h_password);					//卡密码
	des2src(out_pack->sdate0,card_endtime);					//有效截至日期

	out_pack->damt2=tradeserial.out_balance;					//出卡值
	out_pack->lserial1=tradeserial.serial_no;						//流水号
	// add by 汤成 2005-8-8
	// 增加向名单表写入记录
	ret = InsertToBlkList((int)h_temp_Card_id,CHCARD_BLACKLIST);
	if(ret)
	{
		*pRetCode = ret;
		goto L_RETU;
	}
	PutRow(handle,out_pack,pRetCode,szMsg);
	return 0;
  L_RETU:
	return -1;
}
开发者ID:nykma,项目名称:ykt4sungard,代码行数:101,代码来源:F847104.c


示例15: F847116


//.........这里部分代码省略.........
	IA.iArrInFeeSwitch[1]=rPack->lvol1;
	IA.iArrInFeeSwitch[2]=rPack->lvol2;
	IA.iArrInFeeSwitch[3]=rPack->lvol3;
	IA.iArrInFeeSwitch[4]=rPack->lvol4;
	IA.iArrInFeeSwitch[5]=rPack->lvol5;
	IA.iArrInFeeSwitch[6]=rPack->lvol6;
	IA.iArrInFeeSwitch[7]=rPack->lvol7;
	IA.iArrInFeeSwitch[8]=rPack->lvol8;
	IA.iArrInFeeSwitch[9]=rPack->lvol9;
	IA.iArrInFeeSwitch[10]=rPack->lvol10;

	//	调用入账子模块
	ret=process(&IA,&tradeserial);
	if(ret)
	{
		*pRetCode=ret;
		writelog(LOG_ERR,"process ret[%d]",ret);
		goto L_RETU;
	}
	sprintf(out_pack->vsmess,"流水号:%d 卡号:%d ",IA.iSerialNo,IA.iCardNo);
	for(i=1;i<=IA.iOutTxTypeCnt;i++)
	{
		switch(IA.iArrOutTxType[i])
		{
			case TXTYPE_TOLL_DEPOSIT:
			case TXTYPE_DEDUCT_DEPOSIT:
			case TXTYPE_RETURN_DEPOSIT:
				tradeserial.deposit_fee=IA.dArrOutAmt[i];
				break;
			case TXTYPE_PRE_TOLL_BOARD:
			case TXTYPE_TOLL_BOARD:
			case TXTYPE_DEDUCT_BOARD:
			case TXTYPE_RETURN_BOARD:
				tradeserial.boardfee=IA.dArrOutAmt[i];
				break;
			case TXTYPE_TOLL_CHARGE:
				tradeserial.in_fee=IA.dArrOutAmt[i];
				break;
			case TXTYPE_TOLL_CARDCOST:
				tradeserial.cost_fee=IA.dArrOutAmt[i];
				break;
			default:
				break;
		}
		if(amtcmp(IA.dArrOutAmt[i],0)!=0)
		{
			sprintf(sMsg,"%s:%.2lf元 ",IA.sArrOutTxName[i],IA.dArrOutAmt[i]);
			strcat(out_pack->vsmess,sMsg);
		}
	}
	sprintf(sMsg,"卡当前余额:%.2lf元",tradeserial.out_balance);
	strcat(out_pack->vsmess,sMsg);
	writelog(LOG_DEBUG,out_pack->vsmess);
	//	插入交易流水表
	ret = DB_t_tif_tradeserial_add(&tradeserial);
	if (ret)
	{
		if(DB_REPEAT==ret)
			*pRetCode = E_DB_TRADESERIAL_E;
		else
			*pRetCode = E_DB_TRADESERIAL_I;
		goto L_RETU;
	}
	if(amtcmp(tradeserial.out_balance,0)<0)
	{
		*pRetCode=E_ENTER_ACCOUNT;
		goto L_RETU;
	}

	//	返回卡号\密码\显示卡号\客户类型\图书证号\有效截至日期
	out_pack->lvol0 = (int)h_temp_Card_id;						//交易卡号
	out_pack->lvol1 = tCustomer.cut_type;						//客户类别
	out_pack->lvol5 = tCustomer.fee_type;						//收费类别
	des2src(out_pack->scust_no,h_showcardid);					//显示卡号
	des2src(out_pack->scust_no2,tCustomer.classdept_no);			//部门号
	des2src(out_pack->scust_auth,tCustomer.stuemp_no);			//学号
	des2src(out_pack->scust_auth2,tCustomer.man_id);			//身份证号
	des2src(out_pack->sname,tCustomer.cut_name);				//客户姓名
	des2src(out_pack->sname2,tCustomer.lib_cardid);				//图书证号
	des2src(out_pack->sstatus0,tCustomer.sex);					//性别
	des2src(out_pack->sopen_emp,h_password);					//卡密码
	des2src(out_pack->sdate0,card_endtime);					//有效截至日期

	out_pack->damt2=tradeserial.out_balance;				//出卡值
	out_pack->damt3=tradeserial.boardfee;					//搭伙费
	out_pack->lserial1=tradeserial.serial_no;					//流水号

	// add by 汤成 2005-8-8
	// 增加向名单表写入记录
	ret = InsertToBlkList((int)h_temp_Card_id,CHCARD_BLACKLIST);
	if(ret)
	{
		*pRetCode = ret;
		goto L_RETU;
	}
	PutRow(handle,out_pack,pRetCode,szMsg);
	return 0;
L_RETU:
	return -1;
}
开发者ID:nykma,项目名称:ykt4sungard,代码行数:101,代码来源:F847116.c


示例16: image

/**
 SamplesToCoefficients.<br>
 Implement the algorithm that converts the image samples into B-spline coefficients. 
 This efficient procedure essentially relies on the three papers cited above; 
 data are processed in-place. 
 Even though this algorithm is robust with respect to quantization, 
 we advocate the use of a floating-point format for the data. 

 @param Image Input / Output image (in-place processing)
 @param Width Width of the image
 @param Height Height of the image
 @param spline_degree Degree of the spline model
 @return Returns true if success, false otherwise
*/
static bool	
SamplesToCoefficients(double *Image, long Width, long Height, long spline_degree) {
	double	*Line;
	double	Pole[2];
	long	NbPoles;
	long	x, y;

	// recover the poles from a lookup table
	switch (spline_degree) {
		case 2L:
			NbPoles = 1L;
			Pole[0] = sqrt(8.0) - 3.0;
			break;
		case 3L:
			NbPoles = 1L;
			Pole[0] = sqrt(3.0) - 2.0;
			break;
		case 4L:
			NbPoles = 2L;
			Pole[0] = sqrt(664.0 - sqrt(438976.0)) + sqrt(304.0) - 19.0;
			Pole[1] = sqrt(664.0 + sqrt(438976.0)) - sqrt(304.0) - 19.0;
			break;
		case 5L:
			NbPoles = 2L;
			Pole[0] = sqrt(135.0 / 2.0 - sqrt(17745.0 / 4.0)) + sqrt(105.0 / 4.0)
				- 13.0 / 2.0;
			Pole[1] = sqrt(135.0 / 2.0 + sqrt(17745.0 / 4.0)) - sqrt(105.0 / 4.0)
				- 13.0 / 2.0;
			break;
		default:
			// Invalid spline degree
			return false;
	}

	// convert the image samples into interpolation coefficients 

	// in-place separable process, along x 
	Line = (double *)malloc(Width * sizeof(double));
	if (Line == NULL) {
		// Row allocation failed
		return false;
	}
	for (y = 0L; y < Height; y++) {
		GetRow(Image, y, Line, Width);
		ConvertToInterpolationCoefficients(Line, Width, Pole, NbPoles, DBL_EPSILON);
		PutRow(Image, y, Line, Width);
	}
	free(Line);

	// in-place separable process, along y 
	Line = (double *)malloc(Height * sizeof(double));
	if (Line == NULL) {
		// Column allocation failed
		return false;
	}
	for (x = 0L; x < Width; x++) {
		GetColumn(Image, Width, x, Line, Height);
		ConvertToInterpolationCoefficients(Line, Height, Pole, NbPoles, DBL_EPSILON);
		PutColumn(Image, Width, x, Line, Height);
	}
	free(Line);

	return true;
}
开发者ID:BackupTheBerlios,项目名称:mimplugins-svn,代码行数:78,代码来源:BSplineRotate.cpp


示例17: F930008

int F930008(TRUSERID *handle,int iRequest,ST_PACK *in_pack,int *pRetCode,char *szMsg)
{
	int ret = 0;
	int cnt=0;
	int msgid=0;
     	T_t_msglist tMsgList;
	T_t_device tDevice;

	ST_CPACK aPack;
	ST_PACK *out_pack = &(aPack.pack);

	ResetNormalCPack(&aPack,0,1);
	SetCol(handle,0);
	SetCol(handle,F_VSVARSTR0,0);
	memset(&tMsgList,0,sizeof(tMsgList));
	memset(&tDevice,0,sizeof tDevice);

	if(strlen(in_pack->sdate0)==0)
	{
		*pRetCode=E_DEVPHYID_NULL;
		goto L_RETU;
	}

	if((ret = get_devinfo_by_phyid(in_pack->sdate0,&tDevice)))
	{
		*pRetCode = ret;
		goto L_RETU;
	}
	tMsgList.deviceid = tDevice.deviceid;
	tMsgList.funcno = 930008;
	tMsgList.msglevel = 2;
	ret=AddMsgLst(&tMsgList);
	if(ret)
	{
		*pRetCode=ret;
		writelog(LOG_ERR,"AddMsgLst err[%d]",ret);
		goto L_RETU;
	}
	if(iRequest!=tMsgList.funcno)
		return 0;	
	ret=db_commit();
	if(ret)
	{
		writelog(LOG_ERR,"db_commit ret[%d]",ret);
		*pRetCode=E_DB_COMMIT;
		goto  L_RETU;
	}
	msgid=tMsgList.msgid;
	des2src(out_pack->sdate0,in_pack->sdate0);
	for(cnt=0;(cnt<10)&&(tMsgList.errcode!=0);cnt++)
	{
		sleep(1);
		memset(&tMsgList,0,sizeof(tMsgList));
		ret=DB_t_msglist_read_by_msgid(msgid, &tMsgList);
		if(ret)
		{
			writelog(LOG_ERR,"DB_t_msglist_read_by_msgid err[%d]",ret);
			*pRetCode=E_DB_MSGLIST_R;
			goto L_RETU;
		}
	}
	switch(tMsgList.errcode)
	{
		case 0:		//成功
			des2src(out_pack->vsvarstr0,"成功");
			break;
		case 9999:		//交易未处理
			des2src(out_pack->vsvarstr0,"前置机无应答");
			break;
		default:			//交易已经处理,但结果是失败
			des2src(out_pack->vsvarstr0,tMsgList.errmsg);				
			break;
	}	
	PutRow(handle,out_pack,pRetCode,szMsg);
	return 0;
L_RETU:
	return  -1;	
}
开发者ID:Codiscope-Research,项目名称:ykt4sungard,代码行数:78,代码来源:F930008.cpp


示例18: F950032


//.........这里部分代码省略.........
//	POS机日期	char(8) sdate0
//	POS机时间	char(6) stime0
//	子系统ID		int lcert_code
//	动态密钥	char(20)	scust_limit2
//			
//	参数	类型	CPACK字段
//	商户号		int lvol0
//	系统日期	char(8) sdate0
//	系统时间	char(6) stime0
//	POS机工作开始时间	char(6) stime1
//	POS机工作结束时间	char(6) stime2
//	设备类型	char(4) semp
//	设备工作密钥	char(16)	scert_addr
	int ret=0;
	ST_CPACK aPack;
	ST_PACK* out_pack = &(aPack.pack);
	ResetNormalCPack(&aPack,0,1);
	SetCol(handle,0);
	SetCol(handle,F_LVOL0,F_SDATE0,F_STIME0,F_STIME1,F_STIME2,F_SEMP,F_SCERT_ADDR,0);
	char devphyid[31]="";
	char sysdate[9]="";
	char systime[7]="";
	ret=db_getsysdatetime(sysdate,systime);
	if(ret)
	{
		writelog(LOG_ERR,"db_getsysdatetime err=%d",ret);
		return ERRIF_DATABASE_DIS;
	}
	int sysid = rPack->lcert_code;
	int deviceid = rPack->lwithdraw_flag;
	int db_deviceid=0;
	des2src(devphyid,rPack->sphone3);
	writelog(LOG_INFO,"devphyid %s login start",devphyid);	
	ret = ChkDynKey(sysid,rPack->scust_limit2);
	if(ret)
	{
		writelog(LOG_ERR,"chk_dyn_key sysid[%d] err=%d",sysid,ret);
		return ret;
	}	
	ret=GetDeviceidByDevphyid(devphyid,&db_deviceid);
	if(ret)
	{
		return ret;
	}
	if(deviceid!=db_deviceid)
	{
		return ERRIF_POS_TERMID;
	}
	char devstatus[2]="";
	devstatus[0]=DEVRUNSTATUS_ONLINE;
	ret=UpdDevRunstatusByDeviceid(deviceid,devstatus);
	if(ret)
		return ret;
	int shopid=0;
	ret=GetShopidByDeviceid(deviceid,sysdate,systime,&shopid);
	if(ret)
	{
		return ret;
	}
	ret=GetDevtypecodeByDeviceid(deviceid,out_pack->semp);
	if(ret)
		return ret;
	out_pack->lvol0=shopid;
	strcpy(out_pack->sdate0,sysdate+2);
	strcpy(out_pack->stime0,systime);
	
	ret=GetSysParaVal(GLOBLE_SYSPARA_STATIC_KEY,out_pack->scert_addr);
	if(ret)
	{
		writelog(LOG_ERR,"get static key err=%d",ret);
		return ERRIF_DATABASE_QRY;
	}
	//签到时查询流水号控制表,如果没有该设备则添加一条
	T_t_seqnoctl	tSeqnoctl;		
	memset(&tSeqnoctl,0,sizeof(tSeqnoctl));
	ret=DB_t_seqnoctl_read_by_termid(deviceid,&tSeqnoctl);
	if(ret)
	{
		if(DB_NOTFOUND==ret)
		{
			tSeqnoctl.termid=deviceid;
			tSeqnoctl.termseqno=0;
			tSeqnoctl.accdate=atoi(sysdate);
			ret=DB_t_seqnoctl_add(&tSeqnoctl);
			if(ret)
			{
				if(DB_REPEAT==ret)
					return E_DB_SEQNOCTL_E;
				else
					return E_DB_SEQNOCTL_I;
			}
			return 0;
		}
		else
			return E_DB_SEQNOCTL_R;
	}	
	PutRow(handle,out_pack,pRetCode,szMsg);
	writelog(LOG_INFO,"devphyid %s login success",devphyid);	
	return 0;
}
开发者ID:Codiscope-Research,项目名称:ykt4sungard,代码行数:101,代码来源:F950032.cpp


示例19: F846332

int F846332(TRUSERID *handle,int iRequest,ST_PACK *rPack,int *pRetCode,char *szMsg)
{
	int ret=0;
	CAccTrans *pAccTrans=CAccTrans::getInstance();
	des2src(pAccTrans->trans.opercode,rPack->semp);
	pAccTrans->trans.transcode=TC_EACCCLOSE;
	ret=pAccTrans->InitTrans();
	if(ret)
		return ret;			
	TRANS& trans=pAccTrans->trans;

	ST_CPACK aPack;
	ST_PACK *outPack = &(aPack.pack);
	ResetNormalCPack(&aPack,0,1);
		
	SetCol(handle,0);

	des2src(trans.eaccno,rPack->sbank_acc);
	if(!strlen(trans.eaccno))
		return E_INPUTNULL_ACCNO;
	//去帐户信息
	T_t_netacc eaccount;	
	memset(&eaccount,0,sizeof(eaccount));
	ret=DB_t_netacc_read_by_accno(trans.eaccno,&eaccount);
	if(ret)
	{
		writelog(LOG_ERR,"accno[%s]",trans.eaccno);
		if(DB_NOTFOUND==ret)
			return E_NOTEXIST_EACCNO;
		else 
			return E_DB_ACCOUNT_R;
	}
	if(eaccount.status[0]!=STATUS_NORMAL)
	{
		return E_CARDACC_LOGOUT;
	}	
	char seedkey[33]="";
	char inpwd_crypt[65]="";
	char inpwd_plain[65]="";
	char dbpwd_plain[65]="";
	des2src(inpwd_crypt,rPack->snote2);
	if(!strlen(inpwd_crypt))
		return E_PWD_NULL;
	ret=GetSysParaVal(GLOBLE_SYSPARA_STATIC_KEY,seedkey);
	if(ret)
		return ret;
	ret=decrypt_elec_card_pwd(0,seedkey,inpwd_crypt,inpwd_plain);
	if(ret)
		return	E_EACCPWD;
	ret=decrypt_elec_card_pwd(0,seedkey,eaccount.accpwd,dbpwd_plain);
	if(ret)
		return E_PWD_DECRYPT;
	if(strcmp(inpwd_plain,dbpwd_plain)!=0)
		return E_EACCPWD;
		//检查客户
	T_t_customer tCustomer;
	memset(&tCustomer,0,sizeof(tCustomer));
	ret=doCustomer(eaccount.custid,tCustomer);
	if(ret)
		return ret;
	//	创建账号
	pAccTrans->trans.custid=eaccount.custid;
	pAccTrans->trans.inputamt=eaccount.balance;
	trans.unusedamt = trans.inputamt;
	strcpy(pAccTrans->trans.eaccno,eaccount.accno);
	ret=pAccTrans->doTrans();
	if(ret)
		return ret;	
	//注销帐户
	ret=doAccount(trans);
	if(ret)
		return ret;
	SetCol(handle,F_LVOL0,F_LVOL8,F_SDATE3,F_SEMP,F_LWITHDRAW_FLAG,F_LSERIAL1,F_VSMESS,0);	
	des2src(outPack->sdate3,pAccTrans->trans.accdate);
	des2src(outPack->semp,trans.opercode);
	outPack->lwithdraw_flag=trans.termid;
	outPack->lserial1=trans.termseqno;
	sprintf(outPack->vsmess,"客户[%s]电子钱包销户成功",eaccount.accname);
	strcat(outPack->vsmess,pAccTrans->remark.c_str());
	des2src(trans.remark,outPack->vsmess);
	PutRow(handle,outPack,pRetCode,szMsg);
	return 0;
}
开发者ID:nykma,项目名称:ykt4sungard,代码行数:83,代码来源:F846332.cpp


示例20: F930007

int F930007(TRUSERID *handle,int iRequest,ST_PACK *in_pack,int *pRetCode,char *szMsg)
{
	int ret = 0;
 	int cnt=0;
	int mesid=0;
       T_t_tif_meslist tMesList;
	T_t_pif_device tDevice;

	ST_CPACK aPack;
	ST_PACK *out_pack = &(aPack.pack);

	ResetNormalCPack(&aPack,0,1);
	SetCol(handle,0);
	SetCol(handle,F_VSVARSTR0,0);
	memset(&tMesList,0,sizeof(tMesList));
	memset(&tDevice,0,sizeof(tDevice));

	des2src(tMesList.devphy999_id, in_pack->sdate0);
	trim(tMesList.devphy999_id);
	if(strlen(tMesList.devphy999_id)==0)
	{
		*pRetCode=E_DEVPHYID_NULL;
		goto L_RETU;
	}
	ret=get_devinfo_by_phyid(tMesList.devphy999_id,&tDevice);
	if(ret)
	{
		*pRetCode=ret;
		writelog(LOG_ERR,"get_devinfo_by_phyid err[%d]",ret);
		goto L_RETU;
	}
	AddXmlItemInt(tMesList.incontent, XML_KEY_DEV999_NO, tDevice.dev999_no);		//机号
	AddXmlItemStr(tMesList.incontent, XML_KEY_DEV999_ID, tDevice.dev999_id);		//注册号	
	AddXmlItemInt(tMesList.incontent, XML_KEY_BAUDRATE, tDevice.baudrate);		//波特率
	AddXmlItemStr(tMesList.incontent, XML_KEY_SYSPWD, tDevice.syspwd);			//系统员密码	
	AddXmlItemStr(tMesList.incontent, XML_KEY_ADMPWD,tDevice.admpwd);			//管理员密码
	Ad 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ PutSeed函数代码示例发布时间:2022-05-30
下一篇:
C++ PutRNGstate函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap