/// <summary>
        /// 县级行社上存清算资金查询
        /// </summary>
        /// <param name="tellerNO"></param>
        /// <param name="organNO"></param>
        /// <param name="tradeDate"></param>
        /// <param name="currcency"></param>
        /// <param name="option"></param>
        /// <param name="codemsg"></param>
        /// <returns></returns>
        public static Guid RetrieveDepositClearingFund(String tellerNO, String organNO, DateTime tradeDate, String currcency, String option, ref byte[] codemsg)
        {
            DepositClearingFundData acctdata = new DepositClearingFundData();

            acctdata.RQhdrHandler.SYS_TXID = "205050"; // 会计记账,主机启动原交易码
            acctdata.RQhdrHandler.TX_OUNO = organNO;
            acctdata.RQhdrHandler.TEL_ID = tellerNO;
            acctdata.RQhdrHandler.TX_MODE = "0";
            acctdata.RQhdrHandler.TX_DTE = tradeDate.ToString("yyyy-MM-dd");
            acctdata.RQhdrHandler.SRV_JNO = CommonDataHelper.SpaceString(12);
            acctdata.RQhdrHandler.SRV_REV_JNO = CommonDataHelper.SpaceString(12);
            acctdata.RQhdrHandler.SRV_JNO = CommonDataHelper.SpaceString(12);
            acctdata.RQhdrHandler.SRV_REV_JNO = CommonDataHelper.SpaceString(12);
            acctdata.RQhdrHandler.HOST_JNO = CommonDataHelper.SpaceString(11);

            acctdata.RQDTL.Currency = currcency;
            acctdata.RQDTL.DistrictNO = "";
            acctdata.RQDTL.OrgNO = "";
            acctdata.RQDTL.Option = option;

            return MsgTransfer.CodeMsgToBinary(acctdata, ref codemsg);
        }
        private String TestForDepositClearingFundRetrieved(StringBuilder result, DepositClearingFundData respData)
        {
            if (respData == null)
            {
                return result.ToString();
            }
            if (!string.IsNullOrEmpty(respData.SyserrHandler.Message))
            {
                result.AppendFormat("SYSERR:{0}", respData.SyserrHandler.Message);
            }

            if (respData.OmsgHandler.NUM_ENT > 0)
            {
                result.AppendFormat("OMSG:{0} item(s).", respData.OmsgHandler.NUM_ENT);
                result.AppendLine();
                foreach (OMSG_Item_Handler omsgItem in respData.OmsgHandler.OMSGItemList)
                {
                    result.AppendFormat("MOD_ID:{0};MSG_NO:{1};MSG_TYPE:{2};MSG_TEXT:{3};", omsgItem.MOD_ID, omsgItem.MSG_NO, omsgItem.MSG_TYPE, omsgItem.MSG_TEXT);
                    result.AppendLine();
                }
            }

            int i =0;
            foreach (var item in respData.OData.BalanceInfoList)
            {
                result.AppendFormat("#{0}", ++i);
                result.AppendFormat(
                "机构号:{0};币种:{1};科目:{2};上日余额:{3};本日借方发生额:{4};本日贷方发生额:{5};当前余额:{6};下限金额:{7};轧差金额:{8};",
                item.OrgNO, item.Currency, item.Subject, item.PerviousBalance, item.DebitAmount,
                item.CreditAmount, item.CurrentBalance, item.FloorAmount, item.OffsetBalance);
                result.AppendLine();

            }
            
            return result.ToString();
        }
        /// <summary>
        /// 县级行社上存清算资金查询
        /// </summary>
        /// <param name="tellerNO"></param>
        /// <param name="organNO"></param>
        /// <param name="tradeDate"></param>
        /// <param name="currcency"></param>
        /// <param name="option"></param>
        /// <param name="codemsg"></param>
        /// <returns></returns>
        public static Guid RetrieveDepositClearingFund(String tellerNO, String organNO, DateTime tradeDate, String currcency, String option, ref byte[] codemsg)
        {
            DepositClearingFundData acctdata = new DepositClearingFundData();

            acctdata.RQhdrHandler.SYS_TXID = "205050"; // 会计记账,主机启动原交易码
            acctdata.RQhdrHandler.TX_OUNO = organNO;
            acctdata.RQhdrHandler.TEL_ID = tellerNO;
            acctdata.RQhdrHandler.TX_MODE = "0";
            acctdata.RQhdrHandler.TX_DTE = tradeDate.ToString("yyyy-MM-dd");
            acctdata.RQhdrHandler.SRV_JNO = CommonDataHelper.SpaceString(12);
            acctdata.RQhdrHandler.SRV_REV_JNO = CommonDataHelper.SpaceString(12);
            acctdata.RQhdrHandler.SRV_JNO = CommonDataHelper.SpaceString(12);
            acctdata.RQhdrHandler.SRV_REV_JNO = CommonDataHelper.SpaceString(12);
            acctdata.RQhdrHandler.HOST_JNO = CommonDataHelper.SpaceString(11);

            acctdata.RQDTL.Currency = currcency;
            acctdata.RQDTL.DistrictNO = "";
            acctdata.RQDTL.OrgNO = "";
            acctdata.RQDTL.Option = option;

            try
            {
                return PreProcessReqMsg(acctdata, ref codemsg);
            }
            catch (Exception ex)
            {
                throw new Exception(MESSAGE_ENCODE_EXCEPTION, ex);
            }
        }