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


C++ DB_t_tif_tradeserial_add函数代码示例

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


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

示例1: SaveCancelLossSerial

static int SaveCancelLossSerial(T_t_tif_tradeserial  *pTradeserial)
{
	int ret;
	
	//	插入卡操作流水表
	ret = DB_t_tif_tradeserial_add(pTradeserial);
	if (ret)
	{
		writelog(LOG_ERR,"ret [%d]",ret);
		if(DB_REPEAT==ret)
			return E_DB_TRADESERIAL_E;
		else
			return E_DB_TRADESERIAL_I;
	}
	return ret;
}
开发者ID:nykma,项目名称:ykt4sungard,代码行数:16,代码来源:F847103.c

示例2: record_serial

 int record_serial(ST_PACK *in_pack,T_t_tif_tradeserial *tradeserial,ST_PACK *out_pack){
	int ret =0;
	double dUniqno = 0;
	char sMsg[256]="";

	//	准备数据插入交易流水表
	ret = getNewUniqNo(KEYTYPE_TRADESERIAL,&dUniqno);  					//获得最大流水号
	if(ret)
	{
		writelog(LOG_ERR,"getNewUniqNo error,errcode=[%d]",ret);
		return ret;
	}						
	tradeserial->serial_no = D2I(dUniqno);			//流水号
	out_pack->damt1=tradeserial->trade_fee;		//充值金额
	out_pack->damt0=tradeserial->out_balance;	//出卡值
	out_pack->lvol0=tradeserial->serial_no;//流水号
	
	sprintf(sMsg,"交易前卡余额:%.2lf元 卡当前余额:%.2lf元",tradeserial->in_balance,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)
			ret = E_DB_TRADESERIAL_E;
		else
			ret = E_DB_TRADESERIAL_I;
		return ret;
	}
	ret=db_commit();
	if(ret)
	{
		writelog(LOG_ERR,"db_commit error,errcode=[%d]",ret);
		return E_DB_COMMIT;
	}
	return 0;
	

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

示例3: record_small_serial

static int record_small_serial(ST_PACK *in_pack,T_t_tif_tradeserial *tradeserial,ST_PACK *out_pack){
	int ret =0;
	double dUniqno = 0;
	 T_t_tif_tradeserial  tPacketSerial;

	//保存充值流水
	memset(&tPacketSerial, 0, sizeof tPacketSerial);
	memcpy(&tPacketSerial, tradeserial, sizeof tPacketSerial);
	ret = getNewUniqNo(KEYTYPE_TRADESERIAL,&dUniqno);  						//获得最大流水号
	if(ret)
	{
		writelog(LOG_ERR,"ret [%d]",ret);
		return ret;
	}
	tPacketSerial.serial_no = D2I(dUniqno);
	tPacketSerial.serial_state = SERISTAT_NONEEDDEBT;
	tPacketSerial.serial_type = TXCODE_SAVING_SMALL_PACKET;
	tPacketSerial.purse_id = 33;//33扇区钱包
	tPacketSerial.in_balance = in_pack->damt2;
	tPacketSerial.trade_fee = in_pack->damt1;
	tPacketSerial.out_balance = tPacketSerial.in_balance + tPacketSerial.trade_fee;

	ret = DB_t_tif_tradeserial_add(&tPacketSerial);
	if (ret)
	{
		writelog(LOG_ERR,"ret[%d]",ret);
		if(DB_REPEAT==ret)
			ret = E_DB_TRADESERIAL_E;
		else
			ret = E_DB_TRADESERIAL_I;
		return ret;
	}

	out_pack->damt2=tPacketSerial.out_balance;
	out_pack->lvol1= D2I(dUniqno);			//流水号

	return 0;
	

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

示例4: F846336


//.........这里部分代码省略.........
		if(tEAcc.stoppayflag[0] == '1')
			return E_EACC_STOPPAY;
		if(amtcmp(tEAcc.cur_freebala , rPack->damt0) <0)   //金额不足
			return E_EACC_BALANCE_SHORTAGE;
		ret=GetParameter(GLOBE_MAXCARDBALANCE,sMaxBalance);
		if(ret)
			return ret;
		dMaxCardBalance=atof(sMaxBalance);
		if(amtcmp(tCardAccount.cur_bala+tradeserial.trade_fee,dMaxCardBalance)>0)
			return E_AMT_EXCEED_MAX;

//		tradeserial.in_balance=rPack->damt1;			//卡上余额
//		tradeserial.trade_count=rPack->lvol6+1;		//交易次数
		
	}
	else
	{
		tradeserial.serial_type = TXCODE_CARD2EACC;

		strcpy(seedkey,STATIC_SEED_KEY);
		des2src(inpwd_plain,rPack->scust_limit2);
		EncodePwd(seedkey,inpwd_plain,inpwd_crypt,0);
		if(strcmp(tCardAccount.password,inpwd_crypt)!=0)
			return E_CARD_PWD_DIFFER;
		if(amtcmp(tCardAccount.cur_freebala , rPack->damt0) <0)   //金额不足
			return E_EACC_BALANCE_SHORTAGE;
			
		ret=GetParameter(GLOBE_MAXEACCBALANCE,sMaxBalance);
		if(ret)
			return ret;
		dMaxEACCBalance=atof(sMaxBalance);
		if(amtcmp(tEAcc.cur_bala+tradeserial.trade_fee,dMaxEACCBalance)>0)
			return E_AMT_EXCEED_MAX;
		
//		tradeserial.in_balance=tEAcc.cur_freebala;
//		tradeserial.trade_count=tEAcc.consume_count+1;		//交易次数

	}

	ret=GetLogicDate(logicdate);							//业务日期
	if(ret)
		return ret;
	
	double dSerialNo = 0;
	ret = getNewUniqNo(KEYTYPE_TRADESERIAL,&dSerialNo);  					//获得最大流水号
	if(ret)
	{
		writelog(LOG_ERR," getNewUniqNo ERRCODE = [%d]",ret);
		return ret;
	}
	tradeserial.serial_no = D2I(dSerialNo);											//流水号
	tradeserial.other_seri_no = 0;															//上传端流水号
	tradeserial.serial_state = SERISTAT_DEBT;												//流水状态
	des2src(tradeserial.operate_date,sysdate);											//发生日期
	des2src(tradeserial.operate_time,systime);											//发生时间
	des2src(tradeserial.collect_date,sysdate);												//采集日期
	des2src(tradeserial.collect_time,systime);												//采集时间
	des2src(tradeserial.enteract_date,logicdate);											//处理日期
	des2src(tradeserial.enteract_time,systime);											//处理时间
	des2src(tradeserial.oper_code, rPack->sname);
	tradeserial.customer_id = tCustomer.cut_id;
	tradeserial.sys_id = 0;																//外部系统标识
	tradeserial.in_balance=rPack->lvol7/100.0;
	tradeserial.trade_count=rPack->lvol6+1;		//交易次数
	des2src(IA.sArrInActno[0],tCardAccount.account_id);						//卡帐户
	des2src(IA.sArrInActno[5],tEAcc.account_id);						//电子钱包帐户
	IA.iCardNo=tEAcc.card_id;

	IA.dArrInAmt[0]=tradeserial.trade_fee;

	ret=process(&IA,&tradeserial);
	if(ret)
	{
		writelog(LOG_ERR,"process ret[%d]",ret);
		return ret;
	}	
	if(TXCODE_CARD2EACC==tradeserial.serial_type)
		sprintf(outPack->vsmess,"卡转电子钱包:转帐前卡余额%.2lf元,转账金额%.2lf,当前卡余额%.2lf元",tradeserial.in_balance,tradeserial.trade_fee,tradeserial.out_balance);
	else
		sprintf(outPack->vsmess,"电子钱包转卡:转帐前卡余额%.2lf元,转账金额%.2lf,当前卡余额%.2lf元",tradeserial.in_balance,tradeserial.trade_fee,tradeserial.out_balance);
	writelog(LOG_DEBUG,outPack->vsmess);
	ret = DB_t_tif_tradeserial_add(&tradeserial);
	if (ret)
	{
		writelog(LOG_ERR,"ret[%d]",ret);
		if(DB_REPEAT==ret)
			return E_DB_TRADESERIAL_E;
		else
			return E_DB_TRADESERIAL_I;
	}
	if(amtcmp(tradeserial.out_balance,0)<0)
		return E_ENTER_ACCOUNT;

	SetCol(handle,F_DAMT2,F_LSERIAL1,F_VSMESS,0);		

	outPack->damt2=tradeserial.out_balance;		//出卡值
	outPack->lserial1=tradeserial.serial_no;			//流水号
	PutRow(handle,outPack,pRetCode,szMsg);
	return 0;
}
开发者ID:nykma,项目名称:ykt4sungard,代码行数:101,代码来源:F846336.cpp

