当前位置: 首页>>代码示例>>Python>>正文


Python AfaFlowControl.exitMainFlow方法代码示例

本文整理汇总了Python中AfaFlowControl.exitMainFlow方法的典型用法代码示例。如果您正苦于以下问题:Python AfaFlowControl.exitMainFlow方法的具体用法?Python AfaFlowControl.exitMainFlow怎么用?Python AfaFlowControl.exitMainFlow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AfaFlowControl的用法示例。


在下文中一共展示了AfaFlowControl.exitMainFlow方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: SubModuleDoSnd

# 需要导入模块: import AfaFlowControl [as 别名]
# 或者: from AfaFlowControl import exitMainFlow [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 )
          
        if(TradeContext.errorCode=='0000'):
            TradeContext.errorMsg="续期查询成功"
        
        
        #TradeContext.syr_name1 = ''
        #syr_name = []
        #if TradeContext.existVariable('syr_name1'):
        #    syr_name.append('xiaozhang')
        #    syr_name.append('xig')
        TradeContext.O1ACUR = '1'
        #    TradeContext.syr_name = syr_name 
     
        AfaLoggerFunc.tradeInfo('退出续期查询交易与第三方通讯后处理' )    
        return True
        
    except AfaFlowControl.flowException, e:
        AfaFlowControl.exitMainFlow( str(e) )
开发者ID:simonliuyl,项目名称:AFA1.0,代码行数:29,代码来源:TYBT001_8612.py

示例2: SubModuleDoSnd

# 需要导入模块: import AfaFlowControl [as 别名]
# 或者: from AfaFlowControl import exitMainFlow [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 or type(value) is ListType) :
                setattr( TradeContext, name, value )
            
        if(TradeContext.errorCode=='0000'):
            #第三方返回成功后更新原保单印刷号
            update_sql = "update afa_maintransdtl set "                                             
            update_sql = update_sql + " userno            = '" + TradeContext.userno1     + "'"       #user1新保单印刷号
            update_sql = update_sql + " where userno      = '" + TradeContext.userno      + "'"       #user原保单印刷号 
            update_sql = update_sql + " and workdate      = '" + TradeContext.workDate    + "'"       #日期  
            update_sql = update_sql + " and agentserialno = '" + TradeContext.PreSerialno + "'"       #缴费成功的中间业务流水号
            
            #更新并提交数据
            if  AfaDBFunc.UpdateSqlCmt(update_sql)<0:
                return AfaFlowControl.ExitThisFlow("A999","更新投保单号失败")
                
            #第三方返回成功后生成现金价值文件
            if not YbtFunc.createFile( ):
                return False

        AfaLoggerFunc.tradeInfo('退出单证重打[T'+TradeContext.TemplateCode+'_'+TradeContext.TransCode+']与第三方通讯后处理' )
        return True
    
    except Exception, e:
        AfaFlowControl.exitMainFlow(str(e))
开发者ID:simonliuyl,项目名称:AFA1.0,代码行数:34,代码来源:TYBT001_8614.py

示例3: ChkUnitLimit

# 需要导入模块: import AfaFlowControl [as 别名]
# 或者: from AfaFlowControl import exitMainFlow [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) )
开发者ID:simonliuyl,项目名称:AFA1.0,代码行数:35,代码来源:T001000_8623.py

示例4: SubModuleMainFst

