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

namespace TellerSystem.Contract.Function
{
    /// <summary>
    /// 计划扣划信息查询
    /// 查询计划扣划登记簿
    /// </summary>
    public class QueryDeductPlanInfo : TFOutput
    {
        #region Output
        /// <summary>
        /// 扣划总额 0390
        /// 
        /// </summary>
        public string KHZE { get; internal set; }

        /// <summary>
        /// 固定扣划金额 0400
        /// 
        /// </summary>
        public string GDKHJE { get; internal set; }

        /// <summary>
        /// 已扣划总金额 0410
        /// 
        /// </summary>
        public string YKHZJE { get; internal set; }

        /// <summary>
        /// 累计未扣划金额 0420
        /// 
        /// </summary>
        public string LJWKHJE { get; internal set; }

        /// <summary>
        /// 上次扣划金额 0430
        /// 
        /// </summary>
        public string SCKHJE { get; internal set; }

        /// <summary>
        /// 上次扣划日期 0440
        /// 
        /// </summary>
        public string SCKHRQ { get; internal set; }

        /// <summary>
        /// 起始日期 0450
        /// 
        /// </summary>
        public string QSRQ { get; internal set; }

        /// <summary>
        /// 终止日期 0460
        /// 
        /// </summary>
        public string ZZRQ { get; internal set; }

        /// <summary>
        /// 扣划方式 0500
        /// 扣划方式1：固定扣划金额
        /// </summary>
        public string KHFS { get; internal set; }

        /// <summary>
        /// 扣划笔数 0520
        /// 
        /// </summary>
        public string KHBS { get; internal set; }

        /// <summary>
        /// 状态 0690
        /// 0-正常  1-取消
        /// </summary>
        public string ZT { get; internal set; }

        /// <summary>
        /// 扣划周期 0670
        /// 0-月 1-季 2-年
        /// </summary>
        public string KHZQ { get; internal set; }


        #endregion

        #region Input
		/// <summary>
        /// 参数清单
        /// </summary>
        public class Input : TFInput
        {
            /// <summary>
            /// 账号 0310
            ///  
            /// </summary>
            public string ZH { get; set; }

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

            /// <summary>
            /// 冻结序号 0350
            ///  
            /// </summary>
            public string DJXH { get; set; }


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

                PageData.TradeAPIs.CallServer(MessageData);
                if (MessageData.Fd12 != "0000")
                {
                    output.IsFailed = true;
                    output.FailureCause = PageData.TradeAPIs.GetError(MessageData);
                }                
                output.KHZE = (MessageData.Fd39);
                output.GDKHJE = (MessageData.Fd40);
                output.YKHZJE = (MessageData.Fd41);
                output.LJWKHJE = (MessageData.Fd42);
                output.SCKHJE = (MessageData.Fd43);
                output.SCKHRQ = (MessageData.Fd44);
                output.QSRQ = (MessageData.Fd45);
                output.ZZRQ = (MessageData.Fd46);
                output.KHFS = (MessageData.Fd50);
                output.KHBS = (MessageData.Fd52);
                output.ZT = (MessageData.Fd69);
                output.KHZQ = (MessageData.Fd67);

                return output;
            }
        }
        #endregion
    }
}