示例5: F847301


//.........这里部分代码省略.........
			case TXTYPE_TOLL_DEPOSIT:
			case TXTYPE_TOLL_DEPOSIT_BILL:
			case TXTYPE_TOLL_DEPOSIT_FUNDBOOK:
			case TXTYPE_DEDUCT_DEPOSIT:
			case TXTYPE_RETURN_DEPOSIT:
				tSerial.depositfee = IA.dArrOutAmt[TxTypeCount];
				break;
			case TXTYPE_PRE_TOLL_BOARD:
			case TXTYPE_PRE_TOLL_BOARD_BILL:
			case TXTYPE_PRE_TOLL_BOARD_FUNDBOOK:
			case TXTYPE_TOLL_BOARD:
			case TXTYPE_DEDUCT_BOARD:
			case TXTYPE_RETURN_BOARD:
			case TXTYPE_RETURN_BOARD_BILL:
			case TXTYPE_RETURN_BOARD_FUNDBOOK:
				tSerial.managefee = IA.dArrOutAmt[TxTypeCount];
				break;
			case TXTYPE_TOLL_CHARGE:
			case TXTYPE_TOLL_CHARGE_BILL:
			case TXTYPE_TOLL_CHARGE_FUNDBOOK:
				tSerial.in_fee = IA.dArrOutAmt[TxTypeCount];
				break;
			case TXTYPE_TOLL_CARDCOST:
			case TXTYPE_TOLL_CARDCOST_BILL:
			case TXTYPE_TOLL_CARDCOST_FUNDBOOK:
				tSerial.cost_fee = IA.dArrOutAmt[TxTypeCount];
				break;
			default:
				break;
		}
		if (amtcmp(IA.dArrOutAmt[TxTypeCount], 0) != 0)
		{
		    sprintf(sMsg,"%s:%.2lf元 ", IA.sArrOutTxName[TxTypeCount], IA.dArrOutAmt[TxTypeCount]);
			strcat(out_pack->vsmess, sMsg);
		}
	}
	sprintf(sMsg, "卡当前余额:%.2lf元", tSerial.cardaftbal);
	strcat(out_pack->vsmess, sMsg);
	writelog(LOG_DEBUG,out_pack->vsmess);

	//插入交易流水表
	ret = DB_t_tif_tradeserial_add(&tSerial);
	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;
	}
	//保存充值流水
	memcpy(&tPacketSerial, &tSerial, sizeof tPacketSerial);
	ret = getNewUniqNo(KEYTYPE_TRADESERIAL,&dUniqNo);  						//获得最大流水号
	if(ret)
	{
		writelog(LOG_ERR,"ret [%d]",ret);
		*pRetCode = ret;
		goto L_RETU;
	}
	tPacketSerial.serial_no = D2I(dUniqNo);
	tPacketSerial.serial_state = SERISTAT_NONEEDDEBT;
	tPacketSerial.serial_type = TXCODE_SAVING_SMALL_PACKET;
	tPacketSerial.purseno = PURSE_NO_TWO;
	tPacketSerial.trade_count = rPack->lvol5 + 1;
    des2src(tPacketSerial.opercode, rPack->scust_no);
	tPacketSerial.cardbefbal = small_packet_balance;
	tPacketSerial.trade_fee = transfer_price;
	tPacketSerial.cardaftbal = small_packet_balance + tPacketSerial.trade_fee;
	
	ret = DB_t_tif_tradeserial_add(&tPacketSerial);
	if(ret)
	{
		if(DB_REPEAT == ret)
		{
	        *pRetCode = E_DB_TRADESERIAL_E;	
		}
		else
		{
		    *pRetCode = E_DB_TRADESERIAL_I;
		}
		goto L_RETU;
	}
	out_pack->lvol0 = tSerial.serial_no;
	out_pack->lvol1 = tPacketSerial.serial_no;
	out_pack->damt2 = tPacketSerial.cardaftbal;
	out_pack->damt0 = tSerial.cardaftbal;
	out_pack->lvol9 = tSerial.trade_count;
	out_pack->lvol5 = tPacketSerial.trade_count;
	writelog(LOG_DEBUG,"水控钱包金额[%.2lf], 出卡值[%.2lf]",out_pack->damt2,out_pack->damt0);
	
	PutRow(handle,out_pack,pRetCode,szMsg);
    return 0;
