Beispiel #1
0
def VMENU_QueryAccInfo():


    AfaLoggerFunc.tradeInfo('>>>查询账户信息')


    try:
        #通讯区打包
        HostContext.I1TRCD = '8810'                        #主机交易码
        HostContext.I1SBNO = TradeContext.I1SBNO           #该交易的发起机构
        HostContext.I1USID = TradeContext.I1USID           #交易柜员号
        HostContext.I1AUUS = TradeContext.I1AUUS           #授权柜员
        HostContext.I1AUPS = TradeContext.I1AUPS           #授权柜员密码
        HostContext.I1WSNO = TradeContext.I1WSNO           #终端号
        HostContext.I1ACNO = TradeContext.I1ACCNO          #帐号
        HostContext.I1CYNO = '01'                          #币种
        HostContext.I1CFFG = '1'                           #密码校验标志(0-需要,1-不需要)
        HostContext.I1PSWD = ''                            #密码
        HostContext.I1CETY = TradeContext.I1VOUHTYPE       #凭证种类
        HostContext.I1CCSQ = TradeContext.I1VOUHNO         #凭证号码
        HostContext.I1CTFG = TradeContext.I1CHFLAG         #钞汇标志


        #与主机通讯
        if not AfaHostFunc.CommHost('8810'):
            return ExitSubTrade( TradeContext.errorCode, TradeContext.errorMsg )


        if ( HostContext.O1REKD == '900' ):
            return ExitSubTrade( '9000', '非个人结算户,不能操作' )


        TradeContext.tradeResponse.append(['O1USERNAME', HostContext.O1CUNM])   #客户姓名
        TradeContext.tradeResponse.append(['O1IDTYPE',   HostContext.O1IDTY])   #证件种类
        TradeContext.tradeResponse.append(['O1IDCODE',   HostContext.O1IDNO])   #证件号码
        TradeContext.tradeResponse.append(['O1MAFG',     HostContext.O1MAFG])   #公司卡/个人卡标志(0:单位 1:个人)
        TradeContext.tradeResponse.append(['O1REKD',     HostContext.O1REKD])   #账户类型(特殊处理:900-非个人结算户)
        TradeContext.tradeResponse.append(['O1ACBL',     HostContext.O1ACBL])   #账户余额
        TradeContext.tradeResponse.append(['O1CUBL',     HostContext.O1CUBL])   #可用余额
        TradeContext.tradeResponse.append(['O1DATA',     HostContext.O1ITEM])   #附加信息(科目代码)

        return True

    except Exception, e:
        AfaLoggerFunc.tradeFatal( str(e) )
        return ExitSubTrade( '9999', '查询账户信息异常(主机)' )
Beispiel #2
0
def QueryAccInfo( ):

    AfaLoggerFunc.tradeInfo(">>>查询账户信息(主机)")

    try:
        #通讯区打包
        HostContext.I1TRCD = '8810'                        #主机交易码
        HostContext.I1SBNO = TradeContext.I1SBNO           #该交易的发起机构
        HostContext.I1USID = TradeContext.I1USID           #交易柜员号
        HostContext.I1AUUS = TradeContext.I1AUUS           #授权柜员
        HostContext.I1AUPS = TradeContext.I1AUPS           #授权柜员密码
        HostContext.I1WSNO = TradeContext.I1WSNO           #终端号
        HostContext.I1ACNO = TradeContext.I1ACCNO          #帐号
        HostContext.I1CYNO = TradeContext.I1CURRTYPE       #币种

        if ( TradeContext.I1PASSCHKFLAG == "1" ):
            HostContext.I1CFFG = "0"                       #密码校验标志(需要)
        else:
            HostContext.I1CFFG = "1"                       #密码校验标志(不需要)

        HostContext.I1PSWD = TradeContext.I1PASSWD         #密码
        HostContext.I1CETY = TradeContext.I1VOUHTYPE       #凭证种类
        HostContext.I1CCSQ = TradeContext.I1VOUHNO         #凭证号码
        HostContext.I1CTFG = '0'                           #钞汇标志


        #与主机通讯
        if not AfaHostFunc.CommHost('8810'):
            return ExitSubTrade( TradeContext.errorCode, TradeContext.errorMsg )


        #缓冲主机返回信息
        TradeContext.USERNAME   = HostContext.O1CUNM        #用户名称
        TradeContext.IDTYPE     = HostContext.O1IDTY        #证件类型
        TradeContext.IDCODE     = HostContext.O1IDNO        #证件号码
        TradeContext.ACCSTATUS  = HostContext.O1ACST        #账户状态

        return True
        
    except Exception, e:
        AfaLoggerFunc.tradeFatal( str(e) )
        return ExitSubTrade( '9999', '查询账户信息(主机)异常')