# 需要导入模块: import AfaFlowControl [as 别名]
# 或者: from AfaFlowControl import exitMainFlow [as 别名]
def SubModuleMainFst( ):
    try:
        
        AfaLoggerFunc.tradeInfo( '进入变更开户行行号[T'+TradeContext.TemplateCode+'_'+TradeContext.TransCode+']' )
        
        #检查原开户行行号是否与数据库中登记的开户行行号一致
        sqlStr = ""
        sqlStr = sqlStr + "SELECT PAYOPBKCODE FROM TIPS_CUSTINFO WHERE TAXORGCODE = '" + TradeContext.taxOrgCode + "'" 
        sqlStr = sqlStr + " AND PAYACCT ='" + TradeContext.payAcct + "'"
        #sqlStr = sqlStr + " AND PAYOPBKCODE ='" + TradeContext.payBkCode+ "'"
        sqlStr = sqlStr + " AND PROTOCOLNO ='" +TradeContext.protocolNo+"'"
        
        AfaLoggerFunc.tradeInfo(sqlStr)
        
        records = AfaDBFunc.SelectSql( sqlStr )
        
        if( records == None ):
            
            return TipsFunc.ExitThisFlow( 'A0027', '表操作异常:'+AfaDBFunc.sqlErrMsg )
                
        elif( len( records )==0 ):
                
            return TipsFunc.ExitThisFlow( 'A0027', '没有满足条件的数据记录!' )
            
        else: 
            AfaLoggerFunc.tradeDebug("原开户行行号为:" +records[0][0])
                
        if(records[0][0] !=TradeContext.payBkCode):
            TradeContext.errorCode,TradeContext.errorMsg = "A0001","原开户行行号不正确!"
            return False
                
        
        #====================更新开户行行号====================
        AfaLoggerFunc.tradeInfo(">>>更改开户行行号")
        update_sql = ""
        update_sql = "UPDATE TIPS_CUSTINFO SET PAYOPBKCODE = '" + TradeContext.payBkCode1 + "'"
        update_sql = update_sql + "WHERE TAXORGCODE = '" + TradeContext.taxOrgCode + "'"
        update_sql = update_sql + " AND PAYACCT ='" + TradeContext.payAcct + "'"
        update_sql = update_sql + " AND PAYOPBKCODE ='" + TradeContext.payBkCode+ "'"
        update_sql = update_sql + " AND PROTOCOLNO ='" +TradeContext.protocolNo+"'" 
        
        AfaLoggerFunc.tradeInfo(update_sql)
        
        if  AfaDBFunc.UpdateSqlCmt(update_sql)<0:
                return AfaFlowControl.ExitThisFlow("A0027","更新开户行行号失败!")
        
        TradeContext.errorCode,TradeContext.errorMsg = "0000","交易成功"

        AfaLoggerFunc.tradeInfo( '退出变更开户行行号[T'+TradeContext.TemplateCode+'_'+TradeContext.TransCode+']' )
    
        return True 
    
    except Exception, e:             

        AfaFlowControl.exitMainFlow(str(e))    
开发者ID:simonliuyl,项目名称:AFA1.0,代码行数:57,代码来源:TTPS001_8652.py

示例5: SubModuleDoSnd

# 需要导入模块: import AfaFlowControl [as 别名]
# 或者: from AfaFlowControl import exitMainFlow [as 别名]
def SubModuleDoSnd():
    AfaLoggerFunc.tradeInfo('缴费信息查询交易[T'+TradeContext.TemplateCode+'_'+TradeContext.TransCode+']' )
    try:
        sql = "select agentserialno,"
        sql = sql + "userno,username,idcode,amount,usernameb,idcodeb,loandate,loanenddate,crevouno,crebarno,procode,cpicteller,note1 "
        sql = sql + " from afa_adbinfo where userno = '" + TradeContext.CpicNo.strip() + "' and note3 = '" + TradeContext.unitno.strip() + "'"
        sql = sql + " and workdate = '"+TradeContext.workDate + "'"
        sql = sql + " and tellerno = '"+TradeContext.tellerno + "'"
        sql = sql + " and dtlstatus = '0' "
        sql = sql + " order by agentserialno desc"
        AfaLoggerFunc.tradeInfo('缴费信息查询语句'+ sql)
        records = AfaDBFunc.SelectSql( sql )
        if(len(records) < 1):
            TradeContext.errorCode,TradeContext.errorMsg = "0001","无此投保信息"
            return False
        else:
            #用户编号(保险单号)
            TradeContext.CpicNo = records[0][1]
            #投保人名称
            TradeContext.UserName = records[0][2]
            #投保人身份证号码
            TradeContext.GovtID = records[0][3]
            #金额
            TradeContext.PaymentAmt = records[0][4]
            #被保人姓名
            TradeContext.UserNameB = records[0][5]
            #被保人身份证号码
            TradeContext.GovtIDB = records[0][6]
            #借款日期
            TradeContext.LoanDate = records[0][7]
            #借款到期日
            TradeContext.LoanEndDate = records[0][8]
            #借款凭证编号
            TradeContext.CreVouNo = records[0][9]
            #贷款合同编号
            TradeContext.CreBarNo = records[0][10]
            #保险种类
            TradeContext.ProCode = records[0][11]
            #太保业务员代码
            TradeContext.CpicTeller = records[0][12]
            #保单号
            TradeContext.CpciPNo = records[0][13]
            #交易返回码
            TradeContext.errorCode = '0000'
        AfaLoggerFunc.tradeInfo('退出缴费信息查询交易' )
        return True
    except Exception, e:
        AfaFlowControl.exitMainFlow(str(e))
