📄 sck_hqjq.ec
字号:
#define EXTERNEXEC SQL include savkz.h; /* 数据表结构头文件 */int Sck_hqjqjz();int SPUB_zhxxcx();SS_HQJQ(TPSVCINFO * rqst){ int iRet; struct accjz tBuf; /* 交易报文结构 */ struct appfunc tApp; /* 业务处理函数 */ memset(&tBuf, 0, sizeof(struct accjz)); memset(&tApp, 0, sizeof(struct appfunc)); /* 调用交易公共初始化例程 */ iRet = PubTrBegin(rqst, &tBuf, &tApp); if (iRet == 0) { tApp.func_jylr = NULL; tApp.func_jyjz = Sck_hqjqjz; /* 存款交易记帐函数名 */ tApp.func_jymz = NULL; tApp.func_jycx1 = SPUB_zhxxcx; tApp.func_jycx2 = NULL; tApp.func_jycx3 = NULL; /* 调用交易流程控制函数 */ iRet = PubTrApp(&tApp, &tBuf); } /* 调用交易公共结束例程 */ PubTrEnd(iRet, &tBuf);}int Sck_hqjqjz(struct accjz * ptBuf){ struct savzhxx stZhxx; double dfjs; ACCINFO *pAcc; memset(&stZhxx, 0, sizeof(struct savzhxx)); strcpy(stZhxx.zhzdm, SAV_ZH1); strcpy(stZhxx.lczhzdm, SAV_LCZH1); if (SPUB_MsgPreTreat(ptBuf) < 0) { S_ERR return (-1); } if (SPUB_initzh(&stZhxx, &SAVJYYS1, ACC_CQ) < 0) { S_ERR return (-1); } if (GetAccInfo(stZhxx.zhzdm) == NULL) { strcpy(pTrInfo->xym, PXYM); strcpy(pTrInfo->xyxx, "必须指定子帐户"); S_ERR return (-1); } if (strlen(stZhxx.zh) == JZH_LEN) { strcpy(pTrInfo->xym, PXYM); strcpy(pTrInfo->xyxx, "旧帐户必须先换新折"); S_ERR return (-1); } if ((stZhxx.zl[0] != ACC_GRCK) || (stZhxx.zl[1] != ACC_ZLHQ)) { strcpy(pTrInfo->xym, PXYM); strcpy(pTrInfo->xyxx, "必须是活期存款"); S_ERR return (-1); } if (SPUB_xhzhhfx(&stZhxx, &SAVJYYS1) < 0) { /* 销户帐户合法性检查 */ S_ERR return (-1); } if (SPUB_xhjehfx(&stZhxx, &SAVJYYS1) < 0) { /* 销户金额合法性检查 */ S_ERR return (-1); } if (SPUB_xhjx(&stZhxx, &SAVJYYS1) < 0) { /* 销户计息 */ S_ERR return (-1); } if (SPUB_xhxg(&stZhxx, &SAVJYYS1) < 0) { /* 数据库修改 */ S_ERR return (-1); } if (RunAccCore(ACC_JZ) < 0) { S_ERR return (-1); } if (SPUB_GetNewZhxx(&stZhxx, ACC_CQ) < 0) { S_ERR return (-1); } /* 清积数 */ FreeCoreLink(); if (InitAccInfo(stZhxx.zhzdm, stZhxx.zh, stZhxx.zzh, NULL) != 0) { S_ERR return (-1); } if ((pAcc = GetAccInfo(stZhxx.zhzdm)) == NULL) { strcpy(pTrInfo->xym, PXYM); strcpy(pTrInfo->xyxx, "必须指定子帐户"); S_ERR return (-1); } GETACCFLDVAL(pAcc, "dfjs", &dfjs); ptBuf->p_js1 = dfjs; dfjs = 0.00; SETACCFLDVAL(pAcc, "dfjs", &dfjs); if (DBFlush() < 0) { S_ERR return (-1); } /* 打印存折 */ if (SPUB_dykz(&stZhxx, &SAVJYYS1, NULL, NULL) < 0) { S_ERR return -1; } if (SPUB_LastTreat(ptBuf, &stZhxx, NULL) < 0) { S_ERR return (-1); } return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -