using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;

namespace TellerSystem.Contract.Function
{
    /// <summary>
    /// 账户通存通兑信息查询
    /// 账户通存通兑信息查询
    /// </summary>
    public class QueryAccountTCTD : TFOutput
    {
        #region Output
        /// <summary>
        /// 签约日期 0440
        /// 
        /// </summary>
        public string QYRQ { get; internal set; }

        /// <summary>
        /// 解约日期 0450
        /// 
        /// </summary>
        public string JYRQ { get; internal set; }

        /// <summary>
        /// 通存范围 0680
        /// 
        /// </summary>
        public string TCFW { get; internal set; }

        /// <summary>
        /// 通兑范围 0690
        /// 
        /// </summary>
        public string TDFW { get; internal set; }

        /// <summary>
        /// 状态 0700
        /// 1.正常N.解约或未签约
        /// </summary>
        public string ZT { get; internal set; }

        /// <summary>
        /// 交易机构和开户机构能否通存 0710
        /// Y.是N.否
        /// </summary>
        public string SFTC { get; internal set; }

        /// <summary>
        /// 现金单笔限额 1001
        /// 
        /// </summary>
        public string XJDBXE { get; internal set; }

        /// <summary>
        /// 现金单日累计 1002
        /// 
        /// </summary>
        public string XJDRLJ { get; internal set; }

        /// <summary>
        /// 转账单笔限额 1003
        /// 
        /// </summary>
        public string ZZDBXE { get; internal set; }

        /// <summary>
        /// 转账单日累计 1004
        /// 
        /// </summary>
        public string ZZDRLJ { get; internal set; }

        /// <summary>
        /// 单日现金发生额 0390
        /// 
        /// </summary>
        public string DRXJFSE { get; internal set; }

        /// <summary>
        /// 单日转账发生额 0400
        /// 
        /// </summary>
        public string DRZZFSE { get; internal set; }

        /// <summary>
        /// 交易机构和开户机构能否通兑 0720
        /// Y.是N.否
        /// </summary>
        public string SFTD { get; internal set; }


        #endregion

        #region Input
		/// <summary>
        /// 参数清单
        /// </summary>
        public class Input : TFInput
        {
            /// <summary>
            /// 账号 0300
            /// 1:有 0:没有，空值默认没有 
            /// </summary>
            public string ZH { get; set; }

            /// <summary>
            /// 账户序号 0340
            ///  
            /// </summary>
            public string ZHXH { get; set; }


            /// <summary>                 
            /// 定义业务逻辑              
            /// </summary>                
            /// <returns></returns>  
            public override TFOutput Raise()
            {
                //拉取数据                                  
                var output = new QueryAccountTCTD();
                PageData.TradeAPIs.InitFd(MessageData);
                PageData.TradeAPIs.CommSend(MessageData);
				MessageData.Fd126_5 = MainCode;
                MessageData.Fd16 = "K065";
                MessageData.Fd30 = ZH;
                MessageData.Fd34 = ZHXH;

                PageData.TradeAPIs.CallServer(MessageData);
                if (MessageData.Fd12 != "0000")
                {
                    output.IsFailed = true;
                    output.FailureCause = PageData.TradeAPIs.GetError(MessageData);
                }                
                output.QYRQ = (MessageData.Fd44);
                output.JYRQ = (MessageData.Fd45);
                output.TCFW = (MessageData.Fd68);
                output.TDFW = (MessageData.Fd69);
                output.ZT = (MessageData.Fd70);
                output.SFTC = (MessageData.Fd71);
                output.XJDBXE = (MessageData.Fd100_1);
                output.XJDRLJ = (MessageData.Fd100_2);
                output.ZZDBXE = (MessageData.Fd100_3);
                output.ZZDRLJ = (MessageData.Fd100_4);
                output.DRXJFSE = (MessageData.Fd39);
                output.DRZZFSE = (MessageData.Fd40);
                output.SFTD = (MessageData.Fd72);

                return output;
            }
        }
        #endregion
    }
}
