當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。