开发者ID:simonliuyl,项目名称:AFA1.0,代码行数:50,代码来源:T5204_8439.py

示例6: SubModuleDoSnd

# 需要导入模块: import AfaFlowControl [as 别名]
# 或者: from AfaFlowControl import exitMainFlow [as 别名]
def SubModuleDoSnd():
    AfaLoggerFunc.tradeInfo('进入查询交易[T'+TradeContext.TemplateCode+'_'+TradeContext.TransCode+']与第三方通讯后处理' )
    try:
        
        Party3Context.agentSerialno = TradeContext.agentserialno
        Party3Context.workDate      = TradeContext.workDate
        Party3Context.workTime      = TradeContext.workTime
        Party3Context.amount        = TradeContext.amount
        Party3Context.hostserialno  = TradeContext.hostserialno
        Party3Context.CreBarNo      = TradeContext.CreBarNo  
        Party3Context.CreVouNo      = TradeContext.CreVouNo  
        Party3Context.LoanDate      = TradeContext.LoanDate
        Party3Context.LoanEndDate   = TradeContext.LoanEndDate
        Party3Context.ProCode       = TradeContext.ProCode
        Party3Context.ProCodeStr    = TradeContext.ProCodeStr
        Party3Context.PlanName      = TradeContext.PlanName  
        Party3Context.AccType       = TradeContext.AccType   
        
        names = Party3Context.getNames( )
        for name in names:
            value = getattr( Party3Context, name )
            setattr( TradeContext, name, value )
            #AfaLoggerFunc.tradeInfo("字段名称  ["+str(name)+"] =  "+str(value))
        if( TradeContext.errorCode == '0000' ):
            #if( TradeContext.existVariable( "ProCodeStr" ) ):
            #    if (TradeContext.ProCodeStr == "EL5602"):
            #        TradeContext.ProCode == "1"
            #    else:
            #        TradeContext.ProCode == "0"
            #责任起始日期日期
            if ( TradeContext.existVariable( "EffDate" )):
                if ( len(str(TradeContext.EffDate)) == 14 ):
                    TradeContext.EffDate = TradeContext.EffDate[0:4]+TradeContext.EffDate[6:8]+TradeContext.EffDate[10:12]
            if ( TradeContext.existVariable( "TermDate" )):
                if ( len(str(TradeContext.TermDate)) == 14 ):
                    TradeContext.TermDate = TradeContext.TermDate[0:4]+TradeContext.TermDate[6:8]+TradeContext.TermDate[10:12]
            update_sql = "update afa_maintransdtl set "
            update_sql = update_sql + " userno = '" + TradeContext.NCpicNo + "'"
            update_sql = update_sql + " where userno = '" + TradeContext.OCpicNo + "'"
            if not AfaDBFunc.UpdateSqlCmt(update_sql):
                return AfaFlowControl.exitThisFlow("A999","更新投保单号失败")

        AfaLoggerFunc.tradeInfo('退出查询交易[T'+TradeContext.TemplateCode+'_'+TradeContext.TransCode+']与第三方通讯后处理' )
        return True
    except Exception, e:
        AfaFlowControl.exitMainFlow(str(e))
开发者ID:simonliuyl,项目名称:AFA1.0,代码行数:48,代码来源:T5201_8434.py

示例7: FalseMsg

