예제 #1
0
        /// <summary>
        /// 查银行端会员资金台帐余额 [1010]
        /// </summary>
        /// <param name="serialNumber">请求流水号</param>
        /// <param name="req_1010">请求信息</param>
        /// <param name="isAll">是否一次查完所有数据 true是 false否</param>
        /// <param name="counterId">操作员号 5位</param>
        /// <returns></returns>
        public DataResult QueryBankMemberCapitalStationBalanceInterface(string serialNumber, Req_1010 req_1010, bool isAll = false, string counterId = "")
        {
            //用于存放生成请求报文的参数
            ExHashTable parmaKeyDict = new ExHashTable();

            //请求流水号
            //string serialNumber = AssistantHelper.GetOrderId(6, "yyyyMMddHHmmss", "");
            //报文参数赋值
            parmaKeyDict.Add("TranFunc", "1010");//交易码
            //请求流水号
            parmaKeyDict.Add("ThirdLogNo", serialNumber);
            //操作员号
            parmaKeyDict.Add("CounterId", counterId);
            //传递对象
            parmaKeyDict.Add("Model", req_1010);
            //获取结果
            var retKeyDict = GetResult(parmaKeyDict);

            if (retKeyDict.RspCode.Equals("000000"))
            {
                var model = retKeyDict.ToModel <Res_1010>();
                var list  = new List <AccountItem>();
                list.AddRange(model.AccountList);
                #region 处理查询所有
                if (isAll)
                {
                    var payPinganConfig = GlobalData.LoadPinganConfig();
                    //最大请求8次
                    int maxCount = 8;
                    for (int i = 0; i < maxCount && model != null && model.LastPage == "0"; i++)
                    {
                        req_1010.PageNum++;
                        //延时
                        Thread.Sleep(payPinganConfig.SleepTime);
                        var rs = QueryBankMemberCapitalStationBalanceInterface(serialNumber, req_1010, false, counterId);
                        if ((model = rs.Model) != null)
                        {
                            retKeyDict.RspContent += rs.RspContent;
                            model.RecordNum       += rs.Model.AccountList.Count();
                            list.AddRange(rs.Model.AccountList);
                        }
                    }
                }
                #endregion
                model.AccountList = list;
                retKeyDict.Model  = model;
            }
            return(retKeyDict);
        }
        public Result_1010 QueryBankMemberCapitalStationBalanceInterface(string serialNumber, Req_1010 req_1010, bool isAll = false, string counterId = "")
        {
            SpotTranInterface client = new SpotTranInterface();
            var result = client.QueryBankMemberCapitalStationBalanceInterface(serialNumber, req_1010, isAll, counterId);

            return(new Result_1010()
            {
                Data = result.Model,
                RspCode = result.RspCode,
                RspMsg = result.RspMsg
            });
        }