当前位置: 首页>>代码示例>>C++>>正文


C++ PutRow函数代码示例

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


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


注:本文中的PutRow函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。