# 需要导入模块: import AfaFlowControl [as 别名]
# 或者: from AfaFlowControl import exitMainFlow [as 别名]
def FalseMsg():

    AfaLoggerFunc.tradeInfo('>>>存放导入错误信息...') 
    
    try:
        
        errorFile = '/home/maps/afa/data/batch/down/' + TradeContext.sysId + TradeContext.busiNo[6:] + TradeContext.workDate + TradeContext.prefileName[-7:-4]+ "_WF.TXT"
        
        mfp = open( errorFile, 'a' ) 
        AfaLoggerFunc.tradeInfo("错误信息的文件为:"  + errorFile) 
        TradeContext.errorFile = TradeContext.errorMsg                                                           
        mfp = open( errorFile, 'a' )                
        mfp.write( TradeContext.errorFile + "\n")
        mfp.close()  
        
    except AfaFlowControl.flowException, e:
        AfaFlowControl.exitMainFlow( str(e) )
开发者ID:simonliuyl,项目名称:AFA1.0,代码行数:19,代码来源:AbdtQyIn.py

示例8: SubModuleDoSnd

# 需要导入模块: import AfaFlowControl [as 别名]
# 或者: from AfaFlowControl import exitMainFlow [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) )
开发者ID:simonliuyl,项目名称:AFA1.0,代码行数:21,代码来源:TYBT001_8610.py

示例9: main

# 需要导入模块: import AfaFlowControl [as 别名]
# 或者: from AfaFlowControl import exitMainFlow [as 别名]
def main( ):
    AfaLoggerFunc.tradeInfo('***农信银系统: ECHO操作模板['+TradeContext.TemplateCode+']进入***')
    try:
        #=====================初始化返回报文变量================================
        #TradeContext.tradeResponse=[]

        TradeContext.sysId = 'RCC01'
        TradeContext.TRCCO = '9900517'
 
        #=====================与中心通讯(回执)==================================
        AfaAfeFunc.CommAfe()

        #=====================退出模板==========================================
        AfaLoggerFunc.tradeInfo('***农信银系统: ECHO操作模板['+TradeContext.TemplateCode+']退出***')


    except AfaFlowControl.flowException, e:
        #流程异常
        AfaFlowControl.exitMainFlow( str(e) )
开发者ID:simonliuyl,项目名称:AFA1.0,代码行数:21,代码来源:TRCC007.py

示例10: CrtBatchNo

# 需要导入模块: import AfaFlowControl [as 别名]
# 或者: from AfaFlowControl import exitMainFlow [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) )  
开发者ID:simonliuyl,项目名称:AFA1.0,代码行数:21,代码来源:T001000_8623.py

示例11: main

# 需要导入模块: import AfaFlowControl [as 别名]
# 或者: from AfaFlowControl import exitMainFlow [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) )
开发者ID:simonliuyl,项目名称:AFA1.0,代码行数:44,代码来源:T003102.py

示例12: main

# 需要导入模块: import AfaFlowControl [as 别名]
# 或者: from AfaFlowControl import exitMainFlow [as 别名]
def main( ):

    AfaLoggerFunc.tradeInfo('******柜面对账['+TradeContext.TemplateCode+']进入******')

    try:

        #=====================初始化返回报文变量================================
        TradeContext.tradeResponse=[]
        
        #=====================获取当前系统时间==================================
        TradeContext.workDate=AfaUtilTools.GetSysDate( )
        TradeContext.workTime=AfaUtilTools.GetSysTime( )
        #=====================柜面对账处理======================================
        admin()
        #=============自动打包====================
        AfaFunc.autoPackData()

        #=====================退出模板==========================================
        AfaLoggerFunc.tradeInfo('******柜面对账['+TradeContext.TemplateCode+']退出******')

    except AfaFlowControl.flowException, e:
        AfaFlowControl.exitMainFlow( str(e) )
开发者ID:simonliuyl,项目名称:AFA1.0,代码行数:24,代码来源:Tvmenu_admin.py

示例13: SubModuleDoSnd

