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

namespace TellerSystem.Contract.Function
{
    /// <summary>
    /// 根据质押总编号查询关联总金额和总数量
    /// 根据质押总编号查询关联总金额和总数量
    /// </summary>
    public class CheckStatusPledge : TFOutput
    {
        #region Output
        /// <summary>
        /// 关联总金额 0390
        /// 
        /// </summary>
        public string GLZJE { get; internal set; }

        /// <summary>
        /// 关联质押物总质押金额 0400
        /// 
        /// </summary>
        public string GLZYWZZYJE { get; internal set; }

        /// <summary>
        /// 关联质押物编号数量 0480
        /// 
        /// </summary>
        public string GLZYWBHSL { get; internal set; }

        /// <summary>
        /// 关联质押物总数量 0490
        /// 
        /// </summary>
        public string GLZYWZSL { get; internal set; }


        #endregion

        #region Input
		/// <summary>
        /// 参数清单
        /// </summary>
        public class Input : TFInput
        {
            /// <summary>
            /// 质押总编号 0320
            ///  
            /// </summary>
            public string ZYZBH { get; set; }


            /// <summary>                 
            /// 定义业务逻辑              
            /// </summary>                
            /// <returns></returns>  
            public override TFOutput Raise()
            {
                //拉取数据                                  
                var output = new CheckStatusPledge();
                PageData.TradeAPIs.InitFd(MessageData);
                PageData.TradeAPIs.CommSend(MessageData);
				MessageData.Fd126_5 = MainCode;
                MessageData.Fd16 = "K010";
                MessageData.Fd32 = ZYZBH;

                PageData.TradeAPIs.CallServer(MessageData);
                if (MessageData.Fd12 != "0000")
                {
                    output.IsFailed = true;
                    output.FailureCause = PageData.TradeAPIs.GetError(MessageData);
                }                
                output.GLZJE = DelSpace(MessageData.Fd39);
                output.GLZYWZZYJE = DelSpace(MessageData.Fd40);
                output.GLZYWBHSL = DelSpace(MessageData.Fd48);
                output.GLZYWZSL = DelSpace(MessageData.Fd49);

                return output;
            }
        }
        #endregion
    }
}
