def SubModuleDoFst(): #=================汇兑自由格式书检查============================================ if not TradeContext.existVariable('BOJEDT'): return AfaFlowControl.ExitThisFlow("S999", "日期不能为空") if not TradeContext.existVariable('RCVBNKCO'): return AfaFlowControl.ExitThisFlow("S999", "接收行行号不能为空") #=================登记汇兑自由格式书信息============================================ AfaLoggerFunc.tradeInfo(">>>开始登记汇兑业务查询书信息") TradeContext.NCCWKDAT = TradeContext.NCCworkDate #=====刘雨龙 20080701 增加汇兑业务查询查复登记簿信息==== TradeContext.TRCNO = TradeContext.SerialNo #交易流水号 hdcbka_insert_dict = {} if not rccpsMap8513CTradeContext2Dhdcbka.map(hdcbka_insert_dict): return AfaFlowControl.ExitThisFlow("S999", "为汇兑业务查询查复登记簿赋值异常") #AfaLoggerFunc.tradeInfo(hdcbka_insert_dict) ret = rccpsDBTrcc_hdcbka.insertCmt(hdcbka_insert_dict) if ret <= 0: return AfaFlowControl.ExitThisFlow("S999", "登记汇兑业务自由格式信息异常") AfaLoggerFunc.tradeInfo(">>>结束登记汇兑业务查询书信息") #=================为汇兑查询书报文赋值====================================== AfaLoggerFunc.tradeInfo(">>>开始为汇兑查询书报文赋值") TradeContext.TRCCO = '9900513' TradeContext.MSGTYPCO = 'SET008' TradeContext.SNDBRHCO = TradeContext.BESBNO TradeContext.SNDCLKNO = TradeContext.BETELR TradeContext.SNDTRDAT = TradeContext.BJEDTE TradeContext.SNDTRTIM = TradeContext.BJETIM #TradeContext.MSGFLGNO = TradeContext.SNDSTLBIN + TradeContext.TRCDAT + TradeContext.SerialNo TradeContext.ORMFN = hdcbka_insert_dict['SNDMBRCO'] + hdcbka_insert_dict['TRCDAT'] + hdcbka_insert_dict['TRCNO'] TradeContext.NCCWKDAT = TradeContext.NCCworkDate TradeContext.OPRTYPNO = '99' TradeContext.ROPRTPNO = '20' TradeContext.TRANTYP = '0' #TradeContext.TRCDAT = TradeContext.BOJEDT TradeContext.TRCNO = TradeContext.SerialNo AfaLoggerFunc.tradeInfo(">>>结束为汇兑自由格式书报文赋值") AfaLoggerFunc.tradeInfo('发起行交易日期:'+TradeContext.SNDTRDAT) AfaLoggerFunc.tradeInfo( '***农信银系统:往账.中心类操作(1.本地操作).汇兑自由格式书发送[TRC003_8513]退出***' ) return True
def SubModuleDoFst(): #==========判断是否重复报文,如果是重复报文,直接进入下一流程================ AfaLoggerFunc.tradeInfo(">>>开始检查是否重复报文") hdcbka_where_dict = {} hdcbka_where_dict['SNDBNKCO'] = TradeContext.SNDBNKCO hdcbka_where_dict['TRCDAT'] = TradeContext.TRCDAT hdcbka_where_dict['TRCNO'] = TradeContext.TRCNO hdcbka_dict = rccpsDBTrcc_hdcbka.selectu(hdcbka_where_dict) if hdcbka_dict == None: return AfaFlowControl.ExitThisFlow("S999","校验重复报文异常") return True if len(hdcbka_dict) > 0: AfaLoggerFunc.tradeInfo("汇兑查询查复自由格式登记簿中存在相同查复交易,此报文为重复报文,进入下一流程,发送表示成功的通讯回执") #======为通讯回执报文赋值=============================================== out_context_dict = {} out_context_dict['TRCCO'] = '9900503' out_context_dict['MSGTYPCO'] = 'SET008' out_context_dict['RCVMBRCO'] = TradeContext.SNDMBRCO out_context_dict['SNDMBRCO'] = TradeContext.RCVMBRCO out_context_dict['SNDBRHCO'] = TradeContext.BESBNO out_context_dict['SNDCLKNO'] = TradeContext.BETELR out_context_dict['SNDTRDAT'] = TradeContext.BJEDTE out_context_dict['SNDTRTIM'] = TradeContext.BJETIM out_context_dict['MSGFLGNO'] = out_context_dict['SNDMBRCO'] + TradeContext.BJEDTE + TradeContext.SerialNo out_context_dict['ORMFN'] = TradeContext.MSGFLGNO out_context_dict['NCCWKDAT'] = TradeContext.NCCworkDate out_context_dict['OPRTYPNO'] = '99' out_context_dict['ROPRTPNO'] = TradeContext.OPRTYPNO out_context_dict['TRANTYP'] = '0' out_context_dict['ORTRCCO'] = TradeContext.TRCCO out_context_dict['PRCCO'] = 'RCCI0000' out_context_dict['STRINFO'] = '重复报文' rccpsMap0000Dout_context2CTradeContext.map(out_context_dict) return True AfaLoggerFunc.tradeInfo(">>>结束检查是否重复报文") #==========为汇兑查询查复自由格式登记簿字典赋值================================ AfaLoggerFunc.tradeInfo(">>>开始为汇兑查询查复自由格式登记簿字典赋值") TradeContext.BRSFLG = PL_BRSFLG_RCV #TradeContext.ISDEAL = PL_ISDEAL_ISDO hdcbka_insert_dict = {} if not rccpsMap1120CTradeContext2Dhdcbka_dict.map(hdcbka_insert_dict): return AfaFlowControl.ExitThisFlow("S999","为汇兑查询查复自由格式登记簿字典赋值异常") AfaLoggerFunc.tradeInfo(">>>结束为汇兑查询查复自由格式登记簿字典赋值") #==========登记汇兑查询查复自由格式登记簿======================================= AfaLoggerFunc.tradeInfo(">>>开始登记此自由格式书") ret = rccpsDBTrcc_hdcbka.insertCmt(hdcbka_insert_dict) if ret <= 0: if not AfaDBFunc.RollbackSql(): AfaFlowControl.ExitThisFlow("S999","Rollback异常") AfaLoggerFunc.tradeInfo(">>>Rollback成功") return AfaFlowControl.ExitThisFlow("S999","登记汇兑查询查复自由格式登记簿异常") AfaLoggerFunc.tradeInfo(">>>结束登记此自由格式书业务") #======为通讯回执报文赋值=================================================== out_context_dict = {} out_context_dict['sysType'] = 'rccpst' out_context_dict['TRCCO'] = '9900503' out_context_dict['MSGTYPCO'] = 'SET008' out_context_dict['RCVMBRCO'] = TradeContext.SNDMBRCO out_context_dict['SNDMBRCO'] = TradeContext.RCVMBRCO out_context_dict['SNDBRHCO'] = TradeContext.BESBNO out_context_dict['SNDCLKNO'] = TradeContext.BETELR out_context_dict['SNDTRDAT'] = TradeContext.BJEDTE out_context_dict['SNDTRTIM'] = TradeContext.BJETIM out_context_dict['MSGFLGNO'] = out_context_dict['SNDMBRCO'] + TradeContext.BJEDTE + TradeContext.SerialNo out_context_dict['ORMFN'] = TradeContext.MSGFLGNO out_context_dict['NCCWKDAT'] = TradeContext.NCCworkDate out_context_dict['OPRTYPNO'] = '99' out_context_dict['ROPRTPNO'] = TradeContext.OPRTYPNO out_context_dict['TRANTYP'] = '0' out_context_dict['ORTRCCO'] = TradeContext.TRCCO out_context_dict['PRCCO'] = 'RCCI0000' out_context_dict['STRINFO'] = '成功' rccpsMap0000Dout_context2CTradeContext.map(out_context_dict) return True
def SubModuleDoFst(): AfaLoggerFunc.tradeInfo( '***农信银系统:往账.中心类操作(1.本地操作).通存通兑查复书发送[TRC003_8584]进入***' ) #=================查询原查复信息============================================ if not TradeContext.existVariable('ORQYDAT'): return AfaFlowControl.ExitThisFlow("S999", "原查询日期不能为空") if not TradeContext.existVariable('OQTNO'): return AfaFlowControl.ExitThisFlow("S999", "原查询号不能为空") AfaLoggerFunc.tradeInfo(">>>开始查询原查询书信息") hdcbka_dict = {} hdcbka_where_dict = {'BJEDTE':TradeContext.ORQYDAT,'BSPSQN':TradeContext.OQTNO} hdcbka_dict = rccpsDBTrcc_hdcbka.selectu(hdcbka_where_dict) if hdcbka_dict == None: return AfaFlowControl.ExitThisFlow("S999","数据库操作失败") if len(hdcbka_dict) > 0: if hdcbka_dict['ISDEAL'] == PL_ISDEAL_ISDO: #PL_ISDEAL_ISDO 已查复或已处理 return AfaFlowControl.ExitThisFlow("S999","该查询已被查复") AfaLoggerFunc.tradeInfo(">>>开始查询通存通兑原交易信息") wtrbka_dict = {} ret = rccpsDBFunc.getTransWtr(hdcbka_dict['BOJEDT'],hdcbka_dict['BOSPSQ'],wtrbka_dict) if not ret: return False AfaLoggerFunc.tradeInfo(">>>结束查询数据库信息") #=================登记查复书信息============================================ AfaLoggerFunc.tradeInfo(">>>开始登记通存通兑业务查复书信息") # RCVBNKCO=TradeContext.RCVBNKCO # TradeContext.RCVBNKCO = hdcbka_dict['SNDBNKCO'] # TradeContext.RCVBNKNM = hdcbka_dict['SNDBNKNM'] 注释于0724 by pgt TradeContext.NCCWKDAT = TradeContext.NCCworkDate TradeContext.ISDEAL = PL_ISDEAL_ISDO #查复标识为已处理 TradeContext.BOJEDT = TradeContext.ORQYDAT #原交易日期 TradeContext.BOSPSQ = TradeContext.OQTNO #原报单序号 TradeContext.ORTRCCO = hdcbka_dict['TRCCO'] #原交易码 TradeContext.CUR = hdcbka_dict['CUR'] #币种 TradeContext.OCCAMT = str(wtrbka_dict['OCCAMT']) #交易金额 TradeContext.PYRACC = wtrbka_dict['PYRACC'] #付款人账号 TradeContext.PYEACC = wtrbka_dict['PYEACC'] #收款人账号 TradeContext.NOTE1 = hdcbka_dict['NOTE1'] TradeContext.NOTE2 = hdcbka_dict['NOTE2'] TradeContext.NOTE3 = hdcbka_dict['NOTE3'] TradeContext.NOTE4 = hdcbka_dict['NOTE4'] TradeContext.PRT_OROCCAMT = wtrbka_dict['OCCAMT'] hdcbka_insert_dict = {} if not rccpsMap8512CTradeContext2Dhdcbka.map(hdcbka_insert_dict): return AfaFlowControl.ExitThisFlow("S999", "为汇兑业务查询查复登记簿赋值异常") ret = rccpsDBTrcc_hdcbka.insertCmt(hdcbka_insert_dict) if ret <= 0: return AfaFlowControl.ExitThisFlow("S999", "登记汇兑业务查复书信息异常") AfaLoggerFunc.tradeInfo(">>>结束登记汇兑业务查复书信息") #=================为汇兑查询书报文赋值====================================== AfaLoggerFunc.tradeInfo(">>>开始为汇兑查复书报文赋值") TradeContext.TRCCO = '9900512' TradeContext.MSGTYPCO = 'SET008' TradeContext.SNDBRHCO = TradeContext.BESBNO TradeContext.SNDCLKNO = TradeContext.BETELR TradeContext.SNDTRDAT = TradeContext.BJEDTE TradeContext.SNDTRTIM = TradeContext.BJETIM TradeContext.MSGFLGNO = TradeContext.SNDSTLBIN + TradeContext.TRCDAT + TradeContext.SerialNo TradeContext.ORMFN = TradeContext.RCVSTLBIN + hdcbka_dict['TRCDAT'] + hdcbka_dict['TRCNO'] TradeContext.NCCWKDAT = TradeContext.NCCworkDate TradeContext.OPRTYPNO = '99' TradeContext.ROPRTPNO = '99' TradeContext.TRANTYP = '0' TradeContext.TRCDAT = TradeContext.TRCDAT TradeContext.TRCNO = TradeContext.SerialNo TradeContext.ORTRCDAT = wtrbka_dict['TRCDAT'] TradeContext.ORTRCNO = wtrbka_dict['TRCNO'] TradeContext.ORSNDBNK = wtrbka_dict['SNDBNKCO'] TradeContext.ORRCVBNK = wtrbka_dict['RCVBNKCO'] TradeContext.ORTRCCO = hdcbka_dict['TRCCO'] TradeContext.ORCUR = TradeContext.CUR TradeContext.OROCCAMT = str(hdcbka_dict['OCCAMT']) TradeContext.ORQYDAT = hdcbka_dict['TRCDAT'] TradeContext.OQTSBNK = hdcbka_dict['SNDBNKCO'] TradeContext.OQTNO = hdcbka_dict['TRCNO'] AfaLoggerFunc.tradeInfo(">>>结束为汇兑查复书报文赋值") return True
def SubModuleDoFst(): AfaLoggerFunc.tradeInfo( '***农信银系统:往账.中心类操作(1.本地操作).特约电子汇兑查询书发送[TRC003_8518]进入***' ) #=================查询原交易信息============================================ if not TradeContext.existVariable('BOJEDT'): return AfaFlowControl.ExitThisFlow("S999", "原交易日期不能为空") if not TradeContext.existVariable('BOSPSQ'): return AfaFlowControl.ExitThisFlow("S999", "原报单序号不能为空") AfaLoggerFunc.tradeInfo(">>>开始查询原特约电子汇兑业务交易信息") trcbka_dict = {} ret = rccpsDBFunc.getTransTrc(TradeContext.BOJEDT,TradeContext.BOSPSQ,trcbka_dict) if not ret: return False #====刘雨龙 20080701 增加是否来账业务判断==== if trcbka_dict['BRSFLG'] != PL_BRSFLG_RCV: return AfaFlowControl.ExitThisFlow('S999','原交易非来账业务不允许做此业务') #====刘雨龙 20080701 增加是否特约汇兑业务判断==== if trcbka_dict['TRCCO'] != '2000009': return AfaFlowControl.ExitThisFlow('S999','原交易非特约汇兑业务不允许做此交易') AfaLoggerFunc.tradeInfo(">>>开始查询原特约电子汇兑业务交易信息") #=================登记查询书信息============================================ AfaLoggerFunc.tradeInfo(">>>开始登记特约电子汇兑业务查询书信息") TradeContext.RCVBNKCO = trcbka_dict['SNDBNKCO'] TradeContext.RCVBNKNM = trcbka_dict['SNDBNKNM'] TradeContext.NCCWKDAT = TradeContext.NCCworkDate TradeContext.ISDEAL = PL_ISDEAL_UNDO #查复标识为未查复 #=====刘雨龙 20080701 增加汇兑业务查询查复登记簿信息==== TradeContext.RCVSTLBIN= '9999999997' #特约业务接收行特殊 TradeContext.BRSFLG = PL_BRSFLG_SND #往来标志 TradeContext.ORTRCCO = trcbka_dict['TRCCO'] #原交易代码 TradeContext.CUR = trcbka_dict['CUR'] #币种 TradeContext.OCCAMT = trcbka_dict['OCCAMT'] #交易金额 TradeContext.PYRACC = trcbka_dict['PYRACC'] #付款人账号 TradeContext.PYEACC = trcbka_dict['PYEACC'] #收款人账号 TradeContext.PRCCO = trcbka_dict['PRCCO'] #中心返回码 TradeContext.NOTE1 = trcbka_dict['NOTE1'] #备注1 TradeContext.NOTE2 = trcbka_dict['NOTE2'] #备注2 TradeContext.NOTE3 = trcbka_dict['NOTE3'] #备注3 TradeContext.NOTE4 = trcbka_dict['NOTE4'] #备注4 #=====PGT 20080728 打印表格中的字段==== TradeContext.OR_TRCDAT = trcbka_dict['TRCDAT'] TradeContext.OR_SNDBNKCO = trcbka_dict['SNDBNKCO'] TradeContext.OR_OCCAMT = trcbka_dict['OCCAMT'] hdcbka_insert_dict = {} if not rccpsMap8518CTradeContext2Dhdcbka.map(hdcbka_insert_dict): return AfaFlowControl.ExitThisFlow("S999", "为特约电子汇兑业务查询查复登记簿赋值异常") ret = rccpsDBTrcc_hdcbka.insertCmt(hdcbka_insert_dict) if ret <= 0: return AfaFlowControl.ExitThisFlow("S999", "登记特约电子汇兑业务查询书信息异常") AfaLoggerFunc.tradeInfo(">>>结束登记特约电子汇兑业务查询书信息") #=================为特约电子汇兑查询书报文赋值====================================== AfaLoggerFunc.tradeInfo(">>>开始为特约电子汇兑查询书报文赋值") TradeContext.MSGTYPCO = 'SET008' TradeContext.SNDBRHCO = TradeContext.BESBNO TradeContext.SNDCLKNO = TradeContext.BETELR TradeContext.SNDTRDAT = TradeContext.BJEDTE TradeContext.SNDTRTIM = TradeContext.BJETIM TradeContext.MSGFLGNO = TradeContext.SNDSTLBIN + TradeContext.TRCDAT + TradeContext.SerialNo TradeContext.ORMFN = trcbka_dict['SNDMBRCO'] + trcbka_dict['TRCDAT'] + trcbka_dict['TRCNO'] TradeContext.NCCWKDAT = TradeContext.NCCworkDate TradeContext.OPRTYPNO = '99' TradeContext.ROPRTPNO = '20' TradeContext.TRANTYP = '0' TradeContext.TRCDAT = TradeContext.TRCDAT TradeContext.TRCNO = TradeContext.SerialNo TradeContext.ORTRCDAT = trcbka_dict['TRCDAT'] TradeContext.ORTRCNO = trcbka_dict['TRCNO'] TradeContext.ORSNDBNK = trcbka_dict['SNDBNKCO'] TradeContext.ORTRCCO = trcbka_dict['TRCCO'] TradeContext.ORCUR = trcbka_dict['CUR'] TradeContext.OROCCAMT = str(trcbka_dict['OCCAMT']) TradeContext.PYENAM = trcbka_dict['PYENAM'] TradeContext.PYRNAM = trcbka_dict['PYRNAM'] AfaLoggerFunc.tradeInfo(">>>结束为特约电子汇兑查询书报文赋值") return True
def SubModuleDoFst(): #==========判断是否重复报文,如果是重复报文,直接进入下一流程================ AfaLoggerFunc.tradeInfo(">>>开始检查是否重复报文") hdcbka_where_dict = {} hdcbka_where_dict['SNDBNKCO'] = TradeContext.SNDBNKCO hdcbka_where_dict['TRCDAT'] = TradeContext.TRCDAT hdcbka_where_dict['TRCNO'] = TradeContext.TRCNO hdcbka_dict = rccpsDBTrcc_hdcbka.selectu(hdcbka_where_dict) if hdcbka_dict == None: return AfaFlowControl.ExitThisFlow("S999","校验重复报文异常") return True if len(hdcbka_dict) > 0: AfaLoggerFunc.tradeInfo("汇兑查询查复自由格式登记簿中存在相同查询交易,此报文为重复报文,直接进入下一流程,发送表示成功的通讯回执") #======为通讯回执报文赋值=================================================== out_context_dict = {} out_context_dict['sysType'] = 'rccpst' out_context_dict['TRCCO'] = '9900503' out_context_dict['MSGTYPCO'] = 'SET008' out_context_dict['RCVMBRCO'] = TradeContext.SNDMBRCO out_context_dict['SNDMBRCO'] = TradeContext.RCVMBRCO out_context_dict['SNDBRHCO'] = TradeContext.BESBNO out_context_dict['SNDCLKNO'] = TradeContext.BETELR out_context_dict['SNDTRDAT'] = TradeContext.BJEDTE out_context_dict['SNDTRTIM'] = TradeContext.BJETIM out_context_dict['MSGFLGNO'] = out_context_dict['SNDMBRCO'] + TradeContext.BJEDTE + TradeContext.SerialNo out_context_dict['ORMFN'] = TradeContext.MSGFLGNO out_context_dict['NCCWKDAT'] = TradeContext.NCCworkDate out_context_dict['OPRTYPNO'] = '99' out_context_dict['ROPRTPNO'] = TradeContext.OPRTYPNO out_context_dict['TRANTYP'] = '0' out_context_dict['ORTRCCO'] = TradeContext.TRCCO out_context_dict['PRCCO'] = 'RCCI0000' out_context_dict['STRINFO'] = '重复报文' rccpsMap0000Dout_context2CTradeContext.map(out_context_dict) return True AfaLoggerFunc.tradeInfo(">>>结束检查是否重复报文") #关彬捷 20080725 增加查询原交易信息 若未找到原交易信息则返回通讯回执 #=========查询原特约汇兑交易信息=========================================== AfaLoggerFunc.tradeInfo(">>>开始查询原交易信息") tran_dict = {} if not rccpsDBFunc.getTransTrcPK(TradeContext.RCVMBRCO,TradeContext.ORTRCDAT,TradeContext.ORTRCNO,tran_dict): AfaLoggerFunc.tradeInfo("汇兑业务登记簿中不存在此查询书所查询的特约汇兑交易,直接进入下一流程,发送表示成功的通讯回执") #======为通讯回执报文赋值=================================================== out_context_dict = {} out_context_dict['sysType'] = 'rccpst' out_context_dict['TRCCO'] = '9900503' out_context_dict['MSGTYPCO'] = 'SET008' out_context_dict['RCVMBRCO'] = TradeContext.SNDMBRCO out_context_dict['SNDMBRCO'] = TradeContext.RCVMBRCO out_context_dict['SNDBRHCO'] = TradeContext.BESBNO out_context_dict['SNDCLKNO'] = TradeContext.BETELR out_context_dict['SNDTRDAT'] = TradeContext.BJEDTE out_context_dict['SNDTRTIM'] = TradeContext.BJETIM out_context_dict['MSGFLGNO'] = out_context_dict['SNDMBRCO'] + TradeContext.BJEDTE + TradeContext.SerialNo out_context_dict['ORMFN'] = TradeContext.MSGFLGNO out_context_dict['NCCWKDAT'] = TradeContext.NCCworkDate out_context_dict['OPRTYPNO'] = '99' out_context_dict['ROPRTPNO'] = TradeContext.OPRTYPNO out_context_dict['TRANTYP'] = '0' out_context_dict['ORTRCCO'] = TradeContext.TRCCO out_context_dict['PRCCO'] = 'RCCI0000' out_context_dict['STRINFO'] = '不存在此查询书所查询的特约汇兑业务' rccpsMap0000Dout_context2CTradeContext.map(out_context_dict) return True AfaLoggerFunc.tradeInfo(">>>结束查询原交易信息") #==========为汇兑查询查复自由格式登记簿字典赋值================================ AfaLoggerFunc.tradeInfo(">>>开始为汇兑查询查复自由格式登记簿字典赋值") TradeContext.ISDEAL = PL_ISDEAL_UNDO TradeContext.ORTRCCO = tran_dict['TRCCO'] TradeContext.BOJEDT = tran_dict['BJEDTE'] TradeContext.BOSPSQ = tran_dict['BSPSQN'] #=====张恒 20091010 新增 将机构落到原交易机构 ==== TradeContext.BESBNO = tran_dict['BESBNO'] #接收机构号 #关彬捷 20070725 修改币种,金额,发送行名,接收行名 #TradeContext.CUR = tran_dict['CUR'] #TradeContext.OCCAMT = str(tran_dict['OCCAMT']) #TradeContext.PYRACC = tran_dict['PYRACC'] #TradeContext.PYEACC = tran_dict['PYEACC'] #TradeContext.SNDBNKNM = tran_dict['RCVBNKNM'] #TradeContext.RCVBNKNM = tran_dict['SNDBNKNM'] if TradeContext.ORCUR == 'CNY': TradeContext.CUR = '01' #原币种 else: TradeContext.CUR = TradeContext.ORCUR #原币种 TradeContext.OCCAMT = TradeContext.OROCCAMT #原金额 rccpsGetFunc.GetSndBnkCo(TradeContext.SNDBNKCO) rccpsGetFunc.GetRcvBnkCo(TradeContext.RCVBNKCO) hdcbka_insert_dict = {} if not rccpsMap1127CTradeContext2Dhdcbka_dict.map(hdcbka_insert_dict): return AfaFlowControl.ExitThisFlow("S999","为汇兑查询查复自由格式登记簿字典赋值异常") AfaLoggerFunc.tradeInfo(">>>结束为汇兑查询查复自由格式登记簿字典赋值") #==========登记汇兑查询查复自由格式登记簿====================================== AfaLoggerFunc.tradeInfo(">>>开始登记汇兑查询查复自由格式登记簿") ret = rccpsDBTrcc_hdcbka.insertCmt(hdcbka_insert_dict) if ret <= 0: return AfaFlowControl.ExitThisFlow("S999","登记汇兑查询查复自由格式登记簿异常") AfaLoggerFunc.tradeInfo(">>>结束登记汇兑查询查复自由格式登记簿") #======为通讯回执报文赋值=================================================== out_context_dict = {} out_context_dict['sysType'] = 'rccpst' out_context_dict['TRCCO'] = '9900503' out_context_dict['MSGTYPCO'] = 'SET008' out_context_dict['RCVMBRCO'] = TradeContext.SNDMBRCO out_context_dict['SNDMBRCO'] = TradeContext.RCVMBRCO out_context_dict['SNDBRHCO'] = TradeContext.BESBNO out_context_dict['SNDCLKNO'] = TradeContext.BETELR out_context_dict['SNDTRDAT'] = TradeContext.BJEDTE out_context_dict['SNDTRTIM'] = TradeContext.BJETIM out_context_dict['MSGFLGNO'] = out_context_dict['SNDMBRCO'] + TradeContext.BJEDTE + TradeContext.SerialNo out_context_dict['ORMFN'] = TradeContext.MSGFLGNO out_context_dict['NCCWKDAT'] = TradeContext.NCCworkDate out_context_dict['OPRTYPNO'] = '99' out_context_dict['ROPRTPNO'] = TradeContext.OPRTYPNO out_context_dict['TRANTYP'] = '0' out_context_dict['ORTRCCO'] = TradeContext.TRCCO out_context_dict['PRCCO'] = 'RCCI0000' out_context_dict['STRINFO'] = '成功' rccpsMap0000Dout_context2CTradeContext.map(out_context_dict) return True
def SubModuleDoFst(): #=================查询原查复信息============================================ if not TradeContext.existVariable('ORQYDAT'): return AfaFlowControl.ExitThisFlow("S999", "原查询日期不能为空") if not TradeContext.existVariable('OQTNO'): return AfaFlowControl.ExitThisFlow("S999", "原查询号不能为空") #=====刘雨龙 20080701 修改查询函数==== #=====使用错误函数,应该查询 查询查复登记簿 中关于特约汇兑查询的信息==== AfaLoggerFunc.tradeInfo(">>>开始查询原查询书信息") hdcbka = {} hdcbka['BJEDTE'] = TradeContext.ORQYDAT #查询日期 hdcbka['BSPSQN'] = TradeContext.OQTNO #报单序号 hdcbka_dict = rccpsDBTrcc_hdcbka.selectu(hdcbka) if hdcbka_dict == None: return AfaFlowControl.ExitThisFlow('S999','查询数据库出错') if len(hdcbka_dict) <= 0: return AfaFlowControl.ExitThisFlow('S999','数据库中无相应记录') #=====刘雨龙 20080702 增加判断是否已查复==== if hdcbka_dict['ISDEAL'] == PL_ISDEAL_ISDO: return AfaFlowControl.ExitThisFlow('S999','报单序号['+TradeContext.OQTNO+']该笔业务已查复') #=====刘雨龙 20080725 增加判断是否来账==== if hdcbka_dict['BRSFLG'] != PL_BRSFLG_RCV: return AfaFlowControl.ExitThisFlow('S999','报单序号['+TradeContext.OQTNO+']该笔业务不为来账查询书') #=====刘雨龙 20080722 增加判断原交易代码是否为:特约汇兑查询书 9900522==== if hdcbka_dict['TRCCO'] != '9900522': return AfaFlowControl.ExitThisFlow('S999','报单序号['+TradeContext.OQTNO+']该笔业务不为特约汇兑查询书') AfaLoggerFunc.tradeInfo(">>>开始查询原交易信息") trcbka_dict = {} ret = rccpsDBFunc.getTransTrc(hdcbka_dict['BOJEDT'],hdcbka_dict['BOSPSQ'],trcbka_dict) if not ret: return AfaFlowControl.ExitThisFlow('S999','查询原交易信息失败') AfaLoggerFunc.tradeInfo(">>>结束查询数据库信息") #=================登记查复书信息============================================ AfaLoggerFunc.tradeInfo(">>>开始登记特约电子汇兑业务查复书信息") #TradeContext.RCVBNKCO = hdcbka_dict['SNDBNKCO'] #TradeContext.RCVBNKNM = hdcbka_dict['SNDBNKNM'] TradeContext.NCCWKDAT = TradeContext.NCCworkDate TradeContext.ISDEAL = PL_ISDEAL_ISDO #查复标识为已处理 #=====刘雨龙 20080701 增加数据库内容==== TradeContext.CUR = trcbka_dict['CUR'] #币种 TradeContext.ORTRCCO = hdcbka_dict['TRCCO'] #原交易代码 TradeContext.OCCAMT = trcbka_dict['OCCAMT'] #交易金额 TradeContext.PYRACC = trcbka_dict['PYRACC'] #付款人账号 TradeContext.PYEACC = trcbka_dict['PYEACC'] #收款人账号 TradeContext.NOTE1 = hdcbka_dict['NOTE1'] #备注1 TradeContext.NOTE2 = hdcbka_dict['NOTE2'] #备注2 TradeContext.NOTE3 = hdcbka_dict['NOTE3'] #备注3 TradeContext.NOTE4 = hdcbka_dict['NOTE4'] #备注4 TradeContext.BRSFLG = PL_BRSFLG_SND #往来标志 hdcbka_insert_dict = {} if not rccpsMap8519CTradeContext2Dhdcbka.map(hdcbka_insert_dict): return AfaFlowControl.ExitThisFlow("S999", "为特约电子汇兑业务查询查复登记簿赋值异常") #关彬捷 20080728 BJEDTE和BSPSQN在map函数中已赋值 #hdcbka_insert_dict['BJEDTE'] = TradeContext.BJEDTE #hdcbka_insert_dict['BSPSQN'] = TradeContext.BSPSQN #=====潘广通 20080729 生成打印表格中的数据==== TradeContext.OR_SNDBNKCO = trcbka_dict['SNDBNKCO'] TradeContext.OR_TRCDAT = trcbka_dict['TRCDAT'] TradeContext.OR_TRCNO = trcbka_dict['TRCNO'] TradeContext.OR_OCCAMT = trcbka_dict['OCCAMT'] ret = rccpsDBTrcc_hdcbka.insertCmt(hdcbka_insert_dict) if ret <= 0: return AfaFlowControl.ExitThisFlow("S999", "登记特约电子汇兑业务查复书信息异常") AfaLoggerFunc.tradeInfo(">>>结束登记特约电子汇兑业务查复书信息") #=================为特约电子汇兑查复书报文赋值====================================== AfaLoggerFunc.tradeInfo(">>>开始为特约电子汇兑查复书报文赋值") TradeContext.MSGTYPCO = 'SET008' TradeContext.SNDBRHCO = TradeContext.BESBNO TradeContext.SNDCLKNO = TradeContext.BETELR TradeContext.SNDTRDAT = TradeContext.BJEDTE TradeContext.SNDTRTIM = TradeContext.BJETIM #TradeContext.MSGFLGNO = TradeContext.SNDSTLBIN + TradeContext.TRCDAT + TradeContext.SerialNo TradeContext.ORMFN = hdcbka_dict['SNDMBRCO'] + hdcbka_dict['TRCDAT'] + hdcbka_dict['TRCNO'] TradeContext.NCCWKDAT = TradeContext.NCCworkDate TradeContext.OPRTYPNO = '99' TradeContext.ROPRTPNO = '99' TradeContext.TRANTYP = '0' TradeContext.TRCDAT = TradeContext.TRCDAT TradeContext.TRCNO = TradeContext.SerialNo TradeContext.ORTRCDAT = hdcbka_dict['TRCDAT'] TradeContext.ORTRCNO = hdcbka_dict['TRCNO'] TradeContext.ORSNDBNK = hdcbka_dict['SNDBNKCO'] TradeContext.ORRCVBNK = hdcbka_dict['RCVBNKCO'] TradeContext.ORTRCCO = hdcbka_dict['TRCCO'] TradeContext.ORCUR = trcbka_dict['CUR'] TradeContext.OROCCAMT = str(trcbka_dict['OCCAMT']) TradeContext.ORQYDAT = hdcbka_dict['BJEDTE'] TradeContext.OQTSBNK = hdcbka_dict['SNDBNKCO'] #=====刘雨龙 20080701 新增收/付款人名称==== TradeContext.PYENAM = trcbka_dict['PYENAM'] #收款人名称 TradeContext.PYRNAM = trcbka_dict['PYRNAM'] #付款人名称 TradeContext.OROQTNO = hdcbka_dict['TRCNO'] #原特约查询交易流水号 TradeContext.BOJEDT = hdcbka_dict['BJEDTE'] TradeContext.BOSPSQ = hdcbka_dict['BSPSQN'] AfaLoggerFunc.tradeInfo(">>>结束为特约电子汇兑查复书报文赋值") return True
def SubModuleDoFst(): #=====得到来账查询书的参考业务类型==== ROPRTPNO = TradeContext.ROPRTPNO #==========判断是否重复报文,如果是重复报文,直接进入下一流程================ AfaLoggerFunc.tradeInfo(">>>开始检查是否重复报文") hdcbka_where_dict = {} hdcbka_where_dict['SNDBNKCO'] = TradeContext.SNDBNKCO hdcbka_where_dict['TRCDAT'] = TradeContext.TRCDAT hdcbka_where_dict['TRCNO'] = TradeContext.TRCNO #hdcbka_where_dict['TRCNO'] = TradeContext.ORTRCNO hdcbka_dict = rccpsDBTrcc_hdcbka.selectu(hdcbka_where_dict) if hdcbka_dict == None: return AfaFlowControl.ExitThisFlow("S999","校验重复报文异常") return True if len(hdcbka_dict) > 0: AfaLoggerFunc.tradeInfo("汇兑查询查复自由格式登记簿中存在相同查询交易,此报文为重复报文,直接进入下一流程,发送表示成功的通讯回执") #======为通讯回执报文赋值=================================================== out_context_dict = {} out_context_dict['sysType'] = 'rccpst' out_context_dict['TRCCO'] = '9900503' out_context_dict['MSGTYPCO'] = 'SET008' out_context_dict['RCVMBRCO'] = TradeContext.SNDMBRCO out_context_dict['SNDMBRCO'] = TradeContext.RCVMBRCO out_context_dict['SNDBRHCO'] = TradeContext.BESBNO out_context_dict['SNDCLKNO'] = TradeContext.BETELR out_context_dict['SNDTRDAT'] = TradeContext.BJEDTE out_context_dict['SNDTRTIM'] = TradeContext.BJETIM out_context_dict['ORMFN'] = TradeContext.MSGFLGNO out_context_dict['MSGFLGNO'] = out_context_dict['SNDMBRCO'] + TradeContext.BJEDTE + TradeContext.SerialNo out_context_dict['NCCWKDAT'] = TradeContext.NCCworkDate out_context_dict['OPRTYPNO'] = '99' out_context_dict['ROPRTPNO'] = TradeContext.OPRTYPNO out_context_dict['TRANTYP'] = '0' out_context_dict['ORTRCCO'] = TradeContext.TRCCO out_context_dict['PRCCO'] = 'RCCI0000' out_context_dict['STRINFO'] = '重复报文' rccpsMap0000Dout_context2CTradeContext.map(out_context_dict) AfaAfeFunc.CommAfe() return True AfaLoggerFunc.tradeInfo(">>>结束检查是否重复报文") #=====判断交易类型==== if( TradeContext.ROPRTPNO == '20' ): #汇兑 AfaLoggerFunc.tradeInfo("进入汇兑处理") #==========为汇兑查询查复自由格式登记簿字典赋值================================ AfaLoggerFunc.tradeInfo(">>>开始为汇兑查询查复自由格式登记簿字典赋值") tran_dict = {} #if not rccpsDBFunc.getTransTrcPK(TradeContext.ORMFN[:10],TradeContext.ORMFN[10:18],TradeContext.ORMFN[18:26],tran_dict): if not rccpsDBFunc.getTransTrcAK(TradeContext.ORSNDBNK,TradeContext.ORTRCDAT,TradeContext.ORTRCNO,tran_dict): #======为通讯回执报文赋值=================================================== out_context_dict = {} out_context_dict['sysType'] = 'rccpst' out_context_dict['TRCCO'] = '9900503' out_context_dict['MSGTYPCO'] = 'SET008' out_context_dict['RCVMBRCO'] = TradeContext.SNDMBRCO out_context_dict['SNDMBRCO'] = TradeContext.RCVMBRCO out_context_dict['SNDBRHCO'] = TradeContext.BESBNO out_context_dict['SNDCLKNO'] = TradeContext.BETELR out_context_dict['SNDTRDAT'] = TradeContext.BJEDTE out_context_dict['SNDTRTIM'] = TradeContext.BJETIM out_context_dict['ORMFN'] = TradeContext.MSGFLGNO out_context_dict['MSGFLGNO'] = out_context_dict['SNDMBRCO'] + TradeContext.BJEDTE + TradeContext.SerialNo out_context_dict['NCCWKDAT'] = TradeContext.NCCworkDate out_context_dict['OPRTYPNO'] = '99' out_context_dict['ROPRTPNO'] = TradeContext.OPRTYPNO out_context_dict['TRANTYP'] = '0' out_context_dict['ORTRCCO'] = TradeContext.TRCCO out_context_dict['PRCCO'] = 'RCCI0000' out_context_dict['STRINFO'] = '无原汇兑交易' rccpsMap0000Dout_context2CTradeContext.map(out_context_dict) AfaAfeFunc.CommAfe() return AfaFlowControl.ExitThisFlow('S999','无原交易,丢弃此报文') if tran_dict.has_key('BJEDTE'): TradeContext.BOJEDT = tran_dict['BJEDTE'] if tran_dict.has_key('BSPSQN'): TradeContext.BOSPSQ = tran_dict['BSPSQN'] TradeContext.ISDEAL = PL_ISDEAL_UNDO TradeContext.PYRACC = tran_dict['PYRACC'] #付款人账号 TradeContext.PYEACC = tran_dict['PYEACC'] #收款人账号 #=====张恒 20091010 新增 将机构落到原交易机构 ==== TradeContext.BESBNO = tran_dict['BESBNO'] #接收机构号 hdcbka_insert_dict = {} if not rccpsMap1118CTradeContext2Dhdcbka_dict.map(hdcbka_insert_dict): return AfaFlowControl.ExitThisFlow("S999","为汇兑查询查复自由格式登记簿字典赋值异常") AfaLoggerFunc.tradeInfo(">>>结束为汇兑查询查复自由格式登记簿字典赋值") elif( TradeContext.ROPRTPNO == '30' ): #通存通兑 AfaLoggerFunc.tradeInfo("进入通存通兑处理") #==========为汇兑查询查复自由格式登记簿字典赋值================================ AfaLoggerFunc.tradeInfo(">>>开始为汇兑查询查复自由格式登记簿字典赋值") wtrbka_dict = {} if not rccpsDBFunc.getTransWtrAK(TradeContext.ORSNDBNK,TradeContext.ORTRCDAT,TradeContext.ORTRCNO,wtrbka_dict): #======为通讯回执报文赋值=================================================== out_context_dict = {} out_context_dict['sysType'] = 'rccpst' out_context_dict['TRCCO'] = '9900503' out_context_dict['MSGTYPCO'] = 'SET008' out_context_dict['RCVMBRCO'] = TradeContext.SNDMBRCO out_context_dict['SNDMBRCO'] = TradeContext.RCVMBRCO out_context_dict['SNDBRHCO'] = TradeContext.BESBNO out_context_dict['SNDCLKNO'] = TradeContext.BETELR out_context_dict['SNDTRDAT'] = TradeContext.BJEDTE out_context_dict['SNDTRTIM'] = TradeContext.BJETIM out_context_dict['ORMFN'] = TradeContext.MSGFLGNO out_context_dict['MSGFLGNO'] = out_context_dict['SNDMBRCO'] + TradeContext.BJEDTE + TradeContext.SerialNo out_context_dict['NCCWKDAT'] = TradeContext.NCCworkDate out_context_dict['OPRTYPNO'] = '99' out_context_dict['ROPRTPNO'] = TradeContext.OPRTYPNO out_context_dict['TRANTYP'] = '0' out_context_dict['ORTRCCO'] = TradeContext.TRCCO out_context_dict['PRCCO'] = 'RCCI0000' out_context_dict['STRINFO'] = '无原通存通兑交易' rccpsMap0000Dout_context2CTradeContext.map(out_context_dict) AfaAfeFunc.CommAfe() return AfaFlowControl.ExitThisFlow('S999','无原交易,丢弃此报文') if wtrbka_dict.has_key('BJEDTE'): TradeContext.BOJEDT = wtrbka_dict['BJEDTE'] if wtrbka_dict.has_key('BSPSQN'): TradeContext.BOSPSQ = wtrbka_dict['BSPSQN'] TradeContext.ISDEAL = PL_ISDEAL_UNDO TradeContext.PYRACC = wtrbka_dict['PYRACC'] #付款人账号 TradeContext.PYEACC = wtrbka_dict['PYEACC'] #收款人账号 hdcbka_insert_dict = {} if not rccpsMap1118CTradeContext2Dhdcbka_dict.map(hdcbka_insert_dict): return AfaFlowControl.ExitThisFlow("S999","为汇兑查询查复自由格式登记簿字典赋值异常") AfaLoggerFunc.tradeInfo(">>>结束为汇兑查询查复自由格式登记簿字典赋值") else: return AfaFlowControl.ExitThisFlow("S999","没有此交易类型") #==========登记汇兑查询查复自由格式登记簿====================================== AfaLoggerFunc.tradeInfo(">>>开始登记汇兑查询查复自由格式登记簿") hdcbka_insert_dict['BRSFLG'] = PL_BRSFLG_RCV #来账 if TradeContext.ORCUR == 'CNY': hdcbka_insert_dict['CUR'] = '01' #原币种 else: hdcbka_insert_dict['CUR'] = TradeContext.ORCUR #原币种 hdcbka_insert_dict['OCCAMT'] = TradeContext.OROCCAMT #原金额 ret = rccpsDBTrcc_hdcbka.insertCmt(hdcbka_insert_dict) if ret <= 0: return AfaFlowControl.ExitThisFlow("S999","登记汇兑查询查复自由格式登记簿异常") AfaLoggerFunc.tradeInfo(">>>结束登记汇兑查询查复自由格式登记簿") #======为通讯回执报文赋值===================================================回执前置里只要三个字段.1.2.末 out_context_dict = {} out_context_dict['sysType'] = 'rccpst' out_context_dict['TRCCO'] = '9900503' out_context_dict['MSGTYPCO'] = 'SET008' out_context_dict['RCVMBRCO'] = TradeContext.SNDMBRCO out_context_dict['SNDMBRCO'] = TradeContext.RCVMBRCO out_context_dict['SNDBRHCO'] = TradeContext.BESBNO out_context_dict['SNDCLKNO'] = TradeContext.BETELR out_context_dict['SNDTRDAT'] = TradeContext.BJEDTE out_context_dict['SNDTRTIM'] = TradeContext.BJETIM out_context_dict['MSGFLGNO'] = out_context_dict['SNDMBRCO'] + TradeContext.BJEDTE + TradeContext.SerialNo out_context_dict['ORMFN'] = TradeContext.MSGFLGNO out_context_dict['NCCWKDAT'] = TradeContext.NCCworkDate out_context_dict['OPRTYPNO'] = '99' out_context_dict['ROPRTPNO'] = TradeContext.OPRTYPNO out_context_dict['TRANTYP'] = '0' out_context_dict['ORTRCCO'] = TradeContext.TRCCO out_context_dict['PRCCO'] = 'RCCI0000' out_context_dict['STRINFO'] = '成功' rccpsMap0000Dout_context2CTradeContext.map(out_context_dict) return True
def SubModuleDoFst(): AfaLoggerFunc.tradeInfo("'***农信银系统:通存通兑往账交易.通存通兑查询书发送[8582] 进入") AfaLoggerFunc.tradeInfo("交易前处理(本地操作,中心前处理)") #=====查询原交易信息==== AfaLoggerFunc.tradeInfo("查询原交易信息") if not TradeContext.existVariable('BOSPSQ'): return AfaFlowControl.ExitThisFlow('A099','没有原报单序号') if not TradeContext.existVariable('BOJEDT'): return AfaFlowControl.ExitThisFlow("A099", "没有原报单日期") #=====开始查询通存通兑业务登记簿==== AfaLoggerFunc.tradeInfo("开始查询通存通兑业务登记簿") wtrbka_record = {} res = rccpsDBFunc.getTransWtr(TradeContext.BOJEDT,TradeContext.BOSPSQ,wtrbka_record) if( res == False ): return AfaFlowControl.ExitThisFlow('A099','查询原交易信息失败') #=====登记查询查复自由格式登记簿==== AfaLoggerFunc.tradeInfo("登记查询查复登自由格式记簿") TradeContext.BRSFLG = PL_BRSFLG_SND TradeContext.NCCWKDAT = TradeContext.NCCworkDate TradeContext.TRCCO = '9900511' # TradeContext.TRCDAT = '' TradeContext.TRCNO = TradeContext.SerialNo # TradeContext.SNDBNKCO = # TradeContext.SNDBNKNM = # TradeContext.RCVBNKCO = # TradeContext.RCVBNKNM = # TradeContext.BOJEDT = # TradeContext.BOSPSQ = TradeContext.ORTRCCO = wtrbka_record['TRCCO'] TradeContext.CUR = wtrbka_record['CUR'] TradeContext.OCCAMT = str(wtrbka_record['OCCAMT']) # TradeContext.CONT = TradeContext.PYRACC = wtrbka_record['PYRACC'] TradeContext.PYEACC = wtrbka_record['PYEACC'] TradeContext.ISDEAL = PL_ISDEAL_UNDO # TradeContext.PRCCO = #=====给插入字典赋值==== AfaLoggerFunc.tradeInfo("给插入字典赋值") hdcbka_insert_dict = {} if not rccpsMap8583CTradeContext2Dhdcbka_dict.map(hdcbka_insert_dict): return AfaFlowControl.ExitThisFlow('A099','给插入字典赋值失败') #=====登记数据库==== AfaLoggerFunc.tradeInfo("登记数据库") res = rccpsDBTrcc_hdcbka.insertCmt(hdcbka_insert_dict) if( res == -1 ): return AfaFlowControl.ExitThisFlow('A099','给插入字典赋值失败') #=====开始给查询书报文赋值==== AfaLoggerFunc.tradeInfo("开始给查询书报文赋值") #====报文头==== TradeContext.MSGTYPCO = 'SET008' TradeContext.RCVMBRCO = TradeContext.RCVSTLBIN TradeContext.SNDMBRCO = TradeContext.SNDSTLBIN TradeContext.SNDBRHCO = TradeContext.BESBNO TradeContext.SNDCLKNO = TradeContext.BETELR TradeContext.SNDTRDAT = TradeContext.BJEDTE TradeContext.SNDTRTIM = TradeContext.BJETIM TradeContext.MSGFLGNO = TradeContext.SNDSTLBIN + TradeContext.TRCDAT + TradeContext.SerialNo TradeContext.ORMFN = wtrbka_record['SNDMBRCO'] + wtrbka_record['TRCDAT'] + wtrbka_record['TRCNO'] TradeContext.NCCWKDAT = TradeContext.NCCworkDate TradeContext.OPRTYPNO = "99" TradeContext.ROPRTPNO = "30" TradeContext.TRANTYP = "0" #=====业务要素集==== TradeContext.TRCCO = "9900511" # TradeContext.SNDBNKCO = "" # TradeContext.SNDBNKNM = "" # TradeContext.RCVBNKCO = "" # TradeContext.RCVBNKNM = "" # TradeContext.TRCDAT = "" # TradeContext.TRCNO = "" TradeContext.ORTRCCO = wtrbka_record['TRCCO'] TradeContext.ORTRCDAT = wtrbka_record['TRCDAT'] TradeContext.ORTRCNO = wtrbka_record['TRCNO'] TradeContext.ORSNDBNK = wtrbka_record['SNDBNKCO'] TradeContext.ORRCVBNK = wtrbka_record['RCVBNKCO'] if( wtrbka_record['CUR'] == '01' ): TradeContext.ORCUR = 'CNY' else: TradeContext.ORCUR = wtrbka_record['CUR'] TradeContext.OROCCAMT = str(wtrbka_record['OCCAMT']) # TradeContext.CONT = "" AfaLoggerFunc.tradeInfo("交易前处理(本地操作,中心前处理) 退出") return True
def SubModuleDoFst(): #=================查询原交易信息============================================ if not TradeContext.existVariable('BOJEDT'): return AfaFlowControl.ExitThisFlow("S999", "原交易日期不能为空") if not TradeContext.existVariable('BOSPSQ'): return AfaFlowControl.ExitThisFlow("S999", "原报单序号不能为空") AfaLoggerFunc.tradeInfo(">>>开始查询原汇兑业务交易信息") trcbka_dict = {} ret = rccpsDBFunc.getTransTrc(TradeContext.BOJEDT,TradeContext.BOSPSQ,trcbka_dict) if not ret: return False AfaLoggerFunc.tradeInfo(">>>开始查询原汇兑业务交易信息") #=================登记查询书信息============================================ AfaLoggerFunc.tradeInfo(">>>开始登记汇兑业务查询书信息") #TradeContext.RCVBNKCO = trcbka_dict['RCVBNKCO'] #TradeContext.RCVBNKNM = trcbka_dict['RCVBNKNM'] TradeContext.NCCWKDAT = TradeContext.NCCworkDate TradeContext.ISDEAL = PL_ISDEAL_UNDO #查复标识为未查复 #=====刘雨龙 20080701 新增汇兑业务查询查复登记簿信息==== TradeContext.TRCNO = TradeContext.SerialNo #交易流水号 TradeContext.ORTRCCO = trcbka_dict['TRCCO'] #原交易代码 TradeContext.CUR = trcbka_dict['CUR'] #原币种 TradeContext.OCCAMT = str(trcbka_dict['OCCAMT']) #原交易金额 TradeContext.PYRACC = trcbka_dict['PYRACC'] #原付款人账号 TradeContext.PYEACC = trcbka_dict['PYEACC'] #原收款人账号 #TradeContext.PRCCO = trcbka_dict['PRCCO'] #中心返回代码 关彬捷 删除 20080728 TradeContext.NOTE1 = trcbka_dict['NOTE1'] #备注1 TradeContext.NOTE2 = trcbka_dict['NOTE2'] #备注2 TradeContext.NOTE3 = trcbka_dict['NOTE3'] #备注3 TradeContext.NOTE4 = trcbka_dict['NOTE4'] #备注4 TradeContext.PRT_OROCCAMT = trcbka_dict['OCCAMT'] hdcbka_insert_dict = {} if not rccpsMap8511CTradeContext2Dhdcbka.map(hdcbka_insert_dict): return AfaFlowControl.ExitThisFlow("S999", "为汇兑业务查询查复登记簿赋值异常") ret = rccpsDBTrcc_hdcbka.insertCmt(hdcbka_insert_dict) if ret <= 0: return AfaFlowControl.ExitThisFlow("S999", "登记汇兑业务查询书信息异常") AfaLoggerFunc.tradeInfo(">>>结束登记汇兑业务查询书信息") #=====赋值给打印表单中的变量==== TradeContext.OROCCAMT=str(trcbka_dict['OCCAMT']) TradeContext.ORSNDBNKCO=trcbka_dict['SNDBNKCO'] TradeContext.ORRCVBNKCO=trcbka_dict['RCVBNKCO'] #=================为汇兑查询书报文赋值===================================== AfaLoggerFunc.tradeInfo(">>>开始为汇兑查询书报文赋值") TradeContext.TRCCO = '9900511' TradeContext.MSGTYPCO = 'SET008' TradeContext.SNDBRHCO = TradeContext.BESBNO TradeContext.SNDCLKNO = TradeContext.BETELR TradeContext.SNDTRDAT = TradeContext.BJEDTE TradeContext.SNDTRTIM = TradeContext.BJETIM TradeContext.MSGFLGNO = TradeContext.SNDSTLBIN + TradeContext.TRCDAT + TradeContext.SerialNo TradeContext.ORMFN = trcbka_dict['SNDMBRCO'] + trcbka_dict['TRCDAT'] + trcbka_dict['TRCNO'] TradeContext.NCCWKDAT = TradeContext.NCCworkDate TradeContext.OPRTYPNO = '99' TradeContext.ROPRTPNO = '20' TradeContext.TRANTYP = '0' TradeContext.TRCDAT = TradeContext.TRCDAT TradeContext.TRCNO = TradeContext.SerialNo TradeContext.ORTRCDAT = trcbka_dict['TRCDAT'] TradeContext.ORTRCNO = trcbka_dict['TRCNO'] TradeContext.ORSNDBNK = trcbka_dict['SNDBNKCO'] TradeContext.ORRCVBNK = trcbka_dict['RCVBNKCO'] TradeContext.ORCUR = trcbka_dict['CUR'] TradeContext.OROCCAMT = str(trcbka_dict['OCCAMT']) AfaLoggerFunc.tradeInfo(">>>结束为汇兑查询书报文赋值") return True