# 需要导入模块: import AfaFlowControl [as 别名]
# 或者: from AfaFlowControl import exitMainFlow [as 别名]
def SubModuleDoSnd( ):
    AfaLoggerFunc.tradeInfo('进入缴费反交易[T'+TradeContext.TemplateCode+'_'+TradeContext.TransCode+']与第三方通讯后处理' )
    try:
        
        Party3Context.preAgentSerno = TradeContext.preAgentSerno
        Party3Context.Amount        = TradeContext.amount        
        Party3Context.workDate      = TradeContext.workDate      

        names = Party3Context.getNames( )
        for name in names:
            value = getattr( Party3Context, name )
            setattr( TradeContext, name, value )
            #AfaLoggerFunc.tradeInfo("字段名称  ["+str(name)+"] =  "+str(value))

        if( TradeContext.errorCode != '0000' ):
            AfaLoggerFunc.tradeInfo("太保返回错误代码 ["+TradeContext.errorCode+"]")
            AfaLoggerFunc.tradeInfo("太保返回错误信息 ["+TradeContext.errorMsg+"]")
            #第三方交易失败后记录错误码和错误信息
            if not AfaAhAdb.ADBUpdateTransdtlRev( ):
                raise AfaFlowControl.accException()
        return True
    except Exception, e:
        AfaFlowControl.exitMainFlow(str(e))
开发者ID:simonliuyl,项目名称:AFA1.0,代码行数:25,代码来源:T5203_8432.py

示例14: SubModuleDoSnd

# 需要导入模块: import AfaFlowControl [as 别名]
# 或者: from AfaFlowControl import exitMainFlow [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 )
           
        if( TradeContext.errorCode != '0000' ):
            
            AfaLoggerFunc.tradeInfo("银保通返回错误代码 ["+TradeContext.errorCode+"]")
            AfaLoggerFunc.tradeInfo("银保通返回错误信息 ["+TradeContext.errorMsg+"]")
            
            #第三方交易失败后记录错误码和错误信息
            if not AfaYbtdb.ADBUpdateTransdtlRev( ):
                raise AfaFlowControl.accException()
       
        return True
    
    except Exception, e:
        AfaFlowControl.exitMainFlow(str(e))
开发者ID:simonliuyl,项目名称:AFA1.0,代码行数:26,代码来源:TYBT003_8616.py

示例15: main

# 需要导入模块: import AfaFlowControl [as 别名]
# 或者: from AfaFlowControl import exitMainFlow [as 别名]

#.........这里部分代码省略.........
            raise AfaFlowControl.flowException( )
        elif len(records) > 0 :
            VouhFunc.tradeExit( 'A005058', '['+TradeContext.sInTellerNo+']柜员不能交接!' )
            raise AfaFlowControl.flowException( )
        
        #================判断柜员是否有凭证==================================
        
        #if((TradeContext.sTellerNo)[4:] == '01' or (TradeContext.sTellerNo)[4:] == '02' or (TradeContext.sTellerNo)[4:] == '03'):
        #    VouhFunc.tradeExit('A005061', '该柜员不能进行此操作!')
        #    raise AfaFlowControl.flowException( )
            
        sqlStr = "select * from VOUH_REGISTER where TELLERNO = '" + TradeContext.sTellerNo + "' and VOUHSTATUS = '3'"
        
        records = AfaDBFunc.SelectSql( sqlStr )
        AfaLoggerFunc.tradeDebug(sqlStr)
        if records==-1 :
            VouhFunc.tradeExit( 'A005057', '查询[凭证登记表]信息异常!' )
            raise AfaFlowControl.flowException( )
        elif records==0 :
            VouhFunc.tradeExit( 'A005058', '无凭证!' )
            raise AfaFlowControl.flowException( )
        
        #======================柜员交接=====================================
        sqlStr = "update VOUH_REGISTER set TELLERNO = '" + TradeContext.sInTellerNo + "' where TELLERNO = '" + TradeContext.sTellerNo + "' and VOUHSTATUS = '3'"
        
        records = AfaDBFunc.UpdateSqlCmt( sqlStr )
        AfaLoggerFunc.tradeDebug(sqlStr)
        if records==-1 :
            VouhFunc.tradeExit( 'A005057', '更新[凭证登记表]信息异常!' )
            raise AfaFlowControl.flowException( )
        elif records==0 :
            VouhFunc.tradeExit( 'A005058', '修改[凭证登记表]基本信息失败!' )
            raise AfaFlowControl.flowException( )

        #更新凭证变更登记表
        VouhFunc.VouhModify()
        #数据库提交
        AfaDBFunc.CommitSql( )
        
        #==================查询交接凭证明细==================================
	#=====李亚杰  20080812  修改凭证查询条件,增加凭证状态为'3'的情况====
        #sqlStr = "select distinct t.VOUHTYPE,t1.VOUHNAME,t.STARTNO,t.ENDNO,t.VOUHNUM FROM VOUH_REGISTER t,VOUH_PARAMETER t1 \
        #         where t.VOUHTYPE = t1.VOUHTYPE AND substr(t.BESBNO,1,6) = substr(t1.BESBNO,1,6) \
        #         AND t.TELLERNO = '" + TradeContext.sInTellerNo + "'"

        sqlStr = "select distinct t.VOUHTYPE,t1.VOUHNAME,t.STARTNO,t.ENDNO,t.VOUHNUM FROM VOUH_REGISTER t,VOUH_PARAMETER t1 \
                 where t.VOUHTYPE = t1.VOUHTYPE AND substr(t.BESBNO,1,6) = substr(t1.BESBNO,1,6) \
                 AND t.VOUHSTATUS = '3' AND t.TELLERNO = '" + TradeContext.sInTellerNo + "'"

        AfaLoggerFunc.tradeDebug(sqlStr);
        #查询数据库并将返回的结果压至对应变量中
        records = AfaDBFunc.SelectSql( sqlStr )
        if( records == None ):
            VouhFunc.tradeExit('A005067', '查询[凭证表]操作异常!')
            raise AfaFlowControl.flowException( )
        elif( len( records ) == 0 ):
            VouhFunc.tradeExit('A005068', '凭证不存在!' )
            raise AfaFlowControl.flowException( )
        else :
            record=AfaUtilTools.ListFilterNone( records )
            total=len( records )
            
            sVouhType = ''
            sVouhName = ''
            sStartNo = ''
            sEndNo = ''
            sVouhNum = ''
            
            for i in range( 0, total ):
                if( i <> 0):
                    strSplit = '|'
                else:
                    strSplit = ''
                sVouhType = sVouhType + strSplit + records[i][0]
                sVouhName = sVouhName + strSplit + records[i][1]
                sStartNo = sStartNo + strSplit + records[i][2]
                sEndNo = sEndNo + strSplit + records[i][3]
                sVouhNum = sVouhNum + strSplit + records[i][4]
                
        TradeContext.tradeResponse.append( ['sVouhType',sVouhType] )
        TradeContext.tradeResponse.append( ['sVouhName',sVouhName] )
        TradeContext.tradeResponse.append( ['sTellerNo',TradeContext.sTellerNo] )
        TradeContext.tradeResponse.append( ['sInTellerNo',TradeContext.sInTellerNo] )
        TradeContext.tradeResponse.append( ['sStartNo',sStartNo] )
        TradeContext.tradeResponse.append( ['sEndNo',sEndNo] )
        TradeContext.tradeResponse.append( ['sVouhNum',sVouhNum] )
        TradeContext.tradeResponse.append( ['sNum',str(total)] )
        TradeContext.tradeResponse.append( ['sVouhSerial',TradeContext.sVouhSerial] )
        TradeContext.tradeResponse.append( ['sLstTrxDay',TradeContext.sLstTrxDay] )
        TradeContext.tradeResponse.append( ['sLstTrxTime',TradeContext.sLstTrxTime] )
        TradeContext.tradeResponse.append( ['errorCode','0000'] )
        TradeContext.tradeResponse.append( ['errorMsg','交易成功'] )

        #自动打包
        AfaFunc.autoPackData()

        #=============程序退出====================
        AfaLoggerFunc.tradeInfo( '凭证柜员交接['+TradeContext.TemplateCode+']退出' )
    except AfaFlowControl.flowException, e:
        AfaFlowControl.exitMainFlow( )
开发者ID:simonliuyl,项目名称:AFA1.0,代码行数:104,代码来源:Tvouh025.py


注:本文中的AfaFlowControl.exitMainFlow方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。