L_RETU:
	return -1;	
}
开发者ID:Codiscope-Research,项目名称:ykt4sungard,代码行数:101,代码来源:F847301.cpp

示例6: 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

示例7: F847230


//.........这里部分代码省略.........
	if(ret)
	{
		if(DB_NOTFOUND == ret)
		{
			writelog(LOG_ERR,"operator does not exists, oper [%s]",tAuthCard.oper_code);
			*pRetCode = E_DB_OPERATOR_N;
		}
		else
			*pRetCode = E_DB_OPERATOR_R;
		goto L_RETU;
	}
	if(strcmp(tOper.status,OPERATOR_LOGOUT) == 0)
	{
		writelog(LOG_ERR,"operator [%s] has been logout ",tAuthCard.oper_code);
		*pRetCode = E_OPERLOGON_UNREG;
		goto L_RETU;
	}

	ret=chk_oper_pwd(tAuthCard.oper_code,rPack->semp_pwd);
	if(ret)
	{
		writelog(LOG_ERR,"operator password error, operator [%s]",tAuthCard.oper_code);
		if(E_OPER_NOT_EXIST==ret)
			*pRetCode=E_AUTH_OPER_NOT_EXIST;
		else if(E_PASSWORD_WRONG==ret)
			*pRetCode=E_AUTH_OPER_PWD;
		else
			*pRetCode=ret;
		goto L_RETU;
	}
	

	tAuthCard.status = AUTHCARD_STATUS_NORMAL;

	ret = DB_t_pif_oper_authcard_update_by_card_id(tAuthCard.card_id,&tAuthCard);
	if(ret)
	{
		writelog(LOG_ERR,"update operator auth card information error, card id[%d]",tAuthCard.card_id);
		*pRetCode = E_DB_OPER_AUTHCARD_U;
		goto L_RETU;
	}
	// 插入黑名单表
	ret = InsertToBlkList(auth_card_id,DELETE_BLACKLIST);
	if(ret)
	{
		writelog(LOG_ERR,"insert into black list error, card id[%d]",auth_card_id);
		*pRetCode = ret;
		goto L_RETU;
	}
	
	// 生成流水
	ret = getNewUniqNo(KEYTYPE_TRADESERIAL,&uni_no);
	if(ret)
	{
		*pRetCode = ret;
		goto L_RETU;
	}
	tSerial.serial_no = D2I(uni_no);

	getsysdate(sysdate);
	getsystime(systime);

	tSerial.card_id = tAuthCard.card_id;
	tSerial.serial_state = SERISTAT_NONEEDDEBT;
	tSerial.serial_type = TXCODE_UNLOSS_AUTHCARD;
	des2src(tSerial.operate_date,sysdate);
	des2src(tSerial.operate_time,systime);
	des2src(tSerial.enteract_date,sysdate);
	des2src(tSerial.enteract_time,systime);
	des2src(tSerial.collect_date,sysdate);
	des2src(tSerial.collect_time,systime);
	des2src(tSerial.oper_code,rPack->scust_limit);
	
	ret = DB_t_tif_tradeserial_add(&tSerial);
	if(ret)
	{
		if(DB_REPEAT == ret)
		{
			writelog(LOG_ERR,"记录流水表失败!");
			*pRetCode = E_DB_TRADESERIAL_E;
		}
		else
			*pRetCode = E_DB_TRADESERIAL_I;
		goto L_RETU;
	}
	writelog(LOG_DEBUG,"解挂授权卡成功,操作员[%s]交易卡号[%d]流水号[%d]"
		,tAuthCard.oper_code,tAuthCard.card_id,tSerial.serial_no);

	SetCol(handle,0);
	SetCol(handle,F_LVOL0,F_SSERIAL0,0);
	get_datetime_from_db(db_date,db_time);
	out_pack->lvol0 = auth_card_id;
	memcpy(volume,db_date+2,6);
	memcpy(volume+6,db_time,6);
	des2src(out_pack->sserial0,volume);
	PutRow(handle,out_pack,pRetCode,szMsg);
	return 0;
L_RETU:
	return -1;		
}
开发者ID:nykma,项目名称:ykt4sungard,代码行数:101,代码来源:F847230.cpp

示例8: F240002


//.........这里部分代码省略.........
			goto L_RETU;
		}
		else
		{
			*pRetCode=E_TRANS_UNKNOW_ERROR;
			goto L_RETU;
		}
	}

	if(0==tCustomer.fee_type)
	{
		ret=DB_t_pif_spefee_read_by_dept_code_and_cut_type(tCustomer.classdept_no, tCustomer.cut_type,&tSpeFee);
		if(ret)
		{
			if(DB_NOTFOUND==ret)
			{
				tCustomer.fee_type=tCustomer.cut_type;
			}
			else
			{
				DB_t_cif_customer_free_lock_cur();
				writelog(LOG_ERR,"DB_t_pif_spefee_read_by_dept_code_and_cut_type error,errcode=[%d]",ret);
				*pRetCode=E_TRANS_UNKNOW_ERROR;
				goto L_RETU;
			}
		}
		else
		{
			tCustomer.fee_type=tSpeFee.fee_type;
		}
	}
	DB_t_cif_customer_free_lock_cur();
	//记录流水数据,用于提供正确的流水号,以及银行业务不成功供查询
	ret=DB_t_tif_tradeserial_add(&tradeserial);
	if(ret)
	{
		*pRetCode=E_TRANS_UNKNOW_ERROR;
		writelog(LOG_ERR,"Insert t_tif_tradeserial table error,error code=[%d]",ret);
		goto L_RETU;
	}

	ret=db_commit();
	if(ret)
	{
		*pRetCode=E_DB_COMMIT;
		writelog(LOG_ERR,"db_commit error,error code=[%d]",ret);
		goto L_RETU;

	}
	//填写入账结构,问问闻剑
	memset(&IA,0,sizeof(IA));
	des2src(IA.sArrInActno[0],tAccount.account_id);			//贷方帐户,持卡人账户
	des2src(IA.sArrInActno[2],rPack->sstation0);				//借方帐号,由前置机上传

	switch (rPack->lvol3)
	{
		case 4:
			IA.iArrInFeeSwitch[1] = 1;
			break;
		case 5:
			IA.iArrInFeeSwitch[1] = 0;
			break;
		default:
			break;
	}
	
开发者ID:nykma,项目名称:ykt4sungard,代码行数:66,代码来源:F240002.cpp

示例9: F847127


//.........这里部分代码省略.........
        goto L_RETU;
    }
    if(strcmp(rPack->scust_limit,rPack->scust_limit2)==0)
    {
        writelog(LOG_ERR,"oper1[%s]oper2[%s]",rPack->scust_limit,rPack->scust_limit2);
        *pRetCode=E_INPUT_2OPER_EQ;
        goto L_RETU;
    }
    ret=chk_oper_pwd(rPack->scust_limit2,rPack->semp_pwd);
    if(ret)
    {
        if(E_OPER_NOT_EXIST==ret)
            *pRetCode=E_INPUT_OPER_EXIST;
        else if(E_PASSWORD_WRONG==ret)
            *pRetCode=E_INPUT_OPER_PWD;
        else
            *pRetCode=ret;
        goto L_RETU;
    }
    getsysdate(sysdate);
    getsystime(systime);
    ret=GetLogicDate(logicdate);							//业务日期
    if(ret)
    {
        *pRetCode=ret;
        goto L_RETU;
    }
    tradeserial.trade_fee = rPack->damt0;						//发生金额
    ret = getNewUniqNo(KEYTYPE_TRADESERIAL,&dUniqno);  		//获得最大流水号
    if(ret)
    {
        *pRetCode = ret;
        writelog(LOG_ERR," ERRCODE = [%d]",ret);
        goto L_RETU;
    }

    tradeserial.serial_no = D2I(dUniqno);							//流水号
    tradeserial.other_seri_no = 0;								//上传端流水号
    tradeserial.serial_type  = TXCODE_CARD_DBCR;				//交易码
    tradeserial.serial_state = SERISTAT_DEBT;						//流水状态
    des2src(tradeserial.operate_date,sysdate);					//发生日期
    des2src(tradeserial.operate_time,systime);					//发生时间
    des2src(tradeserial.collect_date,sysdate);						//采集日期
    des2src(tradeserial.collect_time,systime);						//采集时间
    des2src(tradeserial.enteract_date,logicdate);					//处理日期
    des2src(tradeserial.enteract_time,systime);					//处理时间
    tradeserial.maindevice_id = rPack->lvol6;						//上传工作站标识
    tradeserial.in_balance=rPack->damt0;						//入卡值
    tradeserial.trade_count=0;									//交易次数
    des2src(tradeserial.oper_code,rPack->scust_limit);			//操作员代码
    des2src(tradeserial.reserve_1,rPack->scust_limit2);			//错帐操作员代码
    tradeserial.sys_id = 0;										//外部系统标识

    IA.iCardNo=0;
    IA.iFeeType=1;
    IA.dArrInAmt[0]=tradeserial.trade_fee;
    des2src(IA.sArrInActno[0],rPack->sbank_acc);				//借方帐号
    des2src(IA.sArrInActno[1],rPack->sbank_acc2);				//贷方帐号
    IA.iArrInFeeSwitch[0]=rPack->lvol0;
    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;
    ret=process(&IA,&tradeserial);
    if(ret)
    {
        writelog(LOG_ERR,"process ret[%d]",ret);
        *pRetCode=ret;
        goto L_RETU;
    }
    sprintf(out_pack->vsmess,"流水号:%d ",IA.iSerialNo);
    for(i=1; i<=IA.iOutTxTypeCnt; i++)
    {
        if(amtcmp(IA.dArrOutAmt[i],0)!=0)
        {
            sprintf(sMsg,"%s:%.2lf元 ",IA.sArrOutTxName[i],IA.dArrOutAmt[i]);
            strcat(out_pack->vsmess,sMsg);
        }
    }
    strcat(out_pack->vsmess,(char*)IA.pVoidPointer);
    writelog(LOG_DEBUG,out_pack->vsmess);
    SetCol(handle,0);
    SetCol(handle,F_LSERIAL1,F_DAMT2,F_DAMT3,F_DAMT4,F_VSMESS,0);
    out_pack->lserial1=tradeserial.serial_no;			//流水号
    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;
    }
    PutRow(handle,out_pack,pRetCode,szMsg);
    return 0;
