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

namespace TellerSystem.Contract.Function
{
    /// <summary>
    /// 现金调拨查询
    /// 通过现金管理员查询申请调拨的信息
    /// </summary>
    public class QueryCashAllocate : TFOutput
    {
        #region Output
        /// <summary>
        /// 查询结果 0280
        /// 
        /// </summary>
        public string CXJG { get; internal set; }

        /// <summary>
        /// 标志位 0730
        /// [空格表示没有查询相关数据]第一位是否为现金管理员0-是 1-否 第二位是否交出现金管理权限0-否 1-是 第三位是否是清算中心0-否 1-是 第四位操作类型是否正确0-是 1-否
        /// </summary>
        public string BZW { get; internal set; }


        #endregion

        #region Input
		/// <summary>
        /// 参数清单
        /// </summary>
        public class Input : TFInput
        {
            /// <summary>
            /// 查询标志 0700
            ///  
            /// </summary>
            public string CXBZ { get; set; }

            /// <summary>
            /// 机构号 0910
            ///  
            /// </summary>
            public string JGH { get; set; }

            /// <summary>
            /// 柜员号 0920
            ///  
            /// </summary>
            public string GYH { get; set; }


            /// <summary>                 
            /// 定义业务逻辑              
            /// </summary>                
            /// <returns></returns>  
            public override TFOutput Raise()
            {
                //拉取数据                                  
                var output = new QueryCashAllocate();
                PageData.TradeAPIs.InitFd(MessageData);
                PageData.TradeAPIs.CommSend(MessageData);
				MessageData.Fd126_5 = MainCode;
                MessageData.Fd16 = "K059";
                MessageData.Fd70 = CXBZ;
                MessageData.Fd91 = JGH;
                MessageData.Fd92 = GYH;

                PageData.TradeAPIs.CallServer(MessageData);
                if (MessageData.Fd12 != "0000")
                {
                    output.IsFailed = true;
                    output.FailureCause = PageData.TradeAPIs.GetError(MessageData);
                }                
                output.CXJG = (MessageData.Fd28);
                output.BZW = (MessageData.Fd73);

                return output;
            }
        }
        #endregion
    }
}
