本文整理汇总了C++中GetLogicDate函数的典型用法代码示例。如果您正苦于以下问题:C++ GetLogicDate函数的具体用法?C++ GetLogicDate怎么用?C++ GetLogicDate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetLogicDate函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: F847105
int F847105(TRUSERID *handle,int iRequest,ST_PACK *rPack,int *pRetCode,char *szMsg)
{
int ret =0;
int i=0;
int origin_card_id = 0;
int bill_type=0;
char physical_no[40+1] = "";
char logicdate[11] = ""; //业务日期
char sysdate[11]="";
char lost_date[11]="";
char systime[9]="";
char sEndDate[9]="";
char sMsg[256]="";
T_t_pif_card tCard;
T_t_pif_cardlossinfo cardlossinfo;
T_t_tif_tradeserial tradeserial;
// T_t_tif_savdtl tSavdtl;
InAcc IA;
memset(&tCard,0,sizeof(tCard));
memset(&cardlossinfo,0,sizeof(cardlossinfo));
memset(&tradeserial,0,sizeof(tradeserial));
// memset(&tSavdtl,0,sizeof(tSavdtl));
memset(&IA,0,sizeof(IA));
getsysdate(sysdate);
getsystime(systime);
ret=GetLogicDate(logicdate); //业务日期
if(ret)
{
*pRetCode=ret;
goto L_RETU;
}
origin_card_id = rPack->lvol1; //原卡号
des2src(physical_no, rPack->sbank_acc); //物理卡号
if(rPack->lvol1<1)
{
*pRetCode=E_INPUT_CARDNO_CANNOT_NULL;
goto L_RETU;
}
//查询支票经费本有无充值记录
/*
ret=ChkSavdtl(origin_card_id,&tSavdtl);
if(ret)
{
writelog(LOG_ERR,"ChkSavdtl ret[%d]",ret);
*pRetCode=ret;
goto L_RETU;
}
//Added by hhd at 2006-06-29 begin
//增加判断:如果入卡值大于100,检查经费本知否充值过
//否则不加任何判断,退款到现金中
if(amtcmp(rPack->damt2,100.00)<0)
{
tSavdtl.bill_type=TYPE_CASH;
}
*/
//Added by hhd at 2006-06-29 end
tradeserial.other_seri_no = 0; //上传端流水号
tradeserial.serial_type=TXCODE_CALLBACK_CARD; //功能号
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.device_id = rPack->lvol7; //采集设备标识
tradeserial.purse_id = PURSE_NO_ONE; //钱包号
tradeserial.sys_id = 0; //外部系统标识
des2src(tradeserial.oper_code, rPack->scust_limit); //操作员号
tradeserial.card_id=origin_card_id;
ret=DB_t_pif_card_read_lock_by_cur_and_card_id(origin_card_id,&tCard);
if(ret)
{
if(DB_NOTFOUND==ret)
*pRetCode= E_CARDNO_NOT_EXIST;
else
*pRetCode= E_DB_CARD_R;
goto L_RETU;
}
// writelog(LOG_DEBUG,"input card_id[%d] card_id[%d]",origin_card_id,tCard.card_id);
tradeserial.customer_id = tCard.cosumer_id; //客户标识
if(strncmp(tCard.state_id,CARDSTAT_REG,4)==0)
{
//检查物理卡号是否一致
trim(physical_no);
trim(tCard.physical_no);
if(strcmp(tCard.physical_no,physical_no)!=0)
{
DB_t_pif_card_free_lock_by_cur();
writelog(LOG_ERR,"db physical_no[%s],input physical_no[%s]",tCard.physical_no,physical_no);
*pRetCode= E_CARD_PHYNO_DIFFER;
goto L_RETU;
}
}
else if('2'==tCard.state_id[CARDSTAT_TYPE_REG])
//.........这里部分代码省略.........
开发者ID:nykma,项目名称:ykt4sungard,代码行数:101,代码来源:F847105.c
示例2: Do_Compare_file_shoudong
int Do_Compare_file_shoudong()
{
///*
FILE *fp;
TIniFile tf;
char path_name[256]="";
char file_name[256]="";
int ret=0;
int cnt=0;
int i=0;
BANK_COMPARE_RECODE compare,compare1;
T_t_tif_bank_comp bank_comp;
T_t_tif_report_trans_comp trans_comp;
T_t_tif_tradeserial tradeserial;
T_t_tif_tradeserial_his his_tradeserial;
T_t_tif_diff_transfer diff_transfer;
char logicdate[10]="";
char tmp_date[10]="";
char forward_date[10]="";
double trans_count=0;
double bank_count=0;
double trans_amt=0;
double bank_amt=0;
double second=0;
double temp=0;
char *p=getenv("BIN_PATH");
ret=GetLogicDate(logicdate); //业务日期
if(ret)
{
writelog(LOG_ERR,"GetLogicDate error,errcode=[%d]",ret);
return ret;
}
ret=datetime2second(logicdate, "YYYYMMDD", &second);
if(ret)
{
writelog(LOG_ERR,"datetime2second error,errcode=[%d]",ret);
return ret;
}
//trans_count=0;
//bank_count=0;
//trans_amt=0;
// bank_amt=0;
second=second-24*60*60;
ret=second2datetime(second, forward_date, "YYYYMMDD");
if(ret)
{
writelog(LOG_ERR,"second2datetime error,errcode=[%d]",ret);
return ret;
}
memset(&bank_comp,0,sizeof(bank_comp));
memset(&compare,0,sizeof(compare));
memset(&trans_comp,0,sizeof(trans_comp));
memset(&tradeserial,0,sizeof(tradeserial));
memset(&his_tradeserial,0,sizeof(his_tradeserial));
memset(&compare1,0x30,sizeof(compare1));
ret=DB_t_tif_report_trans_comp_read_by_cmp_date(forward_date,&trans_comp);
if(ret!=100&&ret!=0)
{
writelog(LOG_ERR,"DB_t_tif_report_trans_comp_read_by_cmp_date error,errcode=[%d]",ret);
goto LRet;
}
if(1==trans_comp.cmp_flag)
{
writelog(LOG_ERR,"trans_comp.cmp_flag =1,already compare!");
goto LRet;
}
//配置环境变量
if(p==NULL)
{
writelog(LOG_ERR,"Cann't get env HOME PATH\n");
return -1;
}
//sprintf(path_name,"%s/ftp",p);
sprintf(path_name,"%s",p);
//strcpy(path_name,"/bank/ykt/src/bank/ftp");
sprintf(file_name,"%s/XYK00002.%8.8s",path_name,forward_date);
writelog(LOG_ERR,"Open indirect file=[%s]",file_name);
if((fp = fopen(file_name,"rb"))==NULL)
{
writelog(LOG_ERR,"Open indirect file error,file=[%s]",file_name);
return -1;
}
while(!feof(fp))
{
memset(&bank_comp,0,sizeof(bank_comp));
memset(&compare,0,sizeof(compare));
cnt++;
if(NULL==fgets((char *)(&compare),sizeof(compare),fp))
{
//.........这里部分代码省略.........
开发者ID:nykma,项目名称:ykt4sungard,代码行数:101,代码来源:transinfo.cpp
示例3: F847104
int F847104(TRUSERID *handle,int iRequest,ST_PACK *rPack,int *pRetCode,char *szMsg)
{
int ret =0;
int len = 0;
int i=0;
int hi_cutid=0;
char h_showcardid[11] = ""; //显示卡号
char h_password[7] = ""; //卡密码
double h_temp_Card_id = 0; //卡号
double dSerialNo=0;
char seed_key[17] = ""; //种子密钥
char card_endtime[8 + 1] = ""; //卡的有效截至日期
char logicdate[11]=""; //业务日期
char sysdate[11]="";
char systime[9]="";
char sEndDate[9]="";
char sMsg[256]="";
char sMaxCardBalance[20]="";
char lost_date[11]="";
char buf[64] = "";
int write_failed = 0;
double dMaxCardBalance=0;
int lost_card_id=0;
T_t_pif_card tCard;
T_t_pif_card tOldCard;
T_t_cif_customer tCustomer;
T_t_pif_spefee tSpeFee;
// T_t_pif_cardlossinfo tCardLossInfo;
T_t_tif_tradeserial tradeserial;
T_t_aif_account tAccount;
InAcc IA;
ST_CPACK aPack;
ST_PACK *out_pack = &(aPack.pack);
ResetNormalCPack(&aPack,0,1);
SetCol(handle,0);
SetCol(handle,F_LVOL0,F_LVOL1,F_LVOL5,
F_SCUST_NO, F_SCUST_NO2,F_SCUST_AUTH,F_SCUST_AUTH2,
F_SDATE0,F_SNAME,F_SNAME2,
F_SOPEN_EMP,F_SSTATUS0,
F_DAMT2,F_LSERIAL1,F_VSMESS,0);
memset(&tCard,0,sizeof(tCard));
memset(&tOldCard,0,sizeof(tOldCard));
memset(&tCustomer,0,sizeof(tCustomer));
memset(&tSpeFee,0,sizeof(tSpeFee));
// memset(&tCardLossInfo,0,sizeof(tCardLossInfo));
memset(&tAccount,0,sizeof(tAccount));
memset(&tradeserial,0,sizeof(tradeserial));
memset(&IA,0,sizeof(IA));
getsysdate(sysdate);
getsystime(systime);
ret=GetLogicDate(logicdate); //业务日期
if(ret)
{
*pRetCode=ret;
goto L_RETU;
}
//检查客户信息,判断是否可以发行卡
hi_cutid=rPack->lvol0; //客户号
des2src(tCard.physical_no, rPack->sbank_acc); //物理卡号
trim(h_showcardid);
ret=IsExistFreezeCardByCustomId(hi_cutid);
if(ret)
{
*pRetCode = ret;
goto L_RETU;
}
ret=IsExistNoLostCardByCustomId(hi_cutid);
if(ret)
{
*pRetCode = ret;
goto L_RETU;
}
if(strlen(h_showcardid))
{
ret=IsExistShowCardNo(h_showcardid);
if(ret)
{
*pRetCode = ret;
goto L_RETU;
}
}
ret=IsExistCardByPhyCardNo(tCard.physical_no);
if(ret)
{
*pRetCode = ret;
goto L_RETU;
}
ret=GetLostCardIdByCustomId_TypeId(hi_cutid,CT_NORMAL,&lost_card_id);
if(ret)
{
writelog(LOG_ERR,"customer[%d]tCard type_id[%d]",hi_cutid,CT_NORMAL);
*pRetCode = ret;
goto L_RETU;
}
/*
ret=DB_t_pif_cardlossinfo_read_by_card_id_and_state_id(lost_card_id, STATE_VALID, &tCardLossInfo);
//.........这里部分代码省略.........
开发者ID:nykma,项目名称:ykt4sungard,代码行数:101,代码来源:F847104.c
示例4: do_849009
/**
* \brief 处理网银转账入账业务
* \param in_pack 请求报文包
* \param out_pack 输出报文包
* \param online_tx 联机交易,当为1时,如果个人账户已注销,则不能交易,
* 当为0时,如果个人账户已注销,则借记 现金,贷记 营业成本
*/
int do_849009(ST_PACK *in_pack,char *szMsg,ST_PACK *out_pack,int online_tx)
{
int cust_id,card_id;
int subsidy_no;
int ret,count;
char temp[64];
double max_subsidy_money = 0.0;
double total_money,dSerial;
T_t_tif_subsidy subsidy;
T_t_tif_tradeserial tSerial;
T_t_aif_account account;
T_t_tif_meslist tMesList;
InAcc IA;
if(amtcmp(in_pack->damt0,0.0) <= 0)
{
writelog(LOG_DEBUG,"input money error!");
return E_INPUT_AMT;
}
memset(temp,0,sizeof temp);
ret = GetParameter(GLOBAL_MAX_PER_SUBSIDY,temp);
if(ret)
{
return ret;
}
max_subsidy_money = D4U5(atof(temp),2);
// 流水号
ret = getNewUniqNo(KEYTYPE_TRADESERIAL,&dSerial);
if(ret)
{
return ret;
}
// 查询卡信息
ret = do_849008_query(in_pack,&cust_id,&card_id);
if(ret)
{
writelog(LOG_DEBUG,"query customer information error!,ret[%d]",ret);
return ret;
}
// 账户信息
memset(&account,0,sizeof account);
ret = DB_t_aif_account_read_by_card_id_and_purse_id(card_id,in_pack->lvol3,&account);
if(ret)
{
// 账户表无信息
if(DB_NOTFOUND == ret)
return E_DB_ACCOUNT_N;
else
return E_DB_ACCOUNT_R;
}
// 生成流水记录
memset(&tSerial,0,sizeof tSerial);
writelog(LOG_DEBUG,"cust_id[%d],Serial_no[%d]]",cust_id,in_pack->lvol2);
ret = do_849008_query_serial(cust_id,in_pack->lvol2,&tSerial);
if(ret)
{
return ret;
}
// 认为已经入账成功,直接返回结果
if(tSerial.serial_no > 0)
{
out_pack->lvol0 = tSerial.card_id;
out_pack->lvol1 = tSerial.serial_no;
out_pack->lvol2 = tSerial.customer_id;
out_pack->damt0 = tSerial.trade_fee;
return 0;
}
memset(&IA,0,sizeof IA);
tSerial.serial_no = D2I(dSerial);
tSerial.serial_type = TXCODE_NETFEE_TRANS; // 网银转账
tSerial.serial_state = SERISTAT_DEBT;
des2src(tSerial.oper_code,in_pack->scust_no2);
des2src(tSerial.operate_date,in_pack->sdate0);
des2src(tSerial.operate_time,in_pack->stime0);
GetLogicDate(tSerial.enteract_date);
getsystime(tSerial.enteract_time);
getsysdate(tSerial.collect_date);
des2src(tSerial.collect_time,tSerial.enteract_time);
tSerial.customer_id = cust_id;
tSerial.card_id = card_id;
tSerial.in_balance = 0.0;
tSerial.out_balance = 0.0;
tSerial.trade_fee = in_pack->damt0;
tSerial.other_seri_no = in_pack->lvol2; // 银行端流水号
if(account.current_state >= ACCOUNTSTAT_LOGOUT)
{
// 个人账户已经注销
//.........这里部分代码省略.........
开发者ID:nykma,项目名称:ykt4sungard,代码行数:101,代码来源:F849009.cpp
示例5: F847132
int F847132(TRUSERID *handle,int iRequest,ST_PACK *rPack,int *pRetCode,char *szMsg)
{
int ret=0;
int i=0;
int iTotalCnt=0;
double dTotalAmt=0.0;
double dSerialNo = 0;
char logicdate[11]=""; //业务日期
char sysdate[11]="";
char systime[9]="";
char sMsg[256]="";
T_t_tif_tradeserial tradeserial;
T_t_tif_savdtl tSavdtl;
T_t_tif_subsidy tSubsidy;
InAcc IA;
ST_CPACK aPack;
ST_PACK *out_pack = &(aPack.pack);
T_t_tif_meslist tMesList;
T_t_pif_device t_device;
T_t_pif_syskey tSyskey;
memset(&t_device,0,sizeof t_device);
memset(&tMesList,0,sizeof tMesList);
memset(&tSavdtl,0,sizeof(tSavdtl));
memset(&tSubsidy,0,sizeof(tSubsidy));
memset(&tSyskey,0,sizeof tSyskey);
memset(&tradeserial,0,sizeof(tradeserial));
memset(&IA,0,sizeof(IA));
ResetNormalCPack(&aPack,0,1);
SetCol(handle,0);
SetCol(handle,F_VSMESS,0);
getsysdate(sysdate);
getsystime(systime);
ret=GetLogicDate(logicdate); //业务日期
if(ret)
{
*pRetCode=ret;
goto L_RETU;
}
if(strlen(rPack->scust_limit)<1)
{
*pRetCode=E_INPUT_BATCH_NO;
goto L_RETU;
}
if(strlen(rPack->scust_no)<1)
{
*pRetCode=E_INPUT_OPER_NULL;
goto L_RETU;
}
//允许补助负金额
if(amtcmp(rPack->damt0,0)==0)
{
*pRetCode=E_INPUT_AMT;
goto L_RETU;
}
des2src(tSubsidy.summary,rPack->semail); //补助摘要
if(strlen(rPack->semail)<1)
{
*pRetCode=E_INPUT_SUMMARY;
goto L_RETU;
}
des2src(tSubsidy.batch_no,rPack->scust_limit);
tSubsidy.bill_type=rPack->lvol2; //票据类型
des2src(tSubsidy.bill_no,rPack->scust_auth2); //票据号码
tSubsidy.amount=rPack->damt0; //补助金额
des2src(tSubsidy.subsidytype,rPack->smain_flag);//补助标志(0增值1减值)
des2src(tSubsidy.subsidytype,"1"); //补助标志(0增值1减值)
des2src(tSubsidy.broker_id,rPack->sname); //经办人身份证号
des2src(tSubsidy.broker_name,rPack->semail2); //经办人姓名
IA.dArrInAmt[0]=tradeserial.trade_fee;
switch(tSubsidy.bill_type)
{
case TYPE_CASH: //现金
IA.iArrInFeeSwitch[1]=1;
break;
case TYPE_BILL: //支票
IA.iArrInFeeSwitch[2]=1;
break;
case TYPE_FUNDBOOK: //经费本
IA.iArrInFeeSwitch[3]=1;
break;
default:
*pRetCode=E_INPUT_DEPOSIT_TYPE;
goto L_RETU;
}
/*
ret=get_batch_no_by_subsidy_no(tSubsidy.subsidy_no,tSubsidy.batch_no);
if(ret)
{
*pRetCode = E_DB_SUBSIDYTMP_R;
goto L_RETU;
}
*/
// 下发补助时才生成批次号
/*
ret=judge_with_max_subsidy_no_within_new(tSubsidy.subsidy_no);
//.........这里部分代码省略.........
开发者ID:nykma,项目名称:ykt4sungard,代码行数:101,代码来源:F847132.cpp
示例6: F847102
int F847102(TRUSERID *handle,int iRequest,ST_PACK *rPack,int *pRetCode,char *szMsg)
{
int ret = 0;
// char logicdate[11] = "";
// char enddate[10 + 1] = "";
int card_id = 0;
char Operator[33+1] = "";
// int Cut_id = 0;
int maindevice_id = 0;
int device_id = 0;
char logicdate[11]="";
char sysdate[11]="";
char systime[9]="";
double dUniqno = 0;
T_t_pif_cardlossinfo cardlossinfo;
T_t_tif_black_sheet black_sheet;
T_t_tif_tradeserial tradeserial;
T_t_tif_meslist tMesList;
T_t_pif_card tCard;
memset(&tradeserial,0,sizeof(tradeserial));
memset(&cardlossinfo,0,sizeof(cardlossinfo));
memset(&black_sheet,0,sizeof(black_sheet));
memset(&tMesList,0,sizeof(tMesList));
memset(&tCard,0,sizeof(tCard));
getsysdate(sysdate);
getsystime(systime);
ret=GetLogicDate(logicdate); //业务日期
if(ret)
{
*pRetCode=ret;
goto L_RETU;
}
card_id = rPack->lvol1; //卡标识
// Cut_id = rPack->lvol0; //客户号
des2src(Operator,rPack->scust_limit); //操作员号
maindevice_id = rPack->lvol6; //上传工作站标识
device_id = rPack->lvol7; //采集设备标识
// 检查客户信息,判断是否可以挂失
//修改卡标志,置为正常状态
ret=DB_t_pif_card_read_lock_by_cur_and_card_id(card_id, &tCard);
if(ret)
{
writelog(LOG_ERR,"card_id[%d]",card_id);
if(DB_NOTFOUND==ret)
*pRetCode= E_CARDNO_NOT_EXIST;
else
*pRetCode= E_DB_CARD_R;
goto L_RETU;
}
if(card_id!=tCard.card_id)
{
DB_t_pif_card_free_lock_by_cur();
writelog(LOG_ERR,"card_id[%d] db card_id[%d]",card_id,tCard.card_id);
*pRetCode=E_DB_CARD_R;
goto L_RETU;
}
if('2'==tCard.state_id[CARDSTAT_TYPE_REG])
{
DB_t_pif_card_free_lock_by_cur();
*pRetCode = E_CARDNO_LOGOUT;
goto L_RETU;
}
if('3'==tCard.state_id[CARDSTAT_TYPE_REG])
{
DB_t_pif_card_free_lock_by_cur();
*pRetCode = E_CARDNO_WFAIL;
goto L_RETU;
}
if(STATE_TRUE==tCard.state_id[CARDSTAT_TYPE_LOST])
{
DB_t_pif_card_free_lock_by_cur();
*pRetCode = E_CARDNO_LOST;
goto L_RETU;
}
tCard.state_id[CARDSTAT_TYPE_LOST]=STATE_TRUE;
// 修改卡状态为挂失
ret=DB_t_pif_card_update_lock_by_cur(&tCard);
if(ret)
{
writelog(LOG_ERR,"card_id[%d]",card_id);
if(DB_NOTFOUND==ret)
*pRetCode= E_CARDNO_NOT_EXIST;
else
*pRetCode= E_DB_CARD_U;
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; //卡号
//.........这里部分代码省略.........
开发者ID:nykma,项目名称:ykt4sungard,代码行数:101,代码来源:F847102.c
示例7: tend_to_enter_account
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
//系统模拟入账
int tend_to_enter_account(ST_PACK *in_pack,InAcc *IA,int trade_code,T_t_tif_tradeserial *tradeserial){
int ret = 0;
int i=0;
int card_id = 0;
char Operator[33+1] = "";
int maindevice_id = 0;
int device_id = 0;
char logicdate[11]="";
char sysdate[11]="";
char systime[9]="";
double dUniqno = 0;
char sMsg[256]="";
T_t_cif_customer tCustomer;
T_t_pif_spefee tSpeFee;
T_t_aif_account tAccount;
T_t_pif_card tCard;
memset(&tCustomer,0,sizeof(tCustomer));
memset(&tSpeFee,0,sizeof(tSpeFee));
memset(&tAccount,0,sizeof(tAccount));
memset(&tCard,0,sizeof(tCard));
card_id=in_pack->lvol0;
ret=get_datetime_from_db(sysdate,systime);
if(ret)
{
writelog(LOG_ERR,"get_datetime_from_db error,error code=[%d]",ret);
getsysdate(sysdate);
getsystime(systime);
return ret;
}
ret=GetLogicDate(logicdate); //业务日期
if(ret)
{
writelog(LOG_ERR,"GetLogicDate error,errcode=[%d]",ret);
return ret;
}
ret=DB_t_pif_card_read_by_card_id(card_id, &tCard);
if(ret)
{
if(DB_NOTFOUND==ret)
ret=E_CARDNO_NOT_EXIST;
else
ret=E_DB_CARD_R;
return ret;
}
if(strncmp(tCard.state_id,CARDSTAT_REG,4)!=0)
{
if('2'==tCard.state_id[CARDSTAT_TYPE_REG])
ret= E_CARDNO_LOGOUT;
else if('3'==tCard.state_id[CARDSTAT_TYPE_REG])
ret = E_CARD_CHANGE;
else if(tCard.state_id[CARDSTAT_TYPE_LOST]==STATE_TRUE)
ret=E_CARDNO_LOST;
else if(tCard.state_id[CARDSTAT_TYPE_FREEZE]==STATE_TRUE)
ret=E_CARDNO_FREEZE;
else if(tCard.state_id[CARDSTAT_TYPE_WFAIL]==STATE_TRUE)
ret=E_CARDNO_WFAIL;
return ret;
}
//根据卡号和钱包号得到消费者账号(借方)
ret=DB_t_aif_account_read_by_card_id_and_purse_id(card_id, PURSE_NO_ONE,&tAccount);
if(ret)
{
writelog(LOG_ERR,"DB_t_aif_account_read_by_card_id_and_purse_id ret[%d]card_id[%d]",ret,card_id);
if(DB_NOTFOUND==ret)
ret=E_ACTNO_NOT_EXIST;
else
ret=E_DB_ACCOUNT_R;
return ret;
}
ret=DB_t_cif_customer_read_lock_by_cur_and_cut_id(tCard.cosumer_id, &tCustomer);
if(ret)
{
writelog(LOG_ERR,"cut_id[%d]",tCard.cosumer_id);
if(DB_NOTFOUND==ret)
ret= E_CUSTOMER_NOT_EXIST;
else
ret= E_DB_CUSTOMER_R;
return ret;
}
//得到收费类别
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)
//.........这里部分代码省略.........
开发者ID:nykma,项目名称:ykt4sungard,代码行数:101,代码来源:ext_consumer.cpp
示例8: F847127
int F847127(TRUSERID *handle,int iRequest,ST_PACK *rPack,int *pRetCode,char *szMsg)
{
int i=0;
int ret =0;
char logicdate[11]=""; //业务日期
char sysdate[11]="";
char systime[9]="";
InAcc IA;
char ia_buf[1024]="";
double dUniqno = 0;
char sMsg[256]="";
T_t_tif_tradeserial tradeserial;
ST_CPACK aPack;
ST_PACK *out_pack = &(aPack.pack);
memset(&tradeserial,0,sizeof(tradeserial));
memset(&IA,0,sizeof(IA));
IA.pVoidPointer=ia_buf;
ResetNormalCPack(&aPack,0,1);
if(amtcmp(rPack->damt0,0)==0)
{
*pRetCode=E_INPUT_AMT_NULL;
goto L_RETU;
}
trim(rPack->sbank_acc);
trim(rPack->sbank_acc2);
if(strcmp(rPack->sbank_acc,rPack->sbank_acc2)==0)
{
*pRetCode=E_INPUT_2ACTNO_EQ;
goto L_RETU;
}
trim(rPack->scust_limit);
trim(rPack->scust_limit2);
trim(rPack->semp_pwd);
if(strlen(rPack->scust_limit)==0)
{
*pRetCode=E_INPUT_OPER_NULL;
goto L_RETU;
}
if(strlen(rPack->scust_limit2)==0)
{
*pRetCode=E_INPUT_OPER_NULL;
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); //借方帐号
//.........这里部分代码省略.........
开发者ID:nykma,项目名称:ykt4sungard,代码行数:101,代码来源:F847127.cpp
示例9: F847106
int F847106(TRUSERID *handle,int iRequest,ST_PACK *rPack,int *pRetCode,char *szMsg)
{
int i=0;
int ret =0;
char logicdate[11]=""; //业务日期
char sysdate[11]="";
char systime[9]="";
int type=0;
InAcc IA;
double dSerialNo = 0;
int card_id=0;
char physical_no[41]="";
char sMaxCardBalance[20]="";
char sMsg[256]="";
double dMaxCardBalance=0;
T_t_tif_tradeserial tradeserial;
T_t_pif_card tCard;
T_t_tif_savdtl tSavdtl;
T_t_cif_customer tCustomer;
T_t_pif_spefee tSpeFee;
T_t_aif_account tAccount; //帐户表
ST_CPACK aPack;
ST_PACK *out_pack = &(aPack.pack);
memset(&tSavdtl,0,sizeof(tSavdtl));
memset(&tCard,0,sizeof(tCard));
memset(&tAccount,0,sizeof(tAccount));
memset(&tradeserial,0,sizeof(tradeserial));
memset(&tCustomer,0,sizeof(tCustomer));
memset(&tSpeFee,0,sizeof(tSpeFee));
memset(&IA,0,sizeof(IA));
ResetNormalCPack(&aPack,0,1);
SetCol(handle,0);
SetCol(handle,F_LSERIAL1,F_DAMT2,F_DAMT3,F_VSMESS,0);
if(amtcmp(rPack->damt0,0)<=0)
{
*pRetCode=E_INPUT_AMT;
goto L_RETU;
}
if(amtcmp(rPack->damt1,0)<0)
{
*pRetCode=E_INPUT_CARD_BALA;
goto L_RETU;
}
if(rPack->lvol10<1)
{
*pRetCode=E_INPUT_CARD_TXCNT;
goto L_RETU;
}
card_id=rPack->lvol0;
tradeserial.trade_fee = rPack->damt0; //充值金额
des2src(physical_no, rPack->sbank_acc); //物理卡号
getsysdate(sysdate);
getsystime(systime);
ret=GetLogicDate(logicdate); //业务日期
if(ret)
{
*pRetCode=ret;
goto L_RETU;
}
ret=DB_t_pif_card_read_by_card_id(card_id, &tCard);
if(ret)
{
if(DB_NOTFOUND==ret)
*pRetCode=E_CARDNO_NOT_EXIST;
else
*pRetCode=E_DB_CARD_R;
goto L_RETU;
}
if(strncmp(tCard.state_id,CARDSTAT_REG,4)!=0)
{
if('2'==tCard.state_id[CARDSTAT_TYPE_REG])
*pRetCode = E_CARDNO_LOGOUT;
else if('3'==tCard.state_id[CARDSTAT_TYPE_REG])
*pRetCode = E_CARD_CHANGE;
else if(tCard.state_id[CARDSTAT_TYPE_LOST]==STATE_TRUE)
*pRetCode=E_CARDNO_LOST;
else if(tCard.state_id[CARDSTAT_TYPE_FREEZE]==STATE_TRUE)
*pRetCode=E_CARDNO_FREEZE;
else if(tCard.state_id[CARDSTAT_TYPE_WFAIL]==STATE_TRUE)
*pRetCode=E_CARDNO_WFAIL;
goto L_RETU;
}
trim(physical_no);
trim(tCard.physical_no);
if(strcmp(tCard.physical_no,physical_no)!=0)
{
writelog(LOG_ERR,"db physical_no[%s],input physical_no[%s]",tCard.physical_no,physical_no);
*pRetCode= E_CARD_PHYNO_DIFFER;
goto L_RETU;
}
//根据卡号和钱包号得到消费者账号(借方)
ret=DB_t_aif_account_read_by_card_id_and_purse_id(card_id, PURSE_NO_ONE,&tAccount);
if(ret)
{
writelog(LOG_ERR,"DB_t_aif_account_read_by_card_id_and_purse_id ret[%d]card_id[%d]",ret,card_id);
if(DB_NOTFOUND==ret)
*pRetCode=E_ACTNO_NOT_EXIST;
//.........这里部分代码省略.........
开发者ID:nykma,项目名称:ykt4sungard,代码行数:101,代码来源:F847106.cpp
示例10: F847183
//.........这里部分代码省略.........
{
*pRetCode = E_TX_SERIAL_CZ;
goto L_RETU;
}
if (tTradeserial.serial_state != SERISTAT_DEBT)
{
*pRetCode = E_TX_SERIAL_CANNOT_CZ;
goto L_RETU;
}
if (amtcmp(tTradeserial.trade_fee, 0) == 0)
{
*pRetCode = E_TX_SERIAL_CANNOT_CZ;
strcpy(szMsg,"交易金额有误!");
goto L_RETU;
}
ret = DB_t_tradecode_read_by_tradecode(tTradeserial.serial_type, &tTradeCode);
if (ret)
{
if (DB_NOTFOUND == ret)
*pRetCode = E_DB_TRADECODE_N;
else
*pRetCode = E_DB_TRADECODE_R;
goto L_RETU;
}
if (tTradeCode.rush_flag != IS_YES)
{
*pRetCode = E_TX_SERIAL_CANNOT_CZ;
strcpy(szMsg,"该交易不能被冲正");
goto L_RETU;
}
ret = GetLogicDate(logic_date); //业务日期
if (ret)
{
*pRetCode = ret;
writelog(LOG_ERR, "GetLogicDate err ret[%d]", ret);
goto L_RETU;
}
// 小于 0 , 则不判断
if (tTradeCode.rush_max_day >= 0)
{
ret = DiffDay(logic_date, tTradeserial.enteract_date, &days);
if (ret)
{
*pRetCode = ret;
goto L_RETU;
}
if (days > tTradeCode.rush_max_day)
{
writelog(LOG_ERR, "流水入账日期[%s],已超过期限[%d]天",
tTradeserial.enteract_date, days);
*pRetCode = E_TX_SERIAL_CANNOT_CZ;
strcpy(szMsg, "流水日期已超过可冲正期限!");
goto L_RETU;
}
}
if (tTradeCode.restrict_oper == IS_YES)
{
if (strcmp(rPack->scust_limit, tTradeserial.opercode) != 0)
{
strcpy(szMsg, "必须由作此次交易的操作员来冲正");
*pRetCode = E_TX_SERIAL_CANNOT_CZ;
goto L_RETU;
开发者ID:Codiscope-Research,项目名称:ykt4sungard,代码行数:67,代码来源:F847183.cpp
示例11: F847123
int F847123(TRUSERID *handle,int iRequest,ST_PACK *rPack,int *pRetCode,char *szMsg)
{
int ret=0;
int card_id=0;
char sSeedKey[17] = ""; //种子密钥
char sPwd[7] = ""; //卡密码
char logicdate[11]="";
char sysdate[11]="";
char systime[9]="";
double dSerialno=0;
T_t_pif_card tCard;
T_t_cif_customer tCustomer;
T_t_pif_spefee tSpeFee;
T_t_aif_account tAccount;
T_t_tif_tradeserial tTradeserial;
ST_CPACK aPack;
ST_PACK *out_pack = &(aPack.pack);
memset(&tCard,0,sizeof(tCard));
memset(&tCustomer,0,sizeof(tCustomer));
memset(&tSpeFee,0,sizeof(tSpeFee));
memset(&tAccount,0,sizeof(tAccount));
memset(&tTradeserial,0,sizeof(tTradeserial));
ResetNormalCPack(&aPack,0,1);
SetCol(handle,0);
SetCol(handle,F_LVOL0,F_LVOL1,F_LVOL10,F_LVOL5,
F_SCUST_NO, F_SCUST_NO2,F_SCUST_AUTH,F_SCUST_AUTH2,
F_SDATE0,F_SNAME,F_SNAME2,
F_SOPEN_EMP,F_SSTATUS0,
F_DAMT2,F_LSERIAL1,F_VSMESS,0);
card_id=rPack->lvol0;
if(card_id<1)
{
*pRetCode=E_INPUT_CARDNO;
goto L_RETU;
}
getsysdate(sysdate);
getsystime(systime);
ret=GetLogicDate(logicdate); //业务日期
if(ret)
{
*pRetCode=ret;
goto L_RETU;
}
//判断卡状态是否为写卡未成功状态
ret=DB_t_pif_card_read_lock_by_cur_and_card_id(card_id, &tCard);
if(ret)
{
writelog(LOG_ERR,"card_id[%d]",card_id);
if(DB_NOTFOUND==ret)
*pRetCode= E_CARDNO_NOT_EXIST;
else
*pRetCode= E_DB_CARD_R;
goto L_RETU;
}
if(card_id!=tCard.card_id)
{
writelog(LOG_ERR,"card_id[%d] db card_id[%d]",card_id,tCard.card_id);
DB_t_pif_card_free_lock_by_cur();
*pRetCode=E_DB_CARD_R;
goto L_RETU;
}
if('3'!=tCard.state_id[CARDSTAT_TYPE_REG])
{
DB_t_pif_card_free_lock_by_cur();
if('2'==tCard.state_id[CARDSTAT_TYPE_REG])
*pRetCode=E_CARDNO_LOGOUT;
else if(STATE_TRUE==tCard.state_id[CARDSTAT_TYPE_LOST])
*pRetCode=E_CARDNO_LOST;
else if(STATE_TRUE==tCard.state_id[CARDSTAT_TYPE_FREEZE])
*pRetCode=E_CARDNO_FREEZE;
else if(STATE_TRUE==tCard.state_id[CARDSTAT_TYPE_WFAIL])
*pRetCode=E_CARDNO_WFAIL;
else if(STATE_TRUE==tCard.state_id[CARDSTAT_TYPE_REG])
*pRetCode=E_OLDCARDINFO_NOSAVE;
goto L_RETU;
}
trim(rPack->sbank_acc);
trim(rPack->scust_no);
trim(rPack->sdate0);
if(strlen(rPack->scust_no))
{
ret=IsExistShowCardNo(rPack->scust_no);
if(ret)
{
*pRetCode = ret;
goto L_RETU;
}
}
if(strcmp(tCard.physical_no,rPack->sbank_acc)!=0)
{
ret=IsExistCardByPhyCardNo(rPack->sbank_acc);
if(ret)
{
*pRetCode = ret;
goto L_RETU;
}
}
ret=IsInvalidDateTime(rPack->sdate0,"YYYYMMDD");
//.........这里部分代码省略.........
开发者ID:nykma,项目名称:ykt4sungard,代码行数:101,代码来源:F847123.c
示例12: 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
示例13: F847221
//.........这里部分代码省略.........
*pRetCode = ret;
goto L_RETU;
}
// 查询组可解款余额
memset(&group_cash,0,sizeof group_cash);
ret = DB_t_group_cash_report_read_lock_by_c1_and_groupid(old_serial.showid,&group_cash);
if(ret)
{
if(DB_NOTFOUND == ret)
*pRetCode = E_FAN_ACC_NOT_EXISTS;
else
*pRetCode = E_DB_GRP_CASH_RPT_R;
goto L_RETU;
}
/*
if(amtcmp(tx_money,group_cash.cur_money)>0)
{
*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)
开发者ID:Codiscope-Research,项目名称:ykt4sungard,代码行数:67,代码来源:F847221.cpp
示例14: F847222
int F847222(TRUSERID *handle,int iRequest,ST_PACK *rPack,int *pRetCode,char *szMsg)
{
int ret=0;
char ia_buf[1024]="";
char sMsg[256]="";
double dUniNo;
InAcc IA;
T_t_tif_tradeserial serial;
T_t_aif_account account;
T_t_cif_shop shop;
trade_param_t param;
int shop_id;
ST_CPACK aPack;
ST_PACK *out_pack = &(aPack.pack);
int i;
ResetNormalCPack(&aPack,0,1);
shop_id = atoi(rPack->sbank_acc);
if(shop_id <= 0)
{
*pRetCode = E_SHOP_ACTNO_NOT_EXIST;
goto L_RETU;
}
if(strlen(rPack->scard0) <= 0)
{
*pRetCode = E_OPER_NOT_EXIST;
goto L_RETU;
}
if(amtcmp(rPack->damt1,0)<=0)
{
*pRetCode = E_INPUT_AMT;
goto L_RETU;
}
ret = CheckOperatorPwd(rPack->scard0,rPack->semp_pwd);
if(ret)
{
*pRetCode = ret;
goto L_RETU;
}
memset(&account,0,sizeof account);
memset(&shop,0,sizeof shop);
ret = DB_t_cif_shop_read_by_shop_id(shop_id,&shop);
if(ret)
{
if(DB_NOTFOUND == ret)
*pRetCode = E_SHOP_ACTNO_NOT_EXIST;
else
*pRetCode = E_DB_SHOP_R;
goto L_RETU;
}
if(strcmp(shop.is_indep, TYPE_YES))
{
*pRetCode = E_FAN_SHOP_NOT_INDEP;
goto L_RETU;
}
memset(&IA,0,sizeof IA);
memset(¶m,0,sizeof param);
param.pIA = &IA;
IA.pVoidPointer = ia_buf;
param.shop_id = shop.shop_id;
param.remain_balance = rPack->damt1;
ret = getNewUniqNo(KEYTYPE_TRADESERIAL,&dUniNo);
if(ret)
{
*pRetCode = ret;
goto L_RETU;
}
param.serial_no = D2I(dUniNo);
//初始化流水记录
memset(&serial,0,sizeof serial);
serial.serial_no = param.serial_no;
serial.serial_state = SERISTAT_DEBT;
serial.serial_type = TXCODE_FAN_BALANCE;
// 借用显示卡号字段保存商户号
sprintf(serial.showid,"%d",param.shop_id);
getsysdate(serial.operate_date);
getsystime(serial.operate_time);
des2src(serial.collect_date,serial.operate_date);
des2src(serial.collect_time,serial.operate_time);
// 客户号
serial.customer_id = shop.cut_id;
GetLogicDate(serial.enteract_date);
des2src(serial.enteract_time,serial.operate_time);
des2src(serial.oper_code,rPack->scard0);
des2src(serial.reserve_1,rPack->scert_addr);
serial.in_balance = param.remain_balance;
serial.trade_fee = param.remain_balance;
des2src(param.tx_date,serial.operate_date);
des2src(param.tx_time,serial.operate_time);
des2src(param.oper_code,rPack->scard0);
//.........这里部分代码省略.........
开发者ID:nykma,项目名称:ykt4sungard,代码行数:101,代码来源:F847222.cpp
示例15: F847108
int F847108(TRUSERID *handle,int iRequest,ST_PACK *in_pack,int *pRetCode,char *szMsg)
{
int ret = 0;
int card_id = 0;
char logicdate[11]="";
double dUniqNo = 0;
T_t_pif_card card;
T_t_tif_writefailed tWriteFailed;
memset(&card,0,sizeof(card));
memset(&tWriteFailed, 0, sizeof tWriteFailed);
ret=GetLogicDate(logicdate); //业务日期
if(ret)
{
*pRetCode=ret;
goto L_RETU;
}
//修改原卡状态为发卡写卡失败状态
card_id = in_pack->lvol0;
if(in_pack->lvol0<1)
{
writelog(LOG_ERR,"in_pack->lserial1[%d]",in_pack->lvol0);
*pRetCode=E_INPUT_CARDNO;
goto L_RETU;
}
if(in_pack->lserial1<1)
{
writelog(LOG_ERR,"in_pack->lserial1[%d]",in_pack->lserial1);
*pRetCode= E_INPUT_SERIALNO;
goto L_RETU;
}
ret=DB_t_pif_card_read_lock_by_cur_and_card_id(card_id, &card);
if(ret)
{
writelog(LOG_ERR,"card_id[%d]",card_id);
if(DB_NOTFOUND==ret)
*pRetCode= E_CARDNO_NOT_EXIST;
else
*pRetCode= E_DB_CARD_R;
goto L_RETU;
}
if (STATE_FALSE == card.state_id[CARDSTAT_TYPE_WFAIL])
{
card.state_id[CARDSTAT_TYPE_WFAIL]=STATE_TRUE;
}
ret=DB_t_pif_card_update_lock_by_cur(&card);
if(ret)
{
writelog(LOG_ERR,"card_id[%d]",card_id);
if(DB_NOTFOUND==ret)
*pRetCode= E_CARDNO_NOT_EXIST;
else
*pRetCode= E_DB_CARD_U;
goto L_RETU;
}
DB_t_pif_card_free_lock_by_cur();
//写入写卡失败表
ret = getNewUniqNo(KEYTYPE_WRITEFAILED, &dUniqNo); //获得写卡失败表最大ID号
if (ret)
{
writelog(LOG_ERR,"ret[%d]",ret);
*pRetCode = ret;
goto L_RETU;
}
tWriteFailed.id = D2I(dUniqNo);
tWriteFailed.card_id = card_id;
tWriteFailed.serial_no = in_pack->lserial1;
tWriteFailed.serial_type = TXCODE_WRITE_ERROR;
tWriteFailed.purese_no = PURSE_NO_ONE;
tWriteFailed.deal_flag[0] = CARDWFAIL_PACKET_DEAL_FLAG_Y;
des2src(tWriteFailed.tx_date,logicdate);
des2src(tWriteFailed.comments, "发卡失败");
ret = DB_t_tif_writefailed_add(&tWriteFailed);
if (ret)
{
*pRetCode = E_DB_WRITEFAILED_I;
goto L_RETU;
}
/*
memset(card.comments,0,sizeof(card.comments));
AddXmlItemStr(card.comments, XML_KEY_OPERATEDATE,logicdate);
AddXmlItemInt(card.comments,XML_KEY_SERIALNO,in_pack->lserial1);
AddXmlItemInt(card.comments,XML_KEY_TRADECODE,in_pack->lvol2);
*/
return 0;
L_RETU:
return -1;
}
开发者ID:nykma,项目名称:ykt4sungard,代码行数:97,代码来源:F847108.c
示例16: F847119
int F847119(TRUSERID *handle,int iRequest,ST_PACK *rPack,int *pRetCode,char *szMsg)
{
int ret=0;
char logicdate[11]="";
char sysdate[11]="";
char systime[9]="";
char operate_date[11]="";
char sSerialno[20]="";
char physical_no[41]="";
char old_physical_no[41]="";
int iSerialno=0;
int card_id=0;
int serial_type=0;
int flag=0;
double dSerialno=0;
double dAmt=0;
char h_password[7] = ""; //卡密码
char seed_key[17] = ""; //种子密钥
int card_use_cnt=0;
int seri_use_cnt=0;
double seri_in_bala=0;
double seri_out_bala=0;
double seri_in_bala_next=0;
double seri_out_bala_next=0;
int amt_flag=0;
char tx_date[11]="";
T_t_pif_card tCard;
T_t_cif_customer tCustomer;
T_t_pif_spefee tSpeFee;
T_t_tif_tradeserial tradeserial;
T_t_tif_tradeserial old_tradeserial;
T_t_tif_tradeserial_his tradeserialhis;
ST_CPACK aPack;
ST_PACK *out_pack = &(aPack.pack);
memset(&tCard,0,sizeof(tCard));
memset(&tCustomer,0,sizeof(tCustomer));
memset(&tSpeFee,0,sizeof(tSpeFee));
memset(&old_tradeserial,0,sizeof(old_tradeserial));
memset(&tradeserial,0,sizeof(tradeserial));
memset(&tradeserialhis,0,sizeof(tradeserialhis));
memcpy(seed_key,STATIC_SEED_KEY,sizeof(seed_key)); //读种子密钥
ResetNormalCPack(&aPack,0,1);
SetCol(handle,0);
SetCol(handle,F_LVO
|
请发表评论