Beispiel #3
0
        if not AfaFunc.ChkActStatus( ) :
            raise AfaFlowControl.flowException( )


        #=====================获取平台流水号====================================
        if AfaFunc.GetSerialno( ) == -1 :
            raise AfaFlowControl.flowException( )


        #=====================插入流水表========================================
        if not AfaTransDtlFunc.InsertDtl( ) :
            raise AfaFlowControl.flowException( )


        #=====================与主机交换========================================
        AfaHostFunc.CommHost() 


        #=====================更新流水表========================================
        if( not AfaTransDtlFunc.UpdateDtl( 'TRADE' ) ):
            raise AfaFlowControl.flowException( )


        #=====================外调接口(后处理)==================================
        if subModuleExistFlag==1 :
            if not subModuleHandle.SubModuleDoSnd():
                raise AfaFlowControl.flowException( )


        #=====================发票信息处理======================================
        if TradeContext.errorCode=='0000' and TradeContext.existVariable( "billData" ):
Beispiel #4
0
            if ( TradeContext.localFlag == '1' ):
                #外调接口(后处理)
                if subModuleExistFlag==1 :
                    if not subModuleHandle.SubModuleDoSnd():
                        raise AfaFlowControl.flowException( )

        #主机操作
        if( TradeContext.existVariable( "hostFlag" ) ):
            if ( TradeContext.hostFlag == '1' ):

                #判断主机接口代码是否存在
                if( not TradeContext.existVariable( "hostCode" ) ):
                    return AfaFlowControl.ExitThisFlow( 'A0001', '主机代码[hostCode]值不存在,交易失败' )

                #与主机交换
                AfaHostFunc.CommHost(TradeContext.hostCode)

                #外调接口(后处理)
                if subModuleExistFlag==1 :
                    if not subModuleHandle.SubModuleDoTrd():
                        raise AfaFlowControl.flowException( )

        #企业操作
        if( TradeContext.existVariable( "corpFlag" ) ):
            if ( TradeContext.corpFlag == '1' ):

                #与通讯前置交换
                AfaAfeFunc.CommAfe()

                #外调接口(后处理)
                if subModuleExistFlag==1 :
Beispiel #5
0
def SubModuleDoFst( ):
    try:
        AfaLoggerFunc.tradeInfo('--------------通缴业务网银查询开始--------------------')
        
        #柜员流水、中间业务流水、联系电话、交易机构、交易日期、交易时间、缴款人姓名、缴款金额 、缴款人账号、收款人账号、币种
        sql = "select bankserno,agentserialno,note1,brno,workdate,worktime,username,cast(amount as decimal(15,2)),draccno,craccno,currtype from afa_maintransdtl"
        sql = sql + " where agentserialno = '" + TradeContext.agentserialno + "'"
        sql = sql + " and        workdate = '" + TradeContext.workdate      + "'"
        
        #20120820陈浩注释,sysId 字段不需要,流水号和日期可唯一确定一笔交易
        #sql = sql + " and           sysid = '" + TradeContext.sysId         + "'"
        
        sql = sql + " and revtranf = '0' and bankstatus='0'"
        
        AfaLoggerFunc.tradeInfo('网银查询语句'+ sql)
        
        records = AfaDBFunc.SelectSql( sql )
        
        if records == None:
            TradeContext.errorCode,TradeContext.errorMsg = "0001" ,"查询数据库失败"
            return False
        elif len(records) == 0:
            TradeContext.errorCode,TradeContext.errorMsg = "0001","没有该笔缴费记录"
            AfaLoggerFunc.tradeInfo('没有该笔缴费记录')
            return False
        else:
            TradeContext.O1TLSQ	   = str(records[0][0]).strip()                 #柜员流水
            TradeContext.SERIALNO  = str(records[0][1]).strip()                 #中间业务流水
            TradeContext.PHONE	   = str(records[0][2]).strip()                 #联系电话
            TradeContext.BANKNAME  = str(records[0][3]).strip()                 #交易机构
            TradeContext.TransDate = str(records[0][4]).strip()                 #交易日期
            TradeContext.TransTime = str(records[0][5]).strip()                 #交易时间
            TradeContext.PYRNAM	   = str(records[0][6]).strip()                 #缴款人姓名
            TradeContext.OCCAMT	   = str(records[0][7]).strip()                 #缴款金额
            TradeContext.PYRACCNO  = str(records[0][8]).strip()                 #缴款人账号
            TradeContext.REVACCNO  = str(records[0][9]).strip()                 #收款人账号
            TradeContext.CUR       = str(records[0][10]).strip().rjust(2,'0')   #币种

        #调用8810查询收款人账户信息
        HostContext.I1TRCD="8810"
        HostContext.I1SBNO=""
        HostContext.I1USID="999996"
        HostContext.I1AUUS=""
        HostContext.I1AUPS=""
        HostContext.I1WSNO=""
        HostContext.I1ACNO=TradeContext.REVACCNO
        HostContext.I1CYNO="01"
        HostContext.I1CFFG=""
        HostContext.I1PSWD=""
        HostContext.I1CETY=""
        HostContext.I1CCSQ=""
        HostContext.I1CTFG="0"
        AfaHostFunc.CommHost("8810")
        
        if(TradeContext.errorCode!="0000"):
            TradeContext.errorCode,TradeContext.errorMsg = "0001" ,"到核心查询对公账户信息失败" 
            return False
        else:
            AfaLoggerFunc.tradeInfo( '>>>>查询账户信息成功' )
            TradeContext.REVNAME = HostContext.O1ACNM            #收款人户名
            TradeContext.REVBANK = HostContext.O1OPNT            #收款人开户行
        if len(TradeContext.PYRACCNO) != 0:
            #调用8810查询缴款人账户信息
            HostContext.I1TRCD="8810"
            HostContext.I1SBNO=""
            HostContext.I1USID="999996"
            HostContext.I1AUUS=""
            HostContext.I1AUPS=""
            HostContext.I1WSNO=""
            HostContext.I1ACNO=TradeContext.PYRACCNO
            HostContext.I1CYNO="01"
            HostContext.I1CFFG=""
            HostContext.I1PSWD=""
            HostContext.I1CETY=""
            HostContext.I1CCSQ=""
            HostContext.I1CTFG="0"
            AfaHostFunc.CommHost("8810")
            
            if(TradeContext.errorCode!="0000"):
                TradeContext.errorCode,TradeContext.errorMsg = "0001" ,"到核心查询缴款人账户信息失败" 
                return False
            else:
                AfaLoggerFunc.tradeInfo( '>>>>查询账户信息成功' )
                TradeContext.SNDBNKNM = HostContext.O1OPNT            #收款人开户行
            
        #获取摘要代码
        if not AfaFunc.GetSummaryInfo( ):
            return False
        else:
            TradeContext.SUMMARY = TradeContext.__summaryName__               #摘要
            
        AfaLoggerFunc.tradeInfo('---------------通缴业务网银查询结束--------------------')
        
        return True 
    except  Exception, e:
        AfaLoggerFunc.tradeInfo( str(e) )
        TradeContext.errorMsg = str(e)
        AfaFlowControl.flowException( )
Beispiel #6
0
        #TradeContext.HostCode    = '8808'             #主机交易码
        #TradeContext.brno        = PL_BESBNO_BCLRSB   #机构号
        #TradeContext.tellerno    = PL_BETELR_AUTO     #柜员号
        #TradeContext.termId      = '1234567890'       #终端号
        #TradeContext.sysId       = '9999'             #系统标识
        TradeContext.TransCode   = '9999'             #交易码
        HostContext.I1TRCD      = '8808'             #主机交易码
        HostContext.I1SBNO      = PL_BESBNO_BCLRSB   #机构号
        HostContext.I1USID      = PL_BETELR_AUTO     #柜员号
        HostContext.I1WSNO      = '1234567890'       #终端号
        HostContext.I1PYNO      = '9999'             #系统标识
        HostContext.I1AUUS = ''
        HostContext.I1AUPS = ''

        #====与主机进行通讯====
        AfaHostFunc.CommHost('8808')
      
        #=====判断主机返回结果====
        if TradeContext.errorCode == '0000':
            #=====同步数据库表AFA_DATE====
            sql = "UPDATE AFA_DATE SET WORKDATE='" + HostContext.O1TRDT + "'"
            sql = sql + ", WORKTIME = '" + HostContext.O1TRTM + "'"
            sql = sql + ", HOSTDATE = '" + HostContext.O1DATE + "'"

            ret = AfaDBFunc.UpdateSqlCmt(sql)
            if ret < 0:
                AfaLoggerFunc.tradeInfo(AfaDBFunc.sqlErrMsg)
                rccpsCronFunc.cronExit("S999","更新系统时间异常")
            else:
                AfaLoggerFunc.tradeInfo('主机日期['+HostContext.O1TRDT +']')
                AfaLoggerFunc.tradeInfo('主机时间['+HostContext.O1TRTM +']')