L_RETU:
    return -1;
}
开发者ID:nykma,项目名称:ykt4sungard,代码行数:101,代码来源:F847127.cpp

示例10: F847102


//.........这里部分代码省略.........
		goto L_RETU;
	}
	DB_t_pif_card_free_lock_by_cur();

	//	插入卡挂失有效期限表
/*
	ret=GetLostCardValiddate(sysdate,enddate);											//获得挂失有效期限
	if (ret)
	{
		*pRetCode = ret;
		goto L_RETU;
	}
	cardlossinfo.card_id = card_id;													//卡号
	des2src(cardlossinfo.begin_date,sysdate);											//起始日期
	des2src(cardlossinfo.end_date,enddate);											//截至日期
	des2src(cardlossinfo.operate_date,sysdate);										//操作日期
	des2src(cardlossinfo.operate_time,systime);										//操作时间
	cardlossinfo.state_id=STATE_VALID;												//有效
	ret = DB_t_pif_cardlossinfo_add(&cardlossinfo);
	if (ret)
	{
		*pRetCode = E_DB_CARDLOSSINFO_I;
		writelog(LOG_ERR,"errcode[%d] ",ret);
		goto L_RETU;
	}
*/
	//如果该卡号被冻结,则挂失时对黑名单不处理
	if(STATE_FALSE==tCard.state_id[CARDSTAT_TYPE_FREEZE])
	{
		//	插入黑名单表
		ret=DB_t_tif_black_sheet_del_by_card_id_and_is_ad(tCard.card_id,DELETE_BLACKLIST);
		if(ret)
		{
			if(ret!=DB_NOTFOUND)
			{
				*pRetCode=ret;
				goto L_RETU;
			}
		}
		ret=InsertToBlkList(tCard.card_id,ADD_BLACKLIST);
		if(ret)
		{
			*pRetCode=ret;
			writelog(LOG_ERR,"InsertToBlkList err[%d]",ret);
			goto L_RETU;
		}
		//广播黑名单
		AddXmlItemInt(tMesList.incontent, XML_KEY_CARDID,card_id);
		AddXmlItemInt(tMesList.incontent, XML_KEY_ADDDELSIGN,ADD_BLACKLIST);	//增删标志

		tMesList.funid = 930005;
		tMesList.pfunid = 930003;
		tMesList.max_send_cnt = 10;
		tMesList.level = MESLIST_PRIORITY_REALTIME;
		tMesList.msgtype = MESLIST_TYPE_ORDER;
		ret=AddMsgLst(&tMesList);
		if(ret)
		{
			*pRetCode=ret;
			writelog(LOG_ERR,"AddMsgLst err[%d]",ret);
			goto L_RETU;
		}
	}
	//	准备数据插入交易流水表
	ret = getNewUniqNo(KEYTYPE_TRADESERIAL,&dUniqno);  					//获得最大流水号
	if(ret)
	{
		*pRetCode = ret;
		writelog(LOG_ERR,"ERRCODE = [%d]",ret);
		goto L_RETU;
	}
	des2src(tradeserial.operate_date,sysdate);											//发生日期
	des2src(tradeserial.operate_time,systime);											//发生时间
	des2src(tradeserial.collect_date,sysdate);												//采集日期
	des2src(tradeserial.collect_time,systime);												//采集时间
	des2src(tradeserial.enteract_date,logicdate);											//处理日期
	des2src(tradeserial.enteract_time,systime);											//处理时间
	tradeserial.serial_no = D2I(dUniqno);										//流水号
	tradeserial.serial_type = TXCODE_CARD_LOSS;								//挂失
	tradeserial.serial_state = SERISTAT_NONEEDDEBT;							//流水状态
	tradeserial.maindevice_id = maindevice_id;									//上传工作站标识
	tradeserial.device_id = device_id;											//采集设备标识
	tradeserial.card_id = card_id;											//交易卡号
	tradeserial.customer_id=tCard.cosumer_id;									//客户号
	des2src(tradeserial.oper_code,Operator);

	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;
	}
	return 0;
L_RETU:
	return -1;
}
开发者ID:nykma,项目名称:ykt4sungard,代码行数:101,代码来源:F847102.c

示例11: F847183


//.........这里部分代码省略.........
	// 上传的操作员号
	des2src(tTradeserial.opercode, rPack->scust_limit);
	tTradeserial.reviseserial_no = tTradeserial.other_seri_no;

	//取流水号,从帐处理
	ret = getNewUniqNo(KEYTYPE_TRADESERIAL, &iSeqNo);
	if (ret)
	{
		*pRetCode = ret;
		writelog(LOG_ERR, "getNewUniqNo err[%d]", ret);
		goto L_RETU;
	}
	tTradeserial.serial_no = iSeqNo;
	//######################################################
	//入账处理
	switch (tTradeserial.serial_type)
	{
	case 930031:
		// 交易冲正
		if (amtcmp(tTradeserial.trade_fee, 0) == 0)
			break;
		tTradeserial.serial_type = TXCODE_TX_REVEAL;
		ret = process930031(&tTradeserial);
		if (ret)
		{
			//业务处理失败处理
			*pRetCode = ret;
			goto L_RETU;
		}
		break;
	case 930034:
		// 充值冲正
		if (amtcmp(tTradeserial.trade_fee, 0) == 0)
			break;
		tTradeserial.serial_type = TXCODE_TX_REVEAL;
		ret = process930034(&tTradeserial);
		if (ret)
		{
			//业务处理失败处理
			*pRetCode = ret;
			goto L_RETU;
		}
		break;
	case 930036:
		// 搭伙费冲正
		if (amtcmp(tTradeserial.trade_fee, 0) == 0)
			break;
		tTradeserial.serial_type = TXCODE_TX_REVEAL;
		ret = process930036(&tTradeserial);
		if (ret)
		{
			//业务处理失败处理
			*pRetCode = ret;
			goto L_RETU;
		}
		break;
	case 847106: // 现金充值冲正
		memset(&next_pack,0,sizeof next_pack);
		tTradeserial.serial_type = TXCODE_SAVING_CASH;
		ret = do_flush_847106(&tTradeserial,&tCard);
		if(ret)
		{
			*pRetCode = ret;
			goto L_RETU;
		}
		break;
	default:
		*pRetCode = E_TXCODE_NOT_EXIST;	//交易码错误
		goto L_RETU;
	}
	//######################################################
	//添加交易流水
	tTradeserial.serial_state = SERISTAT_DEBT;
	ret = DB_t_tif_tradeserial_add(&tTradeserial);
	if (ret)
	{
		writelog(LOG_ERR, "DB_t_tif_tradeserial_add ret[%d]", ret);
		if (DB_REPEAT == ret)
			*pRetCode = E_DB_TRADESERIAL_E;
		else
			*pRetCode = E_DB_TRADESERIAL_I;
		goto L_RETU;
	}
	if (amtcmp(tTradeserial.out_balance, 0) < 0)
	{
		*pRetCode = E_ENTER_ACCOUNT;
		goto L_RETU;
	}
	SetCol(handle, 0);
	SetCol(handle, F_LSERIAL1, F_DAMT2, F_DAMT3, F_VSMESS, 0);
	out_pack->lserial1 = tTradeserial.serial_no;
	out_pack->damt2 = tTradeserial.out_balance;
	out_pack->damt3 = -tTradeserial.trade_fee;
	sprintf(out_pack->vsmess, "流水号:%d 冲正金额:%.2lf元 冲正前卡余额:%.2lf元 卡当前余额:%.2lf元", tTradeserial.serial_no, -tTradeserial.trade_fee, tTradeserial.in_balance, tTradeserial.out_balance);
	writelog(LOG_DEBUG, out_pack->vsmess);
	PutRow(handle, out_pack, pRetCode, szMsg);
	return 0;
L_RETU:
	return -1;
}
开发者ID:Codiscope-Research,项目名称:ykt4sungard,代码行数:101,代码来源:F847183.cpp

示例12: F847123


