本文整理汇总了Python中AfaFlowControl.flowException方法的典型用法代码示例。如果您正苦于以下问题:Python AfaFlowControl.flowException方法的具体用法?Python AfaFlowControl.flowException怎么用?Python AfaFlowControl.flowException使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AfaFlowControl
的用法示例。
在下文中一共展示了AfaFlowControl.flowException方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: import AfaFlowControl [as 别名]
# 或者: from AfaFlowControl import flowException [as 别名]
def main( ):
AfaLoggerFunc.tradeInfo('******统缴业务行内查询模板[' + TradeContext.TemplateCode + ']进入******')
try:
#=====================初始化返回报文变量================================
TradeContext.tradeResponse=[]
#获取当前系统时间
TradeContext.workDate=AfaUtilTools.GetSysDate( )
TradeContext.workTime=AfaUtilTools.GetSysTime( )
#=====================判断应用系统状态==================================
if not AfaFunc.ChkSysStatus( ) :
raise AfaFlowControl.flowException( )
#20120711注释 修改
#begin
#=====================判断单位状态======================================
if not AfaTjFunc.ChkUnitInfo( ):
raise AfaFlowControl.flowException( )
#end
#=====================外调接口(前处理)==================================
subModuleExistFlag = 0
subModuleName = 'T'+TradeContext.TemplateCode+'_'+TradeContext.TransCode
try:
subModuleHandle=__import__( subModuleName )
except Exception, e:
AfaLoggerFunc.tradeInfo( e)
else:
示例2: ChkUnitLimit
# 需要导入模块: import AfaFlowControl [as 别名]
# 或者: from AfaFlowControl import flowException [as 别名]
def ChkUnitLimit( ):
try:
AfaLoggerFunc.tradeInfo('>>>判断该单位是否有批量签约的权限')
sql = ""
sql = "SELECT FLAG FROM ABDT_QYFLAG WHERE "
sql = sql + " SYSID = '" + TradeContext.sysId + "'"
sql = sql + " AND STATUS = '1'"
records = AfaDBFunc.SelectSql( sql )
AfaLoggerFunc.tradeInfo('查询数据库 sql: ' +sql)
if(records==None):
TradeContext.errorCode,TradeContext.errorMsg = "9999" , "查询ABDT_QYFLAG数据库异常!"
raise AfaFlowControl.flowException( )
elif(len(records)==0):
TradeContext.errorCode,TradeContext.errorMsg = "9999" , "无该单位签约权限信息!"
raise AfaFlowControl.flowException( )
else:
if (records[0][0]=='0'):
TradeContext.errorCode,TradeContext.errorMsg = "9999" , "该单位无签约权限!"
raise AfaFlowControl.flowException( )
if (records[0][0]=='1'):
AfaLoggerFunc.tradeInfo('>>>该单位有签约权限')
return True
return True
except AfaFlowControl.flowException, e:
AfaFlowControl.exitMainFlow( str(e) )
示例3: ChkParam
# 需要导入模块: import AfaFlowControl [as 别名]
# 或者: from AfaFlowControl import flowException [as 别名]
def ChkParam(ChkCode='11111111'):
if ChkCode[0]=='1':
#===============判断应用系统状态======================
if not AfaFunc.ChkSysStatus( ) :
raise AfaFlowControl.flowException( )
if ChkCode[1]=='1':
#===============判断商户状态======================
if not AfaFunc.ChkUnitStatus( ) :
raise AfaFlowControl.flowException( )
if ChkCode[2]=='1':
#=============判断交易状态=====================
if not AfaFunc.ChkTradeStatus( ) :
raise AfaFlowControl.flowException( )
if ChkCode[3]=='1':
#=============判断渠道状态====================
if not AfaFunc.ChkChannelStatus( ) :
raise AfaFlowControl.flowException( )
if ChkCode[4]=='1':
#=============判断缴费介质状态====================
if not AfaFunc.ChkActStatus( ) :
raise AfaFlowControl.flowException( )
return True
示例4: TrxMain
# 需要导入模块: import AfaFlowControl [as 别名]
# 或者: from AfaFlowControl import flowException [as 别名]
def TrxMain( ):
AfaLoggerFunc.tradeInfo('---------新农保柜面业务进入------------')
#业务编号
if ( not (TradeContext.existVariable( "Appno" ) and len(TradeContext.Appno.strip()) > 0) ):
TradeContext.errorCode,TradeContext.errorMsg = 'NB001', "不存在业务编号"
raise AfaFlowControl.flowException( )
#单位编号
if ( not (TradeContext.existVariable( "Busino" ) and len(TradeContext.Busino.strip()) > 0) ):
TradeContext.errorCode,TradeContext.errorMsg = 'NB001', "不存在单位编号"
raise AfaFlowControl.flowException( )
#上传文件名
if ( not (TradeContext.existVariable( "FileName" ) and len(TradeContext.FileName.strip()) > 0) ):
TradeContext.errorCode,TradeContext.errorMsg = 'NB001', "不存在上传文件名"
raise AfaFlowControl.flowException( )
#申请日期
if ( not (TradeContext.existVariable( "ApplyDate" ) and len(TradeContext.ApplyDate.strip()) > 0) ):
TradeContext.errorCode,TradeContext.errorMsg = 'NB001', "不存在申请日期"
raise AfaFlowControl.flowException( )
sql = ""
sql = sql + "select BATCHNO,FILENAME,SWAPFILENAME,WORKDATE,STATUS,"
sql = sql + "PROCMSG,APPLYDATE,APPNO,BUSINO,TOTALNUM,TOTALAMT,FILETYPE,"
sql = sql + "BRNO,TELLERNO,BEGINDATE,ENDDATE,WORKTIME,NOTE1,NOTE2,NOTE3,NOTE4"
sql = sql + " from ahnx_file where"
sql = sql + " FileName = '"+ TradeContext.FileName +"'" #上传文件名
sql = sql + " and ApplyDate = '"+ TradeContext.ApplyDate +"'" #申请日期
sql = sql + " and status <>" + "'2'" #文件状态
sql = sql + " and Appno = '"+ TradeContext.Appno +"'" #业务编号
sql = sql + " and Busino = '"+ TradeContext.Busino +"'" #单位编号
AfaLoggerFunc.tradeInfo("批量处理信息查询sql="+sql)
records = AfaDBFunc.SelectSql( sql )
if(records == None):
AfaLoggerFunc.tradeInfo("批量处理信息查询数据库异常")
return ExitSubTrade('NB000', '批量处理信息查询数据库异常')
elif(len(records)==0):
AfaLoggerFunc.tradeInfo("没有查询到相关的批量处理信息")
return ExitSubTrade('NB002', '没有查询到相关的批量处理信息')
elif(len(records)>1):
AfaLoggerFunc.tradeInfo("该批量处理信息不唯一")
return ExitSubTrade('NB003', '该批量处理信息不唯一')
else:
TradeContext.SwapFileName = records[0][2].strip()
TradeContext.ProcMsg = records[0][5].strip()
TradeContext.FileType = records[0][11].strip()
TradeContext.batchNo = records[0][0].strip()
TradeContext.errorCode = "0000"
TradeContext.errorMsg = "交易成功"
AfaLoggerFunc.tradeInfo('---------新农保柜面业务退出------------')
return ExitSubTrade('0000', '交易成功')
示例5: ChkSysInfo
# 需要导入模块: import AfaFlowControl [as 别名]
# 或者: from AfaFlowControl import flowException [as 别名]
def ChkSysInfo( ):
AfaLoggerFunc.tradeInfo( '=====判断业务编号开始=====' )
#判断业务编号 AG2016
if not( TradeContext.existVariable( "sysId" ) and len(TradeContext.sysId.strip()) > 0):
TradeContext.errorCode,TradeContext.errorMsg = 'E9999', "业务编号不存在"
raise AfaFlowControl.flowException( )
if not(TradeContext.sysId == 'AG2016') :
TradeContext.errorCode,TradeContext.errorMsg = 'E9999', "非此业务编号,不能做此业务!"
raise AfaFlowControl.flowException( )
示例6: SubModuleDoFst
# 需要导入模块: import AfaFlowControl [as 别名]
# 或者: from AfaFlowControl import flowException [as 别名]
def SubModuleDoFst( ):
AfaLoggerFunc.tradeInfo( '反交易数据预查询,查询是否有此缴费记录' )
try:
sql = "select workdate,worktime,userno,tellerno,brno,unitno,amount,trxcode from afa_maintransdtl"
sql = sql + " where agentserialno = '"+TradeContext.preAgentSerno+"' and workdate = '"+TradeContext.workDate+"' and trxcode='8495'"
sql = sql + " and revtranf = '0' and bankstatus = '0'and chkflag = '9'"
#20120718陈浩添加
sql = sql + " and sysid = '" + TradeContext.sysId.strip() + "' "
sql = sql + " and note2 = '" + TradeContext.busino.strip() + "' "
AfaLoggerFunc.tradeInfo('反交易查询语句:'+ sql)
records = AfaDBFunc.SelectSql( sql )
AfaLoggerFunc.tradeInfo('反交易查询的结果:'+ str(records))
if records == None:
TradeContext.errorCode,TradeContext.errorMsg = "0001","反交易查询数据失败"
raise AfaFlowControl.flowException( )
elif(len(records) < 1):
TradeContext.errorCode,TradeContext.errorMsg = "0001","无此交易"
return False
else:
if(records[0][3] != TradeContext.tellerno):
TradeContext.errorCode,TradeContext.errorMsg = "0001","原交易非本柜员所做,不能做此交易"
return False
if(records[0][4] != TradeContext.brno):
TradeContext.errorCode,TradeContext.errorMsg = "0001","原交易非本网点所做,不能做此交易"
return False
if(records[0][5] != TradeContext.unitno):
TradeContext.errorCode,TradeContext.errorMsg = "0001","与原交易公司不符,不能做此交易"
return False
if(records[0][6].strip() != TradeContext.amount.strip()):
TradeContext.errorCode,TradeContext.errorMsg = "0001","与原交易金额不符,不能做此交易"
return False
TradeContext.PreWorkDate = records[0][0] #原交易日期
TradeContext.PreWorktime = records[0][1] #原交易时间
TradeContext.PreTrxCode = records[0][7] #原交易码
TradeContext.amount = records[0][6] #金额
TradeContext.preAgentSerno = TradeContext.preAgentSerno #原交易流水号
return True
except Exception, e:
AfaLoggerFunc.tradeInfo( str(e) )
AfaFlowControl.flowException( )
示例7: SubModuleDoFst
# 需要导入模块: import AfaFlowControl [as 别名]
# 或者: from AfaFlowControl import flowException [as 别名]
def SubModuleDoFst( ):
AfaLoggerFunc.tradeInfo( '反交易数据预查询,查询是否有此缴费记录' )
try:
sql = "select workdate,userno,tellerno,brno,amount from afa_maintransdtl"
sql = sql + " where agentserialno = '"+TradeContext.preAgentSerno+"' and workdate = '"+TradeContext.workDate+"' and trxcode='8627'"
sql = sql + " and revtranf = '0' and bankstatus = '0'and chkflag = '9'"
AfaLoggerFunc.tradeInfo('反交易查询语句:'+ sql)
records = AfaDBFunc.SelectSql( sql )
AfaLoggerFunc.tradeInfo('反交易查询的结果:'+ str(records))
if records == None:
TradeContext.errorCode,TradeContext.errorMsg = "0001","反交易查询数据失败"
raise AfaFlowControl.flowException( )
elif(len(records) < 1):
TradeContext.errorCode,TradeContext.errorMsg = "0001","无此交易"
return False
else:
if(records[0][1] != TradeContext.punishNo):
TradeContext.errorCode,TradeContext.errorMsg = "0001","与原交易的处罚交款书编号不一致,不能做此交易"
return False
if(records[0][2] != TradeContext.tellerno):
TradeContext.errorCode,TradeContext.errorMsg = "0001","原交易非本柜员所做,不能做此交易"
return False
if(records[0][3] != TradeContext.brno):
TradeContext.errorCode,TradeContext.errorMsg = "0001","原交易非本网点所做,不能做此交易"
return False
if(records[0][4].strip() != TradeContext.amount.strip()):
TradeContext.errorCode,TradeContext.errorMsg = "0001","与原交易金额不符,不能做此交易"
return False
TradeContext.orgDate = records[0][0] #原交易日期
TradeContext.punishNo = records[0][1] #处罚交款书编号
TradeContext.userno = records[0][1] #初始化userno的值,取消变量检查时需要
TradeContext.amount = records[0][4] #金额
TradeContext.preAgentSerno = TradeContext.preAgentSerno #原交易流水号
TradeContext.note2 = TradeContext.busino #签约单位编号
return True
except Exception, e:
AfaLoggerFunc.tradeInfo( str(e) )
AfaFlowControl.flowException( )
示例8: SubModuleDoFst
# 需要导入模块: import AfaFlowControl [as 别名]
# 或者: from AfaFlowControl import flowException [as 别名]
def SubModuleDoFst( ):
AfaLoggerFunc.tradeInfo( '初始化续期查询交易变量' )
#交易代码(8612)
TradeContext.tradeCode = TradeContext.TransCode
#保险公司代码
if not( TradeContext.existVariable( "unitno" ) and len(TradeContext.unitno.strip()) > 0):
TradeContext.errorCode,TradeContext.errorMsg = 'E9999', "不存在保险公司代码"
raise AfaFlowControl.flowException( )
#保险单号
if not( TradeContext.existVariable( "policy" ) and len(TradeContext.policy.strip()) > 0):
TradeContext.errorCode,TradeContext.errorMsg = 'E9999', "不存在保险单号"
raise AfaFlowControl.flowException( )
return True
示例9: main
# 需要导入模块: import AfaFlowControl [as 别名]
# 或者: from AfaFlowControl import flowException [as 别名]
def main( ):
AfaLoggerFunc.tradeInfo('***农信银系统: 往账.本地类操作模板['+TradeContext.TemplateCode+'_'+TradeContext.TransCode+']进入***')
try:
#=====================初始化返回报文变量================================
TradeContext.tradeResponse=[]
#=====================获取系统日期时间==================================
#TradeContext.BJEDTE=AfaUtilTools.GetHostDate( )
TradeContext.BJETIM=AfaUtilTools.GetSysTime( )
#TradeContext.BESBNO = '3400008889'
#=====================系统公共校验======================================
if not rccpsFunc.ChkPubInfo(PL_BRSFLG_SND) :
raise AfaFlowControl.flowException( )
#=====================系统状态校验======================================
if not rccpsFunc.ChkSysInfo( 'AFA' ) :
raise AfaFlowControl.flowException( )
#=====================机构合法性校验====================================
#if not rccpsFunc.ChkUnitInfo( ) :
# raise AfaFlowControl.flowException( )
#=====================动态加载交易脚本==================================
trxModuleName = 'T'+TradeContext.TemplateCode+'_'+TradeContext.TransCode
try:
trxModuleHandle=__import__( trxModuleName )
except Exception, e:
AfaLoggerFunc.tradeInfo(e)
raise AfaFlowControl.flowException( 'A0001', '加载交易脚本失败或交易脚本不存在,执行交易失败' )
#=====================个性化处理(本地操作)==============================
AfaLoggerFunc.tradeInfo( 'TransCode:' + TradeContext.TransCode )
if not trxModuleHandle.SubModuleDoFst( ) :
raise AfaFlowControl.flowException( )
#=====================自动打包==========================================
AfaFunc.autoPackData()
#=====================退出模板==========================================
AfaLoggerFunc.tradeInfo('***农信银系统: 往账.本地类操作模板['+TradeContext.TemplateCode+'_'+TradeContext.TransCode+']退出***')
示例10: main
# 需要导入模块: import AfaFlowControl [as 别名]
# 或者: from AfaFlowControl import flowException [as 别名]
def main( ):
AfaLoggerFunc.tradeInfo('******代收代付.通用轧帐模板[' + TradeContext.TemplateCode + ']进入******' )
try:
#=====================初始化返回报文变量================================
TradeContext.tradeResponse=[]
#=====================获取当前系统时间==================================
TradeContext.workDate=AfaUtilTools.GetSysDate( )
TradeContext.workTime=AfaUtilTools.GetSysTime( )
#=====================判断应用系统状态==================================
#if not AfaFunc.ChkSysStatus( ) :
# raise AfaFlowControl.flowException( )
#=====================校验公共节点的有效性==============================
if( not TradeContext.existVariable( "statType" ) ):
raise AfaFlowControl.flowException( 'A0001', '轧帐类型[statType]值不存在,不能进行轧帐' )
if( not TradeContext.existVariable( "TransType" ) ):
raise AfaFlowControl.flowException( 'A0001', '传输类型[TransType]值不存在,不能进行轧帐' )
AfaLoggerFunc.tradeInfo( '>>>statType = ' + TradeContext.statType )
AfaLoggerFunc.tradeInfo( '>>>TransType = ' + TradeContext.TransType)
#=====================轧帐操作==========================================
if not StatAccountInfo( TradeContext.statType ) :
raise AfaFlowControl.flowException( )
#=====================自动打包==========================================
TradeContext.tradeResponse.append( ['errorCode', '0000'] )
TradeContext.tradeResponse.append( ['errorMsg', '交易成功'] )
AfaFunc.autoPackData()
#=====================退出模板==========================================
AfaLoggerFunc.tradeInfo( '******代收代付.通用轧帐模板[' + TradeContext.TemplateCode + ']退出******' )
except AfaFlowControl.flowException, e:
AfaFlowControl.exitMainFlow( str(e) )
示例11: main
# 需要导入模块: import AfaFlowControl [as 别名]
# 或者: from AfaFlowControl import flowException [as 别名]
def main( ):
AfaLoggerFunc.tradeInfo('********安徽省新农保.批量模板['+TradeContext.TemplateCode+']进入********')
try:
#=====================初始化返回报文变量================================
TradeContext.tradeResponse=[]
#=====================获取系统日期时间==================================
TradeContext.WorkDate=AfaUtilTools.GetSysDate( )
TradeContext.WorkTime=AfaUtilTools.GetSysTime( )
#=====================判断应用系统状态==================================
if not AfaFunc.ChkSysStatus( ) :
raise AfaFlowControl.flowException( )
#=====================动态加载交易脚本==================================
trxModuleName = 'T'+TradeContext.TemplateCode+'_'+TradeContext.TransCode
try:
trxModuleHandle=__import__( trxModuleName )
except Exception, e:
AfaLoggerFunc.tradeInfo(e)
raise AfaFlowControl.flowException( 'A0001', '加载交易脚本失败或交易脚本不存在' )
#=====================安徽新农保业务个性化操作==========================
if not trxModuleHandle.TrxMain( ) :
raise AfaFlowControl.flowException( TradeContext.errorCode,TradeContext.errorMsg)
#=====================自动打包==========================================
AfaFunc.autoPackData()
#=====================退出模板==========================================
AfaLoggerFunc.tradeInfo('********安徽省新农保.批量模板['+TradeContext.TemplateCode+']退出********')
示例12: SubModuleDoFst
# 需要导入模块: import AfaFlowControl [as 别名]
# 或者: from AfaFlowControl import flowException [as 别名]
def SubModuleDoFst( ):
AfaLoggerFunc.tradeInfo( '初始化处罚决定书查询交易变量' )
#交易代码(8625)
TradeContext.tradeCode = TradeContext.TransCode
#处罚决定书编号
if not( TradeContext.existVariable( "punishNo" ) and len(TradeContext.punishNo.strip()) > 0):
TradeContext.errorCode,TradeContext.errorMsg = 'E9999', "处罚决定书编号不存在"
raise AfaFlowControl.flowException( )
return True
示例13: SubModuleDoSnd
# 需要导入模块: import AfaFlowControl [as 别名]
# 或者: from AfaFlowControl import flowException [as 别名]
def SubModuleDoSnd():
AfaLoggerFunc.tradeInfo('进入查询交易[T'+TradeContext.TemplateCode+'_'+TradeContext.TransCode+']与第三方通讯后处理' )
try:
names = Party3Context.getNames( )
for name in names:
value = getattr( Party3Context, name )
if ( not name.startswith( '__' ) and type(value) is StringType) :
setattr( TradeContext, name, value )
#AfaLoggerFunc.tradeInfo("name:" + str(name) + " value:" + str(value))
if( TradeContext.errorCode == '0000' ):
if not AfaYbtdb.AdbSelectQueDtl( ): #根据投保单号和日期查询YBT_INFO表,有记录更新,无记录插入
raise AfaFlowControl.flowException()
AfaLoggerFunc.tradeInfo('退出查询交易与第三方通讯后处理' )
return True
except AfaFlowControl.flowException, e:
AfaFlowControl.exitMainFlow( str(e) )
示例14: CrtBatchNo
# 需要导入模块: import AfaFlowControl [as 别名]
# 或者: from AfaFlowControl import flowException [as 别名]
def CrtBatchNo( ):
AfaLoggerFunc.tradeInfo('>>>生成批次委托号')
try:
sqlStr = "SELECT NEXTVAL FOR ABDT_ONLINE_SEQ FROM SYSIBM.SYSDUMMY1"
records = AfaDBFunc.SelectSql( sqlStr )
if records == None :
TradeContext.errorCode, TradeContext.errorMsg='E8623', "生成委托号异常"
raise AfaFlowControl.flowException( )
#批次号
TradeContext.BATCHNO = TradeContext.TranDate + str(records[0][0]).rjust(8, '0')
return True
except Exception, e:
AfaFlowControl.exitMainFlow( str(e) )
示例15: main
# 需要导入模块: import AfaFlowControl [as 别名]
# 或者: from AfaFlowControl import flowException [as 别名]
def main( ):
AfaLoggerFunc.tradeInfo('********abs.通用模板进入********')
try:
#=====================初始化返回报文变量================================
TradeContext.tradeResponse=[]
#=====================获取系统日期时间==================================
TradeContext.TranDate=AfaUtilTools.GetSysDate( )
TradeContext.TranTime=AfaUtilTools.GetSysTime( )
#=====================动态加载交易脚本==================================
trxModuleName = 'T'+TradeContext.TemplateCode+'_'+TradeContext.TransCode
try:
trxModuleHandle=__import__( trxModuleName )
except Exception, e:
AfaLoggerFunc.tradeInfo(e)
raise AfaFlowControl.flowException( 'A0001', '加载交易脚本失败或交易脚本不存在' )
#=====================批量业务个性化操作================================
if not trxModuleHandle.TrxMain( ) :
raise AfaFlowControl.accException( )
#=====================自动打包==========================================
AfaFunc.autoPackData()
#=====================退出模板==========================================
AfaLoggerFunc.tradeInfo('********批量业务.通用模板['+TradeContext.TemplateCode+']退出********')