Exemplo n.º 1
0
        // 县级行社上存清算资金查询  
        internal static List<FundAcctInfo> OnRetrieveDepositClearingFund(String tellerno, String orgno, DateTime tradedate, String currcency, String option, out String outmsg)
        {
            outmsg = "";
            List<FundAcctInfo> resultdetail = null;
            byte[] codemsg = null;
            bool sent = false;
            string dbexception = "";
            MessageData recdata = null;
            MessageData reqdata = null;
            Guid msgid = Guid.Empty;
            try
            {
                msgid = MsgTransferUtility.RetrieveDepositClearingFund(tellerno, orgno, tradedate, currcency, option, ref codemsg);
                reqdata = MsgHandlerEntry.CreateMessageData(msgid, PlatformType.Core, tellerno, orgno, (int)MessageBizType.CoreDepositClearingFundRetrieve, codemsg);
#if MQSYNC
                recdata = MQMsgHandlerEntry.DeliverMessage(reqdata, codemsg, out sent);
#else
                recdata = MsgHandlerEntry.DeliverMessage(MsgHandlerEntry.CreateMessageData(msgid, PlatformType.Core, codemsg));
#endif
                DepositClearingFundData retdata = MsgTransfer.DecodeMsg(recdata.MessageID, recdata.CurrentRespPackage.PackageMessage) as DepositClearingFundData;
                if (retdata != null)
                {
                    if (!String.IsNullOrEmpty(retdata.SyserrHandler.Message))
                    {
                        outmsg = retdata.SyserrHandler.Message;
                    }
                    else if (retdata.OmsgHandler.NUM_ENT > 0)
                    {
                        outmsg = MsgHandlerEntry.ExtractOMsg(retdata);
                    }
                    else
                    {
                        if (retdata.OData != null)
                        {
                            //resultdetail = new FundSuperiorCurrentAcct();
                            foreach (var item in retdata.OData.BalanceInfoList)
                            {
                                FundAcctInfo acct = new FundAcctInfo();
                                acct.OrganNO = CommonDataHelper.StrTrimer(item.OrgNO, null);
                                acct.Currcency = CommonDataHelper.StrTrimer(item.Currency, null);
                                acct.Subject = CommonDataHelper.StrTrimer(item.Subject, null);
                                acct.PerviousBalance = CommonDataHelper.StrTrimer(item.PerviousBalance, null);
                                acct.DebitAmount = CommonDataHelper.StrTrimer(item.DebitAmount, null);
                                acct.CreditAmount = CommonDataHelper.StrTrimer(item.CreditAmount, null);
                                acct.CurrentBalance = CommonDataHelper.StrTrimer(item.CurrentBalance, null);
                                acct.FloorAmount = CommonDataHelper.StrTrimer(item.FloorAmount, null);
                                acct.OffsetBalance = CommonDataHelper.StrTrimer(item.OffsetBalance, null);
                                resultdetail.Add(acct);
                            }

                        }
                        //MQMsgCommonHelper.UpdateMQLog(recdata, null, outmsg, MsgLogState.RecvSucceed, out dbexception);
                    }
                }
                else
                {
                    outmsg = MsgHandlerEntry.Type_Convert_Error;
                }
                OnUpdateDBLog(recdata.MessageID, outmsg, MsgLogState.RecvFailed, out dbexception);
                return resultdetail;
            }
            catch (Exception ex)
            {
                outmsg = ex.Message;
                OnException(sent, reqdata, recdata, msgid, ex, outmsg);
                throw ex;
                //return resultdetail;
            }
        }
 /// <summary>
 /// 存放省内上级机构活期款项查询
 /// </summary>
 /// <param name="tellerno">机构号</param>
 /// <param name="orgno">柜员号</param>
 /// <param name="tradedate">发生日期</param>
 /// <param name="currcency">币种</param>
 /// <param name="result">结果数据</param>
 /// <param name="outmsg">失败时的信息</param>
 /// <returns>查询成功与否</returns>
 public static bool RetrieveSuperiorCurrentAcct(String tellerno, String orgno, DateTime tradedate, String currcency, out FundAcctInfo result, out String outmsg)
 {
     List<FundAcctInfo> resultlist = ClientSyncHelper.OnRetrieveSuperiorCurrentAcct(tellerno, orgno, tradedate, currcency, out outmsg);
     result = null;
     if (resultlist != null)
     {
         if (resultlist.Count > 0)
         {
             result = resultlist[0];
         }
         return true;
     }
     outmsg = string.Format("{0}{1}", MsgHandlerEntry.Info_Return_Core, outmsg);
     return false;
 }