//.........这里部分代码省略.........
	if(tCustomer.fee_type<1)
	{
		ret=DB_t_pif_spefee_read_by_dept_code_and_cut_type(tCustomer.classdept_no, tCustomer.cut_type,&tSpeFee);
		if(ret)
		{
			if(DB_NOTFOUND==ret)
			{
				tCustomer.fee_type=tCustomer.cut_type;
			}
			else
			{
				DB_t_cif_customer_free_lock_cur();
				*pRetCode=E_DB_SPEFEE_R;
				goto L_RETU;
			}
		}
		else
		{
			tCustomer.fee_type=tSpeFee.fee_type;
		}
		//更新客户表的收费类别字段
		ret=DB_t_cif_customer_update_lock_by_cur(&tCustomer);
		if(ret)
		{
			if(DB_NOTFOUND==ret)
				*pRetCode= E_CUSTOMER_NOT_EXIST;
			else
				*pRetCode= E_DB_CUSTOMER_U;
			goto L_RETU;
		}
	}
	DB_t_cif_customer_free_lock_cur();
	ret = getNewUniqNo(KEYTYPE_TRADESERIAL,&dSerialno);  				//获得流水号
	if(ret)
	{
		*pRetCode = ret;
		writelog(LOG_ERR,"ret [%d]",ret);
		goto L_RETU;
	}
	tTradeserial.serial_no = (int)dSerialno;					//流水号
	tTradeserial.other_seri_no = 0;							//上传端流水号
	tTradeserial.serial_type = 847123;						//交易代码;备注:发卡+充值 用一个交易码,即847101; 发卡(不充值)另用一个交易码,即新的发卡程序文件名,从而区分发卡充值与发卡不充值的卡操作信息。
	tTradeserial.serial_state = SERISTAT_DEBT;				//流水状态
	des2src(tTradeserial.operate_date,sysdate);				//发生日期
	des2src(tTradeserial.operate_time,systime);				//发生时间
	des2src(tTradeserial.collect_date,sysdate);				//采集日期
	des2src(tTradeserial.collect_time,systime);				//采集时间
	des2src(tTradeserial.enteract_date,logicdate);				//处理日期
	des2src(tTradeserial.enteract_time,systime);				//处理时间
	des2src(tTradeserial.oper_code , rPack->scust_limit);
	tTradeserial.maindevice_id = rPack->lvol6;				//上传工作站标识
	tTradeserial.device_id = rPack->lvol7;					//采集设备标识
	tTradeserial.card_id = tCard.card_id;						//卡号
	des2src(tTradeserial.showid,tCard.showid);				//显示卡号
	tTradeserial.purse_id = PURSE_NO_ONE;					//钱包号
	tTradeserial.customer_id = tCard.cosumer_id;				//客户标识

	//插入交易流水表
	ret = DB_t_tif_tradeserial_add(&tTradeserial);
	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;
	}
	out_pack->lvol0 = card_id;									//交易卡号
	out_pack->lvol1 = tCustomer.cut_type;						//客户类别
	out_pack->lvol5 = tCustomer.fee_type;						//收费类别
	des2src(out_pack->scust_no,tCard.showid);					//显示卡号
	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,sPwd);						//卡密码
	des2src(out_pack->sdate0,tCard.end_time);					//有效截至日期

	out_pack->damt2=D4U5(tAccount.card_balance,2);			//卡余额
	out_pack->lvol10=tAccount.consume_count;					//消费次数
	out_pack->lserial1=tTradeserial.serial_no;						//流水号

	sprintf(out_pack->vsmess,"流水号:%d 卡号:%d 学工号:%s 姓名:%s 卡余额:%.2lf元",tTradeserial.serial_no,card_id,tCustomer.stuemp_no,tCustomer.cut_name,tAccount.card_balance);
	writelog(LOG_DEBUG,out_pack->vsmess);
	// add by 汤成 2005-8-8
	// 增加向名单表写入记录
	ret = InsertToBlkList(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,代码来源:F847123.c

示例13: F930032

int F930032(TRUSERID *handle,int iRequest,ST_PACK *in_pack,int *pRetCode,char *szMsg) {
    int ret = 0;						//返回码
    int hi_sign = 0;					//挂失解挂标志
    double h_temp_Serial_no = 0;		//本地流水号
    char logicdate[11]="";
    char sysdate[11]="";
    char systime[9]="";
    int dev_id=0;
    T_t_tif_tradeserial  tradeserial;

    memset(&tradeserial,0,sizeof(tradeserial));
    hi_sign = in_pack->lvol6;												//挂失解挂标志

    ret=chk_dyn_key(in_pack->lcert_code,in_pack->scust_limit2);
    if(ret) {
        *pRetCode = ret;
        goto L_RETU;
    }
    getsysdate(sysdate);
    getsystime(systime);
    ret=GetLogicDate(logicdate);												//业务日期
    if(ret) {
        *pRetCode = ret;
        goto L_RETU;
    }
    switch (hi_sign) {
    case 0:
        tradeserial.serial_type = TXCODE_CARD_LOSS;					//挂失
        break;
    case 1:
        tradeserial.serial_type = TXCODE_CARD_COMEBACK_LOSS;			//解挂
        break;
    case 2:
        tradeserial.serial_type = TXCODE_MODIFICATIONPW;				//修改密码
        break;
    default:
        *pRetCode = -1;
        writelog(LOG_ERR,"挂失解挂修改密码标志出错。ERRCODE[%d] ",*pRetCode);
        goto L_RETU;
        break;
    }
    /*	读取设备ID	*/
    ret = GetDevIdByDevPhyId(&dev_id,in_pack->sdate1);
    if (ret) {
        *pRetCode = ret;
        writelog(LOG_ERR,"GetDevIdByDevPhyId err[%d] ",ret);
        goto L_RETU;
    }

    tradeserial.serial_state = SERISTAT_NODEBT;								//流水状态

    ret = getNewUniqNo(KEYTYPE_TRADESERIAL,&h_temp_Serial_no);
    if(ret) {
        *pRetCode = ret;
        writelog(LOG_ERR,"获取最大流水号错误: ERRCODE = [%d]",ret);
        goto L_RETU;
    }
    tradeserial.serial_no = D2I(h_temp_Serial_no);													//流水号

    snprintf(tradeserial.operate_date,9,"20%s",in_pack->spost_code);		//发生日期(格式化输入的日期)
    des2src(tradeserial.operate_time,in_pack->spost_code2);			//发生时间(格式化输入的时间)
    des2src(tradeserial.collect_date,sysdate);												//采集日期
    des2src(tradeserial.collect_time,systime);												//采集时间
    des2src(tradeserial.enteract_date,logicdate);											//处理日期
    des2src(tradeserial.enteract_time,systime);											//处理时间
    tradeserial.other_seri_no = in_pack->lvol4;													//上传端流水号
    tradeserial.serial_state = SERISTAT_DEBT;													//流水状态
    tradeserial.maindeviceid = in_pack->lcert_code;												//上传工作站标识
    tradeserial.deviceid = dev_id;														//采集设备标识
    tradeserial.cardno = in_pack->lvol5;														//卡号
    Strncpy_t(tradeserial.showid,in_pack->sstation0,sizeof(tradeserial.showid));						//显示卡号
    Strncpy_t(tradeserial.oldpwd,in_pack->sstock_code,sizeof(tradeserial.oldpwd));					//原始密码
    Strncpy_t(tradeserial.newpwd,in_pack->sstock_code2,sizeof(tradeserial.newpwd));				//更新密码
    des2src(tradeserial.opercode,"system");

    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;
    }
    return 0;
L_RETU:
    return -1;
}
开发者ID:Codiscope-Research,项目名称:ykt4sungard,代码行数:88,代码来源:F930032.cpp

示例14: F847221


