本文整理汇总了C++中ResetNormalCPack函数的典型用法代码示例。如果您正苦于以下问题:C++ ResetNormalCPack函数的具体用法?C++ ResetNormalCPack怎么用?C++ ResetNormalCPack使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ResetNormalCPack函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: elect_room_check_get_name
static int elect_room_check_get_name(ST_PACK *in_pack,ST_PACK *out_pack,transfer_control_t *trans_ctl)
{
int ret = 0;
char c_drtbranch[10]="";
char c_bccbasefuncno[10]="";
int DRTP_BRANCH =0;
int BCC_BASEFUNCNO =0;
trans_ctl->check_user_pwd = 0;
CTcpSocket tcpsocket ;
ST_PACK ArrayPack; // 设置返回包
ST_CPACK aPack; // 设置应答包
ST_CPACK sPack; // 设置发送包
ret=GetParameter(2501, c_drtbranch);
if(ret){
writelog(LOG_ERR,"get_parameter error,error code=[%d]",ret);
return ret;
}
ret=GetParameter(2502, c_bccbasefuncno);
if(ret){
writelog(LOG_ERR,"get_parameter error,error code=[%d]",ret);
return ret;
}
DRTP_BRANCH = atoi(c_drtbranch);
BCC_BASEFUNCNO = atoi(c_bccbasefuncno);
ResetNormalCPack(&aPack, 0, 1);
memset(&ArrayPack, 0, sizeof(ArrayPack));
ResetNormalCPack(&sPack, 0, 1);
SetHeadCol(&sPack, F_SSECTYPES,F_LVOL0,F_SCUST_AUTH,0); // 设置发送windows BU的头部视图信息
sPack.head.RequestType = 847356;
sPack.pack.lvol0=in_pack->lvol10;//房间号
ret = ExtCall(0, DRTP_BRANCH, BCC_BASEFUNCNO, 0, TIMEOUT, &sPack, &aPack, &ArrayPack);
if (ret < 0||aPack.head.retCode!=0)
{
if(ret<0)
{
writelog(LOG_ERR,"Call 847356 error,errcode=[%d],retCode=[%d]",ret,aPack.head.retCode);
return ret;
}
else
{
writelog(LOG_ERR,"Call 847356 error,errcode=[%d],retCode=[%d]",ret,aPack.head.retCode);
return aPack.head.retCode;
}
}
memcpy(out_pack->sbankname,aPack.pack.sbankname,81);//房间名称
out_pack->damt2=aPack.pack.damt0;//电价
writelog(LOG_ERR,"sbankname=[%s]",out_pack->sbankname);
return 0;
}
示例2: do_query_240204
static int do_query_240204(ST_PACK *in_pack,ST_PACK *out_pack,int *pRetCode,char *szMsg)
{
int ret = 0;
char c_drtbranch[10]="";
char c_bccbasefuncno[10]="";
int DRTP_BRANCH =0;
int BCC_BASEFUNCNO =0;
ST_PACK ArrayPack; // 设置返回包
ST_CPACK aPack; // 设置应答包
ST_CPACK sPack; // 设置发送包
ret=GetParameter(2501, c_drtbranch);
if(ret){
writelog(LOG_ERR,"get_parameter error,error code=[%d]",ret);
return ret;
}
ret=GetParameter(2502, c_bccbasefuncno);
if(ret){
writelog(LOG_ERR,"get_parameter error,error code=[%d]",ret);
return ret;
}
DRTP_BRANCH = atoi(c_drtbranch);
BCC_BASEFUNCNO = atoi(c_bccbasefuncno);
ResetNormalCPack(&aPack, 0, 1);
memset(&ArrayPack, 0, sizeof(ArrayPack));
ResetNormalCPack(&sPack, 0, 1);
SetHeadCol(&sPack, F_SSECTYPES,F_LVOL0,F_SCUST_AUTH,0); // 设置发送windows BU的头部视图信息
sPack.head.RequestType = 847358;
sPack.pack.lvol0=in_pack->lvol10;//房间号
ret = ExtCall(0, DRTP_BRANCH, BCC_BASEFUNCNO, 0, 10, &sPack, &aPack, &ArrayPack);
if (ret < 0||aPack.head.retCode!=0)
{
if(ret<0)
{
writelog(LOG_ERR,"Call 847358 error,errcode=[%d],retCode=[%d]",ret,aPack.head.retCode);
*pRetCode = aPack.head.retCode;
return ret;
}
else
{
writelog(LOG_ERR,"Call 847358 error,errcode=[%d],retCode=[%d]",ret,aPack.head.retCode);
strcpy(szMsg,aPack.pack.vsmess); // 错误信息
*pRetCode = aPack.head.retCode;
return -1;
}
}
memcpy(out_pack->sbankname,aPack.pack.sbankname,81);//房间名称
out_pack->damt2=aPack.pack.damt0;//电价
out_pack->damt1=aPack.pack.damt1;//房间余额
writelog(LOG_ERR,"sbankname=[%s]",out_pack->sbankname);
return 0;
}
示例3: F950006
int F950006(TRUSERID *handle,int iRequest,ST_PACK *rPack,int *pRetCode,char *szMsg)
{
int ret=0;
ST_CPACK aPack;
ST_PACK* out_pack = &(aPack.pack);
char buf[256] = "";
int sysid = rPack->lcert_code;
ret = CheckGatewayDynKey(sysid,rPack->scust_limit);
if(ret)
{
*pRetCode = ret;
goto L_RETU;
}
ret = GetParameter(rPack->lvol0,buf);
if(ret)
{
*pRetCode = ret;
goto L_RETU;
}
ResetNormalCPack(&aPack,0,1);
SetCol(handle,0);
SetCol(handle,F_SCARD0,0);
des2src(out_pack->scard0,buf);
return 0;
L_RETU:
return -1;
}
示例4: DoResponse
static int DoResponse(const T_t_cardtrans& cardtrans, TRUSERID *handle, int *pRetCode, char *szMsg)
{
CAccTrans& ats = CAccTrans::GetInst();
TRANS& trans = ats.trans;
ST_CPACK aPack;
ST_PACK *outPack = &(aPack.pack);
ResetNormalCPack(&aPack, 0, 1);
SetCol(handle, F_LVOL0, F_LVOL1, F_LVOL7, F_LVOL8, F_DAMT0, F_LCERT_CODE,
F_SDATE0, F_STIME0, F_LWITHDRAW_FLAG, F_LSERIAL0, F_LSERIAL1, F_SNOTE, F_VSMESS, 0);
outPack->lwithdraw_flag = trans.termid;
outPack->lvol0 = trans.cardno;
outPack->lvol7 = D4U5(trans.cardbefbal * 100, 0);
outPack->lvol8 = D4U5(trans.cardaftbal * 100, 0);
if(trans.errcode)
{
outPack->lvol1 = 1;
outPack->damt0 = trans.addamt;
outPack->lcert_code = trans.transcode;
outPack->lserial0 = cardtrans.termid;
outPack->lserial1 = cardtrans.termseqno;
strcpy(outPack->sdate0, cardtrans.transdate);
strcpy(outPack->stime0, cardtrans.transtime);
strcpy(outPack->snote, trans.remark);
}
PutRow(handle, outPack, pRetCode, szMsg);
return 0;
}
示例5: F240009
int F240009(TRUSERID *handle,int iRequest,ST_PACK *rPack,int *pRetCode,char *szMsg)
{
int ret=0;
T_t_device t_device;
ST_CPACK aPack;
ST_PACK *out_pack = &(aPack.pack);
memset(&t_device,0,sizeof(t_device));
ResetNormalCPack(&aPack,0,1);
SetCol(handle,0);
SetCol(handle,F_SCARD0,0);
//writelog(LOG_ERR," deviceid=[%s]",rPack->sorder2);
ret=DB_t_device_read_by_deviceid(atoi(rPack->sorder2),&t_device);
if(ret)
{
writelog( LOG_ERR,"DB_t_device_read_by_deviceid error,errcode=[%d],deviceid=[%d]",ret,t_device.deviceid);
*pRetCode=E_DB_DEVICE_R;
goto L_RETU;
}
//writelog( LOG_ERR,"Device don't login,deviceid=[%d],login_flag=[%d]",deviceid,t_device.status);
if(DEVISTAT_ONLINE!=t_device.status[0])
{
writelog( LOG_ERR,"Device don't login,deviceid=[%d],login_flag=[%d]",t_device.deviceid,t_device.status);
*pRetCode=E_DB_DEVI_LOGIN;
goto L_RETU;
}
return 0;
L_RETU:
return -1;
}
示例6: GetSysParam
static int GetSysParam(const char *para,char *value)
{
int ret;
ST_CPACK aPack,sPack;
memset(&sPack,0,sizeof sPack);
memset(&aPack,0,sizeof aPack);
ResetNormalCPack(&sPack,0,1);
SetHeadCol(&sPack,F_SNAME,F_SNAME2,0);
sPack.head.RequestType = 850007;
strcpy(sPack.pack.sname,"GDCT");
strcpy(sPack.pack.sname2,para);
ret = ExtCall(0,g_mainsvr_drtpno,g_mainsvr_func,0,3,&sPack,&aPack,NULL);
if(ret>=0)
{
if(aPack.head.retCode!=0)
return aPack.head.retCode;
strncpy(value,aPack.pack.vsvarstr0,128);
return 0;
}
else
{
return -1;
}
}
示例7: F240000
int F240000(TRUSERID *handle,int iRequest,ST_PACK *rPack,int *pRetCode,char *szMsg)
{
int ret=0;
CAccTrans *pAccTrans=CAccTrans::getInstance();
TRANS& trans=pAccTrans->trans;
trans.termid=atoi(rPack->sorder2);
char seed_key[17] = "";
char sInputPwd[33] = ""; //存放加密前的卡密钥
char sCryptPwd[33] = ""; //存放加密后的卡密钥
T_t_card card;
memset(&card,0,sizeof(card));
ST_CPACK aPack;
ST_PACK *out_pack = &(aPack.pack);
ResetNormalCPack(&aPack,0,1);
SetCol(handle,0);
SetCol(handle,F_LVOL0,F_DAMT0,F_DAMT1,F_DAMT2,F_LVOL1,F_LVOL2,F_SDATE0,0);
trans.cardno=rPack->lvol0;
if(trans.cardno<1)
trans.cardno=atoi(rPack->sserial0);
ret=DB_t_card_read_by_cardno(trans.cardno,&card);
if(ret)
{
writelog(LOG_ERR,"Create serial_no error,error code=[%d]",ret);
return ERRINFO(E_CARD_LOGOUT,trans.cardno);
}
if(card.status[0]!=STATUS_NORMAL)
{
return ERRINFO(E_CARD_LOGOUT,trans.cardno);
}
if('1'==card.frozeflag[0])
{
return ERRINFO(E_CARD_FREEZE,trans.cardno);
}
if('1'==card.lossflag[0])
{
return ERRINFO(E_CARD_LOST,trans.cardno);
}
if('1'==card.badflag[0])
{
return ERRINFO(E_CARD_BADRECORD,trans.cardno);
}
if('1'==card.lockflag[0])
{
return ERRINFO(E_CARDNO_LOCKED,trans.cardno);
}
des2src(sInputPwd,rPack->scust_limit); //卡密码
strcpy(seed_key,STATIC_SEED_KEY); //种子密钥
EncodePwd(seed_key,sInputPwd,sCryptPwd,0); //加密
if(strcmp(sCryptPwd,card.cardpwd)!=0)
{
writelog(LOG_ERR,"card err input[%s]db[%s]",sCryptPwd,card.cardpwd);
return E_CARDPWD;
}
PutRow(handle,out_pack,pRetCode,szMsg);
return 0;
}
示例8: F847319
int F847319(TRUSERID *handle,int iRequest,ST_PACK *in_pack,int *pRetCode,char *szMsg)
{
int ret,i;
ST_CPACK aPack;
ST_PACK *out_pack = &(aPack.pack);
memset(&aPack,0,sizeof aPack);
ResetNormalCPack(&aPack,0,1);
SetCol(handle,0);
SetCol(handle,F_LVOL0,F_LVOL1,F_DAMT0,F_DAMT1,F_DAMT2,F_SBANKNAME,F_SADDR,F_VSMESS,0);
i = 0;
while(g_query_func[i].tx_code != -1)
{
if(g_query_func[i].tx_code == in_pack->lcert_code)
{
//
ret = g_query_func[i].do_func(in_pack,out_pack,pRetCode,szMsg);
if(ret)
{
writelog(LOG_ERR,"处理请求[%d]失败errcode[%d]",in_pack->lcert_code,*pRetCode);
return ret;
}
PutRow(handle,out_pack,pRetCode,szMsg);
return 0;
}
i++;
}
*pRetCode = E_INPUT_DATA_INVAILD;
return -1;
}
示例9: F847306
int F847306(TRUSERID *handle, int iRequest, ST_PACK *in_pack, int *pRetCode, char *szMsg)
{
int ret = 0;
char szStuEmpNo[21] = "";
char szAccSerOutOfDate[9] = "";
double dRemainBalance = 0.0;
double dOweBalanece = 0.0;
ST_CPACK aPack;
ST_PACK *out_pack = &(aPack.pack);
ResetNormalCPack(&aPack, 0, 1);
SetCol(handle,0);
SetCol(handle,F_LVOL11,0);
memcpy(szStuEmpNo, in_pack->scust_auth, sizeof(szStuEmpNo) - 1);
// ret = GetAccoutInfo(in_pack->scust_auth, &(out_pack->damt0), &(out_pack->damt1), out_pack->sphone);
out_pack->lvol11 = GetAccoutInfo(szStuEmpNo, &dRemainBalance);
if(out_pack->lvol11==0)
out_pack->lvol11 = 1;
else if(out_pack->lvol11 == -2)
out_pack->lvol11 = -1003;
// if (ret)
// out_pack->lvol11 = ret; // L_LVOL11作为返回码查看
// else
// out_pack->lvol11 = 999;
out_pack->damt0 = dRemainBalance;
// out_pack->damt1 = dOweBalanece;
// memcpy(szAccSerOutOfDate, out_pack->sphone, sizeof(szAccSerOutOfDate) - 1);
PutRow(handle, out_pack, pRetCode, szMsg);
return 0;
}
示例10: F847150
int F847150(TRUSERID *handle,int iRequest,ST_PACK *rPack,int *pRetCode,char *szMsg)
{
int ret =0;
T_t_aif_account tAccount;
ST_CPACK aPack;
ST_PACK *out_pack = &(aPack.pack);
memset(&tAccount,0,sizeof(tAccount));
ResetNormalCPack(&aPack,0,1);
SetCol(handle,0);
SetCol(handle,F_SBANKNAME,0);
if(!strlen(rPack->sbank_acc))
{
*pRetCode=E_INPUT_ACTNO_NULL;
goto L_RETU;
}
ret=DB_t_aif_account_read_by_account_id(rPack->sbank_acc, &tAccount);
if(ret)
{
if(DB_NOTFOUND==ret)
*pRetCode= E_ACTNO_NOT_EXIST;
else
*pRetCode= E_DB_ACCOUNT_R;
goto L_RETU;
}
strcpy(out_pack->sbankname,tAccount.cut_name);
PutRow(handle,out_pack,pRetCode,szMsg);
return 0;
L_RETU:
return -1;
}
示例11: F847353
int F847353(TRUSERID *handle, int iRequest, ST_PACK *in_pack, int *pRetCode, char *szMsg)
{
int error_code = 0;
int cut_id = in_pack->lvol0;
int money = 0;
ST_CPACK aPack;
ST_PACK *out_pack = &(aPack.pack);
ResetNormalCPack(&aPack, 0, 1);
Save_Info save_info;
memset(&save_info, 0, sizeof(save_info));
SetCol(handle,0);
SetCol(handle, F_DAMT0, F_DAMT1, F_SPHONE, F_LVOL10, F_LVOL0, 0);
CheckAccountNo(cut_id, &money, &error_code);
out_pack->lvol0 = money;
if (error_code != 0)
{
g_LogFile.WriteLogEx(1001, "客户号[%d]--转帐金额[%d]--错误码[%d]--序号[%d]",
cut_id, money, error_code, ++count2);
error_code = DLLFUN_ERR_CHECK_ACC_THIRD_PART_FAIL;
}
*pRetCode = error_code;
PutRow(handle, out_pack, pRetCode, szMsg);
return error_code;
}
示例12: ClearCardInfo
int ClearCardInfo(TRUSERID *handle,int *pRetCode,char *szMsg)
{
int ret=0;
CAccTrans& ats=CAccTrans::GetInst();
TRANS& trans=ats.trans;
T_t_card tCard;
memset(&tCard,0,sizeof(tCard));
ret=DB_t_card_read_by_cardphyid_and_status(trans.cardphyid,"1",&tCard);
if(ret)
{
writelog(LOG_ERR,"cardno[%d]",trans.cardno);
if(DB_NOTFOUND==ret)
{
ST_CPACK aPack;
ST_PACK *outPack = &(aPack.pack);
ResetNormalCPack(&aPack,0,1);
SetCol(handle,0);
SetCol(handle,F_LVOL0,F_VSMESS,0);
strcpy(outPack->vsmess,"该卡信息可以清空");
PutRow(handle,outPack,pRetCode,szMsg);
return 0;
}
else
return E_DB_CARD_R;
}
ERRTIP("该卡未注销,不能清空卡信息");
return E_COMMON_ERR;
}
示例13: F249999
int F249999(TRUSERID *handle,int iRequest,ST_PACK *rPack,int *pRetCode,char *szMsg)
{
int ret=0;
ST_PACK ArrayPack; // 设置返回包
ST_CPACK aPack; // 设置应答包
ST_PACK *out_pack = &(aPack.pack);
ST_CPACK sPack; // 设置发送包
ResetNormalCPack(&aPack, 0, 1);
memset(&ArrayPack, 0, sizeof(ArrayPack));
ResetNormalCPack(&sPack, 0, 1);
sPack.head.RequestType = 999999;
SetHeadCol(&sPack, F_SCLOSE_EMP, F_SORDER2, F_SSERIAL0, F_SEMP_PWD, F_DAMT0, F_LVOL3, 0);
memcpy(&(sPack.pack), rPack, sizeof(sPack.pack));
writelog(LOG_ERR,"branch_no[%d], base_funcno[%d]",g_Bank.DRTP_BRANCH,g_Bank.BCC_BASEFUNCNO);
ret = ExtCall(0, g_Bank.DRTP_BRANCH, g_Bank.BCC_BASEFUNCNO, 0, g_Bank.TIMEOUT, &sPack, &aPack, &ArrayPack);
writelog(LOG_ERR,"Call 999999 retCode=[%d]", ret);
if (ret < 0 || aPack.head.retCode != 0)
{
memcpy(szMsg, aPack.pack.vsmess, sizeof(aPack.pack.vsmess) -1);
if (ret < 0)
{
writelog(LOG_ERR,"Call 999999 error,errcode=[%d],retCode=[%d]",ret,aPack.head.retCode);
*pRetCode = ret;
return E_TRANS_UNKNOW_ERROR;
}
else
{
writelog(LOG_ERR,"Call 999999 error,errcode=[%d],retCode=[%d]",ret,aPack.head.retCode);
*pRetCode = ret;
return aPack.head.retCode;
}
}
SetCol(handle,0);
SetCol(handle,F_LVOL0,F_LVOL1,F_DAMT0,F_DAMT1,F_DAMT2,F_DAMT10,F_DAMT11,F_DAMT12,F_VSMESS,0);
PutRow(handle, out_pack, pRetCode, szMsg);
return 0;
}
示例14: QryAcc
//查询第三方账户状态
static int QryAcc(TRUSERID *handle,ST_PACK *rPack,int *pRetCode,char *szMsg)
{
int ret;
ST_CPACK aPack;
ST_PACK *outPack = &(aPack.pack);
ResetNormalCPack(&aPack,0,1);
SetCol(handle,0);
SetCol(handle,F_LVOL0,F_LVOL1,F_LVOL5,F_DAMT0,F_DAMT1,F_DAMT2,F_SDATE1,F_LWITHDRAW_FLAG,
F_SBANKNAME,F_SADDR,F_SNAME2,F_SPHONE3,F_VSMESS,0);
CAccTrans *pAccTrans=CAccTrans::getInstance();
TRANS& trans=pAccTrans->trans;
trans.cardno=rPack->lvol0;
T_t_card tCard;
memset(&tCard,0,sizeof(tCard));
T_t_account tAccount;
memset(&tAccount,0,sizeof(tAccount));
ret=pAccTrans->CheckAcc(&tCard,&tAccount);
if(ret)
{
writelog(LOG_INFO,"检查状态失败");
return ret;
}
if(strlen(rPack->stx_pwd))
{
ret=check_card_pwd_by_card(trans.cardno,rPack->stx_pwd);
if(ret)
return ret;
}
int paycode=rPack->lcert_code;
CPaymentBase *payment;
payment = CPaymentBase::find_payment(paycode);
if(NULL == payment)
{
return E_TRANS_FUNC_NONSUPPORT;
}
ret = payment->init(handle,&aPack,rPack);
if(ret)
{
writelog(LOG_ERR,"trade[%d],ret[%d]",paycode,ret);
return ret;
}
if(payment->payment_.onlinepay>0)
{
ret = payment->qry_acc(handle,rPack,outPack);
if(ret)
{
writelog(LOG_ERR,"查询收款方账户信息错误trade[%d],ret[%d]",paycode,ret);
return ret;
}
}
if(payment->pushflag_)
PutRow(handle,outPack,pRetCode,szMsg);
return 0;
}
示例15: F846302
int F846302(TRUSERID *handle,int iRequest,ST_PACK *rPack,int *pRetCode,char *szMsg)
{
int ret=0;
CAccTrans *pAccTrans=CAccTrans::getInstance();
// ret=pAccTrans->checkCfgUpdate();
// if(ret)
// return ret;
des2src(pAccTrans->trans.opercode,rPack->semp);
pAccTrans->trans.transcode=TC_CARDOPENREV;
ret=pAccTrans->InitTrans();
if(ret)
return ret;
TRANS& trans=pAccTrans->trans;
char authrightflag=rPack->sstatus2[0];
des2src(trans.chkopercode,rPack->semp_no);
if('1'==authrightflag)
{
ret=chk_oper_pwd(trans.chkopercode,rPack->scust_limit);
if(ret)
return ret;
}
ST_CPACK aPack;
ST_PACK *outPack = &(aPack.pack);
ResetNormalCPack(&aPack,0,1);
char oldaccdate[9]="";
des2src(oldaccdate,rPack->sdate3);
int oldtermid=rPack->lwithdraw_flag;
int oldtermseqno=rPack->lserial1;
trans.dpscnt=rPack->lvol5;
trans.paycnt=rPack->lvol6;
trans.cardbefbal=rPack->lvol7;
des2src(trans.cardphyid,rPack->sstation1);
if(trans.dpscnt>1||trans.paycnt>0)
return E_CARD_USED;
if(strlen(oldaccdate)<1)
return E_INPUTNULL_ACCDATE;
if(oldtermid<1)
return E_INPUTNULL_TERMID;
if(oldtermseqno<1)
return E_INPUTNULL_TERMSEQNO;
SetCol(handle,F_LVOL0,F_LVOL8,F_SDATE3,F_SEMP,F_LSERIAL1,F_SSTATION0,F_VSMESS,F_STIME3,0);
ret=doReverse(oldaccdate,oldtermid,oldtermseqno,outPack->sstation0);
if(ret)
return ret;
outPack->lvol0=pAccTrans->trans.cardno;
outPack->lvol8=0;
des2src(outPack->sdate3,pAccTrans->trans.accdate);
des2src(outPack->stime3,pAccTrans->trans.acctime);
des2src(outPack->semp,pAccTrans->trans.opercode);
outPack->lserial1=pAccTrans->trans.termseqno;
strcpy(outPack->vsmess,"开户冲正成功");
strcat(outPack->vsmess,pAccTrans->remark.c_str());
PutRow(handle,outPack,pRetCode,szMsg);
return 0;
}