//.........这里部分代码省略.........
	{
		*pRetCode = E_FAN_ACC_INSUFFICIENT;
		DB_t_group_cash_report_free_lock_by_c1();
		goto L_RETU;
	}
	*/

	// 生成流水
	memset(&serial,0,sizeof serial);
	serial.serial_no = (int)dUniNo;
	serial.serial_state = SERISTAT_DEBT;
	serial.serial_type = TXCODE_FAN_RUSH_PAY;
	getsysdate(serial.operate_date);
	getsystime(serial.operate_time);
	des2src(serial.collect_date,serial.operate_date);
	des2src(serial.collect_time,serial.operate_time);
	GetLogicDate(serial.enteract_date);
	des2src(serial.enteract_time,serial.operate_time);

	des2src(serial.opercode,rPack->scard0);
	des2src(serial.reserve_1,rPack->scert_addr);
	serial.cardbefbal = tx_money;
	serial.trade_fee = tx_money * -1;
	// 商户号
	des2src(serial.showid,old_serial.showid);

	// 入账
	memset(&IA,0,sizeof IA);
	IA.dArrInAmt[0] = serial.trade_fee;
	IA.iCardNo = 0;
	//收费类别为 1
	IA.iFeeType = 1;
	IA.iTxFlag = ACC_TYPE_RUSH;
	IA.pVoidPointer = ia_buf;
	ret = process(&IA,&serial);
	if(ret)
	{
		writelog(LOG_ERR,"account process error [%d]",ret);
		*pRetCode  = ret;
		DB_t_group_cash_report_free_lock_by_c1();
		goto L_RETU;
	}
	SetCol(handle,0);
	SetCol(handle,F_VSMESS,F_LVOL1,F_DAMT1,F_DAMT2,F_SBANK_ACC,0);
	
	sprintf(out_pack->vsmess,"流水号:%d ",IA.iSerialNo);
	for(i=1;i<=IA.iOutTxTypeCnt;i++)
	{
		if(amtcmp(IA.dArrOutAmt[i],0)!=0)
		{
			sprintf(sMsg,"%s:%.2lf元 ",IA.sArrOutTxName[i],IA.dArrOutAmt[i]);
			strcat(out_pack->vsmess,sMsg);
		}
	}
	
	strcat(out_pack->vsmess,(char*)IA.pVoidPointer);
	writelog(LOG_DEBUG,out_pack->vsmess);

	des2src(group_cash.last_check_date,serial.operate_date);
	des2src(group_cash.last_check_time,serial.operate_time);
	group_cash.cur_money = group_cash.cur_money + tx_money;
	out_pack->lvol1 = serial.serial_no;
	out_pack->damt1 = serial.trade_fee;
	out_pack->damt2 = group_cash.cur_money;

	//更新组未解款金额
	ret = DB_t_group_cash_report_update_lock_by_c1(&group_cash);
	if(ret)
	{
		*pRetCode = E_DB_GRP_CASH_RPT_U;
		goto L_RETU;
	}
	// add
	DB_t_group_cash_report_free_lock_by_c1();
	ret = DB_t_groups_read_by_groupid(group_cash.groupid,&groups);
	if(ret)
	{
		if(DB_NOTFOUND == ret)
			*pRetCode = E_DB_GROUP_N;
		else
			*pRetCode = E_DB_GROUP_R;
		goto L_RETU;
	}
	des2src(out_pack->sbank_acc,groups.group_acc);
	//保存流水
	ret = DB_t_tif_tradeserial_add(&serial);
	if(ret)
	{
		if(DB_REPEAT == ret)
			return E_DB_TRADESERIAL_E;
		else
			return E_DB_TRADESERIAL_I;
		goto L_RETU;
	}
	PutRow(handle,out_pack,pRetCode,szMsg);
	return 0;
	
L_RETU:
	return -1;
}
开发者ID:Codiscope-Research,项目名称:ykt4sungard,代码行数:101,代码来源:F847221.cpp

示例15: F847105


//.........这里部分代码省略.........
		goto L_RETU;
	}
	DB_t_pif_card_free_lock_by_cur();

	//是否退费,规定正式卡和临时卡退押金,非记名临时卡退押金
	if(IS_YES==rPack->lvol12)
	{
		IA.iUseCardFlag=USE_CARD_TYPE_ONLINE;		//联机交易
		IA.dInCardBala = rPack->damt2;				//入卡值
		IA.dOutCardBala=-1;							//-1 表示空值
		IA.iTxCnt = rPack->lvol10+1;					//当前卡交易次数
		tradeserial.in_balance = IA.dInCardBala;			//入卡值
		tradeserial.trade_count = IA.iTxCnt;
	}
	else
	{
		IA.iUseCardFlag=USE_CARD_TYPE_NULL;
		IA.dInCardBala = -1;				//-1 表示空值
		IA.dOutCardBala=-1;				//-1 表示空值
		IA.iTxCnt = -1;					//-1 表示空值
	}
	bill_type=TYPE_CASH;
//	IA.pVoidPointer=&tSavdtl.bill_type;
	IA.pVoidPointer=&bill_type;
	IA.iCardNo=tCard.card_id;

	ret=process(rPack,&IA,&tradeserial);
	if(ret)
	{
		*pRetCode=ret;
		goto L_RETU;
	}
	writelog(LOG_DEBUG,"input card_id[%d] card_id[%d]",origin_card_id,tCard.card_id);
	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;
	}

	ST_CPACK aPack;
	ST_PACK *out_pack = &(aPack.pack);
	ResetNormalCPack(&aPack,0,1);
	SetCol(handle,0);
	SetCol(handle,F_DAMT0,F_DAMT1,F_DAMT2,F_DAMT3,F_DAMT4,F_SDATE0,F_LVOL1,F_SPHONE,F_LSERIAL1,F_VSMESS,0);
	sprintf(out_pack->vsmess,"流水号:%d 卡号:%d ",IA.iSerialNo,IA.iCardNo);
	for(i=1;i<=IA.iOutTxTypeCnt;i++)
	{
		switch(IA.iArrOutTxType[i])
		{
			case TXTYPE_DEDUCT_DEPOSIT:
				tradeserial.deposit_fee=IA.dArrOutAmt[i];
				break;
			case TXTYPE_RETURN_DEPOSIT:
			case TXTYPE_RETURN_DEPOSIT_BILL:
			case TXTYPE_RETURN_DEPOSIT_FUNDBOOK:
				tradeserial.deposit_fee=IA.dArrOutAmt[i];
				out_pack->damt0+=IA.dArrOutAmt[i];
				break;
			case TXTYPE_DEDUCT_BOARD:
				tradeserial.boardfee=IA.dArrOutAmt[i];
				break;
开发者ID:nykma,项目名称:ykt4sungard,代码行数:67,代码来源